summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorsb <sb@openoffice.org>2010-04-14 17:21:13 +0200
committersb <sb@openoffice.org>2010-04-14 17:21:13 +0200
commitcd6cdc2be3b081a80c8500a3b71a1ae12dd6bc9a (patch)
tree9e021ac079e52180ca0b8ec4a5057b58d5b7598b /sfx2
parentd5436f22776a63a56bd90b44b06eb9bbfc39607f (diff)
parentb0818f8883618cbfcb18f839ce9bf8709b23fcb6 (diff)
sb118: merged in backout
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/inc/QuerySaveDocument.hxx5
-rw-r--r--sfx2/inc/about.hxx15
-rw-r--r--sfx2/inc/arrdecl.hxx5
-rw-r--r--sfx2/inc/basmgr.hxx5
-rw-r--r--sfx2/inc/bitset.hxx5
-rw-r--r--sfx2/inc/brokenpackageint.hxx5
-rw-r--r--sfx2/inc/configmgr.hxx5
-rw-r--r--sfx2/inc/dinfedt.hxx5
-rw-r--r--sfx2/inc/docinsert.hxx5
-rw-r--r--sfx2/inc/docvor.hxx5
-rw-r--r--sfx2/inc/filedlghelper.hrc5
-rw-r--r--sfx2/inc/frmload.hxx155
-rw-r--r--sfx2/inc/fwkhelper.hxx5
-rw-r--r--sfx2/inc/guisaveas.hxx5
-rw-r--r--sfx2/inc/idpool.hxx5
-rw-r--r--sfx2/inc/imagemgr.hxx5
-rw-r--r--sfx2/inc/imgmgr.hxx5
-rw-r--r--sfx2/inc/inettbc.hxx18
-rw-r--r--sfx2/inc/mailmodelapi.hxx5
-rw-r--r--sfx2/inc/makefile.mk6
-rw-r--r--sfx2/inc/mieclip.hxx5
-rw-r--r--sfx2/inc/minfitem.hxx5
-rw-r--r--sfx2/inc/msgnodei.hxx5
-rw-r--r--sfx2/inc/orgmgr.hxx5
-rw-r--r--sfx2/inc/pch/precompiled_sfx2.cxx5
-rw-r--r--sfx2/inc/pch/precompiled_sfx2.hxx6
-rw-r--r--sfx2/inc/progind.hxx5
-rw-r--r--sfx2/inc/resmgr.hxx5
-rw-r--r--sfx2/inc/sfx2/DocumentMetadataAccess.hxx5
-rw-r--r--sfx2/inc/sfx2/Metadatable.hxx5
-rw-r--r--sfx2/inc/sfx2/XmlIdRegistry.hxx5
-rw-r--r--sfx2/inc/sfx2/app.hxx9
-rw-r--r--sfx2/inc/sfx2/appuno.hxx5
-rw-r--r--sfx2/inc/sfx2/basedlgs.hxx5
-rw-r--r--sfx2/inc/sfx2/bindings.hxx8
-rw-r--r--sfx2/inc/sfx2/chalign.hxx5
-rw-r--r--sfx2/inc/sfx2/childwin.hxx5
-rw-r--r--sfx2/inc/sfx2/cntids.hrc5
-rw-r--r--sfx2/inc/sfx2/controlwrapper.hxx5
-rw-r--r--sfx2/inc/sfx2/ctrlitem.hxx5
-rw-r--r--sfx2/inc/sfx2/dialogs.hrc5
-rw-r--r--sfx2/inc/sfx2/dinfdlg.hxx5
-rw-r--r--sfx2/inc/sfx2/dispatch.hxx9
-rw-r--r--sfx2/inc/sfx2/dllapi.h7
-rw-r--r--sfx2/inc/sfx2/docfac.hxx10
-rw-r--r--sfx2/inc/sfx2/docfile.hxx20
-rw-r--r--sfx2/inc/sfx2/docfilt.hxx5
-rw-r--r--sfx2/inc/sfx2/docinf.hxx5
-rw-r--r--sfx2/inc/sfx2/dockwin.hxx5
-rw-r--r--sfx2/inc/sfx2/docmacromode.hxx5
-rw-r--r--sfx2/inc/sfx2/docstoragemodifylistener.hxx5
-rw-r--r--sfx2/inc/sfx2/doctdlg.hxx5
-rw-r--r--sfx2/inc/sfx2/doctempl.hxx5
-rw-r--r--sfx2/inc/sfx2/event.hxx5
-rw-r--r--sfx2/inc/sfx2/evntconf.hxx5
-rw-r--r--sfx2/inc/sfx2/fcontnr.hxx5
-rw-r--r--sfx2/inc/sfx2/filedlghelper.hxx5
-rw-r--r--sfx2/inc/sfx2/frame.hxx153
-rw-r--r--sfx2/inc/sfx2/frmdescr.hxx5
-rw-r--r--sfx2/inc/sfx2/frmhtml.hxx5
-rw-r--r--sfx2/inc/sfx2/frmhtmlw.hxx5
-rw-r--r--sfx2/inc/sfx2/genlink.hxx5
-rw-r--r--sfx2/inc/sfx2/hintpost.hxx5
-rw-r--r--sfx2/inc/sfx2/imgdef.hxx5
-rw-r--r--sfx2/inc/sfx2/ipclient.hxx5
-rw-r--r--sfx2/inc/sfx2/itemconnect.hxx5
-rw-r--r--sfx2/inc/sfx2/itemwrapper.hxx5
-rw-r--r--sfx2/inc/sfx2/layout-post.hxx6
-rw-r--r--sfx2/inc/sfx2/layout-pre.hxx6
-rw-r--r--sfx2/inc/sfx2/layout-tabdlg.hxx5
-rw-r--r--sfx2/inc/sfx2/layout.hxx52
-rw-r--r--sfx2/inc/sfx2/linkmgr.hxx62
-rw-r--r--sfx2/inc/sfx2/linksrc.hxx5
-rw-r--r--sfx2/inc/sfx2/lnkbase.hxx15
-rw-r--r--sfx2/inc/sfx2/macrconf.hxx5
-rw-r--r--sfx2/inc/sfx2/macropg.hxx5
-rw-r--r--sfx2/inc/sfx2/mgetempl.hxx5
-rw-r--r--sfx2/inc/sfx2/minarray.hxx5
-rw-r--r--sfx2/inc/sfx2/minstack.hxx5
-rw-r--r--sfx2/inc/sfx2/mnuitem.hxx5
-rw-r--r--sfx2/inc/sfx2/mnumgr.hxx15
-rw-r--r--sfx2/inc/sfx2/module.hxx10
-rw-r--r--sfx2/inc/sfx2/msg.hxx5
-rw-r--r--sfx2/inc/sfx2/msgpool.hxx5
-rw-r--r--sfx2/inc/sfx2/navigat.hxx5
-rw-r--r--sfx2/inc/sfx2/new.hxx5
-rw-r--r--sfx2/inc/sfx2/newstyle.hxx5
-rw-r--r--sfx2/inc/sfx2/objface.hxx5
-rw-r--r--sfx2/inc/sfx2/objitem.hxx5
-rw-r--r--sfx2/inc/sfx2/objsh.hxx42
-rw-r--r--sfx2/inc/sfx2/objuno.hxx5
-rw-r--r--sfx2/inc/sfx2/opengrf.hxx70
-rw-r--r--sfx2/inc/sfx2/passwd.hxx5
-rw-r--r--sfx2/inc/sfx2/printer.hxx5
-rw-r--r--sfx2/inc/sfx2/printopt.hxx5
-rw-r--r--sfx2/inc/sfx2/prnmon.hxx5
-rw-r--r--sfx2/inc/sfx2/progress.hxx5
-rw-r--r--sfx2/inc/sfx2/querystatus.hxx5
-rw-r--r--sfx2/inc/sfx2/request.hxx5
-rw-r--r--sfx2/inc/sfx2/sfx.hrc6
-rw-r--r--sfx2/inc/sfx2/sfxbasecontroller.hxx175
-rw-r--r--sfx2/inc/sfx2/sfxbasemodel.hxx78
-rw-r--r--sfx2/inc/sfx2/sfxdefs.hxx5
-rw-r--r--sfx2/inc/sfx2/sfxdlg.hxx12
-rw-r--r--sfx2/inc/sfx2/sfxhtml.hxx10
-rw-r--r--sfx2/inc/sfx2/sfxmodelfactory.hxx7
-rw-r--r--sfx2/inc/sfx2/sfxsids.hrc372
-rw-r--r--sfx2/inc/sfx2/sfxstatuslistener.hxx5
-rw-r--r--sfx2/inc/sfx2/sfxuno.hxx5
-rw-r--r--sfx2/inc/sfx2/shell.hxx6
-rw-r--r--sfx2/inc/sfx2/signaturestate.hxx5
-rw-r--r--sfx2/inc/sfx2/srchdefs.hxx52
-rw-r--r--sfx2/inc/sfx2/srchitem.hxx306
-rw-r--r--sfx2/inc/sfx2/styfitem.hxx5
-rw-r--r--sfx2/inc/sfx2/styledlg.hxx5
-rw-r--r--sfx2/inc/sfx2/tabdlg.hxx9
-rw-r--r--sfx2/inc/sfx2/tbxctrl.hxx5
-rw-r--r--sfx2/inc/sfx2/templdlg.hxx5
-rw-r--r--sfx2/inc/sfx2/topfrm.hxx125
-rw-r--r--sfx2/inc/sfx2/unoctitm.hxx5
-rw-r--r--sfx2/inc/sfx2/userinputinterception.hxx52
-rw-r--r--sfx2/inc/sfx2/viewfrm.hxx147
-rw-r--r--sfx2/inc/sfx2/viewsh.hxx33
-rw-r--r--sfx2/inc/sfxbasic.hxx5
-rw-r--r--sfx2/inc/sfxhelp.hxx6
-rw-r--r--sfx2/inc/sfxresid.hxx5
-rw-r--r--sfx2/inc/sorgitm.hxx5
-rw-r--r--sfx2/inc/srchdlg.hxx5
-rw-r--r--sfx2/inc/stbitem.hxx5
-rw-r--r--sfx2/inc/tplpitem.hxx5
-rw-r--r--sfx2/inc/viewfac.hxx8
-rw-r--r--sfx2/prj/build.lst1
-rw-r--r--sfx2/prj/d.lst97
-rw-r--r--sfx2/qa/complex/CheckGlobalEventBroadcaster_writer1.java5
-rw-r--r--sfx2/qa/complex/DocHelper/DialogThread.java5
-rw-r--r--sfx2/qa/complex/DocHelper/WriterHelper.java5
-rw-r--r--sfx2/qa/complex/DocHelper/makefile.mk6
-rw-r--r--sfx2/qa/complex/DocumentMetaData.java15
-rw-r--r--sfx2/qa/complex/DocumentMetadataAccessTest.java8
-rw-r--r--sfx2/qa/complex/docinfo/DocumentProperties.java5
-rw-r--r--sfx2/qa/complex/docinfo/makefile.mk8
-rw-r--r--sfx2/qa/complex/makefile.mk6
-rw-r--r--sfx2/qa/complex/standalonedocumentinfo/StandaloneDocumentInfoTest.java5
-rw-r--r--sfx2/qa/complex/standalonedocumentinfo/StandaloneDocumentInfoUnitTest.java5
-rw-r--r--sfx2/qa/complex/standalonedocumentinfo/Test01.java5
-rw-r--r--sfx2/qa/complex/standalonedocumentinfo/TestHelper.java5
-rw-r--r--sfx2/qa/complex/standalonedocumentinfo/makefile.mk6
-rw-r--r--sfx2/qa/unoapi/Test.java51
-rw-r--r--sfx2/qa/unoapi/makefile.mk36
-rw-r--r--sfx2/sdi/appslots.sdi5
-rw-r--r--sfx2/sdi/docslots.sdi6
-rw-r--r--sfx2/sdi/frmslots.sdi36
-rw-r--r--sfx2/sdi/makefile.mk7
-rw-r--r--sfx2/sdi/mdislots.sdi48
-rw-r--r--sfx2/sdi/sfx.sdi695
-rw-r--r--sfx2/sdi/sfxitems.sdi179
-rw-r--r--sfx2/sdi/sfxslots.sdi7
-rw-r--r--sfx2/sdi/viwslots.sdi6
-rw-r--r--sfx2/source/appl/app.cxx26
-rw-r--r--sfx2/source/appl/app.hrc17
-rw-r--r--sfx2/source/appl/app.src49
-rw-r--r--sfx2/source/appl/appbas.cxx19
-rw-r--r--sfx2/source/appl/appbaslib.cxx5
-rw-r--r--sfx2/source/appl/appcfg.cxx20
-rw-r--r--sfx2/source/appl/appchild.cxx9
-rw-r--r--sfx2/source/appl/appdata.cxx7
-rw-r--r--sfx2/source/appl/appdde.cxx14
-rw-r--r--sfx2/source/appl/appinit.cxx7
-rw-r--r--sfx2/source/appl/appmain.cxx5
-rw-r--r--sfx2/source/appl/appmisc.cxx14
-rw-r--r--sfx2/source/appl/appopen.cxx273
-rw-r--r--sfx2/source/appl/appquit.cxx8
-rw-r--r--sfx2/source/appl/appreg.cxx9
-rw-r--r--sfx2/source/appl/appserv.cxx140
-rw-r--r--sfx2/source/appl/appuno.cxx339
-rw-r--r--sfx2/source/appl/childwin.cxx5
-rw-r--r--sfx2/source/appl/dde.hrc5
-rw-r--r--sfx2/source/appl/dde.src5
-rw-r--r--sfx2/source/appl/fileobj.cxx706
-rw-r--r--sfx2/source/appl/fileobj.hxx95
-rw-r--r--sfx2/source/appl/fwkhelper.cxx5
-rw-r--r--sfx2/source/appl/helpdispatch.cxx5
-rw-r--r--sfx2/source/appl/helpdispatch.hxx5
-rw-r--r--sfx2/source/appl/helpinterceptor.cxx5
-rw-r--r--sfx2/source/appl/helpinterceptor.hxx5
-rw-r--r--sfx2/source/appl/imagemgr.cxx5
-rw-r--r--sfx2/source/appl/imestatuswindow.cxx5
-rw-r--r--sfx2/source/appl/imestatuswindow.hxx5
-rw-r--r--sfx2/source/appl/impldde.cxx5
-rw-r--r--sfx2/source/appl/impldde.hxx5
-rw-r--r--sfx2/source/appl/linkmgr2.cxx395
-rw-r--r--sfx2/source/appl/linksrc.cxx5
-rw-r--r--sfx2/source/appl/lnkbase2.cxx20
-rw-r--r--sfx2/source/appl/makefile.mk10
-rw-r--r--sfx2/source/appl/module.cxx32
-rw-r--r--sfx2/source/appl/newhelp.cxx5
-rw-r--r--sfx2/source/appl/newhelp.hrc5
-rw-r--r--sfx2/source/appl/newhelp.hxx5
-rw-r--r--sfx2/source/appl/newhelp.src5
-rw-r--r--sfx2/source/appl/opengrf.cxx295
-rw-r--r--sfx2/source/appl/panelist.hxx5
-rw-r--r--sfx2/source/appl/sfx.src5
-rw-r--r--sfx2/source/appl/sfxdll.cxx5
-rw-r--r--sfx2/source/appl/sfxhelp.cxx65
-rw-r--r--sfx2/source/appl/sfxpicklist.cxx7
-rw-r--r--sfx2/source/appl/shutdownicon.cxx5
-rw-r--r--sfx2/source/appl/shutdowniconOs2.cxx5
-rw-r--r--sfx2/source/appl/shutdowniconaqua.mm5
-rw-r--r--sfx2/source/appl/shutdowniconw32.cxx5
-rw-r--r--sfx2/source/appl/workwin.cxx11
-rw-r--r--sfx2/source/appl/xpackcreator.cxx5
-rw-r--r--sfx2/source/appl/xpackcreator.hxx5
-rw-r--r--sfx2/source/bastyp/bastyp.hrc5
-rw-r--r--sfx2/source/bastyp/bastyp.src5
-rw-r--r--sfx2/source/bastyp/bitset.cxx5
-rw-r--r--sfx2/source/bastyp/fltfnc.cxx7
-rw-r--r--sfx2/source/bastyp/fltfnc.src5
-rw-r--r--sfx2/source/bastyp/fltlst.cxx5
-rw-r--r--sfx2/source/bastyp/fltlst.hxx5
-rw-r--r--sfx2/source/bastyp/frmhtml.cxx5
-rw-r--r--sfx2/source/bastyp/frmhtmlw.cxx5
-rw-r--r--sfx2/source/bastyp/helper.cxx19
-rw-r--r--sfx2/source/bastyp/makefile.mk6
-rw-r--r--sfx2/source/bastyp/mieclip.cxx5
-rw-r--r--sfx2/source/bastyp/minarray.cxx5
-rw-r--r--sfx2/source/bastyp/misc.cxx5
-rw-r--r--sfx2/source/bastyp/progress.cxx40
-rw-r--r--sfx2/source/bastyp/sfxhtml.cxx39
-rw-r--r--sfx2/source/bastyp/sfxresid.cxx5
-rw-r--r--sfx2/source/config/config.hrc5
-rw-r--r--sfx2/source/config/config.src5
-rw-r--r--sfx2/source/config/evntconf.cxx5
-rw-r--r--sfx2/source/config/makefile.mk6
-rw-r--r--sfx2/source/control/bindings.cxx25
-rw-r--r--sfx2/source/control/ctrlitem.cxx5
-rw-r--r--sfx2/source/control/dispatch.cxx128
-rw-r--r--sfx2/source/control/macrconf.cxx5
-rw-r--r--sfx2/source/control/macro.cxx5
-rw-r--r--sfx2/source/control/makefile.mk9
-rw-r--r--sfx2/source/control/minfitem.cxx5
-rw-r--r--sfx2/source/control/msg.cxx5
-rw-r--r--sfx2/source/control/msgpool.cxx5
-rw-r--r--sfx2/source/control/objface.cxx5
-rw-r--r--sfx2/source/control/querystatus.cxx5
-rw-r--r--sfx2/source/control/request.cxx7
-rw-r--r--sfx2/source/control/sfxstatuslistener.cxx5
-rw-r--r--sfx2/source/control/shell.cxx5
-rw-r--r--sfx2/source/control/sorgitm.cxx5
-rw-r--r--sfx2/source/control/srchitem.cxx665
-rw-r--r--sfx2/source/control/statcach.cxx7
-rw-r--r--sfx2/source/control/unoctitm.cxx17
-rw-r--r--sfx2/source/dialog/about.cxx85
-rw-r--r--sfx2/source/dialog/alienwarn.cxx5
-rw-r--r--sfx2/source/dialog/alienwarn.hrc5
-rw-r--r--sfx2/source/dialog/alienwarn.src5
-rw-r--r--sfx2/source/dialog/basedlgs.cxx9
-rw-r--r--sfx2/source/dialog/dialog.hrc5
-rw-r--r--sfx2/source/dialog/dialog.src5
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx22
-rw-r--r--sfx2/source/dialog/dinfdlg.hrc9
-rw-r--r--sfx2/source/dialog/dinfdlg.src13
-rw-r--r--sfx2/source/dialog/dinfedt.cxx5
-rw-r--r--sfx2/source/dialog/dinfedt.hrc5
-rw-r--r--sfx2/source/dialog/dinfedt.src5
-rw-r--r--sfx2/source/dialog/dockwin.cxx9
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx5
-rw-r--r--sfx2/source/dialog/filedlghelper.src5
-rw-r--r--sfx2/source/dialog/filedlgimpl.hxx5
-rw-r--r--sfx2/source/dialog/filtergrouping.cxx5
-rw-r--r--sfx2/source/dialog/filtergrouping.hxx5
-rw-r--r--sfx2/source/dialog/intro.cxx5
-rw-r--r--sfx2/source/dialog/itemconnect.cxx5
-rw-r--r--sfx2/source/dialog/mailmodel.cxx5
-rw-r--r--sfx2/source/dialog/mailmodelapi.cxx21
-rw-r--r--sfx2/source/dialog/mailwindow.src5
-rw-r--r--sfx2/source/dialog/makefile.mk6
-rw-r--r--sfx2/source/dialog/mgetempl.cxx5
-rw-r--r--sfx2/source/dialog/mgetempl.hrc5
-rw-r--r--sfx2/source/dialog/mgetempl.src5
-rw-r--r--sfx2/source/dialog/navigat.cxx5
-rw-r--r--sfx2/source/dialog/newstyle.cxx5
-rw-r--r--sfx2/source/dialog/newstyle.hrc5
-rw-r--r--sfx2/source/dialog/newstyle.src5
-rw-r--r--sfx2/source/dialog/partwnd.cxx7
-rw-r--r--sfx2/source/dialog/passwd.cxx5
-rw-r--r--sfx2/source/dialog/passwd.hrc5
-rw-r--r--sfx2/source/dialog/passwd.src5
-rw-r--r--sfx2/source/dialog/printopt.cxx5
-rw-r--r--sfx2/source/dialog/printopt.hrc5
-rw-r--r--sfx2/source/dialog/printopt.src5
-rw-r--r--sfx2/source/dialog/recfloat.cxx5
-rw-r--r--sfx2/source/dialog/recfloat.src5
-rw-r--r--sfx2/source/dialog/sfxdlg.cxx11
-rw-r--r--sfx2/source/dialog/sfxurl.cxx5
-rw-r--r--sfx2/source/dialog/splitwin.cxx5
-rw-r--r--sfx2/source/dialog/srchdlg.cxx5
-rw-r--r--sfx2/source/dialog/srchdlg.hrc5
-rw-r--r--sfx2/source/dialog/srchdlg.src5
-rw-r--r--sfx2/source/dialog/styfitem.cxx5
-rw-r--r--sfx2/source/dialog/styledlg.cxx5
-rw-r--r--sfx2/source/dialog/tabdlg.cxx7
-rw-r--r--sfx2/source/dialog/templdlg.cxx5
-rw-r--r--sfx2/source/dialog/templdlg.hrc5
-rw-r--r--sfx2/source/dialog/templdlg.src5
-rw-r--r--sfx2/source/dialog/tplcitem.cxx5
-rw-r--r--sfx2/source/dialog/tplpitem.cxx5
-rw-r--r--sfx2/source/dialog/versdlg.cxx5
-rw-r--r--sfx2/source/dialog/versdlg.hrc5
-rw-r--r--sfx2/source/dialog/versdlg.src5
-rw-r--r--sfx2/source/doc/DocumentMetadataAccess.cxx5
-rw-r--r--sfx2/source/doc/Metadatable.cxx5
-rw-r--r--sfx2/source/doc/QuerySaveDocument.cxx5
-rw-r--r--sfx2/source/doc/SfxDocumentMetaData.cxx22
-rw-r--r--sfx2/source/doc/applet.cxx5
-rw-r--r--sfx2/source/doc/commitlistener.cxx5
-rw-r--r--sfx2/source/doc/commitlistener.hxx5
-rw-r--r--sfx2/source/doc/doc.hrc5
-rw-r--r--sfx2/source/doc/doc.src5
-rw-r--r--sfx2/source/doc/docfac.cxx43
-rw-r--r--sfx2/source/doc/docfile.cxx124
-rw-r--r--sfx2/source/doc/docfilt.cxx5
-rw-r--r--sfx2/source/doc/docinf.cxx5
-rw-r--r--sfx2/source/doc/docinsert.cxx5
-rw-r--r--sfx2/source/doc/docmacromode.cxx5
-rw-r--r--sfx2/source/doc/docstoragemodifylistener.cxx5
-rw-r--r--sfx2/source/doc/doctdlg.cxx5
-rw-r--r--sfx2/source/doc/doctdlg.hrc5
-rw-r--r--sfx2/source/doc/doctdlg.src5
-rw-r--r--sfx2/source/doc/doctempl.cxx14
-rw-r--r--sfx2/source/doc/doctempl.src5
-rw-r--r--sfx2/source/doc/doctemplates.cxx5
-rw-r--r--sfx2/source/doc/doctemplateslocal.cxx5
-rw-r--r--sfx2/source/doc/doctemplateslocal.hxx5
-rw-r--r--sfx2/source/doc/docvor.cxx5
-rw-r--r--sfx2/source/doc/docvor.hrc5
-rw-r--r--sfx2/source/doc/docvor.src5
-rw-r--r--sfx2/source/doc/frmdescr.cxx5
-rw-r--r--sfx2/source/doc/graphhelp.cxx5
-rw-r--r--sfx2/source/doc/graphhelp.hxx5
-rw-r--r--sfx2/source/doc/graphhelp.src5
-rw-r--r--sfx2/source/doc/guisaveas.cxx9
-rw-r--r--sfx2/source/doc/iframe.cxx5
-rw-r--r--sfx2/source/doc/makefile.mk8
-rw-r--r--sfx2/source/doc/new.cxx5
-rw-r--r--sfx2/source/doc/new.hrc5
-rw-r--r--sfx2/source/doc/new.src5
-rw-r--r--sfx2/source/doc/objcont.cxx303
-rw-r--r--sfx2/source/doc/objembed.cxx7
-rw-r--r--sfx2/source/doc/objitem.cxx5
-rw-r--r--sfx2/source/doc/objmisc.cxx50
-rw-r--r--sfx2/source/doc/objserv.cxx70
-rw-r--r--sfx2/source/doc/objstor.cxx112
-rw-r--r--sfx2/source/doc/objuno.cxx5
-rw-r--r--sfx2/source/doc/objxtor.cxx272
-rwxr-xr-xsfx2/source/doc/oleprops.cxx5
-rwxr-xr-xsfx2/source/doc/oleprops.hxx5
-rw-r--r--sfx2/source/doc/opostponedtruncationstream.cxx5
-rw-r--r--sfx2/source/doc/opostponedtruncationstream.hxx5
-rw-r--r--sfx2/source/doc/ownsubfilterservice.cxx5
-rw-r--r--sfx2/source/doc/plugin.cxx5
-rwxr-xr-xsfx2/source/doc/printhelper.cxx11
-rwxr-xr-xsfx2/source/doc/printhelper.hxx5
-rw-r--r--sfx2/source/doc/querytemplate.cxx5
-rw-r--r--sfx2/source/doc/querytemplate.hxx5
-rwxr-xr-xsfx2/source/doc/sfxacldetect.cxx5
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx1071
-rw-r--r--sfx2/source/doc/sfxmodelfactory.cxx14
-rw-r--r--sfx2/source/explorer/makefile.mk6
-rw-r--r--sfx2/source/explorer/nochaos.cxx5
-rw-r--r--sfx2/source/inc/SfxDocumentMetaData.hxx5
-rw-r--r--sfx2/source/inc/alienwarn.hxx5
-rw-r--r--sfx2/source/inc/appbas.hxx5
-rw-r--r--sfx2/source/inc/appbaslib.hxx5
-rw-r--r--sfx2/source/inc/appdata.hxx7
-rw-r--r--sfx2/source/inc/applet.hxx5
-rw-r--r--sfx2/source/inc/doctemplates.hxx5
-rw-r--r--sfx2/source/inc/eventsupplier.hxx5
-rw-r--r--sfx2/source/inc/fltfnc.hxx5
-rw-r--r--sfx2/source/inc/fltoptint.hxx5
-rw-r--r--sfx2/source/inc/helper.hxx5
-rw-r--r--sfx2/source/inc/helpid.hrc5
-rw-r--r--sfx2/source/inc/hexplwnd.hxx5
-rw-r--r--sfx2/source/inc/iframe.hxx5
-rw-r--r--sfx2/source/inc/intro.hxx5
-rw-r--r--sfx2/source/inc/mailmodel.hxx5
-rw-r--r--sfx2/source/inc/mnucfga.hxx5
-rw-r--r--sfx2/source/inc/nfltdlg.hxx5
-rw-r--r--sfx2/source/inc/nochaos.hxx5
-rw-r--r--sfx2/source/inc/objmnctl.hxx5
-rw-r--r--sfx2/source/inc/objshimp.hxx38
-rw-r--r--sfx2/source/inc/openflag.hxx5
-rw-r--r--sfx2/source/inc/ownsubfilterservice.hxx5
-rw-r--r--sfx2/source/inc/partwnd.hxx5
-rw-r--r--sfx2/source/inc/plugin.hxx5
-rw-r--r--sfx2/source/inc/preview.hxx5
-rw-r--r--sfx2/source/inc/recfloat.hxx5
-rw-r--r--sfx2/source/inc/referers.hxx5
-rw-r--r--sfx2/source/inc/sfxlocal.hrc5
-rw-r--r--sfx2/source/inc/sfxpicklist.hxx5
-rw-r--r--sfx2/source/inc/sfxtypes.hxx5
-rw-r--r--sfx2/source/inc/sfxurlrelocator.hxx5
-rw-r--r--sfx2/source/inc/slotserv.hxx5
-rw-r--r--sfx2/source/inc/speakerdlg.hxx70
-rw-r--r--sfx2/source/inc/splitwin.hxx5
-rw-r--r--sfx2/source/inc/statcach.hxx5
-rw-r--r--sfx2/source/inc/templdgi.hxx5
-rw-r--r--sfx2/source/inc/tplcitem.hxx5
-rw-r--r--sfx2/source/inc/tplcomp.hxx5
-rw-r--r--sfx2/source/inc/versdlg.hxx5
-rw-r--r--sfx2/source/inc/virtmenu.hxx6
-rw-r--r--sfx2/source/inc/workwin.hxx5
-rw-r--r--sfx2/source/inet/inettbc.cxx105
-rw-r--r--sfx2/source/inet/makefile.mk6
-rw-r--r--sfx2/source/layout/factory.cxx5
-rw-r--r--sfx2/source/layout/makefile.mk8
-rw-r--r--sfx2/source/layout/sfxdialog.cxx5
-rw-r--r--sfx2/source/layout/sfxtabdialog.cxx5
-rw-r--r--sfx2/source/layout/sfxtabpage.cxx52
-rw-r--r--sfx2/source/menu/makefile.mk6
-rw-r--r--sfx2/source/menu/menu.hrc5
-rw-r--r--sfx2/source/menu/menu.src5
-rw-r--r--sfx2/source/menu/mnuitem.cxx7
-rw-r--r--sfx2/source/menu/mnumgr.cxx5
-rw-r--r--sfx2/source/menu/objmnctl.cxx5
-rw-r--r--sfx2/source/menu/virtmenu.cxx45
-rw-r--r--sfx2/source/notify/eventsupplier.cxx7
-rw-r--r--sfx2/source/notify/hintpost.cxx5
-rw-r--r--sfx2/source/notify/makefile.mk6
-rw-r--r--sfx2/source/statbar/makefile.mk6
-rw-r--r--sfx2/source/statbar/stbitem.cxx5
-rw-r--r--sfx2/source/toolbox/imgmgr.cxx5
-rw-r--r--sfx2/source/toolbox/makefile.mk6
-rw-r--r--sfx2/source/toolbox/tbxitem.cxx5
-rw-r--r--sfx2/source/view/frame.cxx689
-rw-r--r--sfx2/source/view/frame2.cxx484
-rw-r--r--sfx2/source/view/frmload.cxx1003
-rw-r--r--sfx2/source/view/impframe.cxx58
-rw-r--r--sfx2/source/view/impframe.hxx72
-rw-r--r--sfx2/source/view/impviewframe.hxx94
-rw-r--r--sfx2/source/view/ipclient.cxx25
-rw-r--r--sfx2/source/view/makefile.mk14
-rw-r--r--sfx2/source/view/orgmgr.cxx5
-rw-r--r--sfx2/source/view/printer.cxx5
-rw-r--r--sfx2/source/view/prnmon.cxx7
-rw-r--r--sfx2/source/view/sfxbasecontroller.cxx461
-rw-r--r--sfx2/source/view/topfrm.cxx1646
-rw-r--r--sfx2/source/view/userinputinterception.cxx52
-rw-r--r--sfx2/source/view/view.hrc5
-rw-r--r--sfx2/source/view/view.hxx5
-rw-r--r--sfx2/source/view/view.src5
-rw-r--r--sfx2/source/view/viewfac.cxx17
-rw-r--r--sfx2/source/view/viewfrm.cxx1416
-rw-r--r--sfx2/source/view/viewfrm2.cxx523
-rw-r--r--sfx2/source/view/viewimp.hxx7
-rw-r--r--sfx2/source/view/viewprn.cxx5
-rw-r--r--sfx2/source/view/viewsh.cxx96
-rw-r--r--sfx2/util/hidother.src35
-rw-r--r--sfx2/util/makefile.mk8
-rw-r--r--sfx2/util/makefile.pmk6
459 files changed, 6672 insertions, 11144 deletions
diff --git a/sfx2/inc/QuerySaveDocument.hxx b/sfx2/inc/QuerySaveDocument.hxx
index bf54199e7f26..e25d1a23082c 100644
--- a/sfx2/inc/QuerySaveDocument.hxx
+++ b/sfx2/inc/QuerySaveDocument.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: QuerySaveDocument.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/sfx2/inc/about.hxx b/sfx2/inc/about.hxx
index f372f74c828a..b3b347917ddc 100644
--- a/sfx2/inc/about.hxx
+++ b/sfx2/inc/about.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: about.hxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -32,15 +29,10 @@
// include ---------------------------------------------------------------
-#ifndef _RESARY_HXX //autogen
#include <tools/resary.hxx>
-#endif
-#ifndef _BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
-#ifndef _ACCEL_HXX //autogen
#include <vcl/accel.hxx>
-#endif
+#include <svtools/svmedit.hxx>
#include <tools/list.hxx>
#include <svtools/stdctrl.hxx>
#include <sfx2/basedlgs.hxx> // SfxModalDialog
@@ -56,13 +48,14 @@ private:
Image aAppLogo;
FixedInfo aVersionText;
- FixedInfo aCopyrightText;
+ MultiLineEdit aCopyrightText;
FixedInfo aBuildData;
ResStringArray aDeveloperAry;
String aDevVersionStr;
String aAccelStr;
String aVersionData;
+ String aCopyrightTextStr;
AccelList aAccelList;
diff --git a/sfx2/inc/arrdecl.hxx b/sfx2/inc/arrdecl.hxx
index bd0a21ca0dae..c6d2ed3c8e78 100644
--- a/sfx2/inc/arrdecl.hxx
+++ b/sfx2/inc/arrdecl.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: arrdecl.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/sfx2/inc/basmgr.hxx b/sfx2/inc/basmgr.hxx
index 6b5f2790f676..7156be8f8327 100644
--- a/sfx2/inc/basmgr.hxx
+++ b/sfx2/inc/basmgr.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: basmgr.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/sfx2/inc/bitset.hxx b/sfx2/inc/bitset.hxx
index f5acadb917d0..48a03c96229e 100644
--- a/sfx2/inc/bitset.hxx
+++ b/sfx2/inc/bitset.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: bitset.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/sfx2/inc/brokenpackageint.hxx b/sfx2/inc/brokenpackageint.hxx
index 6003329b8c01..e39c92c599ae 100644
--- a/sfx2/inc/brokenpackageint.hxx
+++ b/sfx2/inc/brokenpackageint.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: brokenpackageint.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/sfx2/inc/configmgr.hxx b/sfx2/inc/configmgr.hxx
index 31b24fb4c106..0cc4305349e8 100644
--- a/sfx2/inc/configmgr.hxx
+++ b/sfx2/inc/configmgr.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: configmgr.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/sfx2/inc/dinfedt.hxx b/sfx2/inc/dinfedt.hxx
index 60ed7088cd3f..64ad32cb1337 100644
--- a/sfx2/inc/dinfedt.hxx
+++ b/sfx2/inc/dinfedt.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: dinfedt.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/sfx2/inc/docinsert.hxx b/sfx2/inc/docinsert.hxx
index 306a26ed5e3e..c4e4be12185e 100644
--- a/sfx2/inc/docinsert.hxx
+++ b/sfx2/inc/docinsert.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: docinsert.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/sfx2/inc/docvor.hxx b/sfx2/inc/docvor.hxx
index 474617aa4a8f..1bdbdf98161d 100644
--- a/sfx2/inc/docvor.hxx
+++ b/sfx2/inc/docvor.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: docvor.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/sfx2/inc/filedlghelper.hrc b/sfx2/inc/filedlghelper.hrc
index ee1de72c7d98..a5db7b4fdb30 100644
--- a/sfx2/inc/filedlghelper.hrc
+++ b/sfx2/inc/filedlghelper.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: filedlghelper.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/sfx2/inc/frmload.hxx b/sfx2/inc/frmload.hxx
index d3df697cecfa..b03bdd724c20 100644
--- a/sfx2/inc/frmload.hxx
+++ b/sfx2/inc/frmload.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: frmload.hxx,v $
- * $Revision: 1.13 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -31,80 +28,126 @@
#ifndef _SFX_FRMLOAD_HXX
#define _SFX_FRMLOAD_HXX
+#include "sfx2/sfxuno.hxx"
+#include "sfx2/objsh.hxx"
+
+/** === begin UNO includes === **/
#include <com/sun/star/frame/XLoadEventListener.hpp>
-#include <rtl/ustring.hxx>
-#include <tools/debug.hxx>
#include <com/sun/star/frame/XSynchronousFrameLoader.hpp>
+#include <com/sun/star/frame/XController2.hpp>
+#include <com/sun/star/frame/XModel2.hpp>
#include <com/sun/star/document/XExtendedFilterDetection.hpp>
#include <com/sun/star/uno/Exception.hpp>
-#include <com/sun/star/uno/Reference.h>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/lang/XSingleServiceFactory.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/frame/XFrame.hpp>
+#include <com/sun/star/task/XInteractionHandler.hpp>
+/** === end UNO includes === **/
+
+#include <rtl/ustring.hxx>
+#include <tools/debug.hxx>
#include <cppuhelper/implbase1.hxx>
#include <cppuhelper/implbase2.hxx>
#include <cppuhelper/implbase3.hxx>
-
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <cppuhelper/factory.hxx>
#include <tools/link.hxx>
#include <tools/string.hxx>
+#include <comphelper/componentcontext.hxx>
+#include <comphelper/namedvaluecollection.hxx>
-class SfxObjectFactory;
+class SfxFilter;
class SfxFilterMatcher;
-class LoadEnvironment_Impl;
-class SfxMedium;
-namespace com
-{
- namespace sun
- {
- namespace star
- {
- namespace uno
- {
- class Any;
- }
- namespace lang
- {
- class XMultiServiceFactory;
- }
- namespace frame
- {
- class XFrame;
- }
- namespace beans
- {
- struct PropertyValue;
- }
- }
- }
-}
-
-#include <sfx2/sfxuno.hxx>
-
-#define REFERENCE ::com::sun::star::uno::Reference
-#define SEQUENCE ::com::sun::star::uno::Sequence
-#define RUNTIME_EXCEPTION ::com::sun::star::uno::RuntimeException
-
-class SfxFrameLoader_Impl : public ::cppu::WeakImplHelper2< ::com::sun::star::frame::XSynchronousFrameLoader, ::com::sun::star::lang::XServiceInfo >
-{
- REFERENCE < ::com::sun::star::frame::XFrame > xFrame;
- REFERENCE < ::com::sun::star::frame::XLoadEventListener > xListener;
- String aFilterName;
- SfxMedium* pMedium;
+class SfxFrameWeak;
- DECL_LINK( LoadDone_Impl, void* );
+class SAL_DLLPRIVATE SfxFrameLoader_Impl : public ::cppu::WeakImplHelper2< ::com::sun::star::frame::XSynchronousFrameLoader, ::com::sun::star::lang::XServiceInfo >
+{
+ ::comphelper::ComponentContext m_aContext;
public:
- SfxFrameLoader_Impl( const REFERENCE < ::com::sun::star::lang::XMultiServiceFactory >& xFactory );
- virtual ~SfxFrameLoader_Impl();
+ SfxFrameLoader_Impl( const ::com::sun::star::uno::Reference < ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory );
SFX_DECL_XSERVICEINFO
//----------------------------------------------------------------------------------
// XSynchronousFrameLoader
//----------------------------------------------------------------------------------
- virtual sal_Bool SAL_CALL load( const SEQUENCE< ::com::sun::star::beans::PropertyValue >& lDescriptor, const REFERENCE< ::com::sun::star::frame::XFrame >& xFrame ) throw( RUNTIME_EXCEPTION );
- virtual void SAL_CALL cancel() throw( RUNTIME_EXCEPTION );
+ virtual sal_Bool SAL_CALL load( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& _rArgs, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxFrame ) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL cancel() throw( ::com::sun::star::uno::RuntimeException );
+
+protected:
+ virtual ~SfxFrameLoader_Impl();
+
+private:
+ const SfxFilter* impl_getFilterFromServiceName_nothrow(
+ const ::rtl::OUString& i_rServiceName
+ ) const;
+
+ ::rtl::OUString impl_askForFilter_nothrow(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& i_rxHandler,
+ const ::rtl::OUString& i_rDocumentURL
+ ) const;
+
+ const SfxFilter* impl_detectFilterForURL(
+ const ::rtl::OUString& _rURL,
+ const ::comphelper::NamedValueCollection& i_rDescriptor,
+ const SfxFilterMatcher& rMatcher
+ ) const;
+
+ sal_Bool impl_createNewDocWithSlotParam(
+ const USHORT _nSlotID,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rxFrame,
+ const bool i_bHidden
+ );
+
+ void impl_determineFilter(
+ ::comphelper::NamedValueCollection& io_rDescriptor
+ ) const;
+
+ bool impl_determineTemplateDocument(
+ ::comphelper::NamedValueCollection& io_rDescriptor
+ ) const;
+
+ USHORT impl_findSlotParam(
+ const ::rtl::OUString& i_rFactoryURL
+ ) const;
+
+ SfxObjectShellLock impl_findObjectShell(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel2 >& i_rxDocument
+ ) const;
+
+ void impl_lockHiddenDocument(
+ SfxObjectShell& i_rDocument,
+ const ::comphelper::NamedValueCollection& i_rDescriptor
+ ) const;
+
+ void impl_handleCaughtError_nothrow(
+ const ::com::sun::star::uno::Any& i_rCaughtError,
+ const ::comphelper::NamedValueCollection& i_rDescriptor
+ ) const;
+
+ void impl_removeLoaderArguments(
+ ::comphelper::NamedValueCollection& io_rDescriptor
+ );
+
+ sal_Int16 impl_determineEffectiveViewId_nothrow(
+ const SfxObjectShell& i_rDocument,
+ const ::comphelper::NamedValueCollection& i_rDescriptor
+ );
+
+ ::comphelper::NamedValueCollection
+ impl_extractViewCreationArgs(
+ ::comphelper::NamedValueCollection& io_rDescriptor
+ );
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController2 >
+ impl_createDocumentView(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel2 >& i_rModel,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rFrame,
+ const ::comphelper::NamedValueCollection& i_rViewFactoryArgs,
+ const ::rtl::OUString& i_rViewName
+ );
};
#endif
diff --git a/sfx2/inc/fwkhelper.hxx b/sfx2/inc/fwkhelper.hxx
index ca53b34d6c5c..7dd54559dc0b 100644
--- a/sfx2/inc/fwkhelper.hxx
+++ b/sfx2/inc/fwkhelper.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: fwkhelper.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/sfx2/inc/guisaveas.hxx b/sfx2/inc/guisaveas.hxx
index f8b19e1d5754..a317b5796232 100644
--- a/sfx2/inc/guisaveas.hxx
+++ b/sfx2/inc/guisaveas.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: guisaveas.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/sfx2/inc/idpool.hxx b/sfx2/inc/idpool.hxx
index 68d74d77897b..bb16fb203437 100644
--- a/sfx2/inc/idpool.hxx
+++ b/sfx2/inc/idpool.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: idpool.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/sfx2/inc/imagemgr.hxx b/sfx2/inc/imagemgr.hxx
index faceb7bf846e..ead9b6988cea 100644
--- a/sfx2/inc/imagemgr.hxx
+++ b/sfx2/inc/imagemgr.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: imagemgr.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/sfx2/inc/imgmgr.hxx b/sfx2/inc/imgmgr.hxx
index b72676a79ab8..ae1f8a23ddc9 100644
--- a/sfx2/inc/imgmgr.hxx
+++ b/sfx2/inc/imgmgr.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: imgmgr.hxx,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/sfx2/inc/inettbc.hxx b/sfx2/inc/inettbc.hxx
index cbc9e12dad70..fe8358bfe646 100644
--- a/sfx2/inc/inettbc.hxx
+++ b/sfx2/inc/inettbc.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: inettbc.hxx,v $
- * $Revision: 1.15 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -77,19 +74,6 @@ public:
virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState );
};
-class SfxCancelToolBoxControl_Impl : public SfxToolBoxControl
-{
-public:
-
- SFX_DECL_TOOLBOX_CONTROL();
-
- SfxCancelToolBoxControl_Impl( USHORT nSlotId, USHORT nId, ToolBox& rBox );
-
- virtual SfxPopupWindowType GetPopupWindowType() const;
- virtual SfxPopupWindow* CreatePopupWindow();
- virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState );
-};
-
#endif
#endif
diff --git a/sfx2/inc/mailmodelapi.hxx b/sfx2/inc/mailmodelapi.hxx
index 4f8442f89ba2..fa9086f2623b 100644
--- a/sfx2/inc/mailmodelapi.hxx
+++ b/sfx2/inc/mailmodelapi.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: mailmodelapi.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/sfx2/inc/makefile.mk b/sfx2/inc/makefile.mk
index 7a0c0ac21ed2..b7aa547e2c79 100644
--- a/sfx2/inc/makefile.mk
+++ b/sfx2/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.3 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sfx2/inc/mieclip.hxx b/sfx2/inc/mieclip.hxx
index f754feadc677..562bca7940e2 100644
--- a/sfx2/inc/mieclip.hxx
+++ b/sfx2/inc/mieclip.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: mieclip.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/sfx2/inc/minfitem.hxx b/sfx2/inc/minfitem.hxx
index 9e97bef83cb3..29edf6b3e8cb 100644
--- a/sfx2/inc/minfitem.hxx
+++ b/sfx2/inc/minfitem.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: minfitem.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/sfx2/inc/msgnodei.hxx b/sfx2/inc/msgnodei.hxx
index e6e1e11acffb..c48765acfe42 100644
--- a/sfx2/inc/msgnodei.hxx
+++ b/sfx2/inc/msgnodei.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: msgnodei.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/sfx2/inc/orgmgr.hxx b/sfx2/inc/orgmgr.hxx
index 1ced4f3b0416..85248e07996c 100644
--- a/sfx2/inc/orgmgr.hxx
+++ b/sfx2/inc/orgmgr.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: orgmgr.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/sfx2/inc/pch/precompiled_sfx2.cxx b/sfx2/inc/pch/precompiled_sfx2.cxx
index af5d1e73e2e9..c87b9d94ed2b 100644
--- a/sfx2/inc/pch/precompiled_sfx2.cxx
+++ b/sfx2/inc/pch/precompiled_sfx2.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: precompiled_sfx2.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/sfx2/inc/pch/precompiled_sfx2.hxx b/sfx2/inc/pch/precompiled_sfx2.hxx
index 0af35427d855..8cd8f9d8561f 100644
--- a/sfx2/inc/pch/precompiled_sfx2.hxx
+++ b/sfx2/inc/pch/precompiled_sfx2.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: precompiled_sfx2.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -495,7 +492,6 @@
#include "svl/aeitem.hxx"
#include "svtools/asynclink.hxx"
#include "svl/brdcst.hxx"
-#include "svl/cancel.hxx"
#include "svl/cntwids.hrc"
#include "svtools/controldims.hrc"
#include "svl/ctypeitm.hxx"
diff --git a/sfx2/inc/progind.hxx b/sfx2/inc/progind.hxx
index 4b55a4b51c33..a3857b14c4ed 100644
--- a/sfx2/inc/progind.hxx
+++ b/sfx2/inc/progind.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: progind.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/sfx2/inc/resmgr.hxx b/sfx2/inc/resmgr.hxx
index 56928b15fb65..13fe19f1c4e8 100644
--- a/sfx2/inc/resmgr.hxx
+++ b/sfx2/inc/resmgr.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: resmgr.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/sfx2/inc/sfx2/DocumentMetadataAccess.hxx b/sfx2/inc/sfx2/DocumentMetadataAccess.hxx
index 1f0d3d38e44e..def1e4ab5a0e 100644
--- a/sfx2/inc/sfx2/DocumentMetadataAccess.hxx
+++ b/sfx2/inc/sfx2/DocumentMetadataAccess.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: DocumentMetadataAccess.hxx,v $
- * $Revision: 1.1.2.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sfx2/inc/sfx2/Metadatable.hxx b/sfx2/inc/sfx2/Metadatable.hxx
index c190abd0471b..068a6c4a4544 100644
--- a/sfx2/inc/sfx2/Metadatable.hxx
+++ b/sfx2/inc/sfx2/Metadatable.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: SwMetadatable.hxx,v $
- * $Revision: 1.1.2.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sfx2/inc/sfx2/XmlIdRegistry.hxx b/sfx2/inc/sfx2/XmlIdRegistry.hxx
index 0ae6fbb75193..7871fbe66ac5 100644
--- a/sfx2/inc/sfx2/XmlIdRegistry.hxx
+++ b/sfx2/inc/sfx2/XmlIdRegistry.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: XmlIdRegistry.hxx,v $
- * $Revision: 1.1.2.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sfx2/inc/sfx2/app.hxx b/sfx2/inc/sfx2/app.hxx
index 9f035b125a31..17b2dee417cd 100644
--- a/sfx2/inc/sfx2/app.hxx
+++ b/sfx2/inc/sfx2/app.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: app.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -61,7 +58,6 @@ class AppSettings;
struct SfxChildWinContextFactory;
class SfxAppData_Impl;
class SfxBindings;
-class SfxCancelManager;
class SfxChildWinFactArr_Impl;
class SfxChildWindow;
class SfxDispatcher;
@@ -221,7 +217,6 @@ public:
// members
SfxFilterMatcher& GetFilterMatcher();
- SfxCancelManager* GetCancelManager() const;
SfxMacroConfig* GetMacroConfig() const;
SfxProgress* GetProgress() const;
const String& GetLastSaveDirectory() const;
@@ -267,7 +262,6 @@ public:
SAL_DLLPRIVATE SfxDispatcher* GetAppDispatcher_Impl();
SAL_DLLPRIVATE SfxDispatcher* GetDispatcher_Impl();
- SAL_DLLPRIVATE SfxObjectShellLock NewDoc_Impl( const String& rFactory, const SfxItemSet* pSet = NULL );
SAL_DLLPRIVATE BOOL QueryExit_Impl();
SAL_DLLPRIVATE void SetOptions_Impl(const SfxItemSet &);
SAL_DLLPRIVATE FASTBOOL Initialize_Impl();
@@ -293,7 +287,6 @@ public:
// TODO/CLEANUP: still needed?
SAL_DLLPRIVATE void NewDocDirectExec_Impl(SfxRequest &);
SAL_DLLPRIVATE void NewDocExec_Impl(SfxRequest &);
- SAL_DLLPRIVATE const SfxPoolItem* NewDocDirectExec_ImplOld(SfxRequest &); // used by FrameLoader to work with the old behaviour ...
SAL_DLLPRIVATE void OpenDocExec_Impl(SfxRequest &);
SAL_DLLPRIVATE void MiscExec_Impl(SfxRequest &);
SAL_DLLPRIVATE void MiscState_Impl(SfxItemSet &);
diff --git a/sfx2/inc/sfx2/appuno.hxx b/sfx2/inc/sfx2/appuno.hxx
index 773d2fd82d6b..8136caac2ad9 100644
--- a/sfx2/inc/sfx2/appuno.hxx
+++ b/sfx2/inc/sfx2/appuno.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: appuno.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/sfx2/inc/sfx2/basedlgs.hxx b/sfx2/inc/sfx2/basedlgs.hxx
index 48d3d6517ae8..3508ea026637 100644
--- a/sfx2/inc/sfx2/basedlgs.hxx
+++ b/sfx2/inc/sfx2/basedlgs.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: basedlgs.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/sfx2/inc/sfx2/bindings.hxx b/sfx2/inc/sfx2/bindings.hxx
index ee981d7d7ce1..e568fe7305f0 100644
--- a/sfx2/inc/sfx2/bindings.hxx
+++ b/sfx2/inc/sfx2/bindings.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: bindings.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -99,8 +96,7 @@ class SFX2_DLLPUBLIC SfxBindings: public SfxBroadcaster
der Klasse SfxBindings. Sie wird von der SfxApplication automatisch
angelegt und zerst"ort. Instanzen werden aber i.d.R. "uber das
Makro <SFX_BINDINGS> oder den zugeh"origen <SfxViewFrame> besorgt
- werden. Bestimmte SfxViewFrame Subklassen (z.B. <SfxInPlaceFrame>)
- legen ihre eigene Instanz der SfxBindings an.
+ werden.
Die SfxBindings verwalten alle in den an ihr angemeldeten Controllern
gebundenen Slot-Ids und cachen die jeweiligen <Slot-Server>
diff --git a/sfx2/inc/sfx2/chalign.hxx b/sfx2/inc/sfx2/chalign.hxx
index 4603497b9a5c..37df69d08ca6 100644
--- a/sfx2/inc/sfx2/chalign.hxx
+++ b/sfx2/inc/sfx2/chalign.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: chalign.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/sfx2/inc/sfx2/childwin.hxx b/sfx2/inc/sfx2/childwin.hxx
index 2c240dae89af..cac0b72f13cf 100644
--- a/sfx2/inc/sfx2/childwin.hxx
+++ b/sfx2/inc/sfx2/childwin.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: childwin.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/sfx2/inc/sfx2/cntids.hrc b/sfx2/inc/sfx2/cntids.hrc
index 7351672f13ae..ef652981f76d 100644
--- a/sfx2/inc/sfx2/cntids.hrc
+++ b/sfx2/inc/sfx2/cntids.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: cntids.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/sfx2/inc/sfx2/controlwrapper.hxx b/sfx2/inc/sfx2/controlwrapper.hxx
index ea3b8f358872..579d7b1299d3 100644
--- a/sfx2/inc/sfx2/controlwrapper.hxx
+++ b/sfx2/inc/sfx2/controlwrapper.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: controlwrapper.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/sfx2/inc/sfx2/ctrlitem.hxx b/sfx2/inc/sfx2/ctrlitem.hxx
index 51ed03c1e70d..53667fbf0aa7 100644
--- a/sfx2/inc/sfx2/ctrlitem.hxx
+++ b/sfx2/inc/sfx2/ctrlitem.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: ctrlitem.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/sfx2/inc/sfx2/dialogs.hrc b/sfx2/inc/sfx2/dialogs.hrc
index 1c527de92f32..97e9dd725c9a 100644
--- a/sfx2/inc/sfx2/dialogs.hrc
+++ b/sfx2/inc/sfx2/dialogs.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: dialogs.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/sfx2/inc/sfx2/dinfdlg.hxx b/sfx2/inc/sfx2/dinfdlg.hxx
index 2c8448d6bca0..4a33afde24d5 100644
--- a/sfx2/inc/sfx2/dinfdlg.hxx
+++ b/sfx2/inc/sfx2/dinfdlg.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: dinfdlg.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/sfx2/inc/sfx2/dispatch.hxx b/sfx2/inc/sfx2/dispatch.hxx
index 363c9280fd5a..f0dd2248c456 100644
--- a/sfx2/inc/sfx2/dispatch.hxx
+++ b/sfx2/inc/sfx2/dispatch.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: dispatch.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -51,7 +48,7 @@ class SfxViewFrame;
class SfxBindings;
class SfxItemSet;
class SfxPopupMenuManager;
-
+class SfxModule;
struct SfxDispatcher_Impl;
struct SfxPlugInInfo_Impl;
@@ -202,7 +199,7 @@ public:
SfxShell* GetShell(USHORT nIdx) const;
SfxViewFrame* GetFrame() const;
-
+ SfxModule* GetModule() const;
// caller has to clean up the Manager on his own
static SfxPopupMenuManager* Popup( sal_uInt16 nConfigId,Window *pWin, const Point *pPos );
diff --git a/sfx2/inc/sfx2/dllapi.h b/sfx2/inc/sfx2/dllapi.h
index 3d8cd8621985..78066a4b2d7c 100644
--- a/sfx2/inc/sfx2/dllapi.h
+++ b/sfx2/inc/sfx2/dllapi.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: dllapi.h,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -40,4 +37,6 @@
#define SFX2_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
#endif
+#define SFX2_DLLPRIVATE SAL_DLLPRIVATE
+
#endif
diff --git a/sfx2/inc/sfx2/docfac.hxx b/sfx2/inc/sfx2/docfac.hxx
index d7c7999db8e1..3cc3eecc7ce7 100644
--- a/sfx2/inc/sfx2/docfac.hxx
+++ b/sfx2/inc/sfx2/docfac.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: docfac.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -85,6 +82,7 @@ public:
const SvGlobalName& GetClassId() const;
SfxObjectShellFlags GetFlags() { return nFlags; }
const char* GetShortName() const { return pShortName; }
+ String GetFactoryURL() const; // shortcut for "private:factory/GetShortName()"
String GetFactoryName() const { return String::CreateFromAscii( pShortName ); }
String GetModuleName() const;
void SetDocumentTypeNameResource( const ResId& rId );
@@ -96,6 +94,9 @@ public:
USHORT GetViewFactoryCount() const;
SfxViewFactory& GetViewFactory(USHORT i = 0) const;
+ /// returns the view factory whose GetViewName delivers the requested logical name
+ SfxViewFactory* GetViewFactoryByViewName( const String& i_rViewName ) const;
+
// Filter
const SfxFilter* GetTemplateFilter() const;
static String GetStandardTemplate( const String& rServiceName );
@@ -109,6 +110,7 @@ public:
//#if 0 // _SOLAR__PRIVATE
SAL_DLLPRIVATE void SetModule_Impl( SfxModule* );
SAL_DLLPRIVATE static void UpdateFilterContainers_Impl();
+ SAL_DLLPRIVATE sal_uInt16 GetViewNo_Impl( const sal_uInt16 i_nViewId, const sal_uInt16 i_nFallback ) const;
//#endif
private:
diff --git a/sfx2/inc/sfx2/docfile.hxx b/sfx2/inc/sfx2/docfile.hxx
index c322ee4afc0a..074f74cb0e72 100644
--- a/sfx2/inc/sfx2/docfile.hxx
+++ b/sfx2/inc/sfx2/docfile.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: docfile.hxx,v $
- * $Revision: 1.8.118.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -51,7 +48,6 @@
#include <svl/lstner.hxx>
#include <tools/globname.hxx>
-#include <svl/cancel.hxx>
#include <cppuhelper/weak.hxx>
#include <ucbhelper/content.hxx>
@@ -67,16 +63,6 @@ class SfxItemSet;
class DateTime;
class SvStringsDtor;
class SvEaMgr;
-class SfxPoolCancelManager_Impl;
-
-#define SFX_TFPRIO_SYNCHRON 0
-#define SFX_TFPRIO_DOC 10
-#define SFX_TFPRIO_VISIBLE_LOWRES_GRAPHIC 20
-#define SFX_TFPRIO_VISIBLE_HIGHRES_GRAPHIC 21
-#define SFX_TFPRIO_PLUGINS 40
-#define SFX_TFPRIO_INVISIBLE_LOWRES_GRAPHIC 50
-#define SFX_TFPRIO_INVISIBLE_HIGHRES_GRAPHIC 51
-#define SFX_TFPRIO_DOWNLOADS 60
#define S2BS(s) ByteString( s, RTL_TEXTENCODING_MS_1252 )
@@ -160,7 +146,6 @@ public:
void SetLoadTargetFrame(SfxFrame* pFrame );
SfxFrame* GetLoadTargetFrame() const;
- void CancelTransfers();
void SetReferer( const String& rRefer );
const String& GetReferer( ) const;
@@ -238,7 +223,6 @@ public:
void SetUsesCache( sal_Bool );
sal_Bool IsExpired() const;
void SetName( const String& rName, sal_Bool bSetOrigURL = sal_False );
- void SetDontCreateCancellable();
sal_Bool IsAllowedForExternalBrowser() const;
long GetFileVersion() const;
@@ -276,8 +260,6 @@ public:
SAL_DLLPRIVATE sal_Bool TransferVersionList_Impl( SfxMedium& rMedium );
SAL_DLLPRIVATE sal_Bool SaveVersionList_Impl( sal_Bool bUseXML );
SAL_DLLPRIVATE sal_Bool RemoveVersion_Impl( const ::rtl::OUString& rVersion );
- SAL_DLLPRIVATE SfxPoolCancelManager_Impl* GetCancelManager_Impl() const;
- SAL_DLLPRIVATE void SetCancelManager_Impl( SfxPoolCancelManager_Impl* pMgr );
SAL_DLLPRIVATE void SetExpired_Impl( const DateTime& rDateTime );
SAL_DLLPRIVATE SvKeyValueIterator* GetHeaderAttributes_Impl();
diff --git a/sfx2/inc/sfx2/docfilt.hxx b/sfx2/inc/sfx2/docfilt.hxx
index 47c1cba003e5..b4118272bb88 100644
--- a/sfx2/inc/sfx2/docfilt.hxx
+++ b/sfx2/inc/sfx2/docfilt.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: docfilt.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/sfx2/inc/sfx2/docinf.hxx b/sfx2/inc/sfx2/docinf.hxx
index e5c6ed036d7e..9f7da1932110 100644
--- a/sfx2/inc/sfx2/docinf.hxx
+++ b/sfx2/inc/sfx2/docinf.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: docinf.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/sfx2/inc/sfx2/dockwin.hxx b/sfx2/inc/sfx2/dockwin.hxx
index 7784ea2b9505..254bd622d9bc 100644
--- a/sfx2/inc/sfx2/dockwin.hxx
+++ b/sfx2/inc/sfx2/dockwin.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: dockwin.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/sfx2/inc/sfx2/docmacromode.hxx b/sfx2/inc/sfx2/docmacromode.hxx
index 79d0cb016104..463e5dbe4aa2 100644
--- a/sfx2/inc/sfx2/docmacromode.hxx
+++ b/sfx2/inc/sfx2/docmacromode.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: docmacromode.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/sfx2/inc/sfx2/docstoragemodifylistener.hxx b/sfx2/inc/sfx2/docstoragemodifylistener.hxx
index fb5b7571a487..977916ed532c 100644
--- a/sfx2/inc/sfx2/docstoragemodifylistener.hxx
+++ b/sfx2/inc/sfx2/docstoragemodifylistener.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: docstoragemodifylistener.hxx,v $
- * $Revision: 1.4.28.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sfx2/inc/sfx2/doctdlg.hxx b/sfx2/inc/sfx2/doctdlg.hxx
index 51b8300f0e01..ddc0d6196a64 100644
--- a/sfx2/inc/sfx2/doctdlg.hxx
+++ b/sfx2/inc/sfx2/doctdlg.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: doctdlg.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/sfx2/inc/sfx2/doctempl.hxx b/sfx2/inc/sfx2/doctempl.hxx
index c4c692b66b21..43ab94b4b28e 100644
--- a/sfx2/inc/sfx2/doctempl.hxx
+++ b/sfx2/inc/sfx2/doctempl.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: doctempl.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/sfx2/inc/sfx2/event.hxx b/sfx2/inc/sfx2/event.hxx
index 79f1d34ee82c..71ae9c182fb3 100644
--- a/sfx2/inc/sfx2/event.hxx
+++ b/sfx2/inc/sfx2/event.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: event.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/sfx2/inc/sfx2/evntconf.hxx b/sfx2/inc/sfx2/evntconf.hxx
index 647746abe84f..17080ec2d51e 100644
--- a/sfx2/inc/sfx2/evntconf.hxx
+++ b/sfx2/inc/sfx2/evntconf.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: evntconf.hxx,v $
- * $Revision: 1.3.28.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sfx2/inc/sfx2/fcontnr.hxx b/sfx2/inc/sfx2/fcontnr.hxx
index e48a7c000094..c80d61aa81d1 100644
--- a/sfx2/inc/sfx2/fcontnr.hxx
+++ b/sfx2/inc/sfx2/fcontnr.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: fcontnr.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/sfx2/inc/sfx2/filedlghelper.hxx b/sfx2/inc/sfx2/filedlghelper.hxx
index e6dc185ef919..d17553e2b2d0 100644
--- a/sfx2/inc/sfx2/filedlghelper.hxx
+++ b/sfx2/inc/sfx2/filedlghelper.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: filedlghelper.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/sfx2/inc/sfx2/frame.hxx b/sfx2/inc/sfx2/frame.hxx
index 38731e032328..b94e9038e8bb 100644
--- a/sfx2/inc/sfx2/frame.hxx
+++ b/sfx2/inc/sfx2/frame.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: frame.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -71,6 +68,7 @@ namespace com
#include <svl/brdcst.hxx>
#include <tools/list.hxx>
#include <svl/poolitem.hxx>
+#include <comphelper/namedvaluecollection.hxx>
class SvBorder;
class SfxWorkWindow;
@@ -86,31 +84,18 @@ class SfxMedium;
class SfxFrameHistory_Impl;
class SfxDispatcher;
class SfxMedium;
-class SfxCancellable;
class Rectangle;
class SfxRequest;
class SfxUnoControllerItem;
class SvCompatWeakHdl;
+class SystemWindow;
typedef SfxFrame* SfxFramePtr;
class SfxFrameArr_Impl;
DECLARE_LIST( TargetList, String* )
-#define SFXFRAME_INTERNAL 0x0001
-#define SFXFRAME_EXTERNAL 0x0002
-#define SFXFRAME_OWNSDOCUMENT 0x0004
-#define SFXFRAME_PLUGIN 0x0008
-#define SFXFRAME_HASTITLE 0x0010
-#define SFXFRAME_SERVER 0x0020 // Is es ein Frame, der in einem Container steckt ?
-#define SFXFRAME_FRAMESET 0x0040
-
-#define BROWSE_NORMAL 0
-#define BROWSE_FORWARD 1
-#define BROWSE_BACKWARD 2
-#define NO_BROWSE 3
-#define BROWSE_FRAME 4
-#define BROWSE_MAX_MODE 10
+#define SFXFRAME_HASTITLE 0x0001
//==========================================================================
// Ein SfxFrame ist eine Verwaltungsklasse f"ur Fenster und deren Inhalte.
@@ -126,82 +111,63 @@ DECLARE_LIST( TargetList, String* )
//==========================================================================
class SfxFrameArr_Impl;
-class SfxCancelManager;
struct SfxFramePickEntry_Impl;
-class SfxUnoFrame;
class SFX2_DLLPUBLIC SfxFrame
{
friend class SfxFrameIterator;
- friend struct SfxFramePickEntry_Impl;
- friend class SfxUnoFrame;
- friend class SfxViewFrame; /*HACK!*/
+ friend class SfxFrameWindow_Impl;
private:
- String aName;
SfxFrame* pParentFrame;
SfxFrameArr_Impl* pChildArr;
SfxFrame_Impl* pImp;
- SfxUnoFrame* pUnoImp;
-
- SAL_DLLPRIVATE void UpdateUndoHistory_Impl(
- SfxObjectShell *pDocSh, const String* pNew, const String *pTitle = 0 );
- SAL_DLLPRIVATE void UpdateCurrentHistory_Impl(
- SfxObjectShell *pDocSh, const String* pNew );
+ Window* pWindow;
protected:
- virtual sal_Bool Close() = 0;
+ sal_Bool Close();
virtual ~SfxFrame();
-//#if 0 // _SOLAR__PRIVATE
- SAL_DLLPRIVATE void SetCurrentDocument_Impl( SfxObjectShell* );
- SAL_DLLPRIVATE void InsertChildFrame_Impl( SfxFrame*, sal_uInt16 nPos = 0 );
- SAL_DLLPRIVATE void RemoveChildFrame_Impl( sal_uInt16 nPos );
SAL_DLLPRIVATE void RemoveChildFrame_Impl( SfxFrame* );
- SAL_DLLPRIVATE void SetIsTop_Impl( sal_Bool bIsTop = sal_True );
-//#endif
+
+ SfxFrame( ); // not implemented
+ SAL_DLLPRIVATE SfxFrame( Window& i_rContainerWindow, bool bHidden );
public:
TYPEINFO();
- SfxFrame(SfxFrame* pParent = 0);
+
+ static SfxFrame* Create( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame );
+ static ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >
+ CreateBlankFrame();
+ static SfxFrame* Create( SfxObjectShell& rDoc, Window& rWindow, USHORT nViewId, bool bHidden );
SvCompatWeakHdl* GetHdl();
- virtual Window& GetWindow() const = 0;
+ Window& GetWindow() const;
void CancelTransfers( sal_Bool bCancelLoadEnv = sal_True );
sal_Bool DoClose();
sal_uInt16 GetChildFrameCount() const;
SfxFrame* GetChildFrame( sal_uInt16 nPos ) const;
- void SetFrameName( const String& rName );
- const String& GetFrameName() const
- { return aName; }
SfxFrame* GetParentFrame() const
{ return pParentFrame; }
- String GetContent() const;
+
+ void SetPresentationMode( BOOL bSet );
+ SystemWindow* GetSystemWindow() const;
static SfxFrame* GetFirst();
static SfxFrame* GetNext( SfxFrame& );
- virtual sal_Bool InsertDocument( SfxObjectShell *pDoc );
- const SfxPoolItem* LoadDocumentSynchron( SfxItemSet& aSet );
- void DocumentInserted( SfxObjectShell* pDoc );
+ static const SfxPoolItem*
+ OpenDocumentSynchron( SfxItemSet& aSet, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rTargetFrame );
SfxBroadcaster& GetBroadcaster() const;
SfxObjectShell* GetCurrentDocument() const;
SfxViewFrame* GetCurrentViewFrame() const;
- SfxFrame* GetTopFrame() const;
+ SfxFrame& GetTopFrame() const;
sal_Bool IsParent( SfxFrame* ) const;
- SfxFrame* findFrame( const ::rtl::OUString& aTargetFrameName, sal_Int32 nSearchFlags);
- SfxFrame* SearchFrame( const String&, SfxMedium* pMedium = 0 );
sal_uInt32 GetFrameType() const;
void GetTargetList( TargetList& ) const;
- void ClearHistory();
SAL_DLLPRIVATE SfxFrame* GetContainingDocFrame_Impl( SfxFrame* pSelf );
sal_Bool IsTop() const;
- sal_Bool CloseChildFrames();
- void UpdatePickEntries();
- void UpdatePickEntries( const ::com::sun::star::uno::Any& rValue );
- void UpdateHistory( const ::rtl::OUString& aURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgs, const ::rtl::OUString& rTitle );
- void UpdateHistory(SfxObjectShell*, const String*pNew = 0 );
void UpdateDescriptor( SfxObjectShell *pDoc );
void Resize();
sal_Bool HasComponent() const;
@@ -215,68 +181,30 @@ public:
::com::sun::star::uno::Reference< ::com::sun::star::frame::XController >
GetController() const;
- static sal_Bool LoadSfxComponent( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > &,
- const ::rtl::OUString&,
- const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >&,
- const SfxObjectFactory* );
-
sal_Bool IsInPlace() const;
//#if 0 // _SOLAR__PRIVATE
SAL_DLLPRIVATE sal_Bool DoClose_Impl();
- SAL_DLLPRIVATE void SetFrameInterface_Impl( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame );
+ SAL_DLLPRIVATE void SetFrameInterface_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame );
SAL_DLLPRIVATE void ReleasingComponent_Impl( sal_Bool bSet );
- SAL_DLLPRIVATE const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterceptor >
- GetInterceptor_Impl();
- SAL_DLLPRIVATE void Clear_Impl();
- SAL_DLLPRIVATE sal_uInt16 LoadComponent_Impl( const ::rtl::OUString& rURL,
- const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rArgs,
- const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrameLoader > & rLoader,
- SfxItemSet* pSet=0, sal_Bool bDontClose=sal_False );
- SAL_DLLPRIVATE void LoadFinished_Impl();
- DECL_DLLPRIVATE_STATIC_LINK( SfxFrame, BindingHasNewPart_Impl, void* );
- SAL_DLLPRIVATE SfxCancelManager* GetCancelManager() const;
SAL_DLLPRIVATE void GetViewData_Impl();
- SAL_DLLPRIVATE sal_Bool CheckContentForLoad_Impl();
- SAL_DLLPRIVATE sal_Bool ExecuteHistoryMenu_Impl( sal_uInt16 nWnich, const Rectangle& rRect, sal_uInt16 nFlags=0 );
- SAL_DLLPRIVATE void ActivatePickEntry_Impl( SfxFramePickEntry_Impl*, sal_uInt16 nMode, SfxFrameDescriptor *pD = NULL );
- SAL_DLLPRIVATE void CopyHistory_Impl( SfxFrame *pFrame ) const;
- SAL_DLLPRIVATE SfxFrame* SearchChildrenForName_Impl( const String&, sal_Bool bDeep = sal_True ) const;
SAL_DLLPRIVATE void SetFrameType_Impl( sal_uInt32 );
- SAL_DLLPRIVATE void Activate_Impl( sal_Bool bBeamerOn );
- SAL_DLLPRIVATE void Deactivate_Impl();
SAL_DLLPRIVATE sal_uInt16 PrepareClose_Impl( sal_Bool bUI, sal_Bool bForBrowsing=sal_False );
SAL_DLLPRIVATE sal_Bool DocIsModified_Impl();
SAL_DLLPRIVATE void SetCurrentViewFrame_Impl( SfxViewFrame* );
- SAL_DLLPRIVATE SfxFrame* SearchFrame_Impl( sal_uInt16, sal_Bool bDeep=sal_False );
- SAL_DLLPRIVATE SfxFrame* SearchFrame_Impl( const String&, sal_Bool bDeep=sal_False );
- SAL_DLLPRIVATE void SetFrameId_Impl( sal_uInt16 );
- SAL_DLLPRIVATE sal_uInt16 GetFrameId_Impl() const;
- SAL_DLLPRIVATE void SetFrameIdName_Impl( const String& );
SAL_DLLPRIVATE sal_Bool IsClosing_Impl() const;
SAL_DLLPRIVATE void SetIsClosing_Impl();
- SAL_DLLPRIVATE sal_Bool BrowseInFrame( int nDelta );
- SAL_DLLPRIVATE sal_Bool Browse( sal_Bool bForward, sal_uInt16 nDelta = 1, sal_Bool bNewFrame=sal_False );
- SAL_DLLPRIVATE sal_Bool CanBrowseForward() const;
- SAL_DLLPRIVATE sal_Bool CanBrowseBackward() const;
// Methoden f"ur den Zugriff auf das aktuelle Set
SAL_DLLPRIVATE void SetDescriptor( SfxFrameDescriptor* );
SAL_DLLPRIVATE SfxFrameDescriptor* GetDescriptor() const;
SAL_DLLPRIVATE void Lock_Impl( sal_Bool bLock );
- SAL_DLLPRIVATE sal_uInt16 GetLockCount_Impl() const;
- //sal_Bool IsLocked_Impl() const
- // { return GetLockCount_Impl() > 0; }
- SAL_DLLPRIVATE void CloseOnUnlock_Impl();
- SAL_DLLPRIVATE SfxViewFrame* ActivateChildFrame_Impl();
SAL_DLLPRIVATE SfxDispatcher* GetDispatcher_Impl() const;
SAL_DLLPRIVATE sal_Bool IsAutoLoadLocked_Impl() const;
SAL_DLLPRIVATE static void InsertTopFrame_Impl( SfxFrame* pFrame );
SAL_DLLPRIVATE static void RemoveTopFrame_Impl( SfxFrame* pFrame );
- SAL_DLLPRIVATE void SetItemSet_Impl( const SfxItemSet* pSet );
- SAL_DLLPRIVATE const SfxItemSet* GetItemSet_Impl();
SAL_DLLPRIVATE void SetOwnsBindings_Impl( sal_Bool bSet );
SAL_DLLPRIVATE sal_Bool OwnsBindings_Impl() const;
SAL_DLLPRIVATE void InvalidateUnoControllers_Impl();
@@ -287,15 +215,19 @@ public:
SAL_DLLPRIVATE Rectangle GetTopOuterRectPixel_Impl() const;
SAL_DLLPRIVATE void CreateWorkWindow_Impl();
SAL_DLLPRIVATE void SetWorkWindow_Impl( SfxWorkWindow* pWorkwin );
- SAL_DLLPRIVATE const SvBorder& GetBorder_Impl() const;
SAL_DLLPRIVATE void GrabFocusOnComponent_Impl();
- SAL_DLLPRIVATE void ReFill_Impl( const SfxFrameSetDescriptor* pSet );
- SAL_DLLPRIVATE void LockFocus_Impl( sal_Bool bLock );
- SAL_DLLPRIVATE sal_Bool IsFocusLocked_Impl() const;
- SAL_DLLPRIVATE void CloseDocument_Impl();
SAL_DLLPRIVATE void SetInPlace_Impl( sal_Bool );
-// sal_Bool IsPlugin_Impl() const;
+
+ SAL_DLLPRIVATE void PrepareForDoc_Impl( SfxObjectShell& i_rDoc );
+ SAL_DLLPRIVATE void LockResize_Impl( BOOL bLock );
+ SAL_DLLPRIVATE void SetMenuBarOn_Impl( BOOL bOn );
+ SAL_DLLPRIVATE BOOL IsMenuBarOn_Impl() const;
+ SAL_DLLPRIVATE SystemWindow* GetTopWindow_Impl() const;
+ SAL_DLLPRIVATE void PositionWindow_Impl( const Rectangle& rWinArea ) const;
+ SAL_DLLPRIVATE bool IsMarkedHidden_Impl() const;
//#endif
+private:
+ SAL_DLLPRIVATE void Construct_Impl();
};
SV_DECL_COMPAT_WEAK( SfxFrame )
@@ -353,7 +285,24 @@ public:
::com::sun::star::uno::Any GetValue() const
{ return aValue; }
virtual int operator==( const SfxPoolItem& ) const;
- virtual String GetValueText() const;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+};
+
+class SFX2_DLLPUBLIC SfxUnoFrameItem : public SfxPoolItem
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >
+ m_xFrame;
+
+public:
+ TYPEINFO();
+ SfxUnoFrameItem();
+ SfxUnoFrameItem( sal_uInt16 nWhich, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rFrame );
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >&
+ GetFrame() const
+ { return m_xFrame; }
+ virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
diff --git a/sfx2/inc/sfx2/frmdescr.hxx b/sfx2/inc/sfx2/frmdescr.hxx
index 07098d74b658..4cb52d1b53c6 100644
--- a/sfx2/inc/sfx2/frmdescr.hxx
+++ b/sfx2/inc/sfx2/frmdescr.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: frmdescr.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/sfx2/inc/sfx2/frmhtml.hxx b/sfx2/inc/sfx2/frmhtml.hxx
index 72867add7b7b..e3e9c4f9f781 100644
--- a/sfx2/inc/sfx2/frmhtml.hxx
+++ b/sfx2/inc/sfx2/frmhtml.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: frmhtml.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/sfx2/inc/sfx2/frmhtmlw.hxx b/sfx2/inc/sfx2/frmhtmlw.hxx
index e1765d9d36cb..93f45f092ba9 100644
--- a/sfx2/inc/sfx2/frmhtmlw.hxx
+++ b/sfx2/inc/sfx2/frmhtmlw.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: frmhtmlw.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/sfx2/inc/sfx2/genlink.hxx b/sfx2/inc/sfx2/genlink.hxx
index 6bdfd819f494..0edf8e3b9dd6 100644
--- a/sfx2/inc/sfx2/genlink.hxx
+++ b/sfx2/inc/sfx2/genlink.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: genlink.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/sfx2/inc/sfx2/hintpost.hxx b/sfx2/inc/sfx2/hintpost.hxx
index 226cee7118cd..140e93beafa4 100644
--- a/sfx2/inc/sfx2/hintpost.hxx
+++ b/sfx2/inc/sfx2/hintpost.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: hintpost.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/sfx2/inc/sfx2/imgdef.hxx b/sfx2/inc/sfx2/imgdef.hxx
index b4e36d0df1fa..1aa34a393b33 100644
--- a/sfx2/inc/sfx2/imgdef.hxx
+++ b/sfx2/inc/sfx2/imgdef.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: imgdef.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/sfx2/inc/sfx2/ipclient.hxx b/sfx2/inc/sfx2/ipclient.hxx
index 6661bb689a8e..e0708f1f061d 100644
--- a/sfx2/inc/sfx2/ipclient.hxx
+++ b/sfx2/inc/sfx2/ipclient.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: ipclient.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/sfx2/inc/sfx2/itemconnect.hxx b/sfx2/inc/sfx2/itemconnect.hxx
index a5d9b1d5a4b1..1112f5825c1e 100644
--- a/sfx2/inc/sfx2/itemconnect.hxx
+++ b/sfx2/inc/sfx2/itemconnect.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: itemconnect.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/sfx2/inc/sfx2/itemwrapper.hxx b/sfx2/inc/sfx2/itemwrapper.hxx
index b1fd8934d393..6d5cc4d3986b 100644
--- a/sfx2/inc/sfx2/itemwrapper.hxx
+++ b/sfx2/inc/sfx2/itemwrapper.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: itemwrapper.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/sfx2/inc/sfx2/layout-post.hxx b/sfx2/inc/sfx2/layout-post.hxx
index f7638511f2be..91ae78410500 100644
--- a/sfx2/inc/sfx2/layout-post.hxx
+++ b/sfx2/inc/sfx2/layout-post.hxx
@@ -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$
- *
- * $Revision$
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sfx2/inc/sfx2/layout-pre.hxx b/sfx2/inc/sfx2/layout-pre.hxx
index ddfe7a02f622..fdd4d418ebf9 100644
--- a/sfx2/inc/sfx2/layout-pre.hxx
+++ b/sfx2/inc/sfx2/layout-pre.hxx
@@ -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$
- *
- * $Revision$
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sfx2/inc/sfx2/layout-tabdlg.hxx b/sfx2/inc/sfx2/layout-tabdlg.hxx
index c1cbd77e5339..a5099a3a6b75 100644
--- a/sfx2/inc/sfx2/layout-tabdlg.hxx
+++ b/sfx2/inc/sfx2/layout-tabdlg.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: tabdlg.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/sfx2/inc/sfx2/layout.hxx b/sfx2/inc/sfx2/layout.hxx
index f71809aac1ba..d92ed2ac4ac1 100644
--- a/sfx2/inc/sfx2/layout.hxx
+++ b/sfx2/inc/sfx2/layout.hxx
@@ -1,31 +1,29 @@
/*************************************************************************
-* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-*
-* Copyright 2008 by Sun Microsystems, Inc.
-*
-* OpenOffice.org - a multi-platform office productivity suite
-*
-* $RCSfile: code,v $
-*
-* $Revision: 1.3 $
-*
-* 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.
-************************************************************************/
+ *
+ * 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 _SFX2_LAYOUT_HXX
#define _SFX2_LAYOUT_HXX
diff --git a/sfx2/inc/sfx2/linkmgr.hxx b/sfx2/inc/sfx2/linkmgr.hxx
index 960faed33473..7dc779e2ba6e 100644
--- a/sfx2/inc/sfx2/linkmgr.hxx
+++ b/sfx2/inc/sfx2/linkmgr.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: linkmgr.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -37,9 +34,15 @@
#include <svl/svarray.hxx>
class SfxObjectShell;
+class Graphic;
+class Size;
namespace sfx2
{
+ // Damit der Link ueber den Status der zu ladenen Grafik informierten werden
+ // verschickt das FileObject ein SvData, mit der FormatId
+ // "RegisterStatusInfoId" und ein einem String als Datentraeger. Dieser
+ // enthaelt den folgenden enum.
class SvBaseLink;
class SvBaseLinkRef;
@@ -50,7 +53,7 @@ SV_DECL_PTRARR( SvBaseLinks, SvBaseLinkRefPtr, 1, 1 )
typedef SvLinkSource* SvLinkSourcePtr;
SV_DECL_PTRARR( SvLinkSources, SvLinkSourcePtr, 1, 1 )
-class SFX2_DLLPUBLIC SvLinkManager
+class SFX2_DLLPUBLIC LinkManager
{
SvBaseLinks aLinkTbl;
SvLinkSources aServerTbl;
@@ -60,8 +63,17 @@ protected:
BOOL InsertLink( SvBaseLink* pLink, USHORT nObjType, USHORT nUpdateType,
const String* pName = 0 );
public:
- SvLinkManager();
- virtual ~SvLinkManager();
+
+ enum LinkState
+ {
+ STATE_LOAD_OK,
+ STATE_LOAD_ERROR,
+ STATE_LOAD_ABORT
+ };
+
+ LinkManager( SfxObjectShell * pCacheCont );
+ ~LinkManager();
+
SfxObjectShell* GetPersist() const { return pPersist; }
void SetPersist( SfxObjectShell * p ) { pPersist = p; }
@@ -78,14 +90,24 @@ public:
// falls am Link schon alles eingestellt ist !
BOOL InsertDDELink( SvBaseLink* );
+ // den Link mit einem PseudoObject verbinden und in die Liste eintragen
+ BOOL InsertFileLink( sfx2::SvBaseLink&,
+ USHORT nFileType,
+ const String& rTxt,
+ const String* pFilterNm = 0,
+ const String* pRange = 0 );
+
+ // falls am Link schon alles eingestellt ist !
+ BOOL InsertFileLink( sfx2::SvBaseLink& );
+
// erfrage die Strings fuer den Dialog
- virtual BOOL GetDisplayNames( const SvBaseLink *,
+ BOOL GetDisplayNames( const SvBaseLink *,
String* pType,
String* pFile = 0,
String* pLink = 0,
String* pFilter = 0 ) const;
- virtual SvLinkSourceRef CreateObj( SvBaseLink* );
+ SvLinkSourceRef CreateObj( SvBaseLink* );
void UpdateAllLinks( BOOL bAskUpdate = TRUE,
BOOL bCallErrHdl = TRUE,
@@ -105,10 +127,26 @@ public:
void RemoveServer( USHORT nPos, USHORT nCnt = 1 )
{ aServerTbl.Remove( nPos, nCnt ); }
+ // eine Uebertragung wird abgebrochen, also alle DownloadMedien canceln
+ // (ist zur Zeit nur fuer die FileLinks interressant!)
+ void CancelTransfers();
+
+ // um Status Informationen aus dem FileObject an den BaseLink zu
+ // senden, gibt es eine eigene ClipBoardId. Das SvData-Object hat
+ // dann die entsprechenden Informationen als String.
+ // Wird zur Zeit fuer FileObject in Verbindung mit JavaScript benoetigt
+ // - das braucht Informationen ueber Load/Abort/Error
+ static ULONG RegisterStatusInfoId();
+
+ // if the mimetype says graphic/bitmap/gdimetafile then get the
+ // graphic from the Any. Return says no errors
+ static BOOL GetGraphicFromAny( const String& rMimeType,
+ const ::com::sun::star::uno::Any & rValue,
+ Graphic& rGrf );
+
private:
- // diese Methoden gibts nicht!
- SvLinkManager( const SvLinkManager& );
- SvLinkManager& operator=( const SvLinkManager& );
+ LinkManager( const LinkManager& );
+ LinkManager& operator=( const LinkManager& );
};
// Trenner im LinkName fuer die DDE-/File-/Grafik- Links
diff --git a/sfx2/inc/sfx2/linksrc.hxx b/sfx2/inc/sfx2/linksrc.hxx
index 25228945ec57..1c538112760c 100644
--- a/sfx2/inc/sfx2/linksrc.hxx
+++ b/sfx2/inc/sfx2/linksrc.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: linksrc.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/sfx2/inc/sfx2/lnkbase.hxx b/sfx2/inc/sfx2/lnkbase.hxx
index 1cec933bbcaa..62e49a1592e8 100644
--- a/sfx2/inc/sfx2/lnkbase.hxx
+++ b/sfx2/inc/sfx2/lnkbase.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: lnkbase.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -51,7 +48,7 @@ namespace sfx2
{
struct ImplBaseLinkData;
-class SvLinkManager;
+class LinkManager;
class SvLinkSource;
class FileDialogHelper;
@@ -82,7 +79,7 @@ struct BaseLink_Impl;
class SFX2_DLLPUBLIC SvBaseLink : public SvRefBase
{
private:
- friend class SvLinkManager;
+ friend class LinkManager;
friend class SvLinkSource;
SvLinkSourceRef xObj;
@@ -148,9 +145,9 @@ public:
ULONG GetContentType() const;
BOOL SetContentType( ULONG nType );
- SvLinkManager* GetLinkManager();
- const SvLinkManager* GetLinkManager() const;
- void SetLinkManager( SvLinkManager* _pMgr );
+ LinkManager* GetLinkManager();
+ const LinkManager* GetLinkManager() const;
+ void SetLinkManager( LinkManager* _pMgr );
BOOL Update();
void Disconnect();
diff --git a/sfx2/inc/sfx2/macrconf.hxx b/sfx2/inc/sfx2/macrconf.hxx
index d27f660bd275..6b50ddf3497a 100644
--- a/sfx2/inc/sfx2/macrconf.hxx
+++ b/sfx2/inc/sfx2/macrconf.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: macrconf.hxx,v $
- * $Revision: 1.4.142.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sfx2/inc/sfx2/macropg.hxx b/sfx2/inc/sfx2/macropg.hxx
index d197b6fe544d..d9d886cdfd5f 100644
--- a/sfx2/inc/sfx2/macropg.hxx
+++ b/sfx2/inc/sfx2/macropg.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: macropg.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/sfx2/inc/sfx2/mgetempl.hxx b/sfx2/inc/sfx2/mgetempl.hxx
index bdf875802180..ba6a9b844b7a 100644
--- a/sfx2/inc/sfx2/mgetempl.hxx
+++ b/sfx2/inc/sfx2/mgetempl.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: mgetempl.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/sfx2/inc/sfx2/minarray.hxx b/sfx2/inc/sfx2/minarray.hxx
index 76d060fd5640..e0a8c398b215 100644
--- a/sfx2/inc/sfx2/minarray.hxx
+++ b/sfx2/inc/sfx2/minarray.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: minarray.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/sfx2/inc/sfx2/minstack.hxx b/sfx2/inc/sfx2/minstack.hxx
index b0d3d6b1e20d..c5f2f84da1d5 100644
--- a/sfx2/inc/sfx2/minstack.hxx
+++ b/sfx2/inc/sfx2/minstack.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: minstack.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/sfx2/inc/sfx2/mnuitem.hxx b/sfx2/inc/sfx2/mnuitem.hxx
index a173f6e1a31e..fe7d8bb36b1e 100644
--- a/sfx2/inc/sfx2/mnuitem.hxx
+++ b/sfx2/inc/sfx2/mnuitem.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: mnuitem.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/sfx2/inc/sfx2/mnumgr.hxx b/sfx2/inc/sfx2/mnumgr.hxx
index eaad0adab79d..ee1c81daa603 100644
--- a/sfx2/inc/sfx2/mnumgr.hxx
+++ b/sfx2/inc/sfx2/mnumgr.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: mnumgr.hxx,v $
- * $Revision: 1.4.84.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -105,11 +102,11 @@ private:
DECL_LINK( SelectHdl, void * );
Menu* pSVMenu;
-private:
- // only declared, but not defined: don't allow copying
- SfxPopupMenuManager( const SfxPopupMenuManager& );
- SfxPopupMenuManager& operator=( const SfxPopupMenuManager& );
-
+private:
+ // only declared, but not defined: don't allow copying
+ SfxPopupMenuManager( const SfxPopupMenuManager& );
+ SfxPopupMenuManager& operator=( const SfxPopupMenuManager& );
+
public:
SfxPopupMenuManager( const ResId&, SfxBindings& );
SfxPopupMenuManager( PopupMenu*, SfxBindings& );
diff --git a/sfx2/inc/sfx2/module.hxx b/sfx2/inc/sfx2/module.hxx
index f59832085dc6..793dd8f76cab 100644
--- a/sfx2/inc/sfx2/module.hxx
+++ b/sfx2/inc/sfx2/module.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: module.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -36,9 +33,10 @@
#include <sfx2/shell.hxx>
#include <sfx2/imgdef.hxx>
#include <sal/types.h>
+#include <vcl/fldunit.hxx>
+
class ImageList;
-class SfxAcceleratorManager;
class SfxBindings;
class SfxObjectFactory;
class ModalDialog;
@@ -96,6 +94,8 @@ public:
BOOL IsActive() const;
static SfxModule* GetActiveModule( SfxViewFrame* pFrame=NULL );
+ static FieldUnit GetCurrentFieldUnit();
+ FieldUnit GetFieldUnit() const;
//#if 0 // _SOLAR__PRIVATE
SAL_DLLPRIVATE static SfxModuleArr_Impl& GetModules_Impl();
diff --git a/sfx2/inc/sfx2/msg.hxx b/sfx2/inc/sfx2/msg.hxx
index 66e8c07ba357..efbc2d2c75af 100644
--- a/sfx2/inc/sfx2/msg.hxx
+++ b/sfx2/inc/sfx2/msg.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: msg.hxx,v $
- * $Revision: 1.4.82.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sfx2/inc/sfx2/msgpool.hxx b/sfx2/inc/sfx2/msgpool.hxx
index bc45f9303a96..717aa00c7875 100644
--- a/sfx2/inc/sfx2/msgpool.hxx
+++ b/sfx2/inc/sfx2/msgpool.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: msgpool.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/sfx2/inc/sfx2/navigat.hxx b/sfx2/inc/sfx2/navigat.hxx
index d9454bcfeb90..a3f525ccd754 100644
--- a/sfx2/inc/sfx2/navigat.hxx
+++ b/sfx2/inc/sfx2/navigat.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: navigat.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/sfx2/inc/sfx2/new.hxx b/sfx2/inc/sfx2/new.hxx
index 2e9cffeb4dbe..1647f880500d 100644
--- a/sfx2/inc/sfx2/new.hxx
+++ b/sfx2/inc/sfx2/new.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: new.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/sfx2/inc/sfx2/newstyle.hxx b/sfx2/inc/sfx2/newstyle.hxx
index 8c2b99b73b9b..ce596bacaa81 100644
--- a/sfx2/inc/sfx2/newstyle.hxx
+++ b/sfx2/inc/sfx2/newstyle.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: newstyle.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/sfx2/inc/sfx2/objface.hxx b/sfx2/inc/sfx2/objface.hxx
index bf2cc5bdc476..c7710f533935 100644
--- a/sfx2/inc/sfx2/objface.hxx
+++ b/sfx2/inc/sfx2/objface.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: objface.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/sfx2/inc/sfx2/objitem.hxx b/sfx2/inc/sfx2/objitem.hxx
index e82e92f188c1..96bba6c91a07 100644
--- a/sfx2/inc/sfx2/objitem.hxx
+++ b/sfx2/inc/sfx2/objitem.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: objitem.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/sfx2/inc/sfx2/objsh.hxx b/sfx2/inc/sfx2/objsh.hxx
index f81be0aa7bba..5fc5a641fd44 100644
--- a/sfx2/inc/sfx2/objsh.hxx
+++ b/sfx2/inc/sfx2/objsh.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: objsh.hxx,v $
- * $Revision: 1.14.72.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -95,8 +92,6 @@ class GDIMetaFile;
class Bitmap;
class INetURLObject;
class IndexBitSet;
-class SfxTopFrame;
-class SfxAcceleratorManager;
class JobSetup;
class Size;
class Point;
@@ -221,17 +216,13 @@ private:
SfxMedium * pMedium; // Beschreibung der Datei bzw. des Storage, in dem sich das Objekt befindet
SfxStyleSheetBasePool* pStyleSheetPool; // StyleSheets
SfxObjectCreateMode eCreateMode; // Zweck des Objekts
- sal_uInt16 nViewNo; // Numerierung der MDIWins
sal_Bool bHasName :1, // sal_True := bestehendes Objekt, sal_False := es ist ein neues Objekt
bIsTmp :1; // temp. Storage
private:
//#if 0 // _SOLAR__PRIVATE
- SAL_DLLPRIVATE void Construct_Impl();
SAL_DLLPRIVATE void UpdateTime_Impl(const ::com::sun::star::uno::Reference<
::com::sun::star::document::XDocumentProperties> & i_xDocProps);
- SAL_DLLPRIVATE sal_Bool MakeBackup_Impl(const String &rName,
- sal_Bool bCopyAllways = sal_False);
SAL_DLLPRIVATE sal_Bool SaveTo_Impl(SfxMedium &rMedium, const SfxItemSet* pSet );
@@ -241,6 +232,7 @@ private:
protected:
SfxObjectShell(SfxObjectCreateMode);
+ SfxObjectShell( const sal_uInt64 i_nCreationFlags ); // see sfxmodelfactory.hxx
virtual ~SfxObjectShell();
virtual void ModifyChanged();
@@ -250,10 +242,6 @@ protected:
*/
void SetHasNoBasic();
-//#if 0 // _SOLAR__PRIVATE
- SAL_DLLPRIVATE void StartLoading_Impl();
-//#endif
-
/// template method, called by FlushDocInfo; this implementation is empty
virtual void DoFlushDocInfo();
@@ -505,11 +493,6 @@ public:
void SetTitle( const String& rTitle );
String GetTitle( sal_uInt16 nMaxLen = 0 ) const;
void InvalidateName(); // Zuruecksetzen auf unbenannt
-//#if 0 // _SOLAR__PRIVATE
- SAL_DLLPRIVATE void SetLastMark_Impl( const String & );
- SAL_DLLPRIVATE const String& GetLastMark_Impl() const;
- SAL_DLLPRIVATE sal_Bool DoInitNew_Impl( const ::rtl::OUString& rName );
-//#endif
// DDE-Interface
virtual long DdeExecute( const String& rCmd );
@@ -613,19 +596,15 @@ public:
virtual SfxFrame* GetSmartSelf( SfxFrame* pSelf, SfxMedium& rMedium );
- void SetModel( SfxBaseModel* pModel );
- const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >&
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >
GetModel() const;
// Nur uebergangsweise fuer die Applikationen !!!
void SetBaseModel( SfxBaseModel* pModel );
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > GetBaseModel();
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > GetBaseModel() const;
// Nur uebergangsweise fuer die Applikationen !!!
virtual SEQUENCE< OUSTRING > GetEventNames();
-//REMOVE SotStorageStreamRef GetConfigurationStream( const String& rName, BOOL bCreate=FALSE );
-//REMOVE SvStorageRef GetConfigurationStorage( SotStorage* pStor=NULL );
-
Window* GetDialogParent( SfxMedium* pMedium=0 );
String UpdateTitle( SfxMedium* pMed=NULL, USHORT nDocViewNo=0 );
static SfxObjectShell* CreateObject( const String& rServiceName, SfxObjectCreateMode = SFX_CREATE_MODE_STANDARD );
@@ -678,12 +657,10 @@ public:
virtual Printer * GetDocumentPrinter();
virtual OutputDevice* GetDocumentRefDev();
virtual void OnDocumentPrinterChanged( Printer * pNewPrinter );
- //virtual UINT32 GetViewAspect() const;
virtual Rectangle GetVisArea( USHORT nAspect ) const;
virtual void SetVisArea( const Rectangle & rVisArea );
const Rectangle & GetVisArea() const;
void SetVisAreaSize( const Size & rVisSize );
-//REMOVE virtual ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > CreateTransferableSnapshot();
virtual ULONG GetMiscStatus() const;
MapUnit GetMapUnit() const;
@@ -727,9 +704,6 @@ public:
SAL_DLLPRIVATE ::rtl::OUString CreateTempCopyOfStorage_Impl(
const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage );
- SAL_DLLPRIVATE static sal_Bool NoDependencyFromManifest_Impl(
- const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage );
-
SAL_DLLPRIVATE void InitOwnModel_Impl();
SAL_DLLPRIVATE void BreakMacroSign_Impl( sal_Bool bBreakMacroSing );
SAL_DLLPRIVATE void CheckSecurityOnLoading_Impl();
@@ -738,7 +712,6 @@ public:
const ::com::sun::star::uno::Sequence< ::com::sun::star::security::DocumentSignatureInformation >& aInfos );
SAL_DLLPRIVATE void CheckEncryption_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& xHandler );
- SAL_DLLPRIVATE SEQUENCE< OUSTRING > GetEventNames_Impl();
SAL_DLLPRIVATE void InitBasicManager_Impl();
SAL_DLLPRIVATE SfxObjectShell_Impl* Get_Impl() { return pImp; }
@@ -772,12 +745,10 @@ public:
const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aMediaDescr );
SAL_DLLPRIVATE void PositionView_Impl();
SAL_DLLPRIVATE void UpdateFromTemplate_Impl();
- SAL_DLLPRIVATE void Reload_Impl();
SAL_DLLPRIVATE sal_Bool CanReload_Impl();
SAL_DLLPRIVATE void SetNamedVisibility_Impl();
SAL_DLLPRIVATE sal_Bool DoSave_Impl( const SfxItemSet* pSet=0 );
SAL_DLLPRIVATE sal_Bool Save_Impl( const SfxItemSet* pSet=0 );
- SAL_DLLPRIVATE void UpdatePickList_Impl();
SAL_DLLPRIVATE sal_Bool PreDoSaveAs_Impl(const String &rFileName, const String &rFiltName, SfxItemSet *);
SAL_DLLPRIVATE sal_Bool APISaveAs_Impl ( const String& aFileName, SfxItemSet* aParams );
SAL_DLLPRIVATE sal_Bool CommonSaveAs_Impl ( const INetURLObject& aURL, const String& aFilterName, SfxItemSet* aParams );
@@ -785,20 +756,17 @@ public:
const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage,
sal_Bool bTypeMustBeSetAlready );
SAL_DLLPRIVATE void PrepareSecondTryLoad_Impl();
+ SAL_DLLPRIVATE void SetInitialized_Impl( const bool i_fromInitNew );
// public-internals
SAL_DLLPRIVATE IndexBitSet& GetNoSet_Impl();
SAL_DLLPRIVATE void SetProgress_Impl( SfxProgress *pProgress );
- SAL_DLLPRIVATE sal_uInt16& GetAktViewNo() { return nViewNo; }
SAL_DLLPRIVATE void PostActivateEvent_Impl( SfxViewFrame* );
SAL_DLLPRIVATE void SetActivateEvent_Impl(sal_uInt16 );
-//REMOVE FASTBOOL SaveWindows_Impl( SvStorage &rStor ) const;
- SAL_DLLPRIVATE SfxViewFrame* LoadWindows_Impl( SfxTopFrame *pPrefered = 0 );
SAL_DLLPRIVATE SfxObjectShell* GetParentShellByModel_Impl();
// configuration items
SAL_DLLPRIVATE SfxEventConfigItem_Impl* GetEventConfig_Impl( sal_Bool bForce=sal_False );
- SAL_DLLPRIVATE SfxAcceleratorManager* GetAccMgr_Impl();
SAL_DLLPRIVATE SfxToolBoxConfig* GetToolBoxConfig_Impl();
SAL_DLLPRIVATE sal_uInt16 ImplGetSignatureState( sal_Bool bScriptingContent = FALSE );
diff --git a/sfx2/inc/sfx2/objuno.hxx b/sfx2/inc/sfx2/objuno.hxx
index c0b015f3bc60..0a0dea610ac5 100644
--- a/sfx2/inc/sfx2/objuno.hxx
+++ b/sfx2/inc/sfx2/objuno.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: objuno.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/sfx2/inc/sfx2/opengrf.hxx b/sfx2/inc/sfx2/opengrf.hxx
new file mode 100644
index 000000000000..0d11462685d5
--- /dev/null
+++ b/sfx2/inc/sfx2/opengrf.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 _SFX2_OPENGRF_HXX
+#define _SFX2_OPENGRF_HXX
+
+#include <memory> // auto_ptr
+#include <svtools/filter.hxx>
+#include <sfx2/dllapi.h>
+
+struct SvxOpenGrf_Impl;
+
+class SFX2_DLLPUBLIC SvxOpenGraphicDialog
+{
+public:
+ SvxOpenGraphicDialog ( const String& rTitle );
+ ~SvxOpenGraphicDialog ();
+
+ short Execute();
+
+ void SetPath( const String& rPath );
+ void SetPath( const String& rPath, sal_Bool bLinkState );
+ String GetPath() const;
+
+ int GetGraphic(Graphic&) const;
+
+ void EnableLink(sal_Bool);
+ void AsLink(sal_Bool);
+ sal_Bool IsAsLink() const;
+
+ String GetCurrentFilter() const;
+ void SetCurrentFilter(const String&);
+
+ /// Set dialog help id at FileDlgHelper
+ void SetControlHelpIds( const INT16* _pControlId, const INT32* _pHelpId );
+ /// Set control help ids at FileDlgHelper
+ void SetDialogHelpId( const INT32 _nHelpId );
+private:
+ // disable copy and assignment
+ SFX2_DLLPRIVATE SvxOpenGraphicDialog (const SvxOpenGraphicDialog&);
+ SFX2_DLLPRIVATE SvxOpenGraphicDialog& operator = ( const SvxOpenGraphicDialog & );
+
+ const std::auto_ptr< SvxOpenGrf_Impl > mpImpl;
+};
+
+#endif // _SVX_OPENGRF_HXX
+
diff --git a/sfx2/inc/sfx2/passwd.hxx b/sfx2/inc/sfx2/passwd.hxx
index bfe8debecca1..4f4a04834257 100644
--- a/sfx2/inc/sfx2/passwd.hxx
+++ b/sfx2/inc/sfx2/passwd.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: passwd.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/sfx2/inc/sfx2/printer.hxx b/sfx2/inc/sfx2/printer.hxx
index a5e5f3a1db79..a96033835a84 100644
--- a/sfx2/inc/sfx2/printer.hxx
+++ b/sfx2/inc/sfx2/printer.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: printer.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/sfx2/inc/sfx2/printopt.hxx b/sfx2/inc/sfx2/printopt.hxx
index e6232c1d7fab..622d69738a59 100644
--- a/sfx2/inc/sfx2/printopt.hxx
+++ b/sfx2/inc/sfx2/printopt.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: printopt.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/sfx2/inc/sfx2/prnmon.hxx b/sfx2/inc/sfx2/prnmon.hxx
index 376a599edef4..f35064418ec3 100644
--- a/sfx2/inc/sfx2/prnmon.hxx
+++ b/sfx2/inc/sfx2/prnmon.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: prnmon.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/sfx2/inc/sfx2/progress.hxx b/sfx2/inc/sfx2/progress.hxx
index 03d07a2cbddc..7019ebf7785e 100644
--- a/sfx2/inc/sfx2/progress.hxx
+++ b/sfx2/inc/sfx2/progress.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: progress.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/sfx2/inc/sfx2/querystatus.hxx b/sfx2/inc/sfx2/querystatus.hxx
index c9fef61cc318..bf9f2c638361 100644
--- a/sfx2/inc/sfx2/querystatus.hxx
+++ b/sfx2/inc/sfx2/querystatus.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: querystatus.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/sfx2/inc/sfx2/request.hxx b/sfx2/inc/sfx2/request.hxx
index dfb25ae2a952..9d7f4a6dc92d 100644
--- a/sfx2/inc/sfx2/request.hxx
+++ b/sfx2/inc/sfx2/request.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: request.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/sfx2/inc/sfx2/sfx.hrc b/sfx2/inc/sfx2/sfx.hrc
index 9bba3997a71f..917bd75e4138 100644
--- a/sfx2/inc/sfx2/sfx.hrc
+++ b/sfx2/inc/sfx2/sfx.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: sfx.hrc,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -219,6 +216,7 @@
#define ABOUT_STR_DEVELOPER_ARY 1
#define ABOUT_STR_FRENCH_COPYRIGHT 2
#define ABOUT_STR_ACCEL 3
+#define ABOUT_STR_COPYRIGHT 4
#define RID_APPTITLE (RID_SFX_START+4)
#define RID_BUILDVERSION (RID_SFX_START+5)
diff --git a/sfx2/inc/sfx2/sfxbasecontroller.hxx b/sfx2/inc/sfx2/sfxbasecontroller.hxx
index 3debe10f001d..ca30d243bbac 100644
--- a/sfx2/inc/sfx2/sfxbasecontroller.hxx
+++ b/sfx2/inc/sfx2/sfxbasecontroller.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: sfxbasecontroller.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -38,7 +35,7 @@
#include <com/sun/star/frame/XDispatchProvider.hpp>
#include <com/sun/star/frame/DispatchDescriptor.hpp>
#include <com/sun/star/frame/XDispatchInformationProvider.hpp>
-#include <com/sun/star/frame/XController.hpp>
+#include <com/sun/star/frame/XController2.hpp>
#include <com/sun/star/frame/XControllerBorder.hpp>
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/frame/XFrame.hpp>
@@ -46,7 +43,8 @@
#include <com/sun/star/frame/XTitleChangeBroadcaster.hpp>
#include <com/sun/star/util/URL.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
-#include <cppuhelper/weak.hxx>
+#include <cppuhelper/implbase9.hxx>
+#include <cppuhelper/basemutex.hxx>
#include <osl/mutex.hxx>
#include <com/sun/star/task/XStatusIndicatorSupplier.hpp>
#include <com/sun/star/ui/XContextMenuInterception.hpp>
@@ -70,27 +68,16 @@
#define ANY ::com::sun::star::uno::Any
#define SEQUENCE ::com::sun::star::uno::Sequence
#define XDISPATCH ::com::sun::star::frame::XDispatch
-#define XDISPATCHPROVIDER ::com::sun::star::frame::XDispatchProvider
#define DISPATCHDESCRIPTOR ::com::sun::star::frame::DispatchDescriptor
#define XMODEL ::com::sun::star::frame::XModel
#define XFRAME ::com::sun::star::frame::XFrame
-#define XCONTROLLER ::com::sun::star::frame::XController
-#define XCONTROLLERBORDER ::com::sun::star::frame::XControllerBorder
#define XEVENTLISTENER ::com::sun::star::lang::XEventListener
#define MUTEX ::osl::Mutex
#define RUNTIMEEXCEPTION ::com::sun::star::uno::RuntimeException
#define UNOTYPE ::com::sun::star::uno::Type
-#define OWEAKOBJECT ::cppu::OWeakObject
-#define XTYPEPROVIDER ::com::sun::star::lang::XTypeProvider
#define UNOURL ::com::sun::star::util::URL
#define OUSTRING ::rtl::OUString
-#define XSTATUSINDICATORSUPPLIER ::com::sun::star::task::XStatusIndicatorSupplier
-#define XCONTEXTMENUINTERCEPTION ::com::sun::star::ui::XContextMenuInterception
#define XCONTEXTMENUINTERCEPTOR ::com::sun::star::ui::XContextMenuInterceptor
-#define XUSERINPUTINTERCEPTION ::com::sun::star::awt::XUserInputInterception
-#define XDISPATCHINFORMATIONPROVIDER ::com::sun::star::frame::XDispatchInformationProvider
-#define XTITLE ::com::sun::star::frame::XTitle
-#define XTITLECHANGEBROADCASTER ::com::sun::star::frame::XTitleChangeBroadcaster
//________________________________________________________________________________________________________
// forwards
@@ -98,6 +85,8 @@
struct IMPL_SfxBaseController_DataContainer ; // impl. struct to hold member of class SfxBaseController
+class SfxViewFrame;
+
sal_Int16 MapGroupIDToCommandGroup( sal_Int16 nGroupID );
sal_Bool SupportsCommandGroup( sal_Int16 nCommandGroup );
sal_Int16 MapCommandGroupToGroupID( sal_Int16 nCommandGroup );
@@ -106,36 +95,19 @@ sal_Int16 MapCommandGroupToGroupID( sal_Int16 nCommandGroup );
// class declarations
//________________________________________________________________________________________________________
-struct IMPL_SfxBaseController_MutexContainer
-{
- MUTEX m_aMutex ;
-} ;
-
-/**_______________________________________________________________________________________________________
- @short -
-
- @descr -
-
- @implements -
-
- @base -
-*/
-
-// Forward to impl-baseclass!
-//class IMPL_SfxBaseController ;
-
-class SFX2_DLLPUBLIC SfxBaseController : public XTYPEPROVIDER
- , public XCONTROLLER
- , public XCONTROLLERBORDER
- , public XDISPATCHPROVIDER
- , public XSTATUSINDICATORSUPPLIER
- , public XCONTEXTMENUINTERCEPTION
- , public XUSERINPUTINTERCEPTION
- , public XDISPATCHINFORMATIONPROVIDER
- , public XTITLE
- , public XTITLECHANGEBROADCASTER
- , public IMPL_SfxBaseController_MutexContainer
- , public OWEAKOBJECT
+typedef ::cppu::WeakImplHelper9 < ::com::sun::star::frame::XController2
+ , ::com::sun::star::frame::XControllerBorder
+ , ::com::sun::star::frame::XDispatchProvider
+ , ::com::sun::star::task::XStatusIndicatorSupplier
+ , ::com::sun::star::ui::XContextMenuInterception
+ , ::com::sun::star::awt::XUserInputInterception
+ , ::com::sun::star::frame::XDispatchInformationProvider
+ , ::com::sun::star::frame::XTitle
+ , ::com::sun::star::frame::XTitleChangeBroadcaster
+ > SfxBaseController_Base;
+
+class SFX2_DLLPUBLIC SfxBaseController :public SfxBaseController_Base
+ ,public ::cppu::BaseMutex
{
//________________________________________________________________________________________________________
// public methods
@@ -180,93 +152,14 @@ public:
SAL_DLLPRIVATE void ReleaseShell_Impl();
SAL_DLLPRIVATE void BorderWidthsChanged_Impl();
- //____________________________________________________________________________________________________
- // XInterface
- //____________________________________________________________________________________________________
-
- /**___________________________________________________________________________________________________
- @short give answer, if interface is supported
- @descr The interfaces are searched by type.
-
- @seealso XInterface
-
- @param "rType" is the type of searched interface.
-
- @return Any information about found interface
-
- @onerror A RuntimeException is thrown.
- */
-
- virtual ANY SAL_CALL queryInterface( const UNOTYPE& rType ) throw( RUNTIMEEXCEPTION ) ;
-
- /**___________________________________________________________________________________________________
- @short increment refcount
- @descr -
-
- @seealso XInterface
- @seealso release()
-
- @param -
-
- @return -
-
- @onerror A RuntimeException is thrown.
- */
-
- virtual void SAL_CALL acquire() throw() ;
-
- /**___________________________________________________________________________________________________
- @short decrement refcount
- @descr -
-
- @seealso XInterface
- @seealso acquire()
-
- @param -
-
- @return -
-
- @onerror A RuntimeException is thrown.
- */
-
- virtual void SAL_CALL release() throw() ;
+ ::com::sun::star::uno::Reference< ::com::sun::star::task::XStatusIndicator > SAL_CALL getStatusIndicator( ) throw (::com::sun::star::uno::RuntimeException);
//____________________________________________________________________________________________________
- // XTypeProvider
+ // XController2
//____________________________________________________________________________________________________
-
- /**___________________________________________________________________________________________________
- @short get information about supported interfaces
- @descr -
-
- @seealso XTypeProvider
-
- @param -
-
- @return Sequence of types of all supported interfaces
-
- @onerror A RuntimeException is thrown.
- */
-
- virtual SEQUENCE< UNOTYPE > SAL_CALL getTypes() throw( RUNTIMEEXCEPTION ) ;
-
- /**___________________________________________________________________________________________________
- @short get implementation id
- @descr This ID is neccessary for UNO-caching. If there no ID, cache is disabled.
- Another way, cache is enabled.
-
- @seealso XTypeProvider
-
- @param -
-
- @return ID as Sequence of byte
-
- @onerror A RuntimeException is thrown.
- */
-
- virtual SEQUENCE< sal_Int8 > SAL_CALL getImplementationId() throw( RUNTIMEEXCEPTION ) ;
-
- ::com::sun::star::uno::Reference< ::com::sun::star::task::XStatusIndicator > SAL_CALL getStatusIndicator( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL getComponentWindow() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getViewControllerName() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getCreationArguments() throw (::com::sun::star::uno::RuntimeException);
//____________________________________________________________________________________________________
// XController
@@ -499,23 +392,23 @@ public:
SAL_DLLPRIVATE BOOL HandleEvent_Impl( NotifyEvent& rEvent );
SAL_DLLPRIVATE BOOL HasKeyListeners_Impl();
SAL_DLLPRIVATE BOOL HasMouseClickListeners_Impl();
+ SAL_DLLPRIVATE void SetCreationArguments_Impl( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& i_rCreationArgs );
SAL_DLLPRIVATE ::com::sun::star::uno::Reference< ::com::sun::star::frame::XTitle > impl_getTitleHelper ();
//#endif
+private:
+ enum ConnectSfxFrame
+ {
+ E_CONNECT,
+ E_DISCONNECT,
+ E_RECONNECT
+ };
+ SAL_DLLPRIVATE void ConnectSfxFrame_Impl( const ConnectSfxFrame i_eConnect );
+ SAL_DLLPRIVATE SfxViewFrame& GetViewFrame_Impl() const;
//________________________________________________________________________________________________________
// private variables
//________________________________________________________________________________________________________
- /** With this method you can set the flag that controlls whether the
- frame is released together with a controller when the later one is
- disposed.
- @param bFlag
- When passing <true/>, the default value of this flag, then
- disposing the controller results in releasing the frame.
- Passing <false/> leaves the frame unaffected.
- */
- void FrameIsReleasedWithController (sal_Bool bFlag);
-
private:
IMPL_SfxBaseController_DataContainer* m_pData ;
diff --git a/sfx2/inc/sfx2/sfxbasemodel.hxx b/sfx2/inc/sfx2/sfxbasemodel.hxx
index b7bb0fc93be1..578dd1fd33bb 100644
--- a/sfx2/inc/sfx2/sfxbasemodel.hxx
+++ b/sfx2/inc/sfx2/sfxbasemodel.hxx
@@ -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: sfxbasemodel.hxx,v $
- *
- * $Revision: 1.13.28.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -47,6 +43,7 @@
#include <com/sun/star/document/XDocumentInfo.hpp>
#include <com/sun/star/document/XDocumentInfoSupplier.hpp>
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
+#include <com/sun/star/document/XDocumentRecovery.hpp>
#include <com/sun/star/rdf/XDocumentMetadataAccess.hpp>
@@ -59,6 +56,8 @@
#include <com/sun/star/document/XStorageBasedDocument.hpp>
#include <com/sun/star/document/XScriptInvocationContext.hpp>
#include <com/sun/star/lang/XEventListener.hpp>
+#include <com/sun/star/lang/NotInitializedException.hpp>
+#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/frame/XModel2.hpp>
#include <com/sun/star/frame/DoubleInitializationException.hpp>
#include <com/sun/star/util/XModifiable2.hpp>
@@ -86,6 +85,8 @@
#include <cppuhelper/typeprovider.hxx>
#include <com/sun/star/script/XStarBasicAccess.hpp>
#include <osl/mutex.hxx>
+#include <vos/mutex.hxx>
+#include <vcl/svapp.hxx>
#include <tools/link.hxx>
@@ -95,9 +96,9 @@
#include <com/sun/star/task/XInteractionHandler.hpp>
//________________________________________________________________________________________________________
-#if ! defined(INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_29)
-#define INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_29
-#define COMPHELPER_IMPLBASE_INTERFACE_NUMBER 29
+#if ! defined(INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_30)
+#define INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_30
+#define COMPHELPER_IMPLBASE_INTERFACE_NUMBER 30
#include <comphelper/implbase_var.hxx>
#endif
@@ -200,8 +201,12 @@ class SfxPrinter;
class SfxViewShell;
class SfxObjectShell ;
class SfxEventHint;
+class SfxViewFrame;
struct IMPL_SfxBaseModel_DataContainer ; // impl. struct to hold member of class SfxBaseModel
+namespace sfx { namespace intern {
+ class ViewCreationGuard;
+} }
//________________________________________________________________________________________________________
// class declarations
//________________________________________________________________________________________________________
@@ -232,10 +237,11 @@ struct IMPL_SfxBaseModel_DataContainer ; // impl. struct to hold member o
SfxListener
*/
-typedef ::comphelper::WeakImplHelper29 < XCHILD
+typedef ::comphelper::WeakImplHelper30 < XCHILD
, XDOCUMENTINFOSUPPLIER
, ::com::sun::star::document::XDocumentPropertiesSupplier
, ::com::sun::star::rdf::XDocumentMetadataAccess
+ , ::com::sun::star::document::XDocumentRecovery
, XEVENTBROADCASTER
, XEVENTLISTENER
, XEVENTSSUPPLIER
@@ -1288,6 +1294,18 @@ public:
virtual ::rtl::OUString SAL_CALL getUntitledPrefix()
throw (css::uno::RuntimeException);
+ // css.document.XDocumentRecovery
+ virtual ::sal_Bool SAL_CALL wasModifiedSinceLastSave()
+ throw ( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL storeToRecoveryFile( const ::rtl::OUString& i_TargetLocation, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& i_MediaDescriptor )
+ throw ( ::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::io::IOException,
+ ::com::sun::star::lang::WrappedTargetException );
+ virtual void SAL_CALL recoverFromFile( const ::rtl::OUString& i_SourceLocation, const ::rtl::OUString& i_SalvagedFile, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& i_MediaDescriptor )
+ throw ( ::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::io::IOException,
+ ::com::sun::star::lang::WrappedTargetException );
+
//____________________________________________________________________________________________________
// ::com::sun::star::rdf::XNode:
@@ -1467,6 +1485,7 @@ public:
SAL_DLLPRIVATE sal_Bool impl_isDisposed() const ;
sal_Bool IsDisposed() const ;
+ sal_Bool IsInitialized() const;
::com::sun::star::uno::Reference < ::com::sun::star::container::XIndexAccess > SAL_CALL getViewData() throw (::com::sun::star::uno::RuntimeException);
void SAL_CALL setViewData( const ::com::sun::star::uno::Reference < ::com::sun::star::container::XIndexAccess >& aData ) throw (::com::sun::star::uno::RuntimeException);
@@ -1477,7 +1496,6 @@ public:
/** returns true if someone added a XEventListener to this XEventBroadcaster */
sal_Bool hasEventListeners() const;
-
protected:
/* returns a unique id for the model that is valid as long as the document
@@ -1521,6 +1539,13 @@ private:
SAL_DLLPRIVATE css::uno::Reference< css::frame::XTitle > impl_getTitleHelper ();
SAL_DLLPRIVATE css::uno::Reference< css::frame::XUntitledNumbers > impl_getUntitledHelper ();
+ SAL_DLLPRIVATE SfxViewFrame* FindOrCreateViewFrame_Impl(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rFrame,
+ ::sfx::intern::ViewCreationGuard& i_rGuard
+ ) const;
+
+ SAL_DLLPRIVATE void NotifyModifyListeners_Impl() const;
+
//________________________________________________________________________________________________________
// private variables and methods
//________________________________________________________________________________________________________
@@ -1530,9 +1555,42 @@ private:
IMPL_SfxBaseModel_DataContainer* m_pData ;
// cannot be held in m_pData, since it needs to be accessed in non-threadsafe context
const bool m_bSupportEmbeddedScripts;
+ const bool m_bSupportDocRecovery;
} ; // class SfxBaseModel
+class SFX2_DLLPUBLIC SfxModelGuard
+{
+public:
+ enum AllowedModelState
+ {
+ // not yet initialized
+ E_INITIALIZING,
+ // fully alive, i.e. initialized, and not yet disposed
+ E_FULLY_ALIVE
+ };
+
+ SfxModelGuard( SfxBaseModel& i_rModel, const AllowedModelState i_eState = E_FULLY_ALIVE )
+ :m_aGuard( Application::GetSolarMutex() )
+ {
+ if ( i_rModel.IsDisposed() )
+ throw ::com::sun::star::lang::DisposedException( ::rtl::OUString(), *&i_rModel );
+ if ( ( i_eState != E_INITIALIZING ) && !i_rModel.IsInitialized() )
+ throw ::com::sun::star::lang::NotInitializedException( ::rtl::OUString(), *&i_rModel );
+ }
+ ~SfxModelGuard()
+ {
+ }
+
+ void clear()
+ {
+ m_aGuard.clear();
+ }
+
+private:
+ ::vos::OClearableGuard m_aGuard;
+};
+
#undef css
#endif // _SFX_SFXBASEMODEL_HXX_
diff --git a/sfx2/inc/sfx2/sfxdefs.hxx b/sfx2/inc/sfx2/sfxdefs.hxx
index b70f2e3d5621..7a5a7e96f70b 100644
--- a/sfx2/inc/sfx2/sfxdefs.hxx
+++ b/sfx2/inc/sfx2/sfxdefs.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: sfxdefs.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/sfx2/inc/sfx2/sfxdlg.hxx b/sfx2/inc/sfx2/sfxdlg.hxx
index 47ee31c66575..d82abeefe8bc 100644
--- a/sfx2/inc/sfx2/sfxdlg.hxx
+++ b/sfx2/inc/sfx2/sfxdlg.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: sfxdlg.hxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -61,7 +58,7 @@ struct TransferableObjectDescriptor;
namespace sfx2
{
- class SvLinkManager;
+ class LinkManager;
}
namespace com { namespace sun { namespace star { namespace frame {
@@ -115,9 +112,10 @@ public:
namespace com { namespace sun { namespace star { namespace frame { class XFrame; } } } }
-class SFX2_DLLPUBLIC SfxAbstractDialogFactory : public VclAbstractDialogFactory
+class SFX2_DLLPUBLIC SfxAbstractDialogFactory : virtual public VclAbstractDialogFactory
{
public:
+ virtual ~SfxAbstractDialogFactory(); // needed for export of vtable
static SfxAbstractDialogFactory* Create();
virtual VclAbstractDialog* CreateSfxDialog( Window* pParent, const SfxBindings& rBindings, sal_uInt32 nResId ) = 0;
virtual VclAbstractDialog* CreateFrameDialog( Window* pParent, const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rFrame, sal_uInt32 nResId, const String& rParameter ) = 0;
@@ -141,7 +139,7 @@ public:
virtual VclAbstractDialog* CreateEditObjectDialog( Window* pParent, USHORT nSlotId,
const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject >& xObj )=0;
virtual SfxAbstractPasteDialog* CreatePasteDialog( Window* pParent )=0;
- virtual SfxAbstractLinksDialog* CreateLinksDialog( Window* pParent, sfx2::SvLinkManager* pMgr, BOOL bHTML=FALSE, sfx2::SvBaseLink* p=0 )=0;
+ virtual SfxAbstractLinksDialog* CreateLinksDialog( Window* pParent, sfx2::LinkManager* pMgr, BOOL bHTML=FALSE, sfx2::SvBaseLink* p=0 )=0;
virtual VclAbstractDialog * CreateSvxScriptOrgDialog( Window* pParent, const String& rLanguage ) = 0;
virtual AbstractScriptSelectorDialog*
diff --git a/sfx2/inc/sfx2/sfxhtml.hxx b/sfx2/inc/sfx2/sfxhtml.hxx
index 270087cf24a9..9b1fcf60efbb 100644
--- a/sfx2/inc/sfx2/sfxhtml.hxx
+++ b/sfx2/inc/sfx2/sfxhtml.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: sfxhtml.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -84,8 +81,6 @@ public:
LanguageType& eNumLang, const String& aValStr,
const String& aNumStr, SvNumberFormatter& rFormatter );
- static rtl_TextEncoding GetEncodingByHttpHeader( SvKeyValueIterator *pHTTPHeader );
-
protected:
// Start eines File-Downloads. Dieser erfolgt synchron oder asynchron.
@@ -124,9 +119,6 @@ protected:
// Default (auch ohne Iterator) ist JavaScript
ScriptType GetScriptType( SvKeyValueIterator* ) const;
const String& GetScriptTypeString( SvKeyValueIterator* ) const;
-
- BOOL SetEncodingByHTTPHeader( SvKeyValueIterator *pHTTPHeader );
-
};
inline BOOL SfxHTMLParser::ParseAreaOptions(ImageMap * pImageMap, const String& rBaseURL,
diff --git a/sfx2/inc/sfx2/sfxmodelfactory.hxx b/sfx2/inc/sfx2/sfxmodelfactory.hxx
index 4b7d29efc95a..416358cb60e2 100644
--- a/sfx2/inc/sfx2/sfxmodelfactory.hxx
+++ b/sfx2/inc/sfx2/sfxmodelfactory.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: sfxmodelfactory.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -43,8 +40,10 @@ namespace sfx2
{
//........................................................................
+ #define SFXMODEL_STANDARD (sal_uInt64)(0x0000)
#define SFXMODEL_EMBEDDED_OBJECT (sal_uInt64)(0x0001)
#define SFXMODEL_DISABLE_EMBEDDED_SCRIPTS (sal_uInt64)(0x0002)
+ #define SFXMODEL_DISABLE_DOCUMENT_RECOVERY (sal_uInt64)(0x0004)
typedef ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > ( SAL_CALL * SfxModelFactoryFunc ) (
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory,
diff --git a/sfx2/inc/sfx2/sfxsids.hrc b/sfx2/inc/sfx2/sfxsids.hrc
index bcbb39c96638..bc4c11b53184 100644
--- a/sfx2/inc/sfx2/sfxsids.hrc
+++ b/sfx2/inc/sfx2/sfxsids.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: sfxsids.hrc,v $
- * $Revision: 1.12.104.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -32,98 +29,30 @@
// include ---------------------------------------------------------------
-#ifndef _SOLAR_HRC
#include <svl/solar.hrc>
-#endif
-
-#define SID_SFX_START 5000
-#define SID_SFX_END 8999
-
-#ifndef _CNTIDS_HRC
#include <sfx2/cntids.hrc>
-#endif
+#include <svl/memberid.hrc>
// Please be careful:
// Changing just one part here doesn't add new
// docking windows automatically!
//
-#define SID_DOCKWIN_START 9800
-#define SID_DOCKWIN_0 9800
-#define SID_DOCKWIN_1 9801
-#define SID_DOCKWIN_2 9802
-#define SID_DOCKWIN_3 9803
-#define SID_DOCKWIN_4 9804
-#define SID_DOCKWIN_5 9805
-#define SID_DOCKWIN_6 9806
-#define SID_DOCKWIN_7 9807
-#define SID_DOCKWIN_8 9808
-#define SID_DOCKWIN_9 9809
-/*
-#define SID_DOCKWIN_10 9810
-#define SID_DOCKWIN_11 9811
-#define SID_DOCKWIN_12 9812
-#define SID_DOCKWIN_13 9813
-#define SID_DOCKWIN_14 9814
-#define SID_DOCKWIN_15 9815
-#define SID_DOCKWIN_16 9816
-#define SID_DOCKWIN_17 9817
-#define SID_DOCKWIN_18 9818
-#define SID_DOCKWIN_19 9819
-#define SID_DOCKWIN_20 9820
-#define SID_DOCKWIN_21 9821
-#define SID_DOCKWIN_22 9822
-#define SID_DOCKWIN_23 9823
-#define SID_DOCKWIN_24 9824
-#define SID_DOCKWIN_25 9825
-#define SID_DOCKWIN_26 9826
-#define SID_DOCKWIN_27 9827
-#define SID_DOCKWIN_28 9828
-#define SID_DOCKWIN_29 9829
-*/
-#define SID_DOCKWIN_END 9999
-
-#define SID_LIB_START 10000
-#define SID_LIB_END 19999
-
-#define SID_APP_START 20000
-#define SID_APP_END 29999
-
-#define SID_SW_START 20000
-#define SID_SW_END 25999
-
-#define SID_SC_START 26000
-#define SID_SC_END 26999
-
-#define SID_SD_START 27000
-#define SID_SD_END 27999
-
-#define SID_Sa_START 28000
-#define SID_Sa_END 28999
-
-#define SID_Sb_START 29000
-#define SID_Sb_END 29999
-
-#define SID_OBJ_START 30000
-#define SID_OBJ0_START (SID_OBJ_START + 0)
-#define SID_OBJ2_START (SID_OBJ_START + 256)
-#define SID_OBJ1_START (SID_OBJ_START + 512)
-#define SID_OBJ3_START (SID_OBJ_START + 768)
-#define SID_OBJ4_START (SID_OBJ_START + 1024)
-#define SID_OBJ5_START (SID_OBJ_START + 1280)
-#define SID_OBJ6_START (SID_OBJ_START + 1536)
-#define SID_OBJ7_START (SID_OBJ_START + 1792)
-#define SID_OBJ_END(nStart) (nStart+255)
-
-#define SID_SIM_START SID_OBJ0_START
-#define SID_SCH_START SID_OBJ1_START
-#define SID_SMA_START SID_OBJ2_START
-#define SID_BASICIDE_START SID_OBJ3_START
+
+#define SID_DOCKWIN_0 SID_DOCKWIN_START
+#define SID_DOCKWIN_1 SID_DOCKWIN_START+1
+#define SID_DOCKWIN_2 SID_DOCKWIN_START+2
+#define SID_DOCKWIN_3 SID_DOCKWIN_START+3
+#define SID_DOCKWIN_4 SID_DOCKWIN_START+4
+#define SID_DOCKWIN_5 SID_DOCKWIN_START+5
+#define SID_DOCKWIN_6 SID_DOCKWIN_START+6
+#define SID_DOCKWIN_7 SID_DOCKWIN_START+7
+#define SID_DOCKWIN_8 SID_DOCKWIN_START+8
+#define SID_DOCKWIN_9 SID_DOCKWIN_START+9
//=========================================================================
#define SID_NONE 0
#define SID_UNKNOWN SID_SFX_START
-#define SID_SUBREQUEST (SID_SFX_START+90)
//-------------------------------------------------------------------------
@@ -153,79 +82,28 @@
#define SID_PRINTER_CHANGESTODOC (SID_SFX_START + 324)
#define SID_PRINTPREVIEW (SID_SFX_START + 325)
-#define SID_MAIL_DATE (SID_SFX_START + 326)
-#define SID_MAIL_FROM (SID_SFX_START + 327)
#define SID_MAIL_SUBJECT (SID_SFX_START + 328)
-#define SID_MAIL_OPEN (SID_SFX_START + 329)
#define SID_MAIL_NOTIFY (SID_SFX_START + 330)
#define SID_MAIL_SENDDOC (SID_SFX_START + 331)
#define SID_MAIL_SENDDOCASPDF (SID_SFX_START + 1672)
-
#define SID_MAIL_RECIPIENT (SID_SFX_START + 334)
#define SID_MAIL_TEXT (SID_SFX_START + 335)
#define SID_MAIL_ATTACH (SID_SFX_START + 336)
#define SID_MAIL_PRIORITY (SID_SFX_START + 337)
-#define SID_MAIL_DELETE (SID_SFX_START + 338)
-#define SID_MAIL_NEW (SID_SFX_START + 339)
-
-#define SID_MAIL_NEWWITHSERVER (SID_SFX_START + 360)
-#define SID_MAIL_REPLY (SID_SFX_START + 361)
-#define SID_MAIL_FOLLOWUP (SID_SFX_START + 362)
-#define SID_MAIL_FORWARD (SID_SFX_START + 363)
-#define SID_MAIL_SEND (SID_SFX_START + 364)
-#define SID_MAIL_FILE (SID_SFX_START + 365)
-#define SID_MAIL_MARKASREAD (SID_SFX_START + 366)
-#define SID_MAIL_MARKASUNREAD (SID_SFX_START + 367)
-#define SID_MAIL_NEXT (SID_SFX_START + 368)
-#define SID_MAIL_PREV (SID_SFX_START + 369)
-#define SID_MAIL_NEXTDELETE (SID_SFX_START + 370)
-#define SID_MAIL_PREVDELETE (SID_SFX_START + 371)
-#define SID_MAIL_OPEN_NEWS (SID_SFX_START + 372)
-#define SID_MAIL_THREAD_MARKASREAD (SID_SFX_START + 373)
-#define SID_MAIL_THREAD_MARKASUNREAD (SID_SFX_START + 374)
+
#define SID_MAIL_ATTACH_FILE (SID_SFX_START + 375)
-#define SID_MAIL_DETACH_FILE (SID_SFX_START + 376)
-#define SID_MAIL_MARK (SID_SFX_START + 377)
-#define SID_MAIL_TXTFORMAT (SID_SFX_START + 378)
-#define SID_MAIL_UPDATETOOLBOX (SID_SFX_START + 379)
-
-#define SID_OPEN_ANCHOR (SID_SFX_START + 380)
-#define SID_MAIL_ADDRESSBOOK (SID_SFX_START + 1644)
-#define SID_MAIL_ALLNEWSGROUPS (SID_SFX_START + 382)
-#define SID_MAIL_GROUPREPLY (SID_SFX_START + 383)
-#define SID_MAIL_SIGNATURE (SID_SFX_START + 384)
-#define SID_MAIL_PREPAREEXPORT (SID_SFX_START + 385)
-#define SID_MAIL_NEXTUNREAD (SID_SFX_START + 386)
-#define SID_MAIL_PREVUNREAD (SID_SFX_START + 387)
+
#define SID_MAIL_EXPORT_FINISHED (SID_SFX_START + 388)
-#define SID_NEWSSERVER_NAME (SID_SFX_START + 389)
-#define SID_NEWS_GROUP_CHANGED (SID_SFX_START + 390)
-#define SID_MAILBROWSER_CTRL (SID_SFX_START + 391)
-#define SID_NEWSGROUP_NAME (SID_SFX_START + 392)
#define SID_WEBHTML (SID_SFX_START + 393)
#define SID_MAIL_SCROLLBODY_PAGEDOWN (SID_SFX_START + 1588)
-#define SID_MAIL_REPLY_FOLLOWUP (SID_SFX_START + 1635)
-#define SID_PHONE_STATUSBAR_CONTROL (SID_SFX_START + 398)
-#define SID_RECOGNIZER_STATUSBAR_CONTROL (SID_SFX_START + 399)
#define SID_PROGRESS_STATUSBAR_CONTROL (SID_SFX_START + 1597)
-#define SID_RESOURCE_WARNING (SID_SFX_START + 333)
-
#define SID_APPLICATION (SID_SFX_START + 340)
#define SID_PROGNAME (SID_SFX_START + 341)
#define SID_PROGFILENAME (SID_SFX_START + 342)
-#define SID_PROGPATH (SID_SFX_START + 343)
-#define SID_INTERACTIVEMODE (SID_SFX_START + 344)
-#define SID_PARENTOBJECT (SID_SFX_START + 345)
#define SID_SELECTION (SID_SFX_START + 346)
-#define SID_CREATOR (SID_SFX_START + 347)
-
-#define SID_COLL_COUNT (SID_SFX_START + 350)
-#define SID_COLL_ITEM (SID_SFX_START + 351)
-#define SID_COLL_REMOVE (SID_SFX_START + 352)
-#define SID_COLL_ADD (SID_SFX_START + 353)
// 360-400 siehe SID_MAIL_...
@@ -277,26 +155,14 @@
#define SID_RELOAD (SID_SFX_START + 508)
#define SID_PRINTDOCDIRECT (SID_SFX_START + 509)
#define SID_PICKLIST (SID_SFX_START + 510)
-#define SID_EDIT_FRAMESET (SID_SFX_START + 646)
-#define SID_SPLIT_HORIZONTAL (SID_SFX_START + 647)
-#define SID_SPLIT_VERTICAL (SID_SFX_START + 648)
-#define SID_SPLIT_PARENT_HORIZONTAL (SID_SFX_START + 649)
-#define SID_SPLIT_PARENT_VERTICAL (SID_SFX_START + 650)
-#define SID_MODIFY_FRAME (SID_SFX_START + 651)
-#define SID_DELETE_FRAME (SID_SFX_START + 652)
-#define SID_FRAME_NAME (SID_SFX_START + 825)
-#define SID_FRAME_CONTENT (SID_SFX_START + 826)
#define SID_PLUGIN_MODE (SID_SFX_START + 827)
-#define SID_LOCKBYTES_FACTORY (SID_SFX_START + 828)
#define SID_EXPORTDOC (SID_SFX_START + 829)
#define SID_EXPORTDOCASPDF (SID_SFX_START + 1673)
#define SID_DIRECTEXPORTDOCASPDF (SID_SFX_START + 1674)
#define SID_UPDATEDOCMODE (SID_SFX_START + 1668)
-#define SID_NOCACHE (SID_SFX_START + 653)
#define SID_FORCERELOAD (SID_SFX_START + 1502)
#define SID_FILE_DIALOG (SID_SFX_START + 304)
-#define SID_GRAFIC_DIALOG (SID_SFX_START + 305)
#define SID_PATH (SID_SFX_START + 308)
#define SID_SAVEDOCS (SID_SFX_START + 309)
#define SID_STANDARD_DIR (SID_SFX_START + 450)
@@ -305,88 +171,20 @@
// browse-ids
#define SID_BROWSE_FORWARD (SID_SFX_START + 1300)
#define SID_BROWSE_BACKWARD (SID_SFX_START + 1301)
-#define SID_BROWSE_STOP (SID_SFX_START + 1302)
#define SID_BROWSE_HOME (SID_SFX_START + 1303)
-#define SID_AUTOBROWSE (SID_SFX_START + 1304)
-#define SID_AUTOMAIL (SID_SFX_START + 1305)
-#define SID_BROWSING (SID_SFX_START + 1306)
-#define SID_ADDR_BOOK (SID_SFX_START + 1307)
-#define SID_EXPLORER (SID_SFX_START + 1308)
#define SID_CREATELINK (SID_SFX_START + 1309)
#define SID_BOOKMARK_TITLE (SID_SFX_START + 1310)
#define SID_BOOKMARK_URL (SID_SFX_START + 1311)
#define SID_EDITDOC (SID_SFX_START + 1312)
#define SID_BROWSER_MODE (SID_SFX_START + 1313)
#define SID_PLUGINS_ACTIVE (SID_SFX_START + 1314)
-#define SID_SAVEDOCTOBOOKMARK (SID_SFX_START + 1315)
-#define SID_CLEARMEMCACHE (SID_SFX_START + 1316)
#define SID_BROWSER (SID_SFX_START + 1318)
#define SID_MACROEXECMODE (SID_SFX_START + 1319)
-#define SID_EXPLORERCONTENT_OPEN (SID_SFX_START + 1322)
-#define SID_EXPLORERCONTENT_OPEN_DOCUMENT (SID_SFX_START + 1321)
-#define SID_EXPLORERCONTENT_OPEN_TEMPLATE (SID_SFX_START + 1362)
-#define SID_EXPLORERCONTENT_OPEN_FOLDER (SID_SFX_START + 1542)
-#define SID_EXPLORERCONTENT_OPEN_OBJECT (SID_SFX_START + 1543)
-#define SID_EXPLORERCONTENT_NEW (SID_SFX_START + 1323)
-#define SID_EXPLORERCONTENT_DESTROY (SID_SFX_START + 1324)
-#define SID_EXPLORERCONTENT_MAKEROOT (SID_SFX_START + 1325)
-#define SID_EXPLORERCONTENT_RENAME (SID_SFX_START + 1326)
-#define SID_EXPLORERCONTENT_COPY (SID_SFX_START + 1327)
-#define SID_EXPLORERCONTENT_PASTE (SID_SFX_START + 1328)
-#define SID_EXPLORERCONTENT_CREATELINK (SID_SFX_START + 1329)
-#define SID_EXPLORERCONTENT_DEFAULTTEMPLATE (SID_SFX_START + 1330)
-#define SID_EXPLORER_CREATEFOLDER (SID_SFX_START + 1331)
-#define SID_EXPLORER_CREATEBOOKMARK (SID_SFX_START + 1332)
-#define SID_EXPLORER_CREATEWORKPLACE (SID_SFX_START + 1333)
-#define SID_EXPLORER_CREATELINK (SID_SFX_START + 1334)
-#define SID_EXPLORER_CREATEMAILINTRAY (SID_SFX_START + 1335)
-#define SID_EXPLORER_CREATENEWSSERVER (SID_SFX_START + 1336)
-#define SID_EXPLORER_CREATEFTPSERVER (SID_SFX_START + 1337)
-#define SID_EXPLORER_CREATEDATABASE (SID_SFX_START + 1338)
-#define SID_EXPLORER_CREATEGALLERY (SID_SFX_START + 1339)
-#define SID_PROPERTIES (SID_SFX_START + 1350)
-#define SID_EXPLORER_MAKEROOT (SID_SFX_START + 1351)
-#define SID_EXPLORER_MAKEBMKDIR (SID_SFX_START + 1352)
-#define SID_EXPLORER_PREVLEVEL (SID_SFX_START + 1353)
-#define SID_EXPLORER_IMPORTBOOKMARKS (SID_SFX_START + 1354)
-#define SID_EXPLORER_SEARCHORIGINAL (SID_SFX_START + 1355)
-#define SID_EXPLORER_DETAILS (SID_SFX_START + 1356)
-#define SID_EXPLORER_ICONS (SID_SFX_START + 1357)
-#define SID_VIEWTYPE_DETAILS (SID_SFX_START + 1358)
-#define SID_EXPLORER_MSGROUP_FSYS (SID_SFX_START + 1359)
-#define SID_EXPLORER_MSGROUP_NEWSARTICLE (SID_SFX_START + 1360)
-#define SID_EXPLORER_MSGROUP_NEWSGROUP (SID_SFX_START + 1361)
-#define SID_EXPLORER_RESETURL (SID_SFX_START + 1520)
-
-#define SID_EXPLORER_DOCINFO (SID_SFX_START + 1363)
-#define SID_EXPLORER_PREVIEW (SID_SFX_START + 1364)
-#define SID_EXPLORER_MSGROUP_FTPFILE (SID_SFX_START + 1365)
-#define SID_SEARCHORIGINAL (SID_SFX_START + 1366)
-#define SID_EXPLORER_MSGROUP_MAILS (SID_SFX_START + 1367)
-#define SID_EXPLORER_MSGROUP_CHAOS (SID_SFX_START + 1368)
// die Id steht mit diesem Wert in chaos/cntids.hrc!!
//#define SID_INTERNET_ONLINE (SID_SFX_START + 1370)
-#define SID_INTERNET_UPDATE (SID_SFX_START + 1371)
-#define SID_INTERNET_1 (SID_SFX_START + 1372)
-#define SID_INTERNET_2 (SID_SFX_START + 1373)
-#define SID_INTERNET_3 (SID_SFX_START + 1374)
-
#define SID_FILTER_DATA (SID_SFX_START + 1375)
-#define SID_EXPLORER_SEARCH_DLG (SID_SFX_START + 1380)
-#define SID_EXPLORER_MULTIQUICKSEARCH (SID_SFX_START + 1522)
-#define SID_EXPLORER_SHOWEXTENSION (SID_SFX_START + 1594)
-#define SID_EXPLORER_MAIL_HEADER (SID_SFX_START + 1595)
-#define SID_EXPLORER_MAIL_BODY (SID_SFX_START + 1596)
-
-#define SID_TABPAGE (SID_SFX_START + 1383)
-//#define SID_EXPLORER_CREATESEARCHFOLDER (SID_SFX_START + 1384)
-#define SID_EMPTY_TRASH (SID_SFX_START + 1385)
-#define SID_AFTEROPENEVENT (SID_SFX_START + 1386)
-#define SID_QUERYICON (SID_SFX_START + 1387)
-#define SID_SYNCEXPLORER (SID_SFX_START + 1388)
-#define SID_EXPLORER_PASTE_ASLINK (SID_SFX_START + 1389)
#define SID_EXPLORER_FILEPROPS_START (SID_SFX_START + 1390)
#define SID_EXPLORER_FILEPROPS_END (SID_SFX_START + 1399)
@@ -394,73 +192,22 @@
#define ID_FILETP_START SID_EXPLORER_FILEPROPS_START
#define ID_FILETP_READONLY (ID_FILETP_START + 0)
#define ID_FILETP_TITLE (ID_FILETP_START + 1)
-#define ID_FILETP_SIZE (ID_FILETP_START + 2)
-#define ID_FILETP_TYPE (ID_FILETP_START + 3)
-#define ID_FILETP_PATH (ID_FILETP_START + 4)
-#define ID_FILETP_CREATED (ID_FILETP_START + 5)
-#define ID_FILETP_CHANGED (ID_FILETP_START + 6)
-#define ID_FILETP_EDIT (ID_FILETP_START + 7)
-#define ID_FILETP_IMAGE (ID_FILETP_START + 8)
-#define ID_FILETP_LINK (ID_FILETP_START + 9)
-#define ID_FILETP_END (ID_FILETP_START + 9)
-
-#define SID_NEWFRAMESET (SID_SFX_START + 1400)
#define SID_EXPLORER_PROPS_START (SID_SFX_START + 1410)
#define SID_EXPLORER_PROPS_END (SID_SFX_START + 1499)
-
-
-#define SID_TRASH_RECOVER (SID_SFX_START + 1502)
-#define SID_TRASH_AUTOEMPTY (SID_SFX_START + 1503)
-#define SID_TRASH_EMPTY (SID_SFX_START + 1504)
-#define SID_EXPLORER_BOOKMARKDIR (SID_SFX_START + 1505)
-#define SID_EXPLORER_SEARCHORIG (SID_SFX_START + 1506)
-#define SID_FRAMESPACING (SID_SFX_START + 1507)
-#define SID_LATEINIT_DONE (SID_SFX_START + 1508)
#define SID_AUTOLOAD (SID_SFX_START + 1509)
-#define SID_FRAMECOUNT (SID_SFX_START + 1510)
-#define SID_ISTOP (SID_SFX_START + 1511)
-#define SID_VIEW (SID_SFX_START + 1512)
-#define SID_ORIG_PROPERTIES (SID_SFX_START + 1513)
-#define SID_MAIL_NOTIFY_RESET (SID_SFX_START + 1514)
#define SID_FILLFRAME (SID_SFX_START + 1516)
-#define SID_LOAD_LIBRARY (SID_SFX_START + 1517)
#define SID_BASEURL (SID_SFX_START + 1518)
#define SID_TEMPLATE (SID_SFX_START + 1519)
-#define SID_UNLOAD_LIBRARY (SID_SFX_START + 1523)
-#define SID_ADD_LIBRARY (SID_SFX_START + 1524)
-#define SID_REMOVE_LIBRARY (SID_SFX_START + 1525)
-#define SID_CLASSNAME (SID_SFX_START + 1526)
-#define SID_INTERCEPTOR (SID_SFX_START + 1527)
-#define SID_TARGETPATH (SID_SFX_START + 1528)
-
-#define SID_START (SID_SFX_START + 1529)
-#define SID_STOP (SID_SFX_START + 1530)
-#define SID_VALUE (SID_SFX_START + 1531)
-#define SID_SUSPEND (SID_SFX_START + 1532)
-#define SID_RESUME (SID_SFX_START + 1533)
-#define SID_LOCKALL (SID_SFX_START + 1534)
-#define SID_WAITPOINTER (SID_SFX_START + 1535)
-
#define SID_ONLINE_REGISTRATION (SID_SFX_START + 1537)
#define SID_ONLINE_REGISTRATION_DLG (SID_SFX_START + 1540)
#define SID_CONTENTTYPE (SID_SFX_START + 1541)
-#define SID_DOC_IGNOREINFORMATIONLOST (SID_SFX_START + 1544)
-#define SID_EXPLORER_SELECTIONSIZE (SID_SFX_START + 1545)
#define SID_SAVETO (SID_SFX_START + 1546)
-#define SID_ADJUSTICONS (SID_SFX_START + 1547)
-#define SID_AUTO_ADJUSTICONS (SID_SFX_START + 1548)
-#define SID_ICONGRID (SID_SFX_START + 1549)
-#define SID_BINDING (SID_SFX_START + 1550)
-
-#define SID_ISCHILDFRAMELOAD (SID_SFX_START + 1552)
-#define SID_PARENTFRAME (SID_SFX_START + 1554)
-
#define SID_CREATE_BASICOBJECT (SID_SFX_START + 1555)
#define SID_DELETE_BASICOBJECT (SID_SFX_START + 1556)
@@ -469,27 +216,11 @@
#define SID_UPDATE_VERSION (SID_SFX_START + 1568)
#define SID_BUILD_VERSION (SID_SFX_START + 1569)
-#define SID_INSERT_TASKFRAME (SID_SFX_START + 1572)
-#define SID_TASK (SID_SFX_START + 1573)
-#define SID_ACTIVETASK (SID_SFX_START + 1574)
-#define SID_EXPLORER_ISDESKTOP (SID_SFX_START + 1576)
-
-#define SID_CHAOSDOC_LAYOUT1 (SID_SFX_START + 1578)
-#define SID_CHAOSDOC_LAYOUT2 (SID_SFX_START + 1579)
-#define SID_CHAOSDOC_LAYOUT3 (SID_SFX_START + 1580)
-#define SID_CHAOSDOC_LAYOUT4 (SID_SFX_START + 1581)
-
#define SID_VERSION (SID_SFX_START + 1583)
-#define SID_UNO (SID_SFX_START + 1584)
#define SID_DOCUMENT_COMPARE (SID_SFX_START + 1586)
#define SID_DOCUMENT_MERGE (SID_SFX_START + 1587)
-#define SID_EXECUTE (SID_SFX_START + 1593)
-#define SID_OWNS_FRAME (SID_SFX_START + 1598)
-
-#define SID_OFFICE_VERSION_ID (SID_SFX_START + 1599)
-#define SID_USE_FILTEROPTIONS (SID_SFX_START + 1600)
#define SID_OFFICE_PLK (SID_SFX_START + 1601)
#define SID_OFFICE_PALK (SID_SFX_START + 1604)
#define SID_CHECK_KEY (SID_SFX_START + 1605)
@@ -522,7 +253,7 @@
#define SID_LOGOUT (SID_SFX_START + 1652)
#define SID_JUMPMARK (SID_SFX_START + 1654)
#define SID_BROWSE (SID_SFX_START + 1658)
-#define SID_BACKTOWEBTOP (SID_SFX_START + 1657)
+ // FREE (was: SID_BACKTOWEBTOP)
#define SID_SEGMENTSIZE (SID_SFX_START + 1659)
#define SID_VIEW_DATA_SOURCE_BROWSER (SID_SFX_START + 1660)
#define SID_TOGGLE_MENUBAR (SID_SFX_START + 1661)
@@ -579,10 +310,10 @@
#define SID_SFX_free_END (SID_SFX_START + 3999)
#define SID_OPEN_NEW_VIEW (SID_SFX_START + 520)
-#define SID_VIEW_ZOOM_MODE (SID_SFX_START + 521)
-#define SID_VIEW_POS_SIZE (SID_SFX_START + 522)
+ // FREE, was SID_VIEW_ZOOM_MODE
+ // FREE, was SID_VIEW_POS_SIZE
#define SID_VIEW_ID (SID_SFX_START + 523)
-#define SID_USER_DATA (SID_SFX_START + 524)
+ // FREE, was SID_USER_DATA
#define SID_VIEW_DATA (SID_SFX_START + 1582)
#define SID_SILENT (SID_SFX_START + 528)
#define SID_HIDDEN (SID_SFX_START + 534)
@@ -733,7 +464,7 @@
#define SID_WIN_MINIMIZED (SID_SFX_START + 625)
#define SID_WIN_MAXIMIZED (SID_SFX_START + 626)
#define SID_WIN_FULLSCREEN (SID_SFX_START + 627)
-#define SID_WIN_POSSIZE (SID_SFX_START + 628)
+ // FREE, was SID_WIN_POSSIZE
#define SID_WIN_VISIBLE (SID_SFX_START + 629)
#define SID_VIEWSHELL0 (SID_SFX_START + 630)
@@ -994,19 +725,6 @@
#define SID_SFXNODES_ATTACHLIST (SID_SFXNODES_START + 41)
#define SID_SFXNODES_END SID_SFXNODES_ATTACHLIST
-#define SID_OPTIONS_START (SID_LIB_START + 2000)
-#define SID_OPTIONS_FIRSTFREE 99
-#define SID_OPTIONS_END (SID_OPTIONS_START + 100)
-
-#define SID_SBA_START (SID_LIB_START + 2101)
-#define SID_SBA_END (SID_SBA_START + 149)
-
-#define SID_DBACCESS_START (SID_LIB_START + 2251)
-#define SID_DBACCESS_END (SID_DBACCESS_START + 200)
-
-#define SID_RPTUI_START (SID_LIB_START + 2452)
-#define SID_RPTUI_END (SID_RPTUI_START + 197)
-
// SaveTabPage
#define SID_ATTR_DOCINFO (SID_OPTIONS_START + 0)
#define SID_ATTR_BACKUP (SID_OPTIONS_START + 1)
@@ -1015,7 +733,7 @@
#define SID_ATTR_AUTOSAVEMINUTE (SID_OPTIONS_START + 5)
#define SID_ATTR_WORKINGSET (SID_OPTIONS_START + 13)
#define SID_ATTR_UNDO_COUNT (SID_OPTIONS_START + 16)
-#define SID_ATTR_SAVEDOCWINS (SID_OPTIONS_START + 17)
+ // unused
#define SID_ATTR_SAVEDOCVIEW (SID_OPTIONS_START + 18)
// GeneralTabPage
@@ -1132,30 +850,6 @@
// slot IDs from SVX (svxids.hrc) ---------------------------------------------
-#define SID_SVX_START (SID_LIB_START + 0)
-
-#define SID_ATTR_CHAR (SID_SVX_START + 6)
-#define SID_ATTR_CHAR_FONT (SID_SVX_START + 7)
-#define SID_ATTR_CHAR_POSTURE (SID_SVX_START + 8)
-#define SID_ATTR_CHAR_WEIGHT (SID_SVX_START + 9)
-#define SID_ATTR_CHAR_SHADOWED (SID_SVX_START + 10)
-#define SID_ATTR_CHAR_WORDLINEMODE (SID_SVX_START + 11)
-#define SID_ATTR_CHAR_CONTOUR (SID_SVX_START + 12)
-#define SID_ATTR_CHAR_STRIKEOUT (SID_SVX_START + 13)
-#define SID_ATTR_CHAR_UNDERLINE (SID_SVX_START + 14)
-#define SID_ATTR_CHAR_FONTHEIGHT (SID_SVX_START + 15)
-#define SID_ATTR_CHAR_PROPSIZE (SID_SVX_START + 16)
-#define SID_ATTR_CHAR_COLOR (SID_SVX_START + 17)
-#define SID_ATTR_CHAR_KERNING (SID_SVX_START + 18)
-#define SID_ATTR_CHAR_CASEMAP (SID_SVX_START + 19)
-#define SID_ATTR_CHAR_LANGUAGE (SID_SVX_START + 20)
-#define SID_ATTR_CHAR_ESCAPEMENT (SID_SVX_START + 21)
-#define SID_ATTR_CHAR_FONTLIST (SID_SVX_START + 22)
-// Temp-Id f"ur FontMapType
-#define SID_ATTR_CHAR_MAPTYPE (SID_SVX_START + 64)
-// zusaetzlich f"ur die Ext-Zeichen-TabPage
-#define SID_ATTR_CHAR_AUTOKERN (SID_SVX_START + 67)
-#define SID_ATTR_CHAR_OVERLINE (SID_SVX_START + 68)
#define SID_ZOOM_TOOLBOX (SID_SVX_START + 96)
#define SID_ZOOM_OUT (SID_SVX_START + 97)
#define SID_ZOOM_IN (SID_SVX_START + 98)
@@ -1290,30 +984,6 @@
#define SID_ATTR_CHAR_FILLCOLOR (SID_SFX_START + 1551)
-#define MID_SEARCH_STYLEFAMILY 1
-#define MID_SEARCH_CELLTYPE 2
-#define MID_SEARCH_ROWDIRECTION 3
-#define MID_SEARCH_ALLTABLES 4
-#define MID_SEARCH_BACKWARD 5
-#define MID_SEARCH_PATTERN 6
-#define MID_SEARCH_CONTENT 7
-#define MID_SEARCH_ASIANOPTIONS 8
-#define MID_SEARCH_ALGORITHMTYPE 9
-#define MID_SEARCH_FLAGS 10
-#define MID_SEARCH_SEARCHSTRING 11
-#define MID_SEARCH_REPLACESTRING 12
-#define MID_SEARCH_LOCALE 13
-#define MID_SEARCH_CHANGEDCHARS 14
-#define MID_SEARCH_DELETEDCHARS 15
-#define MID_SEARCH_INSERTEDCHARS 16
-#define MID_SEARCH_TRANSLITERATEFLAGS 17
-#define MID_SEARCH_COMMAND 18
-
-// SvxSizeItem
-#define MID_SIZE_SIZE 0
-#define MID_SIZE_WIDTH 1
-#define MID_SIZE_HEIGHT 2
-
// SfxScriptOrganizerItem
#define MID_SCRIPT_ORGANIZER_LANGUAGE 1 // Don't use zero for MID's. It's forbidden to do it!
diff --git a/sfx2/inc/sfx2/sfxstatuslistener.hxx b/sfx2/inc/sfx2/sfxstatuslistener.hxx
index 735cc3c88562..e24db0ac577a 100644
--- a/sfx2/inc/sfx2/sfxstatuslistener.hxx
+++ b/sfx2/inc/sfx2/sfxstatuslistener.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: sfxstatuslistener.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/sfx2/inc/sfx2/sfxuno.hxx b/sfx2/inc/sfx2/sfxuno.hxx
index 030ea636a695..fb331889a573 100644
--- a/sfx2/inc/sfx2/sfxuno.hxx
+++ b/sfx2/inc/sfx2/sfxuno.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: sfxuno.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/sfx2/inc/sfx2/shell.hxx b/sfx2/inc/sfx2/shell.hxx
index f7fac480dccd..314c16fdbf1f 100644
--- a/sfx2/inc/sfx2/shell.hxx
+++ b/sfx2/inc/sfx2/shell.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: shell.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -89,7 +86,6 @@ enum SfxInterfaceId
SFX_INTERFACE_NONE,
SFX_INTERFACE_SFXAPP,
SFX_INTERFACE_SFXDOCSH,
- SFX_INTERFACE_SFXTOPFRM,
SFX_INTERFACE_SFXIPFRM,
SFX_INTERFACE_SFXVIEWSH,
SFX_INTERFACE_SFXVIEWFRM,
diff --git a/sfx2/inc/sfx2/signaturestate.hxx b/sfx2/inc/sfx2/signaturestate.hxx
index be035ef25818..bea01c6e283a 100644
--- a/sfx2/inc/sfx2/signaturestate.hxx
+++ b/sfx2/inc/sfx2/signaturestate.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: signaturestate.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/sfx2/inc/sfx2/srchdefs.hxx b/sfx2/inc/sfx2/srchdefs.hxx
deleted file mode 100644
index 385ad1c87582..000000000000
--- a/sfx2/inc/sfx2/srchdefs.hxx
+++ /dev/null
@@ -1,52 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: srchdefs.hxx,v $
- * $Revision: 1.3 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _SFX_SRCHDEFS_HXX_
-#define _SFX_SRCHDEFS_HXX_
-
-
-#define SEARCH_OPTIONS_SEARCH ((sal_uInt16)0x0001)
-#define SEARCH_OPTIONS_SEARCH_ALL ((sal_uInt16)0x0002)
-#define SEARCH_OPTIONS_REPLACE ((sal_uInt16)0x0004)
-#define SEARCH_OPTIONS_REPLACE_ALL ((sal_uInt16)0x0008)
-#define SEARCH_OPTIONS_WHOLE_WORDS ((sal_uInt16)0x0010)
-#define SEARCH_OPTIONS_BACKWARDS ((sal_uInt16)0x0020)
-#define SEARCH_OPTIONS_REG_EXP ((sal_uInt16)0x0040)
-#define SEARCH_OPTIONS_EXACT ((sal_uInt16)0x0080)
-#define SEARCH_OPTIONS_SELECTION ((sal_uInt16)0x0100)
-#define SEARCH_OPTIONS_FAMILIES ((sal_uInt16)0x0200)
-#define SEARCH_OPTIONS_FORMAT ((sal_uInt16)0x0400)
-#define SEARCH_OPTIONS_MORE ((sal_uInt16)0x0800)
-#define SEARCH_OPTIONS_SIMILARITY ((sal_uInt16)0x1000)
-#define SEARCH_OPTIONS_CONTENT ((sal_uInt16)0x2000)
-
-
-#endif
-
diff --git a/sfx2/inc/sfx2/srchitem.hxx b/sfx2/inc/sfx2/srchitem.hxx
deleted file mode 100644
index 594d12cf05b5..000000000000
--- a/sfx2/inc/sfx2/srchitem.hxx
+++ /dev/null
@@ -1,306 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: srchitem.hxx,v $
- * $Revision: 1.4 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#ifndef _SFX_SRCHITEM_HXX
-#define _SFX_SRCHITEM_HXX
-
-#include "sal/config.h"
-#include "sfx2/dllapi.h"
-#include <com/sun/star/util/XSearchDescriptor.hpp>
-#include <com/sun/star/util/SearchOptions.hpp>
-#include <com/sun/star/util/SearchFlags.hpp>
-#include <com/sun/star/i18n/TransliterationModules.hpp>
-#include <unotools/configitem.hxx>
-#include <rsc/rscsfx.hxx>
-#include <tools/string.hxx>
-#include <svl/poolitem.hxx>
-#include <sfx2/msg.hxx>
-#include <sfx2/srchdefs.hxx>
-
-// defines ---------------------------------------------------------------
-
-// Kommandos
-#define SVX_SEARCHCMD_FIND ((sal_uInt16)0)
-#define SVX_SEARCHCMD_FIND_ALL ((sal_uInt16)1)
-#define SVX_SEARCHCMD_REPLACE ((sal_uInt16)2)
-#define SVX_SEARCHCMD_REPLACE_ALL ((sal_uInt16)3)
-
-// Suche in (fuer Calc)
-#define SVX_SEARCHIN_FORMULA ((sal_uInt16)0)
-#define SVX_SEARCHIN_VALUE ((sal_uInt16)1)
-#define SVX_SEARCHIN_NOTE ((sal_uInt16)2)
-
-// Applicationsflag
-#define SVX_SEARCHAPP_WRITER ((sal_uInt16)0)
-#define SVX_SEARCHAPP_CALC ((sal_uInt16)1)
-#define SVX_SEARCHAPP_DRAW ((sal_uInt16)2)
-#define SVX_SEARCHAPP_BASE ((sal_uInt16)3)
-
-// class SvxSearchItem ---------------------------------------------------
-
-//#ifdef ITEMID_SEARCH
-
-/* [Beschreibung]
-
- In diesem Item werden alle Such-Attribute gespeichert.
-*/
-class SFX2_DLLPUBLIC SvxSearchItem :
- public SfxPoolItem,
- public utl::ConfigItem
-{
- com::sun::star::util::SearchOptions aSearchOpt;
-
- SfxStyleFamily eFamily; // Vorlagen-Familie
-
- sal_uInt16 nCommand; // Kommando (Suchen, Alle Suchen, Ersetzen, Alle Ersetzen)
-
- // Calc-Spezifische Daten
- sal_uInt16 nCellType; // Suche in Formeln/Werten/Notizen
- sal_uInt16 nAppFlag; // Fuer welche Applikation ist der Dialog ueberhaupt
- sal_Bool bRowDirection; // Suchrichtung Zeilenweise/Spaltenweise
- sal_Bool bAllTables; // in alle Tabellen suchen
-
- // Writer-spezifisch
- sal_Bool bNotes;
-
- sal_Bool bBackward; // Suche Rueckwaerts
- sal_Bool bPattern; // Suche nach Vorlagen
- sal_Bool bContent; // Suche im Inhalt
- sal_Bool bAsianOptions; // use asian options?
-
-public:
- TYPEINFO();
-
- SvxSearchItem( const sal_uInt16 nId /*= ITEMID_SEARCH*/ );
- SvxSearchItem( const SvxSearchItem& rItem );
- virtual ~SvxSearchItem();
-
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
- virtual int operator == ( const SfxPoolItem& ) const;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
- SfxMapUnit eCoreMetric,
- SfxMapUnit ePresMetric,
- String &rText, const IntlWrapper * = 0 ) const;
-
- // ConfigItem
- virtual void Notify( const com::sun::star::uno::Sequence< rtl::OUString > &rPropertyNames );
- virtual void Commit();
-
- sal_uInt16 GetCommand() const { return nCommand; }
- void SetCommand(sal_uInt16 nNewCommand) { nCommand = nNewCommand; }
-
- inline const String GetSearchString() const;
- inline void SetSearchString(const String& rNewString);
-
- inline const String GetReplaceString() const;
- inline void SetReplaceString(const String& rNewString);
-
- inline sal_Bool GetWordOnly() const;
- void SetWordOnly(sal_Bool bNewWordOnly);
-
- inline sal_Bool GetExact() const;
- void SetExact(sal_Bool bNewExact);
-
- sal_Bool GetBackward() const { return bBackward; }
- void SetBackward(sal_Bool bNewBackward) { bBackward = bNewBackward; }
-
- inline sal_Bool GetSelection() const;
- void SetSelection(sal_Bool bNewSelection);
-
- inline sal_Bool GetRegExp() const;
- void SetRegExp( sal_Bool bVal );
-
- sal_Bool GetPattern() const { return bPattern; }
- void SetPattern(sal_Bool bNewPattern) { bPattern = bNewPattern; }
-
- sal_Bool IsContent() const { return bContent; }
- void SetContent( sal_Bool bNew ) { bContent = bNew; }
-
- SfxStyleFamily GetFamily() const { return eFamily; }
- void SetFamily( SfxStyleFamily eNewFamily )
- { eFamily = eNewFamily; }
-
- sal_Bool GetRowDirection() const { return bRowDirection; }
- void SetRowDirection(sal_Bool bNewRowDirection) { bRowDirection = bNewRowDirection; }
-
- sal_Bool IsAllTables() const { return bAllTables; }
- void SetAllTables(sal_Bool bNew) { bAllTables = bNew; }
-
- sal_uInt16 GetCellType() const { return nCellType; }
- void SetCellType(sal_uInt16 nNewCellType) { nCellType = nNewCellType; }
-
- sal_Bool GetNotes() const { return bNotes; }
- void SetNotes(sal_Bool bNew) { bNotes = bNew; }
-
- sal_uInt16 GetAppFlag() const { return nAppFlag; }
- void SetAppFlag(sal_uInt16 nNewAppFlag) { nAppFlag = nNewAppFlag; }
-
- inline sal_Bool IsLevenshtein() const;
- void SetLevenshtein( sal_Bool bVal );
-
- inline sal_Bool IsLEVRelaxed() const;
- void SetLEVRelaxed(sal_Bool bSet);
-
- inline sal_uInt16 GetLEVOther() const;
- inline void SetLEVOther(sal_uInt16 nSet);
-
- inline sal_uInt16 GetLEVShorter() const;
- inline void SetLEVShorter(sal_uInt16 nSet);
-
- inline sal_uInt16 GetLEVLonger() const;
- inline void SetLEVLonger(sal_uInt16 nSet);
-
- void GetFromDescriptor( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XSearchDescriptor > & rDescr );
- void SetToDescriptor( ::com::sun::star::uno::Reference< ::com::sun::star::util::XSearchDescriptor > & rDescr );
-
- inline const com::sun::star::util::SearchOptions &
- GetSearchOptions() const;
- inline void SetSearchOptions( const com::sun::star::util::SearchOptions &rOpt );
-
- inline sal_Int32 GetTransliterationFlags() const;
- void SetTransliterationFlags( sal_Int32 nFlags );
-
- inline sal_Bool IsMatchFullHalfWidthForms() const;
- void SetMatchFullHalfWidthForms( sal_Bool bVal );
-
- inline sal_Bool IsUseAsianOptions() const { return bAsianOptions; }
- inline void SetUseAsianOptions( sal_Bool bVal ) { bAsianOptions = bVal; }
-};
-
-const String SvxSearchItem::GetSearchString() const
-{
- return aSearchOpt.searchString;
-}
-
-void SvxSearchItem::SetSearchString(const String& rNewString)
-{
- aSearchOpt.searchString = rNewString;
-}
-
-const String SvxSearchItem::GetReplaceString() const
-{
- return aSearchOpt.replaceString;
-}
-
-void SvxSearchItem::SetReplaceString(const String& rNewString)
-{
- aSearchOpt.replaceString = rNewString;
-}
-
-sal_Bool SvxSearchItem::GetWordOnly() const
-{
- return 0 != (aSearchOpt.searchFlag &
- com::sun::star::util::SearchFlags::NORM_WORD_ONLY);
-}
-
-sal_Bool SvxSearchItem::GetExact() const
-{
- return 0 == (aSearchOpt.transliterateFlags &
- com::sun::star::i18n::TransliterationModules_IGNORE_CASE);
-}
-
-sal_Bool SvxSearchItem::GetSelection() const
-{
- return 0 != (aSearchOpt.searchFlag &
- com::sun::star::util::SearchFlags::REG_NOT_BEGINOFLINE);
-}
-
-sal_Bool SvxSearchItem::GetRegExp() const
-{
- return aSearchOpt.algorithmType == com::sun::star::util::SearchAlgorithms_REGEXP ;
-}
-
-sal_Bool SvxSearchItem::IsLEVRelaxed() const
-{
- return 0 != (aSearchOpt.searchFlag &
- com::sun::star::util::SearchFlags::LEV_RELAXED);
-}
-
-sal_uInt16 SvxSearchItem::GetLEVOther() const
-{
- return (INT16) aSearchOpt.changedChars;
-}
-
-void SvxSearchItem::SetLEVOther( sal_uInt16 nVal )
-{
- aSearchOpt.changedChars = nVal;
-}
-
-sal_uInt16 SvxSearchItem::GetLEVShorter() const
-{
- return (INT16) aSearchOpt.insertedChars;
-}
-
-void SvxSearchItem::SetLEVShorter( sal_uInt16 nVal )
-{
- aSearchOpt.insertedChars = nVal;
-}
-
-sal_uInt16 SvxSearchItem::GetLEVLonger() const
-{
- return (INT16) aSearchOpt.deletedChars;
-}
-
-void SvxSearchItem::SetLEVLonger( sal_uInt16 nVal )
-{
- aSearchOpt.deletedChars = nVal;
-}
-
-sal_Bool SvxSearchItem::IsLevenshtein() const
-{
- return aSearchOpt.algorithmType == com::sun::star::util::SearchAlgorithms_APPROXIMATE;
-}
-
-const com::sun::star::util::SearchOptions & SvxSearchItem::GetSearchOptions() const
-{
- return aSearchOpt;
-}
-
-void SvxSearchItem::SetSearchOptions( const com::sun::star::util::SearchOptions &rOpt )
-{
- aSearchOpt = rOpt;
-}
-
-sal_Int32 SvxSearchItem::GetTransliterationFlags() const
-{
- return aSearchOpt.transliterateFlags;
-}
-
-sal_Bool SvxSearchItem::IsMatchFullHalfWidthForms() const
-{
- return 0 != (aSearchOpt.transliterateFlags &
- com::sun::star::i18n::TransliterationModules_IGNORE_WIDTH);
-}
-
-#endif
-
-//#endif
-
diff --git a/sfx2/inc/sfx2/styfitem.hxx b/sfx2/inc/sfx2/styfitem.hxx
index f90df9d3b469..76be875d6d70 100644
--- a/sfx2/inc/sfx2/styfitem.hxx
+++ b/sfx2/inc/sfx2/styfitem.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: styfitem.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/sfx2/inc/sfx2/styledlg.hxx b/sfx2/inc/sfx2/styledlg.hxx
index 1e4e83fef15f..9e2ffdadac4d 100644
--- a/sfx2/inc/sfx2/styledlg.hxx
+++ b/sfx2/inc/sfx2/styledlg.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: styledlg.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/sfx2/inc/sfx2/tabdlg.hxx b/sfx2/inc/sfx2/tabdlg.hxx
index d2fae3e9f534..cedc8f256010 100644
--- a/sfx2/inc/sfx2/tabdlg.hxx
+++ b/sfx2/inc/sfx2/tabdlg.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: tabdlg.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -248,8 +245,8 @@ namespace sfx { class ItemConnectionBase; }
class SFX2_DLLPUBLIC SfxTabPage: public TabPage
{
friend class SfxTabDialog;
- #if ENABLE_LAYOUT
- friend class layout::SfxTabDialog;
+ #if ENABLE_LAYOUT
+ friend class layout::SfxTabDialog;
#endif
private:
diff --git a/sfx2/inc/sfx2/tbxctrl.hxx b/sfx2/inc/sfx2/tbxctrl.hxx
index 1905242791a0..d618051e4063 100644
--- a/sfx2/inc/sfx2/tbxctrl.hxx
+++ b/sfx2/inc/sfx2/tbxctrl.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: tbxctrl.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/sfx2/inc/sfx2/templdlg.hxx b/sfx2/inc/sfx2/templdlg.hxx
index 64c2e3b5d6ef..3602f200e2a9 100644
--- a/sfx2/inc/sfx2/templdlg.hxx
+++ b/sfx2/inc/sfx2/templdlg.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: templdlg.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/sfx2/inc/sfx2/topfrm.hxx b/sfx2/inc/sfx2/topfrm.hxx
deleted file mode 100644
index 657312f3a6b7..000000000000
--- a/sfx2/inc/sfx2/topfrm.hxx
+++ /dev/null
@@ -1,125 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: topfrm.hxx,v $
- * $Revision: 1.4 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#ifndef _SFX_TOPFRM_HXX
-#define _SFX_TOPFRM_HXX
-
-#include "sal/config.h"
-#include "sfx2/dllapi.h"
-#include "sal/types.h"
-#include <com/sun/star/uno/Reference.h>
-#include <vcl/dockwin.hxx>
-#include <vcl/wrkwin.hxx>
-
-#include <sfx2/frame.hxx>
-#include <sfx2/viewfrm.hxx>
-
-class SfxViewShell;
-class SfxTopFrame;
-class SfxTopFrame_Impl;
-namespace svtools { class AsynchronLink; }
-
-// class SfxTopFrame -----------------------------------------------------
-
-class SFX2_DLLPUBLIC SfxTopFrame : public SfxFrame
-{
-friend class SfxTopWindow_Impl;
-friend class SfxTopFrameWindow_Impl;
-friend class SfxTopFrame_Impl;
-
- SfxTopFrame_Impl* pImp;
- Window* pWindow;
- SAL_DLLPRIVATE SfxTopFrame( Window* pWindow=NULL, sal_Bool bHidden = sal_False );
- SAL_DLLPRIVATE virtual ~SfxTopFrame();
-public:
- TYPEINFO();
-
- static SfxTopFrame* Create( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xFrame );
- static SfxTopFrame* Create( SfxObjectShell* pDoc=0, USHORT nViewId=0, BOOL bHidden=sal_False, const SfxItemSet* pSet=NULL );
- static SfxTopFrame* Create( SfxObjectShell* pDoc, Window* pWindow, USHORT nViewId=0, BOOL bHidden=sal_False, const SfxItemSet* pSet=NULL );
-
- virtual Window& GetWindow() const;
- virtual BOOL Close();
- virtual BOOL InsertDocument( SfxObjectShell *pDoc );
- String GetWindowData();
-
- void SetPresentationMode( BOOL bSet );
- SystemWindow* GetSystemWindow() const;
-
-//#if 0 // _SOLAR__PRIVATE
- SAL_DLLPRIVATE void LockResize_Impl( BOOL bLock );
- SAL_DLLPRIVATE void SetMenuBarOn_Impl( BOOL bOn );
- SAL_DLLPRIVATE BOOL IsMenuBarOn_Impl() const;
- SAL_DLLPRIVATE BOOL InsertDocument_Impl( SfxObjectShell *pDoc, USHORT nViewId=0 );
- SAL_DLLPRIVATE SystemWindow* GetTopWindow_Impl() const;
- SAL_DLLPRIVATE void CheckMenuCloser_Impl( MenuBar* pMenubar );
-//#endif
-};
-
-// class SfxTopViewFrame -------------------------------------------------
-
-class SfxTopViewFrame_Impl;
-class SFX2_DLLPUBLIC SfxTopViewFrame : public SfxViewFrame
-{
-friend class SfxTopWindow_Impl;
-friend class SfxTopViewFrame_Impl;
-
- SfxTopViewFrame_Impl* pImp;
- svtools::AsynchronLink* pCloser;
-
-protected:
-
- virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
- virtual void Activate( BOOL bUI );
- virtual void Deactivate( BOOL bUI );
- virtual BOOL Close();
- virtual ~SfxTopViewFrame();
-
-public:
- TYPEINFO();
- SFX_DECL_INTERFACE(SFX_INTERFACE_SFXTOPFRM)
-
- SfxTopViewFrame( SfxFrame* pFrame, SfxObjectShell *pDoc=NULL, USHORT nViewId=0 );
-
- virtual void SetZoomFactor( const Fraction &rZoomX, const Fraction &rZoomY );
- SAL_DLLPRIVATE virtual BOOL SetBorderPixelImpl( const SfxViewShell *pSh, const SvBorder &rBorder );
- virtual String UpdateTitle();
-
-//#if 0 // _SOLAR__PRIVATE
- SAL_DLLPRIVATE void Exec_Impl(SfxRequest &);
- SAL_DLLPRIVATE void GetState_Impl(SfxItemSet &);
- SAL_DLLPRIVATE void INetExecute_Impl(SfxRequest &);
- SAL_DLLPRIVATE void INetState_Impl(SfxItemSet &);
- SAL_DLLPRIVATE SfxTopFrame* GetTopFrame_Impl()
- { return (SfxTopFrame*) GetFrame(); }
-//#endif
-};
-
-#endif // #ifndef _SFX_TOPFRM_HXX
-
diff --git a/sfx2/inc/sfx2/unoctitm.hxx b/sfx2/inc/sfx2/unoctitm.hxx
index 470a3b486e67..f30a544922b5 100644
--- a/sfx2/inc/sfx2/unoctitm.hxx
+++ b/sfx2/inc/sfx2/unoctitm.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: unoctitm.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/sfx2/inc/sfx2/userinputinterception.hxx b/sfx2/inc/sfx2/userinputinterception.hxx
index 4f0be53bdb73..16504af6331e 100644
--- a/sfx2/inc/sfx2/userinputinterception.hxx
+++ b/sfx2/inc/sfx2/userinputinterception.hxx
@@ -1,31 +1,29 @@
/*************************************************************************
-* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-*
-* Copyright 2008 by Sun Microsystems, Inc.
-*
-* OpenOffice.org - a multi-platform office productivity suite
-*
-* $RCSfile: userinputinterception.hxx,v $
-*
-* $Revision: 1.2 $
-*
-* 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.
-************************************************************************/
+ *
+ * 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 USERINPUTINTERCEPTION_HXX
#define USERINPUTINTERCEPTION_HXX
diff --git a/sfx2/inc/sfx2/viewfrm.hxx b/sfx2/inc/sfx2/viewfrm.hxx
index 396a948a03cc..8350bc5f0f9d 100644
--- a/sfx2/inc/sfx2/viewfrm.hxx
+++ b/sfx2/inc/sfx2/viewfrm.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: viewfrm.hxx,v $
- * $Revision: 1.5.46.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -41,6 +38,7 @@
#include <svl/poolitem.hxx>
#include <com/sun/star/frame/status/Verb.hpp>
#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/frame/XController2.hpp>
class SfxMacro;
class SvBorder;
@@ -51,7 +49,6 @@ class SfxProgress;
class SvData;
class SfxViewShell;
class SvPseudoObject;
-class SfxCancelManager;
class SystemWindow;
class Fraction;
class Point;
@@ -62,6 +59,10 @@ namespace sfx2
{
class SvLinkSource;
}
+namespace svtools
+{
+ class AsynchronLink;
+}
#ifndef SFX_DECL_OBJECTSHELL_DEFINED
#define SFX_DECL_OBJECTSHELL_DEFINED
@@ -130,6 +131,7 @@ Rectangle & operator += ( Rectangle & rRect, const SvBorder & rBorder );
Rectangle & operator -= ( Rectangle & rRect, const SvBorder & rBorder );
+DBG_NAMEEX(SfxViewFrame)
class SFX2_DLLPUBLIC SfxViewFrame: public SfxShell, public SfxListener
{
struct SfxViewFrame_Impl* pImp;
@@ -147,39 +149,32 @@ private:
protected:
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
- SAL_DLLPRIVATE void SetWindow_Impl( Window *pWin );
-
#ifndef _SFX_HXX
- SAL_DLLPRIVATE BOOL SwitchToViewShell_Impl( USHORT nNo, BOOL bIsIndex = FALSE );
SAL_DLLPRIVATE void KillDispatcher_Impl();
#endif
virtual ~SfxViewFrame();
public:
+ SfxViewFrame( SfxFrame& rFrame, SfxObjectShell *pDoc = NULL );
+
TYPEINFO();
SFX_DECL_INTERFACE(SFX_INTERFACE_SFXVIEWFRM)
- SfxViewFrame( SfxBindings&, SfxFrame*, SfxObjectShell *pDoc=0, sal_uInt32 nType = 0 );
- SfxViewFrame(SfxObjectShell&, SfxBindings&, SfxFrame*p=0, sal_uInt32 nType = 0);
- SfxViewFrame(
- const SfxViewFrame &, SfxBindings &, SfxFrame *pFrame);
-
- static SfxViewFrame* SearchViewFrame( SfxViewFrame*, const String& );
static void SetViewFrame( SfxViewFrame* );
- static SfxViewFrame* CreateViewFrame( SfxObjectShell& rDoc,
- USHORT nViewId=0,
- BOOL bHidden=FALSE );
+
+ static SfxViewFrame* LoadHiddenDocument( SfxObjectShell& i_rDoc, const USHORT i_nViewId );
+ static SfxViewFrame* LoadDocument( SfxObjectShell& i_rDoc, const USHORT i_nViewId );
+ static SfxViewFrame* LoadDocumentIntoFrame( SfxObjectShell& i_rDoc, const SfxFrameItem* i_pFrameItem, const USHORT i_nViewId = 0 );
+ static SfxViewFrame* LoadDocumentIntoFrame( SfxObjectShell& i_rDoc, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rFrameItem, const USHORT i_nViewId = 0 );
+ static SfxViewFrame* DisplayNewDocument( SfxObjectShell& i_rDoc, const SfxRequest& i_rCreateDocRequest, const USHORT i_nViewId = 0 );
static SfxViewFrame* Current();
- static SfxViewFrame* GetFirst( const SfxObjectShell* pDoc = 0,
- TypeId aType = 0,
- BOOL bOnlyVisible = TRUE );
- static SfxViewFrame* GetNext( const SfxViewFrame& rPrev,
- const SfxObjectShell* pDoc = 0,
- TypeId aType = 0 ,
- BOOL bOnlyVisible = TRUE );
- static USHORT Count(TypeId = 0);
+ static SfxViewFrame* GetFirst( const SfxObjectShell* pDoc = 0, BOOL bOnlyVisible = TRUE );
+ static SfxViewFrame* GetNext( const SfxViewFrame& rPrev, const SfxObjectShell* pDoc = 0, BOOL bOnlyVisible = TRUE );
+ static USHORT Count();
+
+ static SfxViewFrame* Get( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController>& i_rController, const SfxObjectShell* i_pDoc = NULL );
void DoActivate(BOOL bMDI, SfxViewFrame *pOld=NULL);
void DoDeactivate(BOOL bMDI, SfxViewFrame *pOld=NULL);
@@ -191,8 +186,7 @@ public:
SfxBindings& GetBindings() { return *pBindings; }
const SfxBindings& GetBindings() const { return *pBindings; }
Window& GetWindow() const;
- virtual void SetZoomFactor( const Fraction &rZoomX,
- const Fraction &rZoomY ) = 0;
+ virtual void SetZoomFactor( const Fraction &rZoomX, const Fraction &rZoomY );
SfxProgress* GetProgress() const;
#ifdef ENABLE_INIMANAGER//MUSTINI
@@ -216,6 +210,8 @@ public:
void ToTop();
void Enable( BOOL bEnable );
virtual BOOL Close();
+ virtual void Activate( BOOL bUI );
+ virtual void Deactivate( BOOL bUI );
// DDE-Interface
virtual long DdeExecute( const String& rCmd );
@@ -227,10 +223,10 @@ public:
const ::com::sun::star::uno::Any & rValue );
virtual ::sfx2::SvLinkSource* DdeCreateLinkSource( const String& rItem );
- virtual void ShowStatusText( const String& rText );
- virtual void HideStatusText();
+ void ShowStatusText( const String& rText );
+ void HideStatusText();
- virtual String UpdateTitle();
+ String UpdateTitle();
// interne Handler
SAL_DLLPRIVATE virtual BOOL SetBorderPixelImpl( const SfxViewShell *pSh, const SvBorder &rBorder );
@@ -239,21 +235,18 @@ public:
virtual SfxObjectShell* GetObjectShell();
USHORT GetCurViewId() const;
- SfxFrame* GetFrame() const;
+ SfxFrame& GetFrame() const;
SfxViewFrame* GetTopViewFrame() const;
BOOL DoClose();
ULONG GetFrameType() const
- { return GetFrame()->GetFrameType(); }
- SfxFrame* GetTopFrame() const
- { return GetFrame()->GetTopFrame(); }
- SfxFrame* SearchFrame( const String& rName, SfxMedium* pMedium = 0)
- { return GetFrame()->SearchFrame( rName, pMedium ); }
+ { return GetFrame().GetFrameType(); }
+ SfxFrame& GetTopFrame() const
+ { return GetFrame().GetTopFrame(); }
void GetTargetList( TargetList& rList ) const
- { GetFrame()->GetTargetList( rList ); }
+ { GetFrame().GetTargetList( rList ); }
void CancelTransfers()
- { GetFrame()->CancelTransfers(); }
- SfxCancelManager* GetCancelManager() const;
+ { GetFrame().CancelTransfers(); }
void SetModalMode( BOOL );
BOOL IsInModalMode() const;
@@ -270,19 +263,11 @@ public:
void ChildWindowState(SfxItemSet&);
//#if 0 // _SOLAR__PRIVATE
- SAL_DLLPRIVATE SfxMacro* GetRecordingMacro_Impl();
- SAL_DLLPRIVATE void SetFrame_Impl( SfxFrame* );
SAL_DLLPRIVATE void SetDowning_Impl();
SAL_DLLPRIVATE void GetDocNumber_Impl();
SAL_DLLPRIVATE BOOL IsDowning_Impl() const;
- SAL_DLLPRIVATE void SetSetViewFrameAllowed_Impl( BOOL bSet );
- SAL_DLLPRIVATE BOOL IsSetViewFrameAllowed_Impl() const;
- SAL_DLLPRIVATE void SetImportingObjectShell_Impl( SfxObjectShell* pSH );
- SAL_DLLPRIVATE SfxObjectShell* GetImportingObjectShell_Impl( ) const;
SAL_DLLPRIVATE void SetViewShell_Impl( SfxViewShell *pVSh );
- SAL_DLLPRIVATE void SetObjectShell_Impl( SfxObjectShell& rObjSh ,
- FASTBOOL bDefaultView = FALSE );
- SAL_DLLPRIVATE void ReleaseObjectShell_Impl( BOOL bStoreView = FALSE );
+ SAL_DLLPRIVATE void ReleaseObjectShell_Impl();
SAL_DLLPRIVATE void GetState_Impl( SfxItemSet &rSet );
SAL_DLLPRIVATE void ExecReload_Impl( SfxRequest &rReq );
@@ -290,10 +275,8 @@ public:
SAL_DLLPRIVATE void StateReload_Impl( SfxItemSet &rSet );
SAL_DLLPRIVATE void ExecView_Impl( SfxRequest &rReq );
SAL_DLLPRIVATE void StateView_Impl( SfxItemSet &rSet );
- SAL_DLLPRIVATE void PropState_Impl( SfxItemSet &rSet );
SAL_DLLPRIVATE void ExecHistory_Impl( SfxRequest &rReq );
SAL_DLLPRIVATE void StateHistory_Impl( SfxItemSet &rSet );
- SAL_DLLPRIVATE void SetParentViewFrame_Impl(SfxViewFrame *pParentFrame);
SAL_DLLPRIVATE SfxViewFrame* GetParentViewFrame_Impl() const;
SAL_DLLPRIVATE void ForceOuterResize_Impl(BOOL bOn=TRUE);
SAL_DLLPRIVATE BOOL IsResizeInToOut_Impl() const;
@@ -304,25 +287,75 @@ public:
SAL_DLLPRIVATE void LockObjectShell_Impl(BOOL bLock=TRUE);
- SAL_DLLPRIVATE SfxViewShell* CreateView_Impl( USHORT nViewId );
SAL_DLLPRIVATE void MakeActive_Impl( BOOL bActivate );
SAL_DLLPRIVATE void SetQuietMode_Impl( BOOL );
SAL_DLLPRIVATE const Size& GetMargin_Impl() const;
- SAL_DLLPRIVATE void SetMargin_Impl( const Size& );
SAL_DLLPRIVATE void SetActiveChildFrame_Impl( SfxViewFrame* );
SAL_DLLPRIVATE SfxViewFrame* GetActiveChildFrame_Impl() const;
- SAL_DLLPRIVATE BOOL IsRestoreView_Impl() const;
- SAL_DLLPRIVATE void SetRestoreView_Impl( BOOL );
- SAL_DLLPRIVATE void SetViewData_Impl( USHORT, const String& );
- SAL_DLLPRIVATE String& GetViewData_Impl();
SAL_DLLPRIVATE String GetActualPresentationURL_Impl() const;
SAL_DLLPRIVATE static void CloseHiddenFrames_Impl();
SAL_DLLPRIVATE void MiscExec_Impl(SfxRequest &);
SAL_DLLPRIVATE void MiscState_Impl(SfxItemSet &);
SAL_DLLPRIVATE SfxWorkWindow* GetWorkWindow_Impl( USHORT nId );
SAL_DLLPRIVATE void AddDispatchMacroToBasic_Impl(const ::rtl::OUString& sMacro);
- SAL_DLLPRIVATE BOOL ClearEventFlag_Impl();
+
+ SAL_DLLPRIVATE void Exec_Impl(SfxRequest &);
+ SAL_DLLPRIVATE void INetExecute_Impl(SfxRequest &);
+ SAL_DLLPRIVATE void INetState_Impl(SfxItemSet &);
+
+ SAL_DLLPRIVATE void SetCurViewId_Impl( const USHORT i_nID );
+
//#endif
+private:
+ SAL_DLLPRIVATE BOOL SwitchToViewShell_Impl( USHORT nNo, BOOL bIsIndex = FALSE );
+ SAL_DLLPRIVATE void PopShellAndSubShells_Impl( SfxViewShell& i_rViewShell );
+
+ /** loads the given existing document into the given frame
+
+ This is done using the XComponentLoader interface of the frame, so the SFX document loader is invoked.
+
+ @param i_rDoc
+ the document to load
+ @param i_rFrame
+ the frame to load the document into
+ @param i_rLoadArgs
+ the arguments to pass to the component loader. If this sequence is empty, then the current arguments of the
+ model will be obtained, and passed to the loader. This ensures that any arguments in the model will be preserved,
+ instead of being reset.
+ @param i_nViewId
+ the ID of the view to create
+ @throws Exception
+ if something goes wrong. The caller is responsible for handling this.
+ */
+ SAL_DLLPRIVATE static SfxViewShell* LoadViewIntoFrame_Impl(
+ const SfxObjectShell& i_rDoc,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rFrame,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& i_rLoadArgs,
+ const USHORT i_nViewId,
+ const bool i_bHidden
+ );
+
+ /** loads the given existing document into the given frame
+
+ This is done using the XComponentLoader interface of the frame, so the SFX document loader is invoked.
+
+ If no frame is given, a blank top level frame is created.
+
+ If anything fails during the process, as much as possible is cleaned up.
+
+ @param i_rDoc
+ the document to load
+ @param i_rFrame
+ the frame to load the document into. Might be <NULL/>, in which case a new frame is created.
+ @param i_nViewId
+ the ID of the view to create
+ */
+ SAL_DLLPRIVATE static SfxViewFrame* LoadViewIntoFrame_Impl_NoThrow(
+ const SfxObjectShell& i_rDoc,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rFrame,
+ const USHORT i_nViewId,
+ const bool i_bHidden
+ );
};
//--------------------------------------------------------------------
diff --git a/sfx2/inc/sfx2/viewsh.hxx b/sfx2/inc/sfx2/viewsh.hxx
index e3a5ae5adb8e..0109bbbf602d 100644
--- a/sfx2/inc/sfx2/viewsh.hxx
+++ b/sfx2/inc/sfx2/viewsh.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: viewsh.hxx,v $
- * $Revision: 1.5.46.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -99,24 +96,12 @@ enum SfxScrollingMode
// @[SfxViewShell-Flags]
-#define SFX_VIEW_MAXIMIZE_FIRST 0x0001 /* die erste View wird maximiert
- dargestellt */
-#define SFX_VIEW_OPTIMIZE_EACH 0x0002 /* jede View wird in optimaler
- Gr"o\se dargestellt */
-#define SFX_VIEW_DISABLE_ACCELS 0x0004 /* die Acceleratoren werden
- disabled, solange diese
- View den Focus hat */
-#define SFX_VIEW_OBJECTSIZE_EMBEDDED 0x0008 /* Views von embedded Objekten
- werden in optimaler Gr"o\se
- dargestellt */
#define SFX_VIEW_HAS_PRINTOPTIONS 0x0010 /* Options-Button und Options-
Dialog im PrintDialog */
#define SFX_VIEW_CAN_PRINT 0x0020 /* enabled Printing ohne Printer
erzeugen zu m"ussen */
#define SFX_VIEW_NO_SHOW 0x0040 /* Window der ViewShell darf nicht
automatisch geshowed werden */
-#define SFX_VIEW_IMPLEMENTED_AS_FRAMESET 0x0080 /* Das Dokument ist als
- Frameset implementiert*/
#define SFX_VIEW_NO_NEWWINDOW 0x0100 /* keine weitere View erlauben */
/* [Beschreibung]
@@ -162,11 +147,7 @@ class SFX2_DLLPUBLIC SfxViewShell: public SfxShell, public SfxListener
{
#ifdef _SFXVIEWSH_HXX
friend class SfxViewFrame;
-friend class SfxTopViewFrame;
friend class SfxPlugInFrame;
-friend class SfxInternalFrame;
-friend class SfxExternalTopViewFrame_Impl;
-friend class SfxOfficeDocController;
friend class SfxBaseController;
#endif
@@ -175,8 +156,6 @@ friend class SfxBaseController;
SfxViewFrame* pFrame;
SfxShell* pSubShell;
Window* pWindow;
- BOOL bMaximizeFirst;
- BOOL bOptimizeEach;
BOOL bNoNewWindow;
protected:
@@ -200,6 +179,8 @@ public:
const TypeId* pType = 0, BOOL bOnlyVisible = TRUE );
static SfxViewShell* Current();
+ static SfxViewShell* Get( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController>& i_rController );
+
// Ctoren/Dtoren Initialisierung
TYPEINFO();
SFX_DECL_INTERFACE(SFX_INTERFACE_SFXVIEWSH)
@@ -227,9 +208,6 @@ public:
void VisAreaChanged(const Rectangle& rRect);
// Verhaltens-Flags
- BOOL IsMaximizeFirst() const { return bMaximizeFirst; }
- BOOL IsOptimizeEach() const { return bOptimizeEach; }
- HACK(inline) BOOL UseObjectSize() const;
SfxScrollingMode GetScrollingMode() const;
void SetScrollingMode( SfxScrollingMode eMode );
@@ -322,7 +300,6 @@ public:
SAL_DLLPRIVATE void AddContextMenuInterceptor_Impl( const ::com::sun::star::uno::Reference < ::com::sun::star::ui::XContextMenuInterceptor >& xInterceptor );
SAL_DLLPRIVATE void RemoveContextMenuInterceptor_Impl( const ::com::sun::star::uno::Reference < ::com::sun::star::ui::XContextMenuInterceptor >& xInterceptor );
SAL_DLLPRIVATE FASTBOOL GlobalKeyInput_Impl( const KeyEvent &rKeyEvent );
- SAL_DLLPRIVATE BOOL IsImplementedAsFrameset_Impl() const;
SAL_DLLPRIVATE void NewIPClient_Impl( SfxInPlaceClient *pIPClient )
{ GetIPClientList_Impl(TRUE)->Insert(pIPClient); }
@@ -340,6 +317,8 @@ public:
SAL_DLLPRIVATE BOOL HasKeyListeners_Impl();
SAL_DLLPRIVATE BOOL HasMouseClickListeners_Impl();
+ SAL_DLLPRIVATE SfxBaseController* GetBaseController_Impl() const;
+
// Shell Interface
SAL_DLLPRIVATE void ExecPrint_Impl(SfxRequest &);
SAL_DLLPRIVATE void ExecMisc_Impl(SfxRequest &);
@@ -348,11 +327,11 @@ public:
SAL_DLLPRIVATE void SetFrameSet_Impl(SfxFrameSetDescriptor*);
SAL_DLLPRIVATE void CheckIPClient_Impl( SfxInPlaceClient*, const Rectangle& );
SAL_DLLPRIVATE void PushSubShells_Impl( BOOL bPush=TRUE );
+ SAL_DLLPRIVATE void PopSubShells_Impl() { PushSubShells_Impl( FALSE ); }
SAL_DLLPRIVATE void TakeOwnerShip_Impl();
SAL_DLLPRIVATE void CheckOwnerShip_Impl();
SAL_DLLPRIVATE void TakeFrameOwnerShip_Impl();
SAL_DLLPRIVATE BOOL ExecKey_Impl(const KeyEvent& aKey);
-
#endif
};
diff --git a/sfx2/inc/sfxbasic.hxx b/sfx2/inc/sfxbasic.hxx
index 5dbf729c9326..ff5f097500a5 100644
--- a/sfx2/inc/sfxbasic.hxx
+++ b/sfx2/inc/sfxbasic.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: sfxbasic.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/sfx2/inc/sfxhelp.hxx b/sfx2/inc/sfxhelp.hxx
index ce0921c23a23..60ad04b2e9ab 100644
--- a/sfx2/inc/sfxhelp.hxx
+++ b/sfx2/inc/sfxhelp.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: sfxhelp.hxx,v $
- * $Revision: 1.21 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -50,6 +47,7 @@ class SFX2_DLLPUBLIC SfxHelp : public Help
private:
SAL_DLLPRIVATE virtual BOOL Start( ULONG nHelpId, const Window* pWindow );
SAL_DLLPRIVATE virtual BOOL Start( const String& rURL, const Window* pWindow );
+ SAL_DLLPRIVATE virtual void OpenHelpAgent( ULONG nHelpId );
SAL_DLLPRIVATE String GetHelpModuleName_Impl();
SAL_DLLPRIVATE String CreateHelpURL_Impl( ULONG nHelpId, const String& rModuleName );
diff --git a/sfx2/inc/sfxresid.hxx b/sfx2/inc/sfxresid.hxx
index 63835281153d..ceea5452a0d5 100644
--- a/sfx2/inc/sfxresid.hxx
+++ b/sfx2/inc/sfxresid.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: sfxresid.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/sfx2/inc/sorgitm.hxx b/sfx2/inc/sorgitm.hxx
index 53953c8db3ee..18056e26b730 100644
--- a/sfx2/inc/sorgitm.hxx
+++ b/sfx2/inc/sorgitm.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: sorgitm.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/sfx2/inc/srchdlg.hxx b/sfx2/inc/srchdlg.hxx
index edb6cc0d9b05..e45d8f591342 100644
--- a/sfx2/inc/srchdlg.hxx
+++ b/sfx2/inc/srchdlg.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: srchdlg.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/sfx2/inc/stbitem.hxx b/sfx2/inc/stbitem.hxx
index 6d1b7cce6bc5..977ba869750d 100644
--- a/sfx2/inc/stbitem.hxx
+++ b/sfx2/inc/stbitem.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: stbitem.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/sfx2/inc/tplpitem.hxx b/sfx2/inc/tplpitem.hxx
index d50298b59716..38198e0ff7ee 100644
--- a/sfx2/inc/tplpitem.hxx
+++ b/sfx2/inc/tplpitem.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: tplpitem.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/sfx2/inc/viewfac.hxx b/sfx2/inc/viewfac.hxx
index 24b4a860f0b0..6f9ae1d3cb37 100644
--- a/sfx2/inc/viewfac.hxx
+++ b/sfx2/inc/viewfac.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: viewfac.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -59,6 +56,9 @@ public:
{ return String( aDescription ); }
USHORT GetOrdinal() const { return nOrd; }
+ /// returns an API-compatible view name. For the moment, this is "view" with an appended ordinal/ID
+ String GetViewName() const;
+
private:
SfxViewCtor fnCreate;
SfxViewInit fnInit;
diff --git a/sfx2/prj/build.lst b/sfx2/prj/build.lst
index 89e618e8fc12..3e791fbc2000 100644
--- a/sfx2/prj/build.lst
+++ b/sfx2/prj/build.lst
@@ -21,3 +21,4 @@ sf sfx2\source\toolbox nmake - all sf_tbox sf_sdi sf_inc NULL
sf sfx2\source\inet nmake - all sf_inet sf_sdi sf_inc NULL
sf sfx2\source\explorer nmake - all sf_expl sf_sdi sf_inc NULL
sf sfx2\util nmake - all sf_util sf_appl sf_bast sf_cnfg sf_ctrl sf_dlg sf_doc sf_expl sf_inet sf_menu sf_layout sf_noti sf_sbar sf_tbox sf_view NULL
+sf sfx2\qa\unoapi nmake - all sf_qa_unoapi NULL
diff --git a/sfx2/prj/d.lst b/sfx2/prj/d.lst
index fe71b1715769..0748aa19cd65 100644
--- a/sfx2/prj/d.lst
+++ b/sfx2/prj/d.lst
@@ -22,112 +22,25 @@ mkdir: %_DEST%\inc%_EXT%\sfx2
..\%COMMON_OUTDIR%\srs\sfxslots_srs.hid %COMMON_DEST%\res%_EXT%\sfxslots_srs.hid
..\util\sfx.xml %_DEST%\xml%_EXT%\sfx.xml
..\%__SRC%\misc\sfx2.csv %_DEST%\inc%_EXT%\sfx2.csv
-..\inc\sfx2\dllapi.h %_DEST%\inc%_EXT%\sfx2\dllapi.h
+
+..\inc\sfx2\*.h %_DEST%\inc%_EXT%\sfx2\*.h
+..\inc\sfx2\*.hxx %_DEST%\inc%_EXT%\sfx2\*.hxx
+..\inc\sfx2\*.hrc %_DEST%\inc%_EXT%\sfx2\*.hrc
..\sdi\sfx.sdi %_DEST%\inc%_EXT%\sfx2\sfx.sdi
..\sdi\sfxitems.sdi %_DEST%\inc%_EXT%\sfx2\sfxitems.sdi
-..\inc\sfx2\app.hxx %_DEST%\inc%_EXT%\sfx2\app.hxx
-..\inc\sfx2\basedlgs.hxx %_DEST%\inc%_EXT%\sfx2\basedlgs.hxx
-..\inc\sfx2\bindings.hxx %_DEST%\inc%_EXT%\sfx2\bindings.hxx
..\inc\brokenpackageint.hxx %_DEST%\inc%_EXT%\sfx2\brokenpackageint.hxx
-..\inc\sfx2\chalign.hxx %_DEST%\inc%_EXT%\sfx2\chalign.hxx
-..\inc\sfx2\childwin.hxx %_DEST%\inc%_EXT%\sfx2\childwin.hxx
-..\inc\sfx2\ctrlitem.hxx %_DEST%\inc%_EXT%\sfx2\ctrlitem.hxx
-..\inc\sfx2\dispatch.hxx %_DEST%\inc%_EXT%\sfx2\dispatch.hxx
-..\inc\sfx2\dinfdlg.hxx %_DEST%\inc%_EXT%\sfx2\dinfdlg.hxx
..\inc\dinfedt.hxx %_DEST%\inc%_EXT%\sfx2\dinfedt.hxx
-..\inc\sfx2\docinf.hxx %_DEST%\inc%_EXT%\sfx2\docinf.hxx
-..\inc\sfx2\docfac.hxx %_DEST%\inc%_EXT%\sfx2\docfac.hxx
-..\inc\sfx2\docfile.hxx %_DEST%\inc%_EXT%\sfx2\docfile.hxx
-..\inc\sfx2\docfilt.hxx %_DEST%\inc%_EXT%\sfx2\docfilt.hxx
-..\inc\sfx2\dockwin.hxx %_DEST%\inc%_EXT%\sfx2\dockwin.hxx
-..\inc\sfx2\doctempl.hxx %_DEST%\inc%_EXT%\sfx2\doctempl.hxx
-..\inc\sfx2\doctdlg.hxx %_DEST%\inc%_EXT%\sfx2\doctdlg.hxx
-..\inc\sfx2\event.hxx %_DEST%\inc%_EXT%\sfx2\event.hxx
-..\inc\sfx2\evntconf.hxx %_DEST%\inc%_EXT%\sfx2\evntconf.hxx
-..\inc\sfx2\filedlghelper.hxx %_DEST%\inc%_EXT%\sfx2\filedlghelper.hxx
-..\inc\sfx2\fcontnr.hxx %_DEST%\inc%_EXT%\sfx2\fcontnr.hxx
-..\inc\sfx2\frame.hxx %_DEST%\inc%_EXT%\sfx2\frame.hxx
-..\inc\sfx2\frmdescr.hxx %_DEST%\inc%_EXT%\sfx2\frmdescr.hxx
-..\inc\sfx2\frmhtml.hxx %_DEST%\inc%_EXT%\sfx2\frmhtml.hxx
-..\inc\sfx2\frmhtmlw.hxx %_DEST%\inc%_EXT%\sfx2\frmhtmlw.hxx
-..\inc\sfx2\genlink.hxx %_DEST%\inc%_EXT%\sfx2\genlink.hxx
-..\inc\sfx2\hintpost.hxx %_DEST%\inc%_EXT%\sfx2\hintpost.hxx
..\inc\imgmgr.hxx %_DEST%\inc%_EXT%\sfx2\imgmgr.hxx
-..\inc\sfx2\imgdef.hxx %_DEST%\inc%_EXT%\sfx2\imgdef.hxx
-..\inc\sfx2\ipclient.hxx %_DEST%\inc%_EXT%\sfx2\ipclient.hxx
-..\inc\sfx2\macrconf.hxx %_DEST%\inc%_EXT%\sfx2\macrconf.hxx
-..\inc\sfx2\topfrm.hxx %_DEST%\inc%_EXT%\sfx2\topfrm.hxx
-..\inc\sfx2\mgetempl.hxx %_DEST%\inc%_EXT%\sfx2\mgetempl.hxx
..\inc\mieclip.hxx %_DEST%\inc%_EXT%\sfx2\mieclip.hxx
-..\inc\sfx2\minarray.hxx %_DEST%\inc%_EXT%\sfx2\minarray.hxx
..\inc\minfitem.hxx %_DEST%\inc%_EXT%\sfx2\minfitem.hxx
-..\inc\sfx2\minstack.hxx %_DEST%\inc%_EXT%\sfx2\minstack.hxx
-..\inc\sfx2\mnuitem.hxx %_DEST%\inc%_EXT%\sfx2\mnuitem.hxx
-..\inc\sfx2\module.hxx %_DEST%\inc%_EXT%\sfx2\module.hxx
-..\inc\sfx2\msg.hxx %_DEST%\inc%_EXT%\sfx2\msg.hxx
-..\inc\sfx2\mnumgr.hxx %_DEST%\inc%_EXT%\sfx2\mnumgr.hxx
-..\inc\sfx2\newstyle.hxx %_DEST%\inc%_EXT%\sfx2\newstyle.hxx
-..\inc\sfx2\new.hxx %_DEST%\inc%_EXT%\sfx2\new.hxx
-..\inc\sfx2\navigat.hxx %_DEST%\inc%_EXT%\sfx2\navigat.hxx
-..\inc\sfx2\msgpool.hxx %_DEST%\inc%_EXT%\sfx2\msgpool.hxx
-..\inc\sfx2\passwd.hxx %_DEST%\inc%_EXT%\sfx2\passwd.hxx
-..\inc\sfx2\prnmon.hxx %_DEST%\inc%_EXT%\sfx2\prnmon.hxx
-..\inc\sfx2\objface.hxx %_DEST%\inc%_EXT%\sfx2\objface.hxx
-..\inc\sfx2\objitem.hxx %_DEST%\inc%_EXT%\sfx2\objitem.hxx
-..\inc\sfx2\signaturestate.hxx %_DEST%\inc%_EXT%\sfx2\signaturestate.hxx
-..\inc\sfx2\docmacromode.hxx %_DEST%\inc%_EXT%\sfx2\docmacromode.hxx
-..\inc\sfx2\userinputinterception.hxx %_DEST%\inc%_EXT%\sfx2\userinputinterception.hxx
-..\inc\sfx2\docstoragemodifylistener.hxx %_DEST%\inc%_EXT%\sfx2\docstoragemodifylistener.hxx
-..\inc\sfx2\sfxmodelfactory.hxx %_DEST%\inc%_EXT%\sfx2\sfxmodelfactory.hxx
-..\inc\sfx2\objsh.hxx %_DEST%\inc%_EXT%\sfx2\objsh.hxx
-..\inc\sfx2\printer.hxx %_DEST%\inc%_EXT%\sfx2\printer.hxx
-..\inc\sfx2\printopt.hxx %_DEST%\inc%_EXT%\sfx2\printopt.hxx
-..\inc\sfx2\progress.hxx %_DEST%\inc%_EXT%\sfx2\progress.hxx
-..\inc\sfx2\request.hxx %_DEST%\inc%_EXT%\sfx2\request.hxx
-..\inc\sfx2\sfx.hrc %_DEST%\inc%_EXT%\sfx2\sfx.hrc
-..\inc\sfx2\sfxdefs.hxx %_DEST%\inc%_EXT%\sfx2\sfxdefs.hxx
..\inc\sfxhelp.hxx %_DEST%\inc%_EXT%\sfx2\sfxhelp.hxx
-..\inc\sfx2\sfxhtml.hxx %_DEST%\inc%_EXT%\sfx2\sfxhtml.hxx
-..\inc\sfx2\sfxsids.hrc %_DEST%\inc%_EXT%\sfx2\sfxsids.hrc
-..\inc\sfx2\shell.hxx %_DEST%\inc%_EXT%\sfx2\shell.hxx
..\inc\stbitem.hxx %_DEST%\inc%_EXT%\sfx2\stbitem.hxx
-..\inc\sfx2\styfitem.hxx %_DEST%\inc%_EXT%\sfx2\styfitem.hxx
-..\inc\sfx2\styledlg.hxx %_DEST%\inc%_EXT%\sfx2\styledlg.hxx
-..\inc\sfx2\tabdlg.hxx %_DEST%\inc%_EXT%\sfx2\tabdlg.hxx
-..\inc\sfx2\tbxctrl.hxx %_DEST%\inc%_EXT%\sfx2\tbxctrl.hxx
-..\inc\sfx2\templdlg.hxx %_DEST%\inc%_EXT%\sfx2\templdlg.hxx
..\inc\tplpitem.hxx %_DEST%\inc%_EXT%\sfx2\tplpitem.hxx
-..\inc\sfx2\viewfrm.hxx %_DEST%\inc%_EXT%\sfx2\viewfrm.hxx
-..\inc\sfx2\viewsh.hxx %_DEST%\inc%_EXT%\sfx2\viewsh.hxx
..\inc\viewfac.hxx %_DEST%\inc%_EXT%\sfx2\viewfac.hxx
-..\inc\sfx2\appuno.hxx %_DEST%\inc%_EXT%\sfx2\appuno.hxx
-..\inc\sfx2\sfxuno.hxx %_DEST%\inc%_EXT%\sfx2\sfxuno.hxx
-..\inc\sfx2\sfxbasemodel.hxx %_DEST%\inc%_EXT%\sfx2\sfxbasemodel.hxx
-..\inc\sfx2\sfxbasecontroller.hxx %_DEST%\inc%_EXT%\sfx2\sfxbasecontroller.hxx
-..\inc\sfx2\unoctitm.hxx %_DEST%\inc%_EXT%\sfx2\unoctitm.hxx
-..\inc\sfx2\srchitem.hxx %_DEST%\inc%_EXT%\sfx2\srchitem.hxx
-..\inc\sfx2\srchdefs.hxx %_DEST%\inc%_EXT%\sfx2\srchdefs.hxx
-..\inc\sfx2\cntids.hrc %_DEST%\inc%_EXT%\sfx2\cntids.hrc
..\inc\basmgr.hxx %_DEST%\inc%_EXT%\sfx2\basmgr.hxx
..\inc\imagemgr.hxx %_DEST%\inc%_EXT%\sfx2\imagemgr.hxx
-..\inc\sfx2\sfxdlg.hxx %_DEST%\inc%_EXT%\sfx2\sfxdlg.hxx
-..\inc\sfx2\dialogs.hrc %_DEST%\inc%_EXT%\sfx2\dialogs.hrc
-..\inc\sfx2\itemwrapper.hxx %_DEST%\inc%_EXT%\sfx2\itemwrapper.hxx
-..\inc\sfx2\controlwrapper.hxx %_DEST%\inc%_EXT%\sfx2\controlwrapper.hxx
-..\inc\sfx2\itemconnect.hxx %_DEST%\inc%_EXT%\sfx2\itemconnect.hxx
-..\inc\sfx2\lnkbase.hxx %_DEST%\inc%_EXT%\sfx2\lnkbase.hxx
-..\inc\sfx2\linkmgr.hxx %_DEST%\inc%_EXT%\sfx2\linkmgr.hxx
-..\inc\sfx2\linksrc.hxx %_DEST%\inc%_EXT%\sfx2\linksrc.hxx
-..\inc\sfx2\querystatus.hxx %_DEST%\inc%_EXT%\sfx2\querystatus.hxx
-..\inc\sfx2\sfxstatuslistener.hxx %_DEST%\inc%_EXT%\sfx2\sfxstatuslistener.hxx
..\inc\QuerySaveDocument.hxx %_DEST%\inc%_EXT%\sfx2\QuerySaveDocument.hxx
..\inc\mailmodelapi.hxx %_DEST%\inc%_EXT%\sfx2\mailmodelapi.hxx
..\inc\docinsert.hxx %_DEST%\inc%_EXT%\sfx2\docinsert.hxx
-..\inc\sfx2\layout.hxx %_DEST%\inc%_EXT%\sfx2\layout.hxx
-..\inc\sfx2\layout-tabdlg.hxx %_DEST%\inc%_EXT%\sfx2\layout-tabdlg.hxx
-..\inc\sfx2\layout-post.hxx %_DEST%\inc%_EXT%\sfx2\layout-post.hxx
-..\inc\sfx2\layout-pre.hxx %_DEST%\inc%_EXT%\sfx2\layout-pre.hxx
-..\inc\sfx2\XmlIdRegistry.hxx %_DEST%\inc%_EXT%\sfx2\XmlIdRegistry.hxx
-..\inc\sfx2\DocumentMetadataAccess.hxx %_DEST%\inc%_EXT%\sfx2\DocumentMetadataAccess.hxx
-..\inc\sfx2\Metadatable.hxx %_DEST%\inc%_EXT%\sfx2\Metadatable.hxx
+
diff --git a/sfx2/qa/complex/CheckGlobalEventBroadcaster_writer1.java b/sfx2/qa/complex/CheckGlobalEventBroadcaster_writer1.java
index 80a7a1819c72..d5dc17e183eb 100644
--- a/sfx2/qa/complex/CheckGlobalEventBroadcaster_writer1.java
+++ b/sfx2/qa/complex/CheckGlobalEventBroadcaster_writer1.java
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: CheckGlobalEventBroadcaster_writer1.java,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/sfx2/qa/complex/DocHelper/DialogThread.java b/sfx2/qa/complex/DocHelper/DialogThread.java
index 041ff8d0ca47..7151ccbb292d 100644
--- a/sfx2/qa/complex/DocHelper/DialogThread.java
+++ b/sfx2/qa/complex/DocHelper/DialogThread.java
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DialogThread.java,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/sfx2/qa/complex/DocHelper/WriterHelper.java b/sfx2/qa/complex/DocHelper/WriterHelper.java
index c80d18052966..b65e8e915423 100644
--- a/sfx2/qa/complex/DocHelper/WriterHelper.java
+++ b/sfx2/qa/complex/DocHelper/WriterHelper.java
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: WriterHelper.java,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/sfx2/qa/complex/DocHelper/makefile.mk b/sfx2/qa/complex/DocHelper/makefile.mk
index 2f14197c365f..6b6ac9191cdb 100644
--- a/sfx2/qa/complex/DocHelper/makefile.mk
+++ b/sfx2/qa/complex/DocHelper/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.134.1 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sfx2/qa/complex/DocumentMetaData.java b/sfx2/qa/complex/DocumentMetaData.java
index 54b0f7afd3be..ae7970227c75 100644
--- a/sfx2/qa/complex/DocumentMetaData.java
+++ b/sfx2/qa/complex/DocumentMetaData.java
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DocumentMetaData.java,v $
- * $Revision: 1.3.170.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -370,7 +367,7 @@ public class DocumentMetaData extends ComplexTestCase
dur.Hours = 777;
dur.Minutes = 666;
dur.Seconds = 555;
- dur.HundredthSeconds = 444;
+ dur.MilliSeconds = 444;
udpc.addProperty("Frobnicate", PropertyAttribute.REMOVEABLE,
new Boolean(b));
@@ -447,7 +444,11 @@ public class DocumentMetaData extends ComplexTestCase
udps.getPropertyValue("Frobnicate")));
assure ("UserDefined duration", eqDuration(dur, (Duration)
udps.getPropertyValue("FrobDuration")));
- assure ("UserDefined time", eqTime(t, (Time)
+ // this is now a Duration!
+ Duration t_dur = new Duration(false, (short)0, (short)0, (short)0,
+ t.Hours, t.Minutes, t.Seconds,
+ (short)(10 * t.HundredthSeconds));
+ assure ("UserDefined time", eqDuration(t_dur, (Duration)
udps.getPropertyValue("FrobDuration2")));
assure ("UserDefined date", eqDate(date, (Date)
udps.getPropertyValue("FrobEndDate")));
@@ -514,7 +515,7 @@ public class DocumentMetaData extends ComplexTestCase
return a.Years == b.Years && a.Months == b.Months && a.Days == b.Days
&& a.Hours == b.Hours && a.Minutes == b.Minutes
&& a.Seconds == b.Seconds
- && a.HundredthSeconds == b.HundredthSeconds
+ && a.MilliSeconds == b.MilliSeconds
&& a.Negative == b.Negative;
}
diff --git a/sfx2/qa/complex/DocumentMetadataAccessTest.java b/sfx2/qa/complex/DocumentMetadataAccessTest.java
index 0983aec1bd37..05dc523d6f8b 100644
--- a/sfx2/qa/complex/DocumentMetadataAccessTest.java
+++ b/sfx2/qa/complex/DocumentMetadataAccessTest.java
@@ -1,14 +1,11 @@
/*************************************************************************
+ *
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DocumentMetadataAccessTest.java,v $
- *
- * $Revision: 1.1.2.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -25,6 +22,7 @@
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
+ *
************************************************************************/
package complex.framework;
diff --git a/sfx2/qa/complex/docinfo/DocumentProperties.java b/sfx2/qa/complex/docinfo/DocumentProperties.java
index 9c2432049a8e..cff1dd341d48 100644
--- a/sfx2/qa/complex/docinfo/DocumentProperties.java
+++ b/sfx2/qa/complex/docinfo/DocumentProperties.java
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DocumentProperties.java,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/sfx2/qa/complex/docinfo/makefile.mk b/sfx2/qa/complex/docinfo/makefile.mk
index 7c074ccbe838..8c3525541062 100644
--- a/sfx2/qa/complex/docinfo/makefile.mk
+++ b/sfx2/qa/complex/docinfo/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.134.1 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
@@ -57,4 +53,4 @@ JARCOMPRESS = TRUE
run:
- $(JAVAI) -cp $(CLASSPATH) org.openoffice.Runner -TestBase java_complex -o $(PACKAGE:s#$/#.#).$(JAVAFILES:b)
+ $(JAVAI) $(JAVAIFLAGS) -cp $(CLASSPATH) org.openoffice.Runner -TestBase java_complex -o $(PACKAGE:s#$/#.#).$(JAVAFILES:b)
diff --git a/sfx2/qa/complex/makefile.mk b/sfx2/qa/complex/makefile.mk
index 5c0006df9e04..b8bc897fccf7 100644
--- a/sfx2/qa/complex/makefile.mk
+++ b/sfx2/qa/complex/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.134.1 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sfx2/qa/complex/standalonedocumentinfo/StandaloneDocumentInfoTest.java b/sfx2/qa/complex/standalonedocumentinfo/StandaloneDocumentInfoTest.java
index 29d3c8d1dd83..f5512bf9723b 100644
--- a/sfx2/qa/complex/standalonedocumentinfo/StandaloneDocumentInfoTest.java
+++ b/sfx2/qa/complex/standalonedocumentinfo/StandaloneDocumentInfoTest.java
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: StandaloneDocumentInfoTest.java,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/sfx2/qa/complex/standalonedocumentinfo/StandaloneDocumentInfoUnitTest.java b/sfx2/qa/complex/standalonedocumentinfo/StandaloneDocumentInfoUnitTest.java
index 017e6bac6aee..0136f8941df5 100644
--- a/sfx2/qa/complex/standalonedocumentinfo/StandaloneDocumentInfoUnitTest.java
+++ b/sfx2/qa/complex/standalonedocumentinfo/StandaloneDocumentInfoUnitTest.java
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: StandaloneDocumentInfoUnitTest.java,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/sfx2/qa/complex/standalonedocumentinfo/Test01.java b/sfx2/qa/complex/standalonedocumentinfo/Test01.java
index cbd01fa0effd..92c59d81e1c4 100644
--- a/sfx2/qa/complex/standalonedocumentinfo/Test01.java
+++ b/sfx2/qa/complex/standalonedocumentinfo/Test01.java
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: Test01.java,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/sfx2/qa/complex/standalonedocumentinfo/TestHelper.java b/sfx2/qa/complex/standalonedocumentinfo/TestHelper.java
index 3426f688fc4c..f319fe412227 100644
--- a/sfx2/qa/complex/standalonedocumentinfo/TestHelper.java
+++ b/sfx2/qa/complex/standalonedocumentinfo/TestHelper.java
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: TestHelper.java,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/sfx2/qa/complex/standalonedocumentinfo/makefile.mk b/sfx2/qa/complex/standalonedocumentinfo/makefile.mk
index 850fc305d502..c65556aeb763 100644
--- a/sfx2/qa/complex/standalonedocumentinfo/makefile.mk
+++ b/sfx2/qa/complex/standalonedocumentinfo/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.3.134.1 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sfx2/qa/unoapi/Test.java b/sfx2/qa/unoapi/Test.java
new file mode 100644
index 000000000000..4263985c133f
--- /dev/null
+++ b/sfx2/qa/unoapi/Test.java
@@ -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.
+************************************************************************/
+
+package org.openoffice.sfx2.qa.unoapi;
+
+import org.openoffice.Runner;
+import org.openoffice.test.OfficeConnection;
+import static org.junit.Assert.*;
+
+public final class Test {
+ @org.junit.Before public void setUp() throws Exception {
+ connection.setUp();
+ }
+
+ @org.junit.After public void tearDown()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ connection.tearDown();
+ }
+
+ @org.junit.Test public void test() {
+ assertTrue(
+ Runner.run(
+ "-sce", "sfx.sce", "-xcl", "knownissues.xcl", "-tdoc",
+ "testdocuments", "-cs", connection.getDescription()));
+ }
+
+ private final OfficeConnection connection = new OfficeConnection();
+}
diff --git a/sfx2/qa/unoapi/makefile.mk b/sfx2/qa/unoapi/makefile.mk
index 9d5403bb7c01..ea91ba4d1c44 100644
--- a/sfx2/qa/unoapi/makefile.mk
+++ b/sfx2/qa/unoapi/makefile.mk
@@ -1,14 +1,9 @@
#*************************************************************************
-#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2008 by Sun Microsystems, Inc.
-#
-# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
-# $Revision: 1.6 $
+# OpenOffice.org - a multi-platform office productivity suite
#
# This file is part of OpenOffice.org.
#
@@ -26,19 +21,28 @@
# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
+#***********************************************************************/
-PRJ=..$/..
+.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
+nothing .PHONY:
+.ELSE
-PRJNAME=sfx2
-TARGET=qa_unoapi
+PRJ = ../..
+PRJNAME = sfx2
+TARGET = qa_unoapi
-.INCLUDE: settings.mk
+.IF "$(OOO_JUNIT_JAR)" != ""
+PACKAGE = org/openoffice/sfx2/qa/unoapi
+JAVATESTFILES = Test.java
+JAVAFILES = $(JAVATESTFILES)
+JARFILES = OOoRunner.jar ridl.jar test.jar
+EXTRAJARFILES = $(OOO_JUNIT_JAR)
+.END
+.INCLUDE: settings.mk
.INCLUDE: target.mk
+.INCLUDE: installationtest.mk
-ALLTAR : UNOAPI_TEST
+ALLTAR : javatest
-UNOAPI_TEST:
- +$(SOLARENV)$/bin$/checkapi -sce sfx.sce -xcl knownissues.xcl -tdoc $(PWD)$/testdocuments
+.END
diff --git a/sfx2/sdi/appslots.sdi b/sfx2/sdi/appslots.sdi
index 5da69fa977f3..f20cdbd7c385 100644
--- a/sfx2/sdi/appslots.sdi
+++ b/sfx2/sdi/appslots.sdi
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: appslots.sdi,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/sfx2/sdi/docslots.sdi b/sfx2/sdi/docslots.sdi
index 6fb1b161b2f2..d16239535193 100644
--- a/sfx2/sdi/docslots.sdi
+++ b/sfx2/sdi/docslots.sdi
@@ -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
- *
- * $Revision$
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sfx2/sdi/frmslots.sdi b/sfx2/sdi/frmslots.sdi
index 35f410db44af..c4210b801bf6 100644
--- a/sfx2/sdi/frmslots.sdi
+++ b/sfx2/sdi/frmslots.sdi
@@ -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
- *
- * $Revision$
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -400,21 +396,11 @@ interface TopWindow : BrowseWindow
[
StateMethod = StateView_Impl ;
]
- SID_WIN_POSSIZE // ole(no) api(final/play/rec)
- [
- ExecMethod = Exec_Impl ;
- StateMethod = GetState_Impl ;
- ]
SID_CLOSEWIN // ole(no) api(final/play/rec)
[
ExecMethod = Exec_Impl ;
StateMethod = GetState_Impl ;
]
- SID_BACKTOWEBTOP // ole(no) api(final/play/rec)
- [
- ExecMethod = Exec_Impl ;
- StateMethod = GetState_Impl ;
- ]
SID_BROWSE_FORWARD // ole(no) api()
[
ExecMethod = INetExecute_Impl ;
@@ -435,23 +421,29 @@ interface TopWindow : BrowseWindow
ExecMethod = INetExecute_Impl ;
StateMethod = INetState_Impl ;
]
- SID_BROWSE_STOP // ole(no) api()
- [
- ExecMethod = INetExecute_Impl ;
- StateMethod = INetState_Impl ;
- ]
-
}
//=========================================================================
shell SfxViewFrame
{
- import BrowseWindow [Automation];
+ import TopWindow [Automation];
SID_FORMATMENUSTATE
[
StateMethod = MiscState_Impl ;
]
+
+ SID_ACTIVATE // ole(no) api(final/play/rec)
+ [
+ ExecMethod = Exec_Impl ;
+ StateMethod = GetState_Impl ;
+ ]
+
+ SID_SHOWPOPUPS
+ [
+ ExecMethod = Exec_Impl ;
+ StateMethod = GetState_Impl ;
+ ]
}
diff --git a/sfx2/sdi/makefile.mk b/sfx2/sdi/makefile.mk
index f8def0a3c23c..c02e51eb6998 100644
--- a/sfx2/sdi/makefile.mk
+++ b/sfx2/sdi/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
@@ -54,7 +50,6 @@ SVSDI1DEPEND= \
appslots.sdi \
sfxslots.sdi \
docslots.sdi \
- mdislots.sdi \
viwslots.sdi \
frmslots.sdi
diff --git a/sfx2/sdi/mdislots.sdi b/sfx2/sdi/mdislots.sdi
deleted file mode 100644
index 88ffba45051e..000000000000
--- a/sfx2/sdi/mdislots.sdi
+++ /dev/null
@@ -1,48 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile
- *
- * $Revision$
- *
- * 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.
- *
- ************************************************************************/
-
-shell SfxTopViewFrame : SfxViewFrame
-{
- import TopWindow [Automation];
-
- SID_ACTIVATE // ole(no) api(final/play/rec)
- [
- ExecMethod = Exec_Impl ;
- StateMethod = GetState_Impl ;
- ]
-
- SID_SHOWPOPUPS
- [
- ExecMethod = Exec_Impl ;
- StateMethod = GetState_Impl ;
- ]
-}
-
diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi
index 26f55ccdd178..10a920852848 100644
--- a/sfx2/sdi/sfx.sdi
+++ b/sfx2/sdi/sfx.sdi
@@ -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$
- *
- * $Revision$
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -400,33 +396,6 @@ SfxVoidItem AddWatch SID_BASICIDE_ADDWATCH
]
//--------------------------------------------------------------------------
-SfxRectangleItem Area SID_WIN_POSSIZE
-
-[
- /* flags: */
- AutoUpdate = FALSE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = FALSE,
- ReadOnlyDoc = TRUE,
- Toggle = FALSE,
- Container = TRUE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Synchron;
-
- Readonly = FALSE,
-
- /* config: */
- AccelConfig = FALSE,
- MenuConfig = FALSE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = FALSE,
- GroupId = ;
-]
-
-//--------------------------------------------------------------------------
SfxStringItem Author SID_DOCINFO_AUTHOR
[
@@ -562,31 +531,6 @@ SfxVoidItem Backspace SID_BACKSPACE
]
//--------------------------------------------------------------------------
-SfxVoidItem BackToWebtop SID_BACKTOWEBTOP
-()
-[
- /* flags: */
- AutoUpdate = FALSE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = FALSE,
- ReadOnlyDoc = TRUE,
- Toggle = FALSE,
- Container = TRUE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Asynchron;
-
- /* config: */
- AccelConfig = FALSE,
- MenuConfig = FALSE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = FALSE,
- GroupId = GID_VIEW;
-]
-
-//--------------------------------------------------------------------------
SfxVoidItem BasicBreak SID_BASICBREAK
()
[
@@ -902,34 +846,6 @@ SfxUInt32Item BuildVersion SID_BUILD_VERSION
]
//--------------------------------------------------------------------------
-SfxVoidItem Stop SID_BROWSE_STOP
-()
-[
- /* flags: */
- AutoUpdate = TRUE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = FALSE,
- ReadOnlyDoc = TRUE,
- Toggle = FALSE,
- Container = TRUE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Synchron;
-
- /* status: */
- SlotType = SfxBoolItem
-
- /* config: */
- AccelConfig = TRUE,
- MenuConfig = TRUE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = TRUE,
- GroupId = GID_NAVIGATOR;
-]
-
-//--------------------------------------------------------------------------
SfxStringItem Caption SID_CAPTION
[
@@ -1061,31 +977,6 @@ SfxVoidItem ClearHistory SID_CLEARHISTORY
]
//--------------------------------------------------------------------------
-SfxVoidItem ClearMemCache SID_CLEARMEMCACHE
-()
-[
- /* flags: */
- AutoUpdate = FALSE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = FALSE,
- ReadOnlyDoc = TRUE,
- Toggle = FALSE,
- Container = TRUE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Synchron;
-
- /* config: */
- AccelConfig = FALSE,
- MenuConfig = FALSE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = FALSE,
- GroupId = GID_OPTIONS;
-]
-
-//--------------------------------------------------------------------------
SfxBoolItem CloseWins SID_CLOSEWINS
()
[
@@ -1680,31 +1571,6 @@ SfxVoidItem DeleteCurrent SID_BASICIDE_DELETECURRENT
]
//--------------------------------------------------------------------------
-SfxVoidItem DeleteFrame SID_DELETE_FRAME
-(SfxStringItem Frame SID_FRAMETITLE)
-[
- /* flags: */
- AutoUpdate = TRUE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = FALSE,
- ReadOnlyDoc = FALSE,
- Toggle = FALSE,
- Container = FALSE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Synchron;
-
- /* config: */
- AccelConfig = FALSE,
- MenuConfig = TRUE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = TRUE,
- GroupId = GID_EDIT;
-]
-
-//--------------------------------------------------------------------------
SfxUInt16Item DeleteStyle SID_STYLE_DELETE
(SfxStringItem Param SID_STYLE_DELETE,SfxUInt16Item Family SID_STYLE_FAMILY)
[
@@ -1808,33 +1674,6 @@ SfxBoolItem EditDoc SID_EDITDOC
]
//--------------------------------------------------------------------------
-SfxBoolItem EditFrameSet SID_EDIT_FRAMESET
-
-[
- /* flags: */
- AutoUpdate = TRUE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = FALSE,
- ReadOnlyDoc = TRUE,
- Toggle = FALSE,
- Container = FALSE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Asynchron;
-
- Readonly = FALSE,
-
- /* config: */
- AccelConfig = TRUE,
- MenuConfig = TRUE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = TRUE,
- GroupId = GID_EDIT;
-]
-
-//--------------------------------------------------------------------------
SfxVoidItem EditMacro SID_BASICIDE_EDITMACRO
(SfxMacroInfoItem aMacroInfo SID_BASICIDE_ARG_MACROINFO)
[
@@ -1938,31 +1777,6 @@ SfxBoolItem ExtendedHelp SID_EXTENDEDHELP
]
//--------------------------------------------------------------------------
-SfxVoidItem FileDocument SID_SAVEDOCTOBOOKMARK
-()
-[
- /* flags: */
- AutoUpdate = FALSE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = FALSE,
- ReadOnlyDoc = TRUE,
- Toggle = FALSE,
- Container = TRUE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Synchron;
-
- /* config: */
- AccelConfig = TRUE,
- MenuConfig = TRUE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = TRUE,
- GroupId = GID_DOCUMENT;
-]
-
-//--------------------------------------------------------------------------
SfxStringItem FileName SID_FILE_NAME
[
@@ -2043,114 +1857,6 @@ SfxVoidItem FormatMenu SID_FORMATMENU
]
//--------------------------------------------------------------------------
-SfxStringItem FrameContent SID_FRAME_CONTENT
-
-[
- /* flags: */
- AutoUpdate = FALSE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = FALSE,
- ReadOnlyDoc = FALSE,
- Toggle = FALSE,
- Container = TRUE,
- RecordAbsolute = TRUE,
- RecordPerSet;
- Synchron;
-
- Readonly = FALSE,
-
- /* config: */
- AccelConfig = FALSE,
- MenuConfig = FALSE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = TRUE,
- GroupId = GID_VIEW;
-]
-
-//--------------------------------------------------------------------------
-SfxUInt16Item FrameCount SID_FRAMECOUNT
-
-[
- /* flags: */
- AutoUpdate = FALSE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = FALSE,
- ReadOnlyDoc = FALSE,
- Toggle = FALSE,
- Container = TRUE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Synchron;
-
- Readonly = TRUE,
-
- /* config: */
- AccelConfig = FALSE,
- MenuConfig = FALSE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = FALSE,
- GroupId = ;
-]
-
-//--------------------------------------------------------------------------
-SfxStringItem FrameName SID_FRAME_NAME
-
-[
- /* flags: */
- AutoUpdate = FALSE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = FALSE,
- ReadOnlyDoc = FALSE,
- Toggle = FALSE,
- Container = TRUE,
- RecordAbsolute = TRUE,
- RecordPerSet;
- Synchron;
-
- Readonly = FALSE,
-
- /* config: */
- AccelConfig = FALSE,
- MenuConfig = FALSE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = TRUE,
- GroupId = GID_VIEW;
-]
-
-//--------------------------------------------------------------------------
-SfxUInt16Item FrameSpacing SID_FRAMESPACING
-
-[
- /* flags: */
- AutoUpdate = FALSE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = FALSE,
- ReadOnlyDoc = FALSE,
- Toggle = FALSE,
- Container = TRUE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Synchron;
-
- Readonly = FALSE,
-
- /* config: */
- AccelConfig = FALSE,
- MenuConfig = FALSE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = TRUE,
- GroupId = GID_VIEW;
-]
-
-//--------------------------------------------------------------------------
SfxTemplateItem FrameStyle SID_STYLE_FAMILY3
[
@@ -3305,33 +3011,6 @@ SfxVoidItem InsertObjectFloatingFrame SID_INSERT_FLOATINGFRAME
]
//--------------------------------------------------------------------------
-SfxBoolItem Interactive SID_INTERACTIVEMODE
-
-[
- /* flags: */
- AutoUpdate = FALSE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = FALSE,
- ReadOnlyDoc = TRUE,
- Toggle = FALSE,
- Container = TRUE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Synchron;
-
- Readonly = FALSE,
-
- /* config: */
- AccelConfig = FALSE,
- MenuConfig = FALSE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = FALSE,
- GroupId = ;
-]
-
-//--------------------------------------------------------------------------
SfxBoolItem InternetOnline SID_INTERNET_ONLINE
[
@@ -3384,31 +3063,6 @@ SfxVoidItem InternetSearch SID_INTERNET_SEARCH
]
//--------------------------------------------------------------------------
-SfxVoidItem InternetUpdate SID_INTERNET_UPDATE
-()
-[
- /* flags: */
- AutoUpdate = FALSE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = TRUE,
- HasDialog = FALSE,
- ReadOnlyDoc = TRUE,
- Toggle = FALSE,
- Container = TRUE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Asynchron;
-
- /* config: */
- AccelConfig = FALSE,
- MenuConfig = FALSE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = FALSE,
- GroupId = GID_EXPLORER;
-]
-
-//--------------------------------------------------------------------------
SfxBoolItem IsLoading SID_DOC_LOADING
[
@@ -3491,33 +3145,6 @@ SfxBoolItem IsPrinting SID_PRINTOUT
]
//--------------------------------------------------------------------------
-SfxBoolItem IsTopWindow SID_ISTOP
-
-[
- /* flags: */
- AutoUpdate = FALSE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = FALSE,
- ReadOnlyDoc = FALSE,
- Toggle = FALSE,
- Container = TRUE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Synchron;
-
- Readonly = TRUE,
-
- /* config: */
- AccelConfig = FALSE,
- MenuConfig = FALSE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = FALSE,
- GroupId = ;
-]
-
-//--------------------------------------------------------------------------
SfxVoidItem JumpToMark SID_JUMPTOMARK
(SfxStringItem Bookmark SID_JUMPTOMARK)
[
@@ -3570,33 +3197,6 @@ SfxStringItem Keywords SID_DOCINFO_KEYWORDS
]
//--------------------------------------------------------------------------
-SfxBoolItem LateInitDone SID_LATEINIT_DONE
-
-[
- /* flags: */
- AutoUpdate = FALSE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = FALSE,
- ReadOnlyDoc = FALSE,
- Toggle = FALSE,
- Container = TRUE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Synchron;
-
- Readonly = TRUE,
-
- /* config: */
- AccelConfig = FALSE,
- MenuConfig = FALSE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = FALSE,
- GroupId = GID_APPLICATION;
-]
-
-//--------------------------------------------------------------------------
SfxStringItem LibLoaded SID_BASICIDE_LIBLOADED
(SfxUsrAnyItem Document SID_BASICIDE_ARG_DOCUMENT_MODEL,SfxStringItem LibName SID_BASICIDE_ARG_LIBNAME)
[
@@ -4044,32 +3644,6 @@ SfxVoidItem MacroDialog SID_BASICCHOOSER
]
//--------------------------------------------------------------------------
-SfxVoidItem MailNotifyReset SID_MAIL_NOTIFY_RESET
-()
-[
- /* flags: */
- AutoUpdate = FALSE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = FALSE,
- ReadOnlyDoc = TRUE,
- Toggle = TRUE,
- Container = TRUE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Asynchron;
-
- /* config: */
- AccelConfig = FALSE,
- MenuConfig = FALSE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = FALSE,
- GroupId = GID_EXPLORER;
-]
-
-
-//--------------------------------------------------------------------------
SfxUInt16Item MailReceipt SID_MAIL_NOTIFY
[
@@ -4282,31 +3856,6 @@ SfxStringItem ModifiedStatus SID_DOC_MODIFIED
]
//--------------------------------------------------------------------------
-SfxVoidItem ModifyFrame SID_MODIFY_FRAME
-()
-[
- /* flags: */
- AutoUpdate = TRUE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = FALSE,
- ReadOnlyDoc = FALSE,
- Toggle = FALSE,
- Container = FALSE,
- RecordAbsolute = TRUE,
- RecordPerItem;
- Synchron;
-
- /* config: */
- AccelConfig = FALSE,
- MenuConfig = TRUE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = TRUE,
- GroupId = GID_EDIT;
-]
-
-//--------------------------------------------------------------------------
SfxVoidItem ModuleDialog SID_BASICIDE_MODULEDLG
()
[
@@ -4435,34 +3984,6 @@ SfxVoidItem NewDialog SID_BASICIDE_NEWDIALOG
]
//--------------------------------------------------------------------------
-SfxObjectItem NewFrameSet SID_NEWFRAMESET
-()
-[
- /* flags: */
- AutoUpdate = FALSE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = FALSE,
- ReadOnlyDoc = TRUE,
- Toggle = FALSE,
- Container = TRUE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Asynchron;
-
- /* status: */
- SlotType = SfxStringItem
-
- /* config: */
- AccelConfig = TRUE,
- MenuConfig = TRUE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = TRUE,
- GroupId = GID_APPLICATION;
-]
-
-//--------------------------------------------------------------------------
SfxVoidItem NewModule SID_BASICIDE_NEWMODULE
()
[
@@ -4615,33 +4136,6 @@ SfxStringItem ObjectMenue SID_OBJECT
]
//--------------------------------------------------------------------------
-SfxStringItem OfficeVersionId SID_OFFICE_VERSION_ID
-
-[
- /* flags: */
- AutoUpdate = FALSE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = FALSE,
- ReadOnlyDoc = TRUE,
- Toggle = FALSE,
- Container = FALSE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Synchron;
-
- Readonly = TRUE,
-
- /* config: */
- AccelConfig = FALSE,
- MenuConfig = FALSE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = FALSE,
- GroupId = GID_SPECIAL;
-]
-
-//--------------------------------------------------------------------------
SfxStringItem OldPALK SID_OLD_PALK
[
@@ -5061,33 +4555,6 @@ SfxStringItem DocPath SID_DOCPATH
]
//--------------------------------------------------------------------------
-SfxStringItem Path SID_PROGPATH
-
-[
- /* flags: */
- AutoUpdate = FALSE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = FALSE,
- ReadOnlyDoc = TRUE,
- Toggle = FALSE,
- Container = TRUE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Synchron;
-
- Readonly = TRUE,
-
- /* config: */
- AccelConfig = FALSE,
- MenuConfig = FALSE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = FALSE,
- GroupId = ;
-]
-
-//--------------------------------------------------------------------------
SfxVoidItem PickList SID_PICKLIST
()
[
@@ -5897,31 +5364,31 @@ SfxVoidItem ExportDialog SID_EXPORT_DIALOG
]
//--------------------------------------------------------------------------
-SfxVoidItem ImportDialog SID_IMPORT_DIALOG
-()
-[
- /* flags: */
- AutoUpdate = FALSE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = FALSE,
- ReadOnlyDoc = TRUE,
- Toggle = FALSE,
- Container = TRUE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Asynchron;
-
- /* config: */
- AccelConfig = TRUE,
- MenuConfig = TRUE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = TRUE,
- GroupId = GID_DOCUMENT;
-]
-
-//--------------------------------------------------------------------------
+SfxVoidItem ImportDialog SID_IMPORT_DIALOG
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DOCUMENT;
+]
+
+//--------------------------------------------------------------------------
SfxVoidItem SaveConfiguration SID_SAVECONFIG
(SfxStringItem FileName SID_CFGFILE)
[
@@ -6495,106 +5962,6 @@ SfxBoolItem SourceView SID_SOURCEVIEW
]
//--------------------------------------------------------------------------
-SfxObjectItem SplitHorizontal SID_SPLIT_HORIZONTAL
-(SfxStringItem Frame SID_FRAMETITLE)
-[
- /* flags: */
- AutoUpdate = TRUE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = FALSE,
- ReadOnlyDoc = FALSE,
- Toggle = FALSE,
- Container = FALSE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Synchron;
-
- /* config: */
- AccelConfig = FALSE,
- MenuConfig = TRUE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = TRUE,
- GroupId = GID_EDIT;
-]
-
-//--------------------------------------------------------------------------
-SfxObjectItem SplitParentHorizontal SID_SPLIT_PARENT_HORIZONTAL
-(SfxStringItem Frame SID_FRAMETITLE)
-[
- /* flags: */
- AutoUpdate = TRUE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = FALSE,
- ReadOnlyDoc = FALSE,
- Toggle = FALSE,
- Container = FALSE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Synchron;
-
- /* config: */
- AccelConfig = FALSE,
- MenuConfig = TRUE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = TRUE,
- GroupId = GID_EDIT;
-]
-
-//--------------------------------------------------------------------------
-SfxObjectItem SplitParentVertical SID_SPLIT_PARENT_VERTICAL
-(SfxStringItem Frame SID_FRAMETITLE)
-[
- /* flags: */
- AutoUpdate = TRUE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = FALSE,
- ReadOnlyDoc = FALSE,
- Toggle = FALSE,
- Container = FALSE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Synchron;
-
- /* config: */
- AccelConfig = FALSE,
- MenuConfig = TRUE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = TRUE,
- GroupId = GID_EDIT;
-]
-
-//--------------------------------------------------------------------------
-SfxObjectItem SplitVertical SID_SPLIT_VERTICAL
-(SfxStringItem Frame SID_FRAMETITLE)
-[
- /* flags: */
- AutoUpdate = TRUE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = FALSE,
- ReadOnlyDoc = FALSE,
- Toggle = FALSE,
- Container = FALSE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Synchron;
-
- /* config: */
- AccelConfig = FALSE,
- MenuConfig = TRUE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = TRUE,
- GroupId = GID_EDIT;
-]
-
-//--------------------------------------------------------------------------
SfxVoidItem StartRegistrationDialog SID_ONLINE_REGISTRATION_DLG
()
[
@@ -8118,7 +7485,7 @@ SfxVoidItem AutoPilotAddressDataSource SID_ADDRESS_DATA_SOURCE
//--------------------------------------------------------------------------
SfxVoidItem InsertBusinessCard FN_BUSINESS_CARD
-( SfxFrameItem Frame SID_DOCFRAME )
+( SfxUnoFrameItem Frame SID_FILLFRAME, SfxBoolItem Hidden SID_HIDDEN )
[
/* flags: */
AutoUpdate = FALSE,
@@ -8143,7 +7510,7 @@ SfxVoidItem InsertBusinessCard FN_BUSINESS_CARD
//--------------------------------------------------------------------------
SfxVoidItem InsertLabels FN_LABEL
-( SfxFrameItem Frame SID_DOCFRAME )
+( SfxUnoFrameItem Frame SID_FILLFRAME, SfxBoolItem Hidden SID_HIDDEN )
[
/* flags: */
AutoUpdate = FALSE,
@@ -8168,7 +7535,7 @@ SfxVoidItem InsertLabels FN_LABEL
//--------------------------------------------------------------------------
SfxVoidItem NewXForms FN_XFORMS_INIT
-( SfxFrameItem Frame SID_DOCFRAME )
+( SfxUnoFrameItem Frame SID_FILLFRAME, SfxBoolItem Hidden SID_HIDDEN )
[
/* flags: */
AutoUpdate = FALSE,
@@ -8193,7 +7560,7 @@ SfxVoidItem NewXForms FN_XFORMS_INIT
//--------------------------------------------------------------------------
SfxVoidItem AutoPilotPresentations SID_SD_AUTOPILOT
-( SfxFrameItem Frame SID_DOCFRAME )
+( SfxUnoFrameItem Frame SID_FILLFRAME, SfxBoolItem Hidden SID_HIDDEN )
[
/* flags: */
AutoUpdate = FALSE,
@@ -8218,7 +7585,7 @@ SfxVoidItem AutoPilotPresentations SID_SD_AUTOPILOT
//--------------------------------------------------------------------------
SfxVoidItem NewPresentation SID_NEWSD
-( SfxFrameItem Frame SID_DOCFRAME )
+( SfxUnoFrameItem Frame SID_FILLFRAME, SfxBoolItem Hidden SID_HIDDEN )
[
/* flags: */
AutoUpdate = FALSE,
diff --git a/sfx2/sdi/sfxitems.sdi b/sfx2/sdi/sfxitems.sdi
index 30fe37ffa5f0..421c1cb29529 100644
--- a/sfx2/sdi/sfxitems.sdi
+++ b/sfx2/sdi/sfxitems.sdi
@@ -1,89 +1,90 @@
- item void SfxVoidItem;
- item BOOL SfxBoolItem;
- item INT32 SfxUInt16Item;
- item INT16 SfxInt16Item;
- item INT32 SfxUInt32Item;
- item INT32 SfxInt32Item;
- item String SfxStringItem;
- item BYTE SfxByteItem;
- item INT16 SfxEnumItem;
- item INT16 SfxAllEnumItem;
- item INT16 TbxImageItem;
-
- item String SbxItem; //! Dummy
- item String SfxObjectItem; //! Dummy
- item String SfxTemplateItem; //! Dummy
- item String SfxMacroInfoItem; //! Dummy
- item String SfxImageItem; //! Dummy
- item String SfxFrameItem; //! Dummy
- item String SfxObjectShellItem //! Dummy
- item String SfxUsrAnyItem //! Dummy
-
- struct Point
- {
- INT32 X MID_X;
- INT32 Y MID_Y;
- };
- item Point SfxPointItem;
-
- struct Rectangle
- {
- INT32 Left MID_RECT_LEFT;
- INT32 Top MID_RECT_TOP;
- INT32 Width MID_WIDTH;
- INT32 Height MID_HEIGHT;
- };
- item Rectangle SfxRectangleItem;
-
- struct DocInfo
- {
- BOOL UseUserData MID_DOCINFO_USEUSERDATA;
- BOOL DeleteUserData MID_DOCINFO_DELETEUSERDATA;
- String Title MID_DOCINFO_TITLE;
- String Subject MID_DOCINFO_SUBJECT;
- String KeyWords MID_DOCINFO_KEYWORDS;
- String Description MID_DOCINFO_DESCRIPTION;
- BOOL AutoReload MID_DOCINFO_AUTOLOADENABLED;
- INT32 AutoReloadTime MID_DOCINFO_AUTOLOADSECS;
- String AutoReloadURL MID_DOCINFO_AUTOLOADURL;
- String AutoReloadFrame MID_DOCINFO_DEFAULTTARGET;
- };
- item DocInfo SfxDocumentInfoItem;
-
- struct SvxSearch
- {
- INT16 StyleFamily MID_SEARCH_STYLEFAMILY;
- UINT16 CellType MID_SEARCH_CELLTYPE;
- BOOL RowDirection MID_SEARCH_ROWDIRECTION;
- BOOL AllTables MID_SEARCH_ALLTABLES;
- BOOL Backward MID_SEARCH_BACKWARD;
- BOOL Pattern MID_SEARCH_PATTERN;
- BOOL Content MID_SEARCH_CONTENT;
- BOOL AsianOptions MID_SEARCH_ASIANOPTIONS;
- INT16 AlgorithmType MID_SEARCH_ALGORITHMTYPE;
- INT32 SearchFlags MID_SEARCH_FLAGS;
- String SearchString MID_SEARCH_SEARCHSTRING;
- String ReplaceString MID_SEARCH_REPLACESTRING;
- INT16 Locale MID_SEARCH_LOCALE;
- INT32 ChangedChars MID_SEARCH_CHANGEDCHARS;
- INT32 DeletedChars MID_SEARCH_DELETEDCHARS;
- INT32 InsertedChars MID_SEARCH_INSERTEDCHARS;
- INT32 TransliterateFlags MID_SEARCH_TRANSLITERATEFLAGS;
- INT16 Command MID_SEARCH_COMMAND;
- };
- item SvxSearch SvxSearchItem;
-
- struct SvxSize
- {
- INT32 Width MID_SIZE_WIDTH;
- INT32 Height MID_SIZE_HEIGHT;
- };
- item SvxSize SvxSizeItem;
-
- struct SfxScriptOrganizer
- {
- String Language MID_SCRIPT_ORGANIZER_LANGUAGE;
- };
- item SfxScriptOrganizer SfxScriptOrganizerItem;
- item String SvxClipboardFmtItem; //! Dummy
-
+ item void SfxVoidItem;
+ item BOOL SfxBoolItem;
+ item INT32 SfxUInt16Item;
+ item INT16 SfxInt16Item;
+ item INT32 SfxUInt32Item;
+ item INT32 SfxInt32Item;
+ item String SfxStringItem;
+ item BYTE SfxByteItem;
+ item INT16 SfxEnumItem;
+ item INT16 SfxAllEnumItem;
+ item INT16 TbxImageItem;
+
+ item String SbxItem; //! Dummy
+ item String SfxObjectItem; //! Dummy
+ item String SfxTemplateItem; //! Dummy
+ item String SfxMacroInfoItem; //! Dummy
+ item String SfxImageItem; //! Dummy
+ item String SfxFrameItem; //! Dummy
+ item String SfxObjectShellItem //! Dummy
+ item String SfxUsrAnyItem //! Dummy
+ item String SfxUnoFrameItem //! Dummy
+
+ struct Point
+ {
+ INT32 X MID_X;
+ INT32 Y MID_Y;
+ };
+ item Point SfxPointItem;
+
+ struct Rectangle
+ {
+ INT32 Left MID_RECT_LEFT;
+ INT32 Top MID_RECT_TOP;
+ INT32 Width MID_WIDTH;
+ INT32 Height MID_HEIGHT;
+ };
+ item Rectangle SfxRectangleItem;
+
+ struct DocInfo
+ {
+ BOOL UseUserData MID_DOCINFO_USEUSERDATA;
+ BOOL DeleteUserData MID_DOCINFO_DELETEUSERDATA;
+ String Title MID_DOCINFO_TITLE;
+ String Subject MID_DOCINFO_SUBJECT;
+ String KeyWords MID_DOCINFO_KEYWORDS;
+ String Description MID_DOCINFO_DESCRIPTION;
+ BOOL AutoReload MID_DOCINFO_AUTOLOADENABLED;
+ INT32 AutoReloadTime MID_DOCINFO_AUTOLOADSECS;
+ String AutoReloadURL MID_DOCINFO_AUTOLOADURL;
+ String AutoReloadFrame MID_DOCINFO_DEFAULTTARGET;
+ };
+ item DocInfo SfxDocumentInfoItem;
+
+ struct SvxSearch
+ {
+ INT16 StyleFamily MID_SEARCH_STYLEFAMILY;
+ UINT16 CellType MID_SEARCH_CELLTYPE;
+ BOOL RowDirection MID_SEARCH_ROWDIRECTION;
+ BOOL AllTables MID_SEARCH_ALLTABLES;
+ BOOL Backward MID_SEARCH_BACKWARD;
+ BOOL Pattern MID_SEARCH_PATTERN;
+ BOOL Content MID_SEARCH_CONTENT;
+ BOOL AsianOptions MID_SEARCH_ASIANOPTIONS;
+ INT16 AlgorithmType MID_SEARCH_ALGORITHMTYPE;
+ INT32 SearchFlags MID_SEARCH_FLAGS;
+ String SearchString MID_SEARCH_SEARCHSTRING;
+ String ReplaceString MID_SEARCH_REPLACESTRING;
+ INT16 Locale MID_SEARCH_LOCALE;
+ INT32 ChangedChars MID_SEARCH_CHANGEDCHARS;
+ INT32 DeletedChars MID_SEARCH_DELETEDCHARS;
+ INT32 InsertedChars MID_SEARCH_INSERTEDCHARS;
+ INT32 TransliterateFlags MID_SEARCH_TRANSLITERATEFLAGS;
+ INT16 Command MID_SEARCH_COMMAND;
+ };
+ item SvxSearch SvxSearchItem;
+
+ struct SvxSize
+ {
+ INT32 Width MID_SIZE_WIDTH;
+ INT32 Height MID_SIZE_HEIGHT;
+ };
+ item SvxSize SvxSizeItem;
+
+ struct SfxScriptOrganizer
+ {
+ String Language MID_SCRIPT_ORGANIZER_LANGUAGE;
+ };
+ item SfxScriptOrganizer SfxScriptOrganizerItem;
+ item String SvxClipboardFmtItem; //! Dummy
+
diff --git a/sfx2/sdi/sfxslots.sdi b/sfx2/sdi/sfxslots.sdi
index 44cd45d00868..1479c4716efc 100644
--- a/sfx2/sdi/sfxslots.sdi
+++ b/sfx2/sdi/sfxslots.sdi
@@ -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
- *
- * $Revision$
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -43,7 +39,6 @@ SlotIdFile( "sfx2/sfx.hrc" )
include "docslots.sdi"
include "viwslots.sdi"
include "frmslots.sdi"
- include "mdislots.sdi"
include "appslots.sdi"
}
diff --git a/sfx2/sdi/viwslots.sdi b/sfx2/sdi/viwslots.sdi
index 1919f3d7a6ab..4d14d927adf6 100644
--- a/sfx2/sdi/viwslots.sdi
+++ b/sfx2/sdi/viwslots.sdi
@@ -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
- *
- * $Revision$
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
index 8d13066a8340..d42d203e57f5 100644
--- a/sfx2/source/appl/app.cxx
+++ b/sfx2/source/appl/app.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE 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.cxx,v $
- * $Revision: 1.112 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -111,7 +108,7 @@
#include <sfx2/dispatch.hxx>
#include <sfx2/viewsh.hxx>
#include <sfx2/genlink.hxx>
-#include <sfx2/topfrm.hxx>
+#include <sfx2/viewfrm.hxx>
#include "appdata.hxx"
#include "openflag.hxx"
#include "app.hrc"
@@ -475,9 +472,6 @@ SfxDispatcher* SfxApplication::GetDispatcher_Impl()
//--------------------------------------------------------------------
void SfxApplication::SetViewFrame_Impl( SfxViewFrame *pFrame )
{
- if( pFrame && !pFrame->IsSetViewFrameAllowed_Impl() )
- return;
-
if ( pFrame != pAppData_Impl->pViewFrame )
{
// get the containerframes ( if one of the frames is an InPlaceFrame )
@@ -494,12 +488,6 @@ void SfxApplication::SetViewFrame_Impl( SfxViewFrame *pFrame )
// BOOL bDocWinActivate = pOldContainerFrame && pNewContainerFrame &&
// pOldContainerFrame->GetTopViewFrame() == pNewContainerFrame->GetTopViewFrame();
BOOL bTaskActivate = pOldContainerFrame != pNewContainerFrame;
- if ( pAppData_Impl->pViewFrame )
- {
- if ( bTaskActivate )
- // prepare UI for deacivation
- pAppData_Impl->pViewFrame->GetFrame()->Deactivate_Impl();
- }
if ( pOldContainerFrame )
{
@@ -568,11 +556,11 @@ short SfxApplication::QuerySave_Impl( SfxObjectShell& rDoc, sal_Bool /*bAutoSave
String aMsg( SfxResId( STR_ISMODIFIED ) );
aMsg.SearchAndReplaceAscii( "%1", rDoc.GetTitle() );
- SfxFrame *pFrame = SfxViewFrame::GetFirst(&rDoc)->GetFrame();
- pFrame->Appear();
+ SfxFrame& rFrame = SfxViewFrame::GetFirst(&rDoc)->GetFrame();
+ rFrame.Appear();
WinBits nBits = WB_YES_NO_CANCEL | WB_DEF_NO;
- QueryBox aBox( &pFrame->GetWindow(), nBits, aMsg );
+ QueryBox aBox( &rFrame.GetWindow(), nBits, aMsg );
return aBox.Execute();
}
@@ -696,7 +684,7 @@ uno::Reference< task::XStatusIndicator > SfxApplication::GetStatusIndicator() co
while ( pTop->GetParentViewFrame_Impl() )
pTop = pTop->GetParentViewFrame_Impl();
- return pTop->GetFrame()->GetWorkWindow_Impl()->GetStatusIndicator();
+ return pTop->GetFrame().GetWorkWindow_Impl()->GetStatusIndicator();
}
SfxTbxCtrlFactArr_Impl& SfxApplication::GetTbxCtrlFactories_Impl() const
@@ -813,7 +801,7 @@ SfxApplication::ChooseScript()
OSL_TRACE("create selector dialog");
const SfxViewFrame* pViewFrame = SfxViewFrame::Current();
- const SfxFrame* pFrame = pViewFrame ? pViewFrame->GetFrame() : NULL;
+ const SfxFrame* pFrame = pViewFrame ? &pViewFrame->GetFrame() : NULL;
uno::Reference< frame::XFrame > xFrame( pFrame ? pFrame->GetFrameInterface() : uno::Reference< frame::XFrame >() );
AbstractScriptSelectorDialog* pDlg =
diff --git a/sfx2/source/appl/app.hrc b/sfx2/source/appl/app.hrc
index c08f46effc81..dca172269443 100644
--- a/sfx2/source/appl/app.hrc
+++ b/sfx2/source/appl/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.49 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -258,6 +255,18 @@
#define STR_DDE_ERROR (RID_SFX_APP_START + 193)
#define RID_SECURITY_WARNING_NO_HYPERLINKS (RID_SFX_APP_START + 194)
+#define RID_SVXSTR_FILELINK (RID_SFX_APP_START + 195)
+#define RID_SVXSTR_GRAFIKLINK (RID_SFX_APP_START + 196)
+#define RID_SVXSTR_EDITGRFLINK (RID_SFX_APP_START + 197)
+
+// strings for error messsages of OpenGraphics dialog
+#define RID_SVXSTR_GRFILTER_OPENERROR (RID_SFX_APP_START + 198)
+#define RID_SVXSTR_GRFILTER_IOERROR (RID_SFX_APP_START + 199)
+#define RID_SVXSTR_GRFILTER_FORMATERROR (RID_SFX_APP_START + 200)
+#define RID_SVXSTR_GRFILTER_VERSIONERROR (RID_SFX_APP_START + 201)
+#define RID_SVXSTR_GRFILTER_FILTERERROR (RID_SFX_APP_START + 202)
+#define RID_SVXSTR_GRFILTER_TOOBIG (RID_SFX_APP_START + 203)
+
#define MD_DDE_LINKEDIT (RID_SFX_APP_START + 1)
#endif // #ifndef _SFX_APP_HRC
diff --git a/sfx2/source/appl/app.src b/sfx2/source/appl/app.src
index 463788d2d6d0..0858e66e7347 100644
--- a/sfx2/source/appl/app.src
+++ b/sfx2/source/appl/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.122 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -655,11 +652,6 @@ ToolBox RID_ENVTOOLBOX
};
ToolBoxItem
{
- Identifier = SID_BROWSE_STOP ;
- Hide = TRUE;
- };
- ToolBoxItem
- {
Type = TOOLBOXITEM_SEPARATOR ;
};
ToolBoxItem
@@ -1061,3 +1053,42 @@ Image IMG_MISSING_4
{
ImageBitmap = Bitmap { File = "sn064.bmp" ; };
};
+
+String RID_SVXSTR_FILELINK
+{
+ Text [ en-US ] = "Document" ;
+};
+String RID_SVXSTR_GRAFIKLINK
+{
+ Text [ en-US ] = "Graphic" ;
+};
+String RID_SVXSTR_EDITGRFLINK
+{
+ Text [ en-US ] = "Link graphics" ;
+};
+
+String RID_SVXSTR_GRFILTER_OPENERROR
+{
+ Text [ en-US ] = "Graphics file cannot be opened" ;
+};
+String RID_SVXSTR_GRFILTER_IOERROR
+{
+ Text [ en-US ] = "Graphics file cannot be read" ;
+};
+String RID_SVXSTR_GRFILTER_FORMATERROR
+{
+ Text [ en-US ] = "Unknown graphics format" ;
+};
+String RID_SVXSTR_GRFILTER_VERSIONERROR
+{
+ Text [ en-US ] = "This version of the graphics file is not supported" ;
+};
+String RID_SVXSTR_GRFILTER_FILTERERROR
+{
+ Text [ en-US ] = "Graphics filter not found" ;
+};
+String RID_SVXSTR_GRFILTER_TOOBIG
+{
+ Text [ en-US ] = "Not enough memory to insert graphic" ;
+};
+
diff --git a/sfx2/source/appl/appbas.cxx b/sfx2/source/appl/appbas.cxx
index 4fe352c3c4bc..10c4a6bc6797 100644
--- a/sfx2/source/appl/appbas.cxx
+++ b/sfx2/source/appl/appbas.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: appbas.cxx,v $
- * $Revision: 1.52 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -89,7 +86,7 @@
#define ITEMID_SEARCH SID_SEARCH_ITEM
-#include <sfx2/srchitem.hxx>
+#include <svl/srchitem.hxx>
#include <vos/socket.hxx>
#define SFX_TYPEMAP
@@ -354,7 +351,7 @@ void SfxApplication::EnterBasicCall()
}
// die SbxObjects der SfxShells auf den Stacks der Frames erzeugen
- for ( SfxViewFrame *pFrame = SfxViewFrame::GetFirst(0,0,sal_False);
+ for ( SfxViewFrame *pFrame = SfxViewFrame::GetFirst(0,sal_False);
pFrame;
pFrame = SfxViewFrame::GetNext(*pFrame,0,0,sal_False) )
{
@@ -425,16 +422,6 @@ void SfxApplication::PropExec_Impl( SfxRequest &rReq )
break;
}
- case SID_WIN_POSSIZE:
- {
- break;
- }
-
- case SID_INTERACTIVEMODE:
- {
- break;
- }
-
case SID_ATTR_UNDO_COUNT:
{
SFX_REQUEST_ARG(rReq, pCountItem, SfxUInt16Item, nSID, sal_False);
diff --git a/sfx2/source/appl/appbaslib.cxx b/sfx2/source/appl/appbaslib.cxx
index 35f743a5aec7..96c998b2674d 100644
--- a/sfx2/source/appl/appbaslib.cxx
+++ b/sfx2/source/appl/appbaslib.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: appbaslib.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/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx
index 5638800a9e4f..6afa8c68ed83 100644
--- a/sfx2/source/appl/appcfg.cxx
+++ b/sfx2/source/appl/appcfg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: appcfg.cxx,v $
- * $Revision: 1.74 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -271,14 +268,6 @@ BOOL SfxApplication::GetOptions( SfxItemSet& rSet )
bRet = FALSE;
}
break;
- case SID_ATTR_SAVEDOCWINS :
- {
- bRet = TRUE;
- if (!aSaveOptions.IsReadOnly(SvtSaveOptions::E_SAVEDOCWINS))
- if (!rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_SAVEDOCWINS ), aSaveOptions.IsSaveDocWins())))
- bRet = FALSE;
- }
- break;
case SID_ATTR_SAVEDOCVIEW :
{
bRet = TRUE;
@@ -630,13 +619,6 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet )
aSaveOptions.SetSaveWorkingSet(((const SfxBoolItem *)pItem)->GetValue());
}
- // offene Fenster speichern
- if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_SAVEDOCWINS), TRUE, &pItem))
- {
- DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
- aSaveOptions.SetSaveDocWins(((const SfxBoolItem *)pItem)->GetValue());
- }
-
// Fenster-Einstellung speichern
if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_SAVEDOCVIEW), TRUE, &pItem))
{
diff --git a/sfx2/source/appl/appchild.cxx b/sfx2/source/appl/appchild.cxx
index 5817337ae60d..b18fc905abdc 100644
--- a/sfx2/source/appl/appchild.cxx
+++ b/sfx2/source/appl/appchild.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: appchild.cxx,v $
- * $Revision: 1.10 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -170,9 +167,9 @@ SfxTemplateDialog* SfxApplication::GetTemplateDialog()
SfxWorkWindow* SfxApplication::GetWorkWindow_Impl(const SfxViewFrame *pFrame) const
{
if ( pFrame )
- return pFrame->GetFrame()->GetWorkWindow_Impl();
+ return pFrame->GetFrame().GetWorkWindow_Impl();
else if ( pAppData_Impl->pViewFrame )
- return pAppData_Impl->pViewFrame->GetFrame()->GetWorkWindow_Impl();
+ return pAppData_Impl->pViewFrame->GetFrame().GetWorkWindow_Impl();
else
return NULL;
}
diff --git a/sfx2/source/appl/appdata.cxx b/sfx2/source/appl/appdata.cxx
index e53a4cacdb93..a07623df46b1 100644
--- a/sfx2/source/appl/appdata.cxx
+++ b/sfx2/source/appl/appdata.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: appdata.cxx,v $
- * $Revision: 1.30 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -101,7 +98,6 @@ SfxAppData_Impl::SfxAppData_Impl( SfxApplication* pApp ) :
pTopFrames( new SfxFrameArr_Impl ),
pInitLinkList(0),
pMatcher( 0 ),
- pCancelMgr( 0 ),
pLabelResMgr( 0 ),
pAppDispatch(NULL),
pTemplates( 0 ),
@@ -151,7 +147,6 @@ SfxAppData_Impl::~SfxAppData_Impl()
{
DeInitDDE();
delete pTopFrames;
- delete pCancelMgr;
delete pSecureURLs;
delete pBasicManager;
diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx
index f5b3a2e6dca1..808731f8bba8 100644
--- a/sfx2/source/appl/appdde.cxx
+++ b/sfx2/source/appl/appdde.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: appdde.cxx,v $
- * $Revision: 1.19.142.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -49,7 +46,7 @@
#include "appdata.hxx"
#include <sfx2/objsh.hxx>
#include <sfx2/viewfrm.hxx>
-#include <sfx2/topfrm.hxx>
+#include <sfx2/viewfrm.hxx>
#include <sfx2/dispatch.hxx>
#include "sfxtypes.hxx"
#include <sfx2/sfxsids.hrc>
@@ -596,17 +593,12 @@ BOOL ImplDdeService::MakeTopic( const String& rNm )
// dann versuche die Datei zu laden:
SfxStringItem aName( SID_FILE_NAME, aFile.GetMainURL( INetURLObject::NO_DECODE ) );
SfxBoolItem aNewView(SID_OPEN_NEW_VIEW, TRUE);
-// SfxBoolItem aHidden(SID_HIDDEN, TRUE);
- // minimiert!
- SfxUInt16Item aViewStat( SID_VIEW_ZOOM_MODE, 0 );
- SfxRectangleItem aRectItem( SID_VIEW_POS_SIZE, Rectangle() );
SfxBoolItem aSilent(SID_SILENT, TRUE);
SfxDispatcher* pDispatcher = SFX_APP()->GetDispatcher_Impl();
const SfxPoolItem* pRet = pDispatcher->Execute( SID_OPENDOC,
SFX_CALLMODE_SYNCHRON,
&aName, &aNewView,
- &aViewStat,&aRectItem/*aHidden*/,
&aSilent, 0L );
if( pRet && pRet->ISA( SfxViewFrameItem ) &&
@@ -632,7 +624,7 @@ String ImplDdeService::Topics()
SfxObjectShell* pShell = SfxObjectShell::GetFirst( &aType );
while( pShell )
{
- if( SfxViewFrame::GetFirst( pShell, TYPE(SfxTopViewFrame) ))
+ if( SfxViewFrame::GetFirst( pShell ) )
{
if( sRet.Len() )
sRet += '\t';
diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx
index 837ccc461586..a34a2e0d6a32 100644
--- a/sfx2/source/appl/appinit.cxx
+++ b/sfx2/source/appl/appinit.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: appinit.cxx,v $
- * $Revision: 1.65 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -276,8 +273,6 @@ FASTBOOL SfxApplication::Initialize_Impl()
new SfxErrorHandler(
RID_SO_ERROR_HANDLER, ERRCODE_AREA_SO, ERRCODE_AREA_SO_END);
new SfxErrorHandler(
- (RID_SJ_START +1), ERRCODE_AREA_JAVA, ERRCODE_AREA_JAVA_END);
- new SfxErrorHandler(
RID_BASIC_START, ERRCODE_AREA_SBX, ERRCODE_AREA_SBX_END );
// diverse Pointer
diff --git a/sfx2/source/appl/appmain.cxx b/sfx2/source/appl/appmain.cxx
index 253311c54f3d..020f68d01e8d 100644
--- a/sfx2/source/appl/appmain.cxx
+++ b/sfx2/source/appl/appmain.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: appmain.cxx,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/sfx2/source/appl/appmisc.cxx b/sfx2/source/appl/appmisc.cxx
index 1bb12990cb42..70147e8d9146 100644
--- a/sfx2/source/appl/appmisc.cxx
+++ b/sfx2/source/appl/appmisc.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: appmisc.cxx,v $
- * $Revision: 1.58 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -89,7 +86,7 @@
#include <sfx2/templdlg.hxx>
#include <sfx2/module.hxx>
#include <sfx2/msgpool.hxx>
-#include <sfx2/topfrm.hxx>
+#include <sfx2/viewfrm.hxx>
#include "openflag.hxx"
#include <sfx2/viewsh.hxx>
#include <sfx2/objface.hxx>
@@ -329,13 +326,6 @@ ISfxTemplateCommon* SfxApplication::GetCurrentTemplateCommon( SfxBindings& rBind
return 0;
}
-SfxCancelManager* SfxApplication::GetCancelManager() const
-{
- if ( !pAppData_Impl->pCancelMgr )
- pAppData_Impl->pCancelMgr = new SfxCancelManager;
- return pAppData_Impl->pCancelMgr;
-}
-
SfxResourceManager& SfxApplication::GetResourceManager() const { return *pAppData_Impl->pResMgr; }
BOOL SfxApplication::IsDowning() const { return pAppData_Impl->bDowning; }
SfxDispatcher* SfxApplication::GetAppDispatcher_Impl() { return pAppData_Impl->pAppDispat; }
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index 469a198db64e..89bb5f23f1de 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: appopen.cxx,v $
- * $Revision: 1.121.96.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -104,7 +101,7 @@
#include "sfxresid.hxx"
#include <sfx2/viewsh.hxx>
#include "app.hrc"
-#include <sfx2/topfrm.hxx>
+#include <sfx2/viewfrm.hxx>
#include <sfx2/sfxuno.hxx>
#include <sfx2/objface.hxx>
#include <sfx2/filedlghelper.hxx>
@@ -196,7 +193,7 @@ SfxObjectShellRef SfxApplication::DocAlreadyLoaded
// Vergleiche anhand der URLs
INetURLObject aUrl( xDoc->GetMedium()->GetName() );
if ( !aUrl.HasError() && aUrl == aUrlToFind &&
- (!bForbidVisible || !SfxViewFrame::GetFirst( xDoc, 0, TRUE )) &&
+ (!bForbidVisible || !SfxViewFrame::GetFirst( xDoc, TRUE )) &&
!xDoc->IsLoading())
{
break;
@@ -213,12 +210,10 @@ SfxObjectShellRef SfxApplication::DocAlreadyLoaded
DBG_ASSERT(
!bForbidVisible, "Unsichtbares kann nicht aktiviert werden" );
- SfxTopViewFrame *pFrame;
- for( pFrame = (SfxTopViewFrame*)
- SfxViewFrame::GetFirst( xDoc, TYPE(SfxTopViewFrame) );
+ SfxViewFrame* pFrame;
+ for( pFrame = SfxViewFrame::GetFirst( xDoc );
pFrame && !pFrame->IsVisible();
- pFrame = (SfxTopViewFrame*)
- SfxViewFrame::GetNext( *pFrame, xDoc, TYPE(SfxTopViewFrame) ) ) ;
+ pFrame = SfxViewFrame::GetNext( *pFrame, xDoc ) ) ;
if ( pFrame )
{
SfxViewFrame *pCur = SfxViewFrame::Current();
@@ -514,65 +509,6 @@ ULONG SfxApplication::LoadTemplate( SfxObjectShellLock& xDoc, const String &rFil
//--------------------------------------------------------------------
-SfxObjectShellLock SfxApplication::NewDoc_Impl( const String& rFact, const SfxItemSet *pSet )
-{
- SfxObjectShellLock xDoc;
- String aFact( rFact );
- String aPrefix = String::CreateFromAscii( "private:factory/" );
- if ( aPrefix.Len() == aFact.Match( aPrefix ) )
- aFact.Erase( 0, aPrefix.Len() );
- USHORT nPos = aFact.Search( '?' );
- String aParam;
- if ( nPos != STRING_NOTFOUND )
- {
- aParam = aFact.Copy( nPos, aFact.Len() );
- aFact.Erase( nPos, aFact.Len() );
- aParam.Erase(0,1);
- }
-
- xDoc = SfxObjectShell::CreateObjectByFactoryName( aFact );
- aParam = INetURLObject::decode( aParam, '%', INetURLObject::DECODE_WITH_CHARSET );
- if( xDoc.Is() )
- xDoc->DoInitNew_Impl( aParam );
-
- if ( xDoc.Is() )
- {
- if ( pSet )
- {
- // TODO/LATER: Should the other arguments be transfered as well?
- SFX_ITEMSET_ARG( pSet, pDefaultPathItem, SfxStringItem, SID_DEFAULTFILEPATH, FALSE);
- if ( pDefaultPathItem )
- xDoc->GetMedium()->GetItemSet()->Put( *pDefaultPathItem );
- SFX_ITEMSET_ARG( pSet, pDefaultNameItem, SfxStringItem, SID_DEFAULTFILENAME, FALSE);
- if ( pDefaultNameItem )
- xDoc->GetMedium()->GetItemSet()->Put( *pDefaultNameItem );
- SFX_ITEMSET_ARG( pSet, pTitleItem, SfxStringItem, SID_DOCINFO_TITLE, FALSE );
- if ( pTitleItem )
- xDoc->GetMedium()->GetItemSet()->Put( *pTitleItem );
- }
-
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > xModel ( xDoc->GetModel(), ::com::sun::star::uno::UNO_QUERY );
- if ( xModel.is() )
- {
- SfxItemSet* pNew = xDoc->GetMedium()->GetItemSet()->Clone();
- pNew->ClearItem( SID_PROGRESS_STATUSBAR_CONTROL );
- ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aArgs;
- TransformItems( SID_OPENDOC, *pNew, aArgs );
-
- sal_Int32 nLength = aArgs.getLength();
- aArgs.realloc( nLength + 1 );
-
- aArgs[nLength].Name = DEFINE_CONST_UNICODE("Title");
- aArgs[nLength].Value <<= ::rtl::OUString( xDoc->GetTitle( SFX_TITLE_DETECT ) );
-
- xModel->attachResource( ::rtl::OUString(), aArgs );
- delete pNew;
- }
- }
-
- return xDoc;
-}
-
void SfxApplication::NewDocDirectExec_Impl( SfxRequest& rReq )
{
DBG_MEMTEST();
@@ -606,131 +542,6 @@ void SfxApplication::NewDocDirectExec_Impl( SfxRequest& rReq )
rReq.SetReturnValue( SfxFrameItem( 0, pItem->GetFrame() ) );
}
-const SfxPoolItem* SfxApplication::NewDocDirectExec_ImplOld( SfxRequest& rReq )
-{
- DBG_MEMTEST();
-/*
- SFX_REQUEST_ARG(rReq, pHidden, SfxBoolItem, SID_HIDDEN, FALSE);
-//(mba)/task
-
- if ( !pHidden || !pHidden->GetValue() )
- Application::GetAppWindow()->EnterWait();
-*/
- SfxObjectShellLock xDoc;
-
- // Factory-RegNo kann per Parameter angegeben sein
- SfxErrorContext aEc(ERRCTX_SFX_NEWDOCDIRECT);
- rReq.GetArgs(); // -Wall required??
- String aFactory;
- rReq.AppendItem( SfxBoolItem( SID_TEMPLATE, TRUE ) );
- SFX_REQUEST_ARG( rReq, pFactoryName, SfxStringItem, SID_NEWDOCDIRECT, FALSE );
- if( pFactoryName )
- aFactory = pFactoryName->GetValue();
- else
- aFactory = SvtModuleOptions().GetDefaultModuleName();
-
- SFX_REQUEST_ARG( rReq, pFileFlagsItem, SfxStringItem, SID_OPTIONS, FALSE);
- if ( pFileFlagsItem )
- {
- // Werte auf einzelne Items verteilen
- String aFileFlags = pFileFlagsItem->GetValue();
- aFileFlags.ToUpperAscii();
- if ( STRING_NOTFOUND != aFileFlags.Search( 0x0054 ) ) // T = 54h
- rReq.AppendItem( SfxBoolItem( SID_TEMPLATE, TRUE ) );
- if ( STRING_NOTFOUND != aFileFlags.Search( 0x0048 ) ) // H = 48h
- rReq.AppendItem( SfxBoolItem( SID_HIDDEN, TRUE ) );
- if ( STRING_NOTFOUND != aFileFlags.Search( 0x0052 ) ) // R = 52h
- rReq.AppendItem( SfxBoolItem( SID_DOC_READONLY, TRUE ) );
- if ( STRING_NOTFOUND != aFileFlags.Search( 0x0042 ) ) // B = 42h
- rReq.AppendItem( SfxBoolItem( SID_PREVIEW, TRUE ) );
- if ( STRING_NOTFOUND != aFileFlags.Search( 0x0053 ) ) // S = 53h
- rReq.AppendItem( SfxBoolItem( SID_SILENT, TRUE ) );
- }
-
- xDoc = NewDoc_Impl( aFactory, rReq.GetArgs() );
- if ( xDoc.Is() )
- {
- SFX_REQUEST_ARG(rReq, pReadonly, SfxBoolItem, SID_DOC_READONLY, FALSE);
- if ( pReadonly )
- xDoc->GetMedium()->GetItemSet()->Put( *pReadonly );
-
- SFX_REQUEST_ARG(rReq, pPreview, SfxBoolItem, SID_PREVIEW, FALSE);
- if ( pPreview )
- xDoc->GetMedium()->GetItemSet()->Put( *pPreview );
-
- SFX_REQUEST_ARG(rReq, pSilent, SfxBoolItem, SID_SILENT, FALSE);
- if ( pSilent )
- xDoc->GetMedium()->GetItemSet()->Put( *pSilent );
-
- SFX_REQUEST_ARG(rReq, pFlags, SfxStringItem, SID_OPTIONS, FALSE);
- if ( pFlags )
- xDoc->GetMedium()->GetItemSet()->Put( *pFlags );
- }
-
- // View erzeugen
- if ( xDoc.Is() )
- {
- SFX_REQUEST_ARG(rReq, pHidden, SfxBoolItem, SID_HIDDEN, FALSE);
- BOOL bHidden = FALSE;
- if ( pHidden )
- {
- xDoc->GetMedium()->GetItemSet()->Put( *pHidden, SID_HIDDEN );
- bHidden = pHidden->GetValue();
- }
-
- SFX_REQUEST_ARG(rReq, pViewId, SfxUInt16Item, SID_VIEW_ID, FALSE);
- USHORT nViewId = 0;
- if ( pViewId )
- {
- xDoc->GetMedium()->GetItemSet()->Put( *pViewId, SID_VIEW_ID );
- nViewId = pViewId->GetValue();
- }
-
- xDoc->SetActivateEvent_Impl( SFX_EVENT_CREATEDOC );
-// xDoc->Get_Impl()->nLoadedFlags = SFX_LOADED_ALL;
- const SfxItemSet* pInternalArgs = rReq.GetInternalArgs_Impl();
- if( pInternalArgs )
- xDoc->GetMedium()->GetItemSet()->Put( *pInternalArgs );
- SFX_REQUEST_ARG(rReq, pFrameItem, SfxFrameItem, SID_DOCFRAME, FALSE);
-
- SfxFrame* pFrame = NULL;
- if (pFrameItem)
- pFrame = pFrameItem->GetFrame();
- else
- pFrame = (SfxFrame*)SfxTopFrame::Create(xDoc, nViewId, bHidden, pInternalArgs);
- if ( pFrame )
- {
- if ( pFrame->GetCurrentDocument() == xDoc || pFrame->PrepareClose_Impl( TRUE, TRUE ) == TRUE )
- {
- if ( bHidden )
- {
- xDoc->RestoreNoDelete();
- xDoc->OwnerLock( TRUE );
- xDoc->Get_Impl()->bHiddenLockedByAPI = TRUE;
- }
-
- if ( pFrame->GetCurrentDocument() != xDoc )
- {
- if ( pFrame->InsertDocument( xDoc ) )
- rReq.SetReturnValue( SfxFrameItem( 0, pFrame ) );
- else
- xDoc->DoClose();
- }
- }
- else
- xDoc.Clear();
- }
- }
-
- return rReq.GetReturnValue();
-
-//(mba)/task
-/*
- if ( !pHidden || !pHidden->GetValue() )
- Application::GetAppWindow()->LeaveWait();
- */
-}
-
//--------------------------------------------------------------------
void SfxApplication::NewDocExec_Impl( SfxRequest& rReq )
@@ -1306,12 +1117,22 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
return;
}
- SFX_REQUEST_ARG(rReq, pFrmItem, SfxFrameItem, SID_DOCFRAME, FALSE);
- SfxFrame *pFrame = NULL;
- if ( pFrmItem )
- pFrame = pFrmItem->GetFrame();
- else if ( SfxViewFrame::Current() )
- pFrame = SfxViewFrame::Current()->GetFrame();
+ SfxFrame* pTargetFrame = NULL;
+ Reference< XFrame > xTargetFrame;
+
+ SFX_REQUEST_ARG(rReq, pFrameItem, SfxFrameItem, SID_DOCFRAME, FALSE);
+ if ( pFrameItem )
+ pTargetFrame = pFrameItem->GetFrame();
+
+ if ( !pTargetFrame )
+ {
+ SFX_REQUEST_ARG(rReq, pUnoFrameItem, SfxUnoFrameItem, SID_FILLFRAME, FALSE);
+ if ( pUnoFrameItem )
+ xTargetFrame = pUnoFrameItem->GetFrame();
+ }
+
+ if ( !pTargetFrame && !xTargetFrame.is() && SfxViewFrame::Current() )
+ pTargetFrame = &SfxViewFrame::Current()->GetFrame();
// check if caller has set a callback
SFX_REQUEST_ARG(rReq, pLinkItem, SfxLinkItem, SID_DONELINK, FALSE );
@@ -1322,21 +1143,6 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
rReq.RemoveItem( SID_DONELINK );
- // check if caller wants to create a view
- BOOL bCreateView = TRUE;
- SFX_REQUEST_ARG( rReq, pCreateViewItem, SfxBoolItem, SID_VIEW, FALSE );
- if ( pCreateViewItem )
- {
- if ( !pCreateViewItem->GetValue() )
- bCreateView = FALSE;
- // this is an "SFX only" parameter
- rReq.RemoveItem( SID_VIEW );
- }
-
- // we can't load without a view - switch to hidden view
- if ( !bCreateView )
- rReq.AppendItem( SfxBoolItem( SID_HIDDEN, TRUE ) );
-
// check if the view must be hidden
BOOL bHidden = FALSE;
SFX_REQUEST_ARG(rReq, pHidItem, SfxBoolItem, SID_HIDDEN, FALSE);
@@ -1388,18 +1194,24 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
// {
// if a frame is given, it must be used for the starting point of the targetting mechanism
// this code is also used if asynchronous loading is possible, because loadComponent always is synchron
- Reference < XFrame > xFrame;
- if ( pFrame )
- xFrame = pFrame->GetFrameInterface();
- else
- xFrame = Reference < XFrame >( ::comphelper::getProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.frame.Desktop")), UNO_QUERY );
+ if ( !xTargetFrame.is() )
+ {
+ if ( pTargetFrame )
+ {
+ xTargetFrame = pTargetFrame->GetFrameInterface();
+ }
+ else
+ {
+ xTargetFrame.set( ::comphelper::getProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.frame.Desktop")), UNO_QUERY );
+ }
+ }
// make URL ready
SFX_REQUEST_ARG( rReq, pURLItem, SfxStringItem, SID_FILE_NAME, FALSE );
aFileName = pURLItem->GetValue();
if( aFileName.Len() && aFileName.GetChar(0) == '#' ) // Mark without URL
{
- SfxViewFrame *pView = pFrame ? pFrame->GetCurrentViewFrame() : 0;
+ SfxViewFrame *pView = pTargetFrame ? pTargetFrame->GetCurrentViewFrame() : 0;
if ( !pView )
pView = SfxViewFrame::Current();
pView->GetViewShell()->JumpToMark( aFileName.Copy(1) );
@@ -1417,13 +1229,13 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
// if loading must be done synchron, we must wait for completion to get a return value
// find frame by myself; I must konw the exact frame to get the controller for the return value from it
//if( aTarget.getLength() )
- // xFrame = xFrame->findFrame( aTarget, FrameSearchFlag::ALL );
+ // xTargetFrame = xTargetFrame->findFrame( aTarget, FrameSearchFlag::ALL );
Reference < XComponent > xComp;
try
{
- xComp = ::comphelper::SynchronousDispatch::dispatch( xFrame, aFileName, aTarget, 0, aArgs );
-// Reference < XComponentLoader > xLoader( xFrame, UNO_QUERY );
+ xComp = ::comphelper::SynchronousDispatch::dispatch( xTargetFrame, aFileName, aTarget, 0, aArgs );
+// Reference < XComponentLoader > xLoader( xTargetFrame, UNO_QUERY );
// xComp = xLoader->loadComponentFromURL( aFileName, aTarget, 0, aArgs );
}
catch(const RuntimeException&)
@@ -1448,7 +1260,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
Reference < XURLTransformer > xTrans( ::comphelper::getProcessServiceFactory()->createInstance( rtl::OUString::createFromAscii("com.sun.star.util.URLTransformer" )), UNO_QUERY );
xTrans->parseStrict( aURL );
- Reference < XDispatchProvider > xProv( xFrame, UNO_QUERY );
+ Reference < XDispatchProvider > xProv( xTargetFrame, UNO_QUERY );
Reference < XDispatch > xDisp = xProv.is() ? xProv->queryDispatch( aURL, aTarget, FrameSearchFlag::ALL ) : Reference < XDispatch >();;
RTL_LOGFILE_PRODUCT_CONTEXT( aLog2, "PERFORMANCE - SfxApplication::OpenDocExec_Impl" );
if ( xDisp.is() )
@@ -1494,7 +1306,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
{
if ( pShell->GetController() == xController )
{
- pCntrFrame = pShell->GetViewFrame()->GetFrame();
+ pCntrFrame = &pShell->GetViewFrame()->GetFrame();
break;
}
}
@@ -1504,12 +1316,9 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
SfxObjectShell* pSh = pCntrFrame->GetCurrentDocument();
DBG_ASSERT( pSh, "Controller without ObjectShell ?!" );
- if ( bCreateView )
- rReq.SetReturnValue( SfxViewFrameItem( 0, pCntrFrame->GetCurrentViewFrame() ) );
- else
- rReq.SetReturnValue( SfxObjectItem( 0, pSh ) );
+ rReq.SetReturnValue( SfxViewFrameItem( 0, pCntrFrame->GetCurrentViewFrame() ) );
- if( ( bHidden || !bCreateView ) )
+ if ( bHidden )
pSh->RestoreNoDelete();
}
}
diff --git a/sfx2/source/appl/appquit.cxx b/sfx2/source/appl/appquit.cxx
index 63d33e54997b..4da32cf9f566 100644
--- a/sfx2/source/appl/appquit.cxx
+++ b/sfx2/source/appl/appquit.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: appquit.cxx,v $
- * $Revision: 1.45 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -119,9 +116,6 @@ BOOL SfxApplication::QueryExit_Impl()
}
}
*/
- // alles canceln was zu canceln ist
- GetCancelManager()->Cancel(TRUE);
-
/*
SfxObjectShell *pLastDocSh = SfxObjectShell::GetFirst();
if ( bQuit )
diff --git a/sfx2/source/appl/appreg.cxx b/sfx2/source/appl/appreg.cxx
index 9e688f885e3c..47bf98292316 100644
--- a/sfx2/source/appl/appreg.cxx
+++ b/sfx2/source/appl/appreg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: appreg.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,7 +43,7 @@
#include "stbitem.hxx"
#include <sfx2/navigat.hxx>
#include <sfx2/module.hxx>
-#include <sfx2/topfrm.hxx>
+#include <sfx2/viewfrm.hxx>
#include "partwnd.hxx"
#include <sfx2/sfxsids.hrc>
#include "recfloat.hxx"
@@ -62,7 +59,6 @@ void SfxApplication::Registrations_Impl()
SfxApplication::RegisterInterface();
SfxModule::RegisterInterface();
SfxViewFrame::RegisterInterface();
- SfxTopViewFrame::RegisterInterface();
SfxObjectShell::RegisterInterface();
SfxViewShell::RegisterInterface();
@@ -76,7 +72,6 @@ void SfxApplication::Registrations_Impl()
// Controller
SfxToolBoxControl::RegisterControl(SID_REPEAT);
SfxURLToolBoxControl_Impl::RegisterControl(SID_OPENURL);
- SfxCancelToolBoxControl_Impl::RegisterControl(SID_BROWSE_STOP);
SfxAppToolBoxControl_Impl::RegisterControl( SID_NEWDOCDIRECT );
SfxAppToolBoxControl_Impl::RegisterControl( SID_AUTOPILOTMENU );
};
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 4580a11270e0..14789100bb24 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: appserv.cxx,v $
- * $Revision: 1.78 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -71,7 +68,6 @@
#include <tools/config.hxx>
#include <tools/diagnose_ex.h>
#include <vcl/msgbox.hxx>
-#include <svl/cancel.hxx>
#include <svl/intitem.hxx>
#include <svl/eitem.hxx>
#include <svl/stritem.hxx>
@@ -96,9 +92,11 @@
#include <cppuhelper/exc_hlp.hxx>
#include <com/sun/star/script/provider/XScriptProviderFactory.hpp>
+#include <com/sun/star/frame/XModuleManager.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include "about.hxx"
+#include "frmload.hxx"
#include "referers.hxx"
#include <sfx2/app.hxx>
#include <sfx2/request.hxx>
@@ -132,7 +130,7 @@
#include "minfitem.hxx"
#include <sfx2/event.hxx>
#include <sfx2/module.hxx>
-#include <sfx2/topfrm.hxx>
+#include <sfx2/viewfrm.hxx>
#include "sfxpicklist.hxx"
#include "imestatuswindow.hxx"
#include <sfx2/sfxdlg.hxx>
@@ -265,9 +263,9 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
Reference< XFrame > xFrame;
const SfxItemSet* pIntSet = rReq.GetInternalArgs_Impl();
- SFX_ITEMSET_ARG( pIntSet, pFrame, SfxUnoAnyItem, SID_FILLFRAME, FALSE );
- if (pFrame)
- pFrame->GetValue() >>= xFrame;
+ SFX_ITEMSET_ARG( pIntSet, pFrameItem, SfxUnoFrameItem, SID_FILLFRAME, FALSE );
+ if ( pFrameItem )
+ xFrame = pFrameItem->GetFrame();
SfxAbstractTabDialog* pDlg = pFact->CreateTabDialog(
RID_SVXDLG_CUSTOMIZE,
@@ -551,8 +549,10 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
case SID_CRASH :
{
- GetpApp()->Exception( EXC_SYSTEM );
- abort();
+ // Provoke a crash:
+ char * crash = 0;
+ *crash = 0;
+ break;
}
case SID_SHOW_IME_STATUS_WINDOW:
@@ -823,6 +823,60 @@ namespace
}
return _pFallback;
}
+
+ const ::rtl::OUString& lcl_getBasicIDEServiceName()
+ {
+ static const ::rtl::OUString s_sBasicName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.script.BasicIDE" ) );
+ return s_sBasicName;
+ }
+
+ SfxViewFrame* lcl_getBasicIDEViewFrame( SfxObjectShell* i_pBasicIDE )
+ {
+ SfxViewFrame* pView = SfxViewFrame::GetFirst( i_pBasicIDE );
+ while ( pView )
+ {
+ if ( pView->GetObjectShell()->GetFactory().GetDocumentServiceName() == lcl_getBasicIDEServiceName() )
+ break;
+ pView = SfxViewFrame::GetNext( *pView, i_pBasicIDE );
+ }
+ return pView;
+ }
+ Reference< XFrame > lcl_findStartModuleFrame( const ::comphelper::ComponentContext& i_rContext )
+ {
+ try
+ {
+ Reference < XFramesSupplier > xSupplier( i_rContext.createComponent( "com.sun.star.frame.Desktop" ), UNO_QUERY_THROW );
+ Reference < XIndexAccess > xContainer( xSupplier->getFrames(), UNO_QUERY_THROW );
+
+ Reference< XModuleManager > xCheck( i_rContext.createComponent( "com.sun.star.frame.ModuleManager" ), UNO_QUERY_THROW );
+
+ sal_Int32 nCount = xContainer->getCount();
+ for ( sal_Int32 i=0; i<nCount; ++i )
+ {
+ try
+ {
+ Reference < XFrame > xFrame( xContainer->getByIndex(i), UNO_QUERY_THROW );
+ ::rtl::OUString sModule = xCheck->identify( xFrame );
+ if ( sModule.equalsAscii( "com.sun.star.frame.StartModule" ) )
+ return xFrame;
+ }
+ catch( const UnknownModuleException& )
+ {
+ // silence
+ }
+ catch(const Exception&)
+ {
+ // re-throw, caught below
+ throw;
+ }
+ }
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ return NULL;
+ }
}
void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
@@ -840,7 +894,10 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
const SfxPoolItem* pItem = NULL;
Reference < XFrame > xFrame;
if ( pArgs && pArgs->GetItemState( SID_FILLFRAME, sal_False, &pItem ) == SFX_ITEM_SET )
- ( (SfxUnoAnyItem*)pItem )->GetValue() >>= xFrame;
+ {
+ OSL_ENSURE( pItem->ISA( SfxUnoFrameItem ), "SfxApplication::OfaExec_Impl: XFrames are to be transported via SfxUnoFrameItem by now!" );
+ xFrame = static_cast< const SfxUnoFrameItem*>( pItem )->GetFrame();
+ }
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
if ( pFact )
{
@@ -903,26 +960,46 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
case SID_BASICIDE_APPEAR:
{
- SfxViewFrame* pView = SfxViewFrame::GetFirst();
- ::rtl::OUString aBasicName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.script.BasicIDE" ) );
- while ( pView )
- {
- if ( pView->GetObjectShell()->GetFactory().GetDocumentServiceName() == aBasicName )
- break;
- pView = SfxViewFrame::GetNext( *pView );
- }
-
+ SfxViewFrame* pView = lcl_getBasicIDEViewFrame( NULL );
if ( !pView )
{
- SfxObjectShell* pDocShell = SfxObjectShell::CreateObject( aBasicName );
- pDocShell->DoInitNew( 0 );
- pDocShell->SetModified( FALSE );
- pView = SfxViewFrame::CreateViewFrame( *pDocShell, 0 );
- pView->SetName( String( RTL_CONSTASCII_USTRINGPARAM( "BASIC:1" ) ) );
+ SfxObjectShell* pBasicIDE = SfxObjectShell::CreateObject( lcl_getBasicIDEServiceName() );
+ pBasicIDE->DoInitNew( 0 );
+ pBasicIDE->SetModified( FALSE );
+ try
+ {
+ // load the Basic IDE via direct access to the SFX frame loader. A generic loadComponentFromURL
+ // (which could be done via SfxViewFrame::LoadDocumentIntoFrame) is not feasible here, since the Basic IDE
+ // does not really play nice with the framework's concept. For instance, it is a "singleton document",
+ // which conflicts, at the latest, with the framework's concept of loading into _blank frames.
+ // So, since we know that our frame loader can handle it, we skip the generic framework loader
+ // mechanism, and the type detection (which doesn't know about the Basic IDE).
+ ::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() );
+ Reference< XSynchronousFrameLoader > xLoader( aContext.createComponent(
+ SfxFrameLoader_Impl::impl_getStaticImplementationName() ), UNO_QUERY_THROW );
+ ::comphelper::NamedValueCollection aLoadArgs;
+ aLoadArgs.put( "Model", pBasicIDE->GetModel() );
+ aLoadArgs.put( "URL", ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "private:factory/sbasic" ) ) );
+
+ Reference< XFrame > xTargetFrame( lcl_findStartModuleFrame( aContext ) );
+ if ( !xTargetFrame.is() )
+ xTargetFrame = SfxFrame::CreateBlankFrame();
+ ENSURE_OR_THROW( xTargetFrame.is(), "could not obtain a frameto load the Basic IDE into!" );
+
+ xLoader->load( aLoadArgs.getPropertyValues(), xTargetFrame );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+
+ pView = lcl_getBasicIDEViewFrame( pBasicIDE );
+ if ( pView )
+ pView->SetName( String( RTL_CONSTASCII_USTRINGPARAM( "BASIC:1" ) ) );
}
if ( pView )
- pView->GetFrame()->Appear();
+ pView->GetFrame().Appear();
const SfxItemSet* pArgs = rReq.GetArgs();
if ( pArgs && pView )
@@ -989,16 +1066,15 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
Reference< XFrame > xFrame;
const SfxItemSet* pIntSet = rReq.GetInternalArgs_Impl();
- SFX_ITEMSET_ARG( pIntSet, pFrameItem, SfxUnoAnyItem, SID_FILLFRAME, FALSE );
+ SFX_ITEMSET_ARG( pIntSet, pFrameItem, SfxUnoFrameItem, SID_FILLFRAME, FALSE );
if ( pFrameItem )
- pFrameItem->GetValue() >>= xFrame;
+ xFrame = pFrameItem->GetFrame();
if ( !xFrame.is() )
{
const SfxViewFrame* pViewFrame = SfxViewFrame::Current();
- const SfxFrame* pFrame = pViewFrame ? pViewFrame->GetFrame() : NULL;
- if ( pFrame )
- xFrame = pFrame->GetFrameInterface();
+ if ( pViewFrame )
+ xFrame = pViewFrame->GetFrame().GetFrameInterface();
}
do // artificial loop for flow control
diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx
index 7fb6ef35167f..fd33e21ea645 100644
--- a/sfx2/source/appl/appuno.cxx
+++ b/sfx2/source/appl/appuno.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: appuno.cxx,v $
- * $Revision: 1.131 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -147,54 +144,53 @@ using namespace ::com::sun::star::io;
#define FRAMELOADER_SERVICENAME "com.sun.star.frame.FrameLoader"
#define PROTOCOLHANDLER_SERVICENAME "com.sun.star.frame.ProtocolHandler"
-static const String sTemplateRegionName = String::CreateFromAscii( "TemplateRegionName" );
-static const String sTemplateName = String::CreateFromAscii( "TemplateName" );
-static const String sAsTemplate = String::CreateFromAscii( "AsTemplate" );
-static const String sOpenNewView = String::CreateFromAscii( "OpenNewView" );
-static const String sViewId = String::CreateFromAscii( "ViewId" );
-static const String sPluginMode = String::CreateFromAscii( "PluginMode" );
-static const String sReadOnly = String::CreateFromAscii( "ReadOnly" );
-static const String sStartPresentation = String::CreateFromAscii( "StartPresentation" );
-static const String sFrameName = String::CreateFromAscii( "FrameName" );
-static const String sMediaType = String::CreateFromAscii( "MediaType" );
-static const String sPostData = String::CreateFromAscii( "PostData" );
-static const String sCharacterSet = String::CreateFromAscii( "CharacterSet" );
-static const String sInputStream = String::CreateFromAscii( "InputStream" );
-static const String sStream = String::CreateFromAscii( "Stream" );
-static const String sOutputStream = String::CreateFromAscii( "OutputStream" );
-static const String sHidden = String::CreateFromAscii( "Hidden" );
-static const String sPreview = String::CreateFromAscii( "Preview" );
-static const String sViewOnly = String::CreateFromAscii( "ViewOnly" );
-static const String sDontEdit = String::CreateFromAscii( "DontEdit" );
-static const String sSilent = String::CreateFromAscii( "Silent" );
-static const String sJumpMark = String::CreateFromAscii( "JumpMark" );
-static const String sFileName = String::CreateFromAscii( "FileName" );
-static const String sSalvageURL = String::CreateFromAscii( "SalvagedFile" );
-static const String sStatusInd = String::CreateFromAscii( "StatusIndicator" );
-static const String sModel = String::CreateFromAscii( "Model" );
-static const String sFrame = String::CreateFromAscii( "Frame" );
-static const String sViewData = String::CreateFromAscii( "ViewData" );
-static const String sFilterData = String::CreateFromAscii( "FilterData" );
-static const String sSelectionOnly = String::CreateFromAscii( "SelectionOnly" );
-static const String sFilterFlags = String::CreateFromAscii( "FilterFlags" );
-static const String sMacroExecMode = String::CreateFromAscii( "MacroExecutionMode" );
-static const String sUpdateDocMode = String::CreateFromAscii( "UpdateDocMode" );
-static const String sMinimized = String::CreateFromAscii( "Minimized" );
-static const String sInteractionHdl = String::CreateFromAscii( "InteractionHandler" );
-static const String sWindowState = String::CreateFromAscii( "WindowState" );
-static const String sUCBContent = String::CreateFromAscii( "UCBContent" );
-static const String sRepairPackage = String::CreateFromAscii( "RepairPackage" );
-static const String sDocumentTitle = String::CreateFromAscii( "DocumentTitle" );
-static const String sComponentData = String::CreateFromAscii( "ComponentData" );
-static const String sComponentContext = String::CreateFromAscii( "ComponentContext" );
-static const String sDocumentBaseURL = String::CreateFromAscii( "DocumentBaseURL" );
-static const String sHierarchicalDocumentName = String::CreateFromAscii( "HierarchicalDocumentName" );
-static const String sCopyStreamIfPossible = String::CreateFromAscii( "CopyStreamIfPossible" );
-static const String sNoAutoSave = String::CreateFromAscii( "NoAutoSave" );
-static const String sFolderName = String::CreateFromAscii( "FolderName" );
-static const String sUseSystemDialog = String::CreateFromAscii( "UseSystemDialog" );
-static const String sStandardDir = String::CreateFromAscii( "StandardDir" );
-static const String sBlackList = String::CreateFromAscii( "BlackList" );
+static char const sTemplateRegionName[] = "TemplateRegionName";
+static char const sTemplateName[] = "TemplateName";
+static char const sAsTemplate[] = "AsTemplate";
+static char const sOpenNewView[] = "OpenNewView";
+static char const sViewId[] = "ViewId";
+static char const sPluginMode[] = "PluginMode";
+static char const sReadOnly[] = "ReadOnly";
+static char const sStartPresentation[] = "StartPresentation";
+static char const sFrameName[] = "FrameName";
+static char const sMediaType[] = "MediaType";
+static char const sPostData[] = "PostData";
+static char const sCharacterSet[] = "CharacterSet";
+static char const sInputStream[] = "InputStream";
+static char const sStream[] = "Stream";
+static char const sOutputStream[] = "OutputStream";
+static char const sHidden[] = "Hidden";
+static char const sPreview[] = "Preview";
+static char const sViewOnly[] = "ViewOnly";
+static char const sDontEdit[] = "DontEdit";
+static char const sSilent[] = "Silent";
+static char const sJumpMark[] = "JumpMark";
+static char const sFileName[] = "FileName";
+static char const sSalvageURL[] = "SalvagedFile";
+static char const sStatusInd[] = "StatusIndicator";
+static char const sModel[] = "Model";
+static char const sFrame[] = "Frame";
+static char const sViewData[] = "ViewData";
+static char const sFilterData[] = "FilterData";
+static char const sSelectionOnly[] = "SelectionOnly";
+static char const sFilterFlags[] = "FilterFlags";
+static char const sMacroExecMode[] = "MacroExecutionMode";
+static char const sUpdateDocMode[] = "UpdateDocMode";
+static char const sMinimized[] = "Minimized";
+static char const sInteractionHdl[] = "InteractionHandler";
+static char const sUCBContent[] = "UCBContent";
+static char const sRepairPackage[] = "RepairPackage";
+static char const sDocumentTitle[] = "DocumentTitle";
+static char const sComponentData[] = "ComponentData";
+static char const sComponentContext[] = "ComponentContext";
+static char const sDocumentBaseURL[] = "DocumentBaseURL";
+static char const sHierarchicalDocumentName[] = "HierarchicalDocumentName";
+static char const sCopyStreamIfPossible[] = "CopyStreamIfPossible";
+static char const sNoAutoSave[] = "NoAutoSave";
+static char const sFolderName[] = "FolderName";
+static char const sUseSystemDialog[] = "UseSystemDialog";
+static char const sStandardDir[] = "StandardDir";
+static char const sBlackList[] = "BlackList";
void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& rArgs, SfxAllItemSet& rSet, const SfxSlot* pSlot )
{
@@ -469,11 +465,15 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
for ( sal_uInt16 n=0; n<nCount; n++ )
{
const ::com::sun::star::beans::PropertyValue& rProp = pPropsVal[n];
- String aName = rProp.Name;
- if ( aName == sFrame )
- rSet.Put( SfxUnoAnyItem( SID_FILLFRAME, rProp.Value ) );
+ rtl::OUString aName = rProp.Name;
+ if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sFrame)) )
+ {
+ Reference< XFrame > xFrame;
+ OSL_VERIFY( rProp.Value >>= xFrame );
+ rSet.Put( SfxUnoFrameItem( SID_FILLFRAME, xFrame ) );
+ }
else
- if ( aName == sHidden )
+ if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sHidden)) )
{
sal_Bool bVal = sal_False;
if (rProp.Value >>= bVal)
@@ -490,18 +490,18 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
++nFoundArgs;
#endif
const ::com::sun::star::beans::PropertyValue& rProp = pPropsVal[n];
- String aName = rProp.Name;
- if ( aName == sModel )
+ rtl::OUString aName = rProp.Name;
+ if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sModel)) )
rSet.Put( SfxUnoAnyItem( SID_DOCUMENT, rProp.Value ) );
- else if ( aName == sComponentData )
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sComponentData)) )
{
rSet.Put( SfxUnoAnyItem( SID_COMPONENTDATA, rProp.Value ) );
}
- else if ( aName == sComponentContext )
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sComponentContext)) )
{
rSet.Put( SfxUnoAnyItem( SID_COMPONENTCONTEXT, rProp.Value ) );
}
- else if ( aName == sStatusInd )
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sStatusInd)) )
{
Reference< ::com::sun::star::task::XStatusIndicator > xVal;
sal_Bool bOK = ((rProp.Value >>= xVal) && xVal.is());
@@ -509,7 +509,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
if (bOK)
rSet.Put( SfxUnoAnyItem( SID_PROGRESS_STATUSBAR_CONTROL, rProp.Value ) );
}
- else if ( aName == sInteractionHdl )
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sInteractionHdl)) )
{
Reference< ::com::sun::star::task::XInteractionHandler > xVal;
sal_Bool bOK = ((rProp.Value >>= xVal) && xVal.is());
@@ -517,11 +517,11 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
if (bOK)
rSet.Put( SfxUnoAnyItem( SID_INTERACTIONHANDLER, rProp.Value ) );
}
- else if ( aName == sViewData )
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sViewData)) )
rSet.Put( SfxUnoAnyItem( SID_VIEW_DATA, rProp.Value ) );
- else if ( aName == sFilterData )
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sFilterData)) )
rSet.Put( SfxUnoAnyItem( SID_FILTER_DATA, rProp.Value ) );
- else if ( aName == sInputStream )
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sInputStream)) )
{
Reference< XInputStream > xVal;
sal_Bool bOK = ((rProp.Value >>= xVal) && xVal.is());
@@ -529,7 +529,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
if (bOK)
rSet.Put( SfxUnoAnyItem( SID_INPUTSTREAM, rProp.Value ) );
}
- else if ( aName == sStream )
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sStream)) )
{
Reference< XInputStream > xVal;
sal_Bool bOK = ((rProp.Value >>= xVal) && xVal.is());
@@ -537,7 +537,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
if (bOK)
rSet.Put( SfxUnoAnyItem( SID_STREAM, rProp.Value ) );
}
- else if ( aName == sUCBContent )
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sUCBContent)) )
{
Reference< XContent > xVal;
sal_Bool bOK = ((rProp.Value >>= xVal) && xVal.is());
@@ -545,7 +545,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
if (bOK)
rSet.Put( SfxUnoAnyItem( SID_CONTENT, rProp.Value ) );
}
- else if ( aName == sOutputStream )
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sOutputStream)) )
{
Reference< XOutputStream > xVal;
sal_Bool bOK = ((rProp.Value >>= xVal) && xVal.is());
@@ -553,7 +553,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
if (bOK)
rSet.Put( SfxUnoAnyItem( SID_OUTPUTSTREAM, rProp.Value ) );
}
- else if ( aName == sPostData )
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sPostData)) )
{
Reference< XInputStream > xVal;
sal_Bool bOK = (rProp.Value >>= xVal);
@@ -561,15 +561,15 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
if (bOK)
rSet.Put( SfxUnoAnyItem( SID_POSTDATA, rProp.Value ) );
}
- else if ( aName == sFrame )
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sFrame)) )
{
- Reference< XFrame > xVal;
- sal_Bool bOK = (rProp.Value >>= xVal);
+ Reference< XFrame > xFrame;
+ sal_Bool bOK = (rProp.Value >>= xFrame);
DBG_ASSERT( bOK, "invalid type for Frame" );
if (bOK)
- rSet.Put( SfxUnoAnyItem( SID_FILLFRAME, rProp.Value ) );
+ rSet.Put( SfxUnoFrameItem( SID_FILLFRAME, xFrame ) );
}
- else if ( aName == sAsTemplate )
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sAsTemplate)) )
{
sal_Bool bVal = sal_False;
sal_Bool bOK = (rProp.Value >>= bVal);
@@ -577,7 +577,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
if (bOK)
rSet.Put( SfxBoolItem( SID_TEMPLATE, bVal ) );
}
- else if ( aName == sOpenNewView )
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sOpenNewView)) )
{
sal_Bool bVal = sal_False;
sal_Bool bOK = (rProp.Value >>= bVal);
@@ -585,7 +585,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
if (bOK)
rSet.Put( SfxBoolItem( SID_OPEN_NEW_VIEW, bVal ) );
}
- else if ( aName == sViewId )
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sViewId)) )
{
sal_Int16 nVal = -1;
sal_Bool bOK = ((rProp.Value >>= nVal) && (nVal != -1));
@@ -593,7 +593,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
if (bOK)
rSet.Put( SfxUInt16Item( SID_VIEW_ID, nVal ) );
}
- else if ( aName == sPluginMode )
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sPluginMode)) )
{
sal_Int16 nVal = -1;
sal_Bool bOK = ((rProp.Value >>= nVal) && (nVal != -1));
@@ -601,7 +601,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
if (bOK)
rSet.Put( SfxUInt16Item( SID_PLUGIN_MODE, nVal ) );
}
- else if ( aName == sReadOnly )
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sReadOnly)) )
{
sal_Bool bVal = sal_False;
sal_Bool bOK = (rProp.Value >>= bVal);
@@ -609,7 +609,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
if (bOK)
rSet.Put( SfxBoolItem( SID_DOC_READONLY, bVal ) );
}
- else if ( aName == sStartPresentation )
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sStartPresentation)) )
{
sal_Bool bVal = sal_False;
sal_Bool bOK = (rProp.Value >>= bVal);
@@ -617,7 +617,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
if (bOK)
rSet.Put( SfxBoolItem( SID_DOC_STARTPRESENTATION, bVal ) );
}
- else if ( aName == sSelectionOnly )
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sSelectionOnly)) )
{
sal_Bool bVal = sal_False;
sal_Bool bOK = (rProp.Value >>= bVal);
@@ -625,7 +625,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
if (bOK)
rSet.Put( SfxBoolItem( SID_SELECTION, bVal ) );
}
- else if ( aName == sHidden )
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sHidden)) )
{
sal_Bool bVal = sal_False;
sal_Bool bOK = (rProp.Value >>= bVal);
@@ -633,7 +633,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
if (bOK)
rSet.Put( SfxBoolItem( SID_HIDDEN, bVal ) );
}
- else if ( aName == sMinimized )
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sMinimized)) )
{
sal_Bool bVal = sal_False;
sal_Bool bOK = (rProp.Value >>= bVal);
@@ -641,7 +641,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
if (bOK)
rSet.Put( SfxBoolItem( SID_MINIMIZED, bVal ) );
}
- else if ( aName == sSilent )
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sSilent)) )
{
sal_Bool bVal = sal_False;
sal_Bool bOK = (rProp.Value >>= bVal);
@@ -649,7 +649,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
if (bOK)
rSet.Put( SfxBoolItem( SID_SILENT, bVal ) );
}
- else if ( aName == sPreview )
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sPreview)) )
{
sal_Bool bVal = sal_False;
sal_Bool bOK = (rProp.Value >>= bVal);
@@ -657,7 +657,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
if (bOK)
rSet.Put( SfxBoolItem( SID_PREVIEW, bVal ) );
}
- else if ( aName == sViewOnly )
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sViewOnly)) )
{
sal_Bool bVal = sal_False;
sal_Bool bOK = (rProp.Value >>= bVal);
@@ -665,7 +665,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
if (bOK)
rSet.Put( SfxBoolItem( SID_VIEWONLY, bVal ) );
}
- else if ( aName == sDontEdit )
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sDontEdit)) )
{
sal_Bool bVal = sal_False;
sal_Bool bOK = (rProp.Value >>= bVal);
@@ -673,7 +673,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
if (bOK)
rSet.Put( SfxBoolItem( SID_EDITDOC, !bVal ) );
}
- else if ( aName == sUseSystemDialog )
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sUseSystemDialog)) )
{
sal_Bool bVal = sal_False;
sal_Bool bOK = (rProp.Value >>= bVal);
@@ -681,7 +681,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
if (bOK)
rSet.Put( SfxBoolItem( SID_FILE_DIALOG, bVal ) );
}
- else if ( aName == sStandardDir )
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sStandardDir)) )
{
::rtl::OUString sVal;
sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength());
@@ -689,7 +689,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
if (bOK)
rSet.Put( SfxStringItem( SID_STANDARD_DIR, sVal ) );
}
- else if ( aName == sBlackList )
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sBlackList)) )
{
::com::sun::star::uno::Sequence< ::rtl::OUString > xVal;
sal_Bool bOK = (rProp.Value >>= xVal);
@@ -701,7 +701,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
rSet.Put( stringList );
}
}
- else if ( aName == sFileName )
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sFileName)) )
{
::rtl::OUString sVal;
sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength());
@@ -709,7 +709,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
if (bOK)
rSet.Put( SfxStringItem( SID_FILE_NAME, sVal ) );
}
- else if ( aName == sSalvageURL )
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sSalvageURL)) )
{
::rtl::OUString sVal;
sal_Bool bOK = (rProp.Value >>= sVal);
@@ -717,7 +717,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
if (bOK)
rSet.Put( SfxStringItem( SID_DOC_SALVAGE, sVal ) );
}
- else if ( aName == sFolderName )
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sFolderName)) )
{
::rtl::OUString sVal;
sal_Bool bOK = (rProp.Value >>= sVal);
@@ -725,7 +725,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
if (bOK)
rSet.Put( SfxStringItem( SID_PATH, sVal ) );
}
- else if ( aName == sFrameName )
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sFrameName)) )
{
::rtl::OUString sVal;
sal_Bool bOK = (rProp.Value >>= sVal);
@@ -733,7 +733,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
if (bOK && sVal.getLength())
rSet.Put( SfxStringItem( SID_TARGETNAME, sVal ) );
}
- else if ( aName == sMediaType )
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sMediaType)) )
{
::rtl::OUString sVal;
sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength());
@@ -741,15 +741,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
if (bOK)
rSet.Put( SfxStringItem( SID_CONTENTTYPE, sVal ) );
}
- else if ( aName == sWindowState )
- {
- ::rtl::OUString sVal;
- sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength());
- DBG_ASSERT( bOK, "invalid type or value for WindowState" );
- if (bOK)
- rSet.Put( SfxStringItem( SID_WIN_POSSIZE, sVal ) );
- }
- else if ( aName == sTemplateName )
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sTemplateName)) )
{
::rtl::OUString sVal;
sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength());
@@ -757,7 +749,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
if (bOK)
rSet.Put( SfxStringItem( SID_TEMPLATE_NAME, sVal ) );
}
- else if ( aName == sTemplateRegionName )
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sTemplateRegionName)) )
{
::rtl::OUString sVal;
sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength());
@@ -765,7 +757,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
if (bOK)
rSet.Put( SfxStringItem( SID_TEMPLATE_REGIONNAME, sVal ) );
}
- else if ( aName == sJumpMark )
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sJumpMark)) )
{
::rtl::OUString sVal;
sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength());
@@ -773,7 +765,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
if (bOK)
rSet.Put( SfxStringItem( SID_JUMPMARK, sVal ) );
}
- else if ( aName == sCharacterSet )
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sCharacterSet)) )
{
::rtl::OUString sVal;
sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength());
@@ -781,7 +773,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
if (bOK)
rSet.Put( SfxStringItem( SID_CHARSET, sVal ) );
}
- else if ( aName == sFilterFlags )
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sFilterFlags)) )
{
::rtl::OUString sVal;
sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength());
@@ -789,7 +781,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
if (bOK)
rSet.Put( SfxStringItem( SID_FILE_FILTEROPTIONS, sVal ) );
}
- else if ( aName == sMacroExecMode )
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sMacroExecMode)) )
{
sal_Int16 nVal =-1;
sal_Bool bOK = ((rProp.Value >>= nVal) && (nVal != -1));
@@ -797,7 +789,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
if (bOK)
rSet.Put( SfxUInt16Item( SID_MACROEXECMODE, nVal ) );
}
- else if ( aName == sUpdateDocMode )
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sUpdateDocMode)) )
{
sal_Int16 nVal =-1;
sal_Bool bOK = ((rProp.Value >>= nVal) && (nVal != -1));
@@ -805,7 +797,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
if (bOK)
rSet.Put( SfxUInt16Item( SID_UPDATEDOCMODE, nVal ) );
}
- else if ( aName == sRepairPackage )
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sRepairPackage)) )
{
sal_Bool bVal = sal_False;
sal_Bool bOK = (rProp.Value >>= bVal);
@@ -813,7 +805,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
if (bOK)
rSet.Put( SfxBoolItem( SID_REPAIRPACKAGE, bVal ) );
}
- else if ( aName == sDocumentTitle )
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sDocumentTitle)) )
{
::rtl::OUString sVal;
sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength());
@@ -821,7 +813,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
if (bOK)
rSet.Put( SfxStringItem( SID_DOCINFO_TITLE, sVal ) );
}
- else if ( aName == sDocumentBaseURL )
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sDocumentBaseURL)) )
{
::rtl::OUString sVal;
// the base url can be set to empty ( for embedded objects for example )
@@ -830,7 +822,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
if (bOK)
rSet.Put( SfxStringItem( SID_DOC_BASEURL, sVal ) );
}
- else if ( aName == sHierarchicalDocumentName )
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sHierarchicalDocumentName)) )
{
::rtl::OUString sVal;
sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength());
@@ -838,7 +830,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
if (bOK)
rSet.Put( SfxStringItem( SID_DOC_HIERARCHICALNAME, sVal ) );
}
- else if ( aName == sCopyStreamIfPossible )
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sCopyStreamIfPossible)) )
{
sal_Bool bVal = sal_False;
sal_Bool bOK = (rProp.Value >>= bVal);
@@ -846,7 +838,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
if (bOK)
rSet.Put( SfxBoolItem( SID_COPY_STREAM_IF_POSSIBLE, bVal ) );
}
- else if ( aName == sNoAutoSave )
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sNoAutoSave)) )
{
sal_Bool bVal = sal_False;
sal_Bool bOK = (rProp.Value >>= bVal);
@@ -1018,10 +1010,6 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta
nAdditional++;
if ( rSet.GetItemState( SID_CONTENTTYPE ) == SFX_ITEM_SET )
nAdditional++;
- if ( rSet.GetItemState( SID_WIN_POSSIZE ) == SFX_ITEM_SET )
- nAdditional++;
- // if ( rSet.GetItemState( SID_VIEW_POS_SIZE ) == SFX_ITEM_SET )
- // nAdditional++;
if ( rSet.GetItemState( SID_POSTDATA ) == SFX_ITEM_SET )
nAdditional++;
if ( rSet.GetItemState( SID_FILLFRAME ) == SFX_ITEM_SET )
@@ -1177,8 +1165,6 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta
continue;
if ( nId == SID_CONTENTTYPE )
continue;
- if ( nId == SID_WIN_POSSIZE )
- continue;
if ( nId == SID_TEMPLATE_NAME )
continue;
if ( nId == SID_TEMPLATE_REGIONNAME )
@@ -1334,147 +1320,155 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta
const SfxPoolItem *pItem=0;
if ( rSet.GetItemState( SID_COMPONENTDATA, sal_False, &pItem ) == SFX_ITEM_SET )
{
- pValue[nActProp].Name = sComponentData;
+ pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sComponentData));
pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() );
}
if ( rSet.GetItemState( SID_COMPONENTCONTEXT, sal_False, &pItem ) == SFX_ITEM_SET )
{
- pValue[nActProp].Name = sComponentContext;
+ pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sComponentContext));
pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() );
}
if ( rSet.GetItemState( SID_PROGRESS_STATUSBAR_CONTROL, sal_False, &pItem ) == SFX_ITEM_SET )
{
- pValue[nActProp].Name = sStatusInd;
+ pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sStatusInd));
pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() );
}
if ( rSet.GetItemState( SID_INTERACTIONHANDLER, sal_False, &pItem ) == SFX_ITEM_SET )
{
- pValue[nActProp].Name = sInteractionHdl;
+ pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sInteractionHdl));
pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() );
}
if ( rSet.GetItemState( SID_VIEW_DATA, sal_False, &pItem ) == SFX_ITEM_SET )
{
- pValue[nActProp].Name = sViewData;
+ pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sViewData));
pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() );
}
if ( rSet.GetItemState( SID_FILTER_DATA, sal_False, &pItem ) == SFX_ITEM_SET )
{
- pValue[nActProp].Name = sFilterData;
+ pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sFilterData));
pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() );
}
if ( rSet.GetItemState( SID_DOCUMENT, sal_False, &pItem ) == SFX_ITEM_SET )
{
- pValue[nActProp].Name = sModel;
+ pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sModel));
pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() );
}
if ( rSet.GetItemState( SID_CONTENT, sal_False, &pItem ) == SFX_ITEM_SET )
{
- pValue[nActProp].Name = sUCBContent;
+ pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sUCBContent));
pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() );
}
if ( rSet.GetItemState( SID_INPUTSTREAM, sal_False, &pItem ) == SFX_ITEM_SET )
{
- pValue[nActProp].Name = sInputStream;
+ pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sInputStream));
pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() );
}
if ( rSet.GetItemState( SID_STREAM, sal_False, &pItem ) == SFX_ITEM_SET )
{
- pValue[nActProp].Name = sStream;
+ pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sStream));
pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() );
}
if ( rSet.GetItemState( SID_OUTPUTSTREAM, sal_False, &pItem ) == SFX_ITEM_SET )
{
- pValue[nActProp].Name = sOutputStream;
+ pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sOutputStream));
pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() );
}
if ( rSet.GetItemState( SID_POSTDATA, sal_False, &pItem ) == SFX_ITEM_SET )
{
- pValue[nActProp].Name = sPostData;
+ pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sPostData));
pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() );
}
if ( rSet.GetItemState( SID_FILLFRAME, sal_False, &pItem ) == SFX_ITEM_SET )
{
- pValue[nActProp].Name = sFrame;
- pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() );
+ pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sFrame));
+ if ( pItem->ISA( SfxUsrAnyItem ) )
+ {
+ OSL_ENSURE( false, "TransformItems: transporting an XFrame via an SfxUsrAnyItem is not deprecated!" );
+ pValue[nActProp++].Value = static_cast< const SfxUsrAnyItem* >( pItem )->GetValue();
+ }
+ else if ( pItem->ISA( SfxUnoFrameItem ) )
+ pValue[nActProp++].Value <<= static_cast< const SfxUnoFrameItem* >( pItem )->GetFrame();
+ else
+ OSL_ENSURE( false, "TransformItems: invalid item type for SID_FILLFRAME!" );
}
if ( rSet.GetItemState( SID_TEMPLATE, sal_False, &pItem ) == SFX_ITEM_SET )
{
- pValue[nActProp].Name = sAsTemplate;
+ pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sAsTemplate));
pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() );
}
if ( rSet.GetItemState( SID_OPEN_NEW_VIEW, sal_False, &pItem ) == SFX_ITEM_SET )
{
- pValue[nActProp].Name = sOpenNewView;
+ pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sOpenNewView));
pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() );
}
if ( rSet.GetItemState( SID_VIEW_ID, sal_False, &pItem ) == SFX_ITEM_SET )
{
- pValue[nActProp].Name = sViewId;
+ pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sViewId));
pValue[nActProp++].Value <<= ( (sal_Int16) ((SfxUInt16Item*)pItem)->GetValue() );
}
if ( rSet.GetItemState( SID_PLUGIN_MODE, sal_False, &pItem ) == SFX_ITEM_SET )
{
- pValue[nActProp].Name = sPluginMode;
+ pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sPluginMode));
pValue[nActProp++].Value <<= ( (sal_Int16) ((SfxUInt16Item*)pItem)->GetValue() );
}
if ( rSet.GetItemState( SID_DOC_READONLY, sal_False, &pItem ) == SFX_ITEM_SET )
{
- pValue[nActProp].Name = sReadOnly;
+ pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sReadOnly));
pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() );
}
if ( rSet.GetItemState( SID_DOC_STARTPRESENTATION, sal_False, &pItem ) == SFX_ITEM_SET )
{
- pValue[nActProp].Name = sStartPresentation;
+ pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sStartPresentation));
pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() );
}
if ( rSet.GetItemState( SID_SELECTION, sal_False, &pItem ) == SFX_ITEM_SET )
{
- pValue[nActProp].Name = sSelectionOnly;
+ pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sSelectionOnly));
pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() );
}
if ( rSet.GetItemState( SID_HIDDEN, sal_False, &pItem ) == SFX_ITEM_SET )
{
- pValue[nActProp].Name = sHidden;
+ pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sHidden));
pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() );
}
if ( rSet.GetItemState( SID_MINIMIZED, sal_False, &pItem ) == SFX_ITEM_SET )
{
- pValue[nActProp].Name = sMinimized;
+ pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sMinimized));
pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() );
}
if ( rSet.GetItemState( SID_SILENT, sal_False, &pItem ) == SFX_ITEM_SET )
{
- pValue[nActProp].Name = sSilent;
+ pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sSilent));
pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() );
}
if ( rSet.GetItemState( SID_PREVIEW, sal_False, &pItem ) == SFX_ITEM_SET )
{
- pValue[nActProp].Name = sPreview;
+ pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sPreview));
pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() );
}
if ( rSet.GetItemState( SID_VIEWONLY, sal_False, &pItem ) == SFX_ITEM_SET )
{
- pValue[nActProp].Name = sViewOnly;
+ pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sViewOnly));
pValue[nActProp++].Value <<= (sal_Bool) (( ((SfxBoolItem*)pItem)->GetValue() ));
}
if ( rSet.GetItemState( SID_EDITDOC, sal_False, &pItem ) == SFX_ITEM_SET )
{
- pValue[nActProp].Name = sDontEdit;
+ pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sDontEdit));
pValue[nActProp++].Value <<= (sal_Bool) (!( ((SfxBoolItem*)pItem)->GetValue() ));
}
if ( rSet.GetItemState( SID_FILE_DIALOG, sal_False, &pItem ) == SFX_ITEM_SET )
{
- pValue[nActProp].Name = sUseSystemDialog;
+ pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sUseSystemDialog));
pValue[nActProp++].Value <<= (sal_Bool) ( ((SfxBoolItem*)pItem)->GetValue() );
}
if ( rSet.GetItemState( SID_STANDARD_DIR, sal_False, &pItem ) == SFX_ITEM_SET )
{
- pValue[nActProp].Name = sStandardDir;
+ pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sStandardDir));
pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) );
}
if ( rSet.GetItemState( SID_BLACK_LIST, sal_False, &pItem ) == SFX_ITEM_SET )
{
- pValue[nActProp].Name = sBlackList;
+ pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sBlackList));
com::sun::star::uno::Sequence< rtl::OUString > aList;
((SfxStringListItem*)pItem)->GetStringList( aList );
@@ -1482,94 +1476,83 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta
}
if ( rSet.GetItemState( SID_TARGETNAME, sal_False, &pItem ) == SFX_ITEM_SET )
{
- pValue[nActProp].Name = sFrameName;
+ pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sFrameName));
pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) );
}
if ( rSet.GetItemState( SID_DOC_SALVAGE, sal_False, &pItem ) == SFX_ITEM_SET )
{
- pValue[nActProp].Name = sSalvageURL;
+ pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sSalvageURL));
pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) );
}
if ( rSet.GetItemState( SID_PATH, sal_False, &pItem ) == SFX_ITEM_SET )
{
- pValue[nActProp].Name = sFolderName;
+ pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sFolderName));
pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) );
}
if ( rSet.GetItemState( SID_CONTENTTYPE, sal_False, &pItem ) == SFX_ITEM_SET )
{
- pValue[nActProp].Name = sMediaType;
- pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) );
- }
- if ( rSet.GetItemState( SID_WIN_POSSIZE, sal_False, &pItem ) == SFX_ITEM_SET )
- {
- pValue[nActProp].Name = sWindowState;
+ pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sMediaType));
pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) );
}
if ( rSet.GetItemState( SID_TEMPLATE_NAME, sal_False, &pItem ) == SFX_ITEM_SET )
{
- pValue[nActProp].Name = sTemplateName;
+ pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sTemplateName));
pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) );
}
if ( rSet.GetItemState( SID_TEMPLATE_REGIONNAME, sal_False, &pItem ) == SFX_ITEM_SET )
{
- pValue[nActProp].Name = sTemplateRegionName;
+ pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sTemplateRegionName));
pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) );
}
if ( rSet.GetItemState( SID_JUMPMARK, sal_False, &pItem ) == SFX_ITEM_SET )
{
- pValue[nActProp].Name = sJumpMark;
+ pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sJumpMark));
pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) );
}
- SFX_ITEMSET_ARG( &rSet, pRectItem, SfxRectangleItem, SID_VIEW_POS_SIZE, sal_False );
- if ( pRectItem )
- {
- DBG_ERROR("PosSizeItem not supported yet!");
- }
-
if ( rSet.GetItemState( SID_CHARSET, sal_False, &pItem ) == SFX_ITEM_SET )
{
- pValue[nActProp].Name = sCharacterSet;
+ pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sCharacterSet));
pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) );
}
if ( rSet.GetItemState( SID_MACROEXECMODE, sal_False, &pItem ) == SFX_ITEM_SET )
{
- pValue[nActProp].Name = sMacroExecMode;
+ pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sMacroExecMode));
pValue[nActProp++].Value <<= ( (sal_Int16) ((SfxUInt16Item*)pItem)->GetValue() );
}
if ( rSet.GetItemState( SID_UPDATEDOCMODE, sal_False, &pItem ) == SFX_ITEM_SET )
{
- pValue[nActProp].Name = sUpdateDocMode;
+ pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sUpdateDocMode));
pValue[nActProp++].Value <<= ( (sal_Int16) ((SfxUInt16Item*)pItem)->GetValue() );
}
if ( rSet.GetItemState( SID_REPAIRPACKAGE, sal_False, &pItem ) == SFX_ITEM_SET )
{
- pValue[nActProp].Name = sRepairPackage;
+ pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sRepairPackage));
pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() );
}
if ( rSet.GetItemState( SID_DOCINFO_TITLE, sal_False, &pItem ) == SFX_ITEM_SET )
{
- pValue[nActProp].Name = sDocumentTitle;
+ pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sDocumentTitle));
pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) );
}
if ( rSet.GetItemState( SID_DOC_BASEURL, sal_False, &pItem ) == SFX_ITEM_SET )
{
- pValue[nActProp].Name = sDocumentBaseURL;
+ pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sDocumentBaseURL));
pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) );
}
if ( rSet.GetItemState( SID_DOC_HIERARCHICALNAME, sal_False, &pItem ) == SFX_ITEM_SET )
{
- pValue[nActProp].Name = sHierarchicalDocumentName;
+ pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sHierarchicalDocumentName));
pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) );
}
if ( rSet.GetItemState( SID_COPY_STREAM_IF_POSSIBLE, sal_False, &pItem ) == SFX_ITEM_SET )
{
- pValue[nActProp].Name = sCopyStreamIfPossible;
+ pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sCopyStreamIfPossible));
pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() );
}
if ( rSet.GetItemState( SID_NOAUTOSAVE, sal_False, &pItem ) == SFX_ITEM_SET )
{
- pValue[nActProp].Name = sNoAutoSave;
+ pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sNoAutoSave));
pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() );
}
diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx
index 23a08e71356f..b8e8a92da1b8 100644
--- a/sfx2/source/appl/childwin.cxx
+++ b/sfx2/source/appl/childwin.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: childwin.cxx,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/sfx2/source/appl/dde.hrc b/sfx2/source/appl/dde.hrc
index 8ea6d5618e6c..d3e178606809 100644
--- a/sfx2/source/appl/dde.hrc
+++ b/sfx2/source/appl/dde.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: dde.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/sfx2/source/appl/dde.src b/sfx2/source/appl/dde.src
index e2f765e44d0c..22df8eff16ba 100644
--- a/sfx2/source/appl/dde.src
+++ b/sfx2/source/appl/dde.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: dde.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/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx
new file mode 100644
index 000000000000..294d6ef17da5
--- /dev/null
+++ b/sfx2/source/appl/fileobj.cxx
@@ -0,0 +1,706 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sfx2.hxx"
+
+#include <vcl/wrkwin.hxx>
+#include <vcl/msgbox.hxx>
+#include <tools/urlobj.hxx>
+#include <tools/stream.hxx>
+#include <sot/formats.hxx>
+#include <svtools/filter.hxx>
+#include <sfx2/lnkbase.hxx>
+#include <sfx2/app.hxx>
+#include <sfx2/progress.hxx>
+#include <sfx2/docfilt.hxx>
+#include <sfx2/filedlghelper.hxx>
+#include <sot/exchange.hxx>
+#include <com/sun/star/uno/Any.hxx>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <sfx2/docfac.hxx>
+#include <com/sun/star/document/XTypeDetection.hpp>
+#include <comphelper/mediadescriptor.hxx>
+#include <comphelper/processfactory.hxx>
+#include <sfx2/linkmgr.hxx>
+#include <sfx2/opengrf.hxx>
+#include "sfxresid.hxx"
+#include "fileobj.hxx"
+#include "app.hrc"
+
+namespace css = ::com::sun::star;
+
+#define FILETYPE_TEXT 1
+#define FILETYPE_GRF 2
+#define FILETYPE_OBJECT 3
+
+struct Impl_DownLoadData
+{
+ Graphic aGrf;
+ Timer aTimer;
+
+ Impl_DownLoadData( const Link& rLink )
+ {
+ aTimer.SetTimeout( 100 );
+ aTimer.SetTimeoutHdl( rLink );
+ aGrf.SetDefaultType();
+ }
+ ~Impl_DownLoadData()
+ {
+ aTimer.Stop();
+ }
+};
+
+// --------------------------------------------------------------------------
+
+
+SvFileObject::SvFileObject() :
+ pDownLoadData( NULL ), pOldParent( NULL ), nType( FILETYPE_TEXT )
+{
+ bLoadAgain = TRUE;
+ bSynchron = bLoadError = bWaitForData = bDataReady = bNativFormat =
+ bClearMedium = bStateChangeCalled = bInCallDownLoad = FALSE;
+}
+
+
+SvFileObject::~SvFileObject()
+{
+ if ( xMed.Is() )
+ {
+ xMed->SetDataAvailableLink( Link() );
+ xMed->SetDoneLink( Link() );
+ xMed.Clear();
+ }
+ delete pDownLoadData;
+}
+
+
+BOOL SvFileObject::GetData( ::com::sun::star::uno::Any & rData,
+ const String & rMimeType,
+ BOOL bGetSynchron )
+{
+ ULONG nFmt = SotExchange::GetFormatStringId( rMimeType );
+ switch( nType )
+ {
+ case FILETYPE_TEXT:
+ if( FORMAT_FILE == nFmt )
+ {
+ // das Medium muss in der Applikation geoffnet werden, um die
+ // relativen Datei Links aufzuloesen!!!! Wird ueber den
+ // LinkManager und damit von dessen Storage erledigt.
+ rData <<= rtl::OUString( sFileNm );
+ }
+ break;
+
+ case FILETYPE_GRF:
+ if( !bLoadError )
+ {
+ SfxMediumRef xTmpMed;
+
+ if( FORMAT_GDIMETAFILE == nFmt || FORMAT_BITMAP == nFmt ||
+ SOT_FORMATSTR_ID_SVXB == nFmt )
+ {
+ Graphic aGrf;
+
+ //JP 15.07.98: Bug 52959
+ // falls das Nativformat doch erwuenscht ist, muss am
+ // Ende das Flag zurueckgesetzt werden.
+// wird einzig und allein im sw/ndgrf.cxx benutzt, wenn der Link vom
+// GraphicNode entfernt wird.
+ BOOL bOldNativFormat = bNativFormat;
+//!!?? bNativFormat = 0 != (ASPECT_ICON & pSvData->GetAspect());
+
+ // falls gedruckt werden soll, warten wir bis die
+ // Daten vorhanden sind
+ if( bGetSynchron )
+ {
+ // testhalber mal ein LoadFile rufen um das nach-
+ // laden ueberahaupt anzustossen
+ if( !xMed.Is() )
+ LoadFile_Impl();
+
+ if( !bInCallDownLoad )
+ {
+ xTmpMed = xMed;
+ while( bWaitForData )
+ Application::Reschedule();
+
+ xMed = xTmpMed;
+ bClearMedium = TRUE;
+ }
+ }
+
+ if( pDownLoadData ||
+ ( !bWaitForData && ( xMed.Is() || // wurde als URL geladen
+ ( bSynchron && LoadFile_Impl() && xMed.Is() ) )) )
+ {
+ // falls
+
+ // falls es uebers Internet gesogen wurde, nicht
+ // wieder versuchen
+ if( !bGetSynchron )
+ bLoadAgain = !xMed->IsRemote();
+ bLoadError = !GetGraphic_Impl( aGrf, xMed->GetInStream() );
+ }
+ else if( !LoadFile_Impl() ||
+ !GetGraphic_Impl( aGrf, xMed.Is() ? xMed->GetInStream() : 0 ))
+ {
+ if( !xMed.Is() )
+ break;
+ aGrf.SetDefaultType();
+ }
+
+ if( SOT_FORMATSTR_ID_SVXB != nFmt )
+ nFmt = (bLoadError || GRAPHIC_BITMAP == aGrf.GetType())
+ ? FORMAT_BITMAP
+ : FORMAT_GDIMETAFILE;
+
+ SvMemoryStream aMemStm( 0, 65535 );
+ switch ( nFmt )
+ {
+ case SOT_FORMATSTR_ID_SVXB:
+ if( GRAPHIC_NONE != aGrf.GetType() )
+ {
+ aMemStm.SetVersion( SOFFICE_FILEFORMAT_50 );
+ aMemStm << aGrf;
+ }
+ break;
+
+ case FORMAT_BITMAP:
+ if( !aGrf.GetBitmap().IsEmpty())
+ aMemStm << aGrf.GetBitmap();
+ break;
+
+ default:
+ if( aGrf.GetGDIMetaFile().GetActionCount() )
+ {
+ GDIMetaFile aMeta( aGrf.GetGDIMetaFile() );
+ aMeta.Write( aMemStm );
+ }
+ }
+ rData <<= css::uno::Sequence< sal_Int8 >( (sal_Int8*) aMemStm.GetData(),
+ aMemStm.Seek( STREAM_SEEK_TO_END ) );
+
+ bNativFormat = bOldNativFormat;
+
+ // alles fertig?
+ if( xMed.Is() && !bSynchron && bClearMedium )
+ {
+ xMed.Clear();
+ bClearMedium = FALSE;
+ }
+ }
+ }
+ break;
+ case FILETYPE_OBJECT:
+ // TODO/LATER: possibility to insert a new object
+ rData <<= rtl::OUString( sFileNm );
+ break;
+ }
+ return sal_True/*0 != aTypeList.Count()*/;
+}
+
+
+
+
+BOOL SvFileObject::Connect( sfx2::SvBaseLink* pLink )
+{
+ if( !pLink || !pLink->GetLinkManager() )
+ return FALSE;
+
+ // teste doch mal, ob nicht ein anderer Link mit der gleichen
+ // Verbindung schon existiert
+ pLink->GetLinkManager()->GetDisplayNames( pLink, 0, &sFileNm, 0, &sFilter );
+
+ if( OBJECT_CLIENT_GRF == pLink->GetObjType() )
+ {
+ SfxObjectShellRef pShell = pLink->GetLinkManager()->GetPersist();
+ if( pShell.Is() )
+ {
+ if( pShell->IsAbortingImport() )
+ return FALSE;
+
+ if( pShell->GetMedium() )
+ sReferer = pShell->GetMedium()->GetName();
+ }
+ }
+
+ switch( pLink->GetObjType() )
+ {
+ case OBJECT_CLIENT_GRF:
+ nType = FILETYPE_GRF;
+ bSynchron = pLink->IsSynchron();
+ break;
+
+ case OBJECT_CLIENT_FILE:
+ nType = FILETYPE_TEXT;
+ break;
+
+ case OBJECT_CLIENT_OLE:
+ nType = FILETYPE_OBJECT;
+ // TODO/LATER: introduce own type to be used for exchanging
+ break;
+
+ default:
+ return FALSE;
+ }
+
+ SetUpdateTimeout( 0 );
+
+ // und jetzt bei diesem oder gefundenem Pseudo-Object anmelden
+ AddDataAdvise( pLink, SotExchange::GetFormatMimeType( pLink->GetContentType()), 0 );
+ return TRUE;
+}
+
+
+BOOL SvFileObject::LoadFile_Impl()
+{
+ // wir sind noch im Laden!!
+ if( bWaitForData || !bLoadAgain || xMed.Is() || pDownLoadData )
+ return FALSE;
+
+ // z.Z. nur auf die aktuelle DocShell
+ xMed = new SfxMedium( sFileNm, STREAM_STD_READ, TRUE );
+ SvLinkSource::StreamToLoadFrom aStreamToLoadFrom =
+ getStreamToLoadFrom();
+ xMed->setStreamToLoadFrom(
+ aStreamToLoadFrom.m_xInputStreamToLoadFrom,
+ aStreamToLoadFrom.m_bIsReadOnly);
+ // setStreamToLoadFrom(0,0);
+ if( sReferer.Len() )
+ xMed->SetReferer( sReferer );
+
+ if( !bSynchron )
+ {
+ bLoadAgain = bDataReady = bInNewData = FALSE;
+ bWaitForData = TRUE;
+
+ SfxMediumRef xTmpMed = xMed;
+ xMed->SetDataAvailableLink( STATIC_LINK( this, SvFileObject, LoadGrfNewData_Impl ) );
+ bInCallDownLoad = TRUE;
+ xMed->DownLoad( STATIC_LINK( this, SvFileObject, LoadGrfReady_Impl ) );
+ bInCallDownLoad = FALSE;
+
+ bClearMedium = !xMed.Is();
+ if( bClearMedium )
+ xMed = xTmpMed; // falls gleich im DownLoad schon schluss ist
+ return bDataReady;
+ }
+
+ bWaitForData = TRUE;
+ bDataReady = bInNewData = FALSE;
+ xMed->DownLoad();
+ bLoadAgain = !xMed->IsRemote();
+ bWaitForData = FALSE;
+
+ // Grafik ist fertig, also DataChanged von der Statusaederung schicken:
+ SendStateChg_Impl( xMed->GetInStream() && xMed->GetInStream()->GetError()
+ ? sfx2::LinkManager::STATE_LOAD_ERROR : sfx2::LinkManager::STATE_LOAD_OK );
+ return TRUE;
+}
+
+
+BOOL SvFileObject::GetGraphic_Impl( Graphic& rGrf, SvStream* pStream )
+{
+ GraphicFilter* pGF = GraphicFilter::GetGraphicFilter();
+
+ const USHORT nFilter = sFilter.Len() && pGF->GetImportFormatCount()
+ ? pGF->GetImportFormatNumber( sFilter )
+ : GRFILTER_FORMAT_DONTKNOW;
+
+ String aEmptyStr;
+ int nRes;
+
+ // vermeiden, dass ein native Link angelegt wird
+ if( ( !pStream || !pDownLoadData ) && !rGrf.IsLink() &&
+ !rGrf.GetContext() && !bNativFormat )
+ rGrf.SetLink( GfxLink() );
+
+ if( !pStream )
+ nRes = xMed.Is() ? GRFILTER_OPENERROR
+ : pGF->ImportGraphic( rGrf, INetURLObject(sFileNm),
+ nFilter );
+ else if( !pDownLoadData )
+ {
+ pStream->Seek( STREAM_SEEK_TO_BEGIN );
+ nRes = pGF->ImportGraphic( rGrf, aEmptyStr, *pStream, nFilter );
+ }
+ else
+ {
+ nRes = pGF->ImportGraphic( pDownLoadData->aGrf, aEmptyStr,
+ *pStream, nFilter );
+
+ if( pDownLoadData )
+ {
+ rGrf = pDownLoadData->aGrf;
+ if( GRAPHIC_NONE == rGrf.GetType() )
+ rGrf.SetDefaultType();
+
+
+ if( !pDownLoadData->aGrf.GetContext() )
+ {
+ xMed->SetDataAvailableLink( Link() );
+// xMed->SetDoneLink( Link() );
+ delete pDownLoadData, pDownLoadData = 0;
+ bDataReady = TRUE;
+ bWaitForData = FALSE;
+ }
+ else if( FALSE )
+ {
+ // Timer aufsetzen, um zurueck zukehren
+ pDownLoadData->aTimer.Start();
+ }
+ }
+ }
+
+ if( pStream && ERRCODE_IO_PENDING == pStream->GetError() )
+ pStream->ResetError();
+
+#ifdef DBG_UTIL
+ if( nRes )
+ {
+ if( xMed.Is() && !pStream )
+ {
+ DBG_WARNING3( "GrafikFehler [%d] - [%s] URL[%s]",
+ nRes,
+ xMed->GetPhysicalName().GetBuffer(),
+ sFileNm.GetBuffer() );
+ }
+ else
+ {
+ DBG_WARNING2( "GrafikFehler [%d] - [%s]",
+ nRes, sFileNm.GetBuffer() );
+ }
+ }
+#endif
+
+ return GRFILTER_OK == nRes;
+}
+
+/** detect the filter of the given file
+
+ @param _rURL
+ specifies the URL of the file which filter is to detected.<br/>
+ If the URL doesn't denote a valid (existent and accessible) file, the
+ request is silently dropped.
+*/
+String impl_getFilter( const String& _rURL )
+{
+ String sFilter;
+ if ( _rURL.Len() == 0 )
+ return sFilter;
+
+ try
+ {
+ css::uno::Reference< ::com::sun::star::document::XTypeDetection > xTypeDetection(
+ ::comphelper::getProcessServiceFactory()->createInstance(
+ ::rtl::OUString::createFromAscii("com.sun.star.document.TypeDetection") ),
+ css::uno::UNO_QUERY );
+ if ( xTypeDetection.is() )
+ {
+ ::comphelper::MediaDescriptor aDescr;
+ aDescr[ ::comphelper::MediaDescriptor::PROP_URL() ] <<= ::rtl::OUString( _rURL );
+ css::uno::Sequence< css::beans::PropertyValue > aDescrList =
+ aDescr.getAsConstPropertyValueList();
+ ::rtl::OUString sType = xTypeDetection->queryTypeByDescriptor( aDescrList, sal_True );
+ if ( sType.getLength() )
+ {
+ css::uno::Reference< css::container::XNameAccess > xTypeCont( xTypeDetection,
+ css::uno::UNO_QUERY );
+ if ( xTypeCont.is() )
+ {
+ ::comphelper::SequenceAsHashMap lTypeProps( xTypeCont->getByName( sType ) );
+ sFilter = lTypeProps.getUnpackedValueOrDefault(
+ ::rtl::OUString::createFromAscii("PreferredFilter"), ::rtl::OUString() );
+ }
+ }
+ }
+ }
+ catch( const css::uno::Exception& )
+ {
+ }
+
+ return sFilter;
+}
+
+void SvFileObject::Edit( Window* pParent, sfx2::SvBaseLink* pLink, const Link& rEndEditHdl )
+{
+ aEndEditLink = rEndEditHdl;
+ String sFile, sRange, sTmpFilter;
+ if( pLink && pLink->GetLinkManager() )
+ {
+ pLink->GetLinkManager()->GetDisplayNames( pLink, 0, &sFile, &sRange, &sTmpFilter );
+
+ switch( pLink->GetObjType() )
+ {
+ case OBJECT_CLIENT_GRF:
+ {
+ nType = FILETYPE_GRF; // falls noch nicht gesetzt
+
+ SvxOpenGraphicDialog aDlg(SfxResId(RID_SVXSTR_EDITGRFLINK));
+ aDlg.EnableLink(sal_False);
+ aDlg.SetPath( sFile, sal_True );
+ aDlg.SetCurrentFilter( sTmpFilter );
+
+ if( !aDlg.Execute() )
+ {
+ sFile = aDlg.GetPath();
+ sFile += ::sfx2::cTokenSeperator;
+ sFile += ::sfx2::cTokenSeperator;
+ sFile += aDlg.GetCurrentFilter();
+
+ if ( aEndEditLink.IsSet() )
+ aEndEditLink.Call( &sFile );
+ }
+ else
+ sFile.Erase();
+ }
+ break;
+
+ case OBJECT_CLIENT_OLE:
+ {
+ nType = FILETYPE_OBJECT; // if not set already
+ pOldParent = Application::GetDefDialogParent();
+ Application::SetDefDialogParent( pParent );
+
+ ::sfx2::FileDialogHelper* pFileDlg =
+ pLink->GetFileDialog( (SFXWB_INSERT | WB_3DLOOK), String() );
+ pFileDlg->StartExecuteModal( LINK( this, SvFileObject, DialogClosedHdl ) );
+ }
+ break;
+
+ case OBJECT_CLIENT_FILE:
+ {
+ nType = FILETYPE_TEXT; // if not set already
+ pOldParent = Application::GetDefDialogParent();
+ Application::SetDefDialogParent( pParent );
+
+ String sFactory;
+ SfxObjectShell* pShell = pLink->GetLinkManager()->GetPersist();
+ if ( pShell )
+ sFactory = pShell->GetFactory().GetFactoryName();
+
+ ::sfx2::FileDialogHelper* pFileDlg =
+ pLink->GetFileDialog( (SFXWB_INSERT | WB_3DLOOK), sFactory );
+ pFileDlg->StartExecuteModal( LINK( this, SvFileObject, DialogClosedHdl ) );
+ }
+ break;
+
+ default:
+ sFile.Erase();
+ }
+ }
+}
+
+IMPL_STATIC_LINK( SvFileObject, LoadGrfReady_Impl, void*, EMPTYARG )
+{
+ // wenn wir von hier kommen, kann es kein Fehler mehr sein
+ pThis->bLoadError = FALSE;
+ pThis->bWaitForData = FALSE;
+ pThis->bInCallDownLoad = FALSE;
+
+ if( !pThis->bInNewData && !pThis->bDataReady )
+ {
+ // Grafik ist fertig, also DataChanged von der Status-
+ // aederung schicken:
+ pThis->bDataReady = TRUE;
+ pThis->SendStateChg_Impl( sfx2::LinkManager::STATE_LOAD_OK );
+
+ // und dann nochmal die Daten senden
+ pThis->NotifyDataChanged();
+ }
+
+ if( pThis->bDataReady )
+ {
+ pThis->bLoadAgain = TRUE;
+ if( pThis->xMed.Is() )
+ {
+ pThis->xMed->SetDataAvailableLink( Link() );
+ pThis->xMed->SetDoneLink( Link() );
+
+ Application::PostUserEvent(
+ STATIC_LINK( pThis, SvFileObject, DelMedium_Impl ),
+ new SfxMediumRef( pThis->xMed ));
+ pThis->xMed.Clear();
+ }
+ if( pThis->pDownLoadData )
+ delete pThis->pDownLoadData, pThis->pDownLoadData = 0;
+ }
+
+ return 0;
+}
+
+IMPL_STATIC_LINK( SvFileObject, DelMedium_Impl, SfxMediumRef*, pDelMed )
+{
+ (void)pThis;
+ delete pDelMed;
+ return 0;
+}
+
+IMPL_STATIC_LINK( SvFileObject, LoadGrfNewData_Impl, void*, EMPTYARG )
+{
+ // wenn wir von hier kommen, kann es kein Fehler mehr sein
+ if( pThis->bInNewData )
+ return 0;
+
+ pThis->bInNewData = TRUE;
+ pThis->bLoadError = FALSE;
+
+ if( !pThis->pDownLoadData )
+ {
+ pThis->pDownLoadData = new Impl_DownLoadData(
+ STATIC_LINK( pThis, SvFileObject, LoadGrfNewData_Impl ) );
+
+ // Null-Link setzen, damit keine temporaeren Grafiken
+ // rausgeswapt werden; der Filter prueft, ob schon
+ // ein Link gesetzt ist => falls dies zutrifft, wird
+ // _kein_ neuer Link gesetzt; der Link muss hier gesetzt werden,
+ // (bevor das erste Mal gefiltert wird), um zu verhindern,
+ // dass der Kontext zurueckgesetzt wird (aynchrones Laden)
+ if( !pThis->bNativFormat )
+ {
+ static GfxLink aDummyLink;
+ pThis->pDownLoadData->aGrf.SetLink( aDummyLink );
+ }
+ }
+
+ pThis->NotifyDataChanged();
+
+ SvStream* pStrm = pThis->xMed.Is() ? pThis->xMed->GetInStream() : 0;
+ if( pStrm && pStrm->GetError() )
+ {
+ if( ERRCODE_IO_PENDING == pStrm->GetError() )
+ pStrm->ResetError();
+
+ // im DataChanged ein DataReady?
+ else if( pThis->bWaitForData && pThis->pDownLoadData )
+ {
+ pThis->bLoadError = TRUE;
+ }
+ }
+
+ if( pThis->bDataReady )
+ {
+ // Grafik ist fertig, also DataChanged von der Status-
+ // aederung schicken:
+ pThis->SendStateChg_Impl( pStrm->GetError() ? sfx2::LinkManager::STATE_LOAD_ERROR : sfx2::LinkManager::STATE_LOAD_OK );
+ }
+
+ pThis->bInNewData = FALSE;
+ return 0;
+}
+
+IMPL_LINK( SvFileObject, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg )
+{
+ String sFile;
+ Application::SetDefDialogParent( pOldParent );
+
+ if ( FILETYPE_TEXT == nType || FILETYPE_OBJECT == nType )
+ {
+ if ( _pFileDlg && _pFileDlg->GetError() == ERRCODE_NONE )
+ {
+ String sURL( _pFileDlg->GetPath() );
+ sFile = sURL;
+ sFile += ::sfx2::cTokenSeperator;
+ sFile += ::sfx2::cTokenSeperator;
+ sFile += impl_getFilter( sURL );
+ }
+ }
+ else
+ {
+ DBG_ERRORFILE( "SvFileObject::DialogClosedHdl(): wrong file type" );
+ }
+
+ if ( aEndEditLink.IsSet() )
+ aEndEditLink.Call( &sFile );
+ return 0;
+}
+
+/* [Beschreibung]
+
+ Die Methode stellt fest, ob aus einem DDE-Object die Daten gelesen
+ werden kann.
+ Zurueckgegeben wird:
+ ERRCODE_NONE wenn sie komplett gelesen wurde
+ ERRCODE_SO_PENDING wenn sie noch nicht komplett gelesen wurde
+ ERRCODE_SO_FALSE sonst
+*/
+BOOL SvFileObject::IsPending() const
+{
+ return FILETYPE_GRF == nType && !bLoadError &&
+ ( pDownLoadData || bWaitForData );
+}
+BOOL SvFileObject::IsDataComplete() const
+{
+ BOOL bRet = FALSE;
+ if( FILETYPE_GRF != nType )
+ bRet = TRUE;
+ else if( !bLoadError && ( !bWaitForData && !pDownLoadData ))
+ {
+ SvFileObject* pThis = (SvFileObject*)this;
+ if( bDataReady ||
+ ( bSynchron && pThis->LoadFile_Impl() && xMed.Is() ) )
+ bRet = TRUE;
+ else
+ {
+ INetURLObject aUrl( sFileNm );
+ if( aUrl.HasError() ||
+ INET_PROT_NOT_VALID == aUrl.GetProtocol() )
+ bRet = TRUE;
+ }
+ }
+ return bRet;
+}
+
+
+
+void SvFileObject::CancelTransfers()
+{
+ // und aus dem Cache austragen, wenn man mitten im Laden ist
+ if( !bDataReady )
+ {
+ // nicht noch mal aufsetzen
+ bLoadAgain = FALSE;
+ bDataReady = bLoadError = bWaitForData = TRUE;
+ SendStateChg_Impl( sfx2::LinkManager::STATE_LOAD_ABORT );
+ }
+}
+
+
+void SvFileObject::SendStateChg_Impl( sfx2::LinkManager::LinkState nState )
+{
+ if( !bStateChangeCalled && HasDataLinks() )
+ {
+ css::uno::Any aAny;
+ aAny <<= rtl::OUString::valueOf( (sal_Int32)nState );
+ DataChanged( SotExchange::GetFormatName(
+ sfx2::LinkManager::RegisterStatusInfoId()), aAny );
+ bStateChangeCalled = TRUE;
+ }
+}
+
+
diff --git a/sfx2/source/appl/fileobj.hxx b/sfx2/source/appl/fileobj.hxx
new file mode 100644
index 000000000000..50f934a75436
--- /dev/null
+++ b/sfx2/source/appl/fileobj.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 _FILEOBJ_HXX
+#define _FILEOBJ_HXX
+
+#include <tools/string.hxx>
+#include <sfx2/linksrc.hxx>
+#include <sfx2/docfile.hxx>
+#include <sfx2/linkmgr.hxx>
+
+class Graphic;
+struct Impl_DownLoadData;
+namespace sfx2 { class FileDialogHelper; }
+
+class SvFileObject : public sfx2::SvLinkSource
+{
+ String sFileNm;
+ String sFilter;
+ String sReferer;
+ Link aEndEditLink;
+ SfxMediumRef xMed;
+ Impl_DownLoadData* pDownLoadData;
+ Window* pOldParent;
+
+ BYTE nType;
+
+ BOOL bLoadAgain : 1;
+ BOOL bSynchron : 1;
+ BOOL bLoadError : 1;
+ BOOL bWaitForData : 1;
+ BOOL bInNewData : 1;
+ BOOL bDataReady : 1;
+ BOOL bMedUseCache : 1;
+ BOOL bNativFormat : 1;
+ BOOL bClearMedium : 1;
+ BOOL bStateChangeCalled : 1;
+ BOOL bInCallDownLoad : 1;
+
+ BOOL GetGraphic_Impl( Graphic&, SvStream* pStream = 0 );
+ BOOL LoadFile_Impl();
+ void SendStateChg_Impl( sfx2::LinkManager::LinkState nState );
+
+ DECL_STATIC_LINK( SvFileObject, DelMedium_Impl, SfxMediumRef* );
+ DECL_STATIC_LINK( SvFileObject, LoadGrfReady_Impl, void* );
+ DECL_STATIC_LINK( SvFileObject, LoadGrfNewData_Impl, void* );
+ DECL_LINK( DialogClosedHdl, sfx2::FileDialogHelper* );
+
+protected:
+ virtual ~SvFileObject();
+
+public:
+ SvFileObject();
+
+ virtual BOOL GetData( ::com::sun::star::uno::Any & rData /*out param*/,
+ const String & rMimeType,
+ BOOL bSynchron = FALSE );
+
+ virtual BOOL Connect( sfx2::SvBaseLink* );
+ virtual void Edit( Window *, sfx2::SvBaseLink *, const Link& rEndEditHdl );
+
+ // erfrage ob das man direkt auf die Daten zugreifen kann oder ob das
+ // erst angestossen werden muss
+ virtual BOOL IsPending() const;
+ virtual BOOL IsDataComplete() const;
+
+ void CancelTransfers();
+};
+
+
+#endif
+
diff --git a/sfx2/source/appl/fwkhelper.cxx b/sfx2/source/appl/fwkhelper.cxx
index e053eb97a8ed..1909bcac2e17 100644
--- a/sfx2/source/appl/fwkhelper.cxx
+++ b/sfx2/source/appl/fwkhelper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: fwkhelper.cxx,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/sfx2/source/appl/helpdispatch.cxx b/sfx2/source/appl/helpdispatch.cxx
index a11c7728a445..2e1128aea277 100644
--- a/sfx2/source/appl/helpdispatch.cxx
+++ b/sfx2/source/appl/helpdispatch.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: helpdispatch.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/sfx2/source/appl/helpdispatch.hxx b/sfx2/source/appl/helpdispatch.hxx
index 71321346a484..b9d1e7b17b63 100644
--- a/sfx2/source/appl/helpdispatch.hxx
+++ b/sfx2/source/appl/helpdispatch.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: helpdispatch.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/sfx2/source/appl/helpinterceptor.cxx b/sfx2/source/appl/helpinterceptor.cxx
index c164fe2f7f80..2d997dcc26ff 100644
--- a/sfx2/source/appl/helpinterceptor.cxx
+++ b/sfx2/source/appl/helpinterceptor.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: helpinterceptor.cxx,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/sfx2/source/appl/helpinterceptor.hxx b/sfx2/source/appl/helpinterceptor.hxx
index 2841318ceddb..3476f0d305b5 100644
--- a/sfx2/source/appl/helpinterceptor.hxx
+++ b/sfx2/source/appl/helpinterceptor.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: helpinterceptor.hxx,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/sfx2/source/appl/imagemgr.cxx b/sfx2/source/appl/imagemgr.cxx
index 6f226bad8040..f7cccf2712b8 100644
--- a/sfx2/source/appl/imagemgr.cxx
+++ b/sfx2/source/appl/imagemgr.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: imagemgr.cxx,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/sfx2/source/appl/imestatuswindow.cxx b/sfx2/source/appl/imestatuswindow.cxx
index ae5d84786bf2..3cdc3064fb81 100644
--- a/sfx2/source/appl/imestatuswindow.cxx
+++ b/sfx2/source/appl/imestatuswindow.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: imestatuswindow.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/sfx2/source/appl/imestatuswindow.hxx b/sfx2/source/appl/imestatuswindow.hxx
index 2110771cf5ef..71c0b371f796 100644
--- a/sfx2/source/appl/imestatuswindow.hxx
+++ b/sfx2/source/appl/imestatuswindow.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: imestatuswindow.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/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx
index 2bf84f87e973..10e3c9b1a04a 100644
--- a/sfx2/source/appl/impldde.cxx
+++ b/sfx2/source/appl/impldde.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: impldde.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/sfx2/source/appl/impldde.hxx b/sfx2/source/appl/impldde.hxx
index 67b8f816e70d..b361df4468d3 100644
--- a/sfx2/source/appl/impldde.hxx
+++ b/sfx2/source/appl/impldde.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: impldde.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/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx
index 3533fb8a428f..ce69ba225157 100644
--- a/sfx2/source/appl/linkmgr2.cxx
+++ b/sfx2/source/appl/linkmgr2.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: linkmgr2.cxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -31,37 +28,54 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sfx2.hxx"
-
-#include <tools/debug.hxx>
#include <sfx2/linkmgr.hxx>
-
+#include <com/sun/star/document/UpdateDocMode.hpp>
+#include <sfx2/objsh.hxx>
+#include <svl/urihelper.hxx>
+#include <sot/formats.hxx>
+#include <tools/urlobj.hxx>
+#include <sot/exchange.hxx>
+#include <tools/debug.hxx>
#include <vcl/msgbox.hxx>
#include <sfx2/lnkbase.hxx>
-//#include <sfx2/linksrc.hxx>
+#include <sfx2/app.hxx>
+#include <vcl/graph.hxx>
+#include <svl/stritem.hxx>
+#include <svl/eitem.hxx>
+#include <svl/intitem.hxx>
+#include <unotools/localfilehelper.hxx>
+#include <i18npool/mslangid.hxx>
+#include <sfx2/request.hxx>
+
+#include "fileobj.hxx"
#include "impldde.hxx"
-//#include "svuidlg.hrc"
-//#include "iface.hxx"
-
#include "app.hrc"
#include "sfxresid.hxx"
#define _SVSTDARR_STRINGSDTOR
-
#include <svl/svstdarr.hxx>
-
namespace sfx2
{
+class SvxInternalLink : public sfx2::SvLinkSource
+{
+public:
+ SvxInternalLink() {}
+
+ virtual BOOL Connect( sfx2::SvBaseLink* );
+};
+
+
SV_IMPL_PTRARR( SvBaseLinks, SvBaseLinkRefPtr )
-SvLinkManager::SvLinkManager()
- : pPersist( 0 )
+LinkManager::LinkManager(SfxObjectShell* p)
+ : pPersist( p )
{
}
-SvLinkManager::~SvLinkManager()
+LinkManager::~LinkManager()
{
SvBaseLinkRef** ppRef = (SvBaseLinkRef**)aLinkTbl.GetData();
for( USHORT n = aLinkTbl.Count(); n; --n, ++ppRef )
@@ -77,12 +91,12 @@ SvLinkManager::~SvLinkManager()
/************************************************************************
-|* SvLinkManager::Remove()
+|* LinkManager::Remove()
|*
|* Beschreibung
*************************************************************************/
-void SvLinkManager::Remove( SvBaseLink *pLink )
+void LinkManager::Remove( SvBaseLink *pLink )
{
// keine Links doppelt einfuegen
int bFound = FALSE;
@@ -110,7 +124,7 @@ void SvLinkManager::Remove( SvBaseLink *pLink )
}
-void SvLinkManager::Remove( USHORT nPos, USHORT nCnt )
+void LinkManager::Remove( USHORT nPos, USHORT nCnt )
{
if( nCnt && nPos < aLinkTbl.Count() )
{
@@ -132,7 +146,7 @@ void SvLinkManager::Remove( USHORT nPos, USHORT nCnt )
}
-BOOL SvLinkManager::Insert( SvBaseLink* pLink )
+BOOL LinkManager::Insert( SvBaseLink* pLink )
{
// keine Links doppelt einfuegen
for( USHORT n = 0; n < aLinkTbl.Count(); ++n )
@@ -152,7 +166,7 @@ BOOL SvLinkManager::Insert( SvBaseLink* pLink )
}
-BOOL SvLinkManager::InsertLink( SvBaseLink * pLink,
+BOOL LinkManager::InsertLink( SvBaseLink * pLink,
USHORT nObjType,
USHORT nUpdateMode,
const String* pName )
@@ -166,7 +180,7 @@ BOOL SvLinkManager::InsertLink( SvBaseLink * pLink,
}
-BOOL SvLinkManager::InsertDDELink( SvBaseLink * pLink,
+BOOL LinkManager::InsertDDELink( SvBaseLink * pLink,
const String& rServer,
const String& rTopic,
const String& rItem )
@@ -183,7 +197,7 @@ BOOL SvLinkManager::InsertDDELink( SvBaseLink * pLink,
}
-BOOL SvLinkManager::InsertDDELink( SvBaseLink * pLink )
+BOOL LinkManager::InsertDDELink( SvBaseLink * pLink )
{
DBG_ASSERT( OBJECT_CLIENT_SO & pLink->GetObjType(), "no OBJECT_CLIENT_SO" );
if( !( OBJECT_CLIENT_SO & pLink->GetObjType() ) )
@@ -197,34 +211,70 @@ BOOL SvLinkManager::InsertDDELink( SvBaseLink * pLink )
// erfrage die Strings fuer den Dialog
-BOOL SvLinkManager::GetDisplayNames( const SvBaseLink * pLink,
+BOOL LinkManager::GetDisplayNames( const SvBaseLink * pLink,
String* pType,
String* pFile,
String* pLinkStr,
- String* /*pFilter*/ ) const
+ String* pFilter ) const
{
BOOL bRet = FALSE;
- String aLN = pLink->GetLinkSourceName();
- if( aLN.Len() != 0 && pLink->GetObjType() == OBJECT_CLIENT_DDE )
+ const String sLNm( pLink->GetLinkSourceName() );
+ if( sLNm.Len() )
{
- USHORT nTmp = 0;
- String sCmd( aLN );
- String sServer( sCmd.GetToken( 0, cTokenSeperator, nTmp ) );
- String sTopic( sCmd.GetToken( 0, cTokenSeperator, nTmp ) );
-
- if( pType )
- *pType = sServer;
- if( pFile )
- *pFile = sTopic;
- if( pLinkStr )
- *pLinkStr = sCmd.Copy( nTmp );
- bRet = TRUE;
+ switch( pLink->GetObjType() )
+ {
+ case OBJECT_CLIENT_FILE:
+ case OBJECT_CLIENT_GRF:
+ case OBJECT_CLIENT_OLE:
+ {
+ USHORT nPos = 0;
+ String sFile( sLNm.GetToken( 0, ::sfx2::cTokenSeperator, nPos ) );
+ String sRange( sLNm.GetToken( 0, ::sfx2::cTokenSeperator, nPos ) );
+
+ if( pFile )
+ *pFile = sFile;
+ if( pLinkStr )
+ *pLinkStr = sRange;
+ if( pFilter )
+ *pFilter = sLNm.Copy( nPos );
+
+ if( pType )
+ {
+ sal_uInt16 nObjType = pLink->GetObjType();
+ *pType = String( SfxResId(
+ ( OBJECT_CLIENT_FILE == nObjType || OBJECT_CLIENT_OLE == nObjType )
+ ? RID_SVXSTR_FILELINK
+ : RID_SVXSTR_GRAFIKLINK ));
+ }
+ bRet = TRUE;
+ }
+ break;
+ case OBJECT_CLIENT_DDE:
+ {
+ USHORT nTmp = 0;
+ String sCmd( sLNm );
+ String sServer( sCmd.GetToken( 0, cTokenSeperator, nTmp ) );
+ String sTopic( sCmd.GetToken( 0, cTokenSeperator, nTmp ) );
+
+ if( pType )
+ *pType = sServer;
+ if( pFile )
+ *pFile = sTopic;
+ if( pLinkStr )
+ *pLinkStr = sCmd.Copy( nTmp );
+ bRet = TRUE;
+ }
+ break;
+ default:
+ break;
+ }
}
+
return bRet;
}
-void SvLinkManager::UpdateAllLinks(
+void LinkManager::UpdateAllLinks(
BOOL bAskUpdate,
BOOL /*bCallErrHdl*/,
BOOL bUpdateGrfLinks,
@@ -287,14 +337,24 @@ void SvLinkManager::UpdateAllLinks(
|* Beschreibung
*************************************************************************/
-SvLinkSourceRef SvLinkManager::CreateObj( SvBaseLink * pLink )
+SvLinkSourceRef LinkManager::CreateObj( SvBaseLink * pLink )
{
- if( OBJECT_CLIENT_DDE == pLink->GetObjType() )
- return new SvDDEObject();
- return SvLinkSourceRef();
+ switch( pLink->GetObjType() )
+ {
+ case OBJECT_CLIENT_FILE:
+ case OBJECT_CLIENT_GRF:
+ case OBJECT_CLIENT_OLE:
+ return new SvFileObject;
+ case OBJECT_INTERN:
+ return new SvxInternalLink;
+ case OBJECT_CLIENT_DDE:
+ return new SvDDEObject;
+ default:
+ return SvLinkSourceRef();
+ }
}
-BOOL SvLinkManager::InsertServer( SvLinkSource* pObj )
+BOOL LinkManager::InsertServer( SvLinkSource* pObj )
{
// keine doppelt einfuegen
if( !pObj || USHRT_MAX != aServerTbl.GetPos( pObj ) )
@@ -305,7 +365,7 @@ BOOL SvLinkManager::InsertServer( SvLinkSource* pObj )
}
-void SvLinkManager::RemoveServer( SvLinkSource* pObj )
+void LinkManager::RemoveServer( SvLinkSource* pObj )
{
USHORT nPos = aServerTbl.GetPos( pObj );
if( USHRT_MAX != nPos )
@@ -327,6 +387,249 @@ void MakeLnkName( String& rName, const String* pType, const String& rFile,
((rName += cTokenSeperator ) += *pFilter).EraseLeadingChars().EraseTrailingChars();
}
+BOOL LinkManager::InsertFileLink( sfx2::SvBaseLink& rLink,
+ USHORT nFileType,
+ const String& rFileNm,
+ const String* pFilterNm,
+ const String* pRange )
+{
+ if( !( OBJECT_CLIENT_SO & rLink.GetObjType() ))
+ return FALSE;
+
+ String sCmd( rFileNm );
+ sCmd += ::sfx2::cTokenSeperator;
+ if( pRange )
+ sCmd += *pRange;
+ if( pFilterNm )
+ ( sCmd += ::sfx2::cTokenSeperator ) += *pFilterNm;
+
+ return InsertLink( &rLink, nFileType, sfx2::LINKUPDATE_ONCALL, &sCmd );
+}
+
+BOOL LinkManager::InsertFileLink( sfx2::SvBaseLink& rLink )
+{
+ if( OBJECT_CLIENT_FILE == ( OBJECT_CLIENT_FILE & rLink.GetObjType() ))
+ return InsertLink( &rLink, rLink.GetObjType(), sfx2::LINKUPDATE_ONCALL );
+ return FALSE;
+}
+
+// eine Uebertragung wird abgebrochen, also alle DownloadMedien canceln
+// (ist zur Zeit nur fuer die FileLinks interressant!)
+void LinkManager::CancelTransfers()
+{
+ SvFileObject* pFileObj;
+ sfx2::SvBaseLink* pLnk;
+
+ const sfx2::SvBaseLinks& rLnks = GetLinks();
+ for( USHORT n = rLnks.Count(); n; )
+ if( 0 != ( pLnk = &(*rLnks[ --n ])) &&
+ OBJECT_CLIENT_FILE == (OBJECT_CLIENT_FILE & pLnk->GetObjType()) &&
+ 0 != ( pFileObj = (SvFileObject*)pLnk->GetObj() ) )
+// 0 != ( pFileObj = (SvFileObject*)SvFileObject::ClassFactory()->
+// CastAndAddRef( pLnk->GetObj() )) )
+ pFileObj->CancelTransfers();
+}
+
+ // um Status Informationen aus dem FileObject an den BaseLink zu
+ // senden, gibt es eine eigene ClipBoardId. Das SvData-Object hat
+ // dann die entsprechenden Informationen als String.
+ // Wird zur Zeit fuer FileObject in Verbindung mit JavaScript benoetigt
+ // - das braucht Informationen ueber Load/Abort/Error
+ULONG LinkManager::RegisterStatusInfoId()
+{
+ static ULONG nFormat = 0;
+
+ if( !nFormat )
+ {
+// wie sieht die neue Schnittstelle aus?
+// nFormat = Exchange::RegisterFormatName( "StatusInfo vom SvxInternalLink" );
+ nFormat = SotExchange::RegisterFormatName(
+ String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM(
+ "StatusInfo vom SvxInternalLink" )));
+ }
+ return nFormat;
+}
+
+// ----------------------------------------------------------------------
+
+BOOL LinkManager::GetGraphicFromAny( const String& rMimeType,
+ const ::com::sun::star::uno::Any & rValue,
+ Graphic& rGrf )
+{
+ BOOL bRet = FALSE;
+ ::com::sun::star::uno::Sequence< sal_Int8 > aSeq;
+ if( rValue.hasValue() && ( rValue >>= aSeq ) )
+ {
+ SvMemoryStream aMemStm( (void*)aSeq.getConstArray(), aSeq.getLength(),
+ STREAM_READ );
+ aMemStm.Seek( 0 );
+
+ switch( SotExchange::GetFormatIdFromMimeType( rMimeType ) )
+ {
+ case SOT_FORMATSTR_ID_SVXB:
+ {
+ aMemStm >> rGrf;
+ bRet = TRUE;
+ }
+ break;
+ case FORMAT_GDIMETAFILE:
+ {
+ GDIMetaFile aMtf;
+ aMtf.Read( aMemStm );
+ rGrf = aMtf;
+ bRet = TRUE;
+ }
+ break;
+ case FORMAT_BITMAP:
+ {
+ Bitmap aBmp;
+ aMemStm >> aBmp;
+ rGrf = aBmp;
+ bRet = TRUE;
+ }
+ break;
+ }
+ }
+ return bRet;
+}
+
+
+// ----------------------------------------------------------------------
+String lcl_DDE_RelToAbs( const String& rTopic, const String& rBaseURL )
+{
+ String sRet;
+ INetURLObject aURL( rTopic );
+ if( INET_PROT_NOT_VALID == aURL.GetProtocol() )
+ utl::LocalFileHelper::ConvertSystemPathToURL( rTopic, rBaseURL, sRet );
+ if( !sRet.Len() )
+ sRet = URIHelper::SmartRel2Abs( INetURLObject(rBaseURL), rTopic, URIHelper::GetMaybeFileHdl(), true );
+ return sRet;
+}
+
+BOOL SvxInternalLink::Connect( sfx2::SvBaseLink* pLink )
+{
+ SfxObjectShell* pFndShell = 0;
+ USHORT nUpdateMode = com::sun::star::document::UpdateDocMode::NO_UPDATE;
+ String sTopic, sItem, sReferer;
+ if( pLink->GetLinkManager() &&
+ pLink->GetLinkManager()->GetDisplayNames( pLink, 0, &sTopic, &sItem )
+ && sTopic.Len() )
+ {
+ // erstmal nur ueber die DocumentShells laufen und die mit dem
+ // Namen heraussuchen:
+
+ com::sun::star::lang::Locale aLocale;
+ MsLangId::convertLanguageToLocale( LANGUAGE_SYSTEM, aLocale );
+ CharClass aCC( aLocale );
+
+ String sNm( sTopic ), sTmp;
+ aCC.toLower( sNm );
+
+ TypeId aType( TYPE(SfxObjectShell) );
+
+ BOOL bFirst = TRUE;
+ SfxObjectShell* pShell = pLink->GetLinkManager()->GetPersist();
+ if( pShell && pShell->GetMedium() )
+ {
+ sReferer = pShell->GetMedium()->GetBaseURL();
+ SFX_ITEMSET_ARG( pShell->GetMedium()->GetItemSet(), pItem, SfxUInt16Item, SID_UPDATEDOCMODE, sal_False );
+ if ( pItem )
+ nUpdateMode = pItem->GetValue();
+ }
+
+ String sNmURL( lcl_DDE_RelToAbs( sTopic, sReferer ) );
+ aCC.toLower( sNmURL );
+
+ if ( !pShell )
+ {
+ bFirst = FALSE;
+ pShell = SfxObjectShell::GetFirst( &aType, sal_False );
+ }
+
+ while( pShell )
+ {
+ if( !sTmp.Len() )
+ {
+ sTmp = pShell->GetTitle( SFX_TITLE_FULLNAME );
+ sTmp = lcl_DDE_RelToAbs(sTmp, sReferer );
+ }
+
+
+ aCC.toLower( sTmp );
+ if( sTmp == sNmURL ) // die wollen wir haben
+ {
+ pFndShell = pShell;
+ break;
+ }
+
+ if( bFirst )
+ {
+ bFirst = FALSE;
+ pShell = SfxObjectShell::GetFirst( &aType, sal_False );
+ }
+ else
+ pShell = SfxObjectShell::GetNext( *pShell, &aType, sal_False );
+
+ sTmp.Erase();
+ }
+ }
+
+ // empty topics are not allowed - which document is it
+ if( !sTopic.Len() )
+ return FALSE;
+
+ if( !pFndShell )
+ {
+ // dann versuche die Datei zu laden:
+ INetURLObject aURL( sTopic );
+ INetProtocol eOld = aURL.GetProtocol();
+ aURL.SetURL( sTopic = lcl_DDE_RelToAbs( sTopic, sReferer ) );
+ if( INET_PROT_NOT_VALID != eOld ||
+ INET_PROT_HTTP != aURL.GetProtocol() )
+ {
+ SfxStringItem aName( SID_FILE_NAME, sTopic );
+ SfxBoolItem aMinimized(SID_MINIMIZED, TRUE);
+ SfxBoolItem aHidden(SID_HIDDEN, TRUE);
+ SfxStringItem aTarget( SID_TARGETNAME, String::CreateFromAscii("_blank") );
+ SfxStringItem aReferer( SID_REFERER, sReferer );
+ SfxUInt16Item aUpdate( SID_UPDATEDOCMODE, nUpdateMode );
+ SfxBoolItem aReadOnly(SID_DOC_READONLY, TRUE);
+
+ // #i14200# (DDE-link crashes wordprocessor)
+ SfxAllItemSet aArgs( SFX_APP()->GetPool() );
+ aArgs.Put(aReferer);
+ aArgs.Put(aTarget);
+ aArgs.Put(aHidden);
+ aArgs.Put(aMinimized);
+ aArgs.Put(aName);
+ aArgs.Put(aUpdate);
+ aArgs.Put(aReadOnly);
+ pFndShell = SfxObjectShell::CreateAndLoadObject( aArgs );
+ }
+ }
+
+ BOOL bRet = FALSE;
+ if( pFndShell )
+ {
+ sfx2::SvLinkSource* pNewSrc = pFndShell->DdeCreateLinkSource( sItem );
+ if( pNewSrc )
+ {
+ bRet = TRUE;
+
+ ::com::sun::star::datatransfer::DataFlavor aFl;
+ SotExchange::GetFormatDataFlavor( pLink->GetContentType(), aFl );
+
+ pLink->SetObj( pNewSrc );
+ pNewSrc->AddDataAdvise( pLink, aFl.MimeType,
+ sfx2::LINKUPDATE_ONCALL == pLink->GetUpdateMode()
+ ? ADVISEMODE_ONLYONCE
+ : 0 );
+ }
+ }
+ return bRet;
+}
+
+
}
diff --git a/sfx2/source/appl/linksrc.cxx b/sfx2/source/appl/linksrc.cxx
index f7ff7b161588..e9fbde42328f 100644
--- a/sfx2/source/appl/linksrc.cxx
+++ b/sfx2/source/appl/linksrc.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: linksrc.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/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx
index 8a852b44b6f7..314832e2249d 100644
--- a/sfx2/source/appl/lnkbase2.cxx
+++ b/sfx2/source/appl/lnkbase2.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: lnkbase2.cxx,v $
- * $Revision: 1.14 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -37,19 +34,12 @@
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Sequence.hxx>
#include <vcl/msgbox.hxx>
-
#include <sfx2/linkmgr.hxx>
-//#include "svuidlg.hrc"
-//#include "iface.hxx"
#include <vcl/svapp.hxx>
-//#include <soerr.hxx>
-
#include "app.hrc"
#include "sfxresid.hxx"
#include <sfx2/filedlghelper.hxx>
-
#include <tools/debug.hxx>
-
#include <svl/svdde.hxx>
using namespace ::com::sun::star::uno;
@@ -66,7 +56,7 @@ class ImplDdeItem;
struct BaseLink_Impl
{
Link m_aEndEditLink;
- SvLinkManager* m_pLinkMgr;
+ LinkManager* m_pLinkMgr;
Window* m_pParentWin;
FileDialogHelper* m_pFileDlg;
bool m_bIsConnect;
@@ -472,17 +462,17 @@ BOOL SvBaseLink::SetContentType( ULONG nType )
return FALSE;
}
-SvLinkManager* SvBaseLink::GetLinkManager()
+LinkManager* SvBaseLink::GetLinkManager()
{
return pImpl->m_pLinkMgr;
}
-const SvLinkManager* SvBaseLink::GetLinkManager() const
+const LinkManager* SvBaseLink::GetLinkManager() const
{
return pImpl->m_pLinkMgr;
}
-void SvBaseLink::SetLinkManager( SvLinkManager* _pMgr )
+void SvBaseLink::SetLinkManager( LinkManager* _pMgr )
{
pImpl->m_pLinkMgr = _pMgr;
}
diff --git a/sfx2/source/appl/makefile.mk b/sfx2/source/appl/makefile.mk
index 48d1258e2838..72ac94a9b38e 100644
--- a/sfx2/source/appl/makefile.mk
+++ b/sfx2/source/appl/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.56 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
@@ -93,6 +89,7 @@ SFX_OBJECTS = \
$(SLO)$/appuno.obj \
$(SLO)$/appbaslib.obj \
$(SLO)$/childwin.obj \
+ $(SLO)$/fileobj.obj \
$(SLO)$/helpdispatch.obj \
$(SLO)$/helpinterceptor.obj \
$(SLO)$/imagemgr.obj\
@@ -103,6 +100,7 @@ SFX_OBJECTS = \
$(SLO)$/lnkbase2.obj \
$(SLO)$/module.obj \
$(SLO)$/newhelp.obj \
+ $(SLO)$/opengrf.obj \
$(SLO)$/sfxdll.obj \
$(SLO)$/sfxhelp.obj \
$(SLO)$/sfxpicklist.obj \
@@ -143,8 +141,10 @@ EXCEPTIONSFILES=\
$(SLO)$/appmisc.obj \
$(SLO)$/appinit.obj \
$(SLO)$/appcfg.obj \
+ $(SLO)$/fileobj.obj \
$(SLO)$/helpinterceptor.obj \
$(SLO)$/newhelp.obj \
+ $(SLO)$/opengrf.obj \
$(SLO)$/sfxhelp.obj \
$(SLO)$/shutdownicon.obj \
$(SLO)$/shutdowniconw32.obj \
diff --git a/sfx2/source/appl/module.cxx b/sfx2/source/appl/module.cxx
index 566d1af69242..c8a9742f49cf 100644
--- a/sfx2/source/appl/module.cxx
+++ b/sfx2/source/appl/module.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: module.cxx,v $
- * $Revision: 1.20 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -51,6 +48,7 @@
#include <sfx2/docfac.hxx>
#include <sfx2/objface.hxx>
#include <sfx2/viewfrm.hxx>
+#include <svl/intitem.hxx>
#define SfxModule
#include "sfxslots.hxx"
@@ -411,3 +409,29 @@ SfxModule* SfxModule::GetActiveModule( SfxViewFrame* pFrame )
pSh = pFrame->GetObjectShell();
return pSh ? pSh->GetModule() : 0;
}
+
+FieldUnit SfxModule::GetCurrentFieldUnit()
+{
+ FieldUnit eUnit = FUNIT_INCH;
+ SfxModule* pModule = GetActiveModule();
+ if ( pModule )
+ {
+ const SfxPoolItem* pItem = pModule->GetItem( SID_ATTR_METRIC );
+ DBG_ASSERT( pItem, "GetFieldUnit(): no item" );
+ if ( pItem )
+ eUnit = (FieldUnit)( (SfxUInt16Item*)pItem )->GetValue();
+ }
+ else
+ DBG_ERRORFILE( "GetModuleFieldUnit(): no module found" );
+ return eUnit;
+}
+
+FieldUnit SfxModule::GetFieldUnit() const
+{
+ FieldUnit eUnit = FUNIT_INCH;
+ const SfxPoolItem* pItem = GetItem( SID_ATTR_METRIC );
+ DBG_ASSERT( pItem, "GetFieldUnit(): no item" );
+ if ( pItem )
+ eUnit = (FieldUnit)( (SfxUInt16Item*)pItem )->GetValue();
+ return eUnit;
+}
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index c5412f35d0f6..597509cf34bd 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: newhelp.cxx,v $
- * $Revision: 1.130 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sfx2/source/appl/newhelp.hrc b/sfx2/source/appl/newhelp.hrc
index fbc8d74a5678..7bb9aa85678c 100644
--- a/sfx2/source/appl/newhelp.hrc
+++ b/sfx2/source/appl/newhelp.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: newhelp.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/sfx2/source/appl/newhelp.hxx b/sfx2/source/appl/newhelp.hxx
index acda2cf312e7..95a5bfe52230 100644
--- a/sfx2/source/appl/newhelp.hxx
+++ b/sfx2/source/appl/newhelp.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: newhelp.hxx,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/sfx2/source/appl/newhelp.src b/sfx2/source/appl/newhelp.src
index e4a4f8a6929b..8a2b4f760f7e 100644
--- a/sfx2/source/appl/newhelp.src
+++ b/sfx2/source/appl/newhelp.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: newhelp.src,v $
- * $Revision: 1.97 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sfx2/source/appl/opengrf.cxx b/sfx2/source/appl/opengrf.cxx
new file mode 100644
index 000000000000..a4d134df27fa
--- /dev/null
+++ b/sfx2/source/appl/opengrf.cxx
@@ -0,0 +1,295 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sfx2.hxx"
+
+#include <tools/urlobj.hxx>
+#include <cppuhelper/implbase1.hxx>
+#include <com/sun/star/uno/Reference.h>
+#include <com/sun/star/lang/XInitialization.hpp>
+#include <com/sun/star/ui/dialogs/CommonFilePickerElementIds.hpp>
+#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
+#include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
+#include <com/sun/star/ui/dialogs/FilePreviewImageFormats.hpp>
+#include <com/sun/star/ui/dialogs/ListboxControlActions.hpp>
+#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
+#include <com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp>
+#include <com/sun/star/ui/dialogs/XFilePicker.hpp>
+#include <com/sun/star/ui/dialogs/XFilePickerListener.hpp>
+#include <com/sun/star/ui/dialogs/XFilePickerNotifier.hpp>
+#include <com/sun/star/ui/dialogs/XFilePreview.hpp>
+#include <com/sun/star/ui/dialogs/XFilterManager.hpp>
+#include <svl/urihelper.hxx>
+#include <unotools/ucbstreamhelper.hxx>
+#include <svtools/transfer.hxx>
+#include <sot/formats.hxx>
+#include <vcl/msgbox.hxx>
+#include <sfx2/filedlghelper.hxx>
+#include <sfx2/docfile.hxx>
+#include <unotools/pathoptions.hxx>
+#include <sfx2/opengrf.hxx>
+#include "app.hrc"
+#include "sfxresid.hxx"
+
+//-----------------------------------------------------------------------------
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::ui::dialogs;
+using namespace ::com::sun::star::uno;
+using namespace ::rtl;
+using namespace ::cppu;
+
+
+//-----------------------------------------------------------------------------
+
+USHORT SvxOpenGrfErr2ResId( short err )
+{
+ switch( err )
+ {
+ case GRFILTER_OPENERROR:
+ return RID_SVXSTR_GRFILTER_OPENERROR;
+ case GRFILTER_IOERROR:
+ return RID_SVXSTR_GRFILTER_IOERROR;
+ case GRFILTER_VERSIONERROR:
+ return RID_SVXSTR_GRFILTER_VERSIONERROR;
+ case GRFILTER_FILTERERROR:
+ return RID_SVXSTR_GRFILTER_FILTERERROR;
+ case GRFILTER_FORMATERROR:
+ default:
+ return RID_SVXSTR_GRFILTER_FORMATERROR;
+ }
+}
+
+
+struct SvxOpenGrf_Impl
+{
+ SvxOpenGrf_Impl ();
+
+ sfx2::FileDialogHelper aFileDlg;
+ uno::Reference < XFilePickerControlAccess > xCtrlAcc;
+};
+
+
+SvxOpenGrf_Impl::SvxOpenGrf_Impl() :
+ aFileDlg(SFXWB_GRAPHIC)
+{
+ uno::Reference < XFilePicker > xFP = aFileDlg.GetFilePicker();
+ xCtrlAcc = uno::Reference < XFilePickerControlAccess >(xFP, UNO_QUERY);
+}
+
+
+SvxOpenGraphicDialog::SvxOpenGraphicDialog( const String& rTitle ) :
+ mpImpl( new SvxOpenGrf_Impl )
+{
+ mpImpl->aFileDlg.SetTitle(rTitle);
+}
+
+
+SvxOpenGraphicDialog::~SvxOpenGraphicDialog()
+{
+}
+
+
+short SvxOpenGraphicDialog::Execute()
+{
+ USHORT nImpRet;
+ BOOL bQuitLoop(FALSE);
+
+ while( bQuitLoop == FALSE &&
+ mpImpl->aFileDlg.Execute() == ERRCODE_NONE )
+ {
+ if( GetPath().Len() )
+ {
+ GraphicFilter* pFilter = GraphicFilter::GetGraphicFilter();
+ INetURLObject aObj( GetPath() );
+
+ // check whether we can load the graphic
+ String aCurFilter( GetCurrentFilter() );
+ USHORT nFormatNum = pFilter->GetImportFormatNumber( aCurFilter );
+ USHORT nRetFormat = 0;
+ USHORT nFound = USHRT_MAX;
+
+ // non-local?
+ if ( INET_PROT_FILE != aObj.GetProtocol() )
+ {
+ SfxMedium aMed( aObj.GetMainURL( INetURLObject::NO_DECODE ), STREAM_READ, TRUE );
+ aMed.DownLoad();
+ SvStream* pStream = aMed.GetInStream();
+
+ if( pStream )
+ nImpRet = pFilter->CanImportGraphic( aObj.GetMainURL( INetURLObject::NO_DECODE ), *pStream, nFormatNum, &nRetFormat );
+ else
+ nImpRet = pFilter->CanImportGraphic( aObj, nFormatNum, &nRetFormat );
+
+ if ( GRFILTER_OK != nImpRet )
+ {
+ if ( !pStream )
+ nImpRet = pFilter->CanImportGraphic( aObj, GRFILTER_FORMAT_DONTKNOW, &nRetFormat );
+ else
+ nImpRet = pFilter->CanImportGraphic( aObj.GetMainURL( INetURLObject::NO_DECODE ), *pStream,
+ GRFILTER_FORMAT_DONTKNOW, &nRetFormat );
+ }
+ }
+ else
+ {
+ if( (nImpRet=pFilter->CanImportGraphic( aObj, nFormatNum, &nRetFormat )) != GRFILTER_OK )
+ nImpRet = pFilter->CanImportGraphic( aObj, GRFILTER_FORMAT_DONTKNOW, &nRetFormat );
+ }
+
+ if ( GRFILTER_OK == nImpRet )
+ nFound = nRetFormat;
+
+ // could not load?
+ if ( nFound == USHRT_MAX )
+ {
+ WarningBox aWarningBox( NULL, WB_3DLOOK | WB_RETRY_CANCEL, String( SfxResId( SvxOpenGrfErr2ResId(nImpRet) ) ) );
+ bQuitLoop = aWarningBox.Execute()==RET_RETRY ? FALSE : TRUE;
+ }
+ else
+ {
+ // setup appropriate filter (so next time, it will work)
+ if( pFilter->GetImportFormatCount() )
+ {
+ String aFormatName(pFilter->GetImportFormatName(nFound));
+ SetCurrentFilter(aFormatName);
+ }
+
+ return nImpRet;
+ }
+ }
+ }
+
+ // cancel
+ return -1;
+}
+
+
+void SvxOpenGraphicDialog::SetPath( const String& rPath )
+{
+ mpImpl->aFileDlg.SetDisplayDirectory(rPath);
+}
+
+void SvxOpenGraphicDialog::SetPath( const String& rPath, sal_Bool bLinkState )
+{
+ SetPath(rPath);
+ AsLink(bLinkState);
+}
+
+
+void SvxOpenGraphicDialog::EnableLink( sal_Bool state )
+{
+ if( mpImpl->xCtrlAcc.is() )
+ {
+ try
+ {
+ mpImpl->xCtrlAcc->enableControl( ExtendedFilePickerElementIds::CHECKBOX_LINK, state );
+ }
+ catch(IllegalArgumentException)
+ {
+#ifdef DBG_UTIL
+ DBG_ERROR( "Cannot enable \"link\" checkbox" );
+#endif
+ }
+ }
+}
+
+
+void SvxOpenGraphicDialog::AsLink(sal_Bool bState)
+{
+ if( mpImpl->xCtrlAcc.is() )
+ {
+ try
+ {
+ Any aAny; aAny <<= bState;
+ mpImpl->xCtrlAcc->setValue( ExtendedFilePickerElementIds::CHECKBOX_LINK, 0, aAny );
+ }
+ catch(IllegalArgumentException)
+ {
+#ifdef DBG_UTIL
+ DBG_ERROR( "Cannot check \"link\" checkbox" );
+#endif
+ }
+ }
+}
+
+
+sal_Bool SvxOpenGraphicDialog::IsAsLink() const
+{
+ try
+ {
+ if( mpImpl->xCtrlAcc.is() )
+ {
+ Any aVal = mpImpl->xCtrlAcc->getValue( ExtendedFilePickerElementIds::CHECKBOX_LINK, 0 );
+ DBG_ASSERT(aVal.hasValue(), "Value CBX_INSERT_AS_LINK not found");
+ return aVal.hasValue() ? *(sal_Bool*) aVal.getValue() : sal_False;
+ }
+ }
+ catch(IllegalArgumentException)
+ {
+#ifdef DBG_UTIL
+ DBG_ERROR( "Cannot access \"link\" checkbox" );
+#endif
+ }
+
+ return sal_False;
+}
+
+
+int SvxOpenGraphicDialog::GetGraphic(Graphic& rGraphic) const
+{
+ return mpImpl->aFileDlg.GetGraphic(rGraphic);
+}
+
+
+String SvxOpenGraphicDialog::GetPath() const
+{
+ return mpImpl->aFileDlg.GetPath();
+}
+
+
+String SvxOpenGraphicDialog::GetCurrentFilter() const
+{
+ return mpImpl->aFileDlg.GetCurrentFilter();
+}
+
+
+void SvxOpenGraphicDialog::SetCurrentFilter(const String& rStr)
+{
+ mpImpl->aFileDlg.SetCurrentFilter(rStr);
+}
+
+void SvxOpenGraphicDialog::SetControlHelpIds( const INT16* _pControlId, const INT32* _pHelpId )
+{
+ mpImpl->aFileDlg.SetControlHelpIds( _pControlId, _pHelpId );
+}
+
+void SvxOpenGraphicDialog::SetDialogHelpId( const INT32 _nHelpId )
+{
+ mpImpl->aFileDlg.SetDialogHelpId( _nHelpId );
+}
diff --git a/sfx2/source/appl/panelist.hxx b/sfx2/source/appl/panelist.hxx
index 167c8d67d225..2406709aede9 100644
--- a/sfx2/source/appl/panelist.hxx
+++ b/sfx2/source/appl/panelist.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: panelist.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/sfx2/source/appl/sfx.src b/sfx2/source/appl/sfx.src
index ba9f4a3ffe11..7d4bb0db1726 100644
--- a/sfx2/source/appl/sfx.src
+++ b/sfx2/source/appl/sfx.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: sfx.src,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/sfx2/source/appl/sfxdll.cxx b/sfx2/source/appl/sfxdll.cxx
index 8ca92b8cb8c7..956a61b3e247 100644
--- a/sfx2/source/appl/sfxdll.cxx
+++ b/sfx2/source/appl/sfxdll.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: sfxdll.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/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index 491de2138917..b9ff344a1513 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: sfxhelp.cxx,v $
- * $Revision: 1.82.78.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -38,9 +35,7 @@
#include <com/sun/star/frame/XFrame.hpp>
#include <com/sun/star/frame/XComponentLoader.hpp>
#include <com/sun/star/lang/XComponent.hpp>
-#ifndef _UNOTOOLS_PROCESSFACTORY_HXX
#include <comphelper/processfactory.hxx>
-#endif
#include <com/sun/star/awt/XWindow.hpp>
#include <com/sun/star/awt/XTopWindow.hpp>
#include <com/sun/star/awt/PosSize.hpp>
@@ -60,13 +55,11 @@
#include <tools/urlobj.hxx>
#include <unotools/configmgr.hxx>
#include <ucbhelper/content.hxx>
-
#include <unotools/pathoptions.hxx>
#include <rtl/ustring.hxx>
#include <osl/process.h>
#include <osl/file.hxx>
#include <unotools/bootstrap.hxx>
-
#include <rtl/uri.hxx>
#include <vcl/msgbox.hxx>
#include <svtools/ehdl.hxx>
@@ -76,16 +69,13 @@
#define _SVSTDARR_ULONGSSORT
#include <svl/svstdarr.hxx>
-#include <sfx2/sfxsids.hrc>
-#include <sfx2/app.hxx>
-#include <sfx2/viewfrm.hxx>
-#include <sfx2/msgpool.hxx>
#include "newhelp.hxx"
-#include <sfx2/objsh.hxx>
-#include <sfx2/docfac.hxx>
#include "sfxresid.hxx"
#include "helper.hxx"
#include "app.hrc"
+#include <sfx2/sfxuno.hxx>
+#include <vcl/svapp.hxx>
+#include <sfx2/frame.hxx>
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::frame;
@@ -132,7 +122,8 @@ rtl::OUString HelpLocaleString()
Any aLocale =
::utl::ConfigManager::GetConfigManager()->GetDirectConfigProperty(
::utl::ConfigManager::LOCALE );
- bool bOk = (aLocale >>= aLocaleStr);
+ aLocale >>= aLocaleStr;
+ bool bOk = aLocaleStr.getLength() != 0;
if ( bOk )
{
rtl::OUString aBaseInstallPath;
@@ -721,9 +712,6 @@ String SfxHelp::CreateHelpURL_Impl( const String& aCommandURL, const String& rM
return aHelpURL;
}
-static ::rtl::OUString OFFICE_HELP_TASK = ::rtl::OUString(DEFINE_CONST_UNICODE("OFFICE_HELP_TASK"));
-static ::rtl::OUString OFFICE_HELP = ::rtl::OUString(DEFINE_CONST_UNICODE("OFFICE_HELP" ));
-
SfxHelpWindow_Impl* impl_createHelp(Reference< XFrame >& rHelpTask ,
Reference< XFrame >& rHelpContent)
{
@@ -732,7 +720,7 @@ SfxHelpWindow_Impl* impl_createHelp(Reference< XFrame >& rHelpTask ,
// otherwhise - create new help task
Reference< XFrame > xHelpTask = xDesktop->findFrame(
- OFFICE_HELP_TASK,
+ ::rtl::OUString(DEFINE_CONST_UNICODE("OFFICE_HELP_TASK")),
FrameSearchFlag::TASKS | FrameSearchFlag::CREATE);
if (!xHelpTask.is())
return 0;
@@ -747,7 +735,7 @@ SfxHelpWindow_Impl* impl_createHelp(Reference< XFrame >& rHelpTask ,
if (xHelpTask->setComponent( xHelpWindow, Reference< XController >() ))
{
// Customize UI ...
- xHelpTask->setName( OFFICE_HELP_TASK );
+ xHelpTask->setName( ::rtl::OUString(DEFINE_CONST_UNICODE("OFFICE_HELP_TASK")) );
Reference< XPropertySet > xProps(xHelpTask, UNO_QUERY);
if (xProps.is())
@@ -761,13 +749,13 @@ SfxHelpWindow_Impl* impl_createHelp(Reference< XFrame >& rHelpTask ,
// This sub frame is created internaly (if we called new SfxHelpWindow_Impl() ...)
// It should exist :-)
- xHelpContent = xHelpTask->findFrame(OFFICE_HELP, FrameSearchFlag::CHILDREN);
+ xHelpContent = xHelpTask->findFrame(::rtl::OUString(DEFINE_CONST_UNICODE("OFFICE_HELP")), FrameSearchFlag::CHILDREN);
}
if (!xHelpContent.is())
delete pHelpWindow;
- xHelpContent->setName(OFFICE_HELP);
+ xHelpContent->setName(::rtl::OUString(DEFINE_CONST_UNICODE("OFFICE_HELP")));
rHelpTask = xHelpTask;
rHelpContent = xHelpContent;
@@ -837,10 +825,10 @@ BOOL SfxHelp::Start( const String& rURL, const Window* pWindow )
// in both cases)!
Reference< XFrame > xHelp = xDesktop->findFrame(
- OFFICE_HELP_TASK,
+ ::rtl::OUString(DEFINE_CONST_UNICODE("OFFICE_HELP_TASK")),
FrameSearchFlag::CHILDREN);
Reference< XFrame > xHelpContent = xDesktop->findFrame(
- OFFICE_HELP,
+ ::rtl::OUString(DEFINE_CONST_UNICODE("OFFICE_HELP")),
FrameSearchFlag::CHILDREN);
SfxHelpWindow_Impl* pHelpWindow = 0;
@@ -967,26 +955,39 @@ String SfxHelp::CreateHelpURL( const String& aCommandURL, const String& rModuleN
return aURL;
}
-void SfxHelp::OpenHelpAgent( SfxFrame *pFrame, ULONG nHelpId )
+void SfxHelp::OpenHelpAgent( SfxFrame*, ULONG nHelpId )
{
- if ( SvtHelpOptions().IsHelpAgentAutoStartMode() )
- {
SfxHelp* pHelp = SAL_STATIC_CAST( SfxHelp*, Application::GetHelp() );
if ( pHelp )
- {
- SfxHelpOptions_Impl *pOpt = pHelp->pImp->GetOptions();
+ pHelp->OpenHelpAgent( nHelpId );
+}
+
+void SfxHelp::OpenHelpAgent( ULONG nHelpId )
+{
+ if ( SvtHelpOptions().IsHelpAgentAutoStartMode() )
+ {
+// SfxHelp* pHelp = SAL_STATIC_CAST( SfxHelp*, Application::GetHelp() );
+// if ( pHelp )
+// {
+ SfxHelpOptions_Impl *pOpt = pImp->GetOptions();
if ( !pOpt->HasId( nHelpId ) )
return;
try
{
URL aURL;
- aURL.Complete = pHelp->CreateHelpURL_Impl( nHelpId, pHelp->GetHelpModuleName_Impl() );
+ aURL.Complete = CreateHelpURL_Impl( nHelpId, GetHelpModuleName_Impl() );
Reference < XURLTransformer > xTrans( ::comphelper::getProcessServiceFactory()->createInstance(
::rtl::OUString::createFromAscii("com.sun.star.util.URLTransformer" ) ), UNO_QUERY );
xTrans->parseStrict(aURL);
- Reference< XDispatchProvider > xDispProv( pFrame->GetTopFrame()->GetFrameInterface(), UNO_QUERY );
+ Reference < XFrame > xCurrentFrame;
+ Reference < XDesktop > xDesktop( ::comphelper::getProcessServiceFactory()->createInstance(
+ DEFINE_CONST_UNICODE("com.sun.star.frame.Desktop") ), UNO_QUERY );
+ if ( xDesktop.is() )
+ xCurrentFrame = xDesktop->getCurrentFrame();
+
+ Reference< XDispatchProvider > xDispProv( xCurrentFrame, UNO_QUERY );
Reference< XDispatch > xHelpDispatch;
if ( xDispProv.is() )
xHelpDispatch = xDispProv->queryDispatch(
@@ -1001,7 +1002,7 @@ void SfxHelp::OpenHelpAgent( SfxFrame *pFrame, ULONG nHelpId )
{
DBG_ERRORFILE( "OpenHelpAgent: caught an exception while executing the dispatch!" );
}
- }
+// }
}
}
diff --git a/sfx2/source/appl/sfxpicklist.cxx b/sfx2/source/appl/sfxpicklist.cxx
index 48b7ecdd1540..0074faac192f 100644
--- a/sfx2/source/appl/sfxpicklist.cxx
+++ b/sfx2/source/appl/sfxpicklist.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: sfxpicklist.cxx,v $
- * $Revision: 1.34 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -449,7 +446,7 @@ void SfxPickList::Notify( SfxBroadcaster&, const SfxHint& rHint )
return;
// ignore hidden documents
- if ( !SfxViewFrame::GetFirst( pDocSh, 0, TRUE ) )
+ if ( !SfxViewFrame::GetFirst( pDocSh, TRUE ) )
return;
::rtl::OUString aTitle = pDocSh->GetTitle(SFX_TITLE_PICKLIST);
diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx
index 52805082de38..1d85552e47ae 100644
--- a/sfx2/source/appl/shutdownicon.cxx
+++ b/sfx2/source/appl/shutdownicon.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: shutdownicon.cxx,v $
- * $Revision: 1.64 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sfx2/source/appl/shutdowniconOs2.cxx b/sfx2/source/appl/shutdowniconOs2.cxx
index f4108950db22..936d6f925053 100644
--- a/sfx2/source/appl/shutdowniconOs2.cxx
+++ b/sfx2/source/appl/shutdowniconOs2.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: shutdowniconOs2.cxx,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/sfx2/source/appl/shutdowniconaqua.mm b/sfx2/source/appl/shutdowniconaqua.mm
index 27aa37e05c74..14f12c79b53b 100644
--- a/sfx2/source/appl/shutdowniconaqua.mm
+++ b/sfx2/source/appl/shutdowniconaqua.mm
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: shutdowniconaqua.mm,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/sfx2/source/appl/shutdowniconw32.cxx b/sfx2/source/appl/shutdowniconw32.cxx
index 676a46ab584f..c334fd750fc6 100644
--- a/sfx2/source/appl/shutdowniconw32.cxx
+++ b/sfx2/source/appl/shutdowniconw32.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: shutdowniconw32.cxx,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/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index 7287023f1845..24cf7dab8095 100644
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: workwin.cxx,v $
- * $Revision: 1.75 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -41,7 +38,7 @@
#include <sfx2/objsh.hxx>
#include <sfx2/app.hxx>
#include "workwin.hxx"
-#include <sfx2/topfrm.hxx>
+#include <sfx2/viewfrm.hxx>
#include "arrdecl.hxx"
#include <sfx2/viewfrm.hxx>
#include <sfx2/module.hxx>
@@ -1434,8 +1431,8 @@ sal_Bool SfxWorkWindow::IsPluginMode( SfxObjectShell* pObjShell )
if ( pDispatcher )
{
SfxViewFrame* pFrame = pDispatcher->GetFrame();
- if ( pFrame && pFrame->GetFrame() )
- xFrame = pFrame->GetFrame()->GetFrameInterface();
+ if ( pFrame )
+ xFrame = pFrame->GetFrame().GetFrameInterface();
}
return xFrame;
diff --git a/sfx2/source/appl/xpackcreator.cxx b/sfx2/source/appl/xpackcreator.cxx
index e104bf24ba93..6e6606a67041 100644
--- a/sfx2/source/appl/xpackcreator.cxx
+++ b/sfx2/source/appl/xpackcreator.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: xpackcreator.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/sfx2/source/appl/xpackcreator.hxx b/sfx2/source/appl/xpackcreator.hxx
index 18d5c00ec263..ff3b84dbec64 100644
--- a/sfx2/source/appl/xpackcreator.hxx
+++ b/sfx2/source/appl/xpackcreator.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: xpackcreator.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/sfx2/source/bastyp/bastyp.hrc b/sfx2/source/bastyp/bastyp.hrc
index 76de07671dd6..b585ac79f035 100644
--- a/sfx2/source/bastyp/bastyp.hrc
+++ b/sfx2/source/bastyp/bastyp.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: bastyp.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/sfx2/source/bastyp/bastyp.src b/sfx2/source/bastyp/bastyp.src
index cd09badc13f2..5ef74f5874b3 100644
--- a/sfx2/source/bastyp/bastyp.src
+++ b/sfx2/source/bastyp/bastyp.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: bastyp.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/sfx2/source/bastyp/bitset.cxx b/sfx2/source/bastyp/bitset.cxx
index ed640a5f06bb..df35593a9a18 100644
--- a/sfx2/source/bastyp/bitset.cxx
+++ b/sfx2/source/bastyp/bitset.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: bitset.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/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx
index 4b4c17a2c5f2..d11b8b5130ed 100644
--- a/sfx2/source/bastyp/fltfnc.cxx
+++ b/sfx2/source/bastyp/fltfnc.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: fltfnc.cxx,v $
- * $Revision: 1.79 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -127,7 +124,7 @@ using namespace ::vos;
#include <sfx2/doctempl.hxx>
#include <sfx2/frame.hxx>
#include <sfx2/dispatch.hxx>
-#include <sfx2/topfrm.hxx>
+#include <sfx2/viewfrm.hxx>
#include "helper.hxx"
#include "fltlst.hxx"
#include <sfx2/request.hxx>
diff --git a/sfx2/source/bastyp/fltfnc.src b/sfx2/source/bastyp/fltfnc.src
index 6de0adbc75e1..4203163eceeb 100644
--- a/sfx2/source/bastyp/fltfnc.src
+++ b/sfx2/source/bastyp/fltfnc.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: fltfnc.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/sfx2/source/bastyp/fltlst.cxx b/sfx2/source/bastyp/fltlst.cxx
index e3383e1e9317..aab358b50220 100644
--- a/sfx2/source/bastyp/fltlst.cxx
+++ b/sfx2/source/bastyp/fltlst.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: fltlst.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/sfx2/source/bastyp/fltlst.hxx b/sfx2/source/bastyp/fltlst.hxx
index b08281967144..b3afb425634d 100644
--- a/sfx2/source/bastyp/fltlst.hxx
+++ b/sfx2/source/bastyp/fltlst.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: fltlst.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/sfx2/source/bastyp/frmhtml.cxx b/sfx2/source/bastyp/frmhtml.cxx
index 5cb4f0200614..8ecfa6b3081a 100644
--- a/sfx2/source/bastyp/frmhtml.cxx
+++ b/sfx2/source/bastyp/frmhtml.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: frmhtml.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/sfx2/source/bastyp/frmhtmlw.cxx b/sfx2/source/bastyp/frmhtmlw.cxx
index 2d1c6db11762..df81eb3f4039 100644
--- a/sfx2/source/bastyp/frmhtmlw.cxx
+++ b/sfx2/source/bastyp/frmhtmlw.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: frmhtmlw.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/sfx2/source/bastyp/helper.cxx b/sfx2/source/bastyp/helper.cxx
index 3c0adfd5c873..091651fedbc2 100644
--- a/sfx2/source/bastyp/helper.cxx
+++ b/sfx2/source/bastyp/helper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: helper.cxx,v $
- * $Revision: 1.30 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -552,9 +549,17 @@ uno::Sequence < OUString > SfxContentHelper::GetResultSet( const String& rURL )
}
}
}
- catch( uno::Exception& )
- {
- DBG_ERRORFILE( "GetResultSet: Any other exception" );
+ catch( uno::Exception& e )
+ {
+ (void) e;
+ DBG_ERRORFILE(
+ rtl::OUStringToOString(
+ (rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM(
+ "GetResultSet: Any other exception: ")) +
+ e.Message),
+ RTL_TEXTENCODING_UTF8).
+ getStr());
}
if ( pList )
diff --git a/sfx2/source/bastyp/makefile.mk b/sfx2/source/bastyp/makefile.mk
index 926107a6e965..75c0cace40d6 100644
--- a/sfx2/source/bastyp/makefile.mk
+++ b/sfx2/source/bastyp/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
diff --git a/sfx2/source/bastyp/mieclip.cxx b/sfx2/source/bastyp/mieclip.cxx
index e48c3a0cb069..ee2b15d34ab9 100644
--- a/sfx2/source/bastyp/mieclip.cxx
+++ b/sfx2/source/bastyp/mieclip.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mieclip.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/sfx2/source/bastyp/minarray.cxx b/sfx2/source/bastyp/minarray.cxx
index 04437b5e4745..978239239cea 100644
--- a/sfx2/source/bastyp/minarray.cxx
+++ b/sfx2/source/bastyp/minarray.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: minarray.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/sfx2/source/bastyp/misc.cxx b/sfx2/source/bastyp/misc.cxx
index 254edcae44b4..49938c729b36 100644
--- a/sfx2/source/bastyp/misc.cxx
+++ b/sfx2/source/bastyp/misc.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE 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.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/sfx2/source/bastyp/progress.cxx b/sfx2/source/bastyp/progress.cxx
index 8f143bb4baee..649ae121c274 100644
--- a/sfx2/source/bastyp/progress.cxx
+++ b/sfx2/source/bastyp/progress.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: progress.cxx,v $
- * $Revision: 1.29 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -80,7 +77,7 @@ void AddNumber_Impl( String& aNumber, sal_uInt32 nArg )
}
}
-struct SfxProgress_Impl : public SfxCancellable
+struct SfxProgress_Impl
{
Reference < XStatusIndicator > xStatusInd;
String aText, aStateText;
@@ -144,11 +141,9 @@ void SfxProgress_Impl::Enable_Impl( BOOL bEnable )
// -----------------------------------------------------------------------
-SfxProgress_Impl::SfxProgress_Impl( const String &rTitle )
- : SfxCancellable( SFX_APP()->GetCancelManager(), rTitle ),
- pActiveProgress( 0 )
+SfxProgress_Impl::SfxProgress_Impl( const String &/*rTitle*/ )
+ : pActiveProgress( 0 )
{
- SFX_APP()->GetCancelManager()->RemoveCancellable(this);
}
// -----------------------------------------------------------------------
@@ -186,21 +181,6 @@ SfxProgress::SfxProgress
pImp->bRunning = TRUE;
pImp->bAllowRescheduling = Application::IsInExecute();;
- if ( pObjSh )
- {
- for( SfxViewFrame* pFrame = SfxViewFrame::GetFirst( pObjSh ); pFrame; pFrame = SfxViewFrame::GetNext( *pFrame, pObjSh ) )
- {
- pFrame->GetCancelManager()->InsertCancellable( pImp );
-/*
- SfxBindings& rBindings = pFrame->GetBindings();
- rBindings.Invalidate( SID_BROWSE_STOP );
- if ( !rBindings.IsInRegistrations() )
- rBindings.Update( SID_BROWSE_STOP );
- rBindings.Invalidate( SID_BROWSE_STOP );
- */
- }
- }
-
pImp->xObjSh = pObjSh;
pImp->aText = rText;
pImp->nMax = nRange;
@@ -241,14 +221,6 @@ SfxProgress::~SfxProgress()
if( pImp->bIsStatusText == TRUE )
GetpApp()->HideStatusText( );
- SfxObjectShell* pDoc = pImp->xObjSh;
- if ( pDoc )
- {
- for( SfxViewFrame* pFrame = SfxViewFrame::GetFirst( pDoc ); pFrame; pFrame = SfxViewFrame::GetNext( *pFrame, pDoc ) )
- pFrame->GetCancelManager()->RemoveCancellable( pImp );//Invalidate( SID_BROWSE_STOP );
- }
- else
- SFX_APP()->Invalidate( SID_BROWSE_STOP );
delete pImp;
}
@@ -390,8 +362,8 @@ BOOL SfxProgress::SetState
{
// wurde via Stop-Button angehalten?
- if ( pImp->IsCancelled() )
- return FALSE;
+// if ( pImp->IsCancelled() )
+// return FALSE;
if( pImp->pActiveProgress ) return TRUE;
diff --git a/sfx2/source/bastyp/sfxhtml.cxx b/sfx2/source/bastyp/sfxhtml.cxx
index 794ee142708c..6132e958b900 100644
--- a/sfx2/source/bastyp/sfxhtml.cxx
+++ b/sfx2/source/bastyp/sfxhtml.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: sfxhtml.cxx,v $
- * $Revision: 1.23 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -357,40 +354,6 @@ IMPL_STATIC_LINK( SfxHTMLParser, FileDownloadDone, void*, EMPTYARG )
return 0;
}
-rtl_TextEncoding SfxHTMLParser::GetEncodingByHttpHeader( SvKeyValueIterator *pHTTPHeader )
-{
- rtl_TextEncoding eRet = RTL_TEXTENCODING_DONTKNOW;
- if( pHTTPHeader )
- {
- SvKeyValue aKV;
- for( BOOL bCont = pHTTPHeader->GetFirst( aKV ); bCont;
- bCont = pHTTPHeader->GetNext( aKV ) )
- {
- if( aKV.GetKey().EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_META_content_type ) )
- {
- if( aKV.GetValue().Len() )
- {
- eRet = SfxHTMLParser::GetEncodingByMIME( aKV.GetValue() );
- }
- }
- }
- }
- return eRet;
-}
-
-BOOL SfxHTMLParser::SetEncodingByHTTPHeader(
- SvKeyValueIterator *pHTTPHeader )
-{
- BOOL bRet = FALSE;
- rtl_TextEncoding eEnc = SfxHTMLParser::GetEncodingByHttpHeader( pHTTPHeader );
- if(RTL_TEXTENCODING_DONTKNOW != eEnc)
- {
- SetSrcEncoding( eEnc );
- bRet = TRUE;
- }
- return bRet;
-}
-
void SfxHTMLParser::GetScriptType_Impl( SvKeyValueIterator *pHTTPHeader )
{
aScriptType = DEFINE_CONST_UNICODE(SVX_MACRO_LANGUAGE_JAVASCRIPT);
diff --git a/sfx2/source/bastyp/sfxresid.cxx b/sfx2/source/bastyp/sfxresid.cxx
index a256438f4286..11ab5a724099 100644
--- a/sfx2/source/bastyp/sfxresid.cxx
+++ b/sfx2/source/bastyp/sfxresid.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: sfxresid.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/sfx2/source/config/config.hrc b/sfx2/source/config/config.hrc
index 3aed60ebb8e2..582a2972f913 100644
--- a/sfx2/source/config/config.hrc
+++ b/sfx2/source/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.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sfx2/source/config/config.src b/sfx2/source/config/config.src
index e67c47c5997f..cb3259e09ad0 100644
--- a/sfx2/source/config/config.src
+++ b/sfx2/source/config/config.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: config.src,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/sfx2/source/config/evntconf.cxx b/sfx2/source/config/evntconf.cxx
index 763595913fcd..9935c3a18c8b 100644
--- a/sfx2/source/config/evntconf.cxx
+++ b/sfx2/source/config/evntconf.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: evntconf.cxx,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/sfx2/source/config/makefile.mk b/sfx2/source/config/makefile.mk
index cf2e07e0b5c1..d090babd1505 100644
--- a/sfx2/source/config/makefile.mk
+++ b/sfx2/source/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.10 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx
index 7bf2c1c6dfe7..40f6346de8ee 100644
--- a/sfx2/source/control/bindings.cxx
+++ b/sfx2/source/control/bindings.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: bindings.cxx,v $
- * $Revision: 1.53.46.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -71,7 +68,7 @@
#include <sfx2/unoctitm.hxx>
#include <sfx2/sfx.hrc>
#include <sfx2/sfxuno.hxx>
-#include <sfx2/topfrm.hxx>
+#include <sfx2/viewfrm.hxx>
#include <sfx2/objsh.hxx>
#include <sfx2/msgpool.hxx>
@@ -722,7 +719,7 @@ void SfxBindings::InvalidateAll
pImp->pCaches->GetObject(n)->Invalidate(bWithMsg);
/*
::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame > xFrame
- ( pDispatcher->GetFrame()->GetFrame()->GetFrameInterface(), UNO_QUERY );
+ ( pDispatcher->GetFrame()->GetFrame().GetFrameInterface(), UNO_QUERY );
if ( bWithMsg && xFrame.is() )
xFrame->contextChanged();
@@ -1384,7 +1381,7 @@ void SfxBindings::UpdateSlotServer_Impl()
if ( !nRegLevel )
{
::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame > xFrame
- ( pDispatcher->GetFrame()->GetFrame()->GetFrameInterface(), UNO_QUERY );
+ ( pDispatcher->GetFrame()->GetFrame().GetFrameInterface(), UNO_QUERY );
//if ( xFrame.is() )
// xFrame->contextChanged();
pImp->bContextChanged = FALSE;
@@ -1926,7 +1923,7 @@ void SfxBindings::LeaveRegistrations( sal_uInt16 nLevel, const char *pFile, int
pImp->bContextChanged = FALSE;
/*
::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame > xFrame
- ( pDispatcher->GetFrame()->GetFrame()->GetFrameInterface(), UNO_QUERY );
+ ( pDispatcher->GetFrame()->GetFrame().GetFrameInterface(), UNO_QUERY );
if ( xFrame.is() )
xFrame->contextChanged();*/
}
@@ -2033,7 +2030,7 @@ void SfxBindings::SetDispatcher( SfxDispatcher *pDisp )
::com::sun::star::uno::Reference < ::com::sun::star::frame::XDispatchProvider > xProv;
if ( pDisp )
xProv = ::com::sun::star::uno::Reference < ::com::sun::star::frame::XDispatchProvider >
- ( pDisp->GetFrame()->GetFrame()->GetFrameInterface(), UNO_QUERY );
+ ( pDisp->GetFrame()->GetFrame().GetFrameInterface(), UNO_QUERY );
SetDispatchProvider_Impl( xProv );
InvalidateAll( sal_True );
@@ -2316,7 +2313,7 @@ void SfxBindings::SetActiveFrame( const ::com::sun::star::uno::Reference< ::com:
SetDispatchProvider_Impl( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > ( rFrame, ::com::sun::star::uno::UNO_QUERY ) );
else
SetDispatchProvider_Impl( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > (
- pDispatcher->GetFrame()->GetFrame()->GetFrameInterface(), ::com::sun::star::uno::UNO_QUERY ) );
+ pDispatcher->GetFrame()->GetFrame().GetFrameInterface(), ::com::sun::star::uno::UNO_QUERY ) );
}
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > SfxBindings::GetActiveFrame() const
@@ -2325,7 +2322,7 @@ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > SfxBin
if ( xFrame.is() || !pDispatcher )
return xFrame;
else
- return pDispatcher->GetFrame()->GetFrame()->GetFrameInterface();
+ return pDispatcher->GetFrame()->GetFrame().GetFrameInterface();
}
void SfxBindings::SetDispatchProvider_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > & rProv )
@@ -2352,8 +2349,8 @@ SystemWindow* SfxBindings::GetSystemWindow() const
SfxViewFrame *pFrame = pDispatcher->GetFrame();
while ( pFrame->GetParentViewFrame_Impl() )
pFrame = pFrame->GetParentViewFrame_Impl();
- SfxTopViewFrame* pTop = PTR_CAST( SfxTopViewFrame, pFrame->GetTopViewFrame() );
- return pTop->GetTopFrame_Impl()->GetTopWindow_Impl();
+ SfxViewFrame* pTop = pFrame->GetTopViewFrame();
+ return pTop->GetFrame().GetTopWindow_Impl();
}
BOOL SfxBindings::ExecuteCommand_Impl( const String& rCommand )
@@ -2377,7 +2374,7 @@ BOOL SfxBindings::ExecuteCommand_Impl( const String& rCommand )
xServiceManager->createInstance(our_aModuleManagerName)
, ::com::sun::star::uno::UNO_QUERY_THROW);
::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame > xFrame(
- pDispatcher->GetFrame()->GetFrame()->GetFrameInterface(), UNO_QUERY_THROW);
+ pDispatcher->GetFrame()->GetFrame().GetFrameInterface(), UNO_QUERY_THROW);
sAppName = xModuleManager->identify(xFrame);
} catch(::com::sun::star::uno::Exception&) {}
Sequence<beans::PropertyValue> source;
diff --git a/sfx2/source/control/ctrlitem.cxx b/sfx2/source/control/ctrlitem.cxx
index f39c480fbdeb..9376b81fa0ff 100644
--- a/sfx2/source/control/ctrlitem.cxx
+++ b/sfx2/source/control/ctrlitem.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ctrlitem.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/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index fa3330059859..e66dd2c56eaf 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dispatch.cxx,v $
- * $Revision: 1.56.126.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -79,7 +76,7 @@
#include <sfx2/docfac.hxx>
#include <sfx2/msgpool.hxx>
#include <sfx2/module.hxx>
-#include <sfx2/topfrm.hxx>
+#include <sfx2/viewfrm.hxx>
#include <sfx2/sfxuno.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/mnumgr.hxx>
@@ -242,14 +239,13 @@ int SfxDispatcher::Call_Impl( SfxShell& rShell, const SfxSlot &rSlot, SfxRequest
SFX_STACK(SfxDispatcher::Call_Impl);
// darf der Slot gerufen werden (i.S.v. enabled)
- SfxApplication *pSfxApp = SFX_APP();
if ( rSlot.IsMode(SFX_SLOT_FASTCALL) || rShell.CanExecuteSlot_Impl(rSlot) )
{
if ( GetFrame() )
{
// ggf. Recording anwerfen
com::sun::star::uno::Reference< com::sun::star::frame::XFrame > xFrame(
- GetFrame()->GetFrame()->GetFrameInterface(),
+ GetFrame()->GetFrame().GetFrameInterface(),
com::sun::star::uno::UNO_QUERY);
com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > xSet(
@@ -273,19 +269,6 @@ int SfxDispatcher::Call_Impl( SfxShell& rShell, const SfxSlot &rSlot, SfxRequest
// Alles holen, was gebraucht wird, da der Slot den Execute evtl. nicht
// "uberlebt, falls es ein 'Pseudoslot' f"ur Macros oder Verben ist
sal_Bool bAutoUpdate = rSlot.IsMode(SFX_SLOT_AUTOUPDATE);
- SFX_REQUEST_ARG(rReq, pOrigItem, SfxExecuteItem, SID_SUBREQUEST, sal_False);
- SfxExecuteItem *pExecuteItem = pOrigItem
- ? (SfxExecuteItem*)pOrigItem->Clone()
- : 0;
-
- // ggf. TabPage-ID setzen
- SfxAppData_Impl *pAppData = pSfxApp->Get_Impl();
- SFX_REQUEST_ARG(rReq, pTabPageItem, SfxUInt16Item, SID_TABPAGE, sal_False);
- if ( pTabPageItem )
- {
- pAppData->nAutoTabPageId = pTabPageItem->GetValue();
- rReq.RemoveItem( SID_TABPAGE ); // sonst ArgCount > 0 => Seiteneff.
- }
// API-Call-Klammerung und Document-Lock w"ahrend des Calls
{
@@ -298,7 +281,7 @@ int SfxDispatcher::Call_Impl( SfxShell& rShell, const SfxSlot &rSlot, SfxRequest
if ( !pView )
pView = SfxViewFrame::Current();
if ( pView )
- SfxHelp::OpenHelpAgent( pView->GetFrame(), rReq.GetSlot() );
+ SfxHelp::OpenHelpAgent( &pView->GetFrame(), rReq.GetSlot() );
SfxExecFunc pFunc = rSlot.GetExecFnc();
rShell.CallExec( pFunc, rReq );
@@ -319,16 +302,6 @@ int SfxDispatcher::Call_Impl( SfxShell& rShell, const SfxSlot &rSlot, SfxRequest
}
}
- // TabPage-ID und Executing-SID zurueck setzen
- if ( pTabPageItem )
- pAppData->nAutoTabPageId = 0;
-
- if( pExecuteItem )
- {
- Execute( *pExecuteItem );
- delete pExecuteItem;
- }
-
if ( rReq.IsDone() )
{
SfxBindings *pBindings = GetBindings();
@@ -522,7 +495,7 @@ void SfxDispatcher::Pop
SfxApplication *pSfxApp = SFX_APP();
#ifdef DBG_UTIL
- ByteString aMsg( "SfxDispatcher(" );
+ ByteString aMsg( "-SfxDispatcher(" );
aMsg += ByteString::CreateFromInt64( (sal_uIntPtr) this );
aMsg += bPush ? ")::Push(" : ")::Pop(";
if ( rShell.GetInterface() )
@@ -530,6 +503,7 @@ void SfxDispatcher::Pop
else
aMsg += ByteString::CreateFromInt64( (sal_uIntPtr) &rShell );
aMsg += bDelete ? ") with delete" : ")";
+ if ( bUntil ) aMsg += " (up to)";
DbgTrace( aMsg.GetBuffer() );
#endif
@@ -800,7 +774,7 @@ void SfxDispatcher::DoActivate_Impl( sal_Bool bMDI, SfxViewFrame* /* pOld */ )
if ( pBindings )
{
pBindings->SetDispatcher(this);
- pBindings->SetActiveFrame( pImp->pFrame->GetFrame()->GetFrameInterface() );
+ pBindings->SetActiveFrame( pImp->pFrame->GetFrame().GetFrameInterface() );
}
}
else
@@ -820,7 +794,7 @@ void SfxDispatcher::DoActivate_Impl( sal_Bool bMDI, SfxViewFrame* /* pOld */ )
if ( bMDI && pImp->pFrame )
{
- //SfxWorkWindow *pWorkWin = pImp->pFrame->GetFrame()->GetWorkWindow_Impl();
+ //SfxWorkWindow *pWorkWin = pImp->pFrame->GetFrame().GetWorkWindow_Impl();
SfxBindings *pBind = GetBindings();
while ( pBind )
{
@@ -828,7 +802,7 @@ void SfxDispatcher::DoActivate_Impl( sal_Bool bMDI, SfxViewFrame* /* pOld */ )
pBind = pBind->GetSubBindings_Impl();
}
- pImp->pFrame->GetFrame()->GetWorkWindow_Impl()->HidePopups_Impl( FALSE, FALSE, 1 );
+ pImp->pFrame->GetFrame().GetWorkWindow_Impl()->HidePopups_Impl( FALSE, FALSE, 1 );
}
if ( pImp->aToDoStack.Count() )
@@ -886,7 +860,7 @@ void SfxDispatcher::DoDeactivate_Impl( sal_Bool bMDI, SfxViewFrame* pNew )
if ( pImp->pFrame && !(pImp->pFrame->GetObjectShell()->IsInPlaceActive() ) )
{
- SfxWorkWindow *pWorkWin = pImp->pFrame->GetFrame()->GetWorkWindow_Impl();
+ SfxWorkWindow *pWorkWin = pImp->pFrame->GetFrame().GetWorkWindow_Impl();
if ( pWorkWin )
{
for (sal_uInt16 n=0; n<pImp->aChildWins.Count();)
@@ -914,10 +888,10 @@ void SfxDispatcher::DoDeactivate_Impl( sal_Bool bMDI, SfxViewFrame* pNew )
if ( pNew && pImp->pFrame )
{
com::sun::star::uno::Reference< com::sun::star::frame::XFrame > xOldFrame(
- pNew->GetFrame()->GetFrameInterface()->getCreator(), com::sun::star::uno::UNO_QUERY );
+ pNew->GetFrame().GetFrameInterface()->getCreator(), com::sun::star::uno::UNO_QUERY );
com::sun::star::uno::Reference< com::sun::star::frame::XFrame > xMyFrame(
- GetFrame()->GetFrame()->GetFrameInterface(), com::sun::star::uno::UNO_QUERY );
+ GetFrame()->GetFrame().GetFrameInterface(), com::sun::star::uno::UNO_QUERY );
if ( xOldFrame == xMyFrame )
bHidePopups = FALSE;
@@ -925,7 +899,7 @@ void SfxDispatcher::DoDeactivate_Impl( sal_Bool bMDI, SfxViewFrame* pNew )
if ( bHidePopups )
{
- //SfxWorkWindow *pWorkWin = pImp->pFrame->GetFrame()->GetWorkWindow_Impl();
+ //SfxWorkWindow *pWorkWin = pImp->pFrame->GetFrame().GetWorkWindow_Impl();
SfxBindings *pBind = GetBindings();
while ( pBind )
{
@@ -933,7 +907,7 @@ void SfxDispatcher::DoDeactivate_Impl( sal_Bool bMDI, SfxViewFrame* pNew )
pBind = pBind->GetSubBindings_Impl();
}
- pImp->pFrame->GetFrame()->GetWorkWindow_Impl()->HidePopups_Impl( TRUE, FALSE, 1 );
+ pImp->pFrame->GetFrame().GetWorkWindow_Impl()->HidePopups_Impl( TRUE, FALSE, 1 );
}
Flush();
@@ -1676,13 +1650,13 @@ void SfxDispatcher::SetMenu_Impl()
{
if ( pImp->pFrame )
{
- SfxTopViewFrame* pTop= PTR_CAST( SfxTopViewFrame, pImp->pFrame->GetTopViewFrame() );
+ SfxViewFrame* pTop = pImp->pFrame->GetTopViewFrame();
if ( pTop && pTop->GetBindings().GetDispatcher() == this )
{
- SfxTopFrame* pFrm = pTop->GetTopFrame_Impl();
- if ( pFrm->IsMenuBarOn_Impl() )
+ SfxFrame& rFrame = pTop->GetFrame();
+ if ( rFrame.IsMenuBarOn_Impl() )
{
- com::sun::star::uno::Reference < com::sun::star::beans::XPropertySet > xPropSet( pFrm->GetFrameInterface(), com::sun::star::uno::UNO_QUERY );
+ com::sun::star::uno::Reference < com::sun::star::beans::XPropertySet > xPropSet( rFrame.GetFrameInterface(), com::sun::star::uno::UNO_QUERY );
if ( xPropSet.is() )
{
com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManager > xLayoutManager;
@@ -1715,7 +1689,7 @@ long SfxDispatcher::Update_Impl( sal_Bool bForce )
sal_Bool bUpdate = bForce;
while ( pDisp && pDisp->pImp->pFrame )
{
- SfxWorkWindow *pWork = pDisp->pImp->pFrame->GetFrame()->GetWorkWindow_Impl();
+ SfxWorkWindow *pWork = pDisp->pImp->pFrame->GetFrame().GetWorkWindow_Impl();
SfxDispatcher *pAct = pWork->GetBindings().GetDispatcher_Impl();
if ( pAct == pDisp || pAct == this )
{
@@ -1729,10 +1703,10 @@ long SfxDispatcher::Update_Impl( sal_Bool bForce )
pDisp = pDisp->pImp->pParent;
}
- if ( !bUpdate || pImp->pFrame->GetFrame()->IsClosing_Impl() )
+ if ( !bUpdate || pImp->pFrame->GetFrame().IsClosing_Impl() )
return 0;
- SfxTopViewFrame* pTop = pImp->pFrame ? PTR_CAST( SfxTopViewFrame, pImp->pFrame->GetTopViewFrame() ) : NULL;
+ SfxViewFrame* pTop = pImp->pFrame ? pImp->pFrame->GetTopViewFrame() : NULL;
sal_Bool bUIActive = pTop && pTop->GetBindings().GetDispatcher() == this;
if ( !bUIActive && pTop && GetBindings() == &pTop->GetBindings() )
@@ -1766,14 +1740,14 @@ long SfxDispatcher::Update_Impl( sal_Bool bForce )
if ( bUIActive && /* !bIsIPActive && */ ( !pClient || !pClient->IsObjectUIActive() ) )
SetMenu_Impl();
- SfxWorkWindow *pWorkWin = pImp->pFrame->GetFrame()->GetWorkWindow_Impl();
- SfxWorkWindow *pTaskWin = pImp->pFrame->GetTopFrame()->GetWorkWindow_Impl();
+ SfxWorkWindow *pWorkWin = pImp->pFrame->GetFrame().GetWorkWindow_Impl();
+ SfxWorkWindow *pTaskWin = pImp->pFrame->GetTopFrame().GetWorkWindow_Impl();
pTaskWin->ResetStatusBar_Impl();
SfxDispatcher *pDispat = this;
while ( pDispat )
{
- SfxWorkWindow *pWork = pDispat->pImp->pFrame->GetFrame()->GetWorkWindow_Impl();
+ SfxWorkWindow *pWork = pDispat->pImp->pFrame->GetFrame().GetWorkWindow_Impl();
SfxDispatcher *pAct = pWork->GetBindings().GetDispatcher_Impl();
if ( pAct == pDispat || pAct == this )
{
@@ -1811,7 +1785,7 @@ sal_uInt32 SfxDispatcher::_Update_Impl( sal_Bool bUIActive, sal_Bool bIsMDIApp,
{
sal_uInt32 nHelpId = 0;
SFX_APP();
- SfxWorkWindow *pWorkWin = pImp->pFrame->GetFrame()->GetWorkWindow_Impl();
+ SfxWorkWindow *pWorkWin = pImp->pFrame->GetFrame().GetWorkWindow_Impl();
sal_Bool bIsActive = sal_False;
sal_Bool bIsTaskActive = sal_False;
SfxDispatcher *pActDispat = pWorkWin->GetBindings().GetDispatcher_Impl();
@@ -1973,7 +1947,7 @@ sal_uInt32 SfxDispatcher::_Update_Impl( sal_Bool bUIActive, sal_Bool bIsMDIApp,
{
// internal frames also may control statusbar
SfxBindings& rBindings = pImp->pFrame->GetBindings();
- pImp->pFrame->GetFrame()->GetWorkWindow_Impl()->SetStatusBar_Impl( nStatBarId, pStatusBarShell, rBindings );
+ pImp->pFrame->GetFrame().GetWorkWindow_Impl()->SetStatusBar_Impl( nStatBarId, pStatusBarShell, rBindings );
}
}
@@ -2250,7 +2224,7 @@ sal_Bool SfxDispatcher::_TryIntercept_Impl
sal_uInt16 nLevels = pImp->aStack.Count();
while ( pParent && pParent->pImp->pFrame )
{
- if ( pParent->pImp->pFrame->GetFrame()->HasComponent() )
+ if ( pParent->pImp->pFrame->GetFrame().HasComponent() )
{
// Components d"urfen intercepten
if ( pParent->_TryIntercept_Impl( nSlot, rServer, sal_True ) )
@@ -2324,7 +2298,7 @@ sal_Bool SfxDispatcher::_FindServer
{
SFX_STACK(SfxDispatcher::_FindServer);
- // Dispatcher gelockt? (SID_BROWSE_STOP und SID_HELP_PI trotzdem durchlassen)
+ // Dispatcher gelockt? (SID_HELP_PI trotzdem durchlassen)
SfxApplication *pSfxApp = SFX_APP();
if ( IsLocked(nSlot) )
{
@@ -2744,7 +2718,7 @@ SfxPopupMenuManager* SfxDispatcher::Popup( sal_uInt16 nConfigId,Window *pWin, co
nShLevel = rDisp.pImp->aStack.Count();
}
- Window *pWindow = pWin ? pWin : rDisp.pImp->pFrame->GetFrame()->GetWorkWindow_Impl()->GetWindow();
+ Window *pWindow = pWin ? pWin : rDisp.pImp->pFrame->GetFrame().GetWorkWindow_Impl()->GetWindow();
for ( pSh = rDisp.GetShell(nShLevel); pSh; ++nShLevel, pSh = rDisp.GetShell(nShLevel) )
{
const ResId& rResId = pSh->GetInterface()->GetPopupMenuResId();
@@ -2784,7 +2758,7 @@ void SfxDispatcher::ExecutePopup( sal_uInt16 nConfigId, Window *pWin, const Poin
nShLevel = rDisp.pImp->aStack.Count();
}
- Window *pWindow = pWin ? pWin : rDisp.pImp->pFrame->GetFrame()->GetWorkWindow_Impl()->GetWindow();
+ Window *pWindow = pWin ? pWin : rDisp.pImp->pFrame->GetFrame().GetWorkWindow_Impl()->GetWindow();
for ( pSh = rDisp.GetShell(nShLevel); pSh; ++nShLevel, pSh = rDisp.GetShell(nShLevel) )
{
const ResId& rResId = pSh->GetInterface()->GetPopupMenuResId();
@@ -2807,7 +2781,7 @@ void SfxDispatcher::ExecutePopup( sal_uInt16 nConfigId, Window *pWin, const Poin
//----------------------------------------------------------------------
void SfxDispatcher::ExecutePopup( const ResId &rId, Window *pWin, const Point *pPos )
{
- Window *pWindow = pWin ? pWin : pImp->pFrame->GetFrame()->GetWorkWindow_Impl()->GetWindow();
+ Window *pWindow = pWin ? pWin : pImp->pFrame->GetFrame().GetWorkWindow_Impl()->GetWindow();
/*
SfxPopupMenuManager aPop( rId, *GetBindings() );
aPop.AddClipboardFunctions();
@@ -2911,13 +2885,13 @@ void SfxDispatcher::HideUI( sal_Bool bHide )
pImp->bNoUI = bHide;
if ( pImp->pFrame )
{
- SfxTopViewFrame* pTop= PTR_CAST( SfxTopViewFrame, pImp->pFrame->GetTopViewFrame() );
+ SfxViewFrame* pTop = pImp->pFrame->GetTopViewFrame();
if ( pTop && pTop->GetBindings().GetDispatcher() == this )
{
- SfxTopFrame* pFrm = pTop->GetTopFrame_Impl();
- if ( pFrm->IsMenuBarOn_Impl() )
+ SfxFrame& rFrame = pTop->GetFrame();
+ if ( rFrame.IsMenuBarOn_Impl() )
{
- com::sun::star::uno::Reference < com::sun::star::beans::XPropertySet > xPropSet( pFrm->GetFrameInterface(), com::sun::star::uno::UNO_QUERY );
+ com::sun::star::uno::Reference < com::sun::star::beans::XPropertySet > xPropSet( rFrame.GetFrameInterface(), com::sun::star::uno::UNO_QUERY );
if ( xPropSet.is() )
{
com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManager > xLayoutManager;
@@ -3160,27 +3134,6 @@ void SfxDispatcher::InvalidateBindings_Impl( sal_Bool bModify )
pFrame;
pFrame = SfxViewFrame::GetNext( *pFrame ) )
pFrame->GetBindings().InvalidateAll(bModify);
-/*
- // alle Bindings sind betroffen
- for ( SfxInPlaceFrame *pIPFrame = (SfxInPlaceFrame*)
- SfxViewFrame::GetFirst(0, TYPE(SfxInPlaceFrame));
- pIPFrame;
- pIPFrame = (SfxInPlaceFrame*)
- SfxViewFrame::GetNext(*pIPFrame, 0, TYPE(SfxInPlaceFrame)) )
- pIPFrame->GetBindings().InvalidateAll(bModify);
-
- for ( SfxPlugInFrame *pPIFrame = (SfxPlugInFrame*)
- SfxViewFrame::GetFirst(0, TYPE(SfxPlugInFrame));
- pPIFrame;
- pPIFrame = (SfxPlugInFrame*)
- SfxViewFrame::GetNext(*pPIFrame, 0, TYPE(SfxPlugInFrame)) )
- pPIFrame->GetBindings().InvalidateAll(bModify);
-
- for ( SfxTask* pTask = SfxTask::GetFirst(); pTask;
- pTask = SfxTask::GetNext( *pTask ) )
- if ( !pTask->IsExternal() )
- pTask->GetBindings()->InvalidateAll(bModify);
-*/
}
else
{
@@ -3215,3 +3168,14 @@ sal_uInt32 SfxDispatcher::GetDisableFlags() const
return pImp->nDisableFlags;
}
+SfxModule* SfxDispatcher::GetModule() const
+{
+ for ( sal_uInt16 nShell = 0;; ++nShell )
+ {
+ SfxShell *pSh = GetShell(nShell);
+ if ( pSh == NULL )
+ return 0;
+ if ( pSh->ISA(SfxModule) )
+ return (SfxModule*) pSh;
+ }
+}
diff --git a/sfx2/source/control/macrconf.cxx b/sfx2/source/control/macrconf.cxx
index d4149421f161..9e8657ae0c82 100644
--- a/sfx2/source/control/macrconf.cxx
+++ b/sfx2/source/control/macrconf.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: macrconf.cxx,v $
- * $Revision: 1.25.142.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sfx2/source/control/macro.cxx b/sfx2/source/control/macro.cxx
index 0337bc7c0b68..04a820d8e0ac 100644
--- a/sfx2/source/control/macro.cxx
+++ b/sfx2/source/control/macro.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: macro.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/sfx2/source/control/makefile.mk b/sfx2/source/control/makefile.mk
index 9d936549b5b3..86797589e3aa 100644
--- a/sfx2/source/control/makefile.mk
+++ b/sfx2/source/control/makefile.mk
@@ -1,15 +1,11 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE 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
@@ -68,7 +64,6 @@ SLOFILES = \
$(SLO)$/sfxstatuslistener.obj \
$(SLO)$/shell.obj \
$(SLO)$/sorgitm.obj \
- $(SLO)$/srchitem.obj \
$(SLO)$/statcach.obj \
$(SLO)$/unoctitm.obj
diff --git a/sfx2/source/control/minfitem.cxx b/sfx2/source/control/minfitem.cxx
index e288d5e77c7d..0c0c0124b612 100644
--- a/sfx2/source/control/minfitem.cxx
+++ b/sfx2/source/control/minfitem.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: minfitem.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/sfx2/source/control/msg.cxx b/sfx2/source/control/msg.cxx
index 0b0a8d2480ed..0aa4df6902ee 100644
--- a/sfx2/source/control/msg.cxx
+++ b/sfx2/source/control/msg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: msg.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/sfx2/source/control/msgpool.cxx b/sfx2/source/control/msgpool.cxx
index 2e62d76feff6..f1abd25a5413 100644
--- a/sfx2/source/control/msgpool.cxx
+++ b/sfx2/source/control/msgpool.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: msgpool.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/sfx2/source/control/objface.cxx b/sfx2/source/control/objface.cxx
index b21c859687f5..0692b99b8adb 100644
--- a/sfx2/source/control/objface.cxx
+++ b/sfx2/source/control/objface.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: objface.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/sfx2/source/control/querystatus.cxx b/sfx2/source/control/querystatus.cxx
index f57d3a3d32f2..8688740ce0fb 100644
--- a/sfx2/source/control/querystatus.cxx
+++ b/sfx2/source/control/querystatus.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: querystatus.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/sfx2/source/control/request.cxx b/sfx2/source/control/request.cxx
index ef47fc088e32..88a52d0ad0bf 100644
--- a/sfx2/source/control/request.cxx
+++ b/sfx2/source/control/request.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: request.cxx,v $
- * $Revision: 1.21 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -869,7 +866,7 @@ com::sun::star::uno::Reference< com::sun::star::frame::XDispatchRecorder > SfxRe
com::sun::star::uno::Reference< com::sun::star::frame::XDispatchRecorder > xRecorder;
com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > xSet(
- (pView ? pView : SfxViewFrame::Current())->GetFrame()->GetFrameInterface(),
+ (pView ? pView : SfxViewFrame::Current())->GetFrame().GetFrameInterface(),
com::sun::star::uno::UNO_QUERY);
if(xSet.is())
diff --git a/sfx2/source/control/sfxstatuslistener.cxx b/sfx2/source/control/sfxstatuslistener.cxx
index f7bf79f8a0f6..f6bb2b2c3004 100644
--- a/sfx2/source/control/sfxstatuslistener.cxx
+++ b/sfx2/source/control/sfxstatuslistener.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: sfxstatuslistener.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/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx
index aee76353f1f3..f3df5dc36d0c 100644
--- a/sfx2/source/control/shell.cxx
+++ b/sfx2/source/control/shell.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: shell.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/sfx2/source/control/sorgitm.cxx b/sfx2/source/control/sorgitm.cxx
index e38c91001456..cb24fe34e9b6 100644
--- a/sfx2/source/control/sorgitm.cxx
+++ b/sfx2/source/control/sorgitm.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: sorgitm.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/sfx2/source/control/srchitem.cxx b/sfx2/source/control/srchitem.cxx
deleted file mode 100644
index 5702103e3398..000000000000
--- a/sfx2/source/control/srchitem.cxx
+++ /dev/null
@@ -1,665 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: srchitem.cxx,v $
- * $Revision: 1.24 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sfx2.hxx"
-
-// include ---------------------------------------------------------------
-
-#ifndef __SBX_SBXVARIABLE_HXX
-#include <basic/sbxvar.hxx>
-#endif
-#include <unotools/searchopt.hxx>
-#include <com/sun/star/util/XReplaceable.hpp>
-#include <com/sun/star/util/XSearchable.hpp>
-#include <com/sun/star/util/XSearchDescriptor.hpp>
-#include <com/sun/star/util/XPropertyReplace.hpp>
-#include <com/sun/star/util/XReplaceDescriptor.hpp>
-#include <com/sun/star/lang/Locale.hpp>
-
-#include <svl/memberid.hrc>
-#include <i18npool/mslangid.hxx>
-
-#ifndef GCC
-#endif
-
-#define _SVX_SRCHITEM_CXX
-
-#include <sfx2/sfxsids.hrc>
-#define ITEMID_SEARCH SID_SEARCH_ITEM
-#include <sfx2/srchitem.hxx>
-
-#include <sfx2/sfxuno.hxx>
-
-using namespace utl;
-using namespace com::sun::star::beans;
-using namespace com::sun::star::i18n;
-using namespace com::sun::star::lang;
-using namespace com::sun::star::uno;
-using namespace com::sun::star::util;
-
-#define CFG_ROOT_NODE "Office.Common/SearchOptions"
-
-#define SRCH_PARAMS 11
-#define SRCH_PARA_OPTIONS "Options"
-#define SRCH_PARA_FAMILY "Family"
-#define SRCH_PARA_COMMAND "Command"
-#define SRCH_PARA_CELLTYPE "CellType"
-#define SRCH_PARA_APPFLAG "AppFlag"
-#define SRCH_PARA_ROWDIR "RowDirection"
-#define SRCH_PARA_ALLTABLES "AllTables"
-#define SRCH_PARA_BACKWARD "Backward"
-#define SRCH_PARA_PATTERN "Pattern"
-#define SRCH_PARA_CONTENT "Content"
-#define SRCH_PARA_ASIANOPT "AsianOptions"
-
-// STATIC DATA -----------------------------------------------------------
-
-TYPEINIT1_FACTORY(SvxSearchItem, SfxPoolItem, new SvxSearchItem(0));
-
-// -----------------------------------------------------------------------
-
-static Sequence< ::rtl::OUString > lcl_GetNotifyNames()
-{
- // names of transliteration relevant properties
- static const char* aTranslitNames[] =
- {
- "IsMatchCase", // 0
- "Japanese/IsMatchFullHalfWidthForms", // 1
- "Japanese/IsMatchHiraganaKatakana", // 2
- "Japanese/IsMatchContractions", // 3
- "Japanese/IsMatchMinusDashCho-on", // 4
- "Japanese/IsMatchRepeatCharMarks", // 5
- "Japanese/IsMatchVariantFormKanji", // 6
- "Japanese/IsMatchOldKanaForms", // 7
- "Japanese/IsMatch_DiZi_DuZu", // 8
- "Japanese/IsMatch_BaVa_HaFa", // 9
- "Japanese/IsMatch_TsiThiChi_DhiZi", // 10
- "Japanese/IsMatch_HyuIyu_ByuVyu", // 11
- "Japanese/IsMatch_SeShe_ZeJe", // 12
- "Japanese/IsMatch_IaIya", // 13
- "Japanese/IsMatch_KiKu", // 14
- "Japanese/IsIgnorePunctuation", // 15
- "Japanese/IsIgnoreWhitespace", // 16
- "Japanese/IsIgnoreProlongedSoundMark", // 17
- "Japanese/IsIgnoreMiddleDot" // 18
- };
-
- const int nCount = sizeof( aTranslitNames ) / sizeof( aTranslitNames[0] );
- Sequence< ::rtl::OUString > aNames( nCount );
- ::rtl::OUString* pNames = aNames.getArray();
- for (INT32 i = 0; i < nCount; ++i)
- pNames[i] = ::rtl::OUString::createFromAscii( aTranslitNames[i] );
-
- return aNames;
-}
-
-// -----------------------------------------------------------------------
-SvxSearchItem::SvxSearchItem( const sal_uInt16 nId ) :
-
- SfxPoolItem( nId ),
- ConfigItem( ::rtl::OUString::createFromAscii( CFG_ROOT_NODE ) ),
-
- aSearchOpt ( SearchAlgorithms_ABSOLUTE,
- SearchFlags::LEV_RELAXED,
- ::rtl::OUString(),
- ::rtl::OUString(),
- Locale(),
- 2, 2, 2,
- TransliterationModules_IGNORE_CASE ),
- eFamily ( SFX_STYLE_FAMILY_PARA ),
- nCommand ( 0 ),
- nCellType ( SVX_SEARCHIN_FORMULA ),
- nAppFlag ( SVX_SEARCHAPP_WRITER ),
- bRowDirection ( sal_True ),
- bAllTables ( sal_False ),
- bNotes ( sal_False),
- bBackward ( sal_False ),
- bPattern ( sal_False ),
- bContent ( sal_False ),
- bAsianOptions ( FALSE )
-{
- EnableNotification( lcl_GetNotifyNames() );
-
- SvtSearchOptions aOpt;
-
- bBackward = aOpt.IsBackwards();
- bAsianOptions = aOpt.IsUseAsianOptions();
- bNotes = aOpt.IsNotes();
-
- if (aOpt.IsUseRegularExpression())
- aSearchOpt.algorithmType = SearchAlgorithms_REGEXP;
- if (aOpt.IsSimilaritySearch())
- aSearchOpt.algorithmType = SearchAlgorithms_APPROXIMATE;
- if (aOpt.IsWholeWordsOnly())
- aSearchOpt.searchFlag |= SearchFlags::NORM_WORD_ONLY;
-
- INT32 &rFlags = aSearchOpt.transliterateFlags;
-
- if (!aOpt.IsMatchCase())
- rFlags |= TransliterationModules_IGNORE_CASE;
- if ( aOpt.IsMatchFullHalfWidthForms())
- rFlags |= TransliterationModules_IGNORE_WIDTH;
- if ( aOpt.IsMatchHiraganaKatakana())
- rFlags |= TransliterationModules_IGNORE_KANA;
- if ( aOpt.IsMatchContractions())
- rFlags |= TransliterationModules_ignoreSize_ja_JP;
- if ( aOpt.IsMatchMinusDashChoon())
- rFlags |= TransliterationModules_ignoreMinusSign_ja_JP;
- if ( aOpt.IsMatchRepeatCharMarks())
- rFlags |= TransliterationModules_ignoreIterationMark_ja_JP;
- if ( aOpt.IsMatchVariantFormKanji())
- rFlags |= TransliterationModules_ignoreTraditionalKanji_ja_JP;
- if ( aOpt.IsMatchOldKanaForms())
- rFlags |= TransliterationModules_ignoreTraditionalKana_ja_JP;
- if ( aOpt.IsMatchDiziDuzu())
- rFlags |= TransliterationModules_ignoreZiZu_ja_JP;
- if ( aOpt.IsMatchBavaHafa())
- rFlags |= TransliterationModules_ignoreBaFa_ja_JP;
- if ( aOpt.IsMatchTsithichiDhizi())
- rFlags |= TransliterationModules_ignoreTiJi_ja_JP;
- if ( aOpt.IsMatchHyuiyuByuvyu())
- rFlags |= TransliterationModules_ignoreHyuByu_ja_JP;
- if ( aOpt.IsMatchSesheZeje())
- rFlags |= TransliterationModules_ignoreSeZe_ja_JP;
- if ( aOpt.IsMatchIaiya())
- rFlags |= TransliterationModules_ignoreIandEfollowedByYa_ja_JP;
- if ( aOpt.IsMatchKiku())
- rFlags |= TransliterationModules_ignoreKiKuFollowedBySa_ja_JP;
- if ( aOpt.IsIgnorePunctuation())
- rFlags |= TransliterationModules_ignoreSeparator_ja_JP;
- if ( aOpt.IsIgnoreWhitespace())
- rFlags |= TransliterationModules_ignoreSpace_ja_JP;
- if ( aOpt.IsIgnoreProlongedSoundMark())
- rFlags |= TransliterationModules_ignoreProlongedSoundMark_ja_JP;
- if ( aOpt.IsIgnoreMiddleDot())
- rFlags |= TransliterationModules_ignoreMiddleDot_ja_JP;
-}
-
-// -----------------------------------------------------------------------
-
-SvxSearchItem::SvxSearchItem( const SvxSearchItem& rItem ) :
-
- SfxPoolItem ( rItem ),
- ConfigItem( ::rtl::OUString::createFromAscii( CFG_ROOT_NODE ) ),
-
- aSearchOpt ( rItem.aSearchOpt ),
- eFamily ( rItem.eFamily ),
- nCommand ( rItem.nCommand ),
- nCellType ( rItem.nCellType ),
- nAppFlag ( rItem.nAppFlag ),
- bRowDirection ( rItem.bRowDirection ),
- bAllTables ( rItem.bAllTables ),
- bNotes ( rItem.bNotes),
- bBackward ( rItem.bBackward ),
- bPattern ( rItem.bPattern ),
- bContent ( rItem.bContent ),
- bAsianOptions ( rItem.bAsianOptions )
-{
- EnableNotification( lcl_GetNotifyNames() );
-}
-
-// -----------------------------------------------------------------------
-
-SvxSearchItem::~SvxSearchItem()
-{
-}
-
-// -----------------------------------------------------------------------
-SfxPoolItem* SvxSearchItem::Clone( SfxItemPool *) const
-{
- return new SvxSearchItem(*this);
-}
-
-// -----------------------------------------------------------------------
-
-//! used below
-static BOOL operator == ( const SearchOptions& rItem1, const SearchOptions& rItem2 )
-{
- return rItem1.algorithmType == rItem2.algorithmType &&
- rItem1.searchFlag == rItem2.searchFlag &&
- rItem1.searchString == rItem2.searchString &&
- rItem1.replaceString == rItem2.replaceString &&
- //rItem1.Locale == rItem2.Locale &&
- rItem1.changedChars == rItem2.changedChars &&
- rItem1.deletedChars == rItem2.deletedChars &&
- rItem1.insertedChars == rItem2.insertedChars &&
- rItem1.transliterateFlags == rItem2.transliterateFlags;
-}
-
-
-int SvxSearchItem::operator==( const SfxPoolItem& rItem ) const
-{
- DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal which or type" );
- const SvxSearchItem &rSItem = (SvxSearchItem &) rItem;
- return ( nCommand == rSItem.nCommand ) &&
- ( bBackward == rSItem.bBackward ) &&
- ( bPattern == rSItem.bPattern ) &&
- ( bContent == rSItem.bContent ) &&
- ( eFamily == rSItem.eFamily ) &&
- ( bRowDirection == rSItem.bRowDirection ) &&
- ( bAllTables == rSItem.bAllTables ) &&
- ( nCellType == rSItem.nCellType ) &&
- ( nAppFlag == rSItem.nAppFlag ) &&
- ( bAsianOptions == rSItem.bAsianOptions ) &&
- ( aSearchOpt == rSItem.aSearchOpt ) &&
- ( bNotes == rSItem.bNotes );
-}
-
-
-//------------------------------------------------------------------------
-
-SfxItemPresentation SvxSearchItem::GetPresentation
-(
- SfxItemPresentation ,
- SfxMapUnit ,
- SfxMapUnit ,
- XubString& ,
- const IntlWrapper *
-) const
-{
- return SFX_ITEM_PRESENTATION_NONE;
-}
-
-void SvxSearchItem::GetFromDescriptor( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XSearchDescriptor >& rDescr )
-{
- SetSearchString( rDescr->getSearchString() );
- ::com::sun::star::uno::Any aAny = rDescr->getPropertyValue( DEFINE_CONST_UNICODE("SearchWords") );
- sal_Bool bTemp = false;
- aAny >>= bTemp ;
- SetWordOnly( bTemp );
- aAny = rDescr->getPropertyValue( DEFINE_CONST_UNICODE("SearchCaseSensitive") );
- aAny >>= bTemp ;
- SetExact( bTemp );
- aAny = rDescr->getPropertyValue( DEFINE_CONST_UNICODE("SearchBackwards") );
- aAny >>= bTemp ;
- SetBackward( bTemp );
- aAny = rDescr->getPropertyValue( DEFINE_CONST_UNICODE("SearchInSelection") );
- aAny >>= bTemp ;
- SetSelection( bTemp );
- aAny = rDescr->getPropertyValue( DEFINE_CONST_UNICODE("SearchRegularExpression") );
- aAny >>= bTemp ;
- SetRegExp( bTemp );
- aAny = rDescr->getPropertyValue( DEFINE_CONST_UNICODE("SearchSimilarity") );
- aAny >>= bTemp ;
- SetLevenshtein( bTemp );
- aAny = rDescr->getPropertyValue( DEFINE_CONST_UNICODE("SearchSimilarityRelax") );
- aAny >>= bTemp ;
- SetLEVRelaxed( bTemp );
- aAny = rDescr->getPropertyValue( DEFINE_CONST_UNICODE("SearchSimilarityExchange") );
- sal_Int16 nTemp = 0;
- aAny >>= nTemp ;
- SetLEVOther( nTemp );
- aAny = rDescr->getPropertyValue( DEFINE_CONST_UNICODE("SearchSimilarityRemove") );
- aAny >>= nTemp ;
- SetLEVShorter( nTemp );
- aAny = rDescr->getPropertyValue( DEFINE_CONST_UNICODE("SearchSimilarityAdd") );
- aAny >>= nTemp ;
- SetLEVLonger( nTemp );
-}
-
-void SvxSearchItem::SetToDescriptor( ::com::sun::star::uno::Reference< ::com::sun::star::util::XSearchDescriptor > & rDescr )
-{
- rDescr->setSearchString( GetSearchString() );
- ::com::sun::star::uno::Any aAny;
- aAny <<= GetWordOnly() ;
- rDescr->setPropertyValue( DEFINE_CONST_UNICODE("SearchWords"), aAny );
- aAny <<= GetExact() ;
- rDescr->setPropertyValue( DEFINE_CONST_UNICODE("SearchCaseSensitive"), aAny );
- aAny <<= GetBackward() ;
- rDescr->setPropertyValue( DEFINE_CONST_UNICODE("SearchBackwards"), aAny );
- aAny <<= GetSelection() ;
- rDescr->setPropertyValue( DEFINE_CONST_UNICODE("SearchInSelection"), aAny );
- aAny <<= GetRegExp() ;
- rDescr->setPropertyValue( DEFINE_CONST_UNICODE("SearchRegularExpression"), aAny );
- aAny <<= IsLevenshtein() ;
- rDescr->setPropertyValue( DEFINE_CONST_UNICODE("SearchSimilarity"), aAny );
- aAny <<= IsLEVRelaxed() ;
- rDescr->setPropertyValue( DEFINE_CONST_UNICODE("SearchSimilarityRelax"), aAny );
- aAny <<= GetLEVOther() ;
- rDescr->setPropertyValue( DEFINE_CONST_UNICODE("SearchSimilarityExchange"), aAny );
- aAny <<= GetLEVShorter() ;
- rDescr->setPropertyValue( DEFINE_CONST_UNICODE("SearchSimilarityRemove"), aAny );
- aAny <<= GetLEVLonger() ;
- rDescr->setPropertyValue( DEFINE_CONST_UNICODE("SearchSimilarityAdd"), aAny );
-}
-
-
-void SvxSearchItem::Notify( const Sequence< ::rtl::OUString > & )
-{
- // applies transliteration changes in the configuration database
- // to the current SvxSearchItem
- SetTransliterationFlags( SvtSearchOptions().GetTransliterationFlags() );
-}
-
-void SvxSearchItem::Commit()
-{
-}
-
-void SvxSearchItem::SetMatchFullHalfWidthForms( sal_Bool bVal )
-{
- if (bVal)
- aSearchOpt.transliterateFlags |= TransliterationModules_IGNORE_WIDTH;
- else
- aSearchOpt.transliterateFlags &= ~TransliterationModules_IGNORE_WIDTH;
-}
-
-
-void SvxSearchItem::SetWordOnly( sal_Bool bVal )
-{
- if (bVal)
- aSearchOpt.searchFlag |= SearchFlags::NORM_WORD_ONLY;
- else
- aSearchOpt.searchFlag &= ~SearchFlags::NORM_WORD_ONLY;
-}
-
-
-void SvxSearchItem::SetExact( sal_Bool bVal )
-{
- if (!bVal)
- aSearchOpt.transliterateFlags |= TransliterationModules_IGNORE_CASE;
- else
- aSearchOpt.transliterateFlags &= ~TransliterationModules_IGNORE_CASE;
-}
-
-
-void SvxSearchItem::SetSelection( sal_Bool bVal )
-{
- if (bVal)
- {
- aSearchOpt.searchFlag |= (SearchFlags::REG_NOT_BEGINOFLINE |
- SearchFlags::REG_NOT_ENDOFLINE);
- }
- else
- {
- aSearchOpt.searchFlag &= ~(SearchFlags::REG_NOT_BEGINOFLINE |
- SearchFlags::REG_NOT_ENDOFLINE);
- }
-}
-
-
-void SvxSearchItem::SetRegExp( sal_Bool bVal )
-{
- if ( bVal )
- aSearchOpt.algorithmType = SearchAlgorithms_REGEXP;
- else if ( SearchAlgorithms_REGEXP == aSearchOpt.algorithmType )
- aSearchOpt.algorithmType = SearchAlgorithms_ABSOLUTE;
-}
-
-
-void SvxSearchItem::SetLEVRelaxed( sal_Bool bVal )
-{
- if (bVal)
- aSearchOpt.searchFlag |= SearchFlags::LEV_RELAXED;
- else
- aSearchOpt.searchFlag &= ~SearchFlags::LEV_RELAXED;
-}
-
-
-void SvxSearchItem::SetLevenshtein( sal_Bool bVal )
-{
- if ( bVal )
- aSearchOpt.algorithmType = SearchAlgorithms_APPROXIMATE;
- else if ( SearchAlgorithms_APPROXIMATE == aSearchOpt.algorithmType )
- aSearchOpt.algorithmType = SearchAlgorithms_ABSOLUTE;
-}
-
-
-void SvxSearchItem::SetTransliterationFlags( sal_Int32 nFlags )
-{
- aSearchOpt.transliterateFlags = nFlags;
-}
-
-sal_Bool SvxSearchItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId ) const
-{
- nMemberId &= ~CONVERT_TWIPS;
- switch ( nMemberId )
- {
- case 0 :
- {
- Sequence< PropertyValue > aSeq( SRCH_PARAMS );
- aSeq[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SRCH_PARA_OPTIONS ) );
- aSeq[0].Value <<= aSearchOpt;
- aSeq[1].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SRCH_PARA_FAMILY ));
- aSeq[1].Value <<= sal_Int16( eFamily );
- aSeq[2].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SRCH_PARA_COMMAND ));
- aSeq[2].Value <<= nCommand;
- aSeq[3].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SRCH_PARA_CELLTYPE ));
- aSeq[3].Value <<= nCellType;
- aSeq[4].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SRCH_PARA_APPFLAG ));
- aSeq[4].Value <<= nAppFlag;
- aSeq[5].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SRCH_PARA_ROWDIR ));
- aSeq[5].Value <<= bRowDirection;
- aSeq[6].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SRCH_PARA_ALLTABLES ));
- aSeq[6].Value <<= bAllTables;
- aSeq[7].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SRCH_PARA_BACKWARD ));
- aSeq[7].Value <<= bBackward;
- aSeq[8].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SRCH_PARA_PATTERN ));
- aSeq[8].Value <<= bPattern;
- aSeq[9].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SRCH_PARA_CONTENT ));
- aSeq[9].Value <<= bContent;
- aSeq[10].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SRCH_PARA_ASIANOPT ));
- aSeq[10].Value <<= bAsianOptions;
- rVal <<= aSeq;
- }
- break;
- case MID_SEARCH_COMMAND:
- rVal <<= (sal_Int16) nCommand; break;
- case MID_SEARCH_STYLEFAMILY:
- rVal <<= (sal_Int16) eFamily; break;
- case MID_SEARCH_CELLTYPE:
- rVal <<= (sal_Int32) nCellType; break;
- case MID_SEARCH_ROWDIRECTION:
- rVal <<= (sal_Bool) bRowDirection; break;
- case MID_SEARCH_ALLTABLES:
- rVal <<= (sal_Bool) bAllTables; break;
- case MID_SEARCH_BACKWARD:
- rVal <<= (sal_Bool) bBackward; break;
- case MID_SEARCH_PATTERN:
- rVal <<= (sal_Bool) bPattern; break;
- case MID_SEARCH_CONTENT:
- rVal <<= (sal_Bool) bContent; break;
- case MID_SEARCH_ASIANOPTIONS:
- rVal <<= (sal_Bool) bAsianOptions; break;
- case MID_SEARCH_ALGORITHMTYPE:
- rVal <<= (sal_Int16) aSearchOpt.algorithmType; break;
- case MID_SEARCH_FLAGS:
- rVal <<= aSearchOpt.searchFlag; break;
- case MID_SEARCH_SEARCHSTRING:
- rVal <<= aSearchOpt.searchString; break;
- case MID_SEARCH_REPLACESTRING:
- rVal <<= aSearchOpt.replaceString; break;
- case MID_SEARCH_CHANGEDCHARS:
- rVal <<= aSearchOpt.changedChars; break;
- case MID_SEARCH_DELETEDCHARS:
- rVal <<= aSearchOpt.deletedChars; break;
- case MID_SEARCH_INSERTEDCHARS:
- rVal <<= aSearchOpt.insertedChars; break;
- case MID_SEARCH_TRANSLITERATEFLAGS:
- rVal <<= aSearchOpt.transliterateFlags; break;
- case MID_SEARCH_LOCALE:
- {
- sal_Int16 nLocale;
- if (aSearchOpt.Locale.Language.getLength() || aSearchOpt.Locale.Country.getLength() )
- nLocale = MsLangId::convertLocaleToLanguage( aSearchOpt.Locale );
- else
- nLocale = LANGUAGE_NONE;
- rVal <<= nLocale;
- break;
- }
-
- default:
- DBG_ERRORFILE( "SvxSearchItem::QueryValue(): Unknown MemberId" );
- return sal_False;
- }
-
- return sal_True;
-}
-
-// -----------------------------------------------------------------------
-
-sal_Bool SvxSearchItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId )
-{
- nMemberId &= ~CONVERT_TWIPS;
- sal_Bool bRet = sal_False;
- sal_Int32 nInt = 0;
- switch ( nMemberId )
- {
- case 0 :
- {
- Sequence< PropertyValue > aSeq;
- if ( ( rVal >>= aSeq ) && ( aSeq.getLength() == SRCH_PARAMS ) )
- {
- sal_Int16 nConvertedCount( 0 );
- for ( sal_Int32 i = 0; i < aSeq.getLength(); ++i )
- {
- if ( aSeq[i].Name.equalsAscii( SRCH_PARA_OPTIONS ) )
- {
- if ( ( aSeq[i].Value >>= aSearchOpt ) == sal_True )
- ++nConvertedCount;
- }
- else if ( aSeq[i].Name.equalsAscii( SRCH_PARA_FAMILY ) )
- {
- sal_uInt16 nTemp( 0 );
- if ( ( aSeq[i].Value >>= nTemp ) == sal_True )
- {
- eFamily = SfxStyleFamily( nTemp );
- ++nConvertedCount;
- }
- }
- else if ( aSeq[i].Name.equalsAscii( SRCH_PARA_COMMAND ) )
- {
- if ( ( aSeq[i].Value >>= nCommand ) == sal_True )
- ++nConvertedCount;
- }
- else if ( aSeq[i].Name.equalsAscii( SRCH_PARA_CELLTYPE ) )
- {
- if ( ( aSeq[i].Value >>= nCellType ) == sal_True )
- ++nConvertedCount;
- }
- else if ( aSeq[i].Name.equalsAscii( SRCH_PARA_APPFLAG ) )
- {
- if ( ( aSeq[i].Value >>= nAppFlag ) == sal_True )
- ++nConvertedCount;
- }
- else if ( aSeq[i].Name.equalsAscii( SRCH_PARA_ROWDIR ) )
- {
- if ( ( aSeq[i].Value >>= bRowDirection ) == sal_True )
- ++nConvertedCount;
- }
- else if ( aSeq[i].Name.equalsAscii( SRCH_PARA_ALLTABLES ) )
- {
- if ( ( aSeq[i].Value >>= bAllTables ) == sal_True )
- ++nConvertedCount;
- }
- else if ( aSeq[i].Name.equalsAscii( SRCH_PARA_BACKWARD ) )
- {
- if ( ( aSeq[i].Value >>= bBackward ) == sal_True )
- ++nConvertedCount;
- }
- else if ( aSeq[i].Name.equalsAscii( SRCH_PARA_PATTERN ) )
- {
- if ( ( aSeq[i].Value >>= bPattern ) == sal_True )
- ++nConvertedCount;
- }
- else if ( aSeq[i].Name.equalsAscii( SRCH_PARA_CONTENT ) )
- {
- if ( ( aSeq[i].Value >>= bContent ) == sal_True )
- ++nConvertedCount;
- }
- else if ( aSeq[i].Name.equalsAscii( SRCH_PARA_ASIANOPT ) )
- {
- if ( ( aSeq[i].Value >>= bAsianOptions ) == sal_True )
- ++nConvertedCount;
- }
- }
-
- bRet = ( nConvertedCount == SRCH_PARAMS );
- }
- break;
- }
- case MID_SEARCH_COMMAND:
- bRet = (rVal >>= nInt); nCommand = (sal_uInt16) nInt; break;
- case MID_SEARCH_STYLEFAMILY:
- bRet = (rVal >>= nInt); eFamily = (SfxStyleFamily) (sal_Int16) nInt; break;
- case MID_SEARCH_CELLTYPE:
- bRet = (rVal >>= nInt); nCellType = (sal_uInt16) nInt; break;
- case MID_SEARCH_ROWDIRECTION:
- bRet = (rVal >>= bRowDirection); break;
- case MID_SEARCH_ALLTABLES:
- bRet = (rVal >>= bAllTables); break;
- case MID_SEARCH_BACKWARD:
- bRet = (rVal >>= bBackward); break;
- case MID_SEARCH_PATTERN:
- bRet = (rVal >>= bPattern); break;
- case MID_SEARCH_CONTENT:
- bRet = (rVal >>= bContent); break;
- case MID_SEARCH_ASIANOPTIONS:
- bRet = (rVal >>= bAsianOptions); break;
- case MID_SEARCH_ALGORITHMTYPE:
- bRet = (rVal >>= nInt); aSearchOpt.algorithmType = (SearchAlgorithms)(sal_Int16)nInt; break;
- case MID_SEARCH_FLAGS:
- bRet = (rVal >>= aSearchOpt.searchFlag); break;
- case MID_SEARCH_SEARCHSTRING:
- bRet = (rVal >>= aSearchOpt.searchString); break;
- case MID_SEARCH_REPLACESTRING:
- bRet = (rVal >>= aSearchOpt.replaceString); break;
- case MID_SEARCH_CHANGEDCHARS:
- bRet = (rVal >>= aSearchOpt.changedChars); break;
- case MID_SEARCH_DELETEDCHARS:
- bRet = (rVal >>= aSearchOpt.deletedChars); break;
- case MID_SEARCH_INSERTEDCHARS:
- bRet = (rVal >>= aSearchOpt.insertedChars); break;
- case MID_SEARCH_TRANSLITERATEFLAGS:
- bRet = (rVal >>= aSearchOpt.transliterateFlags); break;
- case MID_SEARCH_LOCALE:
- {
- bRet = (rVal >>= nInt);
- if ( bRet )
- {
- if ( nInt == LANGUAGE_NONE )
- {
- aSearchOpt.Locale = ::com::sun::star::lang::Locale();
- }
- else
- {
- MsLangId::convertLanguageToLocale( (sal_Int16) nInt, aSearchOpt.Locale );
- }
- }
- break;
- }
- default:
- DBG_ERROR( "Unknown MemberId" );
- }
-
- return bRet;
-}
-
-
diff --git a/sfx2/source/control/statcach.cxx b/sfx2/source/control/statcach.cxx
index 527851e7664a..3fdd14369856 100644
--- a/sfx2/source/control/statcach.cxx
+++ b/sfx2/source/control/statcach.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: statcach.cxx,v $
- * $Revision: 1.36.180.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -345,7 +342,7 @@ const SfxSlotServer* SfxStateCache::GetSlotServer( SfxDispatcher &rDispat , cons
else if ( rDispat.GetFrame() )
{
::com::sun::star::uno::Reference < ::com::sun::star::frame::XDispatchProvider > xFrameProv(
- rDispat.GetFrame()->GetFrame()->GetFrameInterface(), ::com::sun::star::uno::UNO_QUERY );
+ rDispat.GetFrame()->GetFrame().GetFrameInterface(), ::com::sun::star::uno::UNO_QUERY );
if ( xFrameProv != xProv )
return GetSlotServer( rDispat, xFrameProv );
}
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index f33f898237f9..d2ad8c645eb7 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: unoctitm.cxx,v $
- * $Revision: 1.58 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -220,8 +217,8 @@ void SfxUnoControllerItem::GetNewDispatch()
if ( !pBindings->GetDispatcher_Impl() || !pBindings->GetDispatcher_Impl()->GetFrame() )
return;
- SfxFrame *pFrame = pBindings->GetDispatcher_Impl()->GetFrame()->GetFrame();
- SfxFrame *pParent = pFrame->GetParentFrame();
+ SfxFrame& rFrame = pBindings->GetDispatcher_Impl()->GetFrame()->GetFrame();
+ SfxFrame *pParent = rFrame.GetParentFrame();
if ( pParent )
// parent may intercept
xDispatch = TryGetDispatch( pParent );
@@ -229,7 +226,7 @@ void SfxUnoControllerItem::GetNewDispatch()
if ( !xDispatch.is() )
{
// no interception
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xFrame = pFrame->GetFrameInterface();
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xFrame = rFrame.GetFrameInterface();
::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > xProv( xFrame, ::com::sun::star::uno::UNO_QUERY );
if ( xProv.is() )
xDispatch = xProv->queryDispatch( aCommand, ::rtl::OUString(), 0 );
@@ -253,7 +250,7 @@ void SfxUnoControllerItem::GetNewDispatch()
if ( !xDisp.is() && pFrame->HasComponent() )
{
// no interception
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xFrame = pFrame->GetFrameInterface();
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xFrame = pFrame->GetFrameInterface();
::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > xProv( xFrame, ::com::sun::star::uno::UNO_QUERY );
if ( xProv.is() )
xDisp = xProv->queryDispatch( aCommand, ::rtl::OUString(), 0 );
@@ -755,11 +752,11 @@ void SAL_CALL SfxDispatchController_Impl::dispatch( const ::com::sun::star::util
{
SfxViewFrame* pViewFrame = pDispatcher->GetFrame();
if (pViewFrame)
- xFrameRef = pViewFrame->GetFrame()->GetFrameInterface();
+ xFrameRef = pViewFrame->GetFrame().GetFrameInterface();
}
SfxAllItemSet aInternalSet( SFX_APP()->GetPool() );
if (xFrameRef.is()) // an empty set is no problem ... but an empty frame reference can be a problem !
- aInternalSet.Put( SfxUnoAnyItem( SID_FILLFRAME, css::uno::makeAny(xFrameRef) ) );
+ aInternalSet.Put( SfxUnoFrameItem( SID_FILLFRAME, xFrameRef ) );
sal_Bool bSuccess = sal_False;
sal_Bool bFailure = sal_False;
diff --git a/sfx2/source/dialog/about.cxx b/sfx2/source/dialog/about.cxx
index 916af19962d6..66d4146d9e62 100644
--- a/sfx2/source/dialog/about.cxx
+++ b/sfx2/source/dialog/about.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: about.cxx,v $
- * $Revision: 1.41.4.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -50,6 +47,8 @@
#include <unotools/bootstrap.hxx>
#include <com/sun/star/uno/Any.h>
#include <unotools/configmgr.hxx>
+#include <vcl/graph.hxx>
+#include <svtools/filter.hxx>
#include <sfx2/sfxuno.hxx>
#include "about.hxx"
@@ -95,8 +94,15 @@ static bool impl_loadBitmap(
SvFileStream aStrm( aObj.PathToFileName(), STREAM_STD_READ );
if ( !aStrm.GetError() )
{
- Bitmap aBmp;
- aStrm >> aBmp;
+ // Use graphic class to also support more graphic formats (bmp,png,...)
+ Graphic aGraphic;
+
+ GraphicFilter* pGF = GraphicFilter::GetGraphicFilter();
+ pGF->ImportGraphic( aGraphic, String(), aStrm, GRFILTER_FORMAT_DONTKNOW );
+
+ // Default case, we load the intro bitmap from a seperate file
+ // (e.g. staroffice_intro.bmp or starsuite_intro.bmp)
+ BitmapEx aBmp = aGraphic.GetBitmapEx();
rLogo = Image( aBmp );
return true;
}
@@ -114,6 +120,7 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId, const String& rVerS
aDeveloperAry ( ResId( ABOUT_STR_DEVELOPER_ARY, *rId.GetResMgr() ) ),
aDevVersionStr ( rVerStr ),
aAccelStr ( ResId( ABOUT_STR_ACCEL, *rId.GetResMgr() ) ),
+ aCopyrightTextStr( ResId( ABOUT_STR_COPYRIGHT, *rId.GetResMgr() ) ),
aTimer (),
nOff ( 0 ),
m_nDeltaWidth ( 0 ),
@@ -154,14 +161,22 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId, const String& rVerS
{
bLoaded = impl_loadBitmap(
rtl::OUString::createFromAscii( "$BRAND_BASE_DIR/program/edition" ),
- rtl::OUString::createFromAscii( "about.bmp" ), aAppLogo );
+ rtl::OUString::createFromAscii( "about.png" ), aAppLogo );
+ if ( !bLoaded )
+ bLoaded = impl_loadBitmap(
+ rtl::OUString::createFromAscii( "$BRAND_BASE_DIR/program/edition" ),
+ rtl::OUString::createFromAscii( "about.bmp" ), aAppLogo );
}
if ( !bLoaded )
{
bLoaded = impl_loadBitmap(
rtl::OUString::createFromAscii( "$BRAND_BASE_DIR/program" ),
- rtl::OUString::createFromAscii( "about.bmp" ), aAppLogo );
+ rtl::OUString::createFromAscii( "about.png" ), aAppLogo );
+ if ( !bLoaded )
+ bLoaded = impl_loadBitmap(
+ rtl::OUString::createFromAscii( "$BRAND_BASE_DIR/program" ),
+ rtl::OUString::createFromAscii( "about.bmp" ), aAppLogo );
}
// Transparenter Font
@@ -234,46 +249,40 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId, const String& rVerS
// determine size and position of the dialog & elements
Size aAppLogoSiz = aAppLogo.GetSizePixel();
- Size aOutSiz = GetOutputSizePixel();
- aOutSiz.Width() = aAppLogoSiz.Width();
- // spacing to the margin
- Size a6Size = aVersionText.LogicToPixel( Size( 6, 6 ), MAP_APPFONT );
- long nDlgMargin = a6Size.Width() * 4 ;
- // The URL (if found in copyright text) should not be line-wrapped
- if ( aCopyrightText.GetText().Search( WELCOME_URL ) != STRING_NOTFOUND )
- {
- long nURLWidth = GetTextWidth( WELCOME_URL ) + nDlgMargin + (2*SPACE_OFFSET);
- if ( nURLWidth > aAppLogoSiz.Width() )
- {
- // pb: can be used to align the position of the logo
- // m_nDeltaWidth = nURLWidth - aOutSiz.Width();
+ Size aOutSiz = GetOutputSizePixel();
+ aOutSiz.Width() = aAppLogoSiz.Width();
- aOutSiz.Width() = nURLWidth;
- }
- }
+ Size a6Size = aVersionText.LogicToPixel( Size( 6, 6 ), MAP_APPFONT );
+ long nY = aAppLogoSiz.Height() + ( a6Size.Height() * 2 );
+ long nDlgMargin = a6Size.Width() * 4 ;
+ long nCtrlMargin = a6Size.Height() * 2;
+ long nTextWidth = aOutSiz.Width() - nDlgMargin;
- // layout the text-elements
- long nTextWidth = aOutSiz.Width() - nDlgMargin;
- long nY = aAppLogoSiz.Height() + ( a6Size.Height() * 2 );
+ aCopyrightText.SetText( aCopyrightTextStr );
layoutText( aVersionText, nY, nTextWidth, a6Size );
- nY += ( a6Size.Height() / 3 );
- layoutText( aCopyrightText, nY, nTextWidth, a6Size );
- nY += ( a6Size.Height() / 3 );
- if( aBuildString.Len() > 0 )
- {
- layoutText( aBuildData, nY, nTextWidth, a6Size );
- nY += ( a6Size.Height() / 2 );
- }
+ nY += nCtrlMargin;
// OK-Button-Position (at the bottom and centered)
Size aOKSiz = aOKButton.GetSizePixel();
Point aOKPnt = aOKButton.GetPosPixel();
+
+ // Multiline edit with Copyright-Text
+ Point aCopyPnt = aCopyrightText.GetPosPixel();
+ Size aCopySize = aCopyrightText.GetSizePixel();
+ aCopySize.Width() = nTextWidth;
+ aCopySize.Height() = aOutSiz.Height() - nY - ( aOKSiz.Height() * 2 ) - nCtrlMargin;
+
+ aCopyPnt.X() = ( aOutSiz.Width() - aCopySize.Width() ) / 2;
+ aCopyPnt.Y() = nY;
+ aCopyrightText.SetPosSizePixel( aCopyPnt, aCopySize );
+
+ nY += aCopySize.Height() + nCtrlMargin;
aOKPnt.X() = ( aOutSiz.Width() - aOKSiz.Width() ) / 2;
- aOKPnt.Y() = nY + 8;
+ aOKPnt.Y() = nY;
aOKButton.SetPosPixel( aOKPnt );
- nY = aOKPnt.Y() + aOKSiz.Height() + a6Size.Height();
- aOutSiz.Height() = nY;
+
+ // Change the width of the dialog
SetOutputSizePixel( aOutSiz );
FreeResource();
diff --git a/sfx2/source/dialog/alienwarn.cxx b/sfx2/source/dialog/alienwarn.cxx
index f7f3f7b14ec9..6fd765dcb616 100644
--- a/sfx2/source/dialog/alienwarn.cxx
+++ b/sfx2/source/dialog/alienwarn.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: alienwarn.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/sfx2/source/dialog/alienwarn.hrc b/sfx2/source/dialog/alienwarn.hrc
index 74630c9724d4..e3a23dc57836 100644
--- a/sfx2/source/dialog/alienwarn.hrc
+++ b/sfx2/source/dialog/alienwarn.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: alienwarn.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/sfx2/source/dialog/alienwarn.src b/sfx2/source/dialog/alienwarn.src
index 5047735ae9d6..7aa6f3230778 100644
--- a/sfx2/source/dialog/alienwarn.src
+++ b/sfx2/source/dialog/alienwarn.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: alienwarn.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/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index 89075b918b42..2ea5ef5fe4b1 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: basedlgs.cxx,v $
- * $Revision: 1.33 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -429,7 +426,7 @@ long SfxModelessDialog::Notify( NotifyEvent& rEvt )
}
if ( nHelpId )
- SfxHelp::OpenHelpAgent( pBindings->GetDispatcher_Impl()->GetFrame()->GetFrame(), nHelpId );
+ SfxHelp::OpenHelpAgent( &pBindings->GetDispatcher_Impl()->GetFrame()->GetFrame(), nHelpId );
}
else if ( rEvt.GetType() == EVENT_LOSEFOCUS && !HasChildPathFocus() )
{
@@ -531,7 +528,7 @@ long SfxFloatingWindow::Notify( NotifyEvent& rEvt )
}
if ( nHelpId )
- SfxHelp::OpenHelpAgent( pBindings->GetDispatcher_Impl()->GetFrame()->GetFrame(), nHelpId );
+ SfxHelp::OpenHelpAgent( &pBindings->GetDispatcher_Impl()->GetFrame()->GetFrame(), nHelpId );
}
else if ( rEvt.GetType() == EVENT_LOSEFOCUS )
{
diff --git a/sfx2/source/dialog/dialog.hrc b/sfx2/source/dialog/dialog.hrc
index 44d9c7e346cf..f1e100e17cf5 100644
--- a/sfx2/source/dialog/dialog.hrc
+++ b/sfx2/source/dialog/dialog.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: dialog.hrc,v $
- * $Revision: 1.32.70.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sfx2/source/dialog/dialog.src b/sfx2/source/dialog/dialog.src
index c50b17436ca6..a54d2c340d04 100644
--- a/sfx2/source/dialog/dialog.src
+++ b/sfx2/source/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.58 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index fe03231c6db7..81c2da0ce78d 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dinfdlg.cxx,v $
- * $Revision: 1.43.42.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -1603,8 +1600,8 @@ class DurationDialog_Impl : public ModalDialog
NumericField aMinuteNF;
FixedText aSecondFT;
NumericField aSecondNF;
- FixedText aHSecondFT;
- NumericField aHSecondNF;
+ FixedText aMSecondFT;
+ NumericField aMSecondNF;
public:
@@ -1616,8 +1613,9 @@ public:
/*-- 20.11.2009 15:40:46---------------------------------------------------
-----------------------------------------------------------------------*/
-DurationDialog_Impl::DurationDialog_Impl( Window* pParent, const util::Duration& rDuration ) :
- ModalDialog( pParent, SfxResId( RID_EDIT_DURATIONS ) ),
+DurationDialog_Impl::DurationDialog_Impl(
+ Window* pParent, const util::Duration& rDuration)
+ : ModalDialog( pParent, SfxResId( RID_EDIT_DURATIONS ) ),
aDurationFL(this, SfxResId( FL_DURATION )),
aOKPB( this, SfxResId( PB_OK )),
aCancelPB( this, SfxResId( PB_CANCEL )),
@@ -1635,8 +1633,8 @@ DurationDialog_Impl::DurationDialog_Impl( Window* pParent, const util::Duration&
aMinuteNF( this, SfxResId( ED_MINUTE )),
aSecondFT( this, SfxResId( FT_SECOND )),
aSecondNF( this, SfxResId( ED_SECOND )),
- aHSecondFT( this, SfxResId( FT_HSECOND )),
- aHSecondNF( this, SfxResId( ED_HSECOND ))
+ aMSecondFT( this, SfxResId( FT_MSECOND )),
+ aMSecondNF( this, SfxResId( ED_MSECOND ))
{
FreeResource();
aNegativeCB.Check(rDuration.Negative);
@@ -1646,7 +1644,7 @@ DurationDialog_Impl::DurationDialog_Impl( Window* pParent, const util::Duration&
aHourNF.SetValue(rDuration.Hours );
aMinuteNF.SetValue(rDuration.Minutes);
aSecondNF.SetValue(rDuration.Seconds);
- aHSecondNF.SetValue(rDuration.HundredthSeconds);
+ aMSecondNF.SetValue(rDuration.MilliSeconds);
}
/*-- 20.11.2009 16:08:55---------------------------------------------------
@@ -1667,7 +1665,7 @@ util::Duration DurationDialog_Impl::GetDuration() const
aRet.Hours = aHourNF.GetValue( );
aRet.Minutes = aMinuteNF.GetValue();
aRet.Seconds = aSecondNF.GetValue();
- aRet.HundredthSeconds = aHSecondNF.GetValue();
+ aRet.MilliSeconds = aMSecondNF.GetValue();
return aRet;
}
diff --git a/sfx2/source/dialog/dinfdlg.hrc b/sfx2/source/dialog/dinfdlg.hrc
index 49647c40e3ee..5453e3606026 100644
--- a/sfx2/source/dialog/dinfdlg.hrc
+++ b/sfx2/source/dialog/dinfdlg.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: dinfdlg.hrc,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -172,8 +169,8 @@
#define ED_MINUTE 113
#define FT_SECOND 114
#define ED_SECOND 115
-#define FT_HSECOND 116
-#define ED_HSECOND 117
+#define FT_MSECOND 116
+#define ED_MSECOND 117
#define FL_DURATION 118
#endif
diff --git a/sfx2/source/dialog/dinfdlg.src b/sfx2/source/dialog/dinfdlg.src
index 3cad63ecb565..99a062c4aecf 100644
--- a/sfx2/source/dialog/dinfdlg.src
+++ b/sfx2/source/dialog/dinfdlg.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: dinfdlg.src,v $
- * $Revision: 1.55 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -880,14 +877,14 @@ ModalDialog RID_EDIT_DURATIONS
SpinSize = 1 ;
Value = 0 ;
};
- FixedText FT_HSECOND
+ FixedText FT_MSECOND
{
Pos = MAP_APPFONT ( 6 , 122 ) ;
Size = MAP_APPFONT ( 60 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
Left = TRUE ;
- Text [ en-US ] = "1/100 se~conds" ;
+ Text [ en-US ] = "Millise~conds" ;
};
- NumericField ED_HSECOND
+ NumericField ED_MSECOND
{
Border = TRUE ;
Pos = MAP_APPFONT ( 70 , 120 ) ;
@@ -896,7 +893,7 @@ ModalDialog RID_EDIT_DURATIONS
Spin = TRUE ;
Minimum = 0 ;
First = 1 ;
- Last = 100 ;
+ Last = 1000 ;
SpinSize = 1 ;
Value = 0 ;
};
diff --git a/sfx2/source/dialog/dinfedt.cxx b/sfx2/source/dialog/dinfedt.cxx
index f96b3a2135ce..85f9f955e355 100644
--- a/sfx2/source/dialog/dinfedt.cxx
+++ b/sfx2/source/dialog/dinfedt.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dinfedt.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/sfx2/source/dialog/dinfedt.hrc b/sfx2/source/dialog/dinfedt.hrc
index 9a1824bc9c7f..ef52362af2cb 100644
--- a/sfx2/source/dialog/dinfedt.hrc
+++ b/sfx2/source/dialog/dinfedt.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: dinfedt.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/sfx2/source/dialog/dinfedt.src b/sfx2/source/dialog/dinfedt.src
index edfa6c631bd4..7f4875487536 100644
--- a/sfx2/source/dialog/dinfedt.src
+++ b/sfx2/source/dialog/dinfedt.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: dinfedt.src,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/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx
index 0b278a55872b..7b4e4289a49c 100644
--- a/sfx2/source/dialog/dockwin.cxx
+++ b/sfx2/source/dialog/dockwin.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dockwin.cxx,v $
- * $Revision: 1.48 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -164,7 +161,7 @@ SfxDockingWrapper::SfxDockingWrapper( Window* pParentWnd ,
if (xFactoryMgr.is())
{
SfxDispatcher* pDispatcher = pBindings->GetDispatcher();
- uno::Reference< frame::XFrame > xFrame( pDispatcher->GetFrame()->GetFrame()->GetFrameInterface(), uno::UNO_QUERY );
+ uno::Reference< frame::XFrame > xFrame( pDispatcher->GetFrame()->GetFrame().GetFrameInterface(), uno::UNO_QUERY );
uno::Sequence< uno::Any > aArgs(2);
beans::PropertyValue aPropValue;
aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Frame" ));
@@ -1855,7 +1852,7 @@ long SfxDockingWindow::Notify( NotifyEvent& rEvt )
}
if ( nHelpId )
- SfxHelp::OpenHelpAgent( pBindings->GetDispatcher_Impl()->GetFrame()->GetFrame(), nHelpId );
+ SfxHelp::OpenHelpAgent( &pBindings->GetDispatcher_Impl()->GetFrame()->GetFrame(), nHelpId );
// In VCL geht Notify zun"achst an das Fenster selbst,
// also base class rufen, sonst erf"ahrt der parent nichts
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index f8a77e721533..5270eb5d4207 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: filedlghelper.cxx,v $
- * $Revision: 1.144 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sfx2/source/dialog/filedlghelper.src b/sfx2/source/dialog/filedlghelper.src
index cb025bf569e8..61df13350510 100644
--- a/sfx2/source/dialog/filedlghelper.src
+++ b/sfx2/source/dialog/filedlghelper.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: filedlghelper.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/sfx2/source/dialog/filedlgimpl.hxx b/sfx2/source/dialog/filedlgimpl.hxx
index 2f9a7574bb2f..b023b8fb53a9 100644
--- a/sfx2/source/dialog/filedlgimpl.hxx
+++ b/sfx2/source/dialog/filedlgimpl.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: filedlgimpl.hxx,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/sfx2/source/dialog/filtergrouping.cxx b/sfx2/source/dialog/filtergrouping.cxx
index 4809462b70ca..ea2429be8157 100644
--- a/sfx2/source/dialog/filtergrouping.cxx
+++ b/sfx2/source/dialog/filtergrouping.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: filtergrouping.cxx,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/sfx2/source/dialog/filtergrouping.hxx b/sfx2/source/dialog/filtergrouping.hxx
index f6978bb4f7f2..8075186614dd 100644
--- a/sfx2/source/dialog/filtergrouping.hxx
+++ b/sfx2/source/dialog/filtergrouping.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: filtergrouping.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/sfx2/source/dialog/intro.cxx b/sfx2/source/dialog/intro.cxx
index 07f20b0801b8..637b89898a3a 100644
--- a/sfx2/source/dialog/intro.cxx
+++ b/sfx2/source/dialog/intro.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: intro.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/sfx2/source/dialog/itemconnect.cxx b/sfx2/source/dialog/itemconnect.cxx
index 211afd11bc6d..51ed3bc5304a 100644
--- a/sfx2/source/dialog/itemconnect.cxx
+++ b/sfx2/source/dialog/itemconnect.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: itemconnect.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/sfx2/source/dialog/mailmodel.cxx b/sfx2/source/dialog/mailmodel.cxx
index b36a6923184e..0e0c6ec22ee1 100644
--- a/sfx2/source/dialog/mailmodel.cxx
+++ b/sfx2/source/dialog/mailmodel.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mailmodel.cxx,v $
- * $Revision: 1.51 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sfx2/source/dialog/mailmodelapi.cxx b/sfx2/source/dialog/mailmodelapi.cxx
index 2e87d2c4a9ba..16d12f469205 100644
--- a/sfx2/source/dialog/mailmodelapi.cxx
+++ b/sfx2/source/dialog/mailmodelapi.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mailmodelapi.cxx,v $
- * $Revision: 1.10 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -331,14 +328,6 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocument( const ::rtl::OUString& _sAt
// save the document
if ( xMod.is() )
{
- // save old settings
-/*
- BOOL bModified = xMod->isModified();
- // prepare for mail export
- TODO
- SfxDispatcher* pDisp = pTopViewFrm->GetDispatcher();
- pDisp->Execute( SID_MAIL_PREPAREEXPORT, SFX_CALLMODE_SYNCHRON );
-*/
// detect filter
const SfxFilter* pFilter = SfxFilter::GetDefaultFilter(lcl_getFactoryName(_xModel));
// sal_Bool bHasFilter = pFilter != NULL;
@@ -435,14 +424,6 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocAsPDF( const ::rtl::OUString& _sAt
// save the document
if ( xMod.is() )
{
- /* TODO
- // save old settings
- BOOL bModified = xMod->isModified();
- // prepare for mail export
- SfxDispatcher* pDisp = pTopViewFrm->GetDispatcher();
- pDisp->Execute( SID_MAIL_PREPAREEXPORT, SFX_CALLMODE_SYNCHRON );
- */
-
// Get PDF Filter from document
::rtl::OUString sPDFMediaType(RTL_CONSTASCII_USTRINGPARAM("application/pdf"));
diff --git a/sfx2/source/dialog/mailwindow.src b/sfx2/source/dialog/mailwindow.src
index 1a925d88ace9..e5648e7f414f 100644
--- a/sfx2/source/dialog/mailwindow.src
+++ b/sfx2/source/dialog/mailwindow.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: mailwindow.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/sfx2/source/dialog/makefile.mk b/sfx2/source/dialog/makefile.mk
index 230bbe432aea..87ef0f1a7af1 100644
--- a/sfx2/source/dialog/makefile.mk
+++ b/sfx2/source/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.43 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx
index 319c3b873b48..1f5472cf2052 100644
--- a/sfx2/source/dialog/mgetempl.cxx
+++ b/sfx2/source/dialog/mgetempl.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mgetempl.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/sfx2/source/dialog/mgetempl.hrc b/sfx2/source/dialog/mgetempl.hrc
index fa15c6189981..e998baba939d 100644
--- a/sfx2/source/dialog/mgetempl.hrc
+++ b/sfx2/source/dialog/mgetempl.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: mgetempl.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/sfx2/source/dialog/mgetempl.src b/sfx2/source/dialog/mgetempl.src
index 2fc170f04683..f07d0873e454 100644
--- a/sfx2/source/dialog/mgetempl.src
+++ b/sfx2/source/dialog/mgetempl.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: mgetempl.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/sfx2/source/dialog/navigat.cxx b/sfx2/source/dialog/navigat.cxx
index 9f7cecd97745..d7f258e7ccb3 100644
--- a/sfx2/source/dialog/navigat.cxx
+++ b/sfx2/source/dialog/navigat.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: navigat.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/sfx2/source/dialog/newstyle.cxx b/sfx2/source/dialog/newstyle.cxx
index 05920c07973e..7193129838b2 100644
--- a/sfx2/source/dialog/newstyle.cxx
+++ b/sfx2/source/dialog/newstyle.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: newstyle.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/sfx2/source/dialog/newstyle.hrc b/sfx2/source/dialog/newstyle.hrc
index fe68c7bee36d..0efc04869ba9 100644
--- a/sfx2/source/dialog/newstyle.hrc
+++ b/sfx2/source/dialog/newstyle.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: newstyle.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/sfx2/source/dialog/newstyle.src b/sfx2/source/dialog/newstyle.src
index 405d3f781342..fa5fa62a2ee4 100644
--- a/sfx2/source/dialog/newstyle.src
+++ b/sfx2/source/dialog/newstyle.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: newstyle.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/sfx2/source/dialog/partwnd.cxx b/sfx2/source/dialog/partwnd.cxx
index 64461c49d850..cbbe20bfa203 100644
--- a/sfx2/source/dialog/partwnd.cxx
+++ b/sfx2/source/dialog/partwnd.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: partwnd.cxx,v $
- * $Revision: 1.22 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -181,7 +178,7 @@ SfxPartDockWnd_Impl::SfxPartDockWnd_Impl
if ( pBind->GetDispatcher() )
{
::com::sun::star::uno::Reference < ::com::sun::star::frame::XFramesSupplier >
- xSupp ( pBind->GetDispatcher()->GetFrame()->GetFrame()->GetFrameInterface(), ::com::sun::star::uno::UNO_QUERY );
+ xSupp ( pBind->GetDispatcher()->GetFrame()->GetFrame().GetFrameInterface(), ::com::sun::star::uno::UNO_QUERY );
if ( xSupp.is() )
xSupp->getFrames()->append( xFrame );
}
diff --git a/sfx2/source/dialog/passwd.cxx b/sfx2/source/dialog/passwd.cxx
index 981657d476fa..e7cc73ca04bf 100644
--- a/sfx2/source/dialog/passwd.cxx
+++ b/sfx2/source/dialog/passwd.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: passwd.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/sfx2/source/dialog/passwd.hrc b/sfx2/source/dialog/passwd.hrc
index 28f357d3595e..5be0446fd752 100644
--- a/sfx2/source/dialog/passwd.hrc
+++ b/sfx2/source/dialog/passwd.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: passwd.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/sfx2/source/dialog/passwd.src b/sfx2/source/dialog/passwd.src
index 7c80b2792d9c..fc58ecfda219 100644
--- a/sfx2/source/dialog/passwd.src
+++ b/sfx2/source/dialog/passwd.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: passwd.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/sfx2/source/dialog/printopt.cxx b/sfx2/source/dialog/printopt.cxx
index 29472b65208b..80902204fa88 100644
--- a/sfx2/source/dialog/printopt.cxx
+++ b/sfx2/source/dialog/printopt.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: printopt.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/sfx2/source/dialog/printopt.hrc b/sfx2/source/dialog/printopt.hrc
index 796c877c6d91..38c766c9f56a 100644
--- a/sfx2/source/dialog/printopt.hrc
+++ b/sfx2/source/dialog/printopt.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: printopt.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/sfx2/source/dialog/printopt.src b/sfx2/source/dialog/printopt.src
index fe7128206687..4217539a3af8 100644
--- a/sfx2/source/dialog/printopt.src
+++ b/sfx2/source/dialog/printopt.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: printopt.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/sfx2/source/dialog/recfloat.cxx b/sfx2/source/dialog/recfloat.cxx
index 7782b5178d8f..c678cfdffb6e 100644
--- a/sfx2/source/dialog/recfloat.cxx
+++ b/sfx2/source/dialog/recfloat.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: recfloat.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/sfx2/source/dialog/recfloat.src b/sfx2/source/dialog/recfloat.src
index 365ba423c3d2..5bdde1f57ab6 100644
--- a/sfx2/source/dialog/recfloat.src
+++ b/sfx2/source/dialog/recfloat.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: recfloat.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/sfx2/source/dialog/sfxdlg.cxx b/sfx2/source/dialog/sfxdlg.cxx
index 0e5f91ccea34..d62ed70b8490 100644
--- a/sfx2/source/dialog/sfxdlg.cxx
+++ b/sfx2/source/dialog/sfxdlg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: sfxdlg.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,5 +36,9 @@
SfxAbstractDialogFactory* SfxAbstractDialogFactory::Create()
{
- return (SfxAbstractDialogFactory*) VclAbstractDialogFactory::Create();
+ return dynamic_cast <SfxAbstractDialogFactory*>( VclAbstractDialogFactory::Create() );
+}
+
+SfxAbstractDialogFactory::~SfxAbstractDialogFactory()
+{
}
diff --git a/sfx2/source/dialog/sfxurl.cxx b/sfx2/source/dialog/sfxurl.cxx
index b50ad18d89ea..47e4062ac350 100644
--- a/sfx2/source/dialog/sfxurl.cxx
+++ b/sfx2/source/dialog/sfxurl.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: sfxurl.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/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx
index 750bf90d175c..f6e5f96cf0bd 100644
--- a/sfx2/source/dialog/splitwin.cxx
+++ b/sfx2/source/dialog/splitwin.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: splitwin.cxx,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/sfx2/source/dialog/srchdlg.cxx b/sfx2/source/dialog/srchdlg.cxx
index 500d530bab3f..0134b8d58bfa 100644
--- a/sfx2/source/dialog/srchdlg.cxx
+++ b/sfx2/source/dialog/srchdlg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: srchdlg.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/sfx2/source/dialog/srchdlg.hrc b/sfx2/source/dialog/srchdlg.hrc
index b202addc615f..55fe9ce47d26 100644
--- a/sfx2/source/dialog/srchdlg.hrc
+++ b/sfx2/source/dialog/srchdlg.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: srchdlg.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/sfx2/source/dialog/srchdlg.src b/sfx2/source/dialog/srchdlg.src
index b4291dbe8b26..0947f3932981 100644
--- a/sfx2/source/dialog/srchdlg.src
+++ b/sfx2/source/dialog/srchdlg.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: srchdlg.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/sfx2/source/dialog/styfitem.cxx b/sfx2/source/dialog/styfitem.cxx
index 1b58f90e93d4..a33677c6b2ae 100644
--- a/sfx2/source/dialog/styfitem.cxx
+++ b/sfx2/source/dialog/styfitem.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: styfitem.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/sfx2/source/dialog/styledlg.cxx b/sfx2/source/dialog/styledlg.cxx
index 7d4e60e117e9..ff6406f0d5d3 100644
--- a/sfx2/source/dialog/styledlg.cxx
+++ b/sfx2/source/dialog/styledlg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: styledlg.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/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index 1008c76b8d9f..93c2e0e09595 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tabdlg.cxx,v $
- * $Revision: 1.38 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -1791,7 +1788,7 @@ long SfxTabDialog::Notify( NotifyEvent& rNEvt )
}
if ( nHelpId )
- SfxHelp::OpenHelpAgent( pViewFrame->GetFrame(), nHelpId );
+ SfxHelp::OpenHelpAgent( &pViewFrame->GetFrame(), nHelpId );
}
}
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 584dd488da56..9edeb05b43ac 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: templdlg.cxx,v $
- * $Revision: 1.58.46.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sfx2/source/dialog/templdlg.hrc b/sfx2/source/dialog/templdlg.hrc
index 54b71fb64460..58563fb9c160 100644
--- a/sfx2/source/dialog/templdlg.hrc
+++ b/sfx2/source/dialog/templdlg.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: templdlg.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/sfx2/source/dialog/templdlg.src b/sfx2/source/dialog/templdlg.src
index ccf1b1b6236a..a4adcd77b6d3 100644
--- a/sfx2/source/dialog/templdlg.src
+++ b/sfx2/source/dialog/templdlg.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: templdlg.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/sfx2/source/dialog/tplcitem.cxx b/sfx2/source/dialog/tplcitem.cxx
index 111cab903f7e..5d7569300cf8 100644
--- a/sfx2/source/dialog/tplcitem.cxx
+++ b/sfx2/source/dialog/tplcitem.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tplcitem.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/sfx2/source/dialog/tplpitem.cxx b/sfx2/source/dialog/tplpitem.cxx
index 06f85bea9b60..7b81fb54cdbd 100644
--- a/sfx2/source/dialog/tplpitem.cxx
+++ b/sfx2/source/dialog/tplpitem.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tplpitem.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/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx
index 5d2cf91b0c8f..beb43c192810 100644
--- a/sfx2/source/dialog/versdlg.cxx
+++ b/sfx2/source/dialog/versdlg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: versdlg.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/sfx2/source/dialog/versdlg.hrc b/sfx2/source/dialog/versdlg.hrc
index 4f07b8fbcf3e..2de7596221e1 100644
--- a/sfx2/source/dialog/versdlg.hrc
+++ b/sfx2/source/dialog/versdlg.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: versdlg.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/sfx2/source/dialog/versdlg.src b/sfx2/source/dialog/versdlg.src
index 015b219c6f90..60aeb2777542 100644
--- a/sfx2/source/dialog/versdlg.src
+++ b/sfx2/source/dialog/versdlg.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: versdlg.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/sfx2/source/doc/DocumentMetadataAccess.cxx b/sfx2/source/doc/DocumentMetadataAccess.cxx
index 112183a4efbe..9625ea958830 100644
--- a/sfx2/source/doc/DocumentMetadataAccess.cxx
+++ b/sfx2/source/doc/DocumentMetadataAccess.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DocumentMetadataAccess.cxx,v $
- * $Revision: 1.1.2.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sfx2/source/doc/Metadatable.cxx b/sfx2/source/doc/Metadatable.cxx
index 2ad27856c7cc..b1b69e5ac74f 100644
--- a/sfx2/source/doc/Metadatable.cxx
+++ b/sfx2/source/doc/Metadatable.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: SwMetadatable.cxx,v $
- * $Revision: 1.1.2.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sfx2/source/doc/QuerySaveDocument.cxx b/sfx2/source/doc/QuerySaveDocument.cxx
index 22a1ab5eef4c..642fe3c21af8 100644
--- a/sfx2/source/doc/QuerySaveDocument.cxx
+++ b/sfx2/source/doc/QuerySaveDocument.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: QuerySaveDocument.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/sfx2/source/doc/SfxDocumentMetaData.cxx b/sfx2/source/doc/SfxDocumentMetaData.cxx
index 476d6f5186a5..f46f3583cfd8 100644
--- a/sfx2/source/doc/SfxDocumentMetaData.cxx
+++ b/sfx2/source/doc/SfxDocumentMetaData.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: SfxDocumentMetaData.cxx,v $
- * $Revision: 1.10.32.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -588,7 +585,9 @@ sal_Int32 textToDuration(::rtl::OUString const& i_rText) throw ()
{
css::util::Duration d;
if (textToDuration(d, i_rText)) {
- return (d.Days * (24*3600))
+ // #i107372#: approximate years/months
+ const sal_Int32 days( (d.Years * 365) + (d.Months * 30) + d.Days );
+ return (days * (24*3600))
+ (d.Hours * 3600) + (d.Minutes * 60) + d.Seconds;
} else {
return 0; // default
@@ -611,7 +610,7 @@ sal_Int32 textToDuration(::rtl::OUString const& i_rText) throw ()
ud.Hours = static_cast<sal_Int16>((i_value % (24 * 3600)) / 3600);
ud.Minutes = static_cast<sal_Int16>((i_value % 3600) / 60);
ud.Seconds = static_cast<sal_Int16>(i_value % 60);
- ud.HundredthSeconds = 0;
+ ud.MilliSeconds = 0;
return durationToText(ud);
}
@@ -928,8 +927,13 @@ propsToStrings(css::uno::Reference<css::beans::XPropertySet> const & i_xPropSet)
values.push_back(s);
// #i90847# OOo 2.x does stupid things if value-type="string";
// fortunately string is default anyway, so we can just omit it
-// as.push_back(std::make_pair(vt,
-// ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("string"))));
+// #i107502#: however, OOo 2.x only reads 4 user-defined without @value-type
+// => best backward compatibility: first 4 without @value-type, rest with
+ if (4 <= i)
+ {
+ as.push_back(std::make_pair(vt,
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("string"))));
+ }
} else if (type == ::cppu::UnoType<css::util::DateTime>::get()) {
css::util::DateTime dt;
any >>= dt;
@@ -951,7 +955,7 @@ propsToStrings(css::uno::Reference<css::beans::XPropertySet> const & i_xPropSet)
ud.Hours = ut.Hours;
ud.Minutes = ut.Minutes;
ud.Seconds = ut.Seconds;
- ud.HundredthSeconds = ut.HundredthSeconds;
+ ud.MilliSeconds = 10 * ut.HundredthSeconds;
values.push_back(durationToText(ud));
as.push_back(std::make_pair(vt,
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("time"))));
diff --git a/sfx2/source/doc/applet.cxx b/sfx2/source/doc/applet.cxx
index 8a98a1f8bd70..844eb5726b1a 100644
--- a/sfx2/source/doc/applet.cxx
+++ b/sfx2/source/doc/applet.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: applet.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/sfx2/source/doc/commitlistener.cxx b/sfx2/source/doc/commitlistener.cxx
index 9ca08dfe6458..9ca11a9eef82 100644
--- a/sfx2/source/doc/commitlistener.cxx
+++ b/sfx2/source/doc/commitlistener.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: commitlistener.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/sfx2/source/doc/commitlistener.hxx b/sfx2/source/doc/commitlistener.hxx
index 1004e4aa27b2..572da034cef1 100644
--- a/sfx2/source/doc/commitlistener.hxx
+++ b/sfx2/source/doc/commitlistener.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: commitlistener.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/sfx2/source/doc/doc.hrc b/sfx2/source/doc/doc.hrc
index ae4ff419565c..838168e64526 100644
--- a/sfx2/source/doc/doc.hrc
+++ b/sfx2/source/doc/doc.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: doc.hrc,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/sfx2/source/doc/doc.src b/sfx2/source/doc/doc.src
index c914d9fe2927..d17b62c9b52a 100644
--- a/sfx2/source/doc/doc.src
+++ b/sfx2/source/doc/doc.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: doc.src,v $
- * $Revision: 1.94 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sfx2/source/doc/docfac.cxx b/sfx2/source/doc/docfac.cxx
index 012109cac21a..48c01a1ac3fe 100644
--- a/sfx2/source/doc/docfac.cxx
+++ b/sfx2/source/doc/docfac.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: docfac.cxx,v $
- * $Revision: 1.28 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -287,6 +284,14 @@ const SvGlobalName& SfxObjectFactory::GetClassId() const
return pImpl->aClassName;
}
+String SfxObjectFactory::GetFactoryURL() const
+{
+ ::rtl::OUStringBuffer aURLComposer;
+ aURLComposer.appendAscii( "private:factory/" );
+ aURLComposer.appendAscii( GetShortName() );
+ return aURLComposer.makeStringAndClear();
+}
+
String SfxObjectFactory::GetModuleName() const
{
static ::rtl::OUString SERVICENAME_MODULEMANAGER = ::rtl::OUString::createFromAscii("com.sun.star.frame.ModuleManager");
@@ -305,10 +310,36 @@ String SfxObjectFactory::GetModuleName() const
::rtl::OUString sModuleName = aPropSet.getUnpackedValueOrDefault(PROP_MODULEUINAME, ::rtl::OUString());
return String(sModuleName);
}
- catch(const css::uno::RuntimeException& exRun)
- { throw exRun; }
+ catch(const css::uno::RuntimeException&)
+ { throw; }
catch(const css::uno::Exception&)
{}
return String();
}
+
+
+sal_uInt16 SfxObjectFactory::GetViewNo_Impl( const sal_uInt16 i_nViewId, const sal_uInt16 i_nFallback ) const
+{
+ for ( sal_uInt16 curViewNo = 0; curViewNo < GetViewFactoryCount(); ++curViewNo )
+ {
+ const sal_uInt16 curViewId = GetViewFactory( curViewNo ).GetOrdinal();
+ if ( i_nViewId == curViewId )
+ return curViewNo;
+ }
+ return i_nFallback;
+}
+
+SfxViewFactory* SfxObjectFactory::GetViewFactoryByViewName( const String& i_rViewName ) const
+{
+ for ( USHORT nViewNo = 0;
+ nViewNo < GetViewFactoryCount();
+ ++nViewNo
+ )
+ {
+ SfxViewFactory& rViewFac( GetViewFactory( nViewNo ) );
+ if ( rViewFac.GetViewName() == i_rViewName )
+ return &rViewFac;
+ }
+ return NULL;
+}
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 108c9f27858a..6696b7670c63 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: docfile.cxx,v $
- * $Revision: 1.203.50.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -263,79 +260,6 @@ void SAL_CALL SfxMediumHandler_Impl::handle( const com::sun::star::uno::Referenc
}
//----------------------------------------------------------------
-class SfxPoolCancelManager_Impl : public SfxCancelManager ,
- public SfxCancellable ,
- public SfxListener ,
- public SvRefBase
-{
- SfxCancelManagerWeak wParent;
-
- ~SfxPoolCancelManager_Impl();
-public:
- SfxPoolCancelManager_Impl( SfxCancelManager* pParent, const String& rName );
-
- virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
- using SfxCancelManager::Cancel;
- virtual void Cancel();
-};
-
-//----------------------------------------------------------------
-SV_DECL_IMPL_REF( SfxPoolCancelManager_Impl )
-
-
-//----------------------------------------------------------------
-SfxPoolCancelManager_Impl::SfxPoolCancelManager_Impl( SfxCancelManager* pParent, const String& rName )
- : SfxCancelManager( pParent ),
- SfxCancellable( pParent ? pParent : this, rName ),
- wParent( pParent )
-{
- if( pParent )
- {
- StartListening( *this );
- SetManager( 0 );
- }
-}
-
-//----------------------------------------------------------------
-SfxPoolCancelManager_Impl::~SfxPoolCancelManager_Impl()
-{
- for( sal_uInt16 nPos = GetCancellableCount(); nPos--; )
- {
- // nicht an Parent uebernehmen!
- SfxCancellable* pCbl = GetCancellable( nPos );
- if ( pCbl )
- pCbl->SetManager( 0 );
- }
-}
-
-
-//----------------------------------------------------------------
-void SfxPoolCancelManager_Impl::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& /*rHint*/ )
-{
- if( !GetCancellableCount() ) SetManager( 0 );
- else if( !GetManager() )
- {
- if( !wParent.Is() ) wParent = SFX_APP()->GetCancelManager();
- SetManager( wParent );
- }
-}
-
-//----------------------------------------------------------------
-void SfxPoolCancelManager_Impl::Cancel()
-{
- SfxPoolCancelManager_ImplRef xThis = this;
- for( sal_uInt16 nPos = GetCancellableCount(); nPos--; )
- {
- SfxCancellable* pCbl = GetCancellable( nPos );
- // Wenn wir nicht im Button stehen
- if( pCbl && pCbl != this )
- pCbl->Cancel();
- if( GetCancellableCount() < nPos )
- nPos = GetCancellableCount();
- }
-}
-
-//----------------------------------------------------------------
class SfxMedium_Impl : public SvCompatWeakBase
{
public:
@@ -343,7 +267,6 @@ public:
sal_Bool bUpdatePickList : 1;
sal_Bool bIsTemp : 1;
sal_Bool bForceSynchron : 1;
- sal_Bool bDontCreateCancellable : 1;
sal_Bool bDownloadDone : 1;
sal_Bool bDontCallDoneLinkOnSharingError : 1;
sal_Bool bIsStorage: 1;
@@ -359,7 +282,6 @@ public:
uno::Reference < embed::XStorage > xStorage;
- SfxPoolCancelManager_ImplRef xCancelManager;
SfxMedium* pAntiImpl;
long nFileVersion;
@@ -402,8 +324,6 @@ public:
uno::Reference< logging::XSimpleLogRing > m_xLogRing;
- SfxPoolCancelManager_Impl* GetCancelManager();
-
SfxMedium_Impl( SfxMedium* pAntiImplP );
~SfxMedium_Impl();
};
@@ -419,29 +339,12 @@ void SfxMedium::Cancel_Impl()
SetError( ERRCODE_IO_GENERAL, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
}
-SfxPoolCancelManager_Impl* SfxMedium_Impl::GetCancelManager()
-{
- if( !xCancelManager.Is() )
- {
- if( !bDontCreateCancellable )
- xCancelManager = new SfxPoolCancelManager_Impl(
- wLoadTargetFrame ? wLoadTargetFrame->GetCancelManager() :
- SFX_APP()->GetCancelManager(),
- pAntiImpl->GetURLObject().GetURLNoPass() );
- else
- xCancelManager = new SfxPoolCancelManager_Impl(
- 0, pAntiImpl->GetURLObject().GetURLNoPass() );
- }
- return xCancelManager;
-}
-
//------------------------------------------------------------------
SfxMedium_Impl::SfxMedium_Impl( SfxMedium* pAntiImplP )
: SvCompatWeakBase( pAntiImplP ),
bUpdatePickList(sal_True),
bIsTemp( sal_False ),
bForceSynchron( sal_False ),
- bDontCreateCancellable( sal_False ),
bDownloadDone( sal_True ),
bDontCallDoneLinkOnSharingError( sal_False ),
bIsStorage( sal_False ),
@@ -2442,25 +2345,7 @@ void SfxMedium::GetMedium_Impl()
}
}
-//------------------------------------------------------------------
-SfxPoolCancelManager_Impl* SfxMedium::GetCancelManager_Impl() const
-{
- return pImp->GetCancelManager();
-}
-
-//------------------------------------------------------------------
-void SfxMedium::SetCancelManager_Impl( SfxPoolCancelManager_Impl* pMgr )
-{
- pImp->xCancelManager = pMgr;
-}
-
//----------------------------------------------------------------
-void SfxMedium::CancelTransfers()
-{
- if( pImp->xCancelManager.Is() )
- pImp->xCancelManager->Cancel();
-}
-
sal_Bool SfxMedium::IsRemote()
{
return bRemote;
@@ -3289,13 +3174,6 @@ sal_Bool SfxMedium::IsDownloadDone_Impl()
return pImp->bDownloadDone;
}
-//----------------------------------------------------------------
-
-void SfxMedium::SetDontCreateCancellable( )
-{
- pImp->bDontCreateCancellable = sal_True;
-}
-
::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SfxMedium::GetInputStream()
{
if ( !pImp->xInputStream.is() )
diff --git a/sfx2/source/doc/docfilt.cxx b/sfx2/source/doc/docfilt.cxx
index d8b6d23b8d03..e955c43af705 100644
--- a/sfx2/source/doc/docfilt.cxx
+++ b/sfx2/source/doc/docfilt.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: docfilt.cxx,v $
- * $Revision: 1.23.142.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sfx2/source/doc/docinf.cxx b/sfx2/source/doc/docinf.cxx
index 0b33dd3fd93d..d0f6678d8641 100644
--- a/sfx2/source/doc/docinf.cxx
+++ b/sfx2/source/doc/docinf.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: docinf.cxx,v $
- * $Revision: 1.54.174.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sfx2/source/doc/docinsert.cxx b/sfx2/source/doc/docinsert.cxx
index 9615cc4f51a7..2dcca2eadf56 100644
--- a/sfx2/source/doc/docinsert.cxx
+++ b/sfx2/source/doc/docinsert.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: docinsert.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/sfx2/source/doc/docmacromode.cxx b/sfx2/source/doc/docmacromode.cxx
index 8d96c08a51d4..249ebbaf02ab 100644
--- a/sfx2/source/doc/docmacromode.cxx
+++ b/sfx2/source/doc/docmacromode.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: docmacromode.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/sfx2/source/doc/docstoragemodifylistener.cxx b/sfx2/source/doc/docstoragemodifylistener.cxx
index c6bb649488ca..625aff0031fc 100644
--- a/sfx2/source/doc/docstoragemodifylistener.cxx
+++ b/sfx2/source/doc/docstoragemodifylistener.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: docstoragemodifylistener.cxx,v $
- * $Revision: 1.4.28.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sfx2/source/doc/doctdlg.cxx b/sfx2/source/doc/doctdlg.cxx
index a00b047230d1..7a5fea18004f 100644
--- a/sfx2/source/doc/doctdlg.cxx
+++ b/sfx2/source/doc/doctdlg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: doctdlg.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/sfx2/source/doc/doctdlg.hrc b/sfx2/source/doc/doctdlg.hrc
index aeee4a06743b..8deed4699f3b 100644
--- a/sfx2/source/doc/doctdlg.hrc
+++ b/sfx2/source/doc/doctdlg.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: doctdlg.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/sfx2/source/doc/doctdlg.src b/sfx2/source/doc/doctdlg.src
index e0ac0d9dba6c..91d966fbd2d5 100644
--- a/sfx2/source/doc/doctdlg.src
+++ b/sfx2/source/doc/doctdlg.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: doctdlg.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/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx
index 80492708d652..db6f2a2d133f 100644
--- a/sfx2/source/doc/doctempl.cxx
+++ b/sfx2/source/doc/doctempl.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: doctempl.cxx,v $
- * $Revision: 1.76 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -69,7 +66,6 @@
#include <com/sun/star/ucb/TransferInfo.hpp>
#include <com/sun/star/ucb/XCommandProcessor.hpp>
#include <com/sun/star/ucb/XContent.hpp>
-#include <com/sun/star/ucb/XContentCreator.hpp>
#include <com/sun/star/ucb/XContentAccess.hpp>
#include <com/sun/star/ucb/XAnyCompareFactory.hpp>
#include <com/sun/star/ucb/XAnyCompare.hpp>
@@ -794,12 +790,12 @@ String SfxDocumentTemplates::GetDefaultTemplatePath
INetURLObject aTemplateObj( pImp->GetRootURL() );
aTemplateObj.insertName( aGroupName, false,
- INetURLObject::LAST_SEGMENT, true,
- INetURLObject::ENCODE_ALL );
+ INetURLObject::LAST_SEGMENT, true,
+ INetURLObject::ENCODE_ALL );
aTemplateObj.insertName( aTitle, false,
- INetURLObject::LAST_SEGMENT, true,
- INetURLObject::ENCODE_ALL );
+ INetURLObject::LAST_SEGMENT, true,
+ INetURLObject::ENCODE_ALL );
::rtl::OUString aResult;
diff --git a/sfx2/source/doc/doctempl.src b/sfx2/source/doc/doctempl.src
index ce0966eca534..2c91358f845e 100644
--- a/sfx2/source/doc/doctempl.src
+++ b/sfx2/source/doc/doctempl.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: doctempl.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/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index 4439dc05f9ff..b921f2d97f1f 100644
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: doctemplates.cxx,v $
- * $Revision: 1.42.84.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sfx2/source/doc/doctemplateslocal.cxx b/sfx2/source/doc/doctemplateslocal.cxx
index 2ac7e8d17ecd..277199d30051 100644
--- a/sfx2/source/doc/doctemplateslocal.cxx
+++ b/sfx2/source/doc/doctemplateslocal.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: doctemplateslocal.cxx,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/sfx2/source/doc/doctemplateslocal.hxx b/sfx2/source/doc/doctemplateslocal.hxx
index baf947a6e954..84b1a9cc9611 100644
--- a/sfx2/source/doc/doctemplateslocal.hxx
+++ b/sfx2/source/doc/doctemplateslocal.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: doctemplateslocal.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/sfx2/source/doc/docvor.cxx b/sfx2/source/doc/docvor.cxx
index 86a86ccb61b4..719dc5b8d223 100644
--- a/sfx2/source/doc/docvor.cxx
+++ b/sfx2/source/doc/docvor.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: docvor.cxx,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/sfx2/source/doc/docvor.hrc b/sfx2/source/doc/docvor.hrc
index b79a38ad6a35..842aa73fb8a3 100644
--- a/sfx2/source/doc/docvor.hrc
+++ b/sfx2/source/doc/docvor.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: docvor.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/sfx2/source/doc/docvor.src b/sfx2/source/doc/docvor.src
index 1c91b48bb116..2c9975de9bb8 100644
--- a/sfx2/source/doc/docvor.src
+++ b/sfx2/source/doc/docvor.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: docvor.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/sfx2/source/doc/frmdescr.cxx b/sfx2/source/doc/frmdescr.cxx
index 23616edf9279..04c3e78a7e7b 100644
--- a/sfx2/source/doc/frmdescr.cxx
+++ b/sfx2/source/doc/frmdescr.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: frmdescr.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/sfx2/source/doc/graphhelp.cxx b/sfx2/source/doc/graphhelp.cxx
index bd0e65830870..388d85cefc25 100644
--- a/sfx2/source/doc/graphhelp.cxx
+++ b/sfx2/source/doc/graphhelp.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: graphhelp.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/sfx2/source/doc/graphhelp.hxx b/sfx2/source/doc/graphhelp.hxx
index 9af90b19742c..22f8ad5a115e 100644
--- a/sfx2/source/doc/graphhelp.hxx
+++ b/sfx2/source/doc/graphhelp.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: graphhelp.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/sfx2/source/doc/graphhelp.src b/sfx2/source/doc/graphhelp.src
index 86cfa20508ea..1936a8460d25 100644
--- a/sfx2/source/doc/graphhelp.src
+++ b/sfx2/source/doc/graphhelp.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: graphhelp.src,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/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index bceca0db94ca..cbd269b41516 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: guisaveas.cxx,v $
- * $Revision: 1.37 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -840,8 +837,8 @@ sal_Bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode,
::rtl::OUString aAdjustToType;
// bSetStandardName == true means that user agreed to store document in the default (default default ;-)) format
- if ( !(( nStoreMode & EXPORT_REQUESTED ) && !( nStoreMode & WIDEEXPORT_REQUESTED )) &&
- ( bSetStandardName || GetStorable()->hasLocation() ))
+ if ( !(( nStoreMode & EXPORT_REQUESTED ) && !( nStoreMode & WIDEEXPORT_REQUESTED )) &&
+ ( bSetStandardName || GetStorable()->hasLocation() ))
{
uno::Sequence< beans::PropertyValue > aOldFilterProps;
::rtl::OUString aOldFilterName = GetDocProps().getUnpackedValueOrDefault(
diff --git a/sfx2/source/doc/iframe.cxx b/sfx2/source/doc/iframe.cxx
index 92c28e81cb2e..3ad0cc51a923 100644
--- a/sfx2/source/doc/iframe.cxx
+++ b/sfx2/source/doc/iframe.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: iframe.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/sfx2/source/doc/makefile.mk b/sfx2/source/doc/makefile.mk
index 66fd03175a8e..7da456ebaa36 100644
--- a/sfx2/source/doc/makefile.mk
+++ b/sfx2/source/doc/makefile.mk
@@ -1,15 +1,11 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE 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.33 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx
index 0fe45c49db95..d3235b1c7a7f 100644
--- a/sfx2/source/doc/new.cxx
+++ b/sfx2/source/doc/new.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: new.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/sfx2/source/doc/new.hrc b/sfx2/source/doc/new.hrc
index b80b5f969b3f..dd8878bf0177 100644
--- a/sfx2/source/doc/new.hrc
+++ b/sfx2/source/doc/new.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: new.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/sfx2/source/doc/new.src b/sfx2/source/doc/new.src
index 7df8d711ecc7..146f9f630570 100644
--- a/sfx2/source/doc/new.src
+++ b/sfx2/source/doc/new.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: new.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/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx
index 8514ca9a917a..e73594af1e10 100644
--- a/sfx2/source/doc/objcont.cxx
+++ b/sfx2/source/doc/objcont.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: objcont.cxx,v $
- * $Revision: 1.78 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -50,8 +47,8 @@
#include <svl/eitem.hxx>
#include <svl/urihelper.hxx>
#include <svl/ctloptions.hxx>
-#include <comphelper/processfactory.hxx>
#include <comphelper/storagehelper.hxx>
+#include <comphelper/processfactory.hxx>
#include <unotools/securityoptions.hxx>
#include <svtools/sfxecode.hxx>
#include <svtools/ehdl.hxx>
@@ -77,7 +74,7 @@
#include "sfxhelp.hxx"
#include <sfx2/dispatch.hxx>
#include <sfx2/printer.hxx>
-#include <sfx2/topfrm.hxx>
+#include <sfx2/viewfrm.hxx>
#include "basmgr.hxx"
#include <sfx2/doctempl.hxx>
#include "doc.hrc"
@@ -92,9 +89,6 @@ using namespace ::com::sun::star::uno;
//====================================================================
-#define SFX_WINDOWS_STREAM "SfxWindows"
-#define SFX_PREVIEW_STREAM "SfxPreview"
-
//====================================================================
static
@@ -192,252 +186,6 @@ SfxObjectShell::CreatePreviewMetaFile_Impl( sal_Bool bFullContent, sal_Bool bHig
return pFile;
}
-//REMOVE FASTBOOL SfxObjectShell::SaveWindows_Impl( SvStorage &rStor ) const
-//REMOVE {
-//REMOVE SvStorageStreamRef xStream = rStor.OpenStream( DEFINE_CONST_UNICODE( SFX_WINDOWS_STREAM ),
-//REMOVE STREAM_TRUNC | STREAM_STD_READWRITE);
-//REMOVE if ( !xStream )
-//REMOVE return FALSE;
-//REMOVE
-//REMOVE xStream->SetBufferSize(1024);
-//REMOVE xStream->SetVersion( rStor.GetVersion() );
-//REMOVE
-//REMOVE // "uber alle Fenster iterieren (aber aktives Window zuletzt)
-//REMOVE SfxViewFrame *pActFrame = SfxViewFrame::Current();
-//REMOVE if ( !pActFrame || pActFrame->GetObjectShell() != this )
-//REMOVE pActFrame = SfxViewFrame::GetFirst(this);
-//REMOVE
-//REMOVE String aActWinData;
-//REMOVE for ( SfxViewFrame *pFrame = SfxViewFrame::GetFirst(this, TYPE(SfxTopViewFrame) ); pFrame;
-//REMOVE pFrame = SfxViewFrame::GetNext(*pFrame, this, TYPE(SfxTopViewFrame) ) )
-//REMOVE {
-//REMOVE // Bei Dokumenten, die Outplace aktiv sind, kann beim Speichern auch schon die View weg sein!
-//REMOVE if ( pFrame->GetViewShell() )
-//REMOVE {
-//REMOVE SfxTopFrame* pTop = (SfxTopFrame*) pFrame->GetFrame();
-//REMOVE pTop->GetTopWindow_Impl();
-//REMOVE
-//REMOVE char cToken = ',';
-//REMOVE const BOOL bActWin = pActFrame == pFrame;
-//REMOVE String aUserData;
-//REMOVE pFrame->GetViewShell()->WriteUserData(aUserData);
-//REMOVE
-//REMOVE // assemble ini-data
-//REMOVE String aWinData;
-//REMOVE aWinData += String::CreateFromInt32( pFrame->GetCurViewId() );
-//REMOVE aWinData += cToken;
-//REMOVE /*
-//REMOVE if ( !pWin || pWin->IsMaximized() )
-//REMOVE aWinData += SFX_WINSIZE_MAX;
-//REMOVE else if ( pWin->IsMinimized() )
-//REMOVE aWinData += SFX_WINSIZE_MIN;
-//REMOVE else
-//REMOVE */
-//REMOVE aWinData += cToken;
-//REMOVE aWinData += aUserData;
-//REMOVE
-//REMOVE // aktives kennzeichnen
-//REMOVE aWinData += cToken;
-//REMOVE aWinData += bActWin ? '1' : '0';
-//REMOVE
-//REMOVE // je nachdem merken oder abspeichern
-//REMOVE if ( bActWin )
-//REMOVE aActWinData = aWinData;
-//REMOVE else
-//REMOVE xStream->WriteByteString( aWinData );
-//REMOVE }
-//REMOVE }
-//REMOVE
-//REMOVE // aktives Window hinterher
-//REMOVE xStream->WriteByteString( aActWinData );
-//REMOVE return !xStream->GetError();
-//REMOVE }
-
-//====================================================================
-
-SfxViewFrame* SfxObjectShell::LoadWindows_Impl( SfxTopFrame *pPreferedFrame )
-{
- DBG_ASSERT( pPreferedFrame, "Call without preferred Frame is not supported anymore!" );
- if ( pImp->bLoadingWindows || !pPreferedFrame )
- return NULL;
-
- DBG_ASSERT( GetMedium(), "A Medium should exist here!");
- if( !GetMedium() )
- return 0;
-
- // get correct mode
- SFX_APP();
- SfxViewFrame *pPrefered = pPreferedFrame ? pPreferedFrame->GetCurrentViewFrame() : 0;
- SvtSaveOptions aOpt;
- BOOL bLoadDocWins = aOpt.IsSaveDocWins() && !pPrefered;
-
- // try to get viewdata information for XML format
- REFERENCE < XVIEWDATASUPPLIER > xViewDataSupplier( GetModel(), ::com::sun::star::uno::UNO_QUERY );
- REFERENCE < XINDEXACCESS > xViewData;
-
- if ( xViewDataSupplier.is() )
- {
- xViewData = xViewDataSupplier->getViewData();
- if ( !xViewData.is() )
- return NULL;
- }
- else
- return NULL;
-
- SfxViewFrame *pActiveFrame = 0;
- String aWinData;
- SfxItemSet *pSet = GetMedium()->GetItemSet();
-
- pImp->bLoadingWindows = TRUE;
- BOOL bLoaded = FALSE;
- sal_Int32 nView = 0;
-
- // get saved information for all views
- while ( TRUE )
- {
- USHORT nViewId = 0;
- FASTBOOL bMaximized=FALSE;
- String aPosSize;
- String aUserData; // used in the binary format
- SEQUENCE < PROPERTYVALUE > aSeq; // used in the XML format
-
- // XML format
- // active view is the first view in the container
- FASTBOOL bActive = ( nView == 0 );
-
- if ( nView == xViewData->getCount() )
- // finished
- break;
-
- // get viewdata and look for the stored ViewId
- ::com::sun::star::uno::Any aAny = xViewData->getByIndex( nView++ );
- if ( aAny >>= aSeq )
- {
- for ( sal_Int32 n=0; n<aSeq.getLength(); n++ )
- {
- const PROPERTYVALUE& rProp = aSeq[n];
- if ( rProp.Name.compareToAscii("ViewId") == COMPARE_EQUAL )
- {
- ::rtl::OUString aId;
- rProp.Value >>= aId;
- String aTmp( aId );
- aTmp.Erase( 0, 4 ); // format is like in "view3"
- nViewId = (USHORT) aTmp.ToInt32();
- break;
- }
- }
- }
-
- // load only active view, but current item is not the active one ?
- // in XML format the active view is the first one
- if ( !bLoadDocWins && !bActive )
- break;
-
- // check for minimized/maximized/size
- if ( aPosSize.EqualsAscii( "max" ) )
- bMaximized = TRUE;
- else if ( aPosSize.EqualsAscii( "min" ) )
- {
- bMaximized = TRUE;
- bActive = FALSE;
- }
- else
- bMaximized = FALSE;
-
- Point aPt;
- Size aSz;
-
- pSet->ClearItem( SID_USER_DATA );
- SfxViewFrame *pFrame = 0;
- if ( pPrefered )
- {
- // use the frame from the arguments, but don't set a window size
- pFrame = pPrefered;
- if ( pFrame->GetViewShell() || !pFrame->GetObjectShell() )
- {
- pSet->ClearItem( SID_VIEW_POS_SIZE );
- pSet->ClearItem( SID_WIN_POSSIZE );
- pSet->Put( SfxUInt16Item( SID_VIEW_ID, nViewId ) );
-
- // avoid flickering controllers
- SfxBindings &rBind = pFrame->GetBindings();
- rBind.ENTERREGISTRATIONS();
-
- // set document into frame
- pPreferedFrame->InsertDocument( this );
-
- // restart controller updating
- rBind.LEAVEREGISTRATIONS();
- }
- else
- {
- // create new view
- pFrame->CreateView_Impl( nViewId );
- }
- }
- else
- {
- if ( bLoadDocWins )
- {
- // open in the background
- pSet->Put( SfxUInt16Item( SID_VIEW_ZOOM_MODE, 0 ) );
- if ( !bMaximized )
- pSet->Put( SfxRectangleItem( SID_VIEW_POS_SIZE, Rectangle( aPt, aSz ) ) );
- }
-
- pSet->Put( SfxUInt16Item( SID_VIEW_ID, nViewId ) );
-
- if ( pPreferedFrame )
- {
- // Frame "ubergeben, allerdings ist der noch leer
- pPreferedFrame->InsertDocument( this );
- pFrame = pPreferedFrame->GetCurrentViewFrame();
- }
- else
- {
- pFrame = SfxTopFrame::Create( this, nViewId, FALSE, pSet )->GetCurrentViewFrame();
- }
-
- // only temporary data, don't hold it in the itemset
- pSet->ClearItem( SID_VIEW_POS_SIZE );
- pSet->ClearItem( SID_WIN_POSSIZE );
- pSet->ClearItem( SID_VIEW_ZOOM_MODE );
- }
-
- bLoaded = TRUE;
-
- // UserData hier einlesen, da es ansonsten immer mit bBrowse=TRUE
- // aufgerufen wird, beim Abspeichern wurde aber bBrowse=FALSE verwendet
- if ( pFrame && pFrame->GetViewShell() )
- {
- if ( aUserData.Len() )
- pFrame->GetViewShell()->ReadUserData( aUserData, !bLoadDocWins );
- else if ( aSeq.getLength() )
- pFrame->GetViewShell()->ReadUserDataSequence( aSeq, !bLoadDocWins );
- }
-
- // perhaps there are more windows to load
- pPreferedFrame = NULL;
-
- if ( bActive )
- pActiveFrame = pFrame;
-
- if( pPrefered || !bLoadDocWins )
- // load only active window
- break;
- }
-
- if ( pActiveFrame )
- {
- if ( !pPrefered )
- // activate frame
- pActiveFrame->MakeActive_Impl( TRUE );
- }
-
- pImp->bLoadingWindows = FALSE;
- return pPrefered && bLoaded ? pPrefered : pActiveFrame;
-}
-
//====================================================================
void SfxObjectShell::UpdateDocInfoForSave()
@@ -482,13 +230,24 @@ void SfxObjectShell::UpdateDocInfoForSave()
//--------------------------------------------------------------------
+static void
+lcl_add(util::Duration & rDur, Time const& rTime)
+{
+ // here we don't care about overflow: rDur is converted back to seconds
+ // anyway, and Time cannot store more than ~4000 hours
+ rDur.Hours += rTime.GetHour();
+ rDur.Minutes += rTime.GetMin();
+ rDur.Seconds += rTime.GetSec();
+}
+
// Bearbeitungszeit aktualisieren
void SfxObjectShell::UpdateTime_Impl(
const uno::Reference<document::XDocumentProperties> & i_xDocProps)
{
// Get old time from documentinfo
- sal_Int32 secs = i_xDocProps->getEditingDuration();
- Time aOldTime(secs/3600, (secs%3600)/60, secs%60);
+ const sal_Int32 secs = i_xDocProps->getEditingDuration();
+ util::Duration editDuration(sal_False, 0, 0, 0,
+ secs/3600, (secs%3600)/60, secs%60, 0);
// Initialize some local member! Its neccessary for wollow operations!
DateTime aNow ; // Date and time at current moment
@@ -525,13 +284,14 @@ void SfxObjectShell::UpdateTime_Impl(
nAddTime += aNow ;
}
- aOldTime += nAddTime;
+ lcl_add(editDuration, nAddTime);
}
pImp->nTime = aNow;
try {
- i_xDocProps->setEditingDuration(
- aOldTime.GetHour()*3600+aOldTime.GetMin()*60+aOldTime.GetSec());
+ const sal_Int32 newSecs( (editDuration.Hours*3600)
+ + (editDuration.Minutes*60) + editDuration.Seconds);
+ i_xDocProps->setEditingDuration(newSecs);
i_xDocProps->setEditingCycles(i_xDocProps->getEditingCycles() + 1);
}
catch (lang::IllegalArgumentException &)
@@ -962,11 +722,8 @@ BOOL SfxObjectShell::Remove
String aName(pMySheet->GetName());
String aEmpty;
SfxStyleFamily eFamily = pMySheet->GetFamily();
- if (pMySheet)
- {
- pMyPool->Remove(pMySheet);
- bRet = TRUE;
- }
+ pMyPool->Remove(pMySheet);
+ bRet = TRUE;
SfxStyleSheetBase* pTestSheet = pMyPool->First();
while (pTestSheet)
@@ -987,20 +744,10 @@ BOOL SfxObjectShell::Remove
pTestSheet = pMyPool->Next();
}
- if(bRet)
- SetModified( TRUE );
- }
-/*
- else if (nIdx1 == CONTENT_CONFIG)
- {
- if (GetConfigManager()->RemoveItem(nIdx2))
- {
- SetModified(TRUE);
- bRet = TRUE;
- SFX_APP()->GetDispatcher_Impl()->Update_Impl(TRUE);
- }
+
+ SetModified( TRUE );
}
-*/
+
return bRet;
}
diff --git a/sfx2/source/doc/objembed.cxx b/sfx2/source/doc/objembed.cxx
index 7b7a1bea1ea0..1c2105c210b9 100644
--- a/sfx2/source/doc/objembed.cxx
+++ b/sfx2/source/doc/objembed.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: objembed.cxx,v $
- * $Revision: 1.11 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -308,7 +305,7 @@ void SfxObjectShell::DoDraw_Impl( OutputDevice* pDev,
comphelper::EmbeddedObjectContainer& SfxObjectShell::GetEmbeddedObjectContainer() const
{
if ( !pImp->mpObjectContainer )
- pImp->mpObjectContainer = new comphelper::EmbeddedObjectContainer( ((SfxObjectShell*)this)->GetStorage(), pImp->xModel );
+ pImp->mpObjectContainer = new comphelper::EmbeddedObjectContainer( ((SfxObjectShell*)this)->GetStorage(), GetModel() );
return *pImp->mpObjectContainer;
}
diff --git a/sfx2/source/doc/objitem.cxx b/sfx2/source/doc/objitem.cxx
index 6082ce669833..2980d984fd78 100644
--- a/sfx2/source/doc/objitem.cxx
+++ b/sfx2/source/doc/objitem.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: objitem.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/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index 3c78bad9220e..7d931cb6c640 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: objmisc.cxx,v $
- * $Revision: 1.102.104.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -87,7 +84,7 @@
#include <comphelper/configurationhelper.hxx>
#include <com/sun/star/security/XDocumentDigitalSignatures.hpp>
-#include <com/sun/star/task/DocumentMacroConfirmationRequest2.hpp>
+#include <com/sun/star/task/DocumentMacroConfirmationRequest.hpp>
#include <com/sun/star/task/InteractionClassification.hpp>
#include <com/sun/star/frame/XModel.hpp>
@@ -408,17 +405,11 @@ void SfxObjectShell::ModifyChanged()
return;
{DBG_CHKTHIS(SfxObjectShell, 0);}
- SfxObjectShell *pDoc;
- for ( pDoc = SfxObjectShell::GetFirst(); pDoc;
- pDoc = SfxObjectShell::GetNext(*pDoc) )
- if( pDoc->IsModified() )
- break;
SfxViewFrame* pViewFrame = SfxViewFrame::Current();
if ( pViewFrame )
pViewFrame->GetBindings().Invalidate( SID_SAVEDOCS );
-
Invalidate( SID_SIGNATURE );
Invalidate( SID_MACRO_SIGNATURE );
Broadcast( SfxSimpleHint( SFX_HINT_TITLECHANGED ) ); // xmlsec05, signed state might change in title...
@@ -1137,7 +1128,7 @@ void SfxObjectShell::SetProgress_Impl
void SfxObjectShell::PostActivateEvent_Impl( SfxViewFrame* pFrame )
{
SfxApplication* pSfxApp = SFX_APP();
- if ( !pSfxApp->IsDowning() && !IsLoading() && pFrame && !pFrame->GetFrame()->IsClosing_Impl() )
+ if ( !pSfxApp->IsDowning() && !IsLoading() && pFrame && !pFrame->GetFrame().IsClosing_Impl() )
{
SFX_ITEMSET_ARG( pMedium->GetItemSet(), pHiddenItem, SfxBoolItem, SID_HIDDEN, sal_False );
if ( !pHiddenItem || !pHiddenItem->GetValue() )
@@ -1168,7 +1159,6 @@ void SfxObjectShell::RegisterTransfer( SfxMedium& rMedium )
laden, muessen an der zugehoerigen SfxObjectShell angemeldet
werden. So kann dokumentweise abgebrochen werden. */
{
- rMedium.SetCancelManager_Impl( GetMedium()->GetCancelManager_Impl() );
rMedium.SetReferer( GetMedium()->GetName() );
}
@@ -1440,8 +1430,7 @@ void SfxObjectShell::FinishedLoading( sal_uInt16 nFlags )
}
}
- pImp->bInitialized = sal_True;
- SFX_APP()->NotifyEvent( SfxEventHint( SFX_EVENT_LOADFINISHED, GlobalEventConfig::GetEventName(STR_EVENT_LOADFINISHED), this ) );
+ SetInitialized_Impl( false );
// Title is not available until loading has finished
Broadcast( SfxSimpleHint( SFX_HINT_TITLECHANGED ) );
@@ -1560,7 +1549,7 @@ void SfxObjectShell::PositionView_Impl()
sal_Bool SfxObjectShell::IsLoading() const
/* [Beschreibung ]
- Wurde bereits FinishedLoading aufgerufeb? */
+ Has FinishedLoading been called? */
{
return !( pImp->nLoadedFlags & SFX_LOADED_MAINDOCUMENT );
}
@@ -1572,7 +1561,6 @@ void SfxObjectShell::CancelTransfers()
Hier koennen Transfers gecanceled werden, die nicht mit
RegisterTransfer registiert wurden */
{
- GetMedium()->CancelTransfers();
if( ( pImp->nLoadedFlags & SFX_LOADED_ALL ) != SFX_LOADED_ALL )
{
AbortImport();
@@ -2031,12 +2019,6 @@ void SfxObjectShell::SetHeaderAttributesForSourceViewHack()
->SetAttributes();
}
-void SfxObjectShell::StartLoading_Impl()
-{
- pImp->nLoadedFlags = 0;
- pImp->bModelInitialized = sal_False;
-}
-
sal_Bool SfxObjectShell::IsPreview() const
{
if ( !pMedium )
@@ -2112,9 +2094,9 @@ void SfxObjectShell::SetWaitCursor( BOOL bSet ) const
for( SfxViewFrame* pFrame = SfxViewFrame::GetFirst( this ); pFrame; pFrame = SfxViewFrame::GetNext( *pFrame, this ) )
{
if ( bSet )
- pFrame->GetFrame()->GetWindow().EnterWait();
+ pFrame->GetFrame().GetWindow().EnterWait();
else
- pFrame->GetFrame()->GetWindow().LeaveWait();
+ pFrame->GetFrame().GetWindow().LeaveWait();
}
}
@@ -2152,13 +2134,11 @@ Window* SfxObjectShell::GetDialogParent( SfxMedium* pLoadingMedium )
{
Window* pWindow = 0;
SfxItemSet* pSet = pLoadingMedium ? pLoadingMedium->GetItemSet() : GetMedium()->GetItemSet();
- SFX_ITEMSET_ARG( pSet, pUnoItem, SfxUnoAnyItem, SID_FILLFRAME, FALSE );
+ SFX_ITEMSET_ARG( pSet, pUnoItem, SfxUnoFrameItem, SID_FILLFRAME, FALSE );
if ( pUnoItem )
{
- uno::Reference < frame::XFrame > xFrame;
- pUnoItem->GetValue() >>= xFrame;
- if ( xFrame.is() )
- pWindow = VCLUnoHelper::GetWindow( xFrame->getContainerWindow() );
+ uno::Reference < frame::XFrame > xFrame( pUnoItem->GetFrame() );
+ pWindow = VCLUnoHelper::GetWindow( xFrame->getContainerWindow() );
}
if ( !pWindow )
@@ -2176,7 +2156,7 @@ Window* SfxObjectShell::GetDialogParent( SfxMedium* pLoadingMedium )
// get any visible frame
pView = SfxViewFrame::GetFirst(this);
if ( pView )
- pFrame = pView->GetFrame();
+ pFrame = &pView->GetFrame();
}
if ( pFrame )
@@ -2245,7 +2225,7 @@ BOOL SfxObjectShell::IsInPlaceActive()
return FALSE;
SfxViewFrame* pFrame = SfxViewFrame::GetFirst( this );
- return pFrame && pFrame->GetFrame()->IsInPlace();
+ return pFrame && pFrame->GetFrame().IsInPlace();
}
BOOL SfxObjectShell::IsUIActive()
@@ -2254,7 +2234,7 @@ BOOL SfxObjectShell::IsUIActive()
return FALSE;
SfxViewFrame* pFrame = SfxViewFrame::GetFirst( this );
- return pFrame && pFrame->GetFrame()->IsInPlace() && pFrame->GetFrame()->GetWorkWindow_Impl()->IsVisible_Impl();
+ return pFrame && pFrame->GetFrame().IsInPlace() && pFrame->GetFrame().GetWorkWindow_Impl()->IsVisible_Impl();
}
void SfxObjectShell::UIActivate( BOOL )
@@ -2458,9 +2438,9 @@ sal_Bool SfxObjectShell_Impl::hasTrustedScriptingSignature( sal_Bool bAllowUIToA
if ( xInteraction.is() )
{
- task::DocumentMacroConfirmationRequest2 aRequest;
+ task::DocumentMacroConfirmationRequest aRequest;
aRequest.DocumentURL = getDocumentLocation();
- aRequest.DocumentZipStorage = rDocShell.GetMedium()->GetZipStorageToSign_Impl();
+ aRequest.DocumentStorage = rDocShell.GetMedium()->GetZipStorageToSign_Impl();
aRequest.DocumentSignatureInformation = aInfo;
aRequest.DocumentVersion = aVersion;
aRequest.Classification = task::InteractionClassification_QUERY;
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index fb555c5edeec..c063546da1c7 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: objserv.cxx,v $
- * $Revision: 1.106 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -88,7 +85,7 @@
#include "sfxtypes.hxx"
//#include "interno.hxx"
#include <sfx2/module.hxx>
-#include <sfx2/topfrm.hxx>
+#include <sfx2/viewfrm.hxx>
#include "versdlg.hxx"
#include "doc.hrc"
#include <sfx2/docfac.hxx>
@@ -140,8 +137,6 @@ public:
#define SfxObjectShell
#include "sfxslots.hxx"
-svtools::AsynchronLink* pPendingCloser = 0;
-
//=========================================================================
@@ -283,7 +278,7 @@ void SfxObjectShell::PrintExec_Impl(SfxRequest &rReq)
void SfxObjectShell::PrintState_Impl(SfxItemSet &rSet)
{
bool bPrinting = false;
- SfxViewFrame *pFrame = SfxViewFrame::GetFirst(this, TYPE(SfxTopViewFrame));
+ SfxViewFrame* pFrame = SfxViewFrame::GetFirst( this );
if ( pFrame )
{
SfxPrinter *pPrinter = pFrame->GetViewShell()->GetPrinter();
@@ -391,7 +386,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
if ( !pFrame )
return;
- if ( pFrame->GetFrame()->GetParentFrame() )
+ if ( pFrame->GetFrame().GetParentFrame() )
{
pFrame->GetTopViewFrame()->GetObjectShell()->ExecuteSlot( rReq );
return;
@@ -430,28 +425,15 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
// collect data for dialog
String aURL, aTitle;
- if ( HasName() && !pImp->aNewName.Len() )
+ if ( HasName() )
{
aURL = GetMedium()->GetName();
aTitle = GetTitle();
}
else
{
- if ( !pImp->aNewName.Len() )
- {
- aURL = DEFINE_CONST_UNICODE( "private:factory/" );
- aURL += String::CreateFromAscii( GetFactory().GetShortName() );
- // aTitle = String( SfxResId( STR_NONAME ) );
- }
- else
- {
- aURL = DEFINE_CONST_UNICODE( "[private:factory/" );
- aURL += String::CreateFromAscii( GetFactory().GetShortName() );
- aURL += DEFINE_CONST_UNICODE( "]" );
- INetURLObject aURLObj( pImp->aNewName );
- aURL += String(aURLObj.GetMainURL( INetURLObject::DECODE_TO_IURI ));
- // aTitle = aURLObj.GetBase();
- }
+ aURL = DEFINE_CONST_UNICODE( "private:factory/" );
+ aURL += String::CreateFromAscii( GetFactory().GetShortName() );
aTitle = GetTitle();
}
@@ -542,10 +524,10 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
// get statusindicator
uno::Reference< task::XStatusIndicator > xStatusIndicator;
SfxViewFrame *pFrame = GetFrame();
- if ( pFrame && pFrame->GetFrame() )
+ if ( pFrame )
{
uno::Reference< task::XStatusIndicatorFactory > xStatFactory(
- pFrame->GetFrame()->GetFrameInterface(),
+ pFrame->GetFrame().GetFrameInterface(),
uno::UNO_QUERY );
if( xStatFactory.is() )
xStatusIndicator = xStatFactory->createStatusIndicator();
@@ -665,9 +647,8 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
&& pFilt->GetVersion() >= SOFFICE_FILEFORMAT_60 )
{
SfxViewFrame* pDocViewFrame = SfxViewFrame::GetFirst( this );
- SfxFrame* pDocFrame = pDocViewFrame ? pDocViewFrame->GetFrame() : NULL;
- if ( pDocFrame )
- SfxHelp::OpenHelpAgent( pDocFrame, HID_DID_SAVE_PACKED_XML );
+ if ( pDocViewFrame )
+ SfxHelp::OpenHelpAgent( &pDocViewFrame->GetFrame(), HID_DID_SAVE_PACKED_XML );
}
// the StoreAsURL/StoreToURL method have called this method with false
@@ -731,7 +712,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
case SID_CLOSEDOC:
{
SfxViewFrame *pFrame = GetFrame();
- if ( pFrame && pFrame->GetFrame()->GetParentFrame() )
+ if ( pFrame && pFrame->GetFrame().GetParentFrame() )
{
// Wenn SID_CLOSEDOC "uber Menue etc. ausgef"uhrt wird, das
// aktuelle Dokument aber in einem Frame liegt, soll eigentlich
@@ -746,7 +727,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
pFrame = SfxViewFrame::GetFirst( this );
while ( pFrame )
{
- if ( pFrame->GetFrame()->GetParentFrame() )
+ if ( pFrame->GetFrame().GetParentFrame() )
{
// Auf dieses Dokument existiert noch eine Sicht, die
// in einem FrameSet liegt; diese darf nat"urlich nicht
@@ -765,8 +746,8 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
pFrame = SfxViewFrame::GetFirst( this );
while ( pFrame )
{
- if ( !pFrame->GetFrame()->GetParentFrame() )
- pFrame->GetFrame()->DoClose();
+ if ( !pFrame->GetFrame().GetParentFrame() )
+ pFrame->GetFrame().DoClose();
pFrame = SfxViewFrame::GetNext( *pFrame, this );
}
}
@@ -940,7 +921,7 @@ void SfxObjectShell::GetState_Impl(SfxItemSet &rSet)
pFrame = SfxViewFrame::GetFirst( this );
if ( pFrame )
{
- if ( pFrame->GetFrame()->GetParentFrame() )
+ if ( pFrame->GetFrame().GetParentFrame() )
{
pFrame = pFrame->GetTopViewFrame();
pDoc = pFrame->GetObjectShell();
@@ -973,7 +954,7 @@ void SfxObjectShell::GetState_Impl(SfxItemSet &rSet)
{
SfxObjectShell *pDoc = this;
SfxViewFrame *pFrame = GetFrame();
- if ( pFrame && pFrame->GetFrame()->GetParentFrame() )
+ if ( pFrame && pFrame->GetFrame().GetParentFrame() )
{
// Wenn SID_CLOSEDOC "uber Menue etc. ausgef"uhrt wird, das
// aktuelle Dokument aber in einem Frame liegt, soll eigentlich
@@ -1193,7 +1174,7 @@ void SfxObjectShell::StateProps_Impl(SfxItemSet &rSet)
case SID_CLOSING:
{
- rSet.Put( SfxBoolItem( SID_CLOSING, Get_Impl()->bInCloseEvent ) );
+ rSet.Put( SfxBoolItem( SID_CLOSING, false ) );
break;
}
@@ -1218,10 +1199,9 @@ void SfxObjectShell::ExecView_Impl(SfxRequest &rReq)
{
case SID_ACTIVATE:
{
- SfxViewFrame *pFrame =
- SfxViewFrame::GetFirst( this, TYPE(SfxTopViewFrame), TRUE );
+ SfxViewFrame *pFrame = SfxViewFrame::GetFirst( this, TRUE );
if ( pFrame )
- pFrame->GetFrame()->Appear();
+ pFrame->GetFrame().Appear();
rReq.SetReturnValue( SfxObjectItem( 0, pFrame ) );
rReq.Done();
break;
@@ -1262,21 +1242,13 @@ sal_uInt16 SfxObjectShell::ImplCheckSignaturesInformation( const uno::Sequence<
bool bCompleteSignature = true;
if( nInfos )
{
- //These errors of certificates are allowed
- sal_Int32 nNonErrors = security::CertificateValidity::VALID |
- security::CertificateValidity::UNKNOWN_REVOKATION;
- //Build a mask to filter out the allowed errors
- sal_Int32 nMask = ~nNonErrors;
-
nResult = SIGNATURESTATE_SIGNATURES_OK;
for ( int n = 0; n < nInfos; n++ )
{
if ( bCertValid )
{
sal_Int32 nCertStat = aInfos[n].CertificateStatus;
- // "subtract" the allowed error flags from the result
- sal_Int32 nErrors = ( nCertStat & nMask );
- bCertValid = nErrors > 0 ? sal_False : sal_True;
+ bCertValid = nCertStat == security::CertificateValidity::VALID ? sal_True : sal_False;
}
if ( !aInfos[n].SignatureIsValid )
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index ead9a7c9fd9a..6d8deb85b687 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: objstor.cxx,v $
- * $Revision: 1.212.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -211,31 +208,6 @@ sal_Bool GetPasswd_Impl( const SfxItemSet* pSet, ::rtl::OUString& rPasswd )
}
//-------------------------------------------------------------------------
-sal_Bool SfxObjectShell::NoDependencyFromManifest_Impl( const uno::Reference< embed::XStorage >& xStorage )
-{
- uno::Sequence< ::rtl::OUString > aElements = xStorage->getElementNames();
- for ( sal_Int32 nInd = 0; nInd < aElements.getLength(); nInd++ )
- {
- if ( xStorage->isStorageElement( aElements[nInd] ) )
- {
- // if there are other standard elements that do not need manifest.xml the following
- // list can be extended
- if ( !aElements[nInd].equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Pictures" ) ) )
- && !aElements[nInd].equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Configurations" ) ) )
- && !aElements[nInd].equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Configurations2" ) ) )
- && !aElements[nInd].equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Thumbnails" ) ) )
- && !aElements[nInd].equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Basic" ) ) ) )
- {
- // the substorage is not know as one that does not need manifest.xml
- return sal_False;
- }
- }
- }
-
- return sal_True;
-}
-
-//-------------------------------------------------------------------------
sal_Bool SfxObjectShell::PutURLContentsToVersionStream_Impl(
::rtl::OUString aURL,
const uno::Reference< embed::XStorage >& xDocStorage,
@@ -447,23 +419,6 @@ sal_Bool SfxObjectShell::Load( SfxMedium& rMedium )
return GeneralInit_Impl( rMedium.GetStorage(), sal_True );
}
-//-------------------------------------------------------------------------
-sal_Bool SfxObjectShell::DoInitNew_Impl( const ::rtl::OUString& rName )
-
-/* [Beschreibung]
-*/
-
-{
- if ( rName.getLength() )
- {
- DBG_ERROR( "This code is intended to be removed, the caller part must be checked!\n" );
- return DoInitNew(0);
- }
- else
- return DoInitNew(0);
-}
-
-
sal_Bool SfxObjectShell::DoInitNew( SfxMedium* pMed )
/* [Beschreibung]
@@ -518,9 +473,7 @@ sal_Bool SfxObjectShell::DoInitNew( SfxMedium* pMed )
impl_addToModelCollection(xModel);
}
- pImp->bInitialized = sal_True;
- SetActivateEvent_Impl( SFX_EVENT_CREATEDOC );
- SFX_APP()->NotifyEvent( SfxEventHint( SFX_EVENT_DOCCREATED, GlobalEventConfig::GetEventName(STR_EVENT_DOCCREATED), this ) );
+ SetInitialized_Impl( true );
return sal_True;
}
@@ -869,7 +822,7 @@ sal_Bool SfxObjectShell::DoLoad( SfxMedium *pMed )
::rtl::Reference< ::comphelper::OInteractionRequest > pRequest = new ::comphelper::OInteractionRequest( makeAny( aUpdateRequest ) );
pRequest->addContinuation( new ::comphelper::OInteractionApprove );
- pRequest->addContinuation( new ::comphelper::OInteractionDisapprove );
+ pRequest->addContinuation( new ::comphelper::OInteractionAbort );
typedef ::comphelper::OInteraction< XInteractionAskLater > OInteractionAskLater;
OInteractionAskLater* pLater = new OInteractionAskLater;
@@ -952,27 +905,27 @@ sal_uInt32 SfxObjectShell::HandleFilter( SfxMedium* pMedium, SfxObjectShell* pDo
if ( !pFORequest->isAbort() )
{
- SfxAllItemSet aNewParams( pDoc->GetPool() );
- TransformParameters( SID_OPENDOC,
- pFORequest->getFilterOptions(),
- aNewParams,
- NULL );
-
- SFX_ITEMSET_ARG( &aNewParams,
- pFilterOptions,
- SfxStringItem,
- SID_FILE_FILTEROPTIONS,
- sal_False );
- if ( pFilterOptions )
- pSet->Put( *pFilterOptions );
-
- SFX_ITEMSET_ARG( &aNewParams,
- pFilterData,
- SfxUnoAnyItem,
- SID_FILTER_DATA,
- sal_False );
- if ( pFilterData )
- pSet->Put( *pFilterData );
+ SfxAllItemSet aNewParams( pDoc->GetPool() );
+ TransformParameters( SID_OPENDOC,
+ pFORequest->getFilterOptions(),
+ aNewParams,
+ NULL );
+
+ SFX_ITEMSET_ARG( &aNewParams,
+ pFilterOptions,
+ SfxStringItem,
+ SID_FILE_FILTEROPTIONS,
+ sal_False );
+ if ( pFilterOptions )
+ pSet->Put( *pFilterOptions );
+
+ SFX_ITEMSET_ARG( &aNewParams,
+ pFilterData,
+ SfxUnoAnyItem,
+ SID_FILTER_DATA,
+ sal_False );
+ if ( pFilterData )
+ pSet->Put( *pFilterData );
}
else
bAbort = TRUE;
@@ -1796,14 +1749,14 @@ sal_Bool SfxObjectShell::SaveTo_Impl
#define CHAR_POINTER(THE_OUSTRING) ::rtl::OUStringToOString (THE_OUSTRING, RTL_TEXTENCODING_UTF8).pData->buffer
// Header for a single-valued ASCII EA data item
typedef struct _EA_ASCII_header {
- USHORT usAttr; /* value: EAT_ASCII */
- USHORT usLen; /* length of data */
- CHAR szType[_MAX_PATH]; /* ASCII data fits in here ... */
+ USHORT usAttr; /* value: EAT_ASCII */
+ USHORT usLen; /* length of data */
+ CHAR szType[_MAX_PATH]; /* ASCII data fits in here ... */
} EA_ASCII_HEADER;
- char filePath[_MAX_PATH];
- char fileExt[_MAX_PATH];
- char docType[_MAX_PATH];
- int rc;
+ char filePath[_MAX_PATH];
+ char fileExt[_MAX_PATH];
+ char docType[_MAX_PATH];
+ int rc;
oslFileError eRet;
::rtl::OUString aSystemFileURL;
const ::rtl::OUString aFileURL = rMedium.GetName();
@@ -2818,7 +2771,6 @@ sal_Bool SfxObjectShell::CommonSaveAs_Impl
pSet->ClearItem( SID_OPTIONS );
//pSet->ClearItem( SID_FILE_FILTEROPTIONS );
pSet->ClearItem( SID_VERSION );
- //pSet->ClearItem( SID_USE_FILTEROPTIONS );
pSet->ClearItem( SID_EDITDOC );
pSet->ClearItem( SID_OVERWRITE );
pSet->ClearItem( SID_DEFAULTFILEPATH );
@@ -3435,7 +3387,7 @@ sal_Bool SfxObjectShell::SaveCompleted( const uno::Reference< embed::XStorage >&
sal_Bool StoragesOfUnknownMediaTypeAreCopied_Impl( const uno::Reference< embed::XStorage >& xSource,
- const uno::Reference< embed::XStorage >& xTarget )
+ const uno::Reference< embed::XStorage >& xTarget )
{
OSL_ENSURE( xSource.is() && xTarget.is(), "Source and/or target storages are not available!\n" );
if ( !xSource.is() || !xTarget.is() || xSource == xTarget )
diff --git a/sfx2/source/doc/objuno.cxx b/sfx2/source/doc/objuno.cxx
index eb022afc60df..466f8dd43104 100644
--- a/sfx2/source/doc/objuno.cxx
+++ b/sfx2/source/doc/objuno.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: objuno.cxx,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/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index 91c0f605e453..6502eeaeb78c 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: objxtor.cxx,v $
- * $Revision: 1.85 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -65,6 +62,7 @@
#include <sfx2/objsh.hxx>
#include <sfx2/signaturestate.hxx>
+#include <sfx2/sfxmodelfactory.hxx>
#ifndef _BASIC_SBUNO_HXX
#include <basic/sbuno.hxx>
@@ -134,7 +132,6 @@ DBG_NAME(SfxObjectShell)
#define DocumentInfo
#include "sfxslots.hxx"
-extern svtools::AsynchronLink* pPendingCloser;
static WeakReference< XInterface > s_xCurrentComponent;
//=========================================================================
@@ -189,9 +186,7 @@ TYPEINIT1(SfxObjectShell, SfxShell);
//--------------------------------------------------------------------
SfxObjectShell_Impl::SfxObjectShell_Impl( SfxObjectShell& _rDocShell )
-:mpObjectContainer(0)
- ,pAccMgr(0)
- ,pCfgMgr( 0)
+ :mpObjectContainer(0)
,pBasicManager( new SfxBasicManagerHolder )
,rDocShell( _rDocShell )
,aMacroMode( *this )
@@ -200,10 +195,8 @@ SfxObjectShell_Impl::SfxObjectShell_Impl( SfxObjectShell& _rDocShell )
,nVisualDocumentNumber( USHRT_MAX)
,nDocumentSignatureState( SIGNATURESTATE_UNKNOWN )
,nScriptingSignatureState( SIGNATURESTATE_UNKNOWN )
- ,bTemplateConfig( sal_False)
,bInList( sal_False)
,bClosing( sal_False)
- ,bSetInPlaceObj( sal_False)
,bIsSaving( sal_False)
,bPasswd( sal_False)
,bIsTmp( sal_False)
@@ -213,15 +206,9 @@ SfxObjectShell_Impl::SfxObjectShell_Impl( SfxObjectShell& _rDocShell )
,bImportDone ( sal_False)
,bInPrepareClose( sal_False )
,bPreparedForClose( sal_False )
- ,bWaitingForPicklist( sal_False )
- ,bModuleSearched( sal_False )
- ,bIsHelpObjSh( sal_False )
- ,bForbidCaching( sal_False )
+ ,bWaitingForPicklist( sal_True )
,bForbidReload( sal_False )
- ,bSupportsEventMacros( sal_True )
- ,bLoadingWindows( sal_False )
,bBasicInitialized( sal_False )
-// ,bHidden( sal_False )
,bIsPrintJobCancelable( sal_True )
,bOwnsStorage( sal_True )
,bNoBaseURL( sal_False )
@@ -231,6 +218,7 @@ SfxObjectShell_Impl::SfxObjectShell_Impl( SfxObjectShell& _rDocShell )
,bPreserveVersions( sal_True )
,m_bMacroSignBroken( sal_False )
,m_bNoBasicCapabilities( sal_False )
+ ,m_bDocRecoverySupport( sal_True )
,bQueryLoadTemplate( sal_True )
,bLoadReadonly( sal_False )
,bUseUserData( sal_True )
@@ -239,46 +227,62 @@ SfxObjectShell_Impl::SfxObjectShell_Impl( SfxObjectShell& _rDocShell )
,m_bAllowShareControlFileClean( sal_True )
,lErr(ERRCODE_NONE)
,nEventId ( 0)
- ,bDoNotTouchDocInfo( sal_False )
,pReloadTimer ( 0)
,pMarkData( 0 )
- ,nLoadedFlags ( SFX_LOADED_MAINDOCUMENT )
+ ,nLoadedFlags ( SFX_LOADED_ALL )
,nFlagsInProgress( 0 )
- ,bInFrame( sal_False )
,bModalMode( sal_False )
,bRunningMacro( sal_False )
,bReloadAvailable( sal_False )
,nAutoLoadLocks( 0 )
,pModule( 0 )
- ,pFrame( 0 )
- ,pTbxConfig( 0 )
,eFlags( SFXOBJECTSHELL_UNDEFINED )
- ,pCloser( 0 )
,bReadOnlyUI( sal_False )
,bHiddenLockedByAPI( sal_False )
- ,bInCloseEvent( sal_False )
,nStyleFilter( 0 )
,bDisposing( sal_False )
,m_bEnableSetModified( sal_True )
,m_bIsModified( sal_False )
,m_nMapUnit( MAP_100TH_MM )
,m_bCreateTempStor( sal_False )
- ,m_xDocInfoListener()
,m_bIsInit( sal_False )
,m_bIncomplEncrWarnShown( sal_False )
{
+ SfxObjectShell* pDoc = &_rDocShell;
+ SfxObjectShellArr_Impl &rArr = SFX_APP()->GetObjectShells_Impl();
+ rArr.C40_INSERT( SfxObjectShell, pDoc, rArr.Count() );
+ bInList = sal_True;
}
//--------------------------------------------------------------------
SfxObjectShell_Impl::~SfxObjectShell_Impl()
{
- if ( pPendingCloser == pCloser )
- pPendingCloser = 0;
- delete pCloser;
delete pBasicManager;
}
+//--------------------------------------------------------------------
+
+SfxObjectShell::SfxObjectShell( const sal_uInt64 i_nCreationFlags )
+ : pImp( new SfxObjectShell_Impl( *this ) )
+ , pMedium(0)
+ , pStyleSheetPool(0)
+ , eCreateMode( ( i_nCreationFlags & SFXMODEL_EMBEDDED_OBJECT ) ? SFX_CREATE_MODE_EMBEDDED : SFX_CREATE_MODE_STANDARD )
+ , bHasName( sal_False )
+{
+ DBG_CTOR(SfxObjectShell, 0);
+
+ const bool bScriptSupport = ( i_nCreationFlags & SFXMODEL_DISABLE_EMBEDDED_SCRIPTS ) == 0;
+ if ( !bScriptSupport )
+ SetHasNoBasic();
+
+ const bool bDocRecovery = ( i_nCreationFlags & SFXMODEL_DISABLE_DOCUMENT_RECOVERY ) == 0;
+ if ( !bDocRecovery )
+ pImp->m_bDocRecoverySupport = sal_False;
+}
+
+//--------------------------------------------------------------------
+
// initializes a document from a file-description
SfxObjectShell::SfxObjectShell
@@ -312,24 +316,10 @@ SfxObjectShell::SfxObjectShell
: pImp( new SfxObjectShell_Impl( *this ) ),
pMedium(0),
pStyleSheetPool(0),
- eCreateMode(eMode)
+ eCreateMode(eMode),
+ bHasName( sal_False )
{
DBG_CTOR(SfxObjectShell, 0);
-
- bHasName = sal_False;
- nViewNo = 0;
-
- pImp->bWaitingForPicklist = sal_True;
-
- // Aggregation InPlaceObject+Automation
-//(mba) AddInterface( SvDispatch::ClassFactory() );
-
- SfxObjectShell *pThis = this;
- SfxObjectShellArr_Impl &rArr = SFX_APP()->GetObjectShells_Impl();
- rArr.C40_INSERT( SfxObjectShell, pThis, rArr.Count() );
- pImp->bInList = sal_True;
- pImp->nLoadedFlags = SFX_LOADED_ALL;
-//REMOVE SetObjectShell( TRUE );
}
//--------------------------------------------------------------------
@@ -347,12 +337,8 @@ SfxObjectShell::~SfxObjectShell()
// Ableitungszweig SfxInternObject ist wegen eines Compiler Bugs nicht
// erlaubt
SfxObjectShell::Close();
- pImp->xModel = NULL;
+ pImp->pBaseModel.set( NULL );
-// DELETEX(pImp->pEventConfig);
-// DELETEX(pImp->pTbxConfig);
-// DELETEX(pImp->pAccMgr);
-// DELETEX(pImp->pCfgMgr);
DELETEX(pImp->pReloadTimer );
SfxApplication *pSfxApp = SFX_APP();
@@ -365,8 +351,7 @@ SfxObjectShell::~SfxObjectShell()
if ( pSfxApp->GetDdeService() )
pSfxApp->RemoveDdeTopic( this );
- if ( pImp->xModel.is() )
- pImp->xModel = ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > ();
+ pImp->pBaseModel.set( NULL );
// don't call GetStorage() here, in case of Load Failure it's possible that a storage was never assigned!
if ( pMedium && pMedium->HasStorage_Impl() && pMedium->GetStorage( sal_False ) == pImp->m_xDocStorage )
@@ -492,7 +477,7 @@ SfxObjectShell* SfxObjectShell::GetFirst
continue;
if ( ( !pType || pSh->IsA(*pType) ) &&
- ( !bOnlyVisible || SfxViewFrame::GetFirst( pSh, 0, sal_True )))
+ ( !bOnlyVisible || SfxViewFrame::GetFirst( pSh, sal_True )))
return pSh;
}
@@ -525,7 +510,7 @@ SfxObjectShell* SfxObjectShell::GetNext
continue;
if ( ( !pType || pSh->IsA(*pType) ) &&
- ( !bOnlyVisible || SfxViewFrame::GetFirst( pSh, 0, sal_True )))
+ ( !bOnlyVisible || SfxViewFrame::GetFirst( pSh, sal_True )))
return pSh;
}
return 0;
@@ -565,12 +550,11 @@ sal_uInt16 SfxObjectShell::PrepareClose
return sal_False;
SfxViewFrame* pFirst = SfxViewFrame::GetFirst( this );
- if( pFirst && !pFirst->GetFrame()->PrepareClose_Impl( bUI, bForBrowsing ) )
+ if( pFirst && !pFirst->GetFrame().PrepareClose_Impl( bUI, bForBrowsing ) )
return sal_False;
// prepare views for closing
- for ( SfxViewFrame* pFrm = SfxViewFrame::GetFirst(
- this, TYPE(SfxViewFrame));
+ for ( SfxViewFrame* pFrm = SfxViewFrame::GetFirst( this );
pFrm; pFrm = SfxViewFrame::GetNext( *pFrm, this ) )
{
DBG_ASSERT(pFrm->GetViewShell(),"KeineShell");
@@ -595,83 +579,69 @@ sal_uInt16 SfxObjectShell::PrepareClose
// nur fuer in sichtbaren Fenstern dargestellte Dokumente fragen
SfxViewFrame *pFrame = SfxObjectShell::Current() == this
? SfxViewFrame::Current() : SfxViewFrame::GetFirst( this );
- while ( pFrame && (pFrame->GetFrameType() & SFXFRAME_SERVER ) )
- pFrame = SfxViewFrame::GetNext( *pFrame, this );
sal_Bool bClose = sal_False;
- if ( bUI && IsModified() )
+ if ( bUI && IsModified() && pFrame )
{
- if ( pFrame )
+ // minimierte restoren
+ SfxFrame& rTop = pFrame->GetTopFrame();
+ SfxViewFrame::SetViewFrame( rTop.GetCurrentViewFrame() );
+ pFrame->GetFrame().Appear();
+
+ // fragen, ob gespeichert werden soll
+ short nRet = RET_YES;
+ //TODO/CLEANUP
+ //brauchen wir UI=2 noch?
+ //if( SfxApplication::IsPlugin() == sal_False || bUI == 2 )
{
- // minimierte restoren
- SfxFrame* pTop = pFrame->GetTopFrame();
- SfxViewFrame::SetViewFrame( pTop->GetCurrentViewFrame() );
- pFrame->GetFrame()->Appear();
-
- // fragen, ob gespeichert werden soll
- short nRet = RET_YES;
- //TODO/CLEANUP
- //brauchen wir UI=2 noch?
- //if( SfxApplication::IsPlugin() == sal_False || bUI == 2 )
+ //initiate help agent to inform about "print modifies the document"
+ SvtPrintWarningOptions aPrintOptions;
+ if (aPrintOptions.IsModifyDocumentOnPrintingAllowed() &&
+ HasName() && getDocProperties()->getPrintDate().Month > 0)
{
- //initiate help agent to inform about "print modifies the document"
- SvtPrintWarningOptions aPrintOptions;
- if (aPrintOptions.IsModifyDocumentOnPrintingAllowed() &&
- HasName() && getDocProperties()->getPrintDate().Month > 0)
- {
- SfxHelp::OpenHelpAgent(pFirst->GetFrame(), HID_CLOSE_WARNING);
- }
- const Reference< XTitle > xTitle(pImp->xModel, UNO_QUERY_THROW);
- const ::rtl::OUString sTitle = xTitle->getTitle ();
- nRet = ExecuteQuerySaveDocument(&pFrame->GetWindow(),sTitle);
+ SfxHelp::OpenHelpAgent( &pFirst->GetFrame(), HID_CLOSE_WARNING );
}
- /*HACK for plugin::destroy()*/
+ const Reference< XTitle > xTitle( *pImp->pBaseModel.get(), UNO_QUERY_THROW );
+ const ::rtl::OUString sTitle = xTitle->getTitle ();
+ nRet = ExecuteQuerySaveDocument(&pFrame->GetWindow(),sTitle);
+ }
+ /*HACK for plugin::destroy()*/
- if ( RET_YES == nRet )
+ if ( RET_YES == nRet )
+ {
+ // per Dispatcher speichern
+ const SfxPoolItem *pPoolItem;
+ if ( IsSaveVersionOnClose() )
{
- // per Dispatcher speichern
- const SfxPoolItem *pPoolItem;
- if ( IsSaveVersionOnClose() )
- {
- SfxStringItem aItem( SID_DOCINFO_COMMENTS, String( SfxResId( STR_AUTOMATICVERSION ) ) );
- SfxBoolItem aWarnItem( SID_FAIL_ON_WARNING, bUI );
- const SfxPoolItem* ppArgs[] = { &aItem, &aWarnItem, 0 };
- pPoolItem = pFrame->GetBindings().ExecuteSynchron( SID_SAVEDOC, ppArgs );
- }
- else
- {
- SfxBoolItem aWarnItem( SID_FAIL_ON_WARNING, bUI );
- const SfxPoolItem* ppArgs[] = { &aWarnItem, 0 };
- pPoolItem = pFrame->GetBindings().ExecuteSynchron( SID_SAVEDOC, ppArgs );
- }
-
- if ( !pPoolItem || pPoolItem->ISA(SfxVoidItem) || ( pPoolItem->ISA(SfxBoolItem) && !( (const SfxBoolItem*) pPoolItem )->GetValue() ) )
- return sal_False;
- else
- bClose = sal_True;
+ SfxStringItem aItem( SID_DOCINFO_COMMENTS, String( SfxResId( STR_AUTOMATICVERSION ) ) );
+ SfxBoolItem aWarnItem( SID_FAIL_ON_WARNING, bUI );
+ const SfxPoolItem* ppArgs[] = { &aItem, &aWarnItem, 0 };
+ pPoolItem = pFrame->GetBindings().ExecuteSynchron( SID_SAVEDOC, ppArgs );
}
- else if ( RET_CANCEL == nRet )
- // abgebrochen
- return sal_False;
- else if ( RET_NEWTASK == nRet )
+ else
{
- return RET_NEWTASK;
+ SfxBoolItem aWarnItem( SID_FAIL_ON_WARNING, bUI );
+ const SfxPoolItem* ppArgs[] = { &aWarnItem, 0 };
+ pPoolItem = pFrame->GetBindings().ExecuteSynchron( SID_SAVEDOC, ppArgs );
}
+
+ if ( !pPoolItem || pPoolItem->ISA(SfxVoidItem) || ( pPoolItem->ISA(SfxBoolItem) && !( (const SfxBoolItem*) pPoolItem )->GetValue() ) )
+ return sal_False;
else
- {
- // Bei Nein nicht noch Informationlost
bClose = sal_True;
- }
}
- }
-
- // ggf. hinweisen, da\s unter Fremdformat gespeichert
- if( pMedium )
- {
- SFX_ITEMSET_ARG( pMedium->GetItemSet(), pIgnoreInformationLost,
- SfxBoolItem, SID_DOC_IGNOREINFORMATIONLOST, sal_False);
- if( pIgnoreInformationLost && pIgnoreInformationLost->GetValue() )
- bUI = sal_False;
+ else if ( RET_CANCEL == nRet )
+ // abgebrochen
+ return sal_False;
+ else if ( RET_NEWTASK == nRet )
+ {
+ return RET_NEWTASK;
+ }
+ else
+ {
+ // Bei Nein nicht noch Informationlost
+ bClose = sal_True;
+ }
}
pImp->bPreparedForClose = sal_True;
@@ -865,20 +835,6 @@ sal_Bool SfxObjectShell::DoClose()
//--------------------------------------------------------------------
-void SfxObjectShell::SetLastMark_Impl( const String &rMark )
-{
- pImp->aMark = rMark;
-}
-
-//--------------------------------------------------------------------
-
-const String& SfxObjectShell::GetLastMark_Impl() const
-{
- return pImp->aMark;
-}
-
-//--------------------------------------------------------------------
-
SfxObjectShell* SfxObjectShell::GetObjectShell()
{
return this;
@@ -903,45 +859,28 @@ SEQUENCE< OUSTRING > SfxObjectShell::GetEventNames()
return *pEventNameContainer;
}
-SEQUENCE< OUSTRING > SfxObjectShell::GetEventNames_Impl()
-{
- if (!pImp->xEventNames.getLength())
- pImp->xEventNames = GetEventNames();
- return pImp->xEventNames;
-}
-
//--------------------------------------------------------------------
-void SfxObjectShell::SetModel( SfxBaseModel* pModel )
+::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > SfxObjectShell::GetModel() const
{
- OSL_ENSURE( !pImp->xModel.is() || pModel == NULL, "Model already set!" );
- pImp->xModel = pModel;
- if ( pModel ) {
- pModel->addCloseListener( new SfxModelListener_Impl(this) );
- //pImp->m_xDocInfoListener = new SfxDocInfoListener_Impl(*this);
- //uno::Reference<util::XModifyBroadcaster> xMB(
- // pModel->getDocumentProperties(), uno::UNO_QUERY_THROW);
- //xMB->addModifyListener(pImp->m_xDocInfoListener);
- }
-}
-
-//--------------------------------------------------------------------
-
-const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& SfxObjectShell::GetModel() const
-{
- return pImp->xModel;
+ return GetBaseModel();
}
void SfxObjectShell::SetBaseModel( SfxBaseModel* pModel )
{
- SetModel(pModel);
+ OSL_ENSURE( !pImp->pBaseModel.is() || pModel == NULL, "Model already set!" );
+ pImp->pBaseModel.set( pModel );
+ if ( pImp->pBaseModel.is() )
+ {
+ pImp->pBaseModel->addCloseListener( new SfxModelListener_Impl(this) );
+ }
}
//--------------------------------------------------------------------
-::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > SfxObjectShell::GetBaseModel()
+::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > SfxObjectShell::GetBaseModel() const
{
- return pImp->xModel;
+ return pImp->pBaseModel.get();
}
/* -----------------------------10.09.2001 15:56------------------------------
@@ -1122,3 +1061,16 @@ SfxObjectShell* SfxObjectShell::CreateAndLoadObject( const SfxItemSet& rSet, Sfx
return NULL;
}
+void SfxObjectShell::SetInitialized_Impl( const bool i_fromInitNew )
+{
+ pImp->bInitialized = sal_True;
+ if ( i_fromInitNew )
+ {
+ SetActivateEvent_Impl( SFX_EVENT_CREATEDOC );
+ SFX_APP()->NotifyEvent( SfxEventHint( SFX_EVENT_DOCCREATED, GlobalEventConfig::GetEventName(STR_EVENT_DOCCREATED), this ) );
+ }
+ else
+ {
+ SFX_APP()->NotifyEvent( SfxEventHint( SFX_EVENT_LOADFINISHED, GlobalEventConfig::GetEventName(STR_EVENT_LOADFINISHED), this ) );
+ }
+}
diff --git a/sfx2/source/doc/oleprops.cxx b/sfx2/source/doc/oleprops.cxx
index d2146a5e2d68..d6192542d1a1 100755
--- a/sfx2/source/doc/oleprops.cxx
+++ b/sfx2/source/doc/oleprops.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: oleprops.cxx,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/sfx2/source/doc/oleprops.hxx b/sfx2/source/doc/oleprops.hxx
index 4219a52a3730..5bd586576ac8 100755
--- a/sfx2/source/doc/oleprops.hxx
+++ b/sfx2/source/doc/oleprops.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: oleprops.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/sfx2/source/doc/opostponedtruncationstream.cxx b/sfx2/source/doc/opostponedtruncationstream.cxx
index ddcf38d50483..84b1d6a3906a 100644
--- a/sfx2/source/doc/opostponedtruncationstream.cxx
+++ b/sfx2/source/doc/opostponedtruncationstream.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: opostponedtruncationstream.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/sfx2/source/doc/opostponedtruncationstream.hxx b/sfx2/source/doc/opostponedtruncationstream.hxx
index 6a43d6dcd48a..fe67319fbbe0 100644
--- a/sfx2/source/doc/opostponedtruncationstream.hxx
+++ b/sfx2/source/doc/opostponedtruncationstream.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: opostponedtruncationstream.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/sfx2/source/doc/ownsubfilterservice.cxx b/sfx2/source/doc/ownsubfilterservice.cxx
index 4f31df6c4e4f..9cab42889b6e 100644
--- a/sfx2/source/doc/ownsubfilterservice.cxx
+++ b/sfx2/source/doc/ownsubfilterservice.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ownsubfilterservice.cxx,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/sfx2/source/doc/plugin.cxx b/sfx2/source/doc/plugin.cxx
index 0ab29e39b829..9ff8c73acbf6 100644
--- a/sfx2/source/doc/plugin.cxx
+++ b/sfx2/source/doc/plugin.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: plugin.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/sfx2/source/doc/printhelper.cxx b/sfx2/source/doc/printhelper.cxx
index 103dcf505846..459a142b9129 100755
--- a/sfx2/source/doc/printhelper.cxx
+++ b/sfx2/source/doc/printhelper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: printhelper.cxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -271,7 +268,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SfxPrintHelper::getPrinter() thro
// Printer beschaffen
SfxViewFrame *pViewFrm = m_pData->m_pObjectShell.Is() ?
- SfxViewFrame::GetFirst( m_pData->m_pObjectShell, 0, sal_False ) : 0;
+ SfxViewFrame::GetFirst( m_pData->m_pObjectShell, sal_False ) : 0;
if ( !pViewFrm )
return uno::Sequence< beans::PropertyValue >();
@@ -322,7 +319,7 @@ void SfxPrintHelper::impl_setPrinter(const uno::Sequence< beans::PropertyValue >
{
// alten Printer beschaffen
SfxViewFrame *pViewFrm = m_pData->m_pObjectShell.Is() ?
- SfxViewFrame::GetFirst( m_pData->m_pObjectShell, 0, sal_False ) : 0;
+ SfxViewFrame::GetFirst( m_pData->m_pObjectShell, sal_False ) : 0;
if ( !pViewFrm )
return;
@@ -585,7 +582,7 @@ void SAL_CALL SfxPrintHelper::print(const uno::Sequence< beans::PropertyValue >&
// get view for sfx printing capabilities
SfxViewFrame *pViewFrm = m_pData->m_pObjectShell.Is() ?
- SfxViewFrame::GetFirst( m_pData->m_pObjectShell, 0, sal_False ) : 0;
+ SfxViewFrame::GetFirst( m_pData->m_pObjectShell, sal_False ) : 0;
if ( !pViewFrm )
return;
SfxViewShell* pView = pViewFrm->GetViewShell();
diff --git a/sfx2/source/doc/printhelper.hxx b/sfx2/source/doc/printhelper.hxx
index 8c562995f4e1..9ba05fc20cee 100755
--- a/sfx2/source/doc/printhelper.hxx
+++ b/sfx2/source/doc/printhelper.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: printhelper.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/sfx2/source/doc/querytemplate.cxx b/sfx2/source/doc/querytemplate.cxx
index d430205a831e..8e006721351a 100644
--- a/sfx2/source/doc/querytemplate.cxx
+++ b/sfx2/source/doc/querytemplate.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: openlocked.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/sfx2/source/doc/querytemplate.hxx b/sfx2/source/doc/querytemplate.hxx
index 71f709db06dd..92e9f26da0a7 100644
--- a/sfx2/source/doc/querytemplate.hxx
+++ b/sfx2/source/doc/querytemplate.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: openlocked.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/sfx2/source/doc/sfxacldetect.cxx b/sfx2/source/doc/sfxacldetect.cxx
index b156d409c9be..de6528794e20 100755
--- a/sfx2/source/doc/sfxacldetect.cxx
+++ b/sfx2/source/doc/sfxacldetect.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: shutdowniconw32.cxx,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/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 158dbdb9e13e..e1b37c119f1a 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: sfxbasemodel.cxx,v $
- * $Revision: 1.139.2.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -73,6 +70,7 @@
#include <cppuhelper/exc_hlp.hxx>
#include <comphelper/processfactory.hxx> // can be removed when this is a "real" service
#include <comphelper/componentcontext.hxx>
+#include <comphelper/namedvaluecollection.hxx>
#include <svl/itemset.hxx>
#include <svl/stritem.hxx>
#include <svl/eitem.hxx>
@@ -101,6 +99,9 @@
// includes of my own project
//________________________________________________________________________________________________________
+#include <sfx2/sfxbasecontroller.hxx>
+#include "viewfac.hxx"
+#include "workwin.hxx"
#include <sfx2/signaturestate.hxx>
#include <sfx2/sfxuno.hxx>
#include <objshimp.hxx>
@@ -117,7 +118,7 @@
#include <sfx2/evntconf.hxx>
#include <sfx2/sfx.hrc>
#include <sfx2/app.hxx>
-#include <sfx2/topfrm.hxx>
+#include <sfx2/viewfrm.hxx>
#include "appdata.hxx"
#include <sfx2/docfac.hxx>
#include <sfx2/fcontnr.hxx>
@@ -140,11 +141,19 @@ static const ::rtl::OUString SERVICENAME_DESKTOP = ::rtl::OUString::createFromAs
namespace css = ::com::sun::star;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
+using ::com::sun::star::beans::PropertyValue;
+using ::com::sun::star::frame::XFrame;
+using ::com::sun::star::frame::XController;
+using ::com::sun::star::frame::XController2;
+using ::com::sun::star::lang::IllegalArgumentException;
+using ::com::sun::star::io::IOException;
+using ::com::sun::star::lang::WrappedTargetException;
+using ::com::sun::star::uno::Type;
+using ::com::sun::star::uno::Sequence;
+using ::com::sun::star::document::XDocumentRecovery;
/** This Listener is used to get notified when the XDocumentProperties of the
XModel change.
- If several changes are done the "bQuiet" member can be used to
- temporarily suppress notifications.
*/
class SfxDocInfoListener_Impl : public ::cppu::WeakImplHelper1<
::com::sun::star::util::XModifyListener >
@@ -152,12 +161,9 @@ class SfxDocInfoListener_Impl : public ::cppu::WeakImplHelper1<
public:
SfxObjectShell& m_rShell;
- bool bQuiet;
- bool bGotModified;
SfxDocInfoListener_Impl( SfxObjectShell& i_rDoc )
: m_rShell(i_rDoc)
- , bQuiet(false)
{ };
~SfxDocInfoListener_Impl();
@@ -174,12 +180,9 @@ void SAL_CALL SfxDocInfoListener_Impl::modified( const lang::EventObject& )
throw ( uno::RuntimeException )
{
::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
- bGotModified = true;
// notify changes to the SfxObjectShell
- if ( !bQuiet ) {
- m_rShell.FlushDocInfo();
- }
+ m_rShell.FlushDocInfo();
}
void SAL_CALL SfxDocInfoListener_Impl::disposing( const lang::EventObject& )
@@ -215,6 +218,8 @@ struct IMPL_SfxBaseModel_DataContainer : public ::sfx2::IModifiableDocument
sal_Bool m_bClosing ;
sal_Bool m_bSaving ;
sal_Bool m_bSuicide ;
+ sal_Bool m_bInitialized ;
+ sal_Bool m_bModifiedSinceLastSave;
uno::Reference< com::sun::star::view::XPrintable> m_xPrintable ;
uno::Reference< script::provider::XScriptProvider > m_xScriptProvider;
uno::Reference< ui::XUIConfigurationManager > m_xUIConfigurationManager;
@@ -233,6 +238,8 @@ struct IMPL_SfxBaseModel_DataContainer : public ::sfx2::IModifiableDocument
, m_bClosing ( sal_False )
, m_bSaving ( sal_False )
, m_bSuicide ( sal_False )
+ , m_bInitialized ( sal_False )
+ , m_bModifiedSinceLastSave( sal_False )
, m_pStorageModifyListen ( NULL )
, m_xTitleHelper ()
, m_xNumberedControllers ()
@@ -360,41 +367,40 @@ SfxOwnFramesLocker::SfxOwnFramesLocker( SfxObjectShell* pObjectShell )
if ( !pObjectShell )
return;
- for ( SfxViewFrame *pFrame = SfxViewFrame::GetFirst(pObjectShell, TYPE(SfxTopViewFrame) ); pFrame;
- pFrame = SfxViewFrame::GetNext(*pFrame, pObjectShell, TYPE(SfxTopViewFrame) ) )
+ for ( SfxViewFrame *pFrame = SfxViewFrame::GetFirst( pObjectShell );
+ pFrame;
+ pFrame = SfxViewFrame::GetNext( *pFrame, pObjectShell )
+ )
{
- SfxFrame* pSfxFrame = pFrame->GetFrame();
- if ( pSfxFrame )
+ SfxFrame& rSfxFrame = pFrame->GetFrame();
+ try
{
- try
+ // get vcl window related to the frame and lock it if it is still not locked
+ uno::Reference< frame::XFrame > xFrame = rSfxFrame.GetFrameInterface();
+ Window* pWindow = GetVCLWindow( xFrame );
+ if ( !pWindow )
+ throw uno::RuntimeException();
+
+ if ( pWindow->IsEnabled() )
{
- // get vcl window related to the frame and lock it if it is still not locked
- uno::Reference< frame::XFrame > xFrame = pSfxFrame->GetFrameInterface();
- Window* pWindow = GetVCLWindow( xFrame );
- if ( !pWindow )
- throw uno::RuntimeException();
+ pWindow->Disable();
- if ( pWindow->IsEnabled() )
+ try
{
- pWindow->Disable();
-
- try
- {
- sal_Int32 nLen = m_aLockedFrames.getLength();
- m_aLockedFrames.realloc( nLen + 1 );
- m_aLockedFrames[nLen] = xFrame;
- }
- catch( uno::Exception& )
- {
- pWindow->Enable();
- throw;
- }
+ sal_Int32 nLen = m_aLockedFrames.getLength();
+ m_aLockedFrames.realloc( nLen + 1 );
+ m_aLockedFrames[nLen] = xFrame;
+ }
+ catch( uno::Exception& )
+ {
+ pWindow->Enable();
+ throw;
}
}
- catch( uno::Exception& )
- {
- OSL_ENSURE( sal_False, "Not possible to lock the frame window!\n" );
- }
+ }
+ catch( uno::Exception& )
+ {
+ OSL_ENSURE( sal_False, "Not possible to lock the frame window!\n" );
}
}
}
@@ -525,6 +531,7 @@ SfxBaseModel::SfxBaseModel( SfxObjectShell *pObjectShell )
: BaseMutex()
, m_pData( new IMPL_SfxBaseModel_DataContainer( m_aMutex, pObjectShell ) )
, m_bSupportEmbeddedScripts( pObjectShell && pObjectShell->Get_Impl() ? !pObjectShell->Get_Impl()->m_bNoBasicCapabilities : false )
+, m_bSupportDocRecovery( pObjectShell && pObjectShell->Get_Impl() ? pObjectShell->Get_Impl()->m_bDocRecoverySupport : false )
{
DBG_CTOR(sfx2_SfxBaseModel,NULL);
if ( pObjectShell != NULL )
@@ -548,7 +555,9 @@ SfxBaseModel::~SfxBaseModel()
uno::Any SAL_CALL SfxBaseModel::queryInterface( const UNOTYPE& rType ) throw( uno::RuntimeException )
{
- if ( !m_bSupportEmbeddedScripts && rType.equals( XEMBEDDEDSCRIPTS::static_type() ) )
+ if ( ( !m_bSupportEmbeddedScripts && rType.equals( XEMBEDDEDSCRIPTS::static_type() ) )
+ || ( !m_bSupportDocRecovery && rType.equals( XDocumentRecovery::static_type() ) )
+ )
return Any();
return SfxBaseModel_Base::queryInterface( rType );
@@ -584,21 +593,31 @@ void SAL_CALL SfxBaseModel::release() throw( )
// XTypeProvider
//________________________________________________________________________________________________________
-uno::Sequence< UNOTYPE > SAL_CALL SfxBaseModel::getTypes() throw( uno::RuntimeException )
+namespace
{
- uno::Sequence< UNOTYPE > aTypes( SfxBaseModel_Base::getTypes() );
- if ( !m_bSupportEmbeddedScripts )
+ void lcl_stripType( Sequence< Type >& io_rTypes, const Type& i_rTypeToStrip )
{
- // remove XEmbeddedScripts type from the sequence
- Sequence< UNOTYPE > aStrippedTypes( aTypes.getLength() - 1 );
+ Sequence< UNOTYPE > aStrippedTypes( io_rTypes.getLength() - 1 );
::std::remove_copy_if(
- aTypes.getConstArray(),
- aTypes.getConstArray() + aTypes.getLength(),
+ io_rTypes.getConstArray(),
+ io_rTypes.getConstArray() + io_rTypes.getLength(),
aStrippedTypes.getArray(),
- ::std::bind2nd( ::std::equal_to< UNOTYPE >(), XEMBEDDEDSCRIPTS::static_type() )
+ ::std::bind2nd( ::std::equal_to< Type >(), i_rTypeToStrip )
);
- aTypes = aStrippedTypes;
+ io_rTypes = aStrippedTypes;
}
+}
+
+uno::Sequence< UNOTYPE > SAL_CALL SfxBaseModel::getTypes() throw( uno::RuntimeException )
+{
+ uno::Sequence< UNOTYPE > aTypes( SfxBaseModel_Base::getTypes() );
+
+ if ( !m_bSupportEmbeddedScripts )
+ lcl_stripType( aTypes, XEMBEDDEDSCRIPTS::static_type() );
+
+ if ( !m_bSupportDocRecovery )
+ lcl_stripType( aTypes, XDocumentRecovery::static_type() );
+
return aTypes;
}
@@ -651,9 +670,7 @@ uno::Reference< script::XStarBasicAccess > implGetStarBasicAccess( SfxObjectShel
uno::Reference< XNAMECONTAINER > SAL_CALL SfxBaseModel::getLibraryContainer() throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
uno::Reference< script::XStarBasicAccess >& rxAccess = m_pData->m_xStarBasicAccess;
if( !rxAccess.is() && m_pData->m_pObjectShell.Is() )
@@ -672,9 +689,7 @@ void SAL_CALL SfxBaseModel::createLibrary( const ::rtl::OUString& LibName, const
const ::rtl::OUString& ExternalSourceURL, const ::rtl::OUString& LinkTargetURL )
throw(ELEMENTEXISTEXCEPTION, uno::RuntimeException)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
uno::Reference< script::XStarBasicAccess >& rxAccess = m_pData->m_xStarBasicAccess;
if( !rxAccess.is() && m_pData->m_pObjectShell.Is() )
@@ -691,9 +706,7 @@ void SAL_CALL SfxBaseModel::addModule( const ::rtl::OUString& LibraryName, const
const ::rtl::OUString& Language, const ::rtl::OUString& Source )
throw( NOSUCHELEMENTEXCEPTION, uno::RuntimeException)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
uno::Reference< script::XStarBasicAccess >& rxAccess = m_pData->m_xStarBasicAccess;
if( !rxAccess.is() && m_pData->m_pObjectShell.Is() )
@@ -710,9 +723,7 @@ void SAL_CALL SfxBaseModel::addDialog( const ::rtl::OUString& LibraryName, const
const ::com::sun::star::uno::Sequence< sal_Int8 >& Data )
throw(NOSUCHELEMENTEXCEPTION, uno::RuntimeException)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
uno::Reference< script::XStarBasicAccess >& rxAccess = m_pData->m_xStarBasicAccess;
if( !rxAccess.is() && m_pData->m_pObjectShell.Is() )
@@ -729,9 +740,7 @@ void SAL_CALL SfxBaseModel::addDialog( const ::rtl::OUString& LibraryName, const
uno::Reference< uno::XInterface > SAL_CALL SfxBaseModel::getParent() throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
return m_pData->m_xParent;
}
@@ -742,7 +751,7 @@ uno::Reference< uno::XInterface > SAL_CALL SfxBaseModel::getParent() throw( uno:
void SAL_CALL SfxBaseModel::setParent(const uno::Reference< uno::XInterface >& Parent) throw(NOSUPPORTEXCEPTION, uno::RuntimeException)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SfxModelGuard aGuard( *this, SfxModelGuard::E_INITIALIZING );
m_pData->m_xParent = Parent;
}
@@ -752,11 +761,7 @@ void SAL_CALL SfxBaseModel::setParent(const uno::Reference< uno::XInterface >& P
void SAL_CALL SfxBaseModel::dispose() throw(::com::sun::star::uno::RuntimeException)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
-
- // object already disposed?
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this, SfxModelGuard::E_INITIALIZING );
if ( !m_pData->m_bClosed )
{
@@ -815,11 +820,7 @@ void SAL_CALL SfxBaseModel::dispose() throw(::com::sun::star::uno::RuntimeExcept
void SAL_CALL SfxBaseModel::addEventListener( const uno::Reference< XEVENTLISTENER >& aListener )
throw(::com::sun::star::uno::RuntimeException)
{
- // object already disposed?
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- return;
-
+ SfxModelGuard aGuard( *this, SfxModelGuard::E_INITIALIZING );
m_pData->m_aInterfaceContainer.addInterface( ::getCppuType((const uno::Reference< XEVENTLISTENER >*)0), aListener );
}
@@ -830,11 +831,7 @@ void SAL_CALL SfxBaseModel::addEventListener( const uno::Reference< XEVENTLISTEN
void SAL_CALL SfxBaseModel::removeEventListener( const uno::Reference< XEVENTLISTENER >& aListener )
throw(::com::sun::star::uno::RuntimeException)
{
- // object already disposed?
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- return;
-
+ SfxModelGuard aGuard( *this, SfxModelGuard::E_INITIALIZING );
m_pData->m_aInterfaceContainer.removeInterface( ::getCppuType((const uno::Reference< XEVENTLISTENER >*)0), aListener );
}
@@ -844,11 +841,7 @@ void SAL_CALL SfxBaseModel::removeEventListener( const uno::Reference< XEVENTLIS
uno::Reference< document::XDocumentInfo > SAL_CALL SfxBaseModel::getDocumentInfo() throw(::com::sun::star::uno::RuntimeException)
{
- // object already disposed?
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
-
+ SfxModelGuard aGuard( *this, SfxModelGuard::E_INITIALIZING );
if ( !m_pData->m_xDocumentInfo.is() )
{
// WARNING: this will only work if (when loading a document) the
@@ -894,11 +887,7 @@ uno::Reference< document::XDocumentProperties > SAL_CALL
SfxBaseModel::getDocumentProperties()
throw(::com::sun::star::uno::RuntimeException)
{
- // object already disposed?
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
-
+ SfxModelGuard aGuard( *this, SfxModelGuard::E_INITIALIZING );
if ( !m_pData->m_xDocumentProperties.is() )
{
uno::Reference< lang::XInitialization > xDocProps(
@@ -946,10 +935,7 @@ sal_Bool SAL_CALL SfxBaseModel::attachResource( const ::rtl::OUString&
const uno::Sequence< beans::PropertyValue >& rArgs )
throw(::com::sun::star::uno::RuntimeException)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
-
+ SfxModelGuard aGuard( *this, SfxModelGuard::E_INITIALIZING );
if ( rURL.getLength() == 0 && rArgs.getLength() == 1 && rArgs[0].Name.equalsAscii( "SetEmbedded" ) )
{
// allows to set a windowless document to EMBEDDED state
@@ -967,53 +953,50 @@ sal_Bool SAL_CALL SfxBaseModel::attachResource( const ::rtl::OUString&
if ( m_pData->m_pObjectShell.Is() )
{
m_pData->m_sURL = rURL;
- uno::Sequence< beans::PropertyValue > aNewSeqArgs( rArgs.getLength() );
- sal_Int32 nNewLen = 0;
- for ( sal_Int32 nInd = 0; nInd < rArgs.getLength(); nInd++ )
+ SfxObjectShell* pObjectShell = m_pData->m_pObjectShell;
+
+ ::comphelper::NamedValueCollection aArgs( rArgs );
+
+ Sequence< sal_Int32 > aWinExtent;
+ if ( ( aArgs.get( "WinExtent" ) >>= aWinExtent )&& ( aWinExtent.getLength() == 4 ) )
{
- if ( rArgs[nInd].Name.equalsAscii( "WinExtent" ) )
- {
- Sequence< sal_Int32 > aSize;
- if ( ( rArgs[nInd].Value >>= aSize ) && aSize.getLength() == 4 )
- {
- Rectangle aTmpRect( aSize[0], aSize[1], aSize[2], aSize[3] );
- aTmpRect = OutputDevice::LogicToLogic( aTmpRect, MAP_100TH_MM, m_pData->m_pObjectShell->GetMapUnit() );
- m_pData->m_pObjectShell->SetVisArea( aTmpRect );
- }
- }
- else if ( rArgs[nInd].Name.equalsAscii( "BreakMacroSignature" ) )
- {
- sal_Bool bBreakMacroSign = sal_False;
- rArgs[nInd].Value >>= bBreakMacroSign;
- m_pData->m_pObjectShell->BreakMacroSign_Impl( bBreakMacroSign );
- }
- else if ( !rArgs[nInd].Name.equalsAscii( "Stream" ) && !rArgs[nInd].Name.equalsAscii( "InputStream" ) )
- {
- // TODO/LATER: all the parameters that are accepted by ItemSet of the DocShell must be ignored here
- aNewSeqArgs[nNewLen++] = rArgs[nInd];
- }
+ Rectangle aVisArea( aWinExtent[0], aWinExtent[1], aWinExtent[2], aWinExtent[3] );
+ aVisArea = OutputDevice::LogicToLogic( aVisArea, MAP_100TH_MM, pObjectShell->GetMapUnit() );
+ pObjectShell->SetVisArea( aVisArea );
+ }
+
+ sal_Bool bBreakMacroSign = sal_False;
+ if ( aArgs.get( "BreakMacroSignature" ) >>= bBreakMacroSign )
+ {
+ pObjectShell->BreakMacroSign_Impl( bBreakMacroSign );
}
- aNewSeqArgs.realloc( nNewLen );
+ aArgs.remove( "WinExtent" );
+ aArgs.remove( "BreakMacroSignature" );
+ aArgs.remove( "Stream" );
+ aArgs.remove( "InputStream" );
- m_pData->m_seqArguments = aNewSeqArgs;
+ // TODO/LATER: all the parameters that are accepted by ItemSet of the DocShell must be removed here
- if( m_pData->m_pObjectShell->GetMedium() )
+ m_pData->m_seqArguments = aArgs.getPropertyValues();
+
+ SfxMedium* pMedium = pObjectShell->GetMedium();
+ if ( pMedium )
{
- SfxAllItemSet aSet( m_pData->m_pObjectShell->GetPool() );
+ SfxAllItemSet aSet( pObjectShell->GetPool() );
TransformParameters( SID_OPENDOC, rArgs, aSet );
- m_pData->m_pObjectShell->GetMedium()->GetItemSet()->Put( aSet );
+ pMedium->GetItemSet()->Put( aSet );
SFX_ITEMSET_ARG( &aSet, pItem, SfxStringItem, SID_FILTER_NAME, sal_False );
if ( pItem )
- m_pData->m_pObjectShell->GetMedium()->SetFilter(
- m_pData->m_pObjectShell->GetFactory().GetFilterContainer()->GetFilter4FilterName( pItem->GetValue() ) );
+ pMedium->SetFilter(
+ pObjectShell->GetFactory().GetFilterContainer()->GetFilter4FilterName( pItem->GetValue() ) );
SFX_ITEMSET_ARG( &aSet, pTitleItem, SfxStringItem, SID_DOCINFO_TITLE, sal_False );
if ( pTitleItem )
{
- SfxViewFrame* pFrame = SfxViewFrame::GetFirst( m_pData->m_pObjectShell );
+ SfxViewFrame* pFrame = SfxViewFrame::GetFirst( pObjectShell );
if ( pFrame )
pFrame->UpdateTitle();
}
@@ -1029,10 +1012,7 @@ sal_Bool SAL_CALL SfxBaseModel::attachResource( const ::rtl::OUString&
::rtl::OUString SAL_CALL SfxBaseModel::getURL() throw(::com::sun::star::uno::RuntimeException)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
-
+ SfxModelGuard aGuard( *this );
return m_pData->m_sURL ;
}
@@ -1042,10 +1022,7 @@ sal_Bool SAL_CALL SfxBaseModel::attachResource( const ::rtl::OUString&
uno::Sequence< beans::PropertyValue > SAL_CALL SfxBaseModel::getArgs() throw(::com::sun::star::uno::RuntimeException)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
-
+ SfxModelGuard aGuard( *this );
if ( m_pData->m_pObjectShell.Is() )
{
uno::Sequence< beans::PropertyValue > seqArgsNew;
@@ -1145,9 +1122,10 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SfxBaseModel::getArgs() throw(::c
void SAL_CALL SfxBaseModel::connectController( const uno::Reference< frame::XController >& xController )
throw(::com::sun::star::uno::RuntimeException)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
+ OSL_PRECOND( xController.is(), "SfxBaseModel::connectController: invalid controller!" );
+ if ( !xController.is() )
+ return;
sal_uInt32 nOldCount = m_pData->m_seqControllers.getLength();
uno::Sequence< uno::Reference< frame::XController > > aNewSeq( nOldCount + 1 );
@@ -1155,6 +1133,16 @@ void SAL_CALL SfxBaseModel::connectController( const uno::Reference< frame::XCon
aNewSeq.getArray()[n] = m_pData->m_seqControllers.getConstArray()[n];
aNewSeq.getArray()[nOldCount] = xController;
m_pData->m_seqControllers = aNewSeq;
+
+ if ( m_pData->m_seqControllers.getLength() == 1 )
+ {
+ SfxViewFrame* pViewFrame = SfxViewFrame::Get( xController, GetObjectShell() );
+ ENSURE_OR_THROW( pViewFrame, "SFX document without SFX view!?" );
+ pViewFrame->UpdateDocument_Impl();
+ const String sDocumentURL = GetObjectShell()->GetMedium()->GetName();
+ if ( sDocumentURL.Len() )
+ SFX_APP()->Broadcast( SfxStringHint( SID_OPENURL, sDocumentURL ) );
+ }
}
//________________________________________________________________________________________________________
@@ -1163,9 +1151,7 @@ void SAL_CALL SfxBaseModel::connectController( const uno::Reference< frame::XCon
void SAL_CALL SfxBaseModel::disconnectController( const uno::Reference< frame::XController >& xController ) throw(::com::sun::star::uno::RuntimeException)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
sal_uInt32 nOldCount = m_pData->m_seqControllers.getLength();
if ( !nOldCount )
@@ -1193,9 +1179,8 @@ void SAL_CALL SfxBaseModel::disconnectController( const uno::Reference< frame::X
void SAL_CALL SfxBaseModel::lockControllers() throw(::com::sun::star::uno::RuntimeException)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
+
++m_pData->m_nControllerLockCount ;
}
@@ -1205,9 +1190,8 @@ void SAL_CALL SfxBaseModel::lockControllers() throw(::com::sun::star::uno::Runti
void SAL_CALL SfxBaseModel::unlockControllers() throw(::com::sun::star::uno::RuntimeException)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
+
--m_pData->m_nControllerLockCount ;
}
@@ -1217,9 +1201,7 @@ void SAL_CALL SfxBaseModel::unlockControllers() throw(::com::sun::star::uno::Run
sal_Bool SAL_CALL SfxBaseModel::hasControllersLocked() throw(::com::sun::star::uno::RuntimeException)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
return ( m_pData->m_nControllerLockCount != 0 ) ;
}
@@ -1229,10 +1211,7 @@ sal_Bool SAL_CALL SfxBaseModel::hasControllersLocked() throw(::com::sun::star::u
uno::Reference< frame::XController > SAL_CALL SfxBaseModel::getCurrentController() throw(::com::sun::star::uno::RuntimeException)
{
- // object already disposed?
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
// get the last active controller of this model
if ( m_pData->m_xCurrent.is() )
@@ -1249,10 +1228,7 @@ uno::Reference< frame::XController > SAL_CALL SfxBaseModel::getCurrentController
void SAL_CALL SfxBaseModel::setCurrentController( const uno::Reference< frame::XController >& xCurrentController )
throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException)
{
- // object already disposed?
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
m_pData->m_xCurrent = xCurrentController;
}
@@ -1263,10 +1239,7 @@ void SAL_CALL SfxBaseModel::setCurrentController( const uno::Reference< frame::X
uno::Reference< uno::XInterface > SAL_CALL SfxBaseModel::getCurrentSelection() throw(::com::sun::star::uno::RuntimeException)
{
- // object already disposed?
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
uno::Reference< uno::XInterface > xReturn;
uno::Reference< frame::XController > xController = getCurrentController() ;
@@ -1290,9 +1263,7 @@ uno::Reference< uno::XInterface > SAL_CALL SfxBaseModel::getCurrentSelection() t
sal_Bool SAL_CALL SfxBaseModel::disableSetModified() throw (::com::sun::star::uno::RuntimeException)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw DISPOSEDEXCEPTION();
+ SfxModelGuard aGuard( *this );
if ( !m_pData->m_pObjectShell.Is() )
throw uno::RuntimeException();
@@ -1305,9 +1276,7 @@ sal_Bool SAL_CALL SfxBaseModel::disableSetModified() throw (::com::sun::star::un
sal_Bool SAL_CALL SfxBaseModel::enableSetModified() throw (::com::sun::star::uno::RuntimeException)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw DISPOSEDEXCEPTION();
+ SfxModelGuard aGuard( *this );
if ( !m_pData->m_pObjectShell.Is() )
throw uno::RuntimeException();
@@ -1320,9 +1289,7 @@ sal_Bool SAL_CALL SfxBaseModel::enableSetModified() throw (::com::sun::star::uno
sal_Bool SAL_CALL SfxBaseModel::isSetModifiedEnabled() throw (::com::sun::star::uno::RuntimeException)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw DISPOSEDEXCEPTION();
+ SfxModelGuard aGuard( *this );
if ( !m_pData->m_pObjectShell.Is() )
throw uno::RuntimeException();
@@ -1336,10 +1303,7 @@ sal_Bool SAL_CALL SfxBaseModel::isSetModifiedEnabled() throw (::com::sun::star::
sal_Bool SAL_CALL SfxBaseModel::isModified() throw(::com::sun::star::uno::RuntimeException)
{
- // object already disposed?
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
return m_pData->m_pObjectShell.Is() ? m_pData->m_pObjectShell->IsModified() : sal_False;
}
@@ -1351,10 +1315,7 @@ sal_Bool SAL_CALL SfxBaseModel::isModified() throw(::com::sun::star::uno::Runtim
void SAL_CALL SfxBaseModel::setModified( sal_Bool bModified )
throw (::com::sun::star::beans::PropertyVetoException, ::com::sun::star::uno::RuntimeException)
{
- // object already disposed?
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
if ( m_pData->m_pObjectShell.Is() )
m_pData->m_pObjectShell->SetModified(bModified);
@@ -1366,10 +1327,7 @@ void SAL_CALL SfxBaseModel::setModified( sal_Bool bModified )
void SAL_CALL SfxBaseModel::addModifyListener(const uno::Reference< XMODIFYLISTENER >& xListener) throw( uno::RuntimeException )
{
- // object already disposed?
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- return;
+ SfxModelGuard aGuard( *this, SfxModelGuard::E_INITIALIZING );
m_pData->m_aInterfaceContainer.addInterface( ::getCppuType((const uno::Reference< XMODIFYLISTENER >*)0),xListener );
}
@@ -1380,10 +1338,7 @@ void SAL_CALL SfxBaseModel::addModifyListener(const uno::Reference< XMODIFYLISTE
void SAL_CALL SfxBaseModel::removeModifyListener(const uno::Reference< XMODIFYLISTENER >& xListener) throw( uno::RuntimeException )
{
- // object already disposed?
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- return;
+ SfxModelGuard aGuard( *this );
m_pData->m_aInterfaceContainer.removeInterface( ::getCppuType((const uno::Reference< XMODIFYLISTENER >*)0), xListener );
}
@@ -1397,7 +1352,7 @@ void SAL_CALL SfxBaseModel::close( sal_Bool bDeliverOwnership ) throw (util::Clo
static ::rtl::OUString MSG_1 = ::rtl::OUString::createFromAscii("Cant close while saving.");
::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( !m_pData || m_pData->m_bClosed || m_pData->m_bClosing )
+ if ( impl_isDisposed() || m_pData->m_bClosed || m_pData->m_bClosing )
return;
uno::Reference< uno::XInterface > xSelfHold( static_cast< ::cppu::OWeakObject* >(this) );
@@ -1459,10 +1414,7 @@ void SAL_CALL SfxBaseModel::close( sal_Bool bDeliverOwnership ) throw (util::Clo
void SAL_CALL SfxBaseModel::addCloseListener( const uno::Reference< XCLOSELISTENER >& xListener ) throw (uno::RuntimeException)
{
- // object already disposed?
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- return;
+ SfxModelGuard aGuard( *this, SfxModelGuard::E_INITIALIZING );
m_pData->m_aInterfaceContainer.addInterface( ::getCppuType((const uno::Reference< XCLOSELISTENER >*)0), xListener );
}
@@ -1473,10 +1425,7 @@ void SAL_CALL SfxBaseModel::addCloseListener( const uno::Reference< XCLOSELISTEN
void SAL_CALL SfxBaseModel::removeCloseListener( const uno::Reference< XCLOSELISTENER >& xListener ) throw (uno::RuntimeException)
{
- // object already disposed?
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- return;
+ SfxModelGuard aGuard( *this );
m_pData->m_aInterfaceContainer.removeInterface( ::getCppuType((const uno::Reference< XCLOSELISTENER >*)0), xListener );
}
@@ -1487,10 +1436,7 @@ void SAL_CALL SfxBaseModel::removeCloseListener( const uno::Reference< XCLOSELIS
uno::Sequence< beans::PropertyValue > SAL_CALL SfxBaseModel::getPrinter() throw(::com::sun::star::uno::RuntimeException)
{
- // object already disposed?
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
if ( impl_getPrintHelper() )
return m_pData->m_xPrintable->getPrinter();
@@ -1501,10 +1447,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SfxBaseModel::getPrinter() throw(
void SAL_CALL SfxBaseModel::setPrinter(const uno::Sequence< beans::PropertyValue >& rPrinter)
throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
{
- // object already disposed?
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
if ( impl_getPrintHelper() )
m_pData->m_xPrintable->setPrinter( rPrinter );
@@ -1513,10 +1456,7 @@ void SAL_CALL SfxBaseModel::setPrinter(const uno::Sequence< beans::PropertyValue
void SAL_CALL SfxBaseModel::print(const uno::Sequence< beans::PropertyValue >& rOptions)
throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
{
- // object already disposed?
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
if ( impl_getPrintHelper() )
m_pData->m_xPrintable->print( rOptions );
@@ -1528,10 +1468,7 @@ void SAL_CALL SfxBaseModel::print(const uno::Sequence< beans::PropertyValue >& r
sal_Bool SAL_CALL SfxBaseModel::hasLocation() throw(::com::sun::star::uno::RuntimeException)
{
- // object already disposed?
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
return m_pData->m_pObjectShell.Is() ? m_pData->m_pObjectShell->HasName() : sal_False;
}
@@ -1542,10 +1479,7 @@ sal_Bool SAL_CALL SfxBaseModel::hasLocation() throw(::com::sun::star::uno::Runti
::rtl::OUString SAL_CALL SfxBaseModel::getLocation() throw(::com::sun::star::uno::RuntimeException)
{
- // object already disposed?
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
if ( m_pData->m_pObjectShell.Is() )
{
@@ -1565,10 +1499,7 @@ sal_Bool SAL_CALL SfxBaseModel::hasLocation() throw(::com::sun::star::uno::Runti
sal_Bool SAL_CALL SfxBaseModel::isReadonly() throw(::com::sun::star::uno::RuntimeException)
{
- // object already disposed?
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
return m_pData->m_pObjectShell.Is() ? m_pData->m_pObjectShell->IsReadOnly() : sal_True;
}
@@ -1584,10 +1515,7 @@ void SAL_CALL SfxBaseModel::storeSelf( const uno::Sequence< beans::PropertyVa
{
RTL_LOGFILE_PRODUCT_CONTEXT( aPerfLog, "PERFORMANCE - SfxBaseModel::storeSelf" );
- // object already disposed?
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
if ( m_pData->m_pObjectShell.Is() )
{
@@ -1685,10 +1613,7 @@ void SAL_CALL SfxBaseModel::storeAsURL( const ::rtl::OUString&
{
RTL_LOGFILE_PRODUCT_CONTEXT( aPerfLog, "PERFORMANCE - SfxBaseModel::storeAsURL" );
- // object already disposed?
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
if ( m_pData->m_pObjectShell.Is() )
{
@@ -1711,10 +1636,7 @@ void SAL_CALL SfxBaseModel::storeToURL( const ::rtl::OUString&
const uno::Sequence< beans::PropertyValue >& rArgs )
throw (::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException)
{
- // object already disposed?
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
if ( m_pData->m_pObjectShell.Is() )
{
@@ -1724,6 +1646,51 @@ void SAL_CALL SfxBaseModel::storeToURL( const ::rtl::OUString&
}
}
+::sal_Bool SAL_CALL SfxBaseModel::wasModifiedSinceLastSave() throw ( RuntimeException )
+{
+ SfxModelGuard aGuard( *this );
+ return m_pData->m_bModifiedSinceLastSave;
+}
+
+void SAL_CALL SfxBaseModel::storeToRecoveryFile( const ::rtl::OUString& i_TargetLocation, const Sequence< PropertyValue >& i_MediaDescriptor ) throw ( RuntimeException, IOException, WrappedTargetException )
+{
+ SfxModelGuard aGuard( *this );
+
+ // delegate
+ SfxSaveGuard aSaveGuard( this, m_pData, sal_False );
+ impl_store( i_TargetLocation, i_MediaDescriptor, sal_True );
+
+ // no need for subsequent calls to storeToRecoveryFile, unless we're modified, again
+ m_pData->m_bModifiedSinceLastSave = sal_False;
+}
+
+void SAL_CALL SfxBaseModel::recoverFromFile( const ::rtl::OUString& i_SourceLocation, const ::rtl::OUString& i_SalvagedFile, const Sequence< PropertyValue >& i_MediaDescriptor ) throw ( RuntimeException, IOException, WrappedTargetException )
+{
+ SfxModelGuard aGuard( *this, SfxModelGuard::E_INITIALIZING );
+
+ // delegate to our "load" method
+ ::comphelper::NamedValueCollection aMediaDescriptor( i_MediaDescriptor );
+
+ // our load implementation expects the SalvagedFile to be in the media descriptor
+ OSL_ENSURE( !aMediaDescriptor.has( "SalvagedFile" ) || ( aMediaDescriptor.getOrDefault( "SalvagedFile", ::rtl::OUString() ) == i_SalvagedFile ),
+ "SfxBaseModel::recoverFromFile: inconsistent information!" );
+ aMediaDescriptor.put( "SalvagedFile", i_SalvagedFile );
+
+ // similar for the to-be-loaded file
+ OSL_ENSURE( !aMediaDescriptor.has( "URL" ) || ( aMediaDescriptor.getOrDefault( "URL", ::rtl::OUString() ) == i_SourceLocation ),
+ "SfxBaseModel::recoverFromFile: inconsistent information!" );
+ aMediaDescriptor.put( "URL", i_SourceLocation );
+
+ load( aMediaDescriptor.getPropertyValues() );
+
+ // Note: The XDocumentRecovery interface specification requires us to do an attachResource after loading.
+ // However, we will not do this here, as we know that our load implementation (respectively some method
+ // called from there) already did so.
+ // In particular, the load process might already have modified some elements of the media
+ // descriptor, for instance the MacroExecMode (in case the user was involved to decide about it), and we do
+ // not want to overwrite it with the "old" elements passed to this method here.
+}
+
//________________________________________________________________________________________________________
// XLoadable
//________________________________________________________________________________________________________
@@ -1734,10 +1701,9 @@ void SAL_CALL SfxBaseModel::initNew()
::com::sun::star::uno::RuntimeException,
::com::sun::star::uno::Exception)
{
- // object already disposed?
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this, SfxModelGuard::E_INITIALIZING );
+ if ( IsInitialized() )
+ throw ::com::sun::star::frame::DoubleInitializationException( ::rtl::OUString(), *this );
// the object shell should exist always
DBG_ASSERT( m_pData->m_pObjectShell.Is(), "Model is useless without an ObjectShell" );
@@ -1766,10 +1732,9 @@ void SAL_CALL SfxBaseModel::load( const uno::Sequence< beans::PropertyValue >&
::com::sun::star::uno::RuntimeException,
::com::sun::star::uno::Exception)
{
- // object already disposed?
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this, SfxModelGuard::E_INITIALIZING );
+ if ( IsInitialized() )
+ throw ::com::sun::star::frame::DoubleInitializationException( ::rtl::OUString(), *this );
// the object shell should exist always
DBG_ASSERT( m_pData->m_pObjectShell.Is(), "Model is useless without an ObjectShell" );
@@ -1913,6 +1878,13 @@ void SAL_CALL SfxBaseModel::load( const uno::Sequence< beans::PropertyValue >&
nError ? nError : ERRCODE_IO_CANTREAD );
}
}
+
+ BOOL bHidden = FALSE;
+ SFX_ITEMSET_ARG( pMedium->GetItemSet(), pHidItem, SfxBoolItem, SID_HIDDEN, sal_False);
+ if ( pHidItem )
+ bHidden = pHidItem->GetValue();
+ // !TODO: will be done by Framework!
+ pMedium->SetUpdatePickList( !bHidden );
}
}
@@ -1925,10 +1897,7 @@ uno::Any SAL_CALL SfxBaseModel::getTransferData( const DATAFLAVOR& aFlavor )
::com::sun::star::io::IOException,
::com::sun::star::uno::RuntimeException)
{
- // object already disposed?
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
uno::Any aAny;
@@ -2167,10 +2136,7 @@ uno::Any SAL_CALL SfxBaseModel::getTransferData( const DATAFLAVOR& aFlavor )
uno::Sequence< DATAFLAVOR > SAL_CALL SfxBaseModel::getTransferDataFlavors()
throw (::com::sun::star::uno::RuntimeException)
{
- // object already disposed?
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
sal_Int32 nSuppFlavors = GraphicHelper::supportsMetaFileHandle_Impl() ? 10 : 8;
uno::Sequence< DATAFLAVOR > aFlavorSeq( nSuppFlavors );
@@ -2239,10 +2205,7 @@ uno::Sequence< DATAFLAVOR > SAL_CALL SfxBaseModel::getTransferDataFlavors()
sal_Bool SAL_CALL SfxBaseModel::isDataFlavorSupported( const DATAFLAVOR& aFlavor )
throw (::com::sun::star::uno::RuntimeException)
{
- // object already disposed?
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
if ( aFlavor.MimeType.equalsAscii( "application/x-openoffice-gdimetafile;windows_formatname=\"GDIMetaFile\"" ) )
{
@@ -2301,10 +2264,7 @@ sal_Bool SAL_CALL SfxBaseModel::isDataFlavorSupported( const DATAFLAVOR& aFlavor
uno::Reference< container::XNameReplace > SAL_CALL SfxBaseModel::getEvents() throw( uno::RuntimeException )
{
- // object already disposed?
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
if ( ! m_pData->m_xEvents.is() )
{
@@ -2320,9 +2280,7 @@ uno::Reference< container::XNameReplace > SAL_CALL SfxBaseModel::getEvents() thr
uno::Reference< script::XStorageBasedLibraryContainer > SAL_CALL SfxBaseModel::getBasicLibraries() throw (RuntimeException)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
uno::Reference< script::XStorageBasedLibraryContainer > xBasicLibraries;
if ( m_pData->m_pObjectShell )
@@ -2332,9 +2290,7 @@ uno::Reference< script::XStorageBasedLibraryContainer > SAL_CALL SfxBaseModel::g
uno::Reference< script::XStorageBasedLibraryContainer > SAL_CALL SfxBaseModel::getDialogLibraries() throw (RuntimeException)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
uno::Reference< script::XStorageBasedLibraryContainer > xDialogLibraries;
if ( m_pData->m_pObjectShell )
@@ -2344,9 +2300,7 @@ uno::Reference< script::XStorageBasedLibraryContainer > SAL_CALL SfxBaseModel::g
::sal_Bool SAL_CALL SfxBaseModel::getAllowMacroExecution() throw (RuntimeException)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
if ( m_pData->m_pObjectShell )
return m_pData->m_pObjectShell->AdjustMacroMode( String(), false );
@@ -2359,9 +2313,7 @@ uno::Reference< script::XStorageBasedLibraryContainer > SAL_CALL SfxBaseModel::g
Reference< document::XEmbeddedScripts > SAL_CALL SfxBaseModel::getScriptContainer() throw (RuntimeException)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
Reference< document::XEmbeddedScripts > xDocumentScripts;
@@ -2397,10 +2349,7 @@ Reference< document::XEmbeddedScripts > SAL_CALL SfxBaseModel::getScriptContaine
void SAL_CALL SfxBaseModel::addEventListener( const uno::Reference< XDOCEVENTLISTENER >& aListener ) throw( uno::RuntimeException )
{
- // object already disposed?
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- return;
+ SfxModelGuard aGuard( *this, SfxModelGuard::E_INITIALIZING );
m_pData->m_aInterfaceContainer.addInterface( ::getCppuType((const uno::Reference< XDOCEVENTLISTENER >*)0), aListener );
}
@@ -2411,10 +2360,7 @@ void SAL_CALL SfxBaseModel::addEventListener( const uno::Reference< XDOCEVENTLIS
void SAL_CALL SfxBaseModel::removeEventListener( const uno::Reference< XDOCEVENTLISTENER >& aListener ) throw( uno::RuntimeException )
{
- // object already disposed?
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- return;
+ SfxModelGuard aGuard( *this );
m_pData->m_aInterfaceContainer.removeInterface( ::getCppuType((const uno::Reference< XDOCEVENTLISTENER >*)0), aListener );
}
@@ -2492,7 +2438,9 @@ void SfxBaseModel::Notify( SfxBroadcaster& rBC ,
if ( pNamedHint )
{
- if ( SFX_EVENT_STORAGECHANGED == pNamedHint->GetEventId() )
+ switch ( pNamedHint->GetEventId() )
+ {
+ case SFX_EVENT_STORAGECHANGED:
{
// for now this event is sent only on creation of a new storage for new document
// and in case of reload of medium without document reload
@@ -2523,12 +2471,17 @@ void SfxBaseModel::Notify( SfxBroadcaster& rBC ,
ListenForStorage_Impl( m_pData->m_pObjectShell->GetStorage() );
}
- else if ( SFX_EVENT_LOADFINISHED == pNamedHint->GetEventId() )
+ break;
+
+ case SFX_EVENT_LOADFINISHED:
{
impl_getPrintHelper();
ListenForStorage_Impl( m_pData->m_pObjectShell->GetStorage() );
+ m_pData->m_bModifiedSinceLastSave = sal_False;
}
- else if ( SFX_EVENT_SAVEASDOCDONE == pNamedHint->GetEventId() )
+ break;
+
+ case SFX_EVENT_SAVEASDOCDONE:
{
m_pData->m_sURL = m_pData->m_pObjectShell->GetMedium()->GetName();
@@ -2539,9 +2492,20 @@ void SfxBaseModel::Notify( SfxBroadcaster& rBC ,
addTitle_Impl( aArgs, aTitle );
attachResource( m_pData->m_pObjectShell->GetMedium()->GetName(), aArgs );
}
- else if ( SFX_EVENT_DOCCREATED == pNamedHint->GetEventId() )
+ break;
+
+ case SFX_EVENT_DOCCREATED:
{
impl_getPrintHelper();
+ m_pData->m_bModifiedSinceLastSave = sal_False;
+ }
+ break;
+
+ case SFX_EVENT_MODIFYCHANGED:
+ {
+ m_pData->m_bModifiedSinceLastSave = isModified();
+ }
+ break;
}
postEvent_Impl( pNamedHint->GetEventName() );
@@ -2575,36 +2539,29 @@ void SfxBaseModel::Notify( SfxBroadcaster& rBC ,
// public impl.
//________________________________________________________________________________________________________
+void SfxBaseModel::NotifyModifyListeners_Impl() const
+{
+ ::cppu::OInterfaceContainerHelper* pIC = m_pData->m_aInterfaceContainer.getContainer( ::getCppuType((const uno::Reference< XMODIFYLISTENER >*)0) );
+ if ( pIC )
+ {
+ lang::EventObject aEvent( (frame::XModel *)this );
+ pIC->notifyEach( &util::XModifyListener::modified, aEvent );
+ }
+
+ // this notification here is done too generously, we cannot simply assume that we're really modified
+ // now, but we need to check it ...
+ m_pData->m_bModifiedSinceLastSave = const_cast< SfxBaseModel* >( this )->isModified();
+}
+
void SfxBaseModel::changing()
{
- // object already disposed?
- // object already disposed?
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- return;
+ SfxModelGuard aGuard( *this );
// the notification should not be sent if the document can not be modified
if ( !m_pData->m_pObjectShell.Is() || !m_pData->m_pObjectShell->IsEnableSetModified() )
return;
- ::cppu::OInterfaceContainerHelper* pIC = m_pData->m_aInterfaceContainer.getContainer( ::getCppuType((const uno::Reference< XMODIFYLISTENER >*)0) );
- if( pIC )
-
- {
- lang::EventObject aEvent( (frame::XModel *)this );
- ::cppu::OInterfaceIteratorHelper aIt( *pIC );
- while( aIt.hasMoreElements() )
- {
- try
- {
- ((XMODIFYLISTENER *)aIt.next())->modified( aEvent );
- }
- catch( uno::RuntimeException& )
- {
- aIt.remove();
- }
- }
- }
+ NotifyModifyListeners_Impl();
}
void SfxBaseModel::impl_change()
@@ -2613,24 +2570,7 @@ void SfxBaseModel::impl_change()
if ( impl_isDisposed() )
return;
- ::cppu::OInterfaceContainerHelper* pIC = m_pData->m_aInterfaceContainer.getContainer( ::getCppuType((const uno::Reference< XMODIFYLISTENER >*)0) );
- if( pIC )
-
- {
- lang::EventObject aEvent( (frame::XModel *)this );
- ::cppu::OInterfaceIteratorHelper aIt( *pIC );
- while( aIt.hasMoreElements() )
- {
- try
- {
- ((XMODIFYLISTENER *)aIt.next())->modified( aEvent );
- }
- catch( uno::RuntimeException& )
- {
- aIt.remove();
- }
- }
- }
+ NotifyModifyListeners_Impl();
}
//________________________________________________________________________________________________________
@@ -2656,6 +2596,17 @@ sal_Bool SfxBaseModel::IsDisposed() const
return ( m_pData == NULL ) ;
}
+sal_Bool SfxBaseModel::IsInitialized() const
+{
+ if ( !m_pData || !m_pData->m_pObjectShell )
+ {
+ OSL_ENSURE( false, "SfxBaseModel::IsInitialized: this should have been caught earlier!" );
+ return sal_False;
+ }
+
+ return m_pData->m_pObjectShell->GetMedium() != NULL;
+}
+
sal_Bool SfxBaseModel::impl_isDisposed() const
{
return ( m_pData == NULL ) ;
@@ -2923,16 +2874,13 @@ void SfxBaseModel::postEvent_Impl( ::rtl::OUString aName )
uno::Reference < container::XIndexAccess > SAL_CALL SfxBaseModel::getViewData() throw(::com::sun::star::uno::RuntimeException)
{
- // object already disposed?
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
if ( m_pData->m_pObjectShell.Is() && !m_pData->m_contViewData.is() )
{
SfxViewFrame *pActFrame = SfxViewFrame::Current();
if ( !pActFrame || pActFrame->GetObjectShell() != m_pData->m_pObjectShell )
- pActFrame = SfxViewFrame::GetFirst(m_pData->m_pObjectShell, TYPE(SfxTopViewFrame));
+ pActFrame = SfxViewFrame::GetFirst( m_pData->m_pObjectShell );
if ( !pActFrame || !pActFrame->GetViewShell() )
// currently no frame for this document at all or View is under construction
@@ -2953,8 +2901,8 @@ uno::Reference < container::XIndexAccess > SAL_CALL SfxBaseModel::getViewData()
sal_Int32 nCount = 0;
uno::Sequence < beans::PropertyValue > aSeq;
::com::sun::star::uno::Any aAny;
- for ( SfxViewFrame *pFrame = SfxViewFrame::GetFirst(m_pData->m_pObjectShell, TYPE(SfxTopViewFrame) ); pFrame;
- pFrame = SfxViewFrame::GetNext(*pFrame, m_pData->m_pObjectShell, TYPE(SfxTopViewFrame) ) )
+ for ( SfxViewFrame *pFrame = SfxViewFrame::GetFirst( m_pData->m_pObjectShell ); pFrame;
+ pFrame = SfxViewFrame::GetNext( *pFrame, m_pData->m_pObjectShell ) )
{
BOOL bIsActive = ( pFrame == pActFrame );
pFrame->GetViewShell()->WriteUserDataSequence( aSeq );
@@ -2969,10 +2917,7 @@ uno::Reference < container::XIndexAccess > SAL_CALL SfxBaseModel::getViewData()
void SAL_CALL SfxBaseModel::setViewData( const uno::Reference < container::XIndexAccess >& aData ) throw(::com::sun::star::uno::RuntimeException)
{
- // object already disposed?
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
m_pData->m_contViewData = aData;
}
@@ -3012,10 +2957,7 @@ sal_Bool SfxBaseModel::hasEventListeners() const
void SAL_CALL SfxBaseModel::addPrintJobListener( const uno::Reference< view::XPrintJobListener >& xListener ) throw (uno::RuntimeException)
{
- // object already disposed?
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- return;
+ SfxModelGuard aGuard( *this, SfxModelGuard::E_INITIALIZING );
if ( impl_getPrintHelper() )
{
@@ -3029,10 +2971,7 @@ void SAL_CALL SfxBaseModel::addPrintJobListener( const uno::Reference< view::XPr
void SAL_CALL SfxBaseModel::removePrintJobListener( const uno::Reference< view::XPrintJobListener >& xListener ) throw (uno::RuntimeException)
{
- // object already disposed?
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- return;
+ SfxModelGuard aGuard( *this );
if ( impl_getPrintHelper() )
{
@@ -3051,7 +2990,7 @@ class SvObject;
sal_Int64 SAL_CALL SfxBaseModel::getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException)
{
::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( !impl_isDisposed() && GetObjectShell() )
+ if ( GetObjectShell() )
{
SvGlobalName aName( aIdentifier );
if ( aName == SvGlobalName( SO3_GLOBAL_CLASSID ) )
@@ -3085,9 +3024,7 @@ void SfxBaseModel::ListenForStorage_Impl( const uno::Reference< embed::XStorage
uno::Reference< XSTORAGE > SAL_CALL SfxBaseModel::getDocumentSubStorage( const ::rtl::OUString& aStorageName, sal_Int32 nMode )
throw ( uno::RuntimeException)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
uno::Reference< XSTORAGE > xResult;
if ( m_pData->m_pObjectShell.Is() )
@@ -3112,9 +3049,7 @@ Sequence< ::rtl::OUString > SAL_CALL SfxBaseModel::getDocumentSubStoragesNames()
throw ( io::IOException,
RuntimeException )
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
Sequence< ::rtl::OUString > aResult;
sal_Int32 nResultSize = 0;
@@ -3153,9 +3088,7 @@ Sequence< ::rtl::OUString > SAL_CALL SfxBaseModel::getDocumentSubStoragesNames()
uno::Reference< script::provider::XScriptProvider > SAL_CALL SfxBaseModel::getScriptProvider()
throw ( uno::RuntimeException )
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
uno::Reference< script::provider::XScriptProvider > xScriptProvider;
@@ -3261,9 +3194,7 @@ static void ConvertSlotsToCommands( SfxObjectShell* pDoc, uno::Reference< contai
uno::Reference< ui::XUIConfigurationManager > SAL_CALL SfxBaseModel::getUIConfigurationManager()
throw ( uno::RuntimeException )
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
if ( !m_pData->m_xUIConfigurationManager.is() )
{
@@ -3379,17 +3310,15 @@ void SAL_CALL SfxBaseModel::setVisualAreaSize( sal_Int64 nAspect, const awt::Siz
uno::Exception,
uno::RuntimeException )
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
if ( !m_pData->m_pObjectShell.Is() )
throw uno::Exception(); // TODO: error handling
- SfxViewFrame* pViewFrm = SfxViewFrame::GetFirst( m_pData->m_pObjectShell, 0, sal_False );
- if ( pViewFrm && m_pData->m_pObjectShell->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED && !pViewFrm->GetFrame()->IsInPlace() )
+ SfxViewFrame* pViewFrm = SfxViewFrame::GetFirst( m_pData->m_pObjectShell, sal_False );
+ if ( pViewFrm && m_pData->m_pObjectShell->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED && !pViewFrm->GetFrame().IsInPlace() )
{
- Window* pWindow = VCLUnoHelper::GetWindow( pViewFrm->GetFrame()->GetFrameInterface()->getContainerWindow() );
+ Window* pWindow = VCLUnoHelper::GetWindow( pViewFrm->GetFrame().GetFrameInterface()->getContainerWindow() );
Size aWinSize = pWindow->GetSizePixel();
awt::Size aCurrent = getVisualAreaSize( nAspect );
Size aDiff( aSize.Width-aCurrent.Width, aSize.Height-aCurrent.Height );
@@ -3413,9 +3342,7 @@ awt::Size SAL_CALL SfxBaseModel::getVisualAreaSize( sal_Int64 /*nAspect*/ )
uno::Exception,
uno::RuntimeException)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
if ( !m_pData->m_pObjectShell.Is() )
throw uno::Exception(); // TODO: error handling
@@ -3444,9 +3371,7 @@ sal_Int32 SAL_CALL SfxBaseModel::getMapUnit( sal_Int64 /*nAspect*/ )
throw ( uno::Exception,
uno::RuntimeException)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
if ( !m_pData->m_pObjectShell.Is() )
throw uno::Exception(); // TODO: error handling
@@ -3460,9 +3385,7 @@ embed::VisualRepresentation SAL_CALL SfxBaseModel::getPreferredVisualRepresentat
uno::Exception,
uno::RuntimeException )
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
datatransfer::DataFlavor aDataFlavor(
::rtl::OUString::createFromAscii( "application/x-openoffice-gdimetafile;windows_formatname=\"GDIMetaFile\"" ),
@@ -3488,44 +3411,34 @@ void SAL_CALL SfxBaseModel::loadFromStorage( const uno::Reference< XSTORAGE >& x
EXCEPTION,
uno::RuntimeException )
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this, SfxModelGuard::E_INITIALIZING );
+ if ( IsInitialized() )
+ throw ::com::sun::star::frame::DoubleInitializationException( ::rtl::OUString(), *this );
- if ( !m_pData->m_pObjectShell.Is() )
- throw IOEXCEPTION(); // TODO:
+ // after i36090 is fixed the pool from object shell can be used
+ // SfxAllItemSet aSet( m_pData->m_pObjectShell->GetPool() );
+ SfxAllItemSet aSet( SFX_APP()->GetPool() );
- if ( m_pData->m_pObjectShell.Is() )
- {
- if( m_pData->m_pObjectShell->GetMedium() )
- // if a Medium is present, the document is already initialized
- throw DOUBLEINITIALIZATIONEXCEPTION();
+ // the BaseURL is part of the ItemSet
+ SfxMedium* pMedium = new SfxMedium( xStorage, String() );
+ TransformParameters( SID_OPENDOC, aMediaDescriptor, aSet );
+ pMedium->GetItemSet()->Put( aSet );
- // after i36090 is fixed the pool from object shell can be used
- // SfxAllItemSet aSet( m_pData->m_pObjectShell->GetPool() );
- SfxAllItemSet aSet( SFX_APP()->GetPool() );
+ // allow to use an interactionhandler (if there is one)
+ pMedium->UseInteractionHandler( TRUE );
- // the BaseURL is part of the ItemSet
- SfxMedium* pMedium = new SfxMedium( xStorage, String() );
- TransformParameters( SID_OPENDOC, aMediaDescriptor, aSet );
- pMedium->GetItemSet()->Put( aSet );
-
- // allow to use an interactionhandler (if there is one)
- pMedium->UseInteractionHandler( TRUE );
-
- SFX_ITEMSET_ARG( &aSet, pTemplateItem, SfxBoolItem, SID_TEMPLATE, sal_False);
- BOOL bTemplate = pTemplateItem && pTemplateItem->GetValue();
- m_pData->m_pObjectShell->SetActivateEvent_Impl( bTemplate ? SFX_EVENT_CREATEDOC : SFX_EVENT_OPENDOC );
- m_pData->m_pObjectShell->Get_Impl()->bOwnsStorage = FALSE;
+ SFX_ITEMSET_ARG( &aSet, pTemplateItem, SfxBoolItem, SID_TEMPLATE, sal_False);
+ BOOL bTemplate = pTemplateItem && pTemplateItem->GetValue();
+ m_pData->m_pObjectShell->SetActivateEvent_Impl( bTemplate ? SFX_EVENT_CREATEDOC : SFX_EVENT_OPENDOC );
+ m_pData->m_pObjectShell->Get_Impl()->bOwnsStorage = FALSE;
- // load document
- if ( !m_pData->m_pObjectShell->DoLoad(pMedium) )
- {
- sal_uInt32 nError = m_pData->m_pObjectShell->GetErrorCode();
- throw task::ErrorCodeIOException( ::rtl::OUString(),
- uno::Reference< uno::XInterface >(),
- nError ? nError : ERRCODE_IO_CANTREAD );
- }
+ // load document
+ if ( !m_pData->m_pObjectShell->DoLoad(pMedium) )
+ {
+ sal_uInt32 nError = m_pData->m_pObjectShell->GetErrorCode();
+ throw task::ErrorCodeIOException( ::rtl::OUString(),
+ uno::Reference< uno::XInterface >(),
+ nError ? nError : ERRCODE_IO_CANTREAD );
}
}
@@ -3536,9 +3449,7 @@ void SAL_CALL SfxBaseModel::storeToStorage( const uno::Reference< XSTORAGE >& xS
EXCEPTION,
uno::RuntimeException )
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
uno::Reference< XSTORAGE > xResult;
if ( !m_pData->m_pObjectShell.Is() )
@@ -3599,9 +3510,7 @@ void SAL_CALL SfxBaseModel::switchToStorage( const uno::Reference< XSTORAGE >& x
EXCEPTION,
uno::RuntimeException )
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
uno::Reference< XSTORAGE > xResult;
if ( !m_pData->m_pObjectShell.Is() )
@@ -3625,9 +3534,7 @@ uno::Reference< XSTORAGE > SAL_CALL SfxBaseModel::getDocumentStorage()
EXCEPTION,
uno::RuntimeException )
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
uno::Reference< XSTORAGE > xResult;
if ( !m_pData->m_pObjectShell.Is() )
@@ -3640,9 +3547,7 @@ void SAL_CALL SfxBaseModel::addStorageChangeListener(
const uno::Reference< document::XStorageChangeListener >& xListener )
throw ( uno::RuntimeException )
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- return;
+ SfxModelGuard aGuard( *this, SfxModelGuard::E_INITIALIZING );
m_pData->m_aInterfaceContainer.addInterface(
::getCppuType((const uno::Reference< document::XStorageChangeListener >*)0), xListener );
@@ -3652,9 +3557,7 @@ void SAL_CALL SfxBaseModel::removeStorageChangeListener(
const uno::Reference< document::XStorageChangeListener >& xListener )
throw ( uno::RuntimeException )
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- return;
+ SfxModelGuard aGuard( *this );
m_pData->m_aInterfaceContainer.removeInterface(
::getCppuType((const uno::Reference< document::XStorageChangeListener >*)0), xListener );
@@ -3680,9 +3583,7 @@ bool SfxBaseModel::impl_getPrintHelper()
void SAL_CALL SfxBaseModel::setIdentifier(const ::rtl::OUString& Identifier)
throw (css::uno::RuntimeException)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- return;
+ SfxModelGuard aGuard( *this );
m_pData->m_sModuleIdentifier = Identifier;
}
@@ -3691,9 +3592,7 @@ bool SfxBaseModel::impl_getPrintHelper()
::rtl::OUString SAL_CALL SfxBaseModel::getIdentifier()
throw (css::uno::RuntimeException)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- return ::rtl::OUString();
+ SfxModelGuard aGuard( *this );
if (m_pData->m_sModuleIdentifier.getLength() > 0)
return m_pData->m_sModuleIdentifier;
if (m_pData->m_pObjectShell)
@@ -3704,10 +3603,7 @@ bool SfxBaseModel::impl_getPrintHelper()
//=============================================================================
css::uno::Reference< css::frame::XTitle > SfxBaseModel::impl_getTitleHelper ()
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
-
- if ( impl_isDisposed() )
- return css::uno::Reference< css::frame::XTitle >();
+ SfxModelGuard aGuard( *this );
if ( ! m_pData->m_xTitleHelper.is ())
{
@@ -3727,10 +3623,7 @@ css::uno::Reference< css::frame::XTitle > SfxBaseModel::impl_getTitleHelper ()
//=============================================================================
css::uno::Reference< css::frame::XUntitledNumbers > SfxBaseModel::impl_getUntitledHelper ()
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
-
- if ( impl_isDisposed() )
- return css::uno::Reference< css::frame::XUntitledNumbers >();
+ SfxModelGuard aGuard( *this );
if ( ! m_pData->m_xNumberedControllers.is ())
{
@@ -3752,10 +3645,7 @@ css::uno::Reference< css::frame::XUntitledNumbers > SfxBaseModel::impl_getUntitl
throw (css::uno::RuntimeException)
{
// SYNCHRONIZED ->
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
-
- if ( impl_isDisposed() )
- return ::rtl::OUString();
+ SfxModelGuard aGuard( *this );
::rtl::OUString aResult = impl_getTitleHelper()->getTitle ();
if ( m_pData->m_pObjectShell )
@@ -3786,10 +3676,7 @@ void SAL_CALL SfxBaseModel::setTitle( const ::rtl::OUString& sTitle )
throw (css::uno::RuntimeException)
{
// SYNCHRONIZED ->
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
-
- if ( impl_isDisposed() )
- return;
+ SfxModelGuard aGuard( *this );
impl_getTitleHelper()->setTitle (sTitle);
}
@@ -3800,10 +3687,7 @@ void SAL_CALL SfxBaseModel::addTitleChangeListener( const css::uno::Reference< c
throw (css::uno::RuntimeException)
{
// SYNCHRONIZED ->
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
-
- if ( impl_isDisposed() )
- return;
+ SfxModelGuard aGuard( *this, SfxModelGuard::E_INITIALIZING );
css::uno::Reference< css::frame::XTitleChangeBroadcaster > xBroadcaster(impl_getTitleHelper(), css::uno::UNO_QUERY);
if (xBroadcaster.is ())
@@ -3816,10 +3700,7 @@ void SAL_CALL SfxBaseModel::removeTitleChangeListener( const css::uno::Reference
throw (css::uno::RuntimeException)
{
// SYNCHRONIZED ->
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
-
- if ( impl_isDisposed() )
- return;
+ SfxModelGuard aGuard( *this );
css::uno::Reference< css::frame::XTitleChangeBroadcaster > xBroadcaster(impl_getTitleHelper(), css::uno::UNO_QUERY);
if (xBroadcaster.is ())
@@ -3832,10 +3713,7 @@ void SAL_CALL SfxBaseModel::removeTitleChangeListener( const css::uno::Reference
throw (css::lang::IllegalArgumentException,
css::uno::RuntimeException )
{
- // object already disposed?
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- return css::frame::UntitledNumbersConst::INVALID_NUMBER;
+ SfxModelGuard aGuard( *this );
return impl_getUntitledHelper ()->leaseNumber (xComponent);
}
@@ -3846,11 +3724,7 @@ void SAL_CALL SfxBaseModel::releaseNumber( ::sal_Int32 nNumber )
throw (css::lang::IllegalArgumentException,
css::uno::RuntimeException )
{
- // object already disposed?
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- return;
-
+ SfxModelGuard aGuard( *this );
impl_getUntitledHelper ()->releaseNumber (nNumber);
}
@@ -3860,11 +3734,7 @@ void SAL_CALL SfxBaseModel::releaseNumberForComponent( const css::uno::Reference
throw (css::lang::IllegalArgumentException,
css::uno::RuntimeException )
{
- // object already disposed?
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- return;
-
+ SfxModelGuard aGuard( *this );
impl_getUntitledHelper ()->releaseNumberForComponent (xComponent);
}
@@ -3873,11 +3743,7 @@ void SAL_CALL SfxBaseModel::releaseNumberForComponent( const css::uno::Reference
::rtl::OUString SAL_CALL SfxBaseModel::getUntitledPrefix()
throw (css::uno::RuntimeException)
{
- // object already disposed?
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- return ::rtl::OUString ();
-
+ SfxModelGuard aGuard( *this );
return impl_getUntitledHelper ()->getUntitledPrefix ();
}
@@ -3886,10 +3752,7 @@ void SAL_CALL SfxBaseModel::releaseNumberForComponent( const css::uno::Reference
css::uno::Reference< css::container::XEnumeration > SAL_CALL SfxBaseModel::getControllers()
throw (css::uno::RuntimeException)
{
- // object already disposed?
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- return css::uno::Reference< css::container::XEnumeration >();
+ SfxModelGuard aGuard( *this );
sal_Int32 c = m_pData->m_seqControllers.getLength();
sal_Int32 i = 0;
@@ -3907,29 +3770,217 @@ css::uno::Reference< css::container::XEnumeration > SAL_CALL SfxBaseModel::getCo
css::uno::Sequence< ::rtl::OUString > SAL_CALL SfxBaseModel::getAvailableViewControllerNames()
throw (css::uno::RuntimeException)
{
- return css::uno::Sequence< ::rtl::OUString >();
+ SfxModelGuard aGuard( *this );
+
+ const SfxObjectFactory& rDocumentFactory = GetObjectShell()->GetFactory();
+ const sal_Int32 nViewFactoryCount = rDocumentFactory.GetViewFactoryCount();
+
+ Sequence< ::rtl::OUString > aViewNames( nViewFactoryCount );
+ for ( sal_Int32 nViewNo = 0; nViewNo < nViewFactoryCount; ++nViewNo )
+ aViewNames[nViewNo] = rDocumentFactory.GetViewFactory( nViewNo ).GetViewName();
+ return aViewNames;
}
//=============================================================================
// css::frame::XModel2
-css::uno::Reference< css::frame::XController2 > SAL_CALL SfxBaseModel::createDefaultViewController(const css::uno::Reference< css::frame::XFrame >& /*Frame*/)
+css::uno::Reference< css::frame::XController2 > SAL_CALL SfxBaseModel::createDefaultViewController( const css::uno::Reference< css::frame::XFrame >& i_rFrame )
throw (css::uno::RuntimeException ,
css::lang::IllegalArgumentException,
css::uno::Exception )
{
- return css::uno::Reference< css::frame::XController2 >();
+ SfxModelGuard aGuard( *this );
+
+ const SfxObjectFactory& rDocumentFactory = GetObjectShell()->GetFactory();
+ const ::rtl::OUString sDefaultViewName = rDocumentFactory.GetViewFactory( 0 ).GetViewName();
+
+ aGuard.clear();
+
+ return createViewController( sDefaultViewName, Sequence< PropertyValue >(), i_rFrame );
+}
+
+//=============================================================================
+namespace sfx { namespace intern {
+
+ /** a class which, in its dtor, cleans up variuos objects (well, at the moment only the frame) collected during
+ the creation of a document view, unless the creation was successful.
+ */
+ class SAL_DLLPRIVATE ViewCreationGuard
+ {
+ public:
+ ViewCreationGuard()
+ :m_bSuccess( false )
+ {
+ }
+
+ ~ViewCreationGuard()
+ {
+ if ( !m_bSuccess )
+ impl_closeAll();
+ }
+
+ void takeFrameOwnership( SfxFrame* i_pFrame )
+ {
+ OSL_PRECOND( !m_aWeakFrame, "ViewCreationGuard::takeFrameOwnership: already have a frame!" );
+ OSL_PRECOND( i_pFrame != NULL, "ViewCreationGuard::takeFrameOwnership: invalid frame!" );
+ m_aWeakFrame = i_pFrame;
+ }
+
+ void releaseAll()
+ {
+ m_bSuccess = true;
+ }
+
+ private:
+ void impl_closeAll()
+ {
+ if ( m_aWeakFrame && !m_aWeakFrame->GetCurrentDocument() )
+ {
+ m_aWeakFrame->SetFrameInterface_Impl( NULL );
+ m_aWeakFrame->DoClose();
+ }
+ }
+
+ private:
+ bool m_bSuccess;
+ SfxFrameWeak m_aWeakFrame;
+ };
+} }
+
+//=============================================================================
+SfxViewFrame* SfxBaseModel::FindOrCreateViewFrame_Impl( const Reference< XFrame >& i_rFrame, ::sfx::intern::ViewCreationGuard& i_rGuard ) const
+{
+ SfxViewFrame* pViewFrame = NULL;
+ for ( pViewFrame = SfxViewFrame::GetFirst( GetObjectShell(), FALSE );
+ pViewFrame;
+ pViewFrame= SfxViewFrame::GetNext( *pViewFrame, GetObjectShell(), FALSE )
+ )
+ {
+ if ( pViewFrame->GetFrame().GetFrameInterface() == i_rFrame )
+ break;
+ }
+ if ( !pViewFrame )
+ {
+ #if OSL_DEBUG_LEVEL > 0
+ for ( SfxFrame* pCheckFrame = SfxFrame::GetFirst();
+ pCheckFrame;
+ pCheckFrame = SfxFrame::GetNext( *pCheckFrame )
+ )
+ {
+ if ( pCheckFrame->GetFrameInterface() == i_rFrame )
+ {
+ if ( ( pCheckFrame->GetCurrentViewFrame() != NULL )
+ || ( pCheckFrame->GetCurrentDocument() != NULL )
+ )
+ // Note that it is perfectly letgitimate that during loading into an XFrame which already contains
+ // a document, there exist two SfxFrame instances bound to this XFrame - the old one, which will be
+ // destroyed later, and the new one, which we're going to create
+ continue;
+
+ OSL_ENSURE( false, "SfxBaseModel::FindOrCreateViewFrame_Impl: there already is an SfxFrame for the given XFrame, but no view in it!" );
+ // nowadays, we're the only instance allowed to create an SfxFrame for an XFrame, so this case here should not happen
+ break;
+ }
+ }
+ #endif
+
+ SfxFrame* pTargetFrame = SfxFrame::Create( i_rFrame );
+ ENSURE_OR_THROW( pTargetFrame, "could not create an SfxFrame" );
+ i_rGuard.takeFrameOwnership( pTargetFrame );
+
+ // prepare it
+ pTargetFrame->PrepareForDoc_Impl( *GetObjectShell() );
+
+ // create view frame
+ pViewFrame = new SfxViewFrame( *pTargetFrame, GetObjectShell() );
+ }
+ return pViewFrame;
}
//=============================================================================
// css::frame::XModel2
-css::uno::Reference< css::frame::XController2 > SAL_CALL SfxBaseModel::createViewController(const ::rtl::OUString& /*ViewName*/,
- const css::uno::Sequence< css::beans::PropertyValue >& /*Arguments*/,
- const css::uno::Reference< css::frame::XFrame >& /*Frame */)
+css::uno::Reference< css::frame::XController2 > SAL_CALL SfxBaseModel::createViewController(
+ const ::rtl::OUString& i_rViewName, const Sequence< PropertyValue >& i_rArguments, const Reference< XFrame >& i_rFrame )
throw (css::uno::RuntimeException ,
css::lang::IllegalArgumentException,
css::uno::Exception )
{
- return css::uno::Reference< css::frame::XController2 >();
+ SfxModelGuard aGuard( *this );
+
+ if ( !i_rFrame.is() )
+ throw css::lang::IllegalArgumentException( ::rtl::OUString(), *this, 3 );
+
+ // find the proper SFX view factory
+ SfxViewFactory* pViewFactory = GetObjectShell()->GetFactory().GetViewFactoryByViewName( i_rViewName );
+ if ( !pViewFactory )
+ throw IllegalArgumentException( ::rtl::OUString(), *this, 1 );
+
+ // determine previous shell (used in some special cases)
+ Reference< XController > xPreviousController( i_rFrame->getController() );
+ const Reference< XModel > xMe( this );
+ if ( ( xPreviousController.is() )
+ && ( xMe != xPreviousController->getModel() )
+ )
+ {
+ xPreviousController.clear();
+ }
+ SfxViewShell* pOldViewShell = SfxViewShell::Get( xPreviousController );
+ OSL_ENSURE( !xPreviousController.is() || ( pOldViewShell != NULL ),
+ "SfxBaseModel::createViewController: invalid old controller!" );
+
+ // a guard which will clean up in case of failure
+ ::sfx::intern::ViewCreationGuard aViewCreationGuard;
+
+ // determine the ViewFrame belonging to the given XFrame
+ SfxViewFrame* pViewFrame = FindOrCreateViewFrame_Impl( i_rFrame, aViewCreationGuard );
+ OSL_POSTCOND( pViewFrame, "SfxBaseModel::createViewController: no frame?" );
+
+ // delegate to SFX' view factory
+ pViewFrame->GetBindings().ENTERREGISTRATIONS();
+ SfxViewShell* pViewShell = pViewFactory->CreateInstance( pViewFrame, pOldViewShell );
+ pViewFrame->GetBindings().LEAVEREGISTRATIONS();
+ ENSURE_OR_THROW( pViewShell, "invalid view shell provided by factory" );
+
+ // by setting the ViewShell it is prevented that disposing the Controller will destroy this ViewFrame also
+ pViewFrame->GetDispatcher()->SetDisableFlags( 0 );
+ pViewFrame->SetViewShell_Impl( pViewShell );
+
+ // remember ViewID
+ pViewFrame->SetCurViewId_Impl( pViewFactory->GetOrdinal() );
+
+ // ensure a default controller, if the view shell did not provide an own implementation
+ if ( !pViewShell->GetController().is() )
+ pViewShell->SetController( new SfxBaseController( pViewShell ) );
+
+ // pass the creation arguments to the controller
+ SfxBaseController* pBaseController = pViewShell->GetBaseController_Impl();
+ ENSURE_OR_THROW( pBaseController, "invalid controller implementation!" );
+ pBaseController->SetCreationArguments_Impl( i_rArguments );
+
+ // some initial view settings, coming from our most recent attachResource call
+ ::comphelper::NamedValueCollection aDocumentLoadArgs( getArgs() );
+ if ( aDocumentLoadArgs.getOrDefault( "ViewOnly", false ) )
+ pViewFrame->GetFrame().SetMenuBarOn_Impl( FALSE );
+
+ const sal_Int16 nPluginMode = aDocumentLoadArgs.getOrDefault( "PluginMode", sal_Int16( 0 ) );
+ if ( nPluginMode == 1 )
+ {
+ pViewFrame->ForceOuterResize_Impl( FALSE );
+ pViewFrame->GetBindings().HidePopups( TRUE );
+
+ SfxFrame& rFrame = pViewFrame->GetFrame();
+ // MBA: layoutmanager of inplace frame starts locked and invisible
+ rFrame.GetWorkWindow_Impl()->MakeVisible_Impl( FALSE );
+ rFrame.GetWorkWindow_Impl()->Lock_Impl( TRUE );
+
+ rFrame.GetWindow().SetBorderStyle( WINDOW_BORDER_NOBORDER );
+ pViewFrame->GetWindow().SetBorderStyle( WINDOW_BORDER_NOBORDER );
+ }
+
+ // tell the guard we were successful
+ aViewCreationGuard.releaseAll();
+
+ // outta gere
+ return pBaseController;
}
//=============================================================================
@@ -3939,9 +3990,7 @@ css::uno::Reference< css::frame::XController2 > SAL_CALL SfxBaseModel::createVie
uno::Reference< rdf::XRepository > SAL_CALL
SfxBaseModel::getRDFRepository() throw (uno::RuntimeException)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
const uno::Reference<rdf::XDocumentMetadataAccess> xDMA(m_pData->GetDMA());
if (!xDMA.is()) {
@@ -3956,9 +4005,7 @@ SfxBaseModel::getRDFRepository() throw (uno::RuntimeException)
::rtl::OUString SAL_CALL
SfxBaseModel::getStringValue() throw (uno::RuntimeException)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
const uno::Reference<rdf::XDocumentMetadataAccess> xDMA(m_pData->GetDMA());
if (!xDMA.is()) {
@@ -3973,9 +4020,7 @@ SfxBaseModel::getStringValue() throw (uno::RuntimeException)
::rtl::OUString SAL_CALL
SfxBaseModel::getNamespace() throw (uno::RuntimeException)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
const uno::Reference<rdf::XDocumentMetadataAccess> xDMA(m_pData->GetDMA());
if (!xDMA.is()) {
@@ -3989,9 +4034,7 @@ SfxBaseModel::getNamespace() throw (uno::RuntimeException)
::rtl::OUString SAL_CALL
SfxBaseModel::getLocalName() throw (uno::RuntimeException)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
const uno::Reference<rdf::XDocumentMetadataAccess> xDMA(m_pData->GetDMA());
if (!xDMA.is()) {
@@ -4008,9 +4051,7 @@ SfxBaseModel::getElementByMetadataReference(
const ::com::sun::star::beans::StringPair & i_rReference)
throw (uno::RuntimeException)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
const uno::Reference<rdf::XDocumentMetadataAccess> xDMA(m_pData->GetDMA());
if (!xDMA.is()) {
@@ -4025,9 +4066,7 @@ uno::Reference< rdf::XMetadatable > SAL_CALL
SfxBaseModel::getElementByURI(const uno::Reference< rdf::XURI > & i_xURI)
throw (uno::RuntimeException, lang::IllegalArgumentException)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
const uno::Reference<rdf::XDocumentMetadataAccess> xDMA(m_pData->GetDMA());
if (!xDMA.is()) {
@@ -4043,9 +4082,7 @@ SfxBaseModel::getMetadataGraphsWithType(
const uno::Reference<rdf::XURI> & i_xType)
throw (uno::RuntimeException, lang::IllegalArgumentException)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
const uno::Reference<rdf::XDocumentMetadataAccess> xDMA(m_pData->GetDMA());
if (!xDMA.is()) {
@@ -4062,9 +4099,7 @@ SfxBaseModel::addMetadataFile(const ::rtl::OUString & i_rFileName,
throw (uno::RuntimeException, lang::IllegalArgumentException,
container::ElementExistException)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
const uno::Reference<rdf::XDocumentMetadataAccess> xDMA(m_pData->GetDMA());
if (!xDMA.is()) {
@@ -4085,9 +4120,7 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
datatransfer::UnsupportedFlavorException,
container::ElementExistException, rdf::ParseException, io::IOException)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
const uno::Reference<rdf::XDocumentMetadataAccess> xDMA(m_pData->GetDMA());
if (!xDMA.is()) {
@@ -4105,9 +4138,7 @@ SfxBaseModel::removeMetadataFile(
throw (uno::RuntimeException, lang::IllegalArgumentException,
container::NoSuchElementException)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
const uno::Reference<rdf::XDocumentMetadataAccess> xDMA(m_pData->GetDMA());
if (!xDMA.is()) {
@@ -4123,9 +4154,7 @@ SfxBaseModel::addContentOrStylesFile(const ::rtl::OUString & i_rFileName)
throw (uno::RuntimeException, lang::IllegalArgumentException,
container::ElementExistException)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
const uno::Reference<rdf::XDocumentMetadataAccess> xDMA(m_pData->GetDMA());
if (!xDMA.is()) {
@@ -4141,9 +4170,7 @@ SfxBaseModel::removeContentOrStylesFile(const ::rtl::OUString & i_rFileName)
throw (uno::RuntimeException, lang::IllegalArgumentException,
container::NoSuchElementException)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
const uno::Reference<rdf::XDocumentMetadataAccess> xDMA(m_pData->GetDMA());
if (!xDMA.is()) {
@@ -4162,9 +4189,7 @@ SfxBaseModel::loadMetadataFromStorage(
throw (uno::RuntimeException, lang::IllegalArgumentException,
lang::WrappedTargetException)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
const uno::Reference<rdf::XDocumentMetadataAccess> xDMA(
m_pData->CreateDMAUninitialized());
@@ -4192,9 +4217,7 @@ SfxBaseModel::storeMetadataToStorage(
throw (uno::RuntimeException, lang::IllegalArgumentException,
lang::WrappedTargetException)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
const uno::Reference<rdf::XDocumentMetadataAccess> xDMA(m_pData->GetDMA());
if (!xDMA.is()) {
@@ -4211,9 +4234,7 @@ SfxBaseModel::loadMetadataFromMedium(
throw (uno::RuntimeException, lang::IllegalArgumentException,
lang::WrappedTargetException)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
const uno::Reference<rdf::XDocumentMetadataAccess> xDMA(
m_pData->CreateDMAUninitialized());
@@ -4240,9 +4261,7 @@ SfxBaseModel::storeMetadataToMedium(
throw (uno::RuntimeException, lang::IllegalArgumentException,
lang::WrappedTargetException)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( impl_isDisposed() )
- throw lang::DisposedException();
+ SfxModelGuard aGuard( *this );
const uno::Reference<rdf::XDocumentMetadataAccess> xDMA(m_pData->GetDMA());
if (!xDMA.is()) {
diff --git a/sfx2/source/doc/sfxmodelfactory.cxx b/sfx2/source/doc/sfxmodelfactory.cxx
index e35bc41000c9..714dfc2ea824 100644
--- a/sfx2/source/doc/sfxmodelfactory.cxx
+++ b/sfx2/source/doc/sfxmodelfactory.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: sfxmodelfactory.cxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -152,7 +149,8 @@ namespace sfx2
static bool isSpecialArgumentName( const ::rtl::OUString& _rValueName )
{
return _rValueName.equalsAscii( "EmbeddedObject" )
- || _rValueName.equalsAscii( "EmbeddedScriptSupport" );
+ || _rValueName.equalsAscii( "EmbeddedScriptSupport" )
+ || _rValueName.equalsAscii( "DocumentRecoverySupport" );
}
bool operator()( const Any& _rArgument ) const
@@ -174,15 +172,17 @@ namespace sfx2
::comphelper::NamedValueCollection aArgs( _rArguments );
const sal_Bool bEmbeddedObject = aArgs.getOrDefault( "EmbeddedObject", sal_False );
const sal_Bool bScriptSupport = aArgs.getOrDefault( "EmbeddedScriptSupport", sal_True );
+ const sal_Bool bDocRecoverySupport = aArgs.getOrDefault( "DocumentRecoverySupport", sal_True );
sal_uInt64 nCreationFlags =
( bEmbeddedObject ? SFXMODEL_EMBEDDED_OBJECT : 0 )
- | ( bScriptSupport ? 0 : SFXMODEL_DISABLE_EMBEDDED_SCRIPTS );
+ | ( bScriptSupport ? 0 : SFXMODEL_DISABLE_EMBEDDED_SCRIPTS )
+ | ( bDocRecoverySupport ? 0 : SFXMODEL_DISABLE_DOCUMENT_RECOVERY );
Reference< XInterface > xInstance( impl_createInstance( nCreationFlags ) );
// to mimic the bahaviour of the default factory's createInstanceWithArguments, we initialize
- // the object with the given arguments, stripped by the two special ones
+ // the object with the given arguments, stripped by the three special ones
Sequence< Any > aStrippedArguments( _rArguments.getLength() );
Any* pStrippedArgs = aStrippedArguments.getArray();
Any* pStrippedArgsEnd = ::std::remove_copy_if(
diff --git a/sfx2/source/explorer/makefile.mk b/sfx2/source/explorer/makefile.mk
index dd70d7a60b71..75a15ebdb862 100644
--- a/sfx2/source/explorer/makefile.mk
+++ b/sfx2/source/explorer/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.13 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sfx2/source/explorer/nochaos.cxx b/sfx2/source/explorer/nochaos.cxx
index 4c7a1fcbe102..63c165bea7eb 100644
--- a/sfx2/source/explorer/nochaos.cxx
+++ b/sfx2/source/explorer/nochaos.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: nochaos.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/sfx2/source/inc/SfxDocumentMetaData.hxx b/sfx2/source/inc/SfxDocumentMetaData.hxx
index f6ecc41b6da3..ec573cf007a7 100644
--- a/sfx2/source/inc/SfxDocumentMetaData.hxx
+++ b/sfx2/source/inc/SfxDocumentMetaData.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: SfxDocumentMetaData.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/sfx2/source/inc/alienwarn.hxx b/sfx2/source/inc/alienwarn.hxx
index 20dd3e5cc300..f7c38173fceb 100644
--- a/sfx2/source/inc/alienwarn.hxx
+++ b/sfx2/source/inc/alienwarn.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: alienwarn.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/sfx2/source/inc/appbas.hxx b/sfx2/source/inc/appbas.hxx
index c46f71d0e0c5..8b10fcb843de 100644
--- a/sfx2/source/inc/appbas.hxx
+++ b/sfx2/source/inc/appbas.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: appbas.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/sfx2/source/inc/appbaslib.hxx b/sfx2/source/inc/appbaslib.hxx
index 278a221c234f..5bc7662e8f9b 100644
--- a/sfx2/source/inc/appbaslib.hxx
+++ b/sfx2/source/inc/appbaslib.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: appbaslib.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/sfx2/source/inc/appdata.hxx b/sfx2/source/inc/appdata.hxx
index 8b0420ef1e97..91305eb95cce 100644
--- a/sfx2/source/inc/appdata.hxx
+++ b/sfx2/source/inc/appdata.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: appdata.hxx,v $
- * $Revision: 1.19 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -55,7 +52,6 @@ class SfxFilterMatcher;
class SvUShorts;
class ISfxTemplateCommon;
class SfxFilterMatcher;
-class SfxCancelManager;
class SfxStatusDispatcher;
class SfxDdeTriggerTopic_Impl;
class SfxDocumentTemplates;
@@ -111,7 +107,6 @@ public:
// application members
SfxFilterMatcher* pMatcher;
- SfxCancelManager* pCancelMgr;
ResMgr* pLabelResMgr;
SfxStatusDispatcher* pAppDispatch;
SfxDocumentTemplates* pTemplates;
diff --git a/sfx2/source/inc/applet.hxx b/sfx2/source/inc/applet.hxx
index f8906a7670dd..5b7d61ebe314 100644
--- a/sfx2/source/inc/applet.hxx
+++ b/sfx2/source/inc/applet.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: applet.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/sfx2/source/inc/doctemplates.hxx b/sfx2/source/inc/doctemplates.hxx
index f10c95edb86d..5e962b93a117 100644
--- a/sfx2/source/inc/doctemplates.hxx
+++ b/sfx2/source/inc/doctemplates.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: doctemplates.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/sfx2/source/inc/eventsupplier.hxx b/sfx2/source/inc/eventsupplier.hxx
index a720c2369cf5..e012eea39c2d 100644
--- a/sfx2/source/inc/eventsupplier.hxx
+++ b/sfx2/source/inc/eventsupplier.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: eventsupplier.hxx,v $
- * $Revision: 1.14.28.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sfx2/source/inc/fltfnc.hxx b/sfx2/source/inc/fltfnc.hxx
index e5cd41eff809..0a078a33c5be 100644
--- a/sfx2/source/inc/fltfnc.hxx
+++ b/sfx2/source/inc/fltfnc.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: fltfnc.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/sfx2/source/inc/fltoptint.hxx b/sfx2/source/inc/fltoptint.hxx
index 9ea1f77bf083..b4aed7ccdd99 100644
--- a/sfx2/source/inc/fltoptint.hxx
+++ b/sfx2/source/inc/fltoptint.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: fltoptint.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/sfx2/source/inc/helper.hxx b/sfx2/source/inc/helper.hxx
index 16eabab43a7e..45aed74b154a 100644
--- a/sfx2/source/inc/helper.hxx
+++ b/sfx2/source/inc/helper.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: helper.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/sfx2/source/inc/helpid.hrc b/sfx2/source/inc/helpid.hrc
index b8beacafee3a..29ad461d18da 100644
--- a/sfx2/source/inc/helpid.hrc
+++ b/sfx2/source/inc/helpid.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: helpid.hrc,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/sfx2/source/inc/hexplwnd.hxx b/sfx2/source/inc/hexplwnd.hxx
index d3c90813ba1f..228ce78949b9 100644
--- a/sfx2/source/inc/hexplwnd.hxx
+++ b/sfx2/source/inc/hexplwnd.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: hexplwnd.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/sfx2/source/inc/iframe.hxx b/sfx2/source/inc/iframe.hxx
index 9abfd70ab663..041ffac822b7 100644
--- a/sfx2/source/inc/iframe.hxx
+++ b/sfx2/source/inc/iframe.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: iframe.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/sfx2/source/inc/intro.hxx b/sfx2/source/inc/intro.hxx
index 007e0473bc13..1b09008c0778 100644
--- a/sfx2/source/inc/intro.hxx
+++ b/sfx2/source/inc/intro.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: intro.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/sfx2/source/inc/mailmodel.hxx b/sfx2/source/inc/mailmodel.hxx
index 20e47a7c471c..43e938d46800 100644
--- a/sfx2/source/inc/mailmodel.hxx
+++ b/sfx2/source/inc/mailmodel.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: mailmodel.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/sfx2/source/inc/mnucfga.hxx b/sfx2/source/inc/mnucfga.hxx
index 76fbb4386898..bbc3c1cd63ac 100644
--- a/sfx2/source/inc/mnucfga.hxx
+++ b/sfx2/source/inc/mnucfga.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: mnucfga.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/sfx2/source/inc/nfltdlg.hxx b/sfx2/source/inc/nfltdlg.hxx
index 9d0fa68e0cbd..371fa96c57a2 100644
--- a/sfx2/source/inc/nfltdlg.hxx
+++ b/sfx2/source/inc/nfltdlg.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: nfltdlg.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/sfx2/source/inc/nochaos.hxx b/sfx2/source/inc/nochaos.hxx
index 17cb5fd9e045..4b5d7fb1f40e 100644
--- a/sfx2/source/inc/nochaos.hxx
+++ b/sfx2/source/inc/nochaos.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: nochaos.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/sfx2/source/inc/objmnctl.hxx b/sfx2/source/inc/objmnctl.hxx
index 7d1768b7689c..e58c6cd5592d 100644
--- a/sfx2/source/inc/objmnctl.hxx
+++ b/sfx2/source/inc/objmnctl.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: objmnctl.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/sfx2/source/inc/objshimp.hxx b/sfx2/source/inc/objshimp.hxx
index fed465c69986..a882cfedd821 100644
--- a/sfx2/source/inc/objshimp.hxx
+++ b/sfx2/source/inc/objshimp.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: objshimp.hxx,v $
- * $Revision: 1.46 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -35,6 +32,7 @@
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/uno/Sequence.hxx>
#include <rtl/ustring.hxx>
+#include <rtl/ref.hxx>
#include <com/sun/star/logging/XSimpleLogRing.hpp>
#include <tools/datetime.hxx>
@@ -59,14 +57,11 @@ struct MarkData_Impl
class SfxFrame;
class SfxToolBoxConfig;
-class SfxAcceleratorManager;
class SfxBasicManagerHolder;
struct SfxObjectShell_Impl : public ::sfx2::IMacroDocumentAccess
{
::comphelper::EmbeddedObjectContainer* mpObjectContainer;
- SfxAcceleratorManager* pAccMgr;
- SfxConfigManager* pCfgMgr;
SfxBasicManagerHolder*
pBasicManager;
SfxObjectShell& rDocShell;
@@ -84,10 +79,8 @@ struct SfxObjectShell_Impl : public ::sfx2::IMacroDocumentAccess
sal_uInt16 nVisualDocumentNumber;
sal_Int16 nDocumentSignatureState;
sal_Int16 nScriptingSignatureState;
- sal_Bool bTemplateConfig:1,
- bInList:1, // ob per First/Next erreichbar
+ sal_Bool bInList:1, // ob per First/Next erreichbar
bClosing:1, // sal_True w"aehrend Close(), um Benachrichtigungs-Rekursionen zu verhindern
- bSetInPlaceObj:1, // sal_True, falls bereits versucht wurde pInPlaceObject zu casten
bIsSaving:1,
bPasswd:1,
bIsTmp:1,
@@ -98,14 +91,8 @@ struct SfxObjectShell_Impl : public ::sfx2::IMacroDocumentAccess
bInPrepareClose : 1,
bPreparedForClose : 1,
bWaitingForPicklist : 1,// Muss noch in die Pickliste
- bModuleSearched : 1,
- bIsHelpObjSh : 1,
- bForbidCaching : 1,
bForbidReload : 1,
- bSupportsEventMacros: 1,
- bLoadingWindows: 1,
bBasicInitialized :1,
- //bHidden :1, // indicates a hidden view shell
bIsPrintJobCancelable :1, // Stampit disable/enable cancel button for print jobs ... default = true = enable!
bOwnsStorage:1,
bNoBaseURL:1,
@@ -115,6 +102,7 @@ struct SfxObjectShell_Impl : public ::sfx2::IMacroDocumentAccess
bPreserveVersions:1,
m_bMacroSignBroken:1, // whether the macro signature was explicitly broken
m_bNoBasicCapabilities:1,
+ m_bDocRecoverySupport:1,
bQueryLoadTemplate:1,
bLoadReadonly:1,
bUseUserData:1,
@@ -122,36 +110,25 @@ struct SfxObjectShell_Impl : public ::sfx2::IMacroDocumentAccess
m_bSharedXMLFlag:1, // whether the flag should be stored in xml file
m_bAllowShareControlFileClean:1; // whether the flag should be stored in xml file
- String aNewName; // Der Name, unter dem das Doc gespeichert
- // werden soll
IndexBitSet aBitSet;
sal_uInt32 lErr;
sal_uInt16 nEventId; // falls vor Activate noch ein
// Open/Create gesendet werden mu/s
- sal_Bool bDoNotTouchDocInfo;
-
AutoReloadTimer_Impl *pReloadTimer;
MarkData_Impl* pMarkData;
sal_uInt16 nLoadedFlags;
sal_uInt16 nFlagsInProgress;
- String aMark;
- Size aViewSize; // wird leider vom Writer beim
- sal_Bool bInFrame; // HTML-Import gebraucht
sal_Bool bModalMode;
sal_Bool bRunningMacro;
sal_Bool bReloadAvailable;
sal_uInt16 nAutoLoadLocks;
SfxModule* pModule;
- SfxFrame* pFrame;
- SfxToolBoxConfig* pTbxConfig;
SfxObjectShellFlags eFlags;
- svtools::AsynchronLink* pCloser;
- String aBaseURL;
sal_Bool bReadOnlyUI;
SvRefBaseRef xHeaderAttributes;
sal_Bool bHiddenLockedByAPI;
- sal_Bool bInCloseEvent;
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > xModel;
+ ::rtl::Reference< SfxBaseModel >
+ pBaseModel;
sal_uInt16 nStyleFilter;
sal_Bool bDisposing;
@@ -164,9 +141,6 @@ struct SfxObjectShell_Impl : public ::sfx2::IMacroDocumentAccess
sal_Bool m_bCreateTempStor;
::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > m_xDocStorage;
- ::com::sun::star::uno::Reference<
- ::com::sun::star::util::XModifyListener > m_xDocInfoListener;
-
sal_Bool m_bIsInit;
::rtl::OUString m_aSharedFileURL;
diff --git a/sfx2/source/inc/openflag.hxx b/sfx2/source/inc/openflag.hxx
index d6abac5f4079..5b719095eae8 100644
--- a/sfx2/source/inc/openflag.hxx
+++ b/sfx2/source/inc/openflag.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: openflag.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/sfx2/source/inc/ownsubfilterservice.hxx b/sfx2/source/inc/ownsubfilterservice.hxx
index f038ff26a9e1..f800e1e253ae 100644
--- a/sfx2/source/inc/ownsubfilterservice.hxx
+++ b/sfx2/source/inc/ownsubfilterservice.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: ownsubfilterservice.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/sfx2/source/inc/partwnd.hxx b/sfx2/source/inc/partwnd.hxx
index 122e6ce91341..4a485e3cc91f 100644
--- a/sfx2/source/inc/partwnd.hxx
+++ b/sfx2/source/inc/partwnd.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: partwnd.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/sfx2/source/inc/plugin.hxx b/sfx2/source/inc/plugin.hxx
index f258ca720b15..a9d3ce2f1e72 100644
--- a/sfx2/source/inc/plugin.hxx
+++ b/sfx2/source/inc/plugin.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: plugin.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/sfx2/source/inc/preview.hxx b/sfx2/source/inc/preview.hxx
index d608639ee4ac..f247a2570cf9 100644
--- a/sfx2/source/inc/preview.hxx
+++ b/sfx2/source/inc/preview.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: preview.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/sfx2/source/inc/recfloat.hxx b/sfx2/source/inc/recfloat.hxx
index a70b6fd4b40a..5667a6c1e67a 100644
--- a/sfx2/source/inc/recfloat.hxx
+++ b/sfx2/source/inc/recfloat.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: recfloat.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/sfx2/source/inc/referers.hxx b/sfx2/source/inc/referers.hxx
index 897e58592baf..6c938861d013 100644
--- a/sfx2/source/inc/referers.hxx
+++ b/sfx2/source/inc/referers.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: referers.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/sfx2/source/inc/sfxlocal.hrc b/sfx2/source/inc/sfxlocal.hrc
index bc7d267d75d8..fb21cb0ab13c 100644
--- a/sfx2/source/inc/sfxlocal.hrc
+++ b/sfx2/source/inc/sfxlocal.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: sfxlocal.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/sfx2/source/inc/sfxpicklist.hxx b/sfx2/source/inc/sfxpicklist.hxx
index 6e502bd9d7ad..8b5069f20296 100644
--- a/sfx2/source/inc/sfxpicklist.hxx
+++ b/sfx2/source/inc/sfxpicklist.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: sfxpicklist.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/sfx2/source/inc/sfxtypes.hxx b/sfx2/source/inc/sfxtypes.hxx
index 200795f3f374..73014121541e 100644
--- a/sfx2/source/inc/sfxtypes.hxx
+++ b/sfx2/source/inc/sfxtypes.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: sfxtypes.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/sfx2/source/inc/sfxurlrelocator.hxx b/sfx2/source/inc/sfxurlrelocator.hxx
index 1ef45bca59b8..8acc674b3568 100644
--- a/sfx2/source/inc/sfxurlrelocator.hxx
+++ b/sfx2/source/inc/sfxurlrelocator.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: sfxurlrelocator.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/sfx2/source/inc/slotserv.hxx b/sfx2/source/inc/slotserv.hxx
index e53bde55c96d..9b0a8e94733c 100644
--- a/sfx2/source/inc/slotserv.hxx
+++ b/sfx2/source/inc/slotserv.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: slotserv.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/sfx2/source/inc/speakerdlg.hxx b/sfx2/source/inc/speakerdlg.hxx
deleted file mode 100644
index b3d16cd578cf..000000000000
--- a/sfx2/source/inc/speakerdlg.hxx
+++ /dev/null
@@ -1,70 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: speakerdlg.hxx,v $
- * $Revision: 1.3 $
- *
- * 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 _SPEAKERDLG_HXX
-#define _SPEAKERDLG_HXX
-
-#ifndef _GOODIES_RECOGNIZER_HXX_
-#include <goodies/recognizer.hxx>
-#endif
-
-#ifndef _DIALOG_HXX
-#include <vcl/dialog.hxx>
-#endif
-#ifndef _BUTTON_HXX
-#include <vcl/button.hxx>
-#endif
-#ifndef _LSTBOX_HXX
-#include <vcl/lstbox.hxx>
-#endif
-
-// ---------------
-// - SfxSpeakerDlg -
-// ---------------
-
-class SfxSpeakerDlg: public ModalDialog
-{
- OKButton aBtnOK;
- CancelButton aBtnCancel;
- ListBox aListBox;
- CharSet aCharSet;
-
- OSpeakerManagerRef m_aSpeakerMgr;
-
-public:
-
- SfxSpeakerDlg(Window *pParent, OSpeakerManagerRef& aSpeakerMgr);
- ~SfxSpeakerDlg();
-
- virtual short Execute();
-};
-
-
-#endif // _SPEAKER_HXX
diff --git a/sfx2/source/inc/splitwin.hxx b/sfx2/source/inc/splitwin.hxx
index 2d6404371912..5105d27dd536 100644
--- a/sfx2/source/inc/splitwin.hxx
+++ b/sfx2/source/inc/splitwin.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: splitwin.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/sfx2/source/inc/statcach.hxx b/sfx2/source/inc/statcach.hxx
index 84d045d2a14b..03b0d72dac61 100644
--- a/sfx2/source/inc/statcach.hxx
+++ b/sfx2/source/inc/statcach.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: statcach.hxx,v $
- * $Revision: 1.10.180.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx
index b4ea96c1ed4e..116f56163681 100644
--- a/sfx2/source/inc/templdgi.hxx
+++ b/sfx2/source/inc/templdgi.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: templdgi.hxx,v $
- * $Revision: 1.18.46.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sfx2/source/inc/tplcitem.hxx b/sfx2/source/inc/tplcitem.hxx
index aad0738214f7..f97d7f89868c 100644
--- a/sfx2/source/inc/tplcitem.hxx
+++ b/sfx2/source/inc/tplcitem.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: tplcitem.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/sfx2/source/inc/tplcomp.hxx b/sfx2/source/inc/tplcomp.hxx
index 1dceb6bba39b..c172efb15d87 100644
--- a/sfx2/source/inc/tplcomp.hxx
+++ b/sfx2/source/inc/tplcomp.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: tplcomp.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/sfx2/source/inc/versdlg.hxx b/sfx2/source/inc/versdlg.hxx
index a5b637918e14..73b686d91252 100644
--- a/sfx2/source/inc/versdlg.hxx
+++ b/sfx2/source/inc/versdlg.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: versdlg.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/sfx2/source/inc/virtmenu.hxx b/sfx2/source/inc/virtmenu.hxx
index aecb2c0cf4cb..4b000133d11c 100644
--- a/sfx2/source/inc/virtmenu.hxx
+++ b/sfx2/source/inc/virtmenu.hxx
@@ -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: virtmenu.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/sfx2/source/inc/workwin.hxx b/sfx2/source/inc/workwin.hxx
index 59b9d29c479d..ae005d1bad88 100644
--- a/sfx2/source/inc/workwin.hxx
+++ b/sfx2/source/inc/workwin.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: workwin.hxx,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/sfx2/source/inet/inettbc.cxx b/sfx2/source/inet/inettbc.cxx
index de399eaaa956..4ac85a7c98fe 100644
--- a/sfx2/source/inet/inettbc.cxx
+++ b/sfx2/source/inet/inettbc.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: inettbc.cxx,v $
- * $Revision: 1.37 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -42,7 +39,6 @@
#include <com/sun/star/task/XInteractionHandler.hpp>
#include <svl/eitem.hxx>
#include <svl/stritem.hxx>
-#include <svl/cancel.hxx>
#include <unotools/historyoptions.hxx>
#include <svl/folderrestriction.hxx>
#include <vcl/toolbox.hxx>
@@ -305,102 +301,3 @@ void SfxURLToolBoxControl_Impl::StateChanged
}
}
-//***************************************************************************
-// SfxCancelToolBoxControl_Impl
-//***************************************************************************
-
-SFX_IMPL_TOOLBOX_CONTROL(SfxCancelToolBoxControl_Impl,SfxBoolItem)
-
-//***************************************************************************
-
-SfxCancelToolBoxControl_Impl::SfxCancelToolBoxControl_Impl( USHORT nSlotId, USHORT nId, ToolBox& rBox ) :
- SfxToolBoxControl( nSlotId, nId, rBox )
-{
-}
-
-//***************************************************************************
-
-SfxPopupWindowType SfxCancelToolBoxControl_Impl::GetPopupWindowType() const
-{
- return SFX_POPUPWINDOW_ONTIMEOUT;
-}
-
-//***************************************************************************
-
-SfxPopupWindow* SfxCancelToolBoxControl_Impl::CreatePopupWindow()
-{
- PopupMenu aMenu;
- BOOL bExecute = FALSE, bSeparator = FALSE;
- USHORT nIndex = 1;
- for ( SfxCancelManager *pCancelMgr = SfxViewFrame::Current()->GetTopViewFrame()->GetCancelManager();
- pCancelMgr;
- pCancelMgr = pCancelMgr->GetParent() )
- {
- for ( USHORT n=0; n<pCancelMgr->GetCancellableCount(); ++n )
- {
- if ( !n && bSeparator )
- {
- aMenu.InsertSeparator();
- bSeparator = FALSE;
- }
- String aItemText = pCancelMgr->GetCancellable(n)->GetTitle();
- if ( aItemText.Len() > 50 )
- {
- aItemText.Erase( 48 );
- aItemText += DEFINE_CONST_UNICODE("...");
- }
- aMenu.InsertItem( nIndex++, aItemText );
- bExecute = TRUE;
- bSeparator = TRUE;
- }
- }
-
- ToolBox& rToolBox = GetToolBox();
- USHORT nId = bExecute ? aMenu.Execute( &rToolBox, rToolBox.GetPointerPosPixel() ) : 0;
- GetToolBox().EndSelection();
-// ClearCache();
-// UpdateSlot();
- if ( nId )
- {
- String aSearchText = aMenu.GetItemText(nId);
- for ( SfxCancelManager *pCancelMgr = SfxViewFrame::Current()->GetTopViewFrame()->GetCancelManager();
- pCancelMgr;
- pCancelMgr = pCancelMgr->GetParent() )
- {
- for ( USHORT n = 0; n < pCancelMgr->GetCancellableCount(); ++n )
- {
- SfxCancellable *pCancel = pCancelMgr->GetCancellable(n);
- String aItemText = pCancel->GetTitle();
- if ( aItemText.Len() > 50 )
- {
- aItemText.Erase( 48 );
- aItemText += DEFINE_CONST_UNICODE("...");
- }
-
- if ( aItemText == aSearchText )
- {
- pCancel->Cancel();
- return 0;
- }
- }
- }
-
- }
-
- return 0;
-}
-
-//***************************************************************************
-
-void SfxCancelToolBoxControl_Impl::StateChanged
-(
- USHORT nSID,
- SfxItemState eState,
- const SfxPoolItem* pState
-)
-{
- SfxVoidItem aVoidItem( nSID );
- //SfxToolBoxControl::StateChanged( nSID, eState, pState ? &aVoidItem : 0 );
- SfxToolBoxControl::StateChanged( nSID, eState, pState );
-}
-
diff --git a/sfx2/source/inet/makefile.mk b/sfx2/source/inet/makefile.mk
index 0460834fdd16..9347e68a2cdb 100644
--- a/sfx2/source/inet/makefile.mk
+++ b/sfx2/source/inet/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/sfx2/source/layout/factory.cxx b/sfx2/source/layout/factory.cxx
index 697970f7e34c..e572ffb2b76e 100644
--- a/sfx2/source/layout/factory.cxx
+++ b/sfx2/source/layout/factory.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tabdlg.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/sfx2/source/layout/makefile.mk b/sfx2/source/layout/makefile.mk
index 24caa81ac643..a11ba76a15bd 100644
--- a/sfx2/source/layout/makefile.mk
+++ b/sfx2/source/layout/makefile.mk
@@ -1,15 +1,11 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE 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/sfx2/source/layout/sfxdialog.cxx b/sfx2/source/layout/sfxdialog.cxx
index 739f67180cc2..f3a76c489b7e 100644
--- a/sfx2/source/layout/sfxdialog.cxx
+++ b/sfx2/source/layout/sfxdialog.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tabdlg.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/sfx2/source/layout/sfxtabdialog.cxx b/sfx2/source/layout/sfxtabdialog.cxx
index 92454ae62f36..782e890d81be 100644
--- a/sfx2/source/layout/sfxtabdialog.cxx
+++ b/sfx2/source/layout/sfxtabdialog.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tabdlg.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/sfx2/source/layout/sfxtabpage.cxx b/sfx2/source/layout/sfxtabpage.cxx
index 767cb14dfa28..7df739a38bb3 100644
--- a/sfx2/source/layout/sfxtabpage.cxx
+++ b/sfx2/source/layout/sfxtabpage.cxx
@@ -1,31 +1,29 @@
/*************************************************************************
-* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-*
-* Copyright 2008 by Sun Microsystems, Inc.
-*
-* OpenOffice.org - a multi-platform office productivity suite
-*
-* $RCSfile: code,v $
-*
-* $Revision: 1.3 $
-*
-* 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.
-************************************************************************/
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ***********************************************************************/
#include <sfx2/layout.hxx>
diff --git a/sfx2/source/menu/makefile.mk b/sfx2/source/menu/makefile.mk
index 57a02ceef9f9..d3b209fc4a45 100644
--- a/sfx2/source/menu/makefile.mk
+++ b/sfx2/source/menu/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/sfx2/source/menu/menu.hrc b/sfx2/source/menu/menu.hrc
index f339f07f247a..5017f980872b 100644
--- a/sfx2/source/menu/menu.hrc
+++ b/sfx2/source/menu/menu.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: menu.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/sfx2/source/menu/menu.src b/sfx2/source/menu/menu.src
index a2ca838cd722..97c9c7f640fa 100644
--- a/sfx2/source/menu/menu.src
+++ b/sfx2/source/menu/menu.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: menu.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/sfx2/source/menu/mnuitem.cxx b/sfx2/source/menu/mnuitem.cxx
index 0e80cc207ce0..281b451d8098 100644
--- a/sfx2/source/menu/mnuitem.cxx
+++ b/sfx2/source/menu/mnuitem.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mnuitem.cxx,v $
- * $Revision: 1.24 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -456,7 +453,7 @@ SfxAppMenuControl_Impl::SfxAppMenuControl_Impl(
Reference<com::sun::star::lang::XMultiServiceFactory> aXMultiServiceFactory(::comphelper::getProcessServiceFactory());
::framework::MenuConfiguration aConf( aXMultiServiceFactory );
- Reference<com::sun::star::frame::XFrame> aXFrame( GetBindings().GetDispatcher_Impl()->GetFrame()->GetFrame()->GetFrameInterface() );
+ Reference<com::sun::star::frame::XFrame> aXFrame( GetBindings().GetDispatcher_Impl()->GetFrame()->GetFrame().GetFrameInterface() );
pMenu = aConf.CreateBookmarkMenu( aXFrame, GetId() == SID_NEWDOCDIRECT ? BOOKMARK_NEWMENU : BOOKMARK_WIZARDMENU );
if( pMenu )
{
diff --git a/sfx2/source/menu/mnumgr.cxx b/sfx2/source/menu/mnumgr.cxx
index 076932ba9dea..ec803718f457 100644
--- a/sfx2/source/menu/mnumgr.cxx
+++ b/sfx2/source/menu/mnumgr.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mnumgr.cxx,v $
- * $Revision: 1.43 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sfx2/source/menu/objmnctl.cxx b/sfx2/source/menu/objmnctl.cxx
index 3d88009e7c0e..e9d609151504 100644
--- a/sfx2/source/menu/objmnctl.cxx
+++ b/sfx2/source/menu/objmnctl.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: objmnctl.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/sfx2/source/menu/virtmenu.cxx b/sfx2/source/menu/virtmenu.cxx
index 87f35805d1e7..13c84bc531e2 100644
--- a/sfx2/source/menu/virtmenu.cxx
+++ b/sfx2/source/menu/virtmenu.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: virtmenu.cxx,v $
- * $Revision: 1.48 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -348,7 +345,7 @@ void SfxVirtualMenu::CreateFromSVMenu()
DBG_CHKTHIS(SfxVirtualMenu, 0);
// Merge Addon popup menus into the SV Menu
- Reference< com::sun::star::frame::XFrame > xFrame( pBindings->GetDispatcher()->GetFrame()->GetFrame()->GetFrameInterface() );
+ Reference< com::sun::star::frame::XFrame > xFrame( pBindings->GetDispatcher()->GetFrame()->GetFrame().GetFrameInterface() );
if ( pSVMenu->IsMenuBar() )
{
@@ -613,7 +610,7 @@ IMPL_LINK( SfxVirtualMenu, SettingsChanged, void*, EMPTYARG )
SfxViewFrame *pViewFrame = pBindings->GetDispatcher()->GetFrame();
BOOL bIcons = Application::GetSettings().GetStyleSettings().GetUseImagesInMenus();
BOOL bIsHiContrastMode = IsHiContrastMode();
- Reference<com::sun::star::frame::XFrame> xFrame( pViewFrame->GetFrame()->GetFrameInterface() );
+ Reference<com::sun::star::frame::XFrame> xFrame( pViewFrame->GetFrame().GetFrameInterface() );
if ( !bIsAddonPopupMenu )
{
@@ -685,7 +682,7 @@ void SfxVirtualMenu::UpdateImages()
BOOL bIsHiContrastMode = IsHiContrastMode();
USHORT nItemCount = pSVMenu->GetItemCount();
SfxViewFrame * pViewFrame = pBindings->GetDispatcher()->GetFrame();
- Reference<com::sun::star::frame::XFrame> xFrame( pViewFrame->GetFrame()->GetFrameInterface() );
+ Reference<com::sun::star::frame::XFrame> xFrame( pViewFrame->GetFrame().GetFrameInterface() );
for ( USHORT nSVPos=0; nSVPos < nItemCount; ++nSVPos )
{
@@ -734,7 +731,7 @@ void SfxVirtualMenu::UpdateImages( Menu* pMenu )
{
BOOL bIsHiContrastMode = IsHiContrastMode();
USHORT nItemCount = pMenu->GetItemCount();
- Reference<com::sun::star::frame::XFrame> aXFrame( pBindings->GetDispatcher_Impl()->GetFrame()->GetFrame()->GetFrameInterface() );
+ Reference<com::sun::star::frame::XFrame> aXFrame( pBindings->GetDispatcher_Impl()->GetFrame()->GetFrame().GetFrameInterface() );
for ( USHORT nPos=0; nPos < nItemCount; ++nPos )
{
@@ -903,7 +900,7 @@ void SfxVirtualMenu::InsertAddOnsMenuItem( Menu* pMenu )
// Create special popup menu that is filled with the 3rd party components popup menu items
Reference<com::sun::star::lang::XMultiServiceFactory> aXMultiServiceFactory(::comphelper::getProcessServiceFactory());
::framework::MenuConfiguration aConf( aXMultiServiceFactory );
- Reference<com::sun::star::frame::XFrame> xFrame( pBindings->GetDispatcher_Impl()->GetFrame()->GetFrame()->GetFrameInterface() );
+ Reference<com::sun::star::frame::XFrame> xFrame( pBindings->GetDispatcher_Impl()->GetFrame()->GetFrame().GetFrameInterface() );
PopupMenu* pAddonMenu = NULL;
try
@@ -1256,36 +1253,6 @@ String SfxVirtualMenu::GetItemHelpText( USHORT nSlotId ) const
}
//--------------------------------------------------------------------
-/*
-void SfxVirtualMenu::InvalidateKeyCodes()
-{
- DBG_ASSERT( pSVMenu, "invalidating key of incomplete menu" );
-
- SfxApplication* pSfxApp = SFX_APP();
- SfxViewFrame *pViewFrame = pBindings->GetDispatcher()->GetFrame();
- SfxAcceleratorManager* pAccMgr = pViewFrame->GetViewShell()->GetAccMgr_Impl();
- SfxAcceleratorManager* pAppAccel = pSfxApp->GetAppAccel_Impl();
- if ( !pAccMgr )
- pAccMgr = pAppAccel;
-
- for ( USHORT nPos = 0; nPos < pSVMenu->GetItemCount(); ++nPos )
- {
- USHORT nId = pSVMenu->GetItemId(nPos);
- SfxVirtualMenu *pPopup = GetPopupMenu(nId);
-// if ( pPopup )
-// pPopup->InvalidateKeyCodes();
-// else if ( nId )
- if ( nId && !pSVMenu->GetPopupMenu( nId ) )
- {
- KeyCode aCode = pAccMgr->GetKeyCode( nId );
- if ( !aCode.GetCode() && pAccMgr != pAppAccel )
- aCode = pAppAccel->GetKeyCode( nId );
- pSVMenu->SetAccelKey( nId, aCode );
- }
- }
-} */
-
-//--------------------------------------------------------------------
// set the checkmark of the specified item
diff --git a/sfx2/source/notify/eventsupplier.cxx b/sfx2/source/notify/eventsupplier.cxx
index ec542c4af595..32e6887f802c 100644
--- a/sfx2/source/notify/eventsupplier.cxx
+++ b/sfx2/source/notify/eventsupplier.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: eventsupplier.cxx,v $
- * $Revision: 1.36.12.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -269,7 +266,7 @@ static void Execute( ANY& aEventData, const css::document::DocumentEvent& aTrigg
{
xProv = ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XDispatchProvider > (
- pView->GetFrame()->GetFrameInterface(), UNO_QUERY );
+ pView->GetFrame().GetFrameInterface(), UNO_QUERY );
}
else
{
diff --git a/sfx2/source/notify/hintpost.cxx b/sfx2/source/notify/hintpost.cxx
index 64b44d1c5372..d541f5542e3e 100644
--- a/sfx2/source/notify/hintpost.cxx
+++ b/sfx2/source/notify/hintpost.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: hintpost.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/sfx2/source/notify/makefile.mk b/sfx2/source/notify/makefile.mk
index b63d4f16ae98..e2ddde40f936 100644
--- a/sfx2/source/notify/makefile.mk
+++ b/sfx2/source/notify/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/sfx2/source/statbar/makefile.mk b/sfx2/source/statbar/makefile.mk
index b5c4f1f5fbaf..f99c8fcdaa1e 100644
--- a/sfx2/source/statbar/makefile.mk
+++ b/sfx2/source/statbar/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/sfx2/source/statbar/stbitem.cxx b/sfx2/source/statbar/stbitem.cxx
index df463ac92396..defccd4e23be 100644
--- a/sfx2/source/statbar/stbitem.cxx
+++ b/sfx2/source/statbar/stbitem.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: stbitem.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/sfx2/source/toolbox/imgmgr.cxx b/sfx2/source/toolbox/imgmgr.cxx
index eb9305fc0e49..7694932d44c4 100644
--- a/sfx2/source/toolbox/imgmgr.cxx
+++ b/sfx2/source/toolbox/imgmgr.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: imgmgr.cxx,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/sfx2/source/toolbox/makefile.mk b/sfx2/source/toolbox/makefile.mk
index bedc92c4249f..ce4f011e6044 100644
--- a/sfx2/source/toolbox/makefile.mk
+++ b/sfx2/source/toolbox/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/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx
index 29e6b85d67d2..f5b38d5a8a18 100644
--- a/sfx2/source/toolbox/tbxitem.cxx
+++ b/sfx2/source/toolbox/tbxitem.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tbxitem.cxx,v $
- * $Revision: 1.70.80.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx
index c88297e477f7..090e94ecb63f 100644
--- a/sfx2/source/view/frame.cxx
+++ b/sfx2/source/view/frame.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: frame.cxx,v $
- * $Revision: 1.55.142.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -80,7 +77,7 @@
#include <sfx2/fcontnr.hxx>
#include "impframe.hxx"
#include <sfx2/appuno.hxx>
-#include <sfx2/topfrm.hxx>
+#include <sfx2/viewfrm.hxx>
#include "workwin.hxx"
#include <sfx2/sfxuno.hxx>
#include <sfx2/msgpool.hxx>
@@ -103,41 +100,29 @@ using namespace ::com::sun::star::container;
TYPEINIT1(SfxFrame, SfxListener);
TYPEINIT1_AUTOFACTORY(SfxFrameItem, SfxPoolItem);
TYPEINIT1(SfxUsrAnyItem, SfxPoolItem);
-
-SfxFrame::SfxFrame(SfxFrame* pParent):
- pParentFrame( pParent ),
- pChildArr(0),
- pUnoImp(0)
-{
- pImp = new SfxFrame_Impl( this );
- if ( pParent )
- pParent->InsertChildFrame_Impl( this );
- if ( !pFramesArr_Impl )
- pFramesArr_Impl = new SfxFrameArr_Impl;
- pFramesArr_Impl->Insert( this, pFramesArr_Impl->Count() );
-}
+TYPEINIT1_AUTOFACTORY(SfxUnoFrameItem, SfxPoolItem);
SvCompatWeakHdl* SfxFrame::GetHdl()
{
return pImp->GetHdl();
}
-SfxCancelManager* SfxFrame::GetCancelManager() const
+//--------------------------------------------------------------------
+void SfxFrame::Construct_Impl()
{
- SfxFrame *pFrame = GetTopFrame();
- SfxCancelManager*& rpMgr = pFrame->pImp->pCancelMgr;
- if ( !rpMgr )
- {
- rpMgr = new SfxCancelManager( SFX_APP()->GetCancelManager() );
- pFrame->pImp->StartListening( *rpMgr );
- }
- return rpMgr;
+ pImp = new SfxFrame_Impl( this );
+ if ( !pFramesArr_Impl )
+ pFramesArr_Impl = new SfxFrameArr_Impl;
+ pFramesArr_Impl->Insert( this, pFramesArr_Impl->Count() );
}
//--------------------------------------------------------------------
SfxFrame::~SfxFrame()
{
+ RemoveTopFrame_Impl( this );
+ DELETEZ( pWindow );
+
pFramesArr_Impl->Remove( pFramesArr_Impl->GetPos( this ) );
if ( pParentFrame )
@@ -217,53 +202,6 @@ sal_Bool SfxFrame::DoClose_Impl()
return bRet;
}
-void SfxFrame::Clear_Impl()
-{
- CancelTransfers();
-
- // Bei FrameSets verhindern, da\s das Closen der Childs zu st"andigen
- // ReCalcs im SplitWindow f"uhrt; SetUpdateMode am FrameWindow wirkt
- // leider nicht auf dem MAC
- Window *pWin = NULL;
- SfxViewShell *pViewSh;
- if ( pImp->pCurrentViewFrame &&
- 0 != ( pViewSh = pImp->pCurrentViewFrame->GetViewShell() ) )
- {
- pWin = pViewSh->GetWindow();
- if ( pWin )
- pWin->Hide();
- }
-
- sal_Bool bRet = sal_True;
- SfxBindings* pBindings = NULL;
- if ( pImp->pCurrentViewFrame )
- {
- pBindings = &pImp->pCurrentViewFrame->GetBindings();
- pImp->bClosing = sal_True;
- bRet = pImp->pCurrentViewFrame->Close();
- pImp->bClosing = sal_False;
- }
-
- if ( bRet )
- {
- // Bei internen Tasks m"ussen Controller und Tools abger"aumt werden
- if ( pImp->pWorkWin )
- {
- pImp->pWorkWin->DeleteControllers_Impl();
- DELETEZ( pImp->pWorkWin );
- }
-
- if ( pImp->bOwnsBindings )
- delete pBindings;
- }
- else
- {
- if ( pWin )
- pWin->Show();
- }
-}
-
-
sal_Bool SfxFrame::DocIsModified_Impl()
{
if ( pImp->pCurrentViewFrame && pImp->pCurrentViewFrame->GetObjectShell() &&
@@ -293,7 +231,7 @@ sal_uInt16 SfxFrame::PrepareClose_Impl( sal_Bool bUI, sal_Bool bForBrowsing )
for ( const SfxViewFrame *pFrame = SfxViewFrame::GetFirst( pCur );
!bOther && pFrame; pFrame = SfxViewFrame::GetNext( *pFrame, pCur ) )
{
- bOther = ( pFrame->GetFrame() != this );
+ bOther = ( &pFrame->GetFrame() != this );
}
SFX_APP()->NotifyEvent( SfxEventHint(SFX_EVENT_PREPARECLOSEVIEW, GlobalEventConfig::GetEventName( STR_EVENT_PREPARECLOSEVIEW ), pCur) );
@@ -336,164 +274,19 @@ SfxFrame* SfxFrame::GetChildFrame( sal_uInt16 nPos ) const
return 0L;
}
-void SfxFrame::InsertChildFrame_Impl( SfxFrame* pFrame, sal_uInt16 nPos )
-{
- if ( !pChildArr )
- pChildArr = new SfxFrameArr_Impl;
- pChildArr->Insert( pFrame, nPos );
- pFrame->pParentFrame = this;
-}
-
-void SfxFrame::RemoveChildFrame_Impl( sal_uInt16 nPos )
-{
- DBG_ASSERT( pChildArr, "Unbekannter Frame!");
- pChildArr->Remove( nPos );
-};
-
void SfxFrame::RemoveChildFrame_Impl( SfxFrame* pFrame )
{
DBG_ASSERT( pChildArr, "Unbekannter Frame!");
sal_uInt16 nPos = pChildArr->GetPos(pFrame);
- RemoveChildFrame_Impl( nPos );
+ pChildArr->Remove( nPos );
};
-sal_Bool SfxFrame::CloseChildFrames()
-{
- sal_Bool bRet = sal_True;
- if ( pChildArr )
- {
- // Childs closen
- sal_uInt16 nCount = pChildArr->Count();
- for ( sal_uInt16 n=nCount; n>0; n--)
- {
- SfxFrame* pFrame = (*pChildArr)[n-1];
- // pFrame removed sich selbst
- bRet = pFrame->DoClose();
- if ( !bRet )
- break;
- }
- }
-
- return bRet;
-}
-
-SfxFrame* SfxFrame::SearchChildrenForName_Impl( const String& rName, sal_Bool bDeep ) const
-{
- if ( pChildArr )
- {
- sal_uInt16 nCount = pChildArr->Count();
- for ( sal_uInt16 n=nCount; n>0; n--)
- {
- SfxFrame* pFrame = (*pChildArr)[n-1];
- if ( rName.CompareIgnoreCaseToAscii( pFrame->GetFrameName() ) == COMPARE_EQUAL )
- return pFrame;
- if( bDeep )
- {
- pFrame = pFrame->SearchChildrenForName_Impl( rName );
- if ( pFrame )
- return pFrame;
- }
- }
- }
-
- return NULL;
-}
-
-SfxFrame* SfxFrame::GetTopFrame() const
+SfxFrame& SfxFrame::GetTopFrame() const
{
- SfxFrame *pParent = (SfxFrame*) this;
+ const SfxFrame* pParent = this;
while ( pParent->pParentFrame )
pParent = pParent->pParentFrame;
- return pParent;
-}
-
-SfxFrame* SfxFrame::SearchFrame( const String& rName, SfxMedium* /*pMedium*/ )
-{
- // Weil Netscape f"uhrende BLANKS "uberliest, m"ussen wir das wohl auch
- // Sollte besser auch bei den FrameNames gemacht werden!
- String aFrameName( rName );
- aFrameName.EraseLeadingChars();
-
- SfxFrame *pFrame = this;
- if( !aFrameName.Len() || aFrameName.CompareIgnoreCaseToAscii("_self") == COMPARE_EQUAL )
- {
- return pFrame;
- }
- else if ( aFrameName.CompareIgnoreCaseToAscii("_smartself") == COMPARE_EQUAL )
- {
- DBG_ERROR("Not supported!");
- return pFrame;
- }
- else if ( aFrameName.CompareIgnoreCaseToAscii( GetFrameName() ) == COMPARE_EQUAL)
- {
- // Eigener Name, kein Name oder Selbstbezug
- return pFrame;
- }
- else if ( aFrameName.CompareIgnoreCaseToAscii("_parent") == COMPARE_EQUAL )
- {
- // Gesucht ist das Parent Frameset
- return pParentFrame ? pParentFrame : this;
- }
- else if ( aFrameName.CompareIgnoreCaseToAscii("_blank") == COMPARE_EQUAL )
- {
- return NULL;
- }
- else if ( aFrameName.CompareIgnoreCaseToAscii("_top") == COMPARE_EQUAL )
- {
- while ( pFrame->GetParentFrame() )
- pFrame = pFrame->GetParentFrame();
- return pFrame;
- }
- else
- {
- // Zuerst unterhalb dieses Frames absuchen
- pFrame = SearchChildrenForName_Impl( aFrameName );
- }
-
- if ( !pFrame && GetParentFrame() )
- {
- // Noch nichts gefunden, nach oben weitergehen
- // Eigentlich m"u\sten Frames, die schon abgesucht wurden, aus
- // Performance-Gr"unden markiert werden
- SfxFrame *pParent = GetParentFrame();
- do
- {
- // Ist es der Parent ?
- if ( aFrameName.CompareIgnoreCaseToAscii( pParent->GetFrameName() ) == COMPARE_EQUAL )
- return pParent;
-
- // Weiter nach oben
- pParent = pParent->GetParentFrame();
- }
- while ( pParent );
- }
-
- if( !pFrame )
- {
- SfxFrameArr_Impl& rArr = *SFX_APP()->Get_Impl()->pTopFrames;
- // keinen Frame im MDI-Fenster gefunden. Jetzt die anderen
- // Toplevel Frames checken.
- SfxFrame *pTop = GetTopFrame();
- for( sal_uInt16 nPos = rArr.Count(); nPos--; )
- {
- // Unser Topframe wurde bereits durchsucht
- SfxFrame* pCurFrame = rArr[ nPos ];
- if( pCurFrame != pTop )
- {
- if( aFrameName.CompareIgnoreCaseToAscii( pCurFrame->GetFrameName() ) ==
- COMPARE_EQUAL )
- return pCurFrame;
- else
- {
- pFrame = pCurFrame->SearchChildrenForName_Impl( aFrameName );
- if( pFrame )
- return pFrame;
- }
- }
- }
- }
-
- return pFrame;
+ return *const_cast< SfxFrame* >( pParent );
}
sal_Bool SfxFrame::IsClosing_Impl() const
@@ -506,21 +299,11 @@ void SfxFrame::SetIsClosing_Impl()
pImp->bClosing = TRUE;
}
-void SfxFrame::DocumentInserted( SfxObjectShell* /*pDoc*/ )
-{
-}
-
sal_uInt16 SfxFrame::GetChildFrameCount() const
{
return pChildArr ? pChildArr->Count() : 0;
}
-sal_Bool SfxFrame::InsertDocument( SfxObjectShell* pDoc )
-{
- DocumentInserted( pDoc );
- return sal_True;
-}
-
void SfxFrame::CancelTransfers( sal_Bool /*bCancelLoadEnv*/ )
{
if( !pImp->bInCancelTransfers )
@@ -531,7 +314,7 @@ void SfxFrame::CancelTransfers( sal_Bool /*bCancelLoadEnv*/ )
{
SfxViewFrame* pFrm;
for( pFrm = SfxViewFrame::GetFirst( pObj );
- pFrm && pFrm->GetFrame() == this;
+ pFrm && &pFrm->GetFrame() == this;
pFrm = SfxViewFrame::GetNext( *pFrm, pObj ) ) ;
// Keine anderer Frame mehr auf Doc -> Cancel
if( !pFrm )
@@ -569,12 +352,7 @@ SfxObjectShell* SfxFrame::GetCurrentDocument() const
{
return pImp->pCurrentViewFrame ?
pImp->pCurrentViewFrame->GetObjectShell() :
- pImp->pCurrentObjectShell;
-}
-
-void SfxFrame::SetCurrentDocument_Impl( SfxObjectShell *pDoc )
-{
- pImp->pCurrentObjectShell = pDoc;
+ NULL;
}
void SfxFrame::SetCurrentViewFrame_Impl( SfxViewFrame *pFrame )
@@ -592,56 +370,10 @@ void SfxFrame::SetFrameType_Impl( sal_uInt32 n )
pImp->nType = n;
}
-void SfxFrame::CopyHistory_Impl( SfxFrame* /*pFrame*/ ) const
-{
-}
-
-
-void SfxFrame::ClearHistory()
-{
-}
-
-sal_Bool SfxFrame::ExecuteHistoryMenu_Impl( sal_uInt16 /*nWhich*/, const Rectangle& /*rRect*/, sal_uInt16 /*nFlags*/ )
-{
- return sal_True;
-}
-
-sal_Bool SfxFrame::Browse( sal_Bool /*bForward*/, sal_uInt16 /*nSteps*/, sal_Bool /*bNewFrame*/ )
-{
- return FALSE;
-}
-
-void SfxFrame::UpdatePickEntries()
-{
-}
-
-void SfxFrame::UpdatePickEntries( const ::com::sun::star::uno::Any& /*rValue*/ )
-{
-}
-
-void SfxFrame::UpdateUndoHistory_Impl( SfxObjectShell* /*pDocSh*/, const String* /*pNew*/, const String* /*pTitle*/ )
-{
-}
-
-void SfxFrame::UpdateCurrentHistory_Impl( SfxObjectShell* /*pDocSh*/, const String* /*pNew*/ )
-{
-}
-
-void SfxFrame::UpdateHistory( SfxObjectShell* /*pDocSh*/, const String* /*pNew*/ )
-{
-}
-
-void SfxFrame::UpdateHistory(
- const ::rtl::OUString& /*aURL*/,
- const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& /*aArgs*/,
- const ::rtl::OUString& /*rTitle*/ )
-{
-}
-
void SfxFrame::GetViewData_Impl()
{
// Alle zwischen Laden und Entfernen "anderbaren Daten aktualisieren; die
- // festen Daten werden nur einmal ( nach InsertDocument in UpdateDescriptor )
+ // festen Daten werden nur einmal ( nach PrepareForDoc_Impl in UpdateDescriptor )
// geholt, um Zeit zu sparen.
SfxViewFrame* pViewFrame = GetCurrentViewFrame();
if( pViewFrame && pViewFrame->GetViewShell() )
@@ -650,10 +382,7 @@ void SfxFrame::GetViewData_Impl()
sal_Bool bReadOnly = pMed->GetOpenMode() == SFX_STREAM_READONLY;
GetDescriptor()->SetReadOnly( bReadOnly );
- String aUserData;
- pViewFrame->GetViewShell()->WriteUserData( aUserData, sal_True );
SfxItemSet *pSet = GetDescriptor()->GetArgs();
- pSet->Put( SfxStringItem( SID_USER_DATA, aUserData ));
sal_Bool bGetViewData = sal_False;
if ( GetController().is() && pSet->GetItemState( SID_VIEW_DATA ) != SFX_ITEM_SET )
{
@@ -681,9 +410,9 @@ void SfxFrame::GetViewData_Impl()
void SfxFrame::UpdateDescriptor( SfxObjectShell *pDoc )
{
- // Beim InsertDocument wird der Descriptor des Frames aktualisiert
+ // Beim PrepareForDoc_Impl wird der Descriptor des Frames aktualisiert
// und sein ItemSet neu initialisiert. Alle Daten, die f"ur ein sp"ateres
- // Restaurieren der ::com::sun::star::sdbcx::View n"otig sind, sind damit festgehalten.
+ // Restaurieren der View n"otig sind, sind damit festgehalten.
// Soll das Dokument ersetzt werden, wird durch GetViewData_Impl (s.o.)
// die neueste Information hinzugef"ugt. Alles zusammen wird dann in der
// Browse-History gesichert. Beim Aktivieren eines solchen FramePickEntry
@@ -735,20 +464,6 @@ void SfxFrame::UpdateDescriptor( SfxObjectShell *pDoc )
//-------------------------------------------------------------------------
-sal_Bool SfxFrame::CanBrowseBackward() const
-{
- return FALSE;
-}
-
-//-------------------------------------------------------------------------
-
-sal_Bool SfxFrame::CanBrowseForward() const
-{
- return FALSE;
-}
-
-//-------------------------------------------------------------------------
-
void SfxFrame::SetDescriptor( SfxFrameDescriptor *pD )
{
DBG_ASSERT( pD, "Kein Descriptor!" );
@@ -796,14 +511,12 @@ void SfxFrame::GetTargetList( TargetList& rList ) const
}
SfxViewFrame* pView = GetCurrentViewFrame();
- if( pView && pView->GetViewShell() && !pView->GetViewShell()->IsImplementedAsFrameset_Impl() && pChildArr )
+ if( pView && pView->GetViewShell() && pChildArr )
{
sal_uInt16 nCount = pChildArr->Count();
for ( sal_uInt16 n=0; n<nCount; n++)
{
SfxFrame* pFrame = (*pChildArr)[n];
- if ( pFrame->GetFrameName().Len() )
- rList.Insert( new String (pFrame->GetFrameName()) );
pFrame->GetTargetList( rList );
}
}
@@ -811,147 +524,11 @@ void SfxFrame::GetTargetList( TargetList& rList ) const
//-------------------------------------------------------------------------
-void SfxFrame::SetFrameId_Impl( sal_uInt16 nId )
-{
- pImp->nFrameId = nId;
- if ( GetCurrentViewFrame() )
- GetCurrentViewFrame()->UpdateTitle();
-}
-
-sal_uInt16 SfxFrame::GetFrameId_Impl() const
-{
- return pImp->nFrameId;
-}
-
-void SfxFrame::SetFrameIdName_Impl( const String& rName )
-{
- pImp->aFrameIdName = rName;
-}
-
-//-------------------------------------------------------------------------
-
-SfxFrame* SfxFrame::SearchFrame_Impl( sal_uInt16 nId, sal_Bool bDeep )
-{
- if ( pImp->nFrameId == nId )
- return this;
-
- if ( pChildArr )
- {
- sal_uInt16 nCount = pChildArr->Count();
- for ( sal_uInt16 n=0; n<nCount; n++)
- {
- SfxFrame* pFrame = (*pChildArr)[n];
- if ( pFrame->pImp->nFrameId == nId )
- return pFrame;
- if ( bDeep )
- {
- pFrame = pFrame->SearchFrame_Impl( nId, sal_True );
- if ( pFrame )
- return pFrame;
- }
- }
- }
-
- return NULL;
-}
-
-SfxFrame* SfxFrame::SearchFrame_Impl( const String& rName, sal_Bool bDeep )
-{
- if ( pImp->aFrameIdName == rName )
- return this;
-
- if ( pChildArr )
- {
- sal_uInt16 nCount = pChildArr->Count();
- for ( sal_uInt16 n=0; n<nCount; n++)
- {
- SfxFrame* pFrame = (*pChildArr)[n];
- if ( pFrame->pImp->aFrameIdName == rName )
- return pFrame;
- if ( bDeep )
- {
- pFrame = pFrame->SearchFrame_Impl( rName );
- if ( pFrame )
- return pFrame;
- }
- }
- }
-
- return NULL;
-}
-
-//-------------------------------------------------------------------------
-
-//-------------------------------------------------------------------------
-
-void SfxFrame::Activate_Impl( sal_Bool bBeamerOn )
-
-/* [Description]
-
- Internal Activate-Handler, called from derived classes which supports
- Activate-Handling.
-*/
-
-{
- if ( GetParentFrame() )
- GetParentFrame()->Activate_Impl( bBeamerOn );
-}
-
SfxBroadcaster& SfxFrame::GetBroadcaster() const
{
return *pImp;
}
-//-------------------------------------------------------------------------
-
-void SfxFrame::Deactivate_Impl()
-
-/* [Description]
-
- Internal Deactivate-Handler, called from derived classes which supports
- Activate-Handling.
-*/
-
-{
- if( GetParentFrame() )
- GetParentFrame()->Deactivate_Impl();
-}
-
-String SfxFrame::GetContent() const
-{
- SfxObjectShell *pObj = GetCurrentDocument();
- if ( !pObj || !pObj->GetMedium() )
- return String();
- else
- return pObj->GetMedium()->GetName();
-}
-
-sal_Bool SfxFrame::CheckContentForLoad_Impl()
-{
- if ( GetCurrentDocument() )
- {
- SfxMedium* pMedium = GetCurrentDocument()->GetMedium();
-#ifdef DEBUG
- SfxItemSet* pSet;
- pSet = pMedium->GetItemSet();
-#endif
- SfxItemSet* pNew = GetDescriptor()->GetArgs();
-
- // Falls URLs nicht uebereinstimmen
- if ( INetURLObject( GetDescriptor()->GetActualURL() ) != INetURLObject( pMedium->GetOrigURL() ) )
- return sal_True;
-
- // Falls die Filter nicht uebereinstimmen
- SFX_ITEMSET_ARG( pNew, pFilterItem, SfxStringItem, SID_FILTER_NAME, sal_False );
- if( pMedium->GetOrigFilter() && pFilterItem && pFilterItem->GetValue() != pMedium->GetOrigFilter()->GetFilterName() )
- return sal_True;
-
- return sal_False;
- }
-
- return (GetDescriptor()->GetActualURL().GetMainURL( INetURLObject::NO_DECODE ).getLength() != 0);
-}
-
sal_Bool SfxFrame::IsParent( SfxFrame *pFrame ) const
{
SfxFrame *pParent = pParentFrame;
@@ -978,7 +555,7 @@ void SfxFrame::RemoveTopFrame_Impl( SfxFrame* pFrame )
}
SfxFrameItem::SfxFrameItem( sal_uInt16 nWhichId, SfxViewFrame *p )
- : SfxPoolItem( nWhichId ), pFrame( p ? p->GetFrame() : NULL )
+ : SfxPoolItem( nWhichId ), pFrame( p ? &p->GetFrame() : NULL )
{
wFrame = pFrame;
}
@@ -1061,11 +638,6 @@ int SfxUsrAnyItem::operator==( const SfxPoolItem& /*rItem*/ ) const
return sal_False;
}
-String SfxUsrAnyItem::GetValueText() const
-{
- return String();
-}
-
SfxPoolItem* SfxUsrAnyItem::Clone( SfxItemPool *) const
{
return new SfxUsrAnyItem( Which(), aValue );
@@ -1083,9 +655,37 @@ sal_Bool SfxUsrAnyItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE /*n
return sal_True;
}
-sal_Bool SfxFrame::BrowseInFrame( int /*nDelta*/ )
+SfxUnoFrameItem::SfxUnoFrameItem()
+ : SfxPoolItem()
+ , m_xFrame()
{
- return sal_False;
+}
+
+SfxUnoFrameItem::SfxUnoFrameItem( sal_uInt16 nWhichId, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rFrame )
+ : SfxPoolItem( nWhichId )
+ , m_xFrame( i_rFrame )
+{
+}
+
+int SfxUnoFrameItem::operator==( const SfxPoolItem& i_rItem ) const
+{
+ return i_rItem.ISA( SfxUnoFrameItem ) && static_cast< const SfxUnoFrameItem& >( i_rItem ).m_xFrame == m_xFrame;
+}
+
+SfxPoolItem* SfxUnoFrameItem::Clone( SfxItemPool* ) const
+{
+ return new SfxUnoFrameItem( Which(), m_xFrame );
+}
+
+sal_Bool SfxUnoFrameItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) const
+{
+ rVal <<= m_xFrame;
+ return sal_True;
+}
+
+sal_Bool SfxUnoFrameItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ )
+{
+ return ( rVal >>= m_xFrame );
}
SfxFrameIterator::SfxFrameIterator( const SfxFrame& rFrame, sal_Bool bRecur )
@@ -1132,116 +732,6 @@ SfxFrame* SfxFrameIterator::NextSibling_Impl( SfxFrame& rPrev )
return pRet;
}
-void SfxFrame::SetFrameName( const String& rName )
-{
- if ( pImp->pDescr )
- pImp->pDescr->SetName( rName );
- aName = rName;
- if ( pImp->pCurrentViewFrame )
- pImp->pCurrentViewFrame->UpdateTitle();
- if ( GetFrameInterface().is() )
- GetFrameInterface()->setName( rName );
-}
-
-void SfxFrame::LoadFinished_Impl()
-{
-}
-
-SfxFrame* SfxFrame::findFrame(const ::rtl::OUString& aTargetframename, sal_Int32 nSearchFlags)
-{
- // Weil Netscape f"uhrende BLANKS "uberliest, m"ussen wir das wohl auch
- // Sollte besser auch bei den FrameNames gemacht werden!
- String aTargetName( aTargetframename );
- aTargetName.EraseLeadingChars();
-
- SfxFrame *pFrame = this;
-
- if ( !aTargetName.Len() && GetParentFrame() && GetParentFrame()->GetCurrentViewFrame()->GetViewShell()->IsImplementedAsFrameset_Impl() )
- return GetParentFrame();
-
- if( !aTargetName.Len() || aTargetName.CompareIgnoreCaseToAscii("_self") == COMPARE_EQUAL )
- return pFrame;
-
- if ( aTargetName.CompareIgnoreCaseToAscii("_smartself") == COMPARE_EQUAL )
- {
- DBG_ERROR("Not supported!");
- return pFrame;
- }
-
- if ( aTargetName.CompareIgnoreCaseToAscii("_parent") == COMPARE_EQUAL )
- {
- // Gesucht ist das Parent Frameset
- return pFrame->GetParentFrame();
- }
- else if ( aTargetName.CompareIgnoreCaseToAscii("_blank") == COMPARE_EQUAL )
- {
- return NULL;
-
- }
- else if ( aTargetName.CompareIgnoreCaseToAscii("_top") == COMPARE_EQUAL )
- {
- while ( pFrame->GetParentFrame() )
- pFrame = pFrame->GetParentFrame();
- return pFrame;
- }
-
- if ( ( nSearchFlags & FRAME_SEARCH_SELF ) && aTargetName.CompareIgnoreCaseToAscii( GetFrameName() ) == COMPARE_EQUAL )
- {
- // Eigener Name
- return pFrame;
- }
-
- if ( nSearchFlags & FRAME_SEARCH_CHILDREN )
- {
- // Zuerst unterhalb dieses Frames absuchen
- pFrame = SearchChildrenForName_Impl( aTargetName );
- }
-
- if ( ( nSearchFlags & FRAME_SEARCH_CHILDREN ) && !pFrame && GetParentFrame() )
- {
- // Noch nichts gefunden, nach oben weitergehen
- // Eigentlich m"u\sten Frames, die schon abgesucht wurden, aus
- // Performance-Gr"unden markiert werden
- SfxFrame *pParent = GetParentFrame();
- do
- {
- // Ist es der Parent ?
- if ( aTargetName.CompareIgnoreCaseToAscii( pParent->GetFrameName() ) == COMPARE_EQUAL )
- return pParent;
-
- // Weiter nach oben
- pParent = pParent->GetParentFrame();
- }
- while ( pParent );
- }
-
- if( !pFrame )
- {
- SfxFrameArr_Impl& rArr = *SFX_APP()->Get_Impl()->pTopFrames;
- // keinen Frame im MDI-Fenster gefunden. Jetzt die anderen
- // Toplevel Frames checken.
- SfxFrame *pTop = GetTopFrame();
- for( sal_uInt16 nPos = rArr.Count(); nPos--; )
- {
- // Unser Topframe wurde bereits durchsucht
- SfxFrame* pCurFrame = rArr[ nPos ];
- if( pCurFrame != pTop )
- {
- if( aTargetName.CompareIgnoreCaseToAscii( pCurFrame->GetFrameName() ) == COMPARE_EQUAL )
- return pCurFrame;
- else
- {
- pFrame = pCurFrame->SearchChildrenForName_Impl( aTargetName );
- if( pFrame )
- return pFrame;
- }
- }
- }
- }
-
- return pFrame;
-}
-
sal_Bool SfxFrame::IsTop() const
{
return GetFrameInterface().is() ? GetFrameInterface()->isTop() : sal_False;
@@ -1265,7 +755,7 @@ sal_Bool SfxFrame::HasComponent() const
return pImp->xFrame;
}
-void SfxFrame::SetFrameInterface_Impl( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame )
+void SfxFrame::SetFrameInterface_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame )
{
pImp->xFrame = rFrame;
com::sun::star::uno::Reference< com::sun::star::frame::XDispatchRecorder > xRecorder;
@@ -1273,16 +763,6 @@ void SfxFrame::SetFrameInterface_Impl( ::com::sun::star::uno::Reference< ::com::
GetCurrentViewFrame()->GetBindings().SetRecorder_Impl( xRecorder );
}
-void SfxFrame::SetItemSet_Impl( const SfxItemSet* pSet )
-{
- pImp->pSet = pSet;
-}
-
-const SfxItemSet* SfxFrame::GetItemSet_Impl()
-{
- return pImp->pSet;
-}
-
void SfxFrame::Appear()
{
if ( GetCurrentViewFrame() )
@@ -1410,11 +890,6 @@ void SfxFrame::CreateWorkWindow_Impl()
pImp->pWorkWin = new SfxFrameWorkWin_Impl( &pFrame->GetWindow(), this, pFrame );
}
-const SvBorder& SfxFrame::GetBorder_Impl() const
-{
- return pImp->aBorder;
-}
-
void SfxFrame::GrabFocusOnComponent_Impl()
{
if ( pImp->bReleasingComponent )
@@ -1423,18 +898,12 @@ void SfxFrame::GrabFocusOnComponent_Impl()
return;
}
- Window* pWindow = &GetWindow();
+ Window* pFocusWindow = &GetWindow();
if ( GetCurrentViewFrame() && GetCurrentViewFrame()->GetViewShell() && GetCurrentViewFrame()->GetViewShell()->GetWindow() )
- pWindow = GetCurrentViewFrame()->GetViewShell()->GetWindow();
-
- if( !pWindow->HasChildPathFocus() )
- pWindow->GrabFocus();
-}
+ pFocusWindow = GetCurrentViewFrame()->GetViewShell()->GetWindow();
-const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterceptor > SfxFrame::GetInterceptor_Impl()
-{
-//(mba)/compview: hier fehlt der Zugriff auf den Interceptor !!!!!
- return ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterceptor > ();
+ if( !pFocusWindow->HasChildPathFocus() )
+ pFocusWindow->GrabFocus();
}
void SfxFrame::ReleasingComponent_Impl( sal_Bool bSet )
@@ -1442,36 +911,6 @@ void SfxFrame::ReleasingComponent_Impl( sal_Bool bSet )
pImp->bReleasingComponent = bSet;
}
-sal_Bool SfxFrame::LoadSfxComponent(
- const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > & /*aFrame*/,
- const ::rtl::OUString& /*aURL*/,
- const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& /*aArgs*/,
- const SfxObjectFactory* /*pFact*/ )
-{
- // get Implementation of xComponents ...
- DBG_ERROR( "Should not be called anymore!" );
- return sal_False;
-}
-
-void SfxFrame::LockFocus_Impl( sal_Bool bLock )
-{
- if ( pChildArr && pChildArr->Count() )
- {
- sal_uInt16 nCount = pChildArr->Count();
- for ( sal_uInt16 n=0; n<nCount; n++ )
- {
- SfxFrame* pFrame = (*pChildArr)[n];
- pFrame->pImp->bFocusLocked = bLock;
- pFrame->LockFocus_Impl( bLock );
- }
- }
-}
-
-sal_Bool SfxFrame::IsFocusLocked_Impl() const
-{
- return pImp->bFocusLocked;
-}
-
sal_Bool SfxFrame::IsInPlace() const
{
return pImp->bInPlace;
@@ -1506,7 +945,7 @@ void SfxFrame::Resize()
if ( nHandle )
{
SfxObjectShell* pDoc = reinterpret_cast< SfxObjectShell* >( sal::static_int_cast< sal_IntPtr >( nHandle ));
- pWork = SfxViewFrame::GetFirst( pDoc )->GetFrame()->GetWorkWindow_Impl();
+ pWork = SfxViewFrame::GetFirst( pDoc )->GetFrame().GetWorkWindow_Impl();
}
}
@@ -1546,10 +985,10 @@ SfxFrame* SfxFrame::GetNext( SfxFrame& rFrame )
return NULL;
}
-const SfxPoolItem* SfxFrame::LoadDocumentSynchron( SfxItemSet& aSet )
+const SfxPoolItem* SfxFrame::OpenDocumentSynchron( SfxItemSet& i_rSet, const Reference< XFrame >& i_rTargetFrame )
{
- aSet.Put( SfxFrameItem( SID_DOCFRAME, this ) );
- aSet.ClearItem( SID_TARGETNAME );
- return SFX_APP()->GetDispatcher_Impl()->Execute( SID_OPENDOC, SFX_CALLMODE_SYNCHRON, aSet );
+ i_rSet.Put( SfxUnoFrameItem( SID_FILLFRAME, i_rTargetFrame ) );
+ i_rSet.ClearItem( SID_TARGETNAME );
+ return SFX_APP()->GetDispatcher_Impl()->Execute( SID_OPENDOC, SFX_CALLMODE_SYNCHRON, i_rSet );
}
diff --git a/sfx2/source/view/frame2.cxx b/sfx2/source/view/frame2.cxx
new file mode 100644
index 000000000000..d99ad8733e03
--- /dev/null
+++ b/sfx2/source/view/frame2.cxx
@@ -0,0 +1,484 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sfx2.hxx"
+
+#include "impframe.hxx"
+#include "objshimp.hxx"
+#include "sfxhelp.hxx"
+#include "workwin.hxx"
+
+#include "sfx2/app.hxx"
+#include "sfx2/bindings.hxx"
+#include "sfx2/dispatch.hxx"
+#include "sfx2/docfac.hxx"
+#include "sfx2/docfile.hxx"
+#include "sfx2/event.hxx"
+#include "sfx2/objface.hxx"
+#include "sfx2/request.hxx"
+
+#include <com/sun/star/awt/XWindow2.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/frame/XComponentLoader.hpp>
+#include <com/sun/star/frame/XFrame.hpp>
+#include <com/sun/star/frame/XFramesSupplier.hpp>
+#include <com/sun/star/frame/XLayoutManager.hpp>
+
+#include <comphelper/componentcontext.hxx>
+#include <comphelper/namedvaluecollection.hxx>
+#include <comphelper/processfactory.hxx>
+#include <svl/eitem.hxx>
+#include <svl/intitem.hxx>
+#include <svl/itemset.hxx>
+#include <svl/rectitem.hxx>
+#include <svl/stritem.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
+#include <tools/diagnose_ex.h>
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::frame;
+using namespace ::com::sun::star::util;
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::beans;
+using ::com::sun::star::lang::XMultiServiceFactory;
+using ::com::sun::star::lang::XComponent;
+using ::com::sun::star::frame::XComponentLoader;
+
+//------------------------------------------------------------------------
+
+class SfxFrameWindow_Impl : public Window
+{
+public:
+ SfxFrame* pFrame;
+
+ SfxFrameWindow_Impl( SfxFrame* pF, Window& i_rContainerWindow );
+ ~SfxFrameWindow_Impl( );
+
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
+ virtual void StateChanged( StateChangedType nStateChange );
+ virtual long PreNotify( NotifyEvent& rNEvt );
+ virtual long Notify( NotifyEvent& rEvt );
+ virtual void Resize();
+ virtual void GetFocus();
+ void DoResize();
+ DECL_LINK( CloserHdl, void* );
+};
+
+SfxFrameWindow_Impl::SfxFrameWindow_Impl( SfxFrame* pF, Window& i_rContainerWindow )
+ : Window( &i_rContainerWindow, WB_BORDER | WB_CLIPCHILDREN | WB_NODIALOGCONTROL | WB_3DLOOK )
+ , pFrame( pF )
+{
+}
+
+SfxFrameWindow_Impl::~SfxFrameWindow_Impl( )
+{
+}
+
+void SfxFrameWindow_Impl::DataChanged( const DataChangedEvent& rDCEvt )
+{
+ Window::DataChanged( rDCEvt );
+ SfxWorkWindow *pWorkWin = pFrame->GetWorkWindow_Impl();
+ if ( pWorkWin )
+ pWorkWin->DataChanged_Impl( rDCEvt );
+}
+
+long SfxFrameWindow_Impl::Notify( NotifyEvent& rNEvt )
+{
+ if ( pFrame->IsClosing_Impl() || !pFrame->GetFrameInterface().is() )
+ return sal_False;
+
+ SfxViewFrame* pView = pFrame->GetCurrentViewFrame();
+ if ( !pView || !pView->GetObjectShell() )
+ return Window::Notify( rNEvt );
+
+ if ( rNEvt.GetType() == EVENT_GETFOCUS )
+ {
+ if ( pView->GetViewShell() && !pView->GetViewShell()->GetUIActiveIPClient_Impl() && !pFrame->IsInPlace() )
+ {
+ DBG_TRACE("SfxFrame: GotFocus");
+ pView->MakeActive_Impl( FALSE );
+ }
+
+ // TODO/LATER: do we still need this code?
+ Window* pWindow = rNEvt.GetWindow();
+ ULONG nHelpId = 0;
+ while ( !nHelpId && pWindow )
+ {
+ nHelpId = pWindow->GetHelpId();
+ pWindow = pWindow->GetParent();
+ }
+
+ if ( nHelpId )
+ SfxHelp::OpenHelpAgent( pFrame, nHelpId );
+
+ // if focus was on an external window, the clipboard content might have been changed
+ pView->GetBindings().Invalidate( SID_PASTE );
+ pView->GetBindings().Invalidate( SID_PASTE_SPECIAL );
+ return sal_True;
+ }
+ else if( rNEvt.GetType() == EVENT_KEYINPUT )
+ {
+ if ( pView->GetViewShell()->KeyInput( *rNEvt.GetKeyEvent() ) )
+ return TRUE;
+ }
+ else if ( rNEvt.GetType() == EVENT_EXECUTEDIALOG /*|| rNEvt.GetType() == EVENT_INPUTDISABLE*/ )
+ {
+ pView->SetModalMode( sal_True );
+ return sal_True;
+ }
+ else if ( rNEvt.GetType() == EVENT_ENDEXECUTEDIALOG /*|| rNEvt.GetType() == EVENT_INPUTENABLE*/ )
+ {
+ //EnableInput( sal_True, sal_True );
+ pView->SetModalMode( sal_False );
+ return sal_True;
+ }
+
+ return Window::Notify( rNEvt );
+}
+
+long SfxFrameWindow_Impl::PreNotify( NotifyEvent& rNEvt )
+{
+ USHORT nType = rNEvt.GetType();
+ if ( nType == EVENT_KEYINPUT || nType == EVENT_KEYUP )
+ {
+ SfxViewFrame* pView = pFrame->GetCurrentViewFrame();
+ SfxViewShell* pShell = pView ? pView->GetViewShell() : NULL;
+ if ( pShell && pShell->HasKeyListeners_Impl() && pShell->HandleNotifyEvent_Impl( rNEvt ) )
+ return sal_True;
+ }
+ else if ( nType == EVENT_MOUSEBUTTONUP || nType == EVENT_MOUSEBUTTONDOWN )
+ {
+ Window* pWindow = rNEvt.GetWindow();
+ SfxViewFrame* pView = pFrame->GetCurrentViewFrame();
+ SfxViewShell* pShell = pView ? pView->GetViewShell() : NULL;
+ if ( pShell )
+ if ( pWindow == pShell->GetWindow() || pShell->GetWindow()->IsChild( pWindow ) )
+ if ( pShell->HasMouseClickListeners_Impl() && pShell->HandleNotifyEvent_Impl( rNEvt ) )
+ return sal_True;
+ }
+
+ if ( nType == EVENT_MOUSEBUTTONDOWN )
+ {
+ Window* pWindow = rNEvt.GetWindow();
+ const MouseEvent* pMEvent = rNEvt.GetMouseEvent();
+ Point aPos = pWindow->OutputToScreenPixel( pMEvent->GetPosPixel() );
+ SfxWorkWindow *pWorkWin = pFrame->GetWorkWindow_Impl();
+ if ( pWorkWin )
+ pWorkWin->EndAutoShow_Impl( aPos );
+ }
+
+ return Window::PreNotify( rNEvt );
+}
+
+void SfxFrameWindow_Impl::GetFocus()
+{
+ if ( pFrame && !pFrame->IsClosing_Impl() && pFrame->GetCurrentViewFrame() && pFrame->GetFrameInterface().is() )
+ pFrame->GetCurrentViewFrame()->MakeActive_Impl( TRUE );
+}
+
+void SfxFrameWindow_Impl::Resize()
+{
+ if ( IsReallyVisible() || IsReallyShown() || GetOutputSizePixel().Width() )
+ DoResize();
+}
+
+void SfxFrameWindow_Impl::StateChanged( StateChangedType nStateChange )
+{
+ if ( nStateChange == STATE_CHANGE_INITSHOW )
+ {
+ pFrame->pImp->bHidden = FALSE;
+ if ( pFrame->IsInPlace() )
+ // TODO/MBA: workaround for bug in LayoutManager: the final resize does not get through because the
+ // LayoutManager works asynchronously and between resize and time execution the DockingAcceptor was exchanged so that
+ // the resize event never is sent to the component
+ SetSizePixel( GetParent()->GetOutputSizePixel() );
+
+ DoResize();
+ SfxViewFrame* pView = pFrame->GetCurrentViewFrame();
+ if ( pView )
+ pView->GetBindings().GetWorkWindow_Impl()->ShowChilds_Impl();
+ }
+
+ Window::StateChanged( nStateChange );
+}
+
+void SfxFrameWindow_Impl::DoResize()
+{
+ if ( !pFrame->pImp->bLockResize )
+ pFrame->Resize();
+}
+
+Reference < XFrame > SfxFrame::CreateBlankFrame()
+{
+ Reference < XFrame > xFrame;
+ try
+ {
+ ::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() );
+ Reference < XFrame > xDesktop( aContext.createComponent( "com.sun.star.frame.Desktop" ), UNO_QUERY_THROW );
+ xFrame.set( xDesktop->findFrame( DEFINE_CONST_UNICODE("_blank"), 0 ), UNO_SET_THROW );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ return xFrame;
+}
+
+SfxFrame* SfxFrame::Create( SfxObjectShell& rDoc, Window& rWindow, USHORT nViewId, bool bHidden )
+{
+ SfxFrame* pFrame = NULL;
+ try
+ {
+ // create and initialize new top level frame for this window
+ ::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() );
+ Reference < XFramesSupplier > xDesktop( aContext.createComponent( "com.sun.star.frame.Desktop" ), UNO_QUERY_THROW );
+ Reference < XFrame > xFrame( aContext.createComponent( "com.sun.star.frame.Frame"), UNO_QUERY_THROW );
+
+ Reference< awt::XWindow2 > xWin( VCLUnoHelper::GetInterface ( &rWindow ), uno::UNO_QUERY_THROW );
+ xFrame->initialize( xWin.get() );
+ xDesktop->getFrames()->append( xFrame );
+
+ if ( xWin->isActive() )
+ xFrame->activate();
+
+ // create load arguments
+ Sequence< PropertyValue > aLoadArgs;
+ TransformItems( SID_OPENDOC, *rDoc.GetMedium()->GetItemSet(), aLoadArgs );
+
+ ::comphelper::NamedValueCollection aArgs( aLoadArgs );
+ aArgs.put( "Model", rDoc.GetModel() );
+ aArgs.put( "Hidden", bHidden );
+ if ( nViewId )
+ aArgs.put( "ViewId", nViewId );
+
+ aLoadArgs = aArgs.getPropertyValues();
+
+ // load the doc into that frame
+ ::rtl::OUString sLoaderURL( rDoc.GetModel()->getURL() );
+ if ( sLoaderURL.getLength() == 0 )
+ sLoaderURL = rDoc.GetFactory().GetFactoryURL();
+
+ Reference< XComponentLoader > xLoader( xFrame, UNO_QUERY_THROW );
+ xLoader->loadComponentFromURL(
+ sLoaderURL,
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "_self" ) ),
+ 0,
+ aLoadArgs
+ );
+
+ for ( pFrame = SfxFrame::GetFirst();
+ pFrame;
+ pFrame = SfxFrame::GetNext( *pFrame )
+ )
+ {
+ if ( pFrame->GetFrameInterface() == xFrame )
+ break;
+ }
+
+ OSL_ENSURE( pFrame, "SfxFrame::Create: load succeeded, but no SfxFrame was created during this!" );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+
+ return pFrame;
+}
+
+SfxFrame* SfxFrame::Create( const Reference < XFrame >& i_rFrame )
+{
+ // create a new TopFrame to an external XFrame object ( wrap controller )
+ ENSURE_OR_THROW( i_rFrame.is(), "NULL frame not allowed" );
+ Window* pWindow = VCLUnoHelper::GetWindow( i_rFrame->getContainerWindow() );
+ ENSURE_OR_THROW( pWindow, "frame without container window not allowed" );
+
+ SfxFrame* pFrame = new SfxFrame( *pWindow, false );
+ pFrame->SetFrameInterface_Impl( i_rFrame );
+ return pFrame;
+}
+
+SfxFrame::SfxFrame( Window& i_rContainerWindow, bool i_bHidden )
+ :pParentFrame( NULL )
+ ,pChildArr( NULL )
+ ,pImp( NULL )
+ ,pWindow( NULL )
+{
+ Construct_Impl();
+
+ pImp->bHidden = i_bHidden;
+ InsertTopFrame_Impl( this );
+ pImp->pExternalContainerWindow = &i_rContainerWindow;
+
+ pWindow = new SfxFrameWindow_Impl( this, i_rContainerWindow );
+
+ // always show pWindow, which is the ComponentWindow of the XFrame we live in
+ // nowadays, since SfxFrames can be created with an XFrame only, hiding or showing the complete XFrame
+ // is not done at level of the container window, not at SFX level. Thus, the component window can
+ // always be visible.
+ pWindow->Show();
+}
+
+void SfxFrame::SetPresentationMode( BOOL bSet )
+{
+ if ( GetCurrentViewFrame() )
+ GetCurrentViewFrame()->GetWindow().SetBorderStyle( bSet ? WINDOW_BORDER_NOBORDER : WINDOW_BORDER_NORMAL );
+
+ Reference< com::sun::star::beans::XPropertySet > xPropSet( GetFrameInterface(), UNO_QUERY );
+ Reference< ::com::sun::star::frame::XLayoutManager > xLayoutManager;
+
+ if ( xPropSet.is() )
+ {
+ Any aValue = xPropSet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LayoutManager" )));
+ aValue >>= xLayoutManager;
+ }
+
+ if ( xLayoutManager.is() )
+ xLayoutManager->setVisible( !bSet ); // we don't want to have ui in presentation mode
+
+ SetMenuBarOn_Impl( !bSet );
+ if ( GetWorkWindow_Impl() )
+ GetWorkWindow_Impl()->SetDockingAllowed( !bSet );
+ if ( GetCurrentViewFrame() )
+ GetCurrentViewFrame()->GetDispatcher()->Update_Impl( TRUE );
+}
+
+SystemWindow* SfxFrame::GetSystemWindow() const
+{
+ return GetTopWindow_Impl();
+}
+
+SystemWindow* SfxFrame::GetTopWindow_Impl() const
+{
+ if ( pImp->pExternalContainerWindow->IsSystemWindow() )
+ return (SystemWindow*) pImp->pExternalContainerWindow;
+ else
+ return NULL;
+}
+
+Window& SfxFrame::GetWindow() const
+{
+ return *pWindow;
+}
+
+sal_Bool SfxFrame::Close()
+{
+ delete this;
+ return sal_True;
+}
+
+void SfxFrame::LockResize_Impl( BOOL bLock )
+{
+ pImp->bLockResize = bLock;
+}
+
+IMPL_LINK( SfxFrameWindow_Impl, CloserHdl, void*, EMPTYARG )
+{
+ if ( pFrame && !pFrame->PrepareClose_Impl( TRUE ) )
+ return 0L;
+
+ if ( pFrame )
+ pFrame->GetCurrentViewFrame()->GetBindings().Execute( SID_CLOSEWIN, 0, 0, SFX_CALLMODE_ASYNCHRON );
+ return 0L;
+}
+
+void SfxFrame::SetMenuBarOn_Impl( BOOL bOn )
+{
+ pImp->bMenuBarOn = bOn;
+
+ Reference< com::sun::star::beans::XPropertySet > xPropSet( GetFrameInterface(), UNO_QUERY );
+ Reference< ::com::sun::star::frame::XLayoutManager > xLayoutManager;
+
+ if ( xPropSet.is() )
+ {
+ Any aValue = xPropSet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LayoutManager" )));
+ aValue >>= xLayoutManager;
+ }
+
+ if ( xLayoutManager.is() )
+ {
+ rtl::OUString aMenuBarURL( RTL_CONSTASCII_USTRINGPARAM( "private:resource/menubar/menubar" ));
+
+ if ( bOn )
+ xLayoutManager->showElement( aMenuBarURL );
+ else
+ xLayoutManager->hideElement( aMenuBarURL );
+ }
+}
+
+BOOL SfxFrame::IsMenuBarOn_Impl() const
+{
+ return pImp->bMenuBarOn;
+}
+
+void SfxFrame::PositionWindow_Impl( const Rectangle& rWinArea ) const
+{
+ Window *pWin = pImp->pExternalContainerWindow;
+
+ // Groesse setzen
+ const Size aAppWindow( pImp->pExternalContainerWindow->GetDesktopRectPixel().GetSize() );
+ Point aPos( rWinArea.TopLeft() );
+ Size aSz( rWinArea.GetSize() );
+ if ( aSz.Width() && aSz.Height() )
+ {
+ aPos.X() = Min(aPos.X(),
+ long(aAppWindow.Width() - aSz.Width() + aSz.Width() / 2) );
+ aPos.Y() = Min(aPos.Y(),
+ long( aAppWindow.Height() - aSz.Height() + aSz.Height() / 2) );
+ if ( aPos.X() + aSz.Width() <
+ aAppWindow.Width() + aSz.Width() / 2 &&
+ aPos.Y() + aSz.Height() <
+ aAppWindow.Height() + aSz.Height() / 2 )
+ {
+ pWin->SetPosPixel( aPos );
+ pWin->SetOutputSizePixel( aSz );
+ }
+ }
+}
+
+void SfxFrame::PrepareForDoc_Impl( SfxObjectShell& i_rDoc )
+{
+ const ::comphelper::NamedValueCollection aDocumentArgs( i_rDoc.GetModel()->getArgs() );
+
+ // hidden?
+ OSL_ENSURE( !pImp->bHidden, "when does this happen?" );
+ pImp->bHidden = aDocumentArgs.getOrDefault( "Hidden", pImp->bHidden );
+
+ // update our descriptor
+ UpdateDescriptor( &i_rDoc );
+
+ // plugin mode
+ sal_Int16 nPluginMode = aDocumentArgs.getOrDefault( "PluginMode", sal_Int16( 0 ) );
+ if ( nPluginMode && ( nPluginMode != 2 ) )
+ SetInPlace_Impl( TRUE );
+}
+
+bool SfxFrame::IsMarkedHidden_Impl() const
+{
+ return pImp->bHidden;
+}
diff --git a/sfx2/source/view/frmload.cxx b/sfx2/source/view/frmload.cxx
index b439dca4ffed..ed158ce009e3 100644
--- a/sfx2/source/view/frmload.cxx
+++ b/sfx2/source/view/frmload.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: frmload.cxx,v $
- * $Revision: 1.90 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -32,70 +29,85 @@
#include "precompiled_sfx2.hxx"
#include "frmload.hxx"
-
-#include <framework/interaction.hxx>
-#include <com/sun/star/frame/XLoadable.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include "objshimp.hxx"
+#include "viewfac.hxx"
+#include "sfx2/app.hxx"
+#include "sfx2/dispatch.hxx"
+#include "sfx2/docfac.hxx"
+#include "sfx2/docfile.hxx"
+#include "sfx2/docfilt.hxx"
+#include "sfx2/doctempl.hxx"
+#include "sfx2/fcontnr.hxx"
+#include "sfx2/frame.hxx"
+#include "sfx2/request.hxx"
+#include "sfx2/sfx.hrc"
+#include "sfx2/sfxsids.hrc"
+#include "sfx2/sfxuno.hxx"
+#include "sfx2/viewfrm.hxx"
+#include "sfx2/viewsh.hxx"
+
+/** === begin UNO includes === **/
#include <com/sun/star/container/XContainerQuery.hpp>
-#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/document/XTypeDetection.hpp>
#include <com/sun/star/frame/XFrame.hpp>
+#include <com/sun/star/frame/XLoadable.hpp>
#include <com/sun/star/frame/XModel.hpp>
-#include <com/sun/star/awt/XWindow.hpp>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
-#ifndef _UNOTOOLS_PROCESSFACTORY_HXX
-#include <comphelper/processfactory.hxx>
-#endif
-#include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star/container/XNameAccess.hpp>
-#include <com/sun/star/io/XInputStream.hpp>
-#include <com/sun/star/task/XInteractionHandler.hpp>
-#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
-#include <com/sun/star/ucb/CommandAbortedException.hpp>
-#include <com/sun/star/ucb/InteractiveAppException.hpp>
-#include <com/sun/star/document/XTypeDetection.hpp>
-#include <framework/interaction.hxx>
-
-#ifndef _TOOLKIT_UNOHLP_HXX
-#include <toolkit/helper/vclunohelper.hxx>
-#endif
-#include <ucbhelper/simpleinteractionrequest.hxx>
+#include <com/sun/star/task/XInteractionHandler2.hpp>
+#include <com/sun/star/document/XViewDataSupplier.hpp>
+#include <com/sun/star/container/XIndexAccess.hpp>
+/** === end UNO includes === **/
-#include <rtl/ustring.h>
+#include <comphelper/interaction.hxx>
+#include <comphelper/namedvaluecollection.hxx>
+#include <comphelper/sequenceashashmap.hxx>
+#include <cppuhelper/exc_hlp.hxx>
+#include <framework/interaction.hxx>
#include <rtl/logfile.hxx>
-#include <svl/itemset.hxx>
-#include <vcl/window.hxx>
+#include <rtl/ustring.h>
+#include <sot/storinfo.hxx>
+#include <svtools/ehdl.hxx>
#include <svl/eitem.hxx>
+#include <svl/itemset.hxx>
+#include <unotools/moduleoptions.hxx>
+#include <svtools/sfxecode.hxx>
#include <svl/stritem.hxx>
-#include <tools/urlobj.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
+#include <tools/diagnose_ex.h>
+#include <ucbhelper/simpleinteractionrequest.hxx>
#include <vos/mutex.hxx>
-#include <svtools/sfxecode.hxx>
-#include <svtools/ehdl.hxx>
-#include <sot/storinfo.hxx>
-#include <comphelper/sequenceashashmap.hxx>
-#include <comphelper/mediadescriptor.hxx>
-#include <unotools/moduleoptions.hxx>
-
-#ifndef css
-namespace css = ::com::sun::star;
-#endif
-
-#include <sfx2/doctempl.hxx>
-#include <sfx2/app.hxx>
-#include <sfx2/request.hxx>
-#include <sfx2/sfxsids.hrc>
-#include <sfx2/dispatch.hxx>
-#include <sfx2/sfxuno.hxx>
-#include <sfx2/viewfrm.hxx>
-#include <sfx2/topfrm.hxx>
-#include <sfx2/frame.hxx>
-#include <sfx2/docfac.hxx>
-#include <sfx2/fcontnr.hxx>
-#include <sfx2/docfile.hxx>
-#include <sfx2/docfilt.hxx>
-#include "brokenpackageint.hxx"
-#include "objshimp.hxx"
-SfxFrameLoader_Impl::SfxFrameLoader_Impl( const css::uno::Reference< css::lang::XMultiServiceFactory >& /*xFactory*/ )
+/** === begin UNO using === **/
+using ::com::sun::star::beans::PropertyValue;
+using ::com::sun::star::container::XContainerQuery;
+using ::com::sun::star::container::XEnumeration;
+using ::com::sun::star::document::XTypeDetection;
+using ::com::sun::star::frame::XFrame;
+using ::com::sun::star::frame::XLoadable;
+using ::com::sun::star::frame::XModel;
+using ::com::sun::star::lang::XMultiServiceFactory;
+using ::com::sun::star::task::XInteractionHandler;
+using ::com::sun::star::task::XInteractionHandler2;
+using ::com::sun::star::task::XInteractionRequest;
+using ::com::sun::star::task::XStatusIndicator;
+using ::com::sun::star::uno::Any;
+using ::com::sun::star::uno::Exception;
+using ::com::sun::star::uno::Reference;
+using ::com::sun::star::uno::RuntimeException;
+using ::com::sun::star::uno::Sequence;
+using ::com::sun::star::uno::UNO_QUERY;
+using ::com::sun::star::uno::UNO_QUERY_THROW;
+using ::com::sun::star::uno::UNO_SET_THROW;
+using ::com::sun::star::uno::makeAny;
+using ::com::sun::star::util::XCloseable;
+using ::com::sun::star::document::XViewDataSupplier;
+using ::com::sun::star::container::XIndexAccess;
+using ::com::sun::star::frame::XController2;
+using ::com::sun::star::frame::XController;
+using ::com::sun::star::frame::XModel2;
+/** === end UNO using === **/
+
+SfxFrameLoader_Impl::SfxFrameLoader_Impl( const Reference< XMultiServiceFactory >& _rxFactory )
+ :m_aContext( _rxFactory )
{
}
@@ -103,54 +115,46 @@ SfxFrameLoader_Impl::~SfxFrameLoader_Impl()
{
}
-const SfxFilter* impl_detectFilterForURL(const ::rtl::OUString& sURL ,
- const css::uno::Sequence< css::beans::PropertyValue >& rArgs ,
- const SfxFilterMatcher& rMatcher)
+// --------------------------------------------------------------------------------------------------------------------
+const SfxFilter* SfxFrameLoader_Impl::impl_detectFilterForURL( const ::rtl::OUString& sURL,
+ const ::comphelper::NamedValueCollection& i_rDescriptor, const SfxFilterMatcher& rMatcher ) const
{
- static ::rtl::OUString SERVICENAME_TYPEDETECTION = ::rtl::OUString::createFromAscii("com.sun.star.document.TypeDetection");
-
::rtl::OUString sFilter;
try
{
- if (!sURL.getLength())
+ if ( !sURL.getLength() )
return 0;
- css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = ::comphelper::getProcessServiceFactory();
- if (!xSMGR.is())
- return 0;
+ Reference< XTypeDetection > xDetect(
+ m_aContext.createComponent( "com.sun.star.document.TypeDetection" ),
+ UNO_QUERY_THROW);
- css::uno::Reference< css::document::XTypeDetection > xDetect(
- xSMGR->createInstance(SERVICENAME_TYPEDETECTION),
- css::uno::UNO_QUERY_THROW);
-
- ::comphelper::MediaDescriptor lOrgArgs(rArgs);
- css::uno::Reference< css::task::XInteractionHandler > xInteraction = lOrgArgs.getUnpackedValueOrDefault(
- ::comphelper::MediaDescriptor::PROP_INTERACTIONHANDLER(),
- css::uno::Reference< css::task::XInteractionHandler >());
- css::uno::Reference< css::task::XStatusIndicator > xProgress = lOrgArgs.getUnpackedValueOrDefault(
- ::comphelper::MediaDescriptor::PROP_STATUSINDICATOR(),
- css::uno::Reference< css::task::XStatusIndicator >());
-
- ::comphelper::SequenceAsHashMap lNewArgs;
- lNewArgs[::comphelper::MediaDescriptor::PROP_URL()] <<= sURL;
- if (xInteraction.is())
- lNewArgs[::comphelper::MediaDescriptor::PROP_INTERACTIONHANDLER()] <<= xInteraction;
- if (xProgress.is())
- lNewArgs[::comphelper::MediaDescriptor::PROP_STATUSINDICATOR()] <<= xProgress;
-
- css::uno::Sequence< css::beans::PropertyValue > lDescr = lNewArgs.getAsConstPropertyValueList();
- ::rtl::OUString sType = xDetect->queryTypeByDescriptor(lDescr, sal_True);
- if (sType.getLength())
+ ::comphelper::NamedValueCollection aNewArgs;
+ aNewArgs.put( "URL", sURL );
+
+ if ( i_rDescriptor.has( "InteractionHandler" ) )
+ aNewArgs.put( "InteractionHandler", i_rDescriptor.get( "InteractionHandler" ) );
+ if ( i_rDescriptor.has( "StatusIndicator" ) )
+ aNewArgs.put( "StatusIndicator", i_rDescriptor.get( "StatusIndicator" ) );
+
+ Sequence< PropertyValue > aQueryArgs( aNewArgs.getPropertyValues() );
+ ::rtl::OUString sType = xDetect->queryTypeByDescriptor( aQueryArgs, sal_True );
+ if ( sType.getLength() )
{
- const SfxFilter* pFilter = rMatcher.GetFilter4EA(sType);
- if (pFilter)
+ const SfxFilter* pFilter = rMatcher.GetFilter4EA( sType );
+ if ( pFilter )
sFilter = pFilter->GetName();
}
}
- catch(const css::uno::RuntimeException& exRun)
- { throw exRun; }
- catch(const css::uno::Exception&)
- { sFilter = ::rtl::OUString(); }
+ catch ( const RuntimeException& )
+ {
+ throw;
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ sFilter = ::rtl::OUString();
+ }
const SfxFilter* pFilter = 0;
if (sFilter.getLength())
@@ -158,453 +162,548 @@ const SfxFilter* impl_detectFilterForURL(const ::rtl::OUString&
return pFilter;
}
-sal_Bool SAL_CALL SfxFrameLoader_Impl::load( const css::uno::Sequence< css::beans::PropertyValue >& rArgs ,
- const css::uno::Reference< css::frame::XFrame >& rFrame )
- throw( css::uno::RuntimeException )
+// --------------------------------------------------------------------------------------------------------------------
+const SfxFilter* SfxFrameLoader_Impl::impl_getFilterFromServiceName_nothrow( const ::rtl::OUString& i_rServiceName ) const
{
- static ::rtl::OUString PROP_URL = ::rtl::OUString::createFromAscii("URL" );
- static ::rtl::OUString PROP_FILENAME = ::rtl::OUString::createFromAscii("FileName" );
- static ::rtl::OUString PROP_TYPENAME = ::rtl::OUString::createFromAscii("TypeName" );
- static ::rtl::OUString PROP_FILTERNAME = ::rtl::OUString::createFromAscii("FilterName" );
- static ::rtl::OUString PROP_MODEL = ::rtl::OUString::createFromAscii("Model" );
- static ::rtl::OUString PROP_DOCUMENTSERVICE = ::rtl::OUString::createFromAscii("DocumentService" );
- static ::rtl::OUString PROP_READONLY = ::rtl::OUString::createFromAscii("ReadOnly" );
- static ::rtl::OUString PROP_ASTEMPLATE = ::rtl::OUString::createFromAscii("AsTemplate" );
- static ::rtl::OUString PROP_INTERACTIONHANDLER = ::rtl::OUString::createFromAscii("InteractionHandler");
-
- sal_Bool bLoadState = sal_False;
-
- // this methods assumes that the filter is detected before, usually by calling the detect() method below
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ try
+ {
+ ::comphelper::NamedValueCollection aQuery;
+ aQuery.put( "DocumentService", i_rServiceName );
- RTL_LOGFILE_CONTEXT( aLog, "sfx2 (mb93783) ::SfxFrameLoader::load" );
+ const Reference< XContainerQuery > xQuery(
+ m_aContext.createComponent( "com.sun.star.document.FilterFactory" ),
+ UNO_QUERY_THROW );
- if ( !rFrame.is() )
- return sal_False;
+ const SfxFilterMatcher& rMatcher = SFX_APP()->GetFilterMatcher();
+ const SfxFilterFlags nMust = SFX_FILTER_IMPORT;
+ const SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED;
- ::comphelper::SequenceAsHashMap lDescriptor(rArgs);
- String rURL = lDescriptor.getUnpackedValueOrDefault(PROP_URL , ::rtl::OUString() );
- String aTypeName = lDescriptor.getUnpackedValueOrDefault(PROP_TYPENAME , ::rtl::OUString() );
- aFilterName = lDescriptor.getUnpackedValueOrDefault(PROP_FILTERNAME , ::rtl::OUString() );
- String aServiceName = lDescriptor.getUnpackedValueOrDefault(PROP_DOCUMENTSERVICE , ::rtl::OUString() );
- css::uno::Reference< css::task::XInteractionHandler > xInteraction = lDescriptor.getUnpackedValueOrDefault(PROP_INTERACTIONHANDLER, css::uno::Reference< css::task::XInteractionHandler >());
- css::uno::Reference< css::frame::XModel > xModel = lDescriptor.getUnpackedValueOrDefault(PROP_MODEL , css::uno::Reference< css::frame::XModel >() );
+ Reference < XEnumeration > xEnum( xQuery->createSubSetEnumerationByProperties(
+ aQuery.getNamedValues() ), UNO_SET_THROW );
+ while ( xEnum->hasMoreElements() )
+ {
+ ::comphelper::NamedValueCollection aType( xEnum->nextElement() );
+ ::rtl::OUString sFilterName = aType.getOrDefault( "Name", ::rtl::OUString() );
+ if ( !sFilterName.getLength() )
+ continue;
+
+ const SfxFilter* pFilter = rMatcher.GetFilter4FilterName( sFilterName );
+ if ( !pFilter )
+ continue;
+
+ SfxFilterFlags nFlags = pFilter->GetFilterFlags();
+ if ( ( ( nFlags & nMust ) == nMust )
+ && ( ( nFlags & nDont ) == 0 )
+ )
+ {
+ return pFilter;
+ }
+ }
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ return NULL;
+}
- const SfxFilter* pFilter = NULL;
- const SfxFilterMatcher& rMatcher = SFX_APP()->GetFilterMatcher();
+// --------------------------------------------------------------------------------------------------------------------
+::rtl::OUString SfxFrameLoader_Impl::impl_askForFilter_nothrow( const Reference< XInteractionHandler >& i_rxHandler,
+ const ::rtl::OUString& i_rDocumentURL ) const
+{
+ ENSURE_OR_THROW( i_rxHandler.is(), "invalid interaction handler" );
- /* special mode: use already loaded model ...
- In such case no filter name will be selected and no URL will be given!
- Such informations are not neccessary. We have to create a new view only
- and call setComponent() at the corresponding frame. */
- if( !xModel.is() )
+ ::rtl::OUString sFilterName;
+ try
+ {
+ ::framework::RequestFilterSelect* pRequest = new ::framework::RequestFilterSelect( i_rDocumentURL );
+ Reference< XInteractionRequest > xRequest ( pRequest );
+ i_rxHandler->handle( xRequest );
+ if( !pRequest->isAbort() )
+ sFilterName = pRequest->getFilter();
+ }
+ catch( const Exception& )
{
+ DBG_UNHANDLED_EXCEPTION();
+ }
- // get filter by its name directly ...
- if( aFilterName.Len() )
- pFilter = rMatcher.GetFilter4FilterName( aFilterName );
+ return sFilterName;
+}
- // or search the preferred filter for the detected type ...
- if( !pFilter && aTypeName.Len() )
- pFilter = rMatcher.GetFilter4EA(aTypeName);
+// --------------------------------------------------------------------------------------------------------------------
+namespace
+{
+ sal_Bool lcl_getDispatchResult( const SfxPoolItem* _pResult )
+ {
+ if ( !_pResult )
+ return sal_False;
- // or use given document service for detection too!
- if (!pFilter && aServiceName.Len())
- {
- ::comphelper::SequenceAsHashMap lQuery;
+ // default must be set to true, because some return values
+ // cant be checked, but nonetheless indicate "success"!
+ sal_Bool bSuccess = sal_True;
- if (aServiceName.Len())
- lQuery[::rtl::OUString::createFromAscii("DocumentService")] <<= ::rtl::OUString(aServiceName);
+ // On the other side some special slots return a boolean state,
+ // which can be set to FALSE.
+ SfxBoolItem *pItem = PTR_CAST( SfxBoolItem, _pResult );
+ if ( pItem )
+ bSuccess = pItem->GetValue();
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceManager = ::comphelper::getProcessServiceFactory();
- ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerQuery > xQuery ( xServiceManager->createInstance( DEFINE_CONST_UNICODE( "com.sun.star.document.FilterFactory" ) ), ::com::sun::star::uno::UNO_QUERY );
+ return bSuccess;
+ }
+}
- SfxFilterFlags nMust = SFX_FILTER_IMPORT;
- SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED;
+// --------------------------------------------------------------------------------------------------------------------
+sal_Bool SfxFrameLoader_Impl::impl_createNewDocWithSlotParam( const USHORT _nSlotID, const Reference< XFrame >& i_rxFrame,
+ const bool i_bHidden )
+{
+ SfxRequest aRequest( _nSlotID, SFX_CALLMODE_SYNCHRON, SFX_APP()->GetPool() );
+ aRequest.AppendItem( SfxUnoFrameItem( SID_FILLFRAME, i_rxFrame ) );
+ if ( i_bHidden )
+ aRequest.AppendItem( SfxBoolItem( SID_HIDDEN, TRUE ) );
+ return lcl_getDispatchResult( SFX_APP()->ExecuteSlot( aRequest ) );
+}
- ::com::sun::star::uno::Reference < com::sun::star::container::XEnumeration > xEnum = xQuery->createSubSetEnumerationByProperties(lQuery.getAsConstNamedValueList());
- while ( xEnum->hasMoreElements() )
- {
- ::comphelper::SequenceAsHashMap aType( xEnum->nextElement() );
- aFilterName = aType.getUnpackedValueOrDefault(::rtl::OUString::createFromAscii("Name"), ::rtl::OUString());
- if (!aFilterName.Len())
- continue;
- pFilter = rMatcher.GetFilter4FilterName(aFilterName);
- if (!pFilter)
- continue;
- SfxFilterFlags nFlags = pFilter->GetFilterFlags();
- if (
- ((nFlags & nMust) == nMust) &&
- (!(nFlags & nDont ))
- )
- {
- break;
- }
- pFilter = 0; //! in case we reach end of enumeration we must have a valid value ...
- }
- }
+// --------------------------------------------------------------------------------------------------------------------
+void SfxFrameLoader_Impl::impl_lockHiddenDocument( SfxObjectShell& i_rDocument, const ::comphelper::NamedValueCollection& i_rDescriptor ) const
+{
+ const sal_Bool bHidden = i_rDescriptor.getOrDefault( "Hidden", sal_False );
+ if ( !bHidden )
+ return;
+
+ const SfxViewFrame* pExistingViewFrame = SfxViewFrame::GetFirst( &i_rDocument );
+ if ( pExistingViewFrame )
+ return;
+
+ // the document is to be loaded hidden, and it is not yet displayed in any other frame
+ // To prevent it from being closed when the loader returns, increase its OwnerLock
+ // (the OwnerLock is normally increased by every frame in which the document is displayed, and by this loader)
+ i_rDocument.RestoreNoDelete();
+ i_rDocument.OwnerLock( TRUE );
+ i_rDocument.Get_Impl()->bHiddenLockedByAPI = TRUE;
+}
- // or use interaction to ask user for right filter.
- if ( !pFilter && xInteraction.is() && rURL.Len() )
- {
- ::framework::RequestFilterSelect* pRequest = new ::framework::RequestFilterSelect( rURL );
- css::uno::Reference< css::task::XInteractionRequest > xRequest ( pRequest );
- xInteraction->handle( xRequest );
- if( !pRequest->isAbort() )
- {
- aFilterName = pRequest->getFilter();
- pFilter = rMatcher.GetFilter4FilterName( aFilterName );
- }
- }
+// --------------------------------------------------------------------------------------------------------------------
+void SfxFrameLoader_Impl::impl_determineFilter( ::comphelper::NamedValueCollection& io_rDescriptor ) const
+{
+ const ::rtl::OUString sURL = io_rDescriptor.getOrDefault( "URL", ::rtl::OUString() );
+ const ::rtl::OUString sTypeName = io_rDescriptor.getOrDefault( "TypeName", ::rtl::OUString() );
+ const ::rtl::OUString sFilterName = io_rDescriptor.getOrDefault( "FilterName", ::rtl::OUString() );
+ const ::rtl::OUString sServiceName = io_rDescriptor.getOrDefault( "DocumentService", ::rtl::OUString() );
+ const Reference< XInteractionHandler >
+ xInteraction = io_rDescriptor.getOrDefault( "InteractionHandler", Reference< XInteractionHandler >() );
- if( !pFilter )
- return sal_False;
+ const SfxFilterMatcher& rMatcher = SFX_APP()->GetFilterMatcher();
+ const SfxFilter* pFilter = NULL;
+
+ // get filter by its name directly ...
+ if ( sFilterName.getLength() )
+ pFilter = rMatcher.GetFilter4FilterName( sFilterName );
- aTypeName = pFilter->GetTypeName();
- // use filter names without prefix
- aFilterName = pFilter->GetFilterName();
+ // or search the preferred filter for the detected type ...
+ if ( !pFilter && sTypeName.getLength() )
+ pFilter = rMatcher.GetFilter4EA( sTypeName );
+
+ // or use given document service for detection, too
+ if ( !pFilter && sServiceName.getLength() )
+ pFilter = impl_getFilterFromServiceName_nothrow( sServiceName );
+
+ // or use interaction to ask user for right filter.
+ if ( !pFilter && xInteraction.is() && sURL.getLength() )
+ {
+ ::rtl::OUString sSelectedFilter = impl_askForFilter_nothrow( xInteraction, sURL );
+ if ( sSelectedFilter.getLength() )
+ pFilter = rMatcher.GetFilter4FilterName( sSelectedFilter );
+ }
+
+ if ( pFilter )
+ {
+ io_rDescriptor.put( "FilterName", ::rtl::OUString( pFilter->GetFilterName() ) );
// If detected filter indicates using of an own template format
- // add property "AsTemplate" to descriptor. But supress this step
+ // add property "AsTemplate" to descriptor. But suppress this step
// if such property already exists.
- if( pFilter->IsOwnTemplateFormat())
+ if ( pFilter->IsOwnTemplateFormat() && !io_rDescriptor.has( "AsTemplate" ) )
+ io_rDescriptor.put( "AsTemplate", sal_Bool( sal_True ) );
+
+ // The DocumentService property will finally be used to determine the document type to create, so
+ // override it with the service name as indicated by the found filter.
+ io_rDescriptor.put( "DocumentService", ::rtl::OUString( pFilter->GetServiceName() ) );
+ }
+}
+
+// --------------------------------------------------------------------------------------------------------------------
+SfxObjectShellLock SfxFrameLoader_Impl::impl_findObjectShell( const Reference< XModel2 >& i_rxDocument ) const
+{
+ for ( SfxObjectShell* pDoc = SfxObjectShell::GetFirst( NULL, FALSE ); pDoc; pDoc = SfxObjectShell::GetNext( *pDoc, NULL, FALSE ) )
+ {
+ if ( i_rxDocument == pDoc->GetModel() )
{
- ::comphelper::SequenceAsHashMap::iterator pIt = lDescriptor.find(PROP_ASTEMPLATE);
- if (pIt == lDescriptor.end())
- lDescriptor[PROP_ASTEMPLATE] <<= sal_True;
+ return pDoc;
}
}
- xFrame = rFrame;
+ DBG_ERROR( "SfxFrameLoader_Impl::impl_findObjectShell: model is not based on SfxObjectShell - wrong frame loader usage!" );
+ return NULL;
+}
- // Achtung: beim Abraeumen der Objekte kann die SfxApp destruiert werden, vorher noch Deinitialize_Impl rufen
- SfxApplication* pApp = SFX_APP();
+// --------------------------------------------------------------------------------------------------------------------
+bool SfxFrameLoader_Impl::impl_determineTemplateDocument( ::comphelper::NamedValueCollection& io_rDescriptor ) const
+{
+ const ::rtl::OUString sTemplateRegioName = io_rDescriptor.getOrDefault( "TemplateRegionName", ::rtl::OUString() );
+ const ::rtl::OUString sTemplateName = io_rDescriptor.getOrDefault( "TemplateName", ::rtl::OUString() );
+ const ::rtl::OUString sServiceName = io_rDescriptor.getOrDefault( "DocumentService", ::rtl::OUString() );
+ const ::rtl::OUString sURL = io_rDescriptor.getOrDefault( "URL", ::rtl::OUString() );
+
+ // determine the full URL of the template to use, if any
+ String sTemplateURL;
+ if ( sTemplateRegioName.getLength() && sTemplateName.getLength() )
+ {
+ SfxDocumentTemplates aTmpFac;
+ aTmpFac.GetFull( sTemplateRegioName, sTemplateName, sTemplateURL );
+ }
+ else
+ {
+ if ( sServiceName.getLength() )
+ sTemplateURL = SfxObjectFactory::GetStandardTemplate( sServiceName );
+ else
+ sTemplateURL = SfxObjectFactory::GetStandardTemplate( SfxObjectShell::GetServiceNameFromFactory( sURL ) );
+ }
- // Attention! Because lDescriptor is a copy of rArgs
- // and was might by changed (e.g. for AsTemplate)
- // move all changes there back!
- SfxAllItemSet aSet( pApp->GetPool() );
- TransformParameters( SID_OPENDOC, lDescriptor.getAsConstPropertyValueList(), aSet );
+ if ( sTemplateURL.Len() > 0 )
+ {
+ // detect the filter for the template. Might still be NULL (if the template is broken, or does not
+ // exist, or some such), but this is handled by our caller the same way as if no template/URL was present.
+ const SfxFilter* pTemplateFilter = impl_detectFilterForURL( sTemplateURL, io_rDescriptor, SFX_APP()->GetFilterMatcher() );
+ if ( pTemplateFilter )
+ {
+ // load the template document, but, well, "as template"
+ io_rDescriptor.put( "FilterName", ::rtl::OUString( pTemplateFilter->GetName() ) );
+ io_rDescriptor.put( "FileName", ::rtl::OUString( sTemplateURL ) );
+ io_rDescriptor.put( "AsTemplate", sal_True );
- SFX_ITEMSET_ARG( &aSet, pRefererItem, SfxStringItem, SID_REFERER, FALSE );
- if ( !pRefererItem )
- aSet.Put( SfxStringItem( SID_REFERER, String() ) );
+ // #i21583#
+ // the DocumentService property will finally be used to create the document. Thus, override any possibly
+ // present value with the document service of the template.
+ io_rDescriptor.put( "DocumentService", ::rtl::OUString( pTemplateFilter->GetServiceName() ) );
+ return true;
+ }
+ }
+ return false;
+}
- SfxFrame* pFrame=0;
- for ( pFrame = SfxFrame::GetFirst(); pFrame; pFrame = SfxFrame::GetNext( *pFrame ) )
+// --------------------------------------------------------------------------------------------------------------------
+USHORT SfxFrameLoader_Impl::impl_findSlotParam( const ::rtl::OUString& i_rFactoryURL ) const
+{
+ ::rtl::OUString sSlotParam;
+ const sal_Int32 nParamPos = i_rFactoryURL.indexOf( '?' );
+ if ( nParamPos >= 0 )
{
- if ( pFrame->GetFrameInterface() == xFrame )
- break;
+ // currently only the "slot" parameter is supported
+ const sal_Int32 nSlotPos = i_rFactoryURL.indexOfAsciiL( RTL_CONSTASCII_STRINGPARAM( "slot=" ), nParamPos );
+ if ( nSlotPos > 0 )
+ sSlotParam = i_rFactoryURL.copy( nSlotPos + 5 );
}
- BOOL bFrameCreated = FALSE;
- if ( !pFrame )
+ if ( sSlotParam.getLength() )
+ return USHORT( sSlotParam.toInt32() );
+
+ return 0;
+}
+
+// --------------------------------------------------------------------------------------------------------------------
+void SfxFrameLoader_Impl::impl_handleCaughtError_nothrow( const Any& i_rCaughtError, const ::comphelper::NamedValueCollection& i_rDescriptor ) const
+{
+ try
{
- pFrame = SfxTopFrame::Create( rFrame );
- bFrameCreated = TRUE;
+ const Reference< XInteractionHandler > xInteraction =
+ i_rDescriptor.getOrDefault( "InteractionHandler", Reference< XInteractionHandler >() );
+ if ( !xInteraction.is() )
+ return;
+ ::rtl::Reference< ::comphelper::OInteractionRequest > pRequest( new ::comphelper::OInteractionRequest( i_rCaughtError ) );
+ ::rtl::Reference< ::comphelper::OInteractionApprove > pApprove( new ::comphelper::OInteractionApprove );
+ pRequest->addContinuation( pApprove.get() );
+
+ const Reference< XInteractionHandler2 > xHandler( xInteraction, UNO_QUERY );
+ #if OSL_DEBUG_LEVEL > 0
+ const sal_Bool bHandled =
+ #endif
+ xHandler.is() && xHandler->handleInteractionRequest( pRequest.get() );
+
+ #if OSL_DEBUG_LEVEL > 0
+ if ( !bHandled )
+ // the interaction handler couldn't deal with this error
+ // => report it as assertion, at least (done in the DBG_UNHANDLED_EXCEPTION below)
+ ::cppu::throwException( i_rCaughtError );
+ #endif
}
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+}
+
+// --------------------------------------------------------------------------------------------------------------------
+void SfxFrameLoader_Impl::impl_removeLoaderArguments( ::comphelper::NamedValueCollection& io_rDescriptor )
+{
+ // remove the arguments which are for the loader only, and not for a call to attachResource
+ io_rDescriptor.remove( "StatusIndicator" );
+ io_rDescriptor.remove( "Model" );
+}
- if ( xModel.is() )
+// --------------------------------------------------------------------------------------------------------------------
+::comphelper::NamedValueCollection SfxFrameLoader_Impl::impl_extractViewCreationArgs( ::comphelper::NamedValueCollection& io_rDescriptor )
+{
+ const sal_Char* pKnownViewArgs[] = {
+ "JumpMark"
+ };
+
+ ::comphelper::NamedValueCollection aViewArgs;
+ for ( size_t i=0; i < sizeof( pKnownViewArgs ) / sizeof( pKnownViewArgs[0] ); ++i )
{
- // !TODO: replace by ViewFactory
- if ( pFrame->GetFrameInterface()->getController().is() )
+ if ( io_rDescriptor.has( pKnownViewArgs[i] ) )
{
- // remove old component
- // if a frame was created already, it can't be an SfxComponent!
- pFrame->GetFrameInterface()->setComponent( 0, 0 );
- if ( !bFrameCreated )
- pFrame = SfxTopFrame::Create( rFrame );
+ aViewArgs.put( pKnownViewArgs[i], io_rDescriptor.get( pKnownViewArgs[i] ) );
+ io_rDescriptor.remove( pKnownViewArgs[i] );
}
+ }
+ return aViewArgs;
+}
- aSet.Put( SfxFrameItem( SID_DOCFRAME, pFrame ) );
-
- for ( SfxObjectShell* pDoc = SfxObjectShell::GetFirst( NULL, FALSE ); pDoc; pDoc = SfxObjectShell::GetNext( *pDoc, NULL, FALSE ) )
+// --------------------------------------------------------------------------------------------------------------------
+sal_Int16 SfxFrameLoader_Impl::impl_determineEffectiveViewId_nothrow( const SfxObjectShell& i_rDocument, const ::comphelper::NamedValueCollection& i_rDescriptor )
+{
+ sal_Int16 nViewId = i_rDescriptor.getOrDefault( "ViewId", sal_Int16( 0 ) );
+ try
+ {
+ if ( nViewId == 0 ) do
{
- if ( xModel == pDoc->GetModel() )
- {
- pFrame->SetItemSet_Impl( &aSet );
- ::comphelper::SequenceAsHashMap lUpdateDescr( lDescriptor );
- lUpdateDescr.erase( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Model" ) ) );
- lUpdateDescr.erase( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "URL" ) ) );
-
- xModel->attachResource( rURL, lUpdateDescr.getAsConstPropertyValueList() );
- return pFrame->InsertDocument( pDoc );
- }
+ Reference< XViewDataSupplier > xViewDataSupplier( i_rDocument.GetModel(), UNO_QUERY );
+ Reference< XIndexAccess > xViewData;
+ if ( xViewDataSupplier.is() )
+ xViewData.set( xViewDataSupplier->getViewData() );
+
+ if ( !xViewData.is() || ( xViewData->getCount() == 0 ) )
+ // no view data stored together with the model
+ break;
+
+ // obtain the ViewID from the view data
+ Sequence< PropertyValue > aViewData;
+ if ( !( xViewData->getByIndex( 0 ) >>= aViewData ) )
+ break;
+
+ ::comphelper::NamedValueCollection aNamedViewData( aViewData );
+ ::rtl::OUString sViewId = aNamedViewData.getOrDefault( "ViewId", ::rtl::OUString() );
+ if ( !sViewId.getLength() )
+ break;
+
+ // somewhat weird convention here ... in the view data, the ViewId is a string, effectively describing
+ // a view name. In the document load descriptor, the ViewId is in fact the numeric ID.
+
+ SfxViewFactory* pViewFactory = i_rDocument.GetFactory().GetViewFactoryByViewName( sViewId );
+ if ( pViewFactory )
+ nViewId = sal_Int16( pViewFactory->GetOrdinal() );
}
-
- DBG_ERROR("Model is not based on SfxObjectShell - wrong frame loader use!");
- return sal_False;
+ while ( false );
}
-
- // check for the URL pattern of our factory URLs
- SfxFrameWeak wFrame = pFrame;
- String aPrefix = String::CreateFromAscii( "private:factory/" );
- String aFact( rURL );
- if ( aPrefix.Len() == aFact.Match( aPrefix ) )
+ catch( const Exception& )
{
- if ( !aServiceName.Len() )
- aServiceName = SfxObjectShell::GetServiceNameFromFactory( rURL );
+ DBG_UNHANDLED_EXCEPTION();
+ }
- // it's a factory URL
- aFact.Erase( 0, aPrefix.Len() );
+ if ( nViewId == 0 )
+ nViewId = i_rDocument.GetFactory().GetViewFactory( 0 ).GetOrdinal();
+ return nViewId;
+}
- // look for parameters
- String aParam;
- USHORT nPos = aFact.Search( '?' );
- if ( nPos != STRING_NOTFOUND )
- {
- // currently only the "slot" parameter is supported
- USHORT nParamPos = aFact.Search( String::CreateFromAscii("slot="), nPos );
- if ( nParamPos != STRING_NOTFOUND )
- aParam = aFact.Copy( nParamPos+5, aFact.Len() );
- aFact.Erase( nPos, aFact.Len() );
- }
+// --------------------------------------------------------------------------------------------------------------------
+Reference< XController2 > SfxFrameLoader_Impl::impl_createDocumentView( const Reference< XModel2 >& i_rModel,
+ const Reference< XFrame >& i_rFrame, const ::comphelper::NamedValueCollection& i_rViewFactoryArgs,
+ const ::rtl::OUString& i_rViewName )
+{
+ // let the model create a new controller
+ const Reference< XController2 > xController( i_rModel->createViewController(
+ i_rViewName,
+ i_rViewFactoryArgs.getPropertyValues(),
+ i_rFrame
+ ), UNO_SET_THROW );
+
+ // introduce model/view/controller to each other
+ xController->attachModel( i_rModel.get() );
+ i_rModel->connectController( xController.get() );
+ i_rFrame->setComponent( xController->getComponentWindow(), xController.get() );
+ xController->attachFrame( i_rFrame );
+ i_rModel->setCurrentController( xController.get() );
+
+ return xController;
+}
- WildCard aSearchedFac( aFact.EraseAllChars('4').ToUpperAscii() );
- SFX_ITEMSET_ARG( &aSet, pDocumentTitleItem, SfxStringItem, SID_DOCINFO_TITLE, FALSE );
- INetURLObject aObj( rURL );
+// --------------------------------------------------------------------------------------------------------------------
+sal_Bool SAL_CALL SfxFrameLoader_Impl::load( const Sequence< PropertyValue >& rArgs,
+ const Reference< XFrame >& _rTargetFrame )
+ throw( RuntimeException )
+{
+ ENSURE_OR_THROW( _rTargetFrame.is(), "illegal NULL frame" );
- if ( aParam.Len() )
- {
- sal_uInt16 nSlotId = (sal_uInt16) aParam.ToInt32();
- SfxRequest aReq( nSlotId, SFX_CALLMODE_SYNCHRON, pApp->GetPool() );
- aReq.AppendItem( SfxFrameItem ( SID_DOCFRAME, pFrame ) );
- const SfxPoolItem* pRet = pApp->ExecuteSlot( aReq );
- if ( pRet )
- {
- // default must be set to true, because some return values
- // cant be checked ... but indicates "success"!
- bLoadState = sal_True;
-
- // On the other side some special slots return a boolean state,
- // which can be set to FALSE.
- SfxBoolItem *pItem = PTR_CAST( SfxBoolItem, pRet );
- if (pItem)
- bLoadState = pItem->GetValue();
- }
- else
- bLoadState = sal_False;
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( !bLoadState && bFrameCreated && wFrame && !wFrame->GetCurrentDocument() )
- {
- css::uno::Reference< css::frame::XFrame > axFrame;
- wFrame->SetFrameInterface_Impl( axFrame );
- wFrame->DoClose();
- }
+ RTL_LOGFILE_CONTEXT( aLog, "sfx2 (mb93783) ::SfxFrameLoader::load" );
- xFrame.clear();
- xListener.clear();
- return bLoadState;
- }
+ ::comphelper::NamedValueCollection aDescriptor( rArgs );
- String sTemplateURL;
- SFX_ITEMSET_ARG( &aSet, pTemplateRegionItem, SfxStringItem, SID_TEMPLATE_REGIONNAME, FALSE );
- SFX_ITEMSET_ARG( &aSet, pTemplateNameItem, SfxStringItem, SID_TEMPLATE_NAME, FALSE );
- if ( pTemplateRegionItem && pTemplateNameItem )
- {
- SfxDocumentTemplates aTmpFac;
- aTmpFac.GetFull( pTemplateRegionItem->GetValue(), pTemplateNameItem->GetValue(), sTemplateURL );
- }
- else
+ // ensure the descriptor contains a referrer
+ if ( !aDescriptor.has( "Referer" ) )
+ aDescriptor.put( "Referer", ::rtl::OUString() );
+
+ // TODO: is this needed? finally, when loading is successfull, then there should be no need for this item,
+ // as the document can always obtain its frame. In particular, there might be situations where this frame
+ // is accessed, but already disposed: Imagine the user loading a document, opening a second view on it, and
+ // then closing the first view/frame.
+ aDescriptor.put( "Frame", _rTargetFrame );
+
+ // did the caller already pass a model?
+ Reference< XModel2 > xModel = aDescriptor.getOrDefault( "Model", Reference< XModel2 >() );
+ const bool bExternalModel = xModel.is();
+
+ // check for factory URLs to create a new doc, instead of loading one
+ const ::rtl::OUString sURL = aDescriptor.getOrDefault( "URL", ::rtl::OUString() );
+ const bool bIsFactoryURL = ( sURL.compareToAscii( RTL_CONSTASCII_STRINGPARAM( "private:factory/" ) ) == 0 );
+ bool bInitNewModel = bIsFactoryURL;
+ if ( bIsFactoryURL && !bExternalModel )
+ {
+ const ::rtl::OUString sFactory = sURL.copy( sizeof( "private:factory/" ) -1 );
+ // special handling for some weird factory URLs a la private:factory/swriter?slot=21053
+ const USHORT nSlotParam = impl_findSlotParam( sFactory );
+ if ( nSlotParam != 0 )
{
- sTemplateURL = SfxObjectFactory::GetStandardTemplate( aServiceName );
+ return impl_createNewDocWithSlotParam( nSlotParam, _rTargetFrame, aDescriptor.getOrDefault( "Hidden", false ) );
}
- BOOL bUseTemplate = (sTemplateURL.Len()>0);
- if( bUseTemplate )
+ const bool bDescribesValidTemplate = impl_determineTemplateDocument( aDescriptor );
+ if ( bDescribesValidTemplate )
{
- // #i21583#
- // Forget the filter, which was detected for the corresponding "private:factory/xxx" URL.
- // We must use the right filter, matching to this document ... not to the private URL!
- const SfxFilter* pTemplateFilter = impl_detectFilterForURL(sTemplateURL, rArgs, rMatcher);
- if (pTemplateFilter)
- {
- pFilter = pTemplateFilter;
- aFilterName = pTemplateFilter->GetName();
- // standard template set -> load it "AsTemplate"
- aSet.Put( SfxStringItem ( SID_FILE_NAME, sTemplateURL ) );
- aSet.Put( SfxBoolItem( SID_TEMPLATE, sal_True ) );
- }
-
- // #119268#
- // something is wrong with the set default template (e.g. unknown format, missing file etcpp)
- // The we have to jump into the following special code, where "private:factory/ URL's are handled.
- // We cant "load" such private/factory URL's!
- else
- bUseTemplate = FALSE;
+ // if the media descriptor allowed us to determine a template document to create the new document
+ // from, then do not init a new document model from scratch (below), but instead load the
+ // template document
+ bInitNewModel = false;
}
-
- if ( !bUseTemplate )
+ else
{
- // execute "NewDocument" request
- /* Attention!
- #107913#
- Pointers can't be used to check if two objects are equals!
- E.g. the memory manager can reuse freed memory ...
- and then the holded copy of a pointer will point to another
- (and different!) object - may using the same type then before.
- In such case we compare one object with itself ...
- */
- SfxRequest aReq( SID_NEWDOCDIRECT, SFX_CALLMODE_SYNCHRON, aSet );
- aReq.AppendItem( SfxFrameItem( SID_DOCFRAME, pFrame ) );
- aReq.AppendItem( SfxStringItem( SID_NEWDOCDIRECT, aFact ) );
-
- if ( pDocumentTitleItem )
- aReq.AppendItem( *pDocumentTitleItem );
-
- const SfxPoolItem* pRet = pApp->NewDocDirectExec_ImplOld(aReq);
- if (pRet)
- {
- // default must be set to true, because some return values
- // cant be checked ... but indicates "success"!
- bLoadState = sal_True;
-
- // On the other side some special slots return a boolean state,
- // which can be set to FALSE.
- SfxBoolItem *pItem = PTR_CAST( SfxBoolItem, pRet );
- if (pItem)
- bLoadState = pItem->GetValue();
- }
- else
- bLoadState = sal_False;
-
- if ( !bLoadState && bFrameCreated && wFrame && !wFrame->GetCurrentDocument() )
- {
- css::uno::Reference< css::frame::XFrame > axFrame;
- wFrame->SetFrameInterface_Impl( axFrame );
- wFrame->DoClose();
- }
-
- xFrame.clear();
- xListener.clear();
- return bLoadState;
+ const ::rtl::OUString sServiceName = SfxObjectShell::GetServiceNameFromFactory( sFactory );
+ aDescriptor.put( "DocumentService", sServiceName );
}
}
else
{
- // load the desired file
- aSet.Put( SfxStringItem ( SID_FILE_NAME, rURL ) );
+ // compatibility
+ aDescriptor.put( "FileName", aDescriptor.get( "URL" ) );
}
- aSet.Put( SfxFrameItem( SID_DOCFRAME, pFrame ) );
- aSet.Put( SfxUnoAnyItem( SID_FILLFRAME, css::uno::makeAny(xFrame) ) );
- aSet.Put( SfxStringItem( SID_FILTER_NAME, aFilterName ) );
-
- // !TODO: replace by direct construction of model (needs view factory)
- DBG_ASSERT( pFilter, "No filter set!" );
- if ( !pFilter )
- return sal_False;
-
- sal_Bool bDisaster = sal_False;
- SfxObjectShell* pDoc = SfxObjectShell::CreateObject( pFilter->GetServiceName() );
- if ( pDoc )
+ sal_Bool bLoadSuccess = sal_False;
+ try
{
- css::uno::Reference< css::frame::XLoadable > xLoadable = css::uno::Reference< css::frame::XLoadable >( pDoc->GetModel(), css::uno::UNO_QUERY );
- css::uno::Sequence < css::beans::PropertyValue > aLoadArgs;
- TransformItems( SID_OPENDOC, aSet, aLoadArgs );
- try
+ // extract view releant arguments from the loader args
+ ::comphelper::NamedValueCollection aViewCreationArgs( impl_extractViewCreationArgs( aDescriptor ) );
+
+ // no model passed from outside? => create one from scratch
+ if ( !xModel.is() )
{
- xLoadable->load( aLoadArgs );
-
- SfxMedium* pDocMedium = pDoc->GetMedium();
- BOOL bHidden = FALSE;
- SFX_ITEMSET_ARG( pDocMedium->GetItemSet(), pHidItem, SfxBoolItem, SID_HIDDEN, sal_False);
- if ( pHidItem )
- bHidden = pHidItem->GetValue();
-
- // !TODO: will be done by Framework!
- pDocMedium->SetUpdatePickList( !bHidden );
-
- /*
- #121119#
- We dont know why pFrame can be corrupt here.
- But if it was deleted it shouldnt exists inside our global list.
- May be we can use the damaged pointer to detect if it was removed from
- this global list.
- */
- SfxFrame* pTmp=0;
- for ( pTmp = SfxFrame::GetFirst(); pTmp; pTmp = SfxFrame::GetNext( *pTmp ) )
+ // beforehand, determine the filter to use, and update the descriptor with its information
+ if ( !bInitNewModel )
{
- if ( pFrame == pTmp )
- break;
+ impl_determineFilter( aDescriptor );
}
- if ( pTmp == pFrame )
+ // create the new doc
+ const ::rtl::OUString sServiceName = aDescriptor.getOrDefault( "DocumentService", ::rtl::OUString() );
+ xModel.set( m_aContext.createComponent( sServiceName ), UNO_QUERY_THROW );
+
+ // load resp. init it
+ const Reference< XLoadable > xLoadable( xModel, UNO_QUERY_THROW );
+ if ( bInitNewModel )
{
- // !TODO: replace by ViewFactory
- if ( pFrame->GetFrameInterface()->getController().is() )
- {
- // remove old component
- // if a frame was created already, it can't be an SfxComponent!
- // pFrame->GetFrameInterface()->setComponent( 0, 0 );
- if ( !bFrameCreated )
- pFrame = SfxTopFrame::Create( rFrame );
- }
-
- wFrame = pFrame;
- aSet.Put( SfxFrameItem( SID_DOCFRAME, pFrame ) );
- if( pFrame->InsertDocument( pDoc ) )
- {
- pFrame->GetCurrentViewFrame()->UpdateDocument_Impl();
- String aURL = pDoc->GetMedium()->GetName();
- SFX_APP()->Broadcast( SfxStringHint( SID_OPENURL, aURL ) );
- bLoadState = sal_True;
- }
- else
- bDisaster = sal_True;
+ xLoadable->initNew();
+
+ impl_removeLoaderArguments( aDescriptor );
+ xModel->attachResource( ::rtl::OUString(), aDescriptor.getPropertyValues() );
}
else
{
- DBG_ERROR("#121119# You found the reason for a stacktrace! Frame destroyed while loading document.");
- bLoadState = sal_False;
+ xLoadable->load( aDescriptor.getPropertyValues() );
}
}
- catch ( css::uno::Exception& )
+ else
{
- bDisaster = sal_True;
+ // tell the doc its (current) load args.
+ impl_removeLoaderArguments( aDescriptor );
+ xModel->attachResource( xModel->getURL(), aDescriptor.getPropertyValues() );
+ // TODO: not sure this is correct. The original, pre-refactoring code did it this way. However, I could
+ // imagine scenarios where it is *not* correct to overrule the *existing* model args (XModel::getArgs)
+ // with the ones passed to the loader here. For instance, what about the MacroExecutionMode? The document
+ // might have a mode other than the one passed to the loader, and we always overwrite the former with
+ // the latter.
}
- if ( bDisaster )
- {
- if ( wFrame && !wFrame->GetCurrentDocument() )
- {
- // document loading was not successful; close SfxFrame (but not XFrame!)
- css::uno::Reference< css::frame::XFrame > axFrame;
- wFrame->SetFrameInterface_Impl( axFrame );
- wFrame->DoClose();
- aSet.ClearItem( SID_DOCFRAME );
- }
+ // get the SfxObjectShell (still needed at the moment)
+ const SfxObjectShellLock xDoc = impl_findObjectShell( xModel );
+ ENSURE_OR_THROW( xDoc.Is(), "no SfxObjectShell for the given model" );
+
+ // ensure the ID of the to-be-created view is in the descriptor, if possible
+ const sal_Int16 nViewId = impl_determineEffectiveViewId_nothrow( *xDoc, aDescriptor );
+ const sal_Int16 nViewNo = xDoc->GetFactory().GetViewNo_Impl( nViewId, 0 );
+ const ::rtl::OUString sViewName( xDoc->GetFactory().GetViewFactory( nViewNo ).GetViewName() );
+
+ // if the document is created hidden, prevent it from being deleted until it is shown or disposed
+ impl_lockHiddenDocument( *xDoc, aDescriptor );
+ // TODO; if we wouldn't use a SfxObjectShellLock instance for xDoc, but a simple SfxObjectShellRef,
+ // then this would not be necessary, /me thinks. That is, the *Lock classes inc/dec a "Lock" counter
+ // (additional to the ref counter) in their ctor/dtor, and if the lock counter goes to 0, the
+ // object is closed (DoClose). The impl_lockHiddenDocument is to prevent exactly that premature
+ // closing. However, a *Ref object wouldn't close, anyway. And in case of unsuccessfull loading, the
+ // code at the very end of this method cares for closing the XModel, which should also close the
+ // ObjectShell.
+
+ // plug the document into the frame
+ impl_createDocumentView( xModel, _rTargetFrame, aViewCreationArgs, sViewName );
+ bLoadSuccess = sal_True;
+ }
+ catch ( Exception& )
+ {
+ const Any aError( ::cppu::getCaughtException() );
+ if ( !aDescriptor.getOrDefault( "Silent", sal_False ) )
+ impl_handleCaughtError_nothrow( aError, aDescriptor );
+ }
- css::uno::Reference< css::util::XCloseable > xCloseable( xLoadable, css::uno::UNO_QUERY );
- if ( xCloseable.is() )
- {
- try {
- xCloseable->close( sal_True );
- } catch ( css::uno::Exception& )
- {}
- }
+ // if loading was not successful, close the document
+ if ( !bLoadSuccess && !bExternalModel )
+ {
+ try
+ {
+ const Reference< XCloseable > xCloseable( xModel, UNO_QUERY_THROW );
+ xCloseable->close( sal_True );
+ }
+ catch ( Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
}
}
- xFrame.clear();
- xListener.clear();
- return bLoadState;
+ return bLoadSuccess;
}
-void SfxFrameLoader_Impl::cancel() throw( RUNTIME_EXCEPTION )
+void SfxFrameLoader_Impl::cancel() throw( RuntimeException )
{
}
SFX_IMPL_SINGLEFACTORY( SfxFrameLoader_Impl )
/* XServiceInfo */
-UNOOUSTRING SAL_CALL SfxFrameLoader_Impl::getImplementationName() throw( UNORUNTIMEEXCEPTION )
+UNOOUSTRING SAL_CALL SfxFrameLoader_Impl::getImplementationName() throw( RuntimeException )
{
return impl_getStaticImplementationName();
}
\
/* XServiceInfo */
-sal_Bool SAL_CALL SfxFrameLoader_Impl::supportsService( const UNOOUSTRING& sServiceName ) throw( UNORUNTIMEEXCEPTION )
+sal_Bool SAL_CALL SfxFrameLoader_Impl::supportsService( const UNOOUSTRING& sServiceName ) throw( RuntimeException )
{
UNOSEQUENCE< UNOOUSTRING > seqServiceNames = getSupportedServiceNames();
const UNOOUSTRING* pArray = seqServiceNames.getConstArray();
@@ -619,7 +718,7 @@ sal_Bool SAL_CALL SfxFrameLoader_Impl::supportsService( const UNOOUSTRING& sServ
}
/* XServiceInfo */
-UNOSEQUENCE< UNOOUSTRING > SAL_CALL SfxFrameLoader_Impl::getSupportedServiceNames() throw( UNORUNTIMEEXCEPTION )
+UNOSEQUENCE< UNOOUSTRING > SAL_CALL SfxFrameLoader_Impl::getSupportedServiceNames() throw( RuntimeException )
{
return impl_getStaticSupportedServiceNames();
}
diff --git a/sfx2/source/view/impframe.cxx b/sfx2/source/view/impframe.cxx
deleted file mode 100644
index c81b48b20aa2..000000000000
--- a/sfx2/source/view/impframe.cxx
+++ /dev/null
@@ -1,58 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: impframe.cxx,v $
- * $Revision: 1.9 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sfx2.hxx"
-
-#ifndef GCC
-#endif
-
-#include "impframe.hxx"
-
-#include <svl/smplhint.hxx>
-
-#include <sfx2/frame.hxx>
-#include <sfx2/bindings.hxx>
-#include <sfx2/viewfrm.hxx>
-
-void SfxFrame_Impl::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
-{
- SfxSimpleHint* pHint = PTR_CAST( SfxSimpleHint, &rHint );
- if( pHint && pHint->GetId() == SFX_HINT_CANCELLABLE && pCurrentViewFrame )
- {
- // vom Cancel-Manager
- SfxBindings &rBind = pCurrentViewFrame->GetBindings();
- rBind.Invalidate( SID_BROWSE_STOP );
- if ( !rBind.IsInRegistrations() )
- rBind.Update( SID_BROWSE_STOP );
- rBind.Invalidate( SID_BROWSE_STOP );
- }
-}
-
diff --git a/sfx2/source/view/impframe.hxx b/sfx2/source/view/impframe.hxx
index d0b83ad619af..72f322036efb 100644
--- a/sfx2/source/view/impframe.hxx
+++ b/sfx2/source/view/impframe.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: impframe.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,8 +28,6 @@
#ifndef _SFX_IMPFRAME_HXX
#define _SFX_IMPFRAME_HXX
-#include <svl/cancel.hxx>
-
#include <sfx2/frame.hxx>
#include <sfx2/viewfrm.hxx> // SvBorder
@@ -54,60 +49,51 @@ class SfxObjectShell;
#define FRAME_SEARCH_CREATE 0x00000008
#endif
-class SfxFrame_Impl : public SfxBroadcaster, public SvCompatWeakBase, public SfxListener
+class SfxFrame_Impl : public SfxBroadcaster, public SvCompatWeakBase
{
-friend class SfxFrame;
-
+public:
::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xFrame;
- String aFrameIdName;
sal_uInt32 nType;
- sal_uInt32 nHistoryPos;
SfxViewFrame* pCurrentViewFrame;
- SfxObjectShell* pCurrentObjectShell;
SfxFrameDescriptor* pDescr;
- sal_uInt16 nFrameId;
sal_uInt16 nLocks;
- sal_Bool bCloseOnUnlock : 1;
sal_Bool bClosing : 1;
sal_Bool bPrepClosing : 1;
sal_Bool bInCancelTransfers : 1;
sal_Bool bOwnsBindings : 1;
sal_Bool bReleasingComponent : 1;
- sal_Bool bFocusLocked : 1;
sal_Bool bInPlace : 1;
- SfxCancelManager* pCancelMgr;
- SfxCancellable* pLoadCancellable;
SfxFrame* pFrame;
- const SfxItemSet* pSet;
SfxWorkWindow* pWorkWin;
SvBorder aBorder;
+ // formerly SfxTopFrame
+ Window* pExternalContainerWindow;
+ bool bHidden;
+ bool bLockResize;
+ bool bMenuBarOn;
- SfxFrame_Impl( SfxFrame* pAntiImplP ) :
- SvCompatWeakBase( pAntiImplP ),
- nType( 0L ),
- nHistoryPos( 0 ),
- pCurrentViewFrame( NULL ),
- pCurrentObjectShell( NULL ),
- pDescr( NULL ),
- nFrameId( 0 ),
- nLocks( 0 ),
- bCloseOnUnlock( sal_False ),
- bClosing(sal_False),
- bPrepClosing(sal_False),
- bInCancelTransfers( sal_False ),
- bOwnsBindings( sal_False ),
- bReleasingComponent( sal_False ),
- bFocusLocked( sal_False ),
- bInPlace( sal_False ),
- pCancelMgr( 0 ),
- pLoadCancellable( 0 ),
- pFrame( pAntiImplP ),
- pSet( 0 ),
- pWorkWin( 0 )
- {}
+ SfxFrame_Impl( SfxFrame* pAntiImplP )
+ :SvCompatWeakBase( pAntiImplP )
+ ,nType( 0L )
+ ,pCurrentViewFrame( NULL )
+ ,pDescr( NULL )
+ ,nLocks( 0 )
+ ,bClosing(sal_False)
+ ,bPrepClosing(sal_False)
+ ,bInCancelTransfers( sal_False )
+ ,bOwnsBindings( sal_False )
+ ,bReleasingComponent( sal_False )
+ ,bInPlace( sal_False )
+ ,pFrame( pAntiImplP )
+ ,pWorkWin( 0 )
+ ,pExternalContainerWindow( NULL )
+ ,bHidden( false )
+ ,bLockResize( false )
+ ,bMenuBarOn( true )
+ {
+ }
- virtual ~SfxFrame_Impl() { delete pCancelMgr; delete pLoadCancellable; }
- virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+ virtual ~SfxFrame_Impl() { }
};
#endif
diff --git a/sfx2/source/view/impviewframe.hxx b/sfx2/source/view/impviewframe.hxx
new file mode 100644
index 000000000000..5460d613c7e8
--- /dev/null
+++ b/sfx2/source/view/impviewframe.hxx
@@ -0,0 +1,94 @@
+/*************************************************************************
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2009 by Sun Microsystems, Inc.
+*
+* 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 SFX2_IMPVIEWFRAME_HXX
+#define SFX2_IMPVIEWFRAME_HXX
+
+#include "sfx2/viewfrm.hxx"
+
+#include <svtools/asynclink.hxx>
+#include <vcl/window.hxx>
+
+struct SfxViewFrame_Impl
+{
+ SvBorder aBorder;
+ Size aMargin;
+ Size aSize;
+ String aFrameTitle;
+ TypeId aLastType;
+ String aActualURL;
+ SfxFrame& rFrame;
+ svtools::AsynchronLink* pReloader;
+ Window* pWindow;
+ SfxViewFrame* pActiveChild;
+ Window* pFocusWin;
+ sal_uInt16 nDocViewNo;
+ sal_uInt16 nCurViewId;
+ sal_Bool bResizeInToOut:1;
+ sal_Bool bDontOverwriteResizeInToOut:1;
+ sal_Bool bObjLocked:1;
+ sal_Bool bReloading:1;
+ sal_Bool bIsDowning:1;
+ sal_Bool bModal:1;
+ sal_Bool bEnabled:1;
+ sal_Bool bWindowWasEnabled:1;
+ sal_Bool bActive;
+ String aFactoryName;
+
+ SfxViewFrame_Impl( SfxFrame& i_rFrame )
+ : rFrame( i_rFrame )
+ , pReloader(0 )
+ , pWindow( 0 )
+ , bWindowWasEnabled(sal_True)
+ , bActive( sal_False )
+ {
+ }
+
+ ~SfxViewFrame_Impl()
+ {
+ delete pReloader;
+ }
+};
+
+class SfxFrameViewWindow_Impl : public Window
+{
+ BOOL bActive;
+ SfxViewFrame* pFrame;
+
+public:
+ SfxFrameViewWindow_Impl( SfxViewFrame* p, Window& rParent, WinBits nBits=0 ) :
+ Window( &rParent, nBits | WB_BORDER | WB_CLIPCHILDREN ),
+ bActive( FALSE ),
+ pFrame( p )
+ {
+ p->GetFrame().GetWindow().SetBorderStyle( WINDOW_BORDER_NOBORDER );
+ }
+
+ virtual void Resize();
+ virtual void StateChanged( StateChangedType nStateChange );
+};
+
+#endif // SFX2_IMPVIEWFRAME_HXX
+
diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx
index 3e9989760b11..6d61f4182bbb 100644
--- a/sfx2/source/view/ipclient.cxx
+++ b/sfx2/source/view/ipclient.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ipclient.cxx,v $
- * $Revision: 1.34 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -60,7 +57,7 @@
#include <sfx2/dispatch.hxx>
#include "workwin.hxx"
#include "guisaveas.hxx"
-#include <sfx2/topfrm.hxx>
+#include <sfx2/viewfrm.hxx>
#include <cppuhelper/implbase5.hxx>
#include <vcl/salbtype.hxx>
#include <svtools/ehdl.hxx>
@@ -204,7 +201,7 @@ throw (::com::sun::star::uno::RuntimeException)
// currently needs SFX code
SfxObjectShell* pDoc = reinterpret_cast< SfxObjectShell* >( sal::static_int_cast< sal_IntPtr >( nHandle ));
SfxViewFrame* pFrame = SfxViewFrame::GetFirst( pDoc );
- SfxWorkWindow *pWorkWin = pFrame->GetFrame()->GetWorkWindow_Impl();
+ SfxWorkWindow *pWorkWin = pFrame->GetFrame().GetWorkWindow_Impl();
pWorkWin->UpdateObjectBars_Impl();
}
*/
@@ -234,7 +231,7 @@ uno::Reference < frame::XFrame > SfxInPlaceClient_Impl::GetFrame() const
{
if ( !m_pClient )
throw uno::RuntimeException();
- return m_pClient->GetViewShell()->GetViewFrame()->GetFrame()->GetFrameInterface();
+ return m_pClient->GetViewShell()->GetViewFrame()->GetFrame().GetFrameInterface();
}
void SAL_CALL SfxInPlaceClient_Impl::saveObject()
@@ -736,7 +733,7 @@ void SfxInPlaceClient::SetObject( const uno::Reference < embed::XEmbeddedObject
}
}
- if ( !m_pViewSh || m_pViewSh->GetViewFrame()->GetFrame()->IsClosing_Impl() )
+ if ( !m_pViewSh || m_pViewSh->GetViewFrame()->GetFrame().IsClosing_Impl() )
// sometimes applications reconnect clients on shutting down because it happens in their Paint methods
return;
@@ -986,7 +983,7 @@ ErrCode SfxInPlaceClient::DoVerb( long nVerb )
{
if ( m_pViewSh )
- ((SfxTopFrame*)m_pViewSh->GetViewFrame()->GetTopFrame())->LockResize_Impl(TRUE);
+ m_pViewSh->GetViewFrame()->GetTopFrame().LockResize_Impl(TRUE);
try
{
m_pImp->m_xObject->setClientSite( m_pImp->m_xClient );
@@ -1036,8 +1033,8 @@ ErrCode SfxInPlaceClient::DoVerb( long nVerb )
if ( m_pViewSh )
{
SfxViewFrame* pFrame = m_pViewSh->GetViewFrame();
- ((SfxTopFrame*)pFrame->GetTopFrame())->LockResize_Impl(FALSE);
- pFrame->GetTopFrame()->Resize();
+ pFrame->GetTopFrame().LockResize_Impl(FALSE);
+ pFrame->GetTopFrame().Resize();
}
}
}
@@ -1097,7 +1094,7 @@ void SfxInPlaceClient::DeactivateObject()
}
if ( m_pViewSh )
- ((SfxTopFrame*)m_pViewSh->GetViewFrame()->GetTopFrame())->LockResize_Impl(TRUE);
+ m_pViewSh->GetViewFrame()->GetTopFrame().LockResize_Impl(TRUE);
if ( m_pImp->m_xObject->getStatus( m_pImp->m_nAspect ) & embed::EmbedMisc::MS_EMBED_ACTIVATEWHENVISIBLE )
{
@@ -1119,8 +1116,8 @@ void SfxInPlaceClient::DeactivateObject()
{
SfxViewFrame* pFrame = m_pViewSh->GetViewFrame();
SfxViewFrame::SetViewFrame( pFrame );
- ((SfxTopFrame*)pFrame->GetTopFrame())->LockResize_Impl(FALSE);
- pFrame->GetTopFrame()->Resize();
+ pFrame->GetTopFrame().LockResize_Impl(FALSE);
+ pFrame->GetTopFrame().Resize();
}
}
catch (com::sun::star::uno::Exception& )
diff --git a/sfx2/source/view/makefile.mk b/sfx2/source/view/makefile.mk
index cad12052720c..9c257f4c9f75 100644
--- a/sfx2/source/view/makefile.mk
+++ b/sfx2/source/view/makefile.mk
@@ -1,15 +1,11 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE 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
@@ -49,17 +45,17 @@ SRC1FILES = \
view.src
SLOFILES = \
- $(SLO)$/ipclient.obj \
+ $(SLO)$/ipclient.obj \
$(SLO)$/viewsh.obj \
$(SLO)$/frmload.obj \
$(SLO)$/frame.obj \
+ $(SLO)$/frame2.obj \
$(SLO)$/printer.obj \
$(SLO)$/viewprn.obj \
$(SLO)$/viewfac.obj \
$(SLO)$/orgmgr.obj \
$(SLO)$/viewfrm.obj \
- $(SLO)$/impframe.obj \
- $(SLO)$/topfrm.obj \
+ $(SLO)$/viewfrm2.obj \
$(SLO)$/sfxbasecontroller.obj \
$(SLO)$/userinputinterception.obj
diff --git a/sfx2/source/view/orgmgr.cxx b/sfx2/source/view/orgmgr.cxx
index 71d991759566..b15392372b19 100644
--- a/sfx2/source/view/orgmgr.cxx
+++ b/sfx2/source/view/orgmgr.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: orgmgr.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/sfx2/source/view/printer.cxx b/sfx2/source/view/printer.cxx
index 2b7f89eac7c4..46a96bafab9a 100644
--- a/sfx2/source/view/printer.cxx
+++ b/sfx2/source/view/printer.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: printer.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/sfx2/source/view/prnmon.cxx b/sfx2/source/view/prnmon.cxx
index de075647ab48..a4e96ab1065e 100644
--- a/sfx2/source/view/prnmon.cxx
+++ b/sfx2/source/view/prnmon.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: prnmon.cxx,v $
- * $Revision: 1.25.46.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -322,7 +319,7 @@ SfxPrintProgress::~SfxPrintProgress()
pImp->pViewShell->GetPrinter()->EnablePrintFile( pImp->bOldEnablePrintFile );
// EndPrint-Notification an Frame
- //pImp->pViewShell->GetViewFrame()->GetFrame()->Lock_Impl(FALSE);
+ //pImp->pViewShell->GetViewFrame()->GetFrame().Lock_Impl(FALSE);
pImp->EndListening( *(pImp->pViewShell->GetObjectShell()) );
// the following call might destroy the view or even the document
diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx
index 2951ac3ef4a3..f5c24b195af7 100644
--- a/sfx2/source/view/sfxbasecontroller.cxx
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: sfxbasecontroller.cxx,v $
- * $Revision: 1.76 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -49,6 +46,7 @@
#include <com/sun/star/util/XCloseBroadcaster.hpp>
#include <com/sun/star/util/XCloseListener.hpp>
#include <com/sun/star/util/CloseVetoException.hpp>
+#include <com/sun/star/document/XViewDataSupplier.hpp>
#include <cppuhelper/implbase1.hxx>
#include <cppuhelper/implbase2.hxx>
#include <com/sun/star/frame/FrameActionEvent.hpp>
@@ -56,15 +54,18 @@
#include <com/sun/star/frame/CommandGroup.hpp>
#include <com/sun/star/frame/XFrame.hpp>
#include <com/sun/star/frame/XBorderResizeListener.hpp>
+#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/lang/EventObject.hpp>
#include <com/sun/star/lang/XEventListener.hpp>
#include <com/sun/star/lang/XComponent.hpp>
+#include <com/sun/star/container/XIndexAccess.hpp>
#include <cppuhelper/interfacecontainer.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <cppuhelper/implbase1.hxx>
#include <basic/sbstar.hxx>
#include <uno/mapping.hxx>
#include <sfx2/viewsh.hxx>
+#include <sfx2/docfac.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/objsh.hxx>
#include <sfx2/app.hxx>
@@ -87,10 +88,12 @@
#include <toolkit/helper/convert.hxx>
#include <framework/titlehelper.hxx>
#include <comphelper/processfactory.hxx>
+#include <tools/diagnose_ex.h>
#include <hash_map>
#include <sfx2/event.hxx>
+#include "viewfac.hxx"
#define OMULTITYPEINTERFACECONTAINERHELPER ::cppu::OMultiTypeInterfaceContainerHelper
#define OINTERFACECONTAINERHELPER ::cppu::OInterfaceContainerHelper
@@ -112,6 +115,24 @@
#define TIMEOUT_START_RESCHEDULE 10L /* 10th s */
using namespace ::com::sun::star;
+using ::com::sun::star::uno::Reference;
+using ::com::sun::star::uno::RuntimeException;
+using ::com::sun::star::uno::UNO_QUERY_THROW;
+using ::com::sun::star::lang::DisposedException;
+using ::com::sun::star::awt::XWindow;
+using ::com::sun::star::frame::XController;
+using ::com::sun::star::frame::XDispatchProvider;
+using ::com::sun::star::document::XViewDataSupplier;
+using ::com::sun::star::container::XIndexAccess;
+using ::com::sun::star::beans::PropertyValue;
+using ::com::sun::star::uno::Sequence;
+using ::com::sun::star::uno::UNO_QUERY;
+using ::com::sun::star::uno::Exception;
+using ::com::sun::star::frame::XFrame;
+using ::com::sun::star::frame::XFrameActionListener;
+using ::com::sun::star::util::XCloseListener;
+using ::com::sun::star::task::XStatusIndicator;
+using ::com::sun::star::frame::XTitle;
namespace css = ::com::sun::star;
struct GroupIDToCommandGroup
@@ -223,7 +244,7 @@ void reschedule()
class SfxStatusIndicator : public ::cppu::WeakImplHelper2< ::com::sun::star::task::XStatusIndicator, ::com::sun::star::lang::XEventListener >
{
friend class SfxBaseController;
- ::com::sun::star::uno::Reference < XCONTROLLER > xOwner;
+ ::com::sun::star::uno::Reference < XController > xOwner;
::com::sun::star::uno::Reference < ::com::sun::star::task::XStatusIndicator > xProgress;
SfxWorkWindow* pWorkWindow;
sal_Int32 _nRange;
@@ -430,29 +451,19 @@ void SAL_CALL IMPL_SfxBaseController_CloseListenerHelper::notifyClosing( const E
struct IMPL_SfxBaseController_DataContainer
{
- REFERENCE < XFRAME > m_xFrame;
- REFERENCE < XFRAMEACTIONLISTENER > m_xListener ;
- REFERENCE < XCLOSELISTENER > m_xCloseListener ;
+ Reference< XFrame > m_xFrame ;
+ Reference< XFrameActionListener > m_xListener ;
+ Reference< XCloseListener > m_xCloseListener ;
::sfx2::UserInputInterception m_aUserInputInterception;
OMULTITYPEINTERFACECONTAINERHELPER m_aListenerContainer ;
- OINTERFACECONTAINERHELPER m_aInterceptorContainer ;
- REFERENCE < ::com::sun::star::task::XStatusIndicator > m_xIndicator;
+ OINTERFACECONTAINERHELPER m_aInterceptorContainer ;
+ Reference< XStatusIndicator > m_xIndicator ;
SfxViewShell* m_pViewShell ;
SfxBaseController* m_pController ;
sal_Bool m_bDisposing ;
- sal_Bool m_bSuspendState;
- /** When this flag is <true/> (the default) then in dispose() the frame
- and with it the view shell are released together with the
- controller.
- A derived class can set the flag to <false/> when it wants to
- exchange controllers that work on the same view shell. One
- application is the Impress Multi Pane GUI that changes shells that
- are stacked on one view shell. Controllers are associated with the
- stacked shells and thus must not destroy the view shell which is not
- affected by the switching.
- */
- sal_Bool m_bIsFrameReleasedWithController;
- css::uno::Reference< css::frame::XTitle > m_xTitleHelper;
+ sal_Bool m_bSuspendState ;
+ Reference< XTitle > m_xTitleHelper ;
+ Sequence< PropertyValue > m_aCreationArgs ;
IMPL_SfxBaseController_DataContainer( MUTEX& aMutex ,
SfxViewShell* pViewShell ,
@@ -466,7 +477,6 @@ struct IMPL_SfxBaseController_DataContainer
, m_pController ( pController )
, m_bDisposing ( sal_False )
, m_bSuspendState ( sal_False )
- , m_bIsFrameReleasedWithController( sal_True )
{
}
@@ -528,8 +538,7 @@ void SAL_CALL IMPL_SfxBaseController_ListenerHelper::disposing( const EVENTOBJEC
//________________________________________________________________________________________________________
DBG_NAME(sfx2_SfxBaseController)
SfxBaseController::SfxBaseController( SfxViewShell* pViewShell )
- : IMPL_SfxBaseController_MutexContainer ( )
- , m_pData ( new IMPL_SfxBaseController_DataContainer( m_aMutex, pViewShell, this ))
+ : m_pData ( new IMPL_SfxBaseController_DataContainer( m_aMutex, pViewShell, this ))
{
DBG_CTOR(sfx2_SfxBaseController,NULL);
m_pData->m_pViewShell->SetController( this );
@@ -546,138 +555,60 @@ SfxBaseController::~SfxBaseController()
}
//________________________________________________________________________________________________________
-// SfxBaseController -> XInterface
-//________________________________________________________________________________________________________
-ANY SAL_CALL SfxBaseController::queryInterface( const UNOTYPE& rType ) throw( RUNTIMEEXCEPTION )
-{
- // Attention:
- // Don't use mutex or guard in this method!!! Is a method of XInterface.
-
- // Ask for my own supported interfaces ...
- ANY aReturn( ::cppu::queryInterface( rType ,
- static_cast< XTYPEPROVIDER* > ( this ) ,
- static_cast< XCOMPONENT* > ( this ) ,
- static_cast< XCONTROLLER* > ( this ) ,
- static_cast< XCONTROLLERBORDER* > ( this ) ,
- static_cast< XUSERINPUTINTERCEPTION* > ( this ) ,
- static_cast< XSTATUSINDICATORSUPPLIER* > ( this ) ,
- static_cast< XCONTEXTMENUINTERCEPTION* > ( this ) ,
- static_cast< XDISPATCHPROVIDER* > ( this ),
- static_cast< XTITLE* > ( this ),
- static_cast< XTITLECHANGEBROADCASTER* > ( this ),
- static_cast< XDISPATCHINFORMATIONPROVIDER* > ( this ) ) ) ;
-
- // If searched interface supported by this class ...
- if ( aReturn.hasValue() == sal_True )
- {
- // ... return this information.
- return aReturn ;
- }
- else
- {
- // Else; ... ask baseclass for interfaces!
- return OWeakObject::queryInterface( rType ) ;
- }
-}
-
-//________________________________________________________________________________________________________
-// SfxBaseController -> XInterface
-//________________________________________________________________________________________________________
-
-void SAL_CALL SfxBaseController::acquire() throw()
-{
- // Attention:
- // Don't use mutex or guard in this method!!! Is a method of XInterface.
-
- // Forward to baseclass
- OWeakObject::acquire() ;
-}
-
-//________________________________________________________________________________________________________
-// SfxBaseController -> XInterface
+// SfxBaseController -> XController2
//________________________________________________________________________________________________________
-void SAL_CALL SfxBaseController::release() throw()
+Reference< XWindow > SAL_CALL SfxBaseController::getComponentWindow() throw (RuntimeException)
{
- // Attention:
- // Don't use mutex or guard in this method!!! Is a method of XInterface.
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ if ( !m_pData->m_pViewShell )
+ throw DisposedException();
- // Forward to baseclass
- OWeakObject::release() ;
+ return Reference< XWindow >( GetViewFrame_Impl().GetFrame().GetWindow().GetComponentInterface(), UNO_QUERY_THROW );
}
-//________________________________________________________________________________________________________
-// SfxBaseController -> XTypeProvider
-//________________________________________________________________________________________________________
-
-SEQUENCE< UNOTYPE > SAL_CALL SfxBaseController::getTypes() throw( RUNTIMEEXCEPTION )
+::rtl::OUString SAL_CALL SfxBaseController::getViewControllerName() throw (RuntimeException)
{
- // Optimize this method !
- // We initialize a static variable only one time. And we don't must use a mutex at every call!
- // For the first call; pTypeCollection is NULL - for the second call pTypeCollection is different from NULL!
- static OTYPECOLLECTION* pTypeCollection = NULL ;
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ if ( !m_pData->m_pViewShell || !m_pData->m_pViewShell->GetObjectShell() )
+ throw DisposedException();
- if ( pTypeCollection == NULL )
- {
- // Ready for multithreading; get global mutex for first call of this method only! see before
- MUTEXGUARD aGuard( MUTEX::getGlobalMutex() ) ;
+ const SfxObjectFactory& rDocFac( m_pData->m_pViewShell->GetObjectShell()->GetFactory() );
+ sal_uInt16 nViewNo = rDocFac.GetViewNo_Impl( GetViewFrame_Impl().GetCurViewId(), rDocFac.GetViewFactoryCount() );
+ OSL_ENSURE( nViewNo < rDocFac.GetViewFactoryCount(), "SfxBaseController::getViewControllerName: view ID not found in view factories!" );
- // Control these pointer again ... it can be, that another instance will be faster then these!
- if ( pTypeCollection == NULL )
- {
- // Create a static typecollection ...
- static OTYPECOLLECTION aTypeCollection( ::getCppuType(( const REFERENCE< XTYPEPROVIDER >*)NULL ) ,
- ::getCppuType(( const REFERENCE< XCONTROLLER >*)NULL ) ,
- ::getCppuType(( const REFERENCE< XCONTROLLERBORDER >*)NULL ) ,
- ::getCppuType(( const REFERENCE< XDISPATCHPROVIDER >*)NULL ) ,
- ::getCppuType(( const REFERENCE< XSTATUSINDICATORSUPPLIER >*)NULL ) ,
- ::getCppuType(( const REFERENCE< XCONTEXTMENUINTERCEPTION >*)NULL ) ,
- ::getCppuType(( const REFERENCE< XUSERINPUTINTERCEPTION >*)NULL ) ,
- ::getCppuType(( const REFERENCE< XTITLE >*)NULL ) ,
- ::getCppuType(( const REFERENCE< XTITLECHANGEBROADCASTER >*)NULL ) ,
- ::getCppuType(( const REFERENCE< XDISPATCHINFORMATIONPROVIDER >*)NULL ) );
- // ... and set his address to static pointer!
- pTypeCollection = &aTypeCollection ;
- }
- }
+ ::rtl::OUString sViewName;
+ if ( nViewNo < rDocFac.GetViewFactoryCount() )
+ sViewName = rDocFac.GetViewFactory( nViewNo ).GetViewName();
- return pTypeCollection->getTypes() ;
+ return sViewName;
}
-//________________________________________________________________________________________________________
-// SfxBaseController -> XTypeProvider
-//________________________________________________________________________________________________________
-
-SEQUENCE< sal_Int8 > SAL_CALL SfxBaseController::getImplementationId() throw( RUNTIMEEXCEPTION )
+Sequence< PropertyValue > SAL_CALL SfxBaseController::getCreationArguments() throw (RuntimeException)
{
- // Create one Id for all instances of this class.
- // Use ethernet address to do this! (sal_True)
-
- // Optimize this method
- // We initialize a static variable only one time. And we don't must use a mutex at every call!
- // For the first call; pID is NULL - for the second call pID is different from NULL!
- static OIMPLEMENTATIONID* pID = NULL ;
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ if ( !m_pData->m_pViewShell || !m_pData->m_pViewShell->GetObjectShell() )
+ throw DisposedException();
- if ( pID == NULL )
- {
- // Ready for multithreading; get global mutex for first call of this method only! see before
- MUTEXGUARD aGuard( MUTEX::getGlobalMutex() ) ;
+ return m_pData->m_aCreationArgs;
+}
- // Control these pointer again ... it can be, that another instance will be faster then these!
- if ( pID == NULL )
- {
- // Create a new static ID ...
- static OIMPLEMENTATIONID aID( sal_False ) ;
- // ... and set his address to static pointer!
- pID = &aID ;
- }
- }
+void SfxBaseController::SetCreationArguments_Impl( const Sequence< PropertyValue >& i_rCreationArgs )
+{
+ OSL_ENSURE( m_pData->m_aCreationArgs.getLength() == 0, "SfxBaseController::SetCreationArguments_Impl: not intended to be called twice!" );
+ m_pData->m_aCreationArgs = i_rCreationArgs;
+}
- return pID->getImplementationId() ;
+SfxViewFrame& SfxBaseController::GetViewFrame_Impl() const
+{
+ ENSURE_OR_THROW( m_pData->m_pViewShell, "not to be called without a view shell" );
+ SfxViewFrame* pActFrame = m_pData->m_pViewShell->GetFrame();
+ ENSURE_OR_THROW( pActFrame, "a view shell without a view frame is pretty pathological" );
+ return *pActFrame;
}
//________________________________________________________________________________________________________
-// SfxBaseController -> XController
+// SfxBaseController -> XController2 -> XController
//________________________________________________________________________________________________________
void SAL_CALL SfxBaseController::attachFrame( const REFERENCE< XFRAME >& xFrame ) throw( ::com::sun::star::uno::RuntimeException )
@@ -704,32 +635,11 @@ void SAL_CALL SfxBaseController::attachFrame( const REFERENCE< XFRAME >& xFrame
if ( m_pData->m_pViewShell )
{
- SfxViewFrame* pActFrame = m_pData->m_pViewShell->GetFrame() ;
- pActFrame->Enable( TRUE );
- pActFrame->GetDispatcher()->Lock( FALSE );
+ ConnectSfxFrame_Impl( E_CONNECT );
- if ( ( m_pData->m_pViewShell->GetObjectShell() != NULL )
- && ( m_pData->m_pViewShell->GetObjectShell()->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
- )
- {
- SfxViewFrame* pViewFrm = m_pData->m_pViewShell->GetViewFrame();
- if ( !pViewFrm->GetFrame()->IsInPlace() )
- {
- // for outplace embedded objects, we want the layout manager to keep the content window
- // size constant, if possible
- try
- {
- uno::Reference< beans::XPropertySet > xFrameProps( m_pData->m_xFrame, uno::UNO_QUERY_THROW );
- uno::Reference< beans::XPropertySet > xLayouterProps(
- xFrameProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LayoutManager" ) ) ), uno::UNO_QUERY_THROW );
- xLayouterProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PreserveContentSize" ) ), uno::makeAny( sal_True ) );
- }
- catch( const uno::Exception& )
- {
- DBG_UNHANDLED_EXCEPTION();
- }
- }
- }
+ // attaching the frame to the controller is the last step in the creation of a new view, so notify this
+ SfxEventHint aHint( SFX_EVENT_VIEWCREATED, GlobalEventConfig::GetEventName( STR_EVENT_VIEWCREATED ), m_pData->m_pViewShell->GetObjectShell() );
+ SFX_APP()->NotifyEvent( aHint );
}
}
}
@@ -790,9 +700,7 @@ sal_Bool SAL_CALL SfxBaseController::suspend( sal_Bool bSuspend ) throw( ::com::
BOOL bRet = bOther || pDocShell->PrepareClose();
if ( bRet )
{
- // disable window and dispatcher until suspend call is withdrawn
- pActFrame->Enable( FALSE );
- pActFrame->GetDispatcher()->Lock( TRUE );
+ ConnectSfxFrame_Impl( E_DISCONNECT );
m_pData->m_bSuspendState = sal_True;
}
@@ -805,9 +713,7 @@ sal_Bool SAL_CALL SfxBaseController::suspend( sal_Bool bSuspend ) throw( ::com::
if ( m_pData->m_pViewShell )
{
- SfxViewFrame* pActFrame = m_pData->m_pViewShell->GetFrame() ;
- pActFrame->Enable( TRUE );
- pActFrame->GetDispatcher()->Lock( FALSE );
+ ConnectSfxFrame_Impl( E_RECONNECT );
}
m_pData->m_bSuspendState = sal_False;
@@ -896,7 +802,7 @@ REFERENCE< XDISPATCH > SAL_CALL SfxBaseController::queryDispatch( const UNOU
if ( xFrame.is() )
xFrame->setName( sTargetFrameName );
- REFERENCE < XDISPATCHPROVIDER > xProv( xFrame, ::com::sun::star::uno::UNO_QUERY );
+ Reference< XDispatchProvider > xProv( xFrame, ::com::sun::star::uno::UNO_QUERY );
if ( xProv.is() )
return xProv->queryDispatch( aURL, sTargetFrameName, ::com::sun::star::frame::FrameSearchFlag::SELF );
}
@@ -914,13 +820,13 @@ REFERENCE< XDISPATCH > SAL_CALL SfxBaseController::queryDispatch( const UNOU
pSlot = rSlotPool.GetUnoSlot( aMasterCommand );
else
pSlot = rSlotPool.GetUnoSlot( aURL.Path );
- if ( pSlot && ( !pAct->GetFrame()->IsInPlace() || !pSlot->IsMode( SFX_SLOT_CONTAINER ) ) )
+ if ( pSlot && ( !pAct->GetFrame().IsInPlace() || !pSlot->IsMode( SFX_SLOT_CONTAINER ) ) )
return pAct->GetBindings().GetDispatch( pSlot, aURL, bMasterCommand );
else
{
// try to find parent SfxViewFrame
uno::Reference< frame::XFrame > xParentFrame;
- uno::Reference< frame::XFrame > xOwnFrame = pAct->GetFrame()->GetFrameInterface();
+ uno::Reference< frame::XFrame > xOwnFrame = pAct->GetFrame().GetFrameInterface();
if ( xOwnFrame.is() )
xParentFrame = uno::Reference< frame::XFrame >( xOwnFrame->getCreator(), uno::UNO_QUERY );
@@ -935,7 +841,7 @@ REFERENCE< XDISPATCH > SAL_CALL SfxBaseController::queryDispatch( const UNOU
pFrame;
pFrame = SfxViewFrame::GetNext( *pFrame ) )
{
- if ( pFrame->GetFrame()->GetFrameInterface() == xParentFrame )
+ if ( pFrame->GetFrame().GetFrameInterface() == xParentFrame )
{
pParentFrame = pFrame;
break;
@@ -971,13 +877,13 @@ REFERENCE< XDISPATCH > SAL_CALL SfxBaseController::queryDispatch( const UNOU
SfxSlotPool& rSlotPool = SfxSlotPool::GetSlotPool( pAct );
const SfxSlot* pSlot = rSlotPool.GetSlot( nId );
- if ( pSlot && ( !pAct->GetFrame()->IsInPlace() || !pSlot->IsMode( SFX_SLOT_CONTAINER ) ) )
+ if ( pSlot && ( !pAct->GetFrame().IsInPlace() || !pSlot->IsMode( SFX_SLOT_CONTAINER ) ) )
return pAct->GetBindings().GetDispatch( pSlot, aURL, sal_False );
else
{
// try to find parent SfxViewFrame
uno::Reference< frame::XFrame > xParentFrame;
- uno::Reference< frame::XFrame > xOwnFrame = pAct->GetFrame()->GetFrameInterface();
+ uno::Reference< frame::XFrame > xOwnFrame = pAct->GetFrame().GetFrameInterface();
if ( xOwnFrame.is() )
xParentFrame = uno::Reference< frame::XFrame >( xOwnFrame->getCreator(), uno::UNO_QUERY );
@@ -992,7 +898,7 @@ REFERENCE< XDISPATCH > SAL_CALL SfxBaseController::queryDispatch( const UNOU
pFrame;
pFrame = SfxViewFrame::GetNext( *pFrame ) )
{
- if ( pFrame->GetFrame()->GetFrameInterface() == xParentFrame )
+ if ( pFrame->GetFrame().GetFrameInterface() == xParentFrame )
{
pParentFrame = pFrame;
break;
@@ -1126,19 +1032,14 @@ void SfxBaseController::BorderWidthsChanged_Impl()
// SfxBaseController -> XComponent
//________________________________________________________________________________________________________
-void SfxBaseController::FrameIsReleasedWithController (sal_Bool bFlag)
-{
- m_pData->m_bIsFrameReleasedWithController = bFlag;
-}
-
void SAL_CALL SfxBaseController::dispose() throw( ::com::sun::star::uno::RuntimeException )
{
::vos::OGuard aGuard( Application::GetSolarMutex() );
- REFERENCE < XCONTROLLER > xTmp( this );
+ Reference< XController > xTmp( this );
m_pData->m_bDisposing = sal_True ;
EVENTOBJECT aEventObject;
- aEventObject.Source = (XCONTROLLER*)this ;
+ aEventObject.Source = *this ;
m_pData->m_aListenerContainer.disposeAndClear( aEventObject ) ;
if ( m_pData->m_pController && m_pData->m_pController->getFrame().is() )
@@ -1147,18 +1048,15 @@ void SAL_CALL SfxBaseController::dispose() throw( ::com::sun::star::uno::Runtime
if ( m_pData->m_pViewShell )
{
SfxViewFrame* pFrame = m_pData->m_pViewShell->GetViewFrame() ;
- if (m_pData->m_bIsFrameReleasedWithController)
- {
- if ( pFrame && pFrame->GetViewShell() == m_pData->m_pViewShell )
- pFrame->GetFrame()->SetIsClosing_Impl();
- m_pData->m_pViewShell->DiscardClients_Impl();
- m_pData->m_pViewShell->pImp->bControllerSet = sal_False ;
- }
+ if ( pFrame && pFrame->GetViewShell() == m_pData->m_pViewShell )
+ pFrame->GetFrame().SetIsClosing_Impl();
+ m_pData->m_pViewShell->DiscardClients_Impl();
+ m_pData->m_pViewShell->pImp->bControllerSet = sal_False ;
if ( pFrame )
{
EVENTOBJECT aObject;
- aObject.Source = (OWEAKOBJECT*)this ;
+ aObject.Source = *this ;
SfxObjectShell* pDoc = pFrame->GetObjectShell() ;
SfxViewFrame *pView = SfxViewFrame::GetFirst(pDoc);
@@ -1170,12 +1068,9 @@ void SAL_CALL SfxBaseController::dispose() throw( ::com::sun::star::uno::Runtime
pView = SfxViewFrame::GetNext( *pView, pDoc );
}
- if ( m_pData->m_bIsFrameReleasedWithController )
- {
- SFX_APP()->NotifyEvent( SfxEventHint(SFX_EVENT_CLOSEVIEW, GlobalEventConfig::GetEventName( STR_EVENT_CLOSEVIEW ), pDoc ) );
- if ( !pView )
- SFX_APP()->NotifyEvent( SfxEventHint(SFX_EVENT_CLOSEDOC, GlobalEventConfig::GetEventName( STR_EVENT_CLOSEDOC ), pDoc) );
- }
+ SFX_APP()->NotifyEvent( SfxEventHint(SFX_EVENT_CLOSEVIEW, GlobalEventConfig::GetEventName( STR_EVENT_CLOSEVIEW ), pDoc ) );
+ if ( !pView )
+ SFX_APP()->NotifyEvent( SfxEventHint(SFX_EVENT_CLOSEDOC, GlobalEventConfig::GetEventName( STR_EVENT_CLOSEDOC ), pDoc) );
REFERENCE< XMODEL > xModel = pDoc->GetModel();
REFERENCE < ::com::sun::star::util::XCloseable > xCloseable( xModel, com::sun::star::uno::UNO_QUERY );
@@ -1192,14 +1087,13 @@ void SAL_CALL SfxBaseController::dispose() throw( ::com::sun::star::uno::Runtime
m_pData->m_xListener->disposing( aObject );
SfxViewShell *pShell = m_pData->m_pViewShell;
m_pData->m_pViewShell = NULL;
- if ( pFrame->GetViewShell() == pShell
- && m_pData->m_bIsFrameReleasedWithController)
+ if ( pFrame->GetViewShell() == pShell )
{
// Enter registrations only allowed if we are the owner!
- if ( pFrame->GetFrame()->OwnsBindings_Impl() )
+ if ( pFrame->GetFrame().OwnsBindings_Impl() )
pFrame->GetBindings().ENTERREGISTRATIONS();
- pFrame->GetFrame()->SetFrameInterface_Impl( aXFrame );
- pFrame->GetFrame()->DoClose_Impl();
+ pFrame->GetFrame().SetFrameInterface_Impl( aXFrame );
+ pFrame->GetFrame().DoClose_Impl();
}
}
}
@@ -1253,7 +1147,7 @@ SfxViewShell* SfxBaseController::GetViewShell_Impl() const
{
::vos::OGuard aGuard( Application::GetSolarMutex() );
if ( m_pData->m_pViewShell && !m_pData->m_xIndicator.is() )
- m_pData->m_xIndicator = new SfxStatusIndicator( this, m_pData->m_pViewShell->GetViewFrame()->GetFrame()->GetWorkWindow_Impl() );
+ m_pData->m_xIndicator = new SfxStatusIndicator( this, m_pData->m_pViewShell->GetViewFrame()->GetFrame().GetWorkWindow_Impl() );
return m_pData->m_xIndicator;
}
@@ -1398,6 +1292,165 @@ BOOL SfxBaseController::HasMouseClickListeners_Impl()
return m_pData->m_aUserInputInterception.hasMouseClickListeners();
}
+void SfxBaseController::ConnectSfxFrame_Impl( const ConnectSfxFrame i_eConnect )
+{
+ ENSURE_OR_THROW( m_pData->m_pViewShell, "not to be called without a view shell" );
+ SfxViewFrame* pViewFrame = m_pData->m_pViewShell->GetFrame();
+ ENSURE_OR_THROW( pViewFrame, "a view shell without a view frame is pretty pathological" );
+
+ const bool bConnect = ( i_eConnect != E_DISCONNECT );
+
+ // disable window and dispatcher
+ pViewFrame->Enable( bConnect );
+ pViewFrame->GetDispatcher()->Lock( !bConnect );
+
+ if ( bConnect )
+ {
+ if ( i_eConnect == E_CONNECT )
+ {
+ if ( ( m_pData->m_pViewShell->GetObjectShell() != NULL )
+ && ( m_pData->m_pViewShell->GetObjectShell()->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
+ )
+ {
+ SfxViewFrame* pViewFrm = m_pData->m_pViewShell->GetViewFrame();
+ if ( !pViewFrm->GetFrame().IsInPlace() )
+ {
+ // for outplace embedded objects, we want the layout manager to keep the content window
+ // size constant, if possible
+ try
+ {
+ uno::Reference< beans::XPropertySet > xFrameProps( m_pData->m_xFrame, uno::UNO_QUERY_THROW );
+ uno::Reference< beans::XPropertySet > xLayouterProps(
+ xFrameProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LayoutManager" ) ) ), uno::UNO_QUERY_THROW );
+ xLayouterProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PreserveContentSize" ) ), uno::makeAny( sal_True ) );
+ }
+ catch( const uno::Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ }
+ }
+ }
+
+ // upon DISCONNECT, we did *not* pop the shells from the stack (this is done elsewhere), so upon
+ // RECONNECT, we're not allowed to push them
+ if ( i_eConnect != E_RECONNECT )
+ {
+ pViewFrame->GetDispatcher()->Push( *m_pData->m_pViewShell );
+ if ( m_pData->m_pViewShell->GetSubShell() )
+ pViewFrame->GetDispatcher()->Push( *m_pData->m_pViewShell->GetSubShell() );
+ m_pData->m_pViewShell->PushSubShells_Impl();
+ pViewFrame->GetDispatcher()->Flush();
+ }
+
+ Window* pEditWin = m_pData->m_pViewShell->GetWindow();
+ if ( pEditWin && m_pData->m_pViewShell->IsShowView_Impl() )
+ pEditWin->Show();
+
+ if ( SfxViewFrame::Current() == pViewFrame )
+ pViewFrame->GetDispatcher()->Update_Impl( sal_True );
+
+ Window* pFrameWin = &pViewFrame->GetWindow();
+ if ( pFrameWin != &pViewFrame->GetFrame().GetWindow() )
+ pFrameWin->Show();
+
+ if ( i_eConnect == E_CONNECT )
+ {
+ ::comphelper::NamedValueCollection aDocumentArgs( getModel()->getArgs() );
+
+ const sal_Int16 nPluginMode = aDocumentArgs.getOrDefault( "PluginMode", sal_Int16( 0 ) );
+ const bool bHasPluginMode = ( nPluginMode != 0 );
+
+ SfxFrame& rFrame = pViewFrame->GetFrame();
+ SfxObjectShell& rDoc = *m_pData->m_pViewShell->GetObjectShell();
+ if ( !rFrame.IsMarkedHidden_Impl() )
+ {
+ if ( rDoc.IsHelpDocument() || ( nPluginMode == 2 ) )
+ pViewFrame->GetDispatcher()->HideUI( TRUE );
+ else
+ pViewFrame->GetDispatcher()->HideUI( FALSE );
+
+ if ( rFrame.IsInPlace() )
+ pViewFrame->LockAdjustPosSizePixel();
+
+ if ( nPluginMode == 3 )
+ rFrame.GetWorkWindow_Impl()->SetInternalDockingAllowed( FALSE );
+
+ if ( !rFrame.IsInPlace() )
+ pViewFrame->GetDispatcher()->Update_Impl();
+ pViewFrame->Show();
+ rFrame.GetWindow().Show();
+ if ( !rFrame.IsInPlace() || ( nPluginMode == 3 ) )
+ pViewFrame->MakeActive_Impl( rFrame.GetFrameInterface()->isActive() );
+
+ if ( rFrame.IsInPlace() )
+ {
+ pViewFrame->UnlockAdjustPosSizePixel();
+ // force resize for OLE server to fix layout problems of writer and math
+ // see i53651
+ if ( nPluginMode == 3 )
+ pViewFrame->Resize( TRUE );
+ }
+ }
+ else
+ {
+ DBG_ASSERT( !rFrame.IsInPlace() && !bHasPluginMode, "Special modes not compatible with hidden mode!" );
+ rFrame.GetWindow().Show();
+ }
+
+ // Jetzt UpdateTitle, hidden TopFrames haben sonst keinen Namen!
+ pViewFrame->UpdateTitle();
+
+ if ( !rFrame.IsInPlace() )
+ pViewFrame->Resize( TRUE );
+
+ // if there's a JumpMark given, then, well, jump to it
+ ::comphelper::NamedValueCollection aViewArgs( getCreationArguments() );
+ const ::rtl::OUString sJumpMark = aViewArgs.getOrDefault( "JumpMark", ::rtl::OUString() );
+ const bool bHasJumpMark = ( sJumpMark.getLength() > 0 );
+ OSL_ENSURE( ( !m_pData->m_pViewShell->GetObjectShell()->IsLoading() )
+ || ( !sJumpMark.getLength() ),
+ "SfxBaseController::ConnectSfxFrame_Impl: so this code wasn't dead?" );
+ // Before CWS autorecovery, there was code which postponed jumping to the Mark to a later time
+ // (SfxObjectShell::PositionView_Impl), but it seems this branch was never used, since this method
+ // here is never called before the load process finished. At least not with a non-empty jump mark
+ if ( sJumpMark.getLength() )
+ m_pData->m_pViewShell->JumpToMark( sJumpMark );
+
+ // if no plugin mode and no jump mark was supplied, check whether the document itself can provide view data, and
+ // if so, forward it to the view/shell.
+ if ( !bHasPluginMode && !bHasJumpMark )
+ {
+ try
+ {
+ Reference< XViewDataSupplier > xViewDataSupplier( getModel(), UNO_QUERY );
+ Reference< XIndexAccess > xViewData;
+ if ( xViewDataSupplier.is() )
+ xViewData = xViewDataSupplier->getViewData();
+ if ( xViewData.is() && xViewData->getCount() > 0 )
+ {
+ Sequence< PropertyValue > aViewData;
+ if ( ( xViewData->getByIndex( 0 ) >>= aViewData ) && ( aViewData.getLength() ) )
+ {
+ m_pData->m_pViewShell->ReadUserDataSequence( aViewData, TRUE );
+ }
+ }
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ }
+ }
+ }
+
+ // invalidate slot corresponding to the view shell
+ const sal_uInt16 nViewNo = m_pData->m_pViewShell->GetObjectShell()->GetFactory().GetViewNo_Impl( pViewFrame->GetCurViewId(), USHRT_MAX );
+ DBG_ASSERT( nViewNo != USHRT_MAX, "view shell id not found" );
+ if ( nViewNo != USHRT_MAX )
+ pViewFrame->GetBindings().Invalidate( nViewNo + SID_VIEWSHELL0 );
+}
+
//=============================================================================
css::uno::Reference< css::frame::XTitle > SfxBaseController::impl_getTitleHelper ()
{
diff --git a/sfx2/source/view/topfrm.cxx b/sfx2/source/view/topfrm.cxx
deleted file mode 100644
index 6f5c2ffcc3eb..000000000000
--- a/sfx2/source/view/topfrm.cxx
+++ /dev/null
@@ -1,1646 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: topfrm.cxx,v $
- * $Revision: 1.97 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sfx2.hxx"
-#ifndef GCC
-#endif
-
-#include <sfx2/topfrm.hxx>
-#include <sfx2/signaturestate.hxx>
-#include <com/sun/star/frame/XModuleManager.hpp>
-#include <com/sun/star/util/XURLTransformer.hpp>
-#include <com/sun/star/uno/Reference.h>
-#include <com/sun/star/frame/XFrame.hpp>
-#ifndef _UNOTOOLS_PROCESSFACTORY_HXX
-#include <comphelper/processfactory.hxx>
-#endif
-#include <com/sun/star/frame/XFramesSupplier.hpp>
-#include <com/sun/star/util/XCloseable.hpp>
-#include <com/sun/star/util/CloseVetoException.hpp>
-#ifndef _TOOLKIT_UNOHLP_HXX
-#include <toolkit/helper/vclunohelper.hxx>
-#endif
-#ifndef _UNO_COM_SUN_STAR_AWT_POSSIZE_HPP_
-#include <com/sun/star/awt/PosSize.hpp>
-#endif
-#include <com/sun/star/container/XIndexAccess.hpp>
-#ifndef _COM_SUN_STAR_CONTAINER_XPROPERTYSET_HPP_
-#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-#include <com/sun/star/frame/XLayoutManager.hpp>
-#include <com/sun/star/beans/NamedValue.hpp>
-#include <com/sun/star/beans/XMaterialHolder.hpp>
-#include <com/sun/star/awt/XWindow2.hpp>
-#include <vcl/menu.hxx>
-#include <svl/rectitem.hxx>
-#include <svl/intitem.hxx>
-#include <svl/eitem.hxx>
-#include <svl/stritem.hxx>
-#include <svtools/asynclink.hxx>
-#include <svtools/sfxecode.hxx>
-#include <vcl/dialog.hxx>
-#include <svl/urihelper.hxx>
-#include <unotools/moduleoptions.hxx>
-#include <unotools/configmgr.hxx>
-#include <unotools/bootstrap.hxx>
-
-#include <sfxresid.hxx>
-
-// wg. pTopFrames
-#include "appdata.hxx"
-#include <sfx2/app.hxx>
-#include <sfx2/sfx.hrc>
-#include <sfx2/objsh.hxx>
-#include <sfx2/docfile.hxx>
-#include <sfx2/viewsh.hxx>
-#include <sfx2/bindings.hxx>
-#include <sfx2/dispatch.hxx>
-#include <sfx2/request.hxx>
-#include <sfx2/objitem.hxx>
-#include <sfx2/objface.hxx>
-#include <sfx2/msg.hxx>
-#include "objshimp.hxx"
-#include "workwin.hxx"
-#include "sfxtypes.hxx"
-#include "splitwin.hxx"
-#include "arrdecl.hxx"
-#include "sfxhelp.hxx"
-#include <sfx2/fcontnr.hxx>
-#include <sfx2/docfac.hxx>
-#include "statcach.hxx"
-#include <sfx2/event.hxx>
-
-using namespace ::com::sun::star;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::frame;
-using namespace ::com::sun::star::util;
-using namespace ::com::sun::star::container;
-using namespace ::com::sun::star::beans;
-
-//------------------------------------------------------------------------
-
-#define SfxTopViewFrame
-#include "sfxslots.hxx"
-
-DBG_NAME(SfxTopViewFrame)
-
-#include <comphelper/sequenceashashmap.hxx>
-static ::rtl::OUString GetModuleName_Impl( const ::rtl::OUString& sDocService )
-{
- uno::Reference< container::XNameAccess > xMM( ::comphelper::getProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.frame.ModuleManager")), uno::UNO_QUERY );
- ::rtl::OUString sVar;
- if ( !xMM.is() )
- return sVar;
-
- try
- {
- ::comphelper::SequenceAsHashMap aAnalyzer( xMM->getByName(sDocService) );
- sVar = aAnalyzer.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii("ooSetupFactoryUIName"), ::rtl::OUString() );
- }
- catch( uno::Exception& )
- {
- sVar = ::rtl::OUString();
- }
-
- return sVar;
-}
-
-class SfxTopFrame_Impl
-{
-public:
- Window* pWindow; // maybe external
- BOOL bHidden;
- BOOL bLockResize;
- BOOL bMenuBarOn;
-};
-
-class SfxTopWindow_Impl : public Window
-{
-public:
- SfxTopFrame* pFrame;
-
- SfxTopWindow_Impl( SfxTopFrame* pF );
-// : Window( pF->pImp->pWindow, WB_CLIPCHILDREN | WB_NODIALOGCONTROL | WB_3DLOOK )
-// , pFrame( pF )
-// { SetBackground(); }
- ~SfxTopWindow_Impl( );
-
- virtual void DataChanged( const DataChangedEvent& rDCEvt );
- virtual void StateChanged( StateChangedType nStateChange );
- virtual long PreNotify( NotifyEvent& rNEvt );
- virtual long Notify( NotifyEvent& rEvt );
- virtual void Resize();
- virtual void GetFocus();
- void DoResize();
- DECL_LINK( CloserHdl, void* );
-};
-
-SfxTopWindow_Impl::SfxTopWindow_Impl( SfxTopFrame* pF )
- : Window( pF->pImp->pWindow, WB_BORDER | WB_CLIPCHILDREN | WB_NODIALOGCONTROL | WB_3DLOOK )
- , pFrame( pF )
-{
-}
-
-SfxTopWindow_Impl::~SfxTopWindow_Impl( )
-{
-}
-
-void SfxTopWindow_Impl::DataChanged( const DataChangedEvent& rDCEvt )
-{
- Window::DataChanged( rDCEvt );
- SfxWorkWindow *pWorkWin = pFrame->GetWorkWindow_Impl();
- if ( pWorkWin )
- pWorkWin->DataChanged_Impl( rDCEvt );
-}
-
-long SfxTopWindow_Impl::Notify( NotifyEvent& rNEvt )
-{
- if ( pFrame->IsClosing_Impl() || !pFrame->GetFrameInterface().is() )
- return sal_False;
-
- SfxViewFrame* pView = pFrame->GetCurrentViewFrame();
- if ( !pView || !pView->GetObjectShell() )
- return Window::Notify( rNEvt );
-
- if ( rNEvt.GetType() == EVENT_GETFOCUS )
- {
- if ( pView->GetViewShell() && !pView->GetViewShell()->GetUIActiveIPClient_Impl() && !pFrame->IsInPlace() )
- {
- DBG_TRACE("SfxTopFrame: GotFocus");
- pView->MakeActive_Impl( FALSE );
- }
-
- // TODO/LATER: do we still need this code?
- Window* pWindow = rNEvt.GetWindow();
- ULONG nHelpId = 0;
- while ( !nHelpId && pWindow )
- {
- nHelpId = pWindow->GetHelpId();
- pWindow = pWindow->GetParent();
- }
-
- if ( nHelpId )
- SfxHelp::OpenHelpAgent( pFrame, nHelpId );
-
- // if focus was on an external window, the clipboard content might have been changed
- pView->GetBindings().Invalidate( SID_PASTE );
- pView->GetBindings().Invalidate( SID_PASTE_SPECIAL );
- return sal_True;
- }
- else if( rNEvt.GetType() == EVENT_KEYINPUT )
- {
- if ( pView->GetViewShell()->KeyInput( *rNEvt.GetKeyEvent() ) )
- return TRUE;
- }
- else if ( rNEvt.GetType() == EVENT_EXECUTEDIALOG /*|| rNEvt.GetType() == EVENT_INPUTDISABLE*/ )
- {
- pView->SetModalMode( sal_True );
- return sal_True;
- }
- else if ( rNEvt.GetType() == EVENT_ENDEXECUTEDIALOG /*|| rNEvt.GetType() == EVENT_INPUTENABLE*/ )
- {
- //EnableInput( sal_True, sal_True );
- pView->SetModalMode( sal_False );
- return sal_True;
- }
-
- return Window::Notify( rNEvt );
-}
-
-long SfxTopWindow_Impl::PreNotify( NotifyEvent& rNEvt )
-{
- USHORT nType = rNEvt.GetType();
- if ( nType == EVENT_KEYINPUT || nType == EVENT_KEYUP )
- {
- SfxViewFrame* pView = pFrame->GetCurrentViewFrame();
- SfxViewShell* pShell = pView ? pView->GetViewShell() : NULL;
- if ( pShell && pShell->HasKeyListeners_Impl() && pShell->HandleNotifyEvent_Impl( rNEvt ) )
- return sal_True;
- }
- else if ( nType == EVENT_MOUSEBUTTONUP || nType == EVENT_MOUSEBUTTONDOWN )
- {
- Window* pWindow = rNEvt.GetWindow();
- SfxViewFrame* pView = pFrame->GetCurrentViewFrame();
- SfxViewShell* pShell = pView ? pView->GetViewShell() : NULL;
- if ( pShell )
- if ( pWindow == pShell->GetWindow() || pShell->GetWindow()->IsChild( pWindow ) )
- if ( pShell->HasMouseClickListeners_Impl() && pShell->HandleNotifyEvent_Impl( rNEvt ) )
- return sal_True;
- }
-
- if ( nType == EVENT_MOUSEBUTTONDOWN )
- {
- Window* pWindow = rNEvt.GetWindow();
- const MouseEvent* pMEvent = rNEvt.GetMouseEvent();
- Point aPos = pWindow->OutputToScreenPixel( pMEvent->GetPosPixel() );
- SfxWorkWindow *pWorkWin = pFrame->GetWorkWindow_Impl();
- if ( pWorkWin )
- pWorkWin->EndAutoShow_Impl( aPos );
- }
-
- return Window::PreNotify( rNEvt );
-}
-
-void SfxTopWindow_Impl::GetFocus()
-{
- if ( pFrame && !pFrame->IsClosing_Impl() && pFrame->GetCurrentViewFrame() && pFrame->GetFrameInterface().is() )
- pFrame->GetCurrentViewFrame()->MakeActive_Impl( TRUE );
-}
-
-void SfxTopWindow_Impl::Resize()
-{
- if ( IsReallyVisible() || IsReallyShown() || GetOutputSizePixel().Width() )
- DoResize();
-}
-
-void SfxTopWindow_Impl::StateChanged( StateChangedType nStateChange )
-{
- if ( nStateChange == STATE_CHANGE_INITSHOW )
- {
- pFrame->pImp->bHidden = FALSE;
- if ( pFrame->IsInPlace() )
- // TODO/MBA: workaround for bug in LayoutManager: the final resize does not get through because the
- // LayoutManager works asynchronously and between resize and time execution the DockingAcceptor was exchanged so that
- // the resize event never is sent to the component
- SetSizePixel( GetParent()->GetOutputSizePixel() );
-
- DoResize();
- SfxViewFrame* pView = pFrame->GetCurrentViewFrame();
- if ( pView )
- pView->GetBindings().GetWorkWindow_Impl()->ShowChilds_Impl();
- }
-
- Window::StateChanged( nStateChange );
-}
-
-void SfxTopWindow_Impl::DoResize()
-{
- if ( !pFrame->pImp->bLockResize )
- pFrame->Resize();
-}
-
-class StopButtonTimer_Impl : public Timer
-{
- BOOL bState;
- SfxViewFrame* pFrame;
-protected:
- virtual void Timeout();
-public:
- StopButtonTimer_Impl( SfxViewFrame*);
- void SetButtonState( BOOL bStateP );
- BOOL GetButtonState() const { return bState; }
-};
-
-StopButtonTimer_Impl::StopButtonTimer_Impl( SfxViewFrame*p)
- : bState( FALSE )
- , pFrame( p )
-{
- SetTimeout( 200 );
-}
-
-void StopButtonTimer_Impl::SetButtonState( BOOL bStateP )
-{
- if( bStateP )
- {
- bState = TRUE;
- Stop();
- }
- else if( bState )
- Start();
-}
-
-void StopButtonTimer_Impl::Timeout()
-{
- bState = FALSE;
- pFrame->GetBindings().Invalidate( SID_BROWSE_STOP );
-}
-
-class SfxTopViewWin_Impl : public Window
-{
-friend class SfxInternalFrame;
-
- BOOL bActive;
- SfxTopViewFrame* pFrame;
-
-public:
- SfxTopViewWin_Impl( SfxTopViewFrame* p,
- Window *pParent, WinBits nBits=0 ) :
- Window( pParent, nBits | WB_BORDER | WB_CLIPCHILDREN ),
- bActive( FALSE ),
- pFrame( p )
- {
- p->GetFrame()->GetWindow().SetBorderStyle( WINDOW_BORDER_NOBORDER );
- }
-
- virtual void Resize();
- virtual void StateChanged( StateChangedType nStateChange );
-};
-
-//--------------------------------------------------------------------
-void SfxTopViewWin_Impl::StateChanged( StateChangedType nStateChange )
-{
- if ( nStateChange == STATE_CHANGE_INITSHOW )
- {
- SfxObjectShell* pDoc = pFrame->GetObjectShell();
- if ( pDoc && !pFrame->IsVisible() )
- pFrame->Show();
-
- pFrame->Resize();
- }
- else
- Window::StateChanged( nStateChange );
-}
-
-void SfxTopViewWin_Impl::Resize()
-{
- if ( IsReallyVisible() || IsReallyShown() || GetOutputSizePixel().Width() )
- pFrame->Resize();
-}
-
-class SfxTopViewFrame_Impl
-{
-public:
- sal_Bool bActive;
- Window* pWindow;
- String aFactoryName;
- StopButtonTimer_Impl* pStopButtonTimer;
-
- SfxTopViewFrame_Impl()
- : bActive( sal_False )
- , pWindow( 0 )
- , pStopButtonTimer( 0 )
- {}
-};
-
-static svtools::AsynchronLink* pPendingCloser = 0;
-
-static String _getTabString()
-{
- String result;
-
- Reference < XMaterialHolder > xHolder(
- ::comphelper::getProcessServiceFactory()->createInstance(
- DEFINE_CONST_UNICODE("com.sun.star.tab.tabreg") ), UNO_QUERY );
- if (xHolder.is())
- {
- rtl::OUString aTabString;
- Sequence< NamedValue > sMaterial;
- if (xHolder->getMaterial() >>= sMaterial) {
- for (int i=0; i < sMaterial.getLength(); i++) {
- if ((sMaterial[i].Name.equalsAscii("title")) &&
- (sMaterial[i].Value >>= aTabString))
- {
- result += ' ';
- result += String(aTabString);
- }
- }
- }
- }
- return result;
-}
-
-SfxTopFrame* SfxTopFrame::Create( SfxObjectShell* pDoc, USHORT nViewId, BOOL bHidden, const SfxItemSet* pSet )
-{
- Reference < XFrame > xDesktop ( ::comphelper::getProcessServiceFactory()->createInstance( DEFINE_CONST_UNICODE("com.sun.star.frame.Desktop") ), UNO_QUERY );
- SfxTopFrame *pFrame = NULL;
- BOOL bNewView = FALSE;
- if ( pSet )
- {
- SFX_ITEMSET_ARG( pSet, pItem, SfxBoolItem, SID_OPEN_NEW_VIEW, sal_False );
- bNewView = pItem && pItem->GetValue();
- }
-
- if ( pDoc && !bHidden && !bNewView )
- {
- URL aTargetURL;
- aTargetURL.Complete = pDoc->GetMedium()->GetURLObject().GetMainURL( INetURLObject::NO_DECODE );
-
- BOOL bIsBasic = FALSE;
- if ( !aTargetURL.Complete.getLength() )
- {
- String sFactory = String::CreateFromAscii(pDoc->GetFactory().GetShortName());
- bIsBasic = (sFactory.CompareIgnoreCaseToAscii("sbasic")==COMPARE_EQUAL);
-
- if (!bIsBasic)
- {
- String aURL = String::CreateFromAscii("private:factory/");
- aURL += sFactory;
- aTargetURL.Complete = aURL;
- }
- }
-
- if (bIsBasic)
- {
- Reference < XFramesSupplier > xSupplier( xDesktop, UNO_QUERY );
- if (xSupplier.is())
- {
- Reference < XIndexAccess > xContainer(xSupplier->getFrames(), UNO_QUERY);
- if (xContainer.is())
- {
- Reference< ::com::sun::star::frame::XModuleManager > xCheck(::comphelper::getProcessServiceFactory()->createInstance( rtl::OUString::createFromAscii("com.sun.star.frame.ModuleManager" )), UNO_QUERY);
- sal_Int32 nCount = xContainer->getCount();
- for (sal_Int32 i=0; i<nCount; ++i)
- {
- try
- {
- Reference < XFrame > xFrame;
- if (!(xContainer->getByIndex(i) >>= xFrame) || !xFrame.is())
- continue;
- ::rtl::OUString sModule = xCheck->identify(xFrame);
- if (sModule.equalsAscii("com.sun.star.frame.StartModule"))
- {
- pFrame = Create(xFrame);
- break;
- }
- }
- catch(const Exception&) {}
- }
- }
- }
- }
- else
- {
- Reference < XURLTransformer > xTrans( ::comphelper::getProcessServiceFactory()->createInstance( rtl::OUString::createFromAscii("com.sun.star.util.URLTransformer" )), UNO_QUERY );
- xTrans->parseStrict( aTargetURL );
-
- Reference < ::com::sun::star::frame::XDispatchProvider > xProv( xDesktop, UNO_QUERY );
- Reference < ::com::sun::star::frame::XDispatch > xDisp;
- if ( xProv.is() )
- {
- Sequence < ::com::sun::star::beans::PropertyValue > aSeq(1);
- aSeq[0].Name = ::rtl::OUString::createFromAscii("Model");
- aSeq[0].Value <<= pDoc->GetModel();
- ::rtl::OUString aTargetFrame( ::rtl::OUString::createFromAscii("_default") );
- xDisp = xProv->queryDispatch( aTargetURL, aTargetFrame , 0 );
- if ( xDisp.is() )
- xDisp->dispatch( aTargetURL, aSeq );
- }
-
- SfxFrameArr_Impl& rArr = *SFX_APP()->Get_Impl()->pTopFrames;
- for( USHORT nPos = rArr.Count(); nPos--; )
- {
- SfxTopFrame *pF = (SfxTopFrame*) rArr[ nPos ];
- if ( pF->GetCurrentDocument() == pDoc )
- {
- pFrame = pF;
- break;
- }
- }
- }
- }
-
- if ( !pFrame )
- {
- Reference < XFrame > xFrame = xDesktop->findFrame( DEFINE_CONST_UNICODE("_blank"), 0 );
- pFrame = Create( xFrame );
- }
-
- pFrame->pImp->bHidden = bHidden;
- Window* pWindow = pFrame->GetTopWindow_Impl();
- if ( pWindow && pDoc )
- {
- ::rtl::OUString aDocServiceName( pDoc->GetFactory().GetDocumentServiceName() );
- ::rtl::OUString aProductName;
- ::utl::ConfigManager::GetDirectConfigProperty(::utl::ConfigManager::PRODUCTNAME) >>= aProductName;
- String aTitle = pDoc->GetTitle( SFX_TITLE_DETECT );
- aTitle += String::CreateFromAscii( " - " );
- aTitle += String(aProductName);
- aTitle += ' ';
- aTitle += String( GetModuleName_Impl( aDocServiceName ) );
-#ifdef DBG_UTIL
- ::rtl::OUString aDefault;
- aTitle += DEFINE_CONST_UNICODE(" [");
- String aVerId( utl::Bootstrap::getBuildIdData( aDefault ));
- aTitle += aVerId;
- aTitle += ']';
-#endif
-
- // append TAB string if available
- aTitle += _getTabString();
-
- /* AS_TITLE
- pWindow->SetText( aTitle );
- */
-
- /* AS_ICON
- if( pWindow->GetType() == WINDOW_WORKWINDOW )
- {
- SvtModuleOptions::EFactory eFactory;
- if( SvtModuleOptions::ClassifyFactoryByName( aDocServiceName, eFactory ) )
- {
- WorkWindow* pWorkWindow = (WorkWindow*)pWindow;
- pWorkWindow->SetIcon( (sal_uInt16) SvtModuleOptions().GetFactoryIcon( eFactory ) );
- }
- }
- */
- }
-
- pFrame->SetItemSet_Impl( pSet );
- if ( pDoc && pDoc != pFrame->GetCurrentDocument() )
- {
- if ( nViewId )
- pDoc->GetMedium()->GetItemSet()->Put( SfxUInt16Item( SID_VIEW_ID, nViewId ) );
- pFrame->InsertDocument( pDoc );
- if ( pWindow && !bHidden )
- pWindow->Show();
- }
-
- return pFrame;
-}
-
-SfxTopFrame* SfxTopFrame::Create( SfxObjectShell* pDoc, Window* pWindow, USHORT nViewId, BOOL bHidden, const SfxItemSet* pSet )
-{
- Reference < ::com::sun::star::lang::XMultiServiceFactory > xFact( ::comphelper::getProcessServiceFactory() );
- Reference < XFramesSupplier > xDesktop ( xFact->createInstance( DEFINE_CONST_UNICODE("com.sun.star.frame.Desktop") ), UNO_QUERY );
- Reference < XFrame > xFrame( xFact->createInstance( DEFINE_CONST_UNICODE("com.sun.star.frame.Frame") ), UNO_QUERY );
-
- xFrame->initialize( VCLUnoHelper::GetInterface ( pWindow ) );
- if ( xDesktop.is() )
- xDesktop->getFrames()->append( xFrame );
-
- uno::Reference< awt::XWindow2 > xWin( VCLUnoHelper::GetInterface ( pWindow ), uno::UNO_QUERY );
- if ( xWin.is() && xWin->isActive() )
- xFrame->activate();
-
- SfxTopFrame* pFrame = new SfxTopFrame( pWindow );
- pFrame->SetFrameInterface_Impl( xFrame );
- pFrame->pImp->bHidden = bHidden;
-
- pFrame->SetItemSet_Impl( pSet );
- if ( pDoc )
- {
- if ( nViewId )
- pDoc->GetMedium()->GetItemSet()->Put( SfxUInt16Item( SID_VIEW_ID, nViewId ) );
- pFrame->InsertDocument( pDoc );
- }
-
- return pFrame;
-}
-
-SfxTopFrame* SfxTopFrame::Create( Reference < XFrame > xFrame )
-{
- // create a new TopFrame to an external XFrame object ( wrap controller )
- DBG_ASSERT( xFrame.is(), "Wrong parameter!" );
-
- Window* pWindow = VCLUnoHelper::GetWindow( xFrame->getContainerWindow() );
- SfxTopFrame* pFrame = new SfxTopFrame( pWindow );
- pFrame->SetFrameInterface_Impl( xFrame );
- return pFrame;
-}
-
-SfxTopFrame::SfxTopFrame( Window* pExternal, sal_Bool bHidden )
- : SfxFrame( NULL )
- , pWindow( NULL )
-{
- pImp = new SfxTopFrame_Impl;
- pImp->bHidden = bHidden;
- pImp->bLockResize = FALSE;
- pImp->bMenuBarOn = TRUE;
- InsertTopFrame_Impl( this );
- if ( pExternal )
- {
- pImp->pWindow = pExternal;
- }
- else
- {
- DBG_ERROR( "TopFrame without window created!" );
-/*
- pImp->pWindow = new SfxTopFrameWindow_Impl( this );
- pImp->pWindow->SetActivateMode( ACTIVATE_MODE_GRABFOCUS );
- pImp->pWindow->SetPosSizePixel( Point( 20,20 ), Size( 800,600 ) );
- if ( GetFrameInterface().is() )
- GetFrameInterface()->initialize( VCLUnoHelper::GetInterface( pImp->pWindow ) );
- pImp->pWindow->Show();
- */
- }
-
- pWindow = new SfxTopWindow_Impl( this );
-/** AS:
- Hide this window till the component was realy loaded. Otherwhise it overpaint e.g. the old component hardly
- and produce repaint errors.
- pWindow->Show();
- */
-}
-
-SfxTopFrame::~SfxTopFrame()
-{
- RemoveTopFrame_Impl( this );
- DELETEZ( pWindow );
- delete pImp;
-}
-
-void SfxTopFrame::SetPresentationMode( BOOL bSet )
-{
- if ( GetCurrentViewFrame() )
- GetCurrentViewFrame()->GetWindow().SetBorderStyle( bSet ? WINDOW_BORDER_NOBORDER : WINDOW_BORDER_NORMAL );
-
- Reference< com::sun::star::beans::XPropertySet > xPropSet( GetFrameInterface(), UNO_QUERY );
- Reference< ::com::sun::star::frame::XLayoutManager > xLayoutManager;
-
- if ( xPropSet.is() )
- {
- Any aValue = xPropSet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LayoutManager" )));
- aValue >>= xLayoutManager;
- }
-
- if ( xLayoutManager.is() )
- xLayoutManager->setVisible( !bSet ); // we don't want to have ui in presentation mode
-
- SetMenuBarOn_Impl( !bSet );
- if ( GetWorkWindow_Impl() )
- GetWorkWindow_Impl()->SetDockingAllowed( !bSet );
- if ( GetCurrentViewFrame() )
- GetCurrentViewFrame()->GetDispatcher()->Update_Impl( TRUE );
-}
-
-SystemWindow*
-SfxTopFrame::GetSystemWindow() const
-{
- return GetTopWindow_Impl();
-}
-
-SystemWindow* SfxTopFrame::GetTopWindow_Impl() const
-{
- if ( pImp->pWindow->IsSystemWindow() )
- return (SystemWindow*) pImp->pWindow;
- else
- return NULL;
-}
-
-Window& SfxTopFrame::GetWindow() const
-{
- return *pWindow;
-}
-
-sal_Bool SfxTopFrame::Close()
-{
- delete this;
- return sal_True;
-}
-
-void SfxTopFrame::LockResize_Impl( BOOL bLock )
-{
- pImp->bLockResize = bLock;
-}
-
-IMPL_LINK( SfxTopWindow_Impl, CloserHdl, void*, EMPTYARG )
-{
- if ( pFrame && !pFrame->PrepareClose_Impl( TRUE ) )
- return 0L;
-
- if ( pFrame )
- pFrame->GetCurrentViewFrame()->GetBindings().Execute( SID_CLOSEWIN, 0, 0, SFX_CALLMODE_ASYNCHRON );
- return 0L;
-}
-
-void SfxTopFrame::SetMenuBarOn_Impl( BOOL bOn )
-{
- pImp->bMenuBarOn = bOn;
-
- Reference< com::sun::star::beans::XPropertySet > xPropSet( GetFrameInterface(), UNO_QUERY );
- Reference< ::com::sun::star::frame::XLayoutManager > xLayoutManager;
-
- if ( xPropSet.is() )
- {
- Any aValue = xPropSet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LayoutManager" )));
- aValue >>= xLayoutManager;
- }
-
- if ( xLayoutManager.is() )
- {
- rtl::OUString aMenuBarURL( RTL_CONSTASCII_USTRINGPARAM( "private:resource/menubar/menubar" ));
-
- if ( bOn )
- xLayoutManager->showElement( aMenuBarURL );
- else
- xLayoutManager->hideElement( aMenuBarURL );
- }
-}
-
-BOOL SfxTopFrame::IsMenuBarOn_Impl() const
-{
- return pImp->bMenuBarOn;
-}
-
-String SfxTopFrame::GetWindowData()
-{
- String aActWinData;
- char cToken = ',';
-
- SfxViewFrame *pActFrame = SfxViewFrame::Current();
- SfxViewFrame *pFrame = GetCurrentViewFrame();
- const sal_Bool bActWin = ( pActFrame->GetTopViewFrame() == pFrame );
-
- // ::com::sun::star::sdbcx::User-Daten der ViewShell
- String aUserData;
- pFrame->GetViewShell()->WriteUserData(aUserData);
-
- // assemble ini-data
- String aWinData;
- aWinData += String::CreateFromInt32( pFrame->GetCurViewId() );
- aWinData += cToken;
-
- aWinData += '1'; // former attribute "isfloating"
- aWinData += cToken;
-
- // aktives kennzeichnen
- aWinData += cToken;
- aWinData += bActWin ? '1' : '0';
-
- aWinData += cToken;
- aWinData += aUserData;
-
- return aWinData;
-}
-
-sal_Bool SfxTopFrame::InsertDocument( SfxObjectShell* pDoc )
-/* [Beschreibung]
- */
-{
- // Spezielle Bedingungen testen: nicht im ModalMode!
- if ( !SfxFrame::InsertDocument( pDoc ) )
- return sal_False;
-
- SfxObjectShell *pOld = GetCurrentDocument();
-
- // Position und Groesse testen
- // Wenn diese schon gesetzt sind, soll offensichtlich nicht noch
- // LoadWindows_Impl aufgerufen werden ( z.B. weil dieses ein CreateFrame()
- // an einer Task aufgerufen hat! )
- const SfxItemSet* pSet = GetItemSet_Impl();
- if ( !pSet )
- pSet = pDoc->GetMedium()->GetItemSet();
- SetItemSet_Impl(0);
-
- // Position und Gr"o\se
- SFX_ITEMSET_ARG(
- pSet, pAreaItem, SfxRectangleItem, SID_VIEW_POS_SIZE, sal_False );
- // View-Id
- SFX_ITEMSET_ARG(
- pSet, pViewIdItem, SfxUInt16Item, SID_VIEW_ID, sal_False );
- // Zoom
- SFX_ITEMSET_ARG(
- pSet, pModeItem, SfxUInt16Item, SID_VIEW_ZOOM_MODE, sal_False );
- // Hidden
- SFX_ITEMSET_ARG(
- pSet, pHidItem, SfxBoolItem, SID_HIDDEN, sal_False);
- // ViewDaten
- SFX_ITEMSET_ARG(
- pSet, pViewDataItem, SfxStringItem, SID_USER_DATA, sal_False );
- // ViewOnly
- SFX_ITEMSET_ARG(
- pSet, pEditItem, SfxBoolItem, SID_VIEWONLY, sal_False);
- // InPlace (Hack)
- SFX_ITEMSET_ARG(
- pSet, pPluginItem, SfxUInt16Item, SID_PLUGIN_MODE, sal_False );
-
- // Plugin (external InPlace)
- SFX_ITEMSET_ARG(
- pSet, pPluginMode, SfxUInt16Item, SID_PLUGIN_MODE, sal_False);
- // Jump (GotoBookmark)
- SFX_ITEMSET_ARG(
- pSet, pJumpItem, SfxStringItem, SID_JUMPMARK, sal_False);
-
- if ( pEditItem && pEditItem->GetValue() )
- SetMenuBarOn_Impl( FALSE );
-
- if ( pHidItem )
- pImp->bHidden = pHidItem->GetValue();
-
- if( !pImp->bHidden )
- pDoc->OwnerLock( sal_True );
-
- // Wenn z.B. eine Fenstergr"o\se gesetzt wurde, soll keine Fensterinformation
- // aus den Dokument geladen werden, z.B. weil InsertDocument seinerseits
- // aus LoadWindows_Impl aufgerufen wurde!
- if ( !pJumpItem && !pPluginMode && pDoc && !pAreaItem && !pViewIdItem && !pModeItem &&
- pDoc->LoadWindows_Impl( this ) )
- {
- if ( GetCurrentDocument() != pDoc )
- // something went wrong during insertion
- return sal_False;
- pDoc->OwnerLock( sal_False );
- return sal_True;
- }
-
- if ( pDoc )
- {
- UpdateHistory( pDoc );
- UpdateDescriptor( pDoc );
- }
-
- SetFrameType_Impl( GetFrameType() & ~SFXFRAME_FRAMESET );
- sal_Bool bBrowsing = sal_True;
- SfxViewFrame *pFrame = GetCurrentViewFrame();
- if ( pFrame )
- {
- sal_Bool bChildActivated = sal_False;
- if ( pFrame->GetActiveChildFrame_Impl() && pFrame->GetActiveChildFrame_Impl() == SfxViewFrame::Current() )
- {
-// ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFramesSupplier > xFrames( GetFrameInterface(), ::com::sun::star::uno::UNO_QUERY );
-// if ( xFrames.is() )
-// xFrames->setActiveFrame( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > () );
- pFrame->SetActiveChildFrame_Impl(0);
- SfxViewFrame::SetViewFrame( pFrame );
- bChildActivated = sal_True;
- }
-
- if ( pFrame->GetObjectShell() )
- {
- pFrame->ReleaseObjectShell_Impl( sal_False );
- }
-
- if ( pViewIdItem )
- pFrame->SetViewData_Impl( pViewIdItem->GetValue(), String() );
- if ( pDoc )
- pFrame->SetObjectShell_Impl( *pDoc );
- }
- else
- {
- // 1: internal embedded object
- // 2: external embedded object
- // 3: OLE server
- if ( pPluginItem && pPluginItem->GetValue() != 2 )
- SetInPlace_Impl( TRUE );
-
- bBrowsing = sal_False;
- pFrame = new SfxTopViewFrame( this, pDoc, pViewIdItem ? pViewIdItem->GetValue() : 0 );
- if ( !pFrame->GetViewShell() )
- return sal_False;
-
- if ( pPluginItem && pPluginItem->GetValue() == 1 )
- {
- pFrame->ForceOuterResize_Impl( FALSE );
- pFrame->GetBindings().HidePopups(TRUE);
-
- // MBA: layoutmanager of inplace frame starts locked and invisible
- GetWorkWindow_Impl()->MakeVisible_Impl( FALSE );
- GetWorkWindow_Impl()->Lock_Impl( TRUE );
-
- GetWindow().SetBorderStyle( WINDOW_BORDER_NOBORDER );
- if ( GetCurrentViewFrame() )
- GetCurrentViewFrame()->GetWindow().SetBorderStyle( WINDOW_BORDER_NOBORDER );
- }
- }
-
- String aMark;
- SFX_ITEMSET_ARG( pSet, pMarkItem, SfxStringItem, SID_JUMPMARK, FALSE );
- if ( pMarkItem )
- aMark = pMarkItem->GetValue();
-
- if ( pDoc->Get_Impl()->nLoadedFlags & SFX_LOADED_MAINDOCUMENT )
- {
- if ( pViewDataItem )
- pFrame->GetViewShell()->ReadUserData( pViewDataItem->GetValue(), sal_True );
- else if( aMark.Len() )
- GetCurrentViewFrame()->GetViewShell()->JumpToMark( aMark );
- }
- else
- {
- // Daten setzen, die in FinishedLoading ausgewertet werden
- MarkData_Impl*& rpMark = pDoc->Get_Impl()->pMarkData;
- if (!rpMark)
- rpMark = new MarkData_Impl;
- rpMark->pFrame = GetCurrentViewFrame();
- if ( pViewDataItem )
- rpMark->aUserData = pViewDataItem->GetValue();
- else
- rpMark->aMark = aMark;
- }
-
- // Position und Groesse setzen
- //sal_uInt16 nWinMode = pModeItem ? pModeItem->GetValue() : 1;
- if ( pAreaItem && !pOld )
- {
- Window *pWin = pImp->pWindow;
-
- // Groesse setzen
- const Rectangle aWinRect( pAreaItem->GetValue() );
- const Size aAppWindow( pImp->pWindow->GetDesktopRectPixel().GetSize() );
- Point aPos( aWinRect.TopLeft() );
- Size aSz(aWinRect.GetSize());
- if ( aSz.Width() && aSz.Height() )
- {
- aPos.X() = Min(aPos.X(),
- long(aAppWindow.Width() - aSz.Width() + aSz.Width() / 2) );
- aPos.Y() = Min(aPos.Y(),
- long( aAppWindow.Height() - aSz.Height() + aSz.Height() / 2) );
- if ( aPos.X() + aSz.Width() <
- aAppWindow.Width() + aSz.Width() / 2 &&
- aPos.Y() + aSz.Height() <
- aAppWindow.Height() + aSz.Height() / 2 )
- {
- pWin->SetPosPixel( aPos );
- pWin->SetOutputSizePixel( aSz );
- }
- }
- }
-
- if ( !pImp->bHidden )
- {
- if ( pDoc->IsHelpDocument() || (pPluginItem && pPluginItem->GetValue() == 2) )
- pFrame->GetDispatcher()->HideUI( TRUE );
- else
- pFrame->GetDispatcher()->HideUI( FALSE );
-
- if ( IsInPlace() )
- pFrame->LockAdjustPosSizePixel();
-
- if ( pPluginMode && pPluginMode->GetValue() == 3)
- GetWorkWindow_Impl()->SetInternalDockingAllowed(FALSE);
-
- if ( !IsInPlace() )
- pFrame->GetDispatcher()->Update_Impl();
- pFrame->Show();
- GetWindow().Show();
- if ( !IsInPlace() || (pPluginItem && pPluginItem->GetValue() == 3) )
- pFrame->MakeActive_Impl( GetFrameInterface()->isActive() );
- pDoc->OwnerLock( sal_False );
-
- // Dont show container window! Its done by framework or directly
- // by SfxTopFrame::Create() or SfxViewFrame::ExecView_Impl() ...
-
- if ( IsInPlace() )
- {
- pFrame->UnlockAdjustPosSizePixel();
- // force resize for OLE server to fix layout problems of writer and math
- // see i53651
- if ( pPluginItem && pPluginItem->GetValue() == 3 )
- pFrame->Resize(TRUE);
- }
- }
- else
- {
- DBG_ASSERT( !IsInPlace() && !pPluginMode && !pPluginItem, "Special modes not compatible with hidden mode!" );
- GetWindow().Show();
- }
-
- // Jetzt UpdateTitle, hidden TopFrames haben sonst keinen Namen!
- pFrame->UpdateTitle();
-
- if ( !IsInPlace() )
- {
- if ( pFrame->GetViewShell()->UseObjectSize() )
- {
- GetCurrentViewFrame()->UnlockAdjustPosSizePixel();
- GetCurrentViewFrame()->Resize(TRUE);
- GetCurrentViewFrame()->ForceInnerResize_Impl( FALSE );
- GetCurrentViewFrame()->Resize(TRUE);
- }
- else
- GetCurrentViewFrame()->Resize(TRUE);
- }
-
- SFX_APP()->NotifyEvent( SfxEventHint(SFX_EVENT_VIEWCREATED, GlobalEventConfig::GetEventName( STR_EVENT_VIEWCREATED ), pDoc ) );
- return sal_True;
-}
-
-
-//========================================================================
-
-long SfxViewFrameClose_Impl( void* /*pObj*/, void* pArg )
-{
- ((SfxViewFrame*)pArg)->GetFrame()->DoClose();
- return 0;
-}
-
-TYPEINIT1(SfxTopFrame, SfxFrame);
-TYPEINIT1(SfxTopViewFrame, SfxViewFrame);
-
-//--------------------------------------------------------------------
-SFX_IMPL_INTERFACE(SfxTopViewFrame,SfxViewFrame,SfxResId(0))
-{
-}
-
-//--------------------------------------------------------------------
-String SfxTopViewFrame::UpdateTitle()
-
-/* [Beschreibung]
-
- Mit dieser Methode kann der SfxTopViewFrame gezwungen werden, sich sofort
- den neuen Titel vom der <SfxObjectShell> zu besorgen.
-
- [Anmerkung]
-
- Dies ist z.B. dann notwendig, wenn man der SfxObjectShell als SfxListener
- zuh"ort und dort auf den <SfxSimpleHint> SFX_HINT_TITLECHANGED reagieren
- m"ochte, um dann die Titel seiner Views abzufragen. Diese Views (SfxTopViewFrames)
- jedoch sind ebenfalls SfxListener und da die Reihenfolge der Benachrichtigung
- nicht feststeht, mu\s deren Titel-Update vorab erzwungen werden.
-
-
- [Beispiel]
-
- void SwDocShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
- {
- if ( rHint.IsA(TYPE(SfxSimpleHint)) )
- {
- switch( ( (SfxSimpleHint&) rHint ).GetId() )
- {
- case SFX_HINT_TITLECHANGED:
- for ( SfxTopViewFrame *pTop = (SfxTopViewFrame*)
- SfxViewFrame::GetFirst(this, TYPE(SfxTopViewFrame));
- pTop;
- pTop = (SfxTopViewFrame*)
- SfxViewFrame::GetNext(this, TYPE(SfxTopViewFrame));
- {
- pTop->UpdateTitle();
- ... pTop->GetName() ...
- }
- break;
- ...
- }
- }
- }
-*/
-
-{
- DBG_CHKTHIS(SfxTopViewFrame, 0);
-
- const SfxObjectFactory &rFact = GetObjectShell()->GetFactory();
- pImp->aFactoryName = String::CreateFromAscii( rFact.GetShortName() );
-
- String aTitle = SfxViewFrame::UpdateTitle();
-
- ::rtl::OUString aProductName;
- ::utl::ConfigManager::GetDirectConfigProperty(::utl::ConfigManager::PRODUCTNAME) >>= aProductName;
-
- aTitle += String::CreateFromAscii( " - " );
- aTitle += String(aProductName);
- aTitle += ' ';
- ::rtl::OUString aDocServiceName( GetObjectShell()->GetFactory().GetDocumentServiceName() );
- aTitle += String( GetModuleName_Impl( aDocServiceName ) );
-#ifdef DBG_UTIL
- ::rtl::OUString aDefault;
- aTitle += DEFINE_CONST_UNICODE(" [");
- String aVerId( utl::Bootstrap::getBuildIdData( aDefault ));
- aTitle += aVerId;
- aTitle += ']';
-#endif
-
- // append TAB string if available
- aTitle += _getTabString();
-
- GetBindings().Invalidate( SID_NEWDOCDIRECT );
-
- /* AS_TITLE
- Window* pWindow = GetTopFrame_Impl()->GetTopWindow_Impl();
- if ( pWindow && pWindow->GetText() != aTitle )
- pWindow->SetText( aTitle );
- */
- return aTitle;
-}
-
-//--------------------------------------------------------------------
-void SfxTopViewFrame::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
-{
- {DBG_CHKTHIS(SfxTopViewFrame, 0);}
-
- if( IsDowning_Impl())
- return;
-
- // we know only SimpleHints
- if ( rHint.IsA(TYPE(SfxSimpleHint)) )
- {
- switch( ( (SfxSimpleHint&) rHint ).GetId() )
- {
- case SFX_HINT_MODECHANGED:
- case SFX_HINT_TITLECHANGED:
- // when the document changes its title, change views too
- UpdateTitle();
- break;
-
- case SFX_HINT_DEINITIALIZING:
- // on all other changes force repaint
- GetFrame()->DoClose();
- return;
- }
- }
-
- SfxViewFrame::Notify( rBC, rHint );
-}
-
-//--------------------------------------------------------------------
-sal_Bool SfxTopViewFrame::Close()
-{
- {DBG_CHKTHIS(SfxTopViewFrame, 0);}
-
- // Modaler Dialog oben ??
-// if ( pImp->GetModalDialog() )
-// return sal_False;
-
- // eigentliches Schlie\sen
- if ( SfxViewFrame::Close() )
- {
- if (SfxViewFrame::Current() == this)
- SfxViewFrame::SetViewFrame(0);
-
- // Da der Dispatcher leer ger"aumt wird, kann man ihn auch nicht mehr
- // vern"unftig verwenden - also besser still legen
- GetDispatcher()->Lock(sal_True);
- delete this;
-
- return sal_True;
- }
-
- return sal_False;
-}
-
-SfxTopViewFrame::SfxTopViewFrame
-(
- SfxFrame* pFrame,
- SfxObjectShell* pObjShell,
- sal_uInt16 nViewId
-)
-
-/* [Beschreibung]
-
- Ctor des SfxTopViewFrame f"ur eine <SfxObjectShell> aus der Ressource.
- Die 'nViewId' der zu erzeugenden <SfxViewShell> kann angegeben werden
- (default ist die zuerst registrierte SfxViewShell-Subklasse).
-*/
-
- : SfxViewFrame( *(new SfxBindings), pFrame, pObjShell, SFXFRAME_HASTITLE )
-{
- DBG_CTOR(SfxTopViewFrame, 0);
-
- pCloser = 0;
- pImp = new SfxTopViewFrame_Impl;
- pImp->pStopButtonTimer = new StopButtonTimer_Impl(this);
-
-//(mba)/task if ( !pFrame->GetTask() )
- {
- pImp->pWindow = new SfxTopViewWin_Impl( this, &pFrame->GetWindow() );
- pImp->pWindow->SetSizePixel( pFrame->GetWindow().GetOutputSizePixel() );
- SetWindow_Impl( pImp->pWindow );
- pFrame->SetOwnsBindings_Impl( sal_True );
- pFrame->CreateWorkWindow_Impl();
- }
-
- sal_uInt32 nType = SFXFRAME_OWNSDOCUMENT | SFXFRAME_HASTITLE;
- if ( pObjShell && pObjShell->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
- nType |= SFXFRAME_EXTERNAL;
- GetFrame()->SetFrameType_Impl( GetFrame()->GetFrameType() | nType );
-
- if ( GetFrame()->IsInPlace() )
- {
- LockAdjustPosSizePixel();
- }
-
- try
- {
- if ( pObjShell )
- SwitchToViewShell_Impl( nViewId );
- }
- catch (com::sun::star::uno::Exception& )
- {
- // make sure that the ctor is left regularly
- ReleaseObjectShell_Impl();
- return;
- }
-
- if ( GetFrame()->IsInPlace() )
- {
- UnlockAdjustPosSizePixel();
- }
- else if ( GetViewShell() && GetViewShell()->UseObjectSize() )
- {
- // initiale Gr"o\se festlegen
- // Zuerst die logischen Koordinaten von IP-Objekt und EditWindow
- // ber"ucksichtigen
- LockAdjustPosSizePixel();
- ForceInnerResize_Impl( TRUE );
-
- Window *pWindow = GetViewShell()->GetWindow();
-
- // Da in den Applikationen bei der R"ucktransformation immer die
- // Eckpunkte tranformiert werden und nicht die Size (um die Ecken
- // alignen zu k"onnen), transformieren wir hier auch die Punkte, um
- // m"oglichst wenig Rundungsfehler zu erhalten.
-/*
- Rectangle aRect = pWindow->LogicToLogic( GetObjectShell()->GetVisArea(),
- GetObjectShell()->GetMapUnit(),
- pWindow->GetMapMode() );
-*/
- Rectangle aRect = pWindow->LogicToPixel( GetObjectShell()->GetVisArea() );
- Size aSize = aRect.GetSize();
- GetViewShell()->GetWindow()->SetSizePixel( aSize );
- DoAdjustPosSizePixel(GetViewShell(), Point(), aSize );
- }
-}
-
-//------------------------------------------------------------------------
-SfxTopViewFrame::~SfxTopViewFrame()
-{
- DBG_DTOR(SfxTopViewFrame, 0);
-
- SetDowning_Impl();
-
- if ( SfxViewFrame::Current() == this )
- SfxViewFrame::SetViewFrame(NULL);
-
- ReleaseObjectShell_Impl();
- if ( pPendingCloser == pCloser )
- pPendingCloser = 0;
- delete pCloser;
- if ( GetFrame()->OwnsBindings_Impl() )
- // Die Bindings l"oscht der Frame!
- KillDispatcher_Impl();
-
- delete pImp->pWindow;
- delete pImp->pStopButtonTimer;
- delete pImp;
-}
-
-//------------------------------------------------------------------------
-sal_Bool SfxTopViewFrame::SetBorderPixelImpl( const SfxViewShell *pVSh, const SvBorder &rBorder )
-{
- if( SfxViewFrame::SetBorderPixelImpl( GetViewShell(), rBorder ) )
- {
- if ( IsResizeInToOut_Impl() && !GetFrame()->IsInPlace() )
- {
- Size aSize = pVSh->GetWindow()->GetOutputSizePixel();
- if ( aSize.Width() && aSize.Height() )
- {
- aSize.Width() += rBorder.Left() + rBorder.Right();
- aSize.Height() += rBorder.Top() + rBorder.Bottom();
-
- Size aOldSize = GetWindow().GetOutputSizePixel();
- GetWindow().SetOutputSizePixel( aSize );
- Window* pParent = &GetWindow();
- while ( pParent->GetParent() )
- pParent = pParent->GetParent();
- Size aOuterSize = pParent->GetOutputSizePixel();
- aOuterSize.Width() += ( aSize.Width() - aOldSize.Width() );
- aOuterSize.Height() += ( aSize.Height() - aOldSize.Height() );
- pParent->SetOutputSizePixel( aOuterSize );
- }
- }
- else
- {
- Point aPoint;
- Rectangle aEditArea( aPoint, GetWindow().GetOutputSizePixel() );
- aEditArea.Left() += rBorder.Left();
- aEditArea.Right() -= rBorder.Right();
- aEditArea.Top() += rBorder.Top();
- aEditArea.Bottom() -= rBorder.Bottom();
- pVSh->GetWindow()->SetPosSizePixel( aEditArea.TopLeft(), aEditArea.GetSize() );
- }
- return sal_True;
-
- }
- return sal_False;
-}
-
-void SfxTopViewFrame::Exec_Impl(SfxRequest &rReq )
-{
- // Wenn gerade die Shells ausgetauscht werden...
- if ( !GetObjectShell() || !GetViewShell() )
- return;
-
- switch ( rReq.GetSlot() )
- {
- case SID_SHOWPOPUPS :
- {
- SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, SID_SHOWPOPUPS, FALSE);
- BOOL bShow = pShowItem ? pShowItem->GetValue() : TRUE;
- SFX_REQUEST_ARG(rReq, pIdItem, SfxUInt16Item, SID_CONFIGITEMID, FALSE);
- USHORT nId = pIdItem ? pIdItem->GetValue() : 0;
-
- // ausfuehren
- SfxWorkWindow *pWorkWin = GetFrame()->GetWorkWindow_Impl();
- if ( bShow )
- {
- // Zuerst die Floats auch anzeigbar machen
- pWorkWin->MakeChildsVisible_Impl( bShow );
- GetDispatcher()->Update_Impl( TRUE );
-
- // Dann anzeigen
- GetBindings().HidePopups( !bShow );
- }
- else
- {
- // Alles hiden
- SfxBindings *pBind = &GetBindings();
- while ( pBind )
- {
- pBind->HidePopupCtrls_Impl( !bShow );
- pBind = pBind->GetSubBindings_Impl();
- }
-
- pWorkWin->HidePopups_Impl( !bShow, TRUE, nId );
- pWorkWin->MakeChildsVisible_Impl( bShow );
- }
-
- Invalidate( rReq.GetSlot() );
- rReq.Done();
- break;
- }
-
- case SID_ACTIVATE:
- {
- MakeActive_Impl( TRUE );
- rReq.SetReturnValue( SfxObjectItem( 0, this ) );
- break;
- }
-
- case SID_WIN_POSSIZE:
- break;
-
- case SID_NEWDOCDIRECT :
- {
- SFX_REQUEST_ARG( rReq, pFactoryItem, SfxStringItem, SID_NEWDOCDIRECT, FALSE);
- String aFactName;
- if ( pFactoryItem )
- aFactName = pFactoryItem->GetValue();
- else if ( pImp->aFactoryName.Len() )
- aFactName = pImp->aFactoryName;
- else
- {
- DBG_ERROR("Missing argument!");
- break;
- }
-
- SfxRequest aReq( SID_OPENDOC, SFX_CALLMODE_SYNCHRON, GetPool() );
- String aFact = String::CreateFromAscii("private:factory/");
- aFact += aFactName;
- aReq.AppendItem( SfxStringItem( SID_FILE_NAME, aFact ) );
- aReq.AppendItem( SfxFrameItem( SID_DOCFRAME, GetFrame() ) );
- aReq.AppendItem( SfxStringItem( SID_TARGETNAME, String::CreateFromAscii( "_blank" ) ) );
- SFX_APP()->ExecuteSlot( aReq );
- const SfxViewFrameItem* pItem = PTR_CAST( SfxViewFrameItem, aReq.GetReturnValue() );
- if ( pItem )
- rReq.SetReturnValue( SfxFrameItem( 0, pItem->GetFrame() ) );
- break;
- }
-
- case SID_CLOSEWIN:
- {
- // disable CloseWin, if frame is not a task
- Reference < XCloseable > xTask( GetFrame()->GetFrameInterface(), UNO_QUERY );
- if ( !xTask.is() )
- break;
-
- if ( GetViewShell()->PrepareClose() )
- {
- // weitere Views auf dasselbe Doc?
- SfxObjectShell *pDocSh = GetObjectShell();
- int bOther = sal_False;
- for ( const SfxTopViewFrame *pFrame =
- (SfxTopViewFrame *)SfxViewFrame::GetFirst( pDocSh, TYPE(SfxTopViewFrame) );
- !bOther && pFrame;
- pFrame = (SfxTopViewFrame *)SfxViewFrame::GetNext( *pFrame, pDocSh, TYPE(SfxTopViewFrame) ) )
- bOther = (pFrame != this);
-
- // Doc braucht nur gefragt zu werden, wenn keine weitere View
- sal_Bool bClosed = sal_False;
- sal_Bool bUI = TRUE;
- if ( ( bOther || pDocSh->PrepareClose( bUI ) ) )
- {
- if ( !bOther )
- pDocSh->SetModified( FALSE );
- rReq.Done(); // unbedingt vor Close() rufen!
- bClosed = sal_False;
- try
- {
- xTask->close(sal_True);
- bClosed = sal_True;
- }
- catch( CloseVetoException& )
- {
- bClosed = sal_False;
- }
- }
-
- rReq.SetReturnValue( SfxBoolItem( rReq.GetSlot(), bClosed ));
- }
- return;
- }
- }
-
- rReq.Done();
-}
-
-void SfxTopViewFrame::GetState_Impl( SfxItemSet &rSet )
-{
- SfxObjectShell *pDocSh = GetObjectShell();
-
- if ( !pDocSh )
- return;
-
- const sal_uInt16 *pRanges = rSet.GetRanges();
- DBG_ASSERT(pRanges, "Set ohne Bereich");
- while ( *pRanges )
- {
- for ( sal_uInt16 nWhich = *pRanges++; nWhich <= *pRanges; ++nWhich )
- {
- switch(nWhich)
- {
- case SID_NEWDOCDIRECT :
- {
- if ( pImp->aFactoryName.Len() )
- {
- String aFact = String::CreateFromAscii("private:factory/");
- aFact += pImp->aFactoryName;
- rSet.Put( SfxStringItem( nWhich, aFact ) );
- }
- break;
- }
-
- case SID_NEWWINDOW:
- rSet.DisableItem(nWhich);
- break;
-
- case SID_CLOSEWIN:
- {
- // disable CloseWin, if frame is not a task
- Reference < XCloseable > xTask( GetFrame()->GetFrameInterface(), UNO_QUERY );
- if ( !xTask.is() )
- rSet.DisableItem(nWhich);
- break;
- }
-
- case SID_SHOWPOPUPS :
- break;
-
- case SID_WIN_POSSIZE:
- {
- rSet.Put( SfxRectangleItem( nWhich, Rectangle(
- GetWindow().GetPosPixel(), GetWindow().GetSizePixel() ) ) );
- break;
- }
-
- default:
- DBG_ERROR( "invalid message-id" );
- }
- }
- ++pRanges;
- }
-}
-
-void SfxTopViewFrame::INetExecute_Impl( SfxRequest &rRequest )
-{
- sal_uInt16 nSlotId = rRequest.GetSlot();
- switch( nSlotId )
- {
- case SID_BROWSE_FORWARD:
- case SID_BROWSE_BACKWARD:
- {
- // Anzeige der n"achsten oder vorherigen Seite aus der History
- SFX_REQUEST_ARG( rRequest, pSteps, SfxUInt16Item, nSlotId, sal_False );
- GetFrame()->Browse( nSlotId == SID_BROWSE_FORWARD, pSteps ? pSteps->GetValue() : 1,
- (rRequest.GetModifier() & KEY_MOD1) != 0 );
- break;
- }
- case SID_CREATELINK:
- {
-/*! (pb) we need new implementation to create a link
-*/
- break;
- }
- case SID_BROWSE_STOP:
- {
- if ( GetCancelManager() )
- GetCancelManager()->Cancel( TRUE );
-
- // cancel jobs in hidden tasks
- SfxFrameArr_Impl& rArr = *SFX_APP()->Get_Impl()->pTopFrames;
- for( USHORT nPos = rArr.Count(); nPos--; )
- {
- SfxFrame *pFrame = rArr[ nPos ];
- if ( !pFrame->GetCurrentViewFrame() )
- pFrame->GetCancelManager()->Cancel( TRUE );
- }
-
- break;
- }
- case SID_FOCUSURLBOX:
- {
- SfxStateCache *pCache = GetBindings().GetAnyStateCache_Impl( SID_OPENURL );
- if( pCache )
- {
- SfxControllerItem* pCtrl = pCache->GetItemLink();
- while( pCtrl )
- {
- pCtrl->StateChanged( SID_FOCUSURLBOX, SFX_ITEM_UNKNOWN, 0 );
- pCtrl = pCtrl->GetItemLink();
- }
- }
- }
- }
-
- // Recording
- rRequest.Done();
-}
-
-void SfxTopViewFrame::INetState_Impl( SfxItemSet &rItemSet )
-{
- if ( !GetFrame()->CanBrowseForward() )
- rItemSet.DisableItem( SID_BROWSE_FORWARD );
-
- if ( !GetFrame()->CanBrowseBackward() )
- rItemSet.DisableItem( SID_BROWSE_BACKWARD );
-
- // Add/SaveToBookmark bei BASIC-IDE, QUERY-EDITOR etc. disablen
- SfxObjectShell *pDocSh = GetObjectShell();
- sal_Bool bPseudo = pDocSh && !( pDocSh->GetFactory().GetFlags() & SFXOBJECTSHELL_HASOPENDOC );
- sal_Bool bEmbedded = pDocSh && pDocSh->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED;
- if ( !pDocSh || bPseudo || bEmbedded || !pDocSh->HasName() )
- rItemSet.DisableItem( SID_CREATELINK );
-
- pImp->pStopButtonTimer->SetButtonState( GetCancelManager()->CanCancel() );
- if ( !pImp->pStopButtonTimer->GetButtonState() )
- rItemSet.DisableItem( SID_BROWSE_STOP );
-}
-
-void SfxTopViewFrame::SetZoomFactor( const Fraction &rZoomX, const Fraction &rZoomY )
-{
- GetViewShell()->SetZoomFactor( rZoomX, rZoomY );
-}
-
-void SfxTopViewFrame::Activate( sal_Bool bMDI )
-{
- DBG_ASSERT(GetViewShell(), "Keine Shell");
- if ( bMDI )
- pImp->bActive = sal_True;
-//(mba): hier evtl. wie in Beanframe NotifyEvent ?!
-}
-
-void SfxTopViewFrame::Deactivate( sal_Bool bMDI )
-{
- DBG_ASSERT(GetViewShell(), "Keine Shell");
- if ( bMDI )
- pImp->bActive = sal_False;
-//(mba): hier evtl. wie in Beanframe NotifyEvent ?!
-}
-
-void SfxTopFrame::CheckMenuCloser_Impl( MenuBar* pMenuBar )
-{
- Reference < ::com::sun::star::frame::XFrame > xFrame = GetFrameInterface();
-
- // checks if there is more than one "real" (not help) task window
- // in this case a close button is inserted into the menubar
-
- DBG_ASSERT( xFrame.is(), "Attention: this bug is very hard to reproduce. Please try to remember how you triggered it!");
- if ( !xFrame.is() || !xFrame->getController().is() )
- // dummy component
- return;
-
- Reference < ::com::sun::star::frame::XFramesSupplier > xDesktop( xFrame->getCreator(), UNO_QUERY );
- if ( !xDesktop.is() )
- // test only for task windows
- return;
-
- sal_Bool bLastTask = sal_False;
- Reference < ::com::sun::star::container::XIndexAccess >
- xList ( xDesktop->getFrames(), ::com::sun::star::uno::UNO_QUERY );
- sal_Int32 nCount = xList->getCount();
- if ( nCount<=1 )
- // only one task
- bLastTask = sal_True;
- else if ( nCount==2 )
- {
- // if we have to tasks, one can be the help task, that should be ignored
- for( sal_Int32 i=0; i<nCount; ++i )
- {
- Reference < ::com::sun::star::frame::XFrame > xTask;
- ::com::sun::star::uno::Any aVal = xList->getByIndex(i);
- if ( (aVal>>=xTask) && xTask.is() && xTask->getName().compareToAscii("OFFICE_HELP_TASK") == COMPARE_EQUAL )
- {
- // one of the two open tasks was the help task -> ignored
- bLastTask = sal_True;
- break;
- }
- }
- }
-
- pMenuBar->ShowCloser(bLastTask);
-}
diff --git a/sfx2/source/view/userinputinterception.cxx b/sfx2/source/view/userinputinterception.cxx
index 932b698c753e..e716e604b649 100644
--- a/sfx2/source/view/userinputinterception.cxx
+++ b/sfx2/source/view/userinputinterception.cxx
@@ -1,31 +1,29 @@
/*************************************************************************
-* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-*
-* Copyright 2008 by Sun Microsystems, Inc.
-*
-* OpenOffice.org - a multi-platform office productivity suite
-*
-* $RCSfile: userinputinterception.cxx,v $
-*
-* $Revision: 1.2 $
-*
-* 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.
-************************************************************************/
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ***********************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sfx2.hxx"
diff --git a/sfx2/source/view/view.hrc b/sfx2/source/view/view.hrc
index 208828d1fcad..243dcd56e4c8 100644
--- a/sfx2/source/view/view.hrc
+++ b/sfx2/source/view/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.12 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sfx2/source/view/view.hxx b/sfx2/source/view/view.hxx
index 6781bfd1d9c9..20e542d90bc7 100644
--- a/sfx2/source/view/view.hxx
+++ b/sfx2/source/view/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.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sfx2/source/view/view.src b/sfx2/source/view/view.src
index b0e4cb29fbea..b4c09a0677ed 100644
--- a/sfx2/source/view/view.src
+++ b/sfx2/source/view/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.55 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sfx2/source/view/viewfac.cxx b/sfx2/source/view/viewfac.cxx
index 2eff45e0501d..b58bbc2840da 100644
--- a/sfx2/source/view/viewfac.cxx
+++ b/sfx2/source/view/viewfac.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: viewfac.cxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -32,10 +29,8 @@
#include "precompiled_sfx2.hxx"
// INCLUDE ---------------------------------------------------------------
-#ifndef GCC
-#endif
-
#include <sfx2/app.hxx>
+#include <rtl/ustrbuf.hxx>
#include "viewfac.hxx"
// STATIC DATA -----------------------------------------------------------
@@ -54,6 +49,14 @@ void SfxViewFactory::InitFactory()
(*fnInit)();
}
+String SfxViewFactory::GetViewName() const
+{
+ ::rtl::OUStringBuffer aViewName;
+ aViewName.appendAscii( "view" );
+ aViewName.append( sal_Int32( GetOrdinal() ) );
+ return aViewName.makeStringAndClear();
+}
+
// CTOR / DTOR -----------------------------------------------------------
SfxViewFactory::SfxViewFactory( SfxViewCtor fnC, SfxViewInit fnI,
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index ba87f0fc33ca..66af0d7ac8ba 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: viewfrm.cxx,v $
- * $Revision: 1.136.8.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -37,6 +34,7 @@
#include <com/sun/star/document/MacroExecMode.hpp>
#include <com/sun/star/frame/XLoadable.hpp>
#include <com/sun/star/frame/XLayoutManager.hpp>
+#include <com/sun/star/frame/XComponentLoader.hpp>
#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_
#include <toolkit/unohlp.hxx>
@@ -56,6 +54,7 @@
#endif
#include <svtools/sfxecode.hxx>
#include <svtools/ehdl.hxx>
+#include <tools/diagnose_ex.h>
#include <com/sun/star/container/XIndexAccess.hpp>
#include <com/sun/star/frame/XFramesSupplier.hpp>
#include <com/sun/star/frame/FrameSearchFlag.hpp>
@@ -64,8 +63,9 @@
#include <com/sun/star/frame/XFramesSupplier.hpp>
#include <com/sun/star/awt/XWindow.hpp>
#include <com/sun/star/frame/XController.hpp>
-#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/frame/XModel2.hpp>
#include <com/sun/star/util/XURLTransformer.hpp>
+#include <com/sun/star/util/XCloseable.hpp>
#include <com/sun/star/frame/XDispatchRecorderSupplier.hpp>
#include <com/sun/star/document/MacroExecMode.hpp>
#include <com/sun/star/document/UpdateDocMode.hpp>
@@ -79,6 +79,8 @@
#include <unotools/localfilehelper.hxx>
#include <unotools/ucbhelper.hxx>
#include <comphelper/processfactory.hxx>
+#include <comphelper/componentcontext.hxx>
+#include <comphelper/namedvaluecollection.hxx>
#include <comphelper/configurationhelper.hxx>
#include <com/sun/star/uno/Reference.h>
@@ -97,6 +99,8 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::ucb;
using namespace ::com::sun::star::frame;
using namespace ::com::sun::star::lang;
+using ::com::sun::star::awt::XWindow;
+using ::com::sun::star::beans::PropertyValue;
namespace css = ::com::sun::star;
#ifndef GCC
@@ -126,7 +130,7 @@ namespace css = ::com::sun::star;
#include <sfx2/docfile.hxx>
#include <sfx2/module.hxx>
#include <sfx2/msgpool.hxx>
-#include <sfx2/topfrm.hxx>
+#include <sfx2/viewfrm.hxx>
#include "viewimp.hxx"
#include <sfx2/sfxbasecontroller.hxx>
#include <sfx2/sfx.hrc>
@@ -139,11 +143,14 @@ namespace css = ::com::sun::star;
#include "macro.hxx"
#include "minfitem.hxx"
#include "../appl/app.hrc"
+#include "impviewframe.hxx"
+
//-------------------------------------------------------------------------
DBG_NAME(SfxViewFrame)
#define SfxViewFrame
#include "sfxslots.hxx"
+#undef SfxViewFrame
//-------------------------------------------------------------------------
@@ -161,54 +168,6 @@ TYPEINIT1(SfxViewFrameItem, SfxPoolItem);
//=========================================================================
-struct SfxViewFrame_Impl
-{
- SvBorder aBorder;
- Size aMargin;
- Size aSize;
- String aViewData;
- String aFrameTitle;
- TypeId aLastType;
- String aActualURL;
- String aActualPresentationURL;
- SfxFrame* pFrame;
- SfxCancelManager* pCancelMgr;
- svtools::AsynchronLink* pReloader;
- //SfxInPlaceFrame* pIPFrame;
- Window* pWindow;
- SfxViewFrame* pActiveChild;
- SfxViewFrame* pParentViewFrame;
- SfxObjectShell* pImportShell;
- Window* pFocusWin;
- SfxMacro* pMacro;
- sal_uInt16 nDocViewNo;
- sal_uInt16 nCurViewId;
- sal_Bool bResizeInToOut:1;
- sal_Bool bDontOverwriteResizeInToOut:1;
- sal_Bool bObjLocked:1;
- sal_Bool bRestoreView:1;
- sal_Bool bSetViewFrameLocked:1;
- sal_Bool bReloading:1;
- sal_Bool bIsDowning:1;
- sal_Bool bInCtor:1;
- sal_Bool bModal:1;
- sal_Bool bEnabled:1;
- sal_Bool bEventFlag:1;
- sal_Bool bWindowWasEnabled:1;
-
- SfxViewFrame_Impl()
- : pReloader(0 )
- , pMacro( 0 )
- , bWindowWasEnabled(sal_True)
- {}
-
- ~SfxViewFrame_Impl()
- {
- delete pReloader;
- delete pCancelMgr;
- }
-};
-
//-------------------------------------------------------------------------
void SfxViewFrame::SetDowning_Impl()
{
@@ -222,31 +181,7 @@ sal_Bool SfxViewFrame::IsDowning_Impl() const
}
-//-------------------------------------------------------------------------
-void SfxViewFrame::SetSetViewFrameAllowed_Impl( sal_Bool bSet )
-{
- pImp->bSetViewFrameLocked = !bSet;
-};
-
-//-------------------------------------------------------------------------
-sal_Bool SfxViewFrame::IsSetViewFrameAllowed_Impl() const
-{
- return !pImp->bSetViewFrameLocked;
-}
-
-//-------------------------------------------------------------------------
-void SfxViewFrame::SetImportingObjectShell_Impl( SfxObjectShell* pSh )
-{
- pImp->pImportShell = pSh;
-}
-
//--------------------------------------------------------------------
-SfxObjectShell* SfxViewFrame::GetImportingObjectShell_Impl() const
-{
- return pImp->pImportShell;
-}
-
-
class SfxViewNotificatedFrameList_Impl :
public SfxListener, public SfxViewFrameArr_Impl
{
@@ -302,7 +237,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq, sal_Bool bAsync )
void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
{
- SfxFrame *pParent = GetFrame()->GetParentFrame();
+ SfxFrame *pParent = GetFrame().GetParentFrame();
if ( rReq.GetSlot() == SID_RELOAD )
{
// Bei CTRL-Reload den aktiven Frame reloaden
@@ -322,11 +257,11 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
// Wenn nur ein Reload der Graphiken eines oder mehrerer ChildFrames
// gemacht werden soll
- SfxFrame *pFrame = GetFrame();
- if ( pParent == pFrame && pFrame->GetChildFrameCount() )
+ SfxFrame& rFrame = GetFrame();
+ if ( pParent == &rFrame && rFrame.GetChildFrameCount() )
{
sal_Bool bReloadAvailable = sal_False;
- SfxFrameIterator aIter( *pFrame, sal_False );
+ SfxFrameIterator aIter( rFrame, sal_False );
SfxFrame *pChild = aIter.FirstFrame();
while ( pChild )
{
@@ -359,13 +294,11 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
}
SfxObjectShell* pSh = GetObjectShell();
- sal_Bool bWasReadonly = pSh->IsReadOnly();
-
switch ( rReq.GetSlot() )
{
case SID_EDITDOC:
{
- if ( GetFrame()->HasComponent() )
+ if ( GetFrame().HasComponent() )
break;
// Wg. Doppeltbelegung in Toolboxen (mit/ohne Ctrl) ist es auch
@@ -501,12 +434,11 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
// r/o-Doc kann nicht in Editmode geschaltet werden?
rReq.Done( sal_False );
- SFX_REQUEST_ARG( rReq, pFSetItem, SfxBoolItem, SID_EDIT_FRAMESET, sal_False);
if ( nOpenMode == SFX_STREAM_READWRITE && !rReq.IsAPI() )
{
// dem ::com::sun::star::sdbcx::User anbieten, als Vorlage zu oeffnen
QueryBox aBox( &GetWindow(), SfxResId(MSG_QUERY_OPENASTEMPLATE) );
- if ( !pFSetItem && RET_YES == aBox.Execute() )
+ if ( RET_YES == aBox.Execute() )
{
SfxApplication* pApp = SFX_APP();
SfxAllItemSet aSet( pApp->GetPool() );
@@ -547,16 +479,6 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
rReq.Done( sal_True );
// if( nOpenMode == SFX_STREAM_READONLY )
// pMed->Close();
-
- // ReloadForEdit bei Framesets schaltet auch FramesetEditmode
- sal_Bool bIsReadonly = GetObjectShell()->IsReadOnly();
- if ( bIsReadonly != bWasReadonly && !GetFrame()->GetParentFrame() )
- {
- SfxBoolItem aItem( SID_EDIT_FRAMESET, !bIsReadonly );
- GetDispatcher()->Execute( SID_EDIT_FRAMESET,
- SFX_CALLMODE_RECORD, &aItem, 0L );
- pSh->Broadcast( SfxSimpleHint( SFX_HINT_TITLECHANGED ) );
- }
return;
}
}
@@ -599,7 +521,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
// AutoLoad ist ggf. verboten
SFX_REQUEST_ARG(rReq, pAutoLoadItem, SfxBoolItem, SID_AUTOLOAD, sal_False);
if ( pAutoLoadItem && pAutoLoadItem->GetValue() &&
- GetFrame()->IsAutoLoadLocked_Impl() )
+ GetFrame().IsAutoLoadLocked_Impl() )
return;
SfxObjectShellLock xOldObj( pSh );
@@ -614,7 +536,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
// ggf. beim User nachfragen
sal_Bool bDo = ( GetViewShell()->PrepareClose() != FALSE );
SFX_REQUEST_ARG(rReq, pSilentItem, SfxBoolItem, SID_SILENT, sal_False);
- if ( bDo && GetFrame()->DocIsModified_Impl() &&
+ if ( bDo && GetFrame().DocIsModified_Impl() &&
!rReq.IsAPI() && ( !pSilentItem || !pSilentItem->GetValue() ) )
{
QueryBox aBox( &GetWindow(), SfxResId(MSG_QUERY_LASTVERSION) );
@@ -634,25 +556,21 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
// bestehende SfxMDIFrames f"ur dieses Doc leeren
// eigenes Format oder R/O jetzt editierbar "offnen?
- SfxViewNotificatedFrameList_Impl aFrames;
SfxObjectShellLock xNewObj;
- sal_Bool bRestoreView = ( pURLItem == NULL );
- TypeId aOldType = xOldObj->Type();
- SfxViewFrame *pView = GetFirst(xOldObj);
- while(pView)
+ // collect the views of the document
+ // TODO: when UNO ViewFactories are available for SFX-based documents, the below code should
+ // be UNOized, too
+ typedef ::std::pair< Reference< XFrame >, USHORT > ViewDescriptor;
+ ::std::list< ViewDescriptor > aViewFrames;
+ SfxViewFrame *pView = GetFirst( xOldObj );
+ while ( pView )
{
- if( bHandsOff )
- pView->GetDispatcher()->LockUI_Impl(sal_True);
- aFrames.InsertViewFrame( pView );
- pView->GetBindings().ENTERREGISTRATIONS();
-
- // RestoreView nur wenn keine neue Datei geladen
- // (Client-Pull-Reloading)
- pView = /*bHandsOff ? (SfxTopViewFrame*) GetFirst(
- xOldObj, TYPE(SfxTopViewFrame) ) :*/
- (SfxTopViewFrame*)GetNext( *pView, xOldObj,
- TYPE( SfxTopViewFrame ) );
+ Reference< XFrame > xFrame( pView->GetFrame().GetFrameInterface() );
+ OSL_ENSURE( xFrame.is(), "SfxViewFrame::ExecReload_Impl: no XFrame?!" );
+ aViewFrames.push_back( ViewDescriptor( xFrame, pView->GetCurViewId() ) );
+
+ pView = GetNext( *pView, xOldObj );
}
DELETEZ( xOldObj->Get_Impl()->pReloadTimer );
@@ -675,7 +593,6 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
{
pNewSet = new SfxAllItemSet( *pMedium->GetItemSet() );
pNewSet->ClearItem( SID_VIEW_ID );
- pNewSet->ClearItem( SID_USER_DATA );
pNewSet->ClearItem( SID_STREAM );
pNewSet->ClearItem( SID_INPUTSTREAM );
pNewSet->Put( SfxStringItem( SID_FILTER_NAME, pMedium->GetFilter()->GetName() ) );
@@ -744,9 +661,6 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
SFX_ITEMSET_ARG( pMedium->GetItemSet(), pSavedOptions, SfxStringItem, SID_FILE_FILTEROPTIONS, sal_False);
SFX_ITEMSET_ARG( pMedium->GetItemSet(), pSavedReferer, SfxStringItem, SID_REFERER, sal_False);
- if( !pURLItem || pURLItem->GetValue() == xOldObj->GetMedium()->GetName() )
- xOldObj->Get_Impl()->bForbidCaching = sal_True;
-
sal_Bool bHasStorage = pMedium->HasStorage_Impl();
if( bHandsOff )
{
@@ -761,12 +675,12 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
}
xNewObj = SfxObjectShell::CreateObject( pFilter->GetServiceName(), SFX_CREATE_MODE_STANDARD );
+ uno::Sequence < beans::PropertyValue > aLoadArgs;
+ TransformItems( SID_OPENDOC, *pNewSet, aLoadArgs );
try
{
- uno::Sequence < beans::PropertyValue > aProps;
- TransformItems( SID_OPENDOC, *pNewSet, aProps );
uno::Reference < frame::XLoadable > xLoad( xNewObj->GetModel(), uno::UNO_QUERY );
- xLoad->load( aProps );
+ xLoad->load( aLoadArgs );
}
catch ( uno::Exception& )
{
@@ -818,54 +732,41 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
{
if ( xNewObj->IsDocShared() )
{
- // the file is shared but the closing can chang the sharing control file
+ // the file is shared but the closing can change the sharing control file
xOldObj->DoNotCleanShareControlFile();
}
+ // the Reload and Silent items were only temporary, remove them
xNewObj->GetMedium()->GetItemSet()->ClearItem( SID_RELOAD );
xNewObj->GetMedium()->GetItemSet()->ClearItem( SID_SILENT );
- UpdateDocument_Impl();
- }
-
- SfxViewFrame* pThis = (SfxViewFrame*)this;
- sal_Bool bDeleted = aFrames.C40_GETPOS( SfxViewFrame, pThis ) == USHRT_MAX;
+ TransformItems( SID_OPENDOC, *xNewObj->GetMedium()->GetItemSet(), aLoadArgs );
- if( !bDeleted )
- {
- GetBindings().Invalidate( SID_RELOAD );
- pImp->bReloading = sal_False;
+ UpdateDocument_Impl();
}
- // neues Doc in die bestehenden SfxMDIFrames einsetzen; wenn
- // das Reload geklappt hat, mu\s in diesem Frame kein Dokument
- // eingesetzt werden, weil das schon vom LoadEnvironment
- // gemacht wurde
- if ( xNewObj.Is() && xNewObj->Type() != aOldType )
- // RestoreView nur, wenn gleicher Dokumenttyp
- bRestoreView = sal_False;
-
- const sal_uInt16 nCount = aFrames.Count();
- for(sal_uInt16 i = 0; i < nCount; ++i)
+ if ( xNewObj.Is() )
{
- SfxViewFrame *pCurrView = aFrames.GetObject( i );
- if ( xNewObj.Is() )
+ try
{
- //if( /*!bHandsOff &&*/ this != pView )
- pCurrView->ReleaseObjectShell_Impl( bRestoreView );
- pCurrView->SetRestoreView_Impl( bRestoreView );
- //if( pView != this || !xNewObj.Is() )
+ while ( !aViewFrames.empty() )
{
- SfxFrame *pFrame = pCurrView->GetFrame();
- pFrame->InsertDocument(xNewObj.Is() ? xNewObj : xOldObj );
+ LoadViewIntoFrame_Impl( *xNewObj, aViewFrames.front().first, aLoadArgs, aViewFrames.front().second, false );
+ aViewFrames.pop_front();
+ }
+ }
+ catch( const Exception& )
+ {
+ // close the remaining frames
+ // Don't catch exceptions herein, if this fails, then we're left in an indetermined state, and
+ // crashing is better than trying to proceed
+ while ( !aViewFrames.empty() )
+ {
+ Reference< util::XCloseable > xClose( aViewFrames.front().first, UNO_QUERY_THROW );
+ xClose->close( sal_True );
+ aViewFrames.pop_front();
}
}
- pCurrView->GetBindings().LEAVEREGISTRATIONS();
- pCurrView->GetDispatcher()->LockUI_Impl( sal_False );
- }
-
- if ( xNewObj.Is() )
- {
// Propagate document closure.
SFX_APP()->NotifyEvent( SfxEventHint( SFX_EVENT_CLOSEDOC, GlobalEventConfig::GetEventName( STR_EVENT_CLOSEDOC ), xOldObj ) );
}
@@ -873,11 +774,6 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
// als erledigt recorden
rReq.Done( sal_True );
rReq.SetReturnValue(SfxBoolItem(rReq.GetSlot(), sal_True));
- if( !bDeleted )
- {
- Notify( *GetObjectShell(), SfxSimpleHint(
- SFX_HINT_TITLECHANGED ));
- }
return;
}
else
@@ -900,11 +796,11 @@ void SfxViewFrame::StateReload_Impl( SfxItemSet& rSet )
// Ich bin gerade am Reloaden und Yielde so vor mich hin ...
return;
- GetFrame()->GetParentFrame();
+ GetFrame().GetParentFrame();
SfxWhichIter aIter( rSet );
for ( sal_uInt16 nWhich = aIter.FirstWhich(); nWhich; nWhich = aIter.NextWhich() )
{
- if ( GetFrame()->HasComponent() )
+ if ( GetFrame().HasComponent() )
{
// Wenn die Komponente es nicht selbst dispatched, dann
// macht es auch keinen Sinn!
@@ -932,16 +828,7 @@ void SfxViewFrame::StateReload_Impl( SfxItemSet& rSet )
case SID_RELOAD:
{
- SfxFrame* pFrame = GetTopFrame();
- SfxViewFrame *pView = pFrame->GetCurrentViewFrame();
- if ( pView && pView->GetViewShell() &&
- pView->GetViewShell()->IsImplementedAsFrameset_Impl() &&
- pView->GetViewShell()->GetInterface()->GetSlot( nWhich ) )
- {
- // Hack f"ur Explorer: Reload wird an der ViewShell ausgef"uhrt
- pView->GetViewShell()->GetSlotState( nWhich, 0, &rSet );
- break;
- }
+ SfxFrame* pFrame = &GetTopFrame();
if ( !pSh || !pSh->CanReload_Impl() || pSh->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
rSet.DisableItem(nWhich);
@@ -1012,7 +899,7 @@ void SfxViewFrame::ExecHistory_Impl( SfxRequest &rReq )
}
else if ( GetViewShell() )
{
- // der SW hat eigenes Undo an der ::com::sun::star::sdbcx::View
+ // der SW hat eigenes Undo an der View
const SfxPoolItem *pRet = GetViewShell()->ExecuteSlot( rReq );
if ( pRet )
bOK = ((SfxBoolItem*)pRet)->GetValue();
@@ -1034,7 +921,7 @@ void SfxViewFrame::StateHistory_Impl( SfxItemSet &rSet )
SfxUndoManager *pShUndoMgr = pSh->GetUndoManager();
if ( !pShUndoMgr )
{
- // der SW hat eigenes Undo an der ::com::sun::star::sdbcx::View
+ // der SW hat eigenes Undo an der View
SfxWhichIter aIter( rSet );
SfxViewShell *pViewSh = GetViewShell();
if( !pViewSh ) return;
@@ -1078,86 +965,30 @@ void SfxViewFrame::StateHistory_Impl( SfxItemSet &rSet )
}
//--------------------------------------------------------------------
-void SfxViewFrame::SetObjectShell_Impl
-(
- SfxObjectShell& rObjSh, // eine initialisierte SfxObjectShell,
- FASTBOOL bDefaultView // sal_True: nicht restaurieren
-)
-
-/* [Beschreibung]
-
- Diese Methode setzt eine <SfxObjectShell> in den SfxViewFrame ein.
-
- Zuvor mu\s die vorherige SfxObjectShell, insofern schein eine gesetzt
- wurde, mit der Methode ReleaseObjectShell() entfernt worden sein. Somit
- kann durch Aufruf von ReleaseObjectShell() und SetObjectShell() die
- SfxObjectShell ausgetauscht werden.
-
-
- [Querverweise]
-
- <SfxViewFrame::ReleaseObjectShell()>
-*/
-
+void SfxViewFrame::PopShellAndSubShells_Impl( SfxViewShell& i_rViewShell )
{
- DBG_CHKTHIS(SfxViewFrame, 0);
- DBG_ASSERT( !xObjSh.Is(), "old feature used: only one Object per View!" );
-
- GetFrame()->ReleasingComponent_Impl( sal_False );
-
- // Doc einsetzen
- xObjSh = &rObjSh;
- if ( xObjSh.Is() && xObjSh->IsPreview() )
- SetQuietMode_Impl( sal_True );
-
- GetFrame()->SetFrameType_Impl( GetFrameType() & ~SFXFRAME_FRAMESET );
-
- // Modulshell einf"ugen
- SfxModule* pModule = xObjSh->GetModule();
- if( pModule )
- pDispatcher->InsertShell_Impl( *pModule, 1 );
-
- pDispatcher->Push( rObjSh );
- pDispatcher->Flush();
- StartListening( rObjSh );
-
- rObjSh.ViewAssigned();
- pDispatcher->SetReadOnly_Impl( rObjSh.IsReadOnly() );
-
- const SfxMedium *pMedium = GetObjectShell()->GetMedium();
- SFX_ITEMSET_ARG(
- pMedium->GetItemSet(), pHiddenItem, SfxBoolItem, SID_HIDDEN, sal_False );
- if ( !pHiddenItem || !pHiddenItem->GetValue() )
+ i_rViewShell.PopSubShells_Impl();
+ sal_uInt16 nLevel = pDispatcher->GetShellLevel( i_rViewShell );
+ if ( nLevel != USHRT_MAX )
{
- LockObjectShell_Impl(sal_True);
- GetDocNumber_Impl();
+ if ( nLevel )
+ {
+ // more sub shells on the stack, which were not affected by PopSubShells_Impl
+ SfxShell *pSubShell = pDispatcher->GetShell( nLevel-1 );
+ if ( pSubShell == i_rViewShell.GetSubShell() )
+ // "real" sub shells will be deleted elsewhere
+ pDispatcher->Pop( *pSubShell, SFX_SHELL_POP_UNTIL );
+ else
+ pDispatcher->Pop( *pSubShell, SFX_SHELL_POP_UNTIL | SFX_SHELL_POP_DELETE );
+ }
+ pDispatcher->Pop( i_rViewShell );
+ pDispatcher->Flush();
}
- // ::com::sun::star::sdbcx::View erzeugen
- if ( bDefaultView )
- SetRestoreView_Impl( sal_False );
-
-// So darf man es nicht machen, da LaodWindows hierueber laeuft. Kann meiner Meinung nach
-// auch nur beim Reload mit Dokumenttypwechsel passieren.
-/* if ( xObjSh->Type() != pImp->aLastType )
- SetRestoreView_Impl( sal_False ); */
-
- SwitchToViewShell_Impl( !IsRestoreView_Impl() ? (sal_uInt16) 0 : GetCurViewId() );
- rObjSh.PostActivateEvent_Impl( this );
- if ( Current() == this )
- SFX_APP()->NotifyEvent(SfxEventHint(SFX_EVENT_ACTIVATEDOC, GlobalEventConfig::GetEventName( STR_EVENT_ACTIVATEDOC ), &rObjSh ) );
-
- Notify( rObjSh, SfxSimpleHint(SFX_HINT_TITLECHANGED) );
- Notify( rObjSh, SfxSimpleHint(SFX_HINT_DOCCHANGED) );
-
- // Zur Sicherheit, aber eigentlich sollte jetzt nichts mehr passieren
- // ( kein erzwungenes Update )
- if ( SfxViewFrame::Current() == this )
- GetDispatcher()->Update_Impl();
}
//--------------------------------------------------------------------
-void SfxViewFrame::ReleaseObjectShell_Impl( sal_Bool bStoreView )
+void SfxViewFrame::ReleaseObjectShell_Impl()
/* [Beschreibung]
@@ -1169,7 +1000,7 @@ void SfxViewFrame::ReleaseObjectShell_Impl( sal_Bool bStoreView )
die SfxObjectShell ausgetauscht werden.
Zwischen RealeaseObjectShell() und SetObjectShell() darf die Kontrolle
- nicht an das ::com::sun::star::chaos::System abgegeben werden.
+ nicht an das System abgegeben werden.
[Querverweise]
@@ -1180,7 +1011,7 @@ void SfxViewFrame::ReleaseObjectShell_Impl( sal_Bool bStoreView )
DBG_CHKTHIS(SfxViewFrame, 0);
DBG_ASSERT( xObjSh.Is(), "no SfxObjectShell to release!" );
- GetFrame()->ReleasingComponent_Impl( sal_True );
+ GetFrame().ReleasingComponent_Impl( sal_True );
if ( GetWindow().HasChildPathFocus( sal_True ) )
{
DBG_ASSERT( !GetActiveChildFrame_Impl(), "Wrong active child frame!" );
@@ -1190,25 +1021,7 @@ void SfxViewFrame::ReleaseObjectShell_Impl( sal_Bool bStoreView )
SfxViewShell *pDyingViewSh = GetViewShell();
if ( pDyingViewSh )
{
- SetRestoreView_Impl( bStoreView );
- if ( bStoreView )
- pDyingViewSh->WriteUserData( GetViewData_Impl(), sal_True );
-
- // Jetzt alle SubShells wechhauen
- pDyingViewSh->PushSubShells_Impl( sal_False );
- sal_uInt16 nLevel = pDispatcher->GetShellLevel( *pDyingViewSh );
- if ( nLevel && nLevel != USHRT_MAX )
- {
- // Es gibt immer nocht SubShells
- SfxShell *pSubShell = pDispatcher->GetShell( nLevel-1 );
- if ( pSubShell == pDyingViewSh->GetSubShell() )
- //"Echte" Subshells nicht deleten
- pDispatcher->Pop( *pSubShell, SFX_SHELL_POP_UNTIL );
- else
- pDispatcher->Pop( *pSubShell, SFX_SHELL_POP_UNTIL | SFX_SHELL_POP_DELETE );
- }
- pDispatcher->Pop( *pDyingViewSh );
- pDispatcher->Flush();
+ PopShellAndSubShells_Impl( *pDyingViewSh );
pDyingViewSh->DisconnectAllClients();
SetViewShell_Impl(0);
delete pDyingViewSh;
@@ -1247,116 +1060,26 @@ void SfxViewFrame::ReleaseObjectShell_Impl( sal_Bool bStoreView )
GetDispatcher()->SetDisableFlags( 0 );
}
-//-------------------------------------------------------------------------
-
-String SfxViewFrame::UpdateTitle()
-
-/* [Beschreibung]
-
- Mit dieser Methode kann der SfxMDIFrame gezwungen werden, sich sofort
- den neuen Titel vom der <SfxObjectShell> zu besorgen.
-
- [Anmerkung]
-
- Dies ist z.B. dann notwendig, wenn man der SfxObjectShell als SfxListener
- zuh"ort und dort auf den <SfxSimpleHint> SFX_HINT_TITLECHANGED reagieren
- m"ochte, um dann die Titel seiner Views abzufragen. Diese Views (SfxMDIFrames)
- jedoch sind ebenfalls SfxListener und da die Reihenfolge der Benachrichtigung
- nicht feststeht, mu\s deren Titel-Update vorab erzwungen werden.
-
-
- [Beispiel]
-
- void SwDocShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
- {
- if ( rHint.IsA(TYPE(SfxSimpleHint)) )
- {
- switch( ( (SfxSimpleHint&) rHint ).GetId() )
- {
- case SFX_HINT_TITLECHANGED:
- for ( SfxMDIFrame *pMDI = (SfxMDIFrame*)
- SfxViewFrame::GetFirst(this, TYPE(SfxMDIFrame));
- pMDI;
- pMDI = (SfxMDIFrame*)
- SfxViewFrame::GetNext(this, TYPE(SfxMDIFrame));
- {
- pMDI->UpdateTitle();
- ... pMDI->GetName() ...
- }
- break;
- ...
- }
- }
- }
-*/
-
-{
- SfxObjectShell *pObjSh = GetObjectShell();
- if ( !pObjSh )
- return String();
-
-// if ( pObjSh->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
-// // kein UpdateTitle mit Embedded-ObjectShell
-// return String();
-
- const SfxMedium *pMedium = pObjSh->GetMedium();
- String aURL;
- GetFrame(); // -Wall required??
- if ( pObjSh->HasName() )
- {
- INetURLObject aTmp( pMedium->GetName() );
- aURL = aTmp.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET );
- }
-
- if ( aURL != pImp->aActualURL )
- // URL hat sich ge"andert
- pImp->aActualURL = aURL;
-
- // gibt es noch eine weitere View?
- sal_uInt16 nViews=0;
- for ( SfxViewFrame *pView= GetFirst(pObjSh);
- pView && nViews<2;
- pView = GetNext(*pView,pObjSh) )
- if ( ( pView->GetFrameType() & SFXFRAME_HASTITLE ) &&
- !IsDowning_Impl())
- nViews++;
-
- // Titel des Fensters
- String aTitle;
- if ( nViews == 2 || pImp->nDocViewNo > 1 )
- // dann die Nummer dranh"angen
- aTitle = pObjSh->UpdateTitle( NULL, pImp->nDocViewNo );
- else
- aTitle = pObjSh->UpdateTitle();
-
- // Name des SbxObjects
- String aSbxName = pObjSh->SfxShell::GetName();
- if ( IsVisible() )
- {
- aSbxName += ':';
- aSbxName += String::CreateFromInt32(pImp->nDocViewNo);
- }
-
- SetName( aSbxName );
- pImp->aFrameTitle = aTitle;
- GetBindings().Invalidate( SID_FRAMETITLE );
- GetBindings().Invalidate( SID_CURRENT_URL );
- return aTitle;
-}
-
-
//--------------------------------------------------------------------
sal_Bool SfxViewFrame::Close()
{
DBG_CHKTHIS(SfxViewFrame, 0);
- DBG_ASSERT( GetFrame()->IsClosing_Impl() || !GetFrame()->GetFrameInterface().is(), "ViewFrame closed too early!" );
+ DBG_ASSERT( GetFrame().IsClosing_Impl() || !GetFrame().GetFrameInterface().is(), "ViewFrame closed too early!" );
// Wenn bis jetzt noch nicht gespeichert wurde, sollen eingebettete Objekte
// auch nicht mehr automatisch gespeichert werden!
if ( GetViewShell() )
GetViewShell()->DiscardClients_Impl();
- Broadcast( SfxSimpleHint(SFX_HINT_DYING) );
+ Broadcast( SfxSimpleHint( SFX_HINT_DYING ) );
+
+ if (SfxViewFrame::Current() == this)
+ SfxViewFrame::SetViewFrame( NULL );
+
+ // Da der Dispatcher leer ger"aumt wird, kann man ihn auch nicht mehr
+ // vern"unftig verwenden - also besser still legen
+ GetDispatcher()->Lock(sal_True);
+ delete this;
return sal_True;
}
@@ -1397,7 +1120,7 @@ void SfxViewFrame::DoActivate( sal_Bool bUI, SfxViewFrame* pOldFrame )
SfxViewFrame *pFrame = GetParentViewFrame();
while ( pFrame )
{
- if ( !pOldFrame || !pOldFrame->GetFrame()->IsParent( pFrame->GetFrame() ) )
+ if ( !pOldFrame || !pOldFrame->GetFrame().IsParent( &pFrame->GetFrame() ) )
pFrame->pDispatcher->DoParentActivate_Impl();
pFrame = pFrame->GetParentViewFrame();
}
@@ -1415,8 +1138,8 @@ void SfxViewFrame::DoDeactivate(sal_Bool bUI, SfxViewFrame* pNewFrame )
// ViewFrames, erh"alt er ein ParentDeactivate
if ( bUI )
{
-// if ( GetFrame()->GetWorkWindow_Impl() )
-// GetFrame()->GetWorkWindow_Impl()->SaveStatus_Impl();
+// if ( GetFrame().GetWorkWindow_Impl() )
+// GetFrame().GetWorkWindow_Impl()->SaveStatus_Impl();
/*
SfxMedium* pMed = GetObjectShell() ? GetObjectShell()->GetMedium() : NULL;
if( pMed )
@@ -1431,7 +1154,7 @@ void SfxViewFrame::DoDeactivate(sal_Bool bUI, SfxViewFrame* pNewFrame )
SfxViewFrame *pFrame = GetParentViewFrame();
while ( pFrame )
{
- if ( !pNewFrame || !pNewFrame->GetFrame()->IsParent( pFrame->GetFrame() ) )
+ if ( !pNewFrame || !pNewFrame->GetFrame().IsParent( &pFrame->GetFrame() ) )
pFrame->pDispatcher->DoParentDeactivate_Impl();
pFrame = pFrame->GetParentViewFrame();
}
@@ -1448,7 +1171,7 @@ void SfxViewFrame::InvalidateBorderImpl( const SfxViewShell* pSh )
{
if ( GetViewShell() && GetWindow().IsVisible() )
{
- if ( GetFrame()->IsInPlace() )
+ if ( GetFrame().IsInPlace() )
{
/*
Size aSize( GetViewShell()->GetWindow()->GetSizePixel() );
@@ -1460,24 +1183,8 @@ void SfxViewFrame::InvalidateBorderImpl( const SfxViewShell* pSh )
return;
}
- if ( GetViewShell()->UseObjectSize() )
- {
- // Zun"achst die Gr"o\se des MDI-Fensters berechnen
-
- DoAdjustPosSizePixel( GetViewShell(), Point(),
- GetViewShell()->GetWindow()->GetSizePixel() );
-
- // Da nach einem InnerResize die Position des EditFensters und
- // damit auch der Tools nocht stimmt, mu\s nun noch einmal von
- // au\sen resized werden !
-
- ForceOuterResize_Impl(sal_True);
- }
-
DoAdjustPosSizePixel( (SfxViewShell *) GetViewShell(), Point(),
GetWindow().GetOutputSizePixel() );
- if ( GetViewShell()->UseObjectSize() )
- ForceOuterResize_Impl(sal_False);
}
}
}
@@ -1485,12 +1192,43 @@ void SfxViewFrame::InvalidateBorderImpl( const SfxViewShell* pSh )
//------------------------------------------------------------------------
sal_Bool SfxViewFrame::SetBorderPixelImpl
(
- const SfxViewShell* /*pSh*/,
+ const SfxViewShell* pVSh,
const SvBorder& rBorder
)
{
pImp->aBorder = rBorder;
+
+ if ( IsResizeInToOut_Impl() && !GetFrame().IsInPlace() )
+ {
+ Size aSize = pVSh->GetWindow()->GetOutputSizePixel();
+ if ( aSize.Width() && aSize.Height() )
+ {
+ aSize.Width() += rBorder.Left() + rBorder.Right();
+ aSize.Height() += rBorder.Top() + rBorder.Bottom();
+
+ Size aOldSize = GetWindow().GetOutputSizePixel();
+ GetWindow().SetOutputSizePixel( aSize );
+ Window* pParent = &GetWindow();
+ while ( pParent->GetParent() )
+ pParent = pParent->GetParent();
+ Size aOuterSize = pParent->GetOutputSizePixel();
+ aOuterSize.Width() += ( aSize.Width() - aOldSize.Width() );
+ aOuterSize.Height() += ( aSize.Height() - aOldSize.Height() );
+ pParent->SetOutputSizePixel( aOuterSize );
+ }
+ }
+ else
+ {
+ Point aPoint;
+ Rectangle aEditArea( aPoint, GetWindow().GetOutputSizePixel() );
+ aEditArea.Left() += rBorder.Left();
+ aEditArea.Right() -= rBorder.Right();
+ aEditArea.Top() += rBorder.Top();
+ aEditArea.Bottom() -= rBorder.Bottom();
+ pVSh->GetWindow()->SetPosSizePixel( aEditArea.TopLeft(), aEditArea.GetSize() );
+ }
+
return sal_True;
}
@@ -1508,15 +1246,22 @@ const SvBorder& SfxViewFrame::GetBorderPixelImpl
void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
{
{DBG_CHKTHIS(SfxViewFrame, 0);}
- if ( !xObjSh.Is() )
+
+ if( IsDowning_Impl())
return;
+ // we know only SimpleHints
if ( rHint.IsA(TYPE(SfxSimpleHint)) )
{
switch( ( (SfxSimpleHint&) rHint ).GetId() )
{
case SFX_HINT_MODECHANGED:
{
+ UpdateTitle();
+
+ if ( !xObjSh.Is() )
+ break;
+
// r/o Umschaltung?
SfxBindings& rBind = GetBindings();
rBind.Invalidate( SID_RELOAD );
@@ -1558,13 +1303,15 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
break;
}
- case SFX_HINT_DYING:
case SFX_HINT_DEINITIALIZING:
+ GetFrame().DoClose();
+ break;
+ case SFX_HINT_DYING:
// when the Object is being deleted, destroy the view too
if ( xObjSh.Is() )
ReleaseObjectShell_Impl();
else
- GetFrame()->DoClose();
+ GetFrame().DoClose();
break;
}
@@ -1589,6 +1336,9 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
case SFX_EVENT_OPENDOC:
case SFX_EVENT_CREATEDOC:
{
+ if ( !xObjSh.Is() )
+ break;
+
SfxBindings& rBind = GetBindings();
rBind.Invalidate( SID_RELOAD );
rBind.Invalidate( SID_EDITDOC );
@@ -1612,7 +1362,7 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
case SFX_EVENT_TOGGLEFULLSCREENMODE:
{
- if ( GetFrame()->OwnsBindings_Impl() )
+ if ( GetFrame().OwnsBindings_Impl() )
GetBindings().GetDispatcher_Impl()->Update_Impl( sal_True );
break;
}
@@ -1623,26 +1373,18 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
//------------------------------------------------------------------------
void SfxViewFrame::Construct_Impl( SfxObjectShell *pObjSh )
{
- pImp->pFrame->DocumentInserted( pObjSh );
- pImp->bInCtor = sal_True;
- pImp->pParentViewFrame = 0;
pImp->bResizeInToOut = sal_True;
pImp->bDontOverwriteResizeInToOut = sal_False;
- pImp->pImportShell = 0;
pImp->bObjLocked = sal_False;
- pImp->bEventFlag = sal_True;
pImp->pFocusWin = 0;
pImp->pActiveChild = NULL;
- pImp->bRestoreView = sal_False;
pImp->nCurViewId = 0;
- pImp->bSetViewFrameLocked = sal_False;
pImp->bReloading = sal_False;
pImp->bIsDowning = sal_False;
pImp->bModal = sal_False;
pImp->bEnabled = sal_True;
pImp->nDocViewNo = 0;
pImp->aMargin = Size( -1, -1 );
- pImp->pCancelMgr = 0;
pImp->pWindow = 0;
SetPool( &SFX_APP()->GetPool() );
@@ -1654,7 +1396,6 @@ void SfxViewFrame::Construct_Impl( SfxObjectShell *pObjSh )
if ( xObjSh.Is() && xObjSh->IsPreview() )
SetQuietMode_Impl( sal_True );
- GetFrame()->SetFrameType_Impl( GetFrameType() & ~SFXFRAME_FRAMESET );
if ( pObjSh )
{
pDispatcher->Push( *SFX_APP() );
@@ -1680,56 +1421,36 @@ void SfxViewFrame::Construct_Impl( SfxObjectShell *pObjSh )
SfxViewFrame *pThis = this; // wegen der kranken Array-Syntax
SfxViewFrameArr_Impl &rViewArr = SFX_APP()->GetViewFrames_Impl();
rViewArr.C40_INSERT(SfxViewFrame, pThis, rViewArr.Count() );
- pImp->bInCtor = sal_False;
}
-//------------------------------------------------------------------------
-SfxViewFrame::SfxViewFrame( SfxObjectShell &rObjShell, SfxBindings &rBindings,
- SfxFrame* pParent, sal_uInt32 nType )
-:
- pImp( new SfxViewFrame_Impl ),
- pDispatcher(0),
- pBindings(&rBindings),
- nAdjustPosPixelLock( 0 )
-{
- DBG_CTOR(SfxViewFrame, 0);
-
- SetFrame_Impl( pParent );
- pImp->pFrame->SetCurrentViewFrame_Impl( this );
- GetFrame()->SetFrameType_Impl( GetFrameType() | nType );
- Construct_Impl( &rObjShell );
-}
+SfxViewFrame::SfxViewFrame
+(
+ SfxFrame& rFrame,
+ SfxObjectShell* pObjShell
+)
-//------------------------------------------------------------------------
-SfxViewFrame::SfxViewFrame(const SfxViewFrame &rCopy, SfxBindings &rBindings,
- SfxFrame *pFrame )
-:
- pImp( new SfxViewFrame_Impl ),
- pDispatcher(0),
- pBindings(&rBindings),
- nAdjustPosPixelLock( 0 )
-{
- DBG_CTOR(SfxViewFrame, 0);
+/* [Beschreibung]
- SetFrame_Impl( pFrame );
- pImp->pFrame->SetCurrentViewFrame_Impl( this );
- GetFrame()->SetFrameType_Impl( rCopy.GetFrameType() );
- Construct_Impl( rCopy.GetObjectShell() );
-}
+ Ctor des SfxViewFrame f"ur eine <SfxObjectShell> aus der Ressource.
+ Die 'nViewId' der zu erzeugenden <SfxViewShell> kann angegeben werden
+ (default ist die zuerst registrierte SfxViewShell-Subklasse).
+*/
-SfxViewFrame::SfxViewFrame( SfxBindings& rBindings, SfxFrame *pFrame,
- SfxObjectShell *pDoc, sal_uInt32 nType )
- : pImp( new SfxViewFrame_Impl )
+ : pImp( new SfxViewFrame_Impl( rFrame ) )
, pDispatcher(0)
- , pBindings(&rBindings)
+ , pBindings( new SfxBindings )
, nAdjustPosPixelLock( 0 )
{
- DBG_CTOR(SfxViewFrame, 0);
+ DBG_CTOR( SfxViewFrame, NULL );
- SetFrame_Impl( pFrame );
- pImp->pFrame->SetCurrentViewFrame_Impl( this );
- GetFrame()->SetFrameType_Impl( GetFrameType() | nType );
- Construct_Impl( pDoc);
+ rFrame.SetCurrentViewFrame_Impl( this );
+ rFrame.SetFrameType_Impl( GetFrameType() | SFXFRAME_HASTITLE );
+ Construct_Impl( pObjShell );
+
+ pImp->pWindow = new SfxFrameViewWindow_Impl( this, rFrame.GetWindow() );
+ pImp->pWindow->SetSizePixel( rFrame.GetWindow().GetOutputSizePixel() );
+ rFrame.SetOwnsBindings_Impl( sal_True );
+ rFrame.CreateWorkWindow_Impl();
}
//------------------------------------------------------------------------
@@ -1737,12 +1458,21 @@ SfxViewFrame::~SfxViewFrame()
{
DBG_DTOR(SfxViewFrame, 0);
- if ( GetFrame() && GetFrame()->GetCurrentViewFrame() == this )
- GetFrame()->SetCurrentViewFrame_Impl( NULL );
+ SetDowning_Impl();
+
+ if ( SfxViewFrame::Current() == this )
+ SfxViewFrame::SetViewFrame( NULL );
+
+ ReleaseObjectShell_Impl();
- SfxObjectShell* pSh = pImp->pImportShell;
- if( pSh )
- pSh->AbortImport();
+ if ( GetFrame().OwnsBindings_Impl() )
+ // Die Bindings l"oscht der Frame!
+ KillDispatcher_Impl();
+
+ delete pImp->pWindow;
+
+ if ( GetFrame().GetCurrentViewFrame() == this )
+ GetFrame().SetCurrentViewFrame_Impl( NULL );
// von Frame-Liste abmelden
SfxApplication *pSfxApp = SFX_APP();
@@ -1784,12 +1514,11 @@ SfxViewFrame* SfxViewFrame::Current()
}
//--------------------------------------------------------------------
-sal_uInt16 SfxViewFrame::Count(TypeId aType)
+sal_uInt16 SfxViewFrame::Count()
/* [Beschreibung]
- Liefert die Anzahl der sichtbaren <SfxViewFrame>-Instanzen vom Typ
- 'aType' bzw. aller sichtbaren, falls 'aType==0' (default).
+ Liefert die Anzahl der sichtbaren <SfxViewFrame>-Instanzen.
*/
{
@@ -1800,8 +1529,7 @@ sal_uInt16 SfxViewFrame::Count(TypeId aType)
for ( sal_uInt16 i = 0; i < nCount; ++i )
{
SfxViewFrame *pFrame = rFrames[i];
- if ( ( !aType || pFrame->IsA(aType) ) &&
- pFrame->IsVisible() )
+ if ( pFrame->IsVisible() )
++nFound;
}
return nFound;
@@ -1812,7 +1540,6 @@ sal_uInt16 SfxViewFrame::Count(TypeId aType)
SfxViewFrame* SfxViewFrame::GetFirst
(
const SfxObjectShell* pDoc,
- TypeId aType,
sal_Bool bOnlyIfVisible
)
{
@@ -1823,9 +1550,9 @@ SfxViewFrame* SfxViewFrame::GetFirst
for ( sal_uInt16 nPos = 0; nPos < rFrames.Count(); ++nPos )
{
SfxViewFrame *pFrame = rFrames.GetObject(nPos);
- if ( ( !pDoc || pDoc == pFrame->GetObjectShell() ) &&
- ( !aType || pFrame->IsA(aType) ) &&
- ( !bOnlyIfVisible || pFrame->IsVisible()) )
+ if ( ( !pDoc || pDoc == pFrame->GetObjectShell() )
+ && ( !bOnlyIfVisible || pFrame->IsVisible() )
+ )
return pFrame;
}
@@ -1838,7 +1565,6 @@ SfxViewFrame* SfxViewFrame::GetNext
(
const SfxViewFrame& rPrev,
const SfxObjectShell* pDoc,
- TypeId aType,
sal_Bool bOnlyIfVisible
)
{
@@ -1855,9 +1581,9 @@ SfxViewFrame* SfxViewFrame::GetNext
for ( ++nPos; nPos < rFrames.Count(); ++nPos )
{
SfxViewFrame *pFrame = rFrames.GetObject(nPos);
- if ( ( !pDoc || pDoc == pFrame->GetObjectShell() ) &&
- ( !aType || pFrame->IsA(aType) ) &&
- ( !bOnlyIfVisible || pFrame->IsVisible()) )
+ if ( ( !pDoc || pDoc == pFrame->GetObjectShell() )
+ && ( !bOnlyIfVisible || pFrame->IsVisible() )
+ )
return pFrame;
}
return 0;
@@ -1890,7 +1616,7 @@ void SfxViewFrame::ShowStatusText( const String& /*rText*/)
/* OBSOLETE: If this is used, framework/uielement/progressbarwrapper.[h|c]xx &
framework/uielement/statusindicatorinterfacewrapper.[h|c]xx must be
extended to support a new interface to support ShowStatusText/HideStatusText
- SfxWorkWindow* pWorkWin = GetFrame()->GetWorkWindow_Impl();
+ SfxWorkWindow* pWorkWin = GetFrame().GetWorkWindow_Impl();
SfxStatusBarManager *pMgr = pWorkWin->GetStatusBarManager_Impl();
if ( pMgr )
{
@@ -1906,7 +1632,7 @@ void SfxViewFrame::HideStatusText()
/* OBSOLETE: If this is used, framework/uielement/progressbarwrapper.[h|c]xx &
framework/uielement/statusindicatorinterfacewrapper.[h|c]xx must be
extended to support a new interface to support ShowStatusText/HideStatusText
- SfxWorkWindow* pWorkWin = GetFrame()->GetWorkWindow_Impl();
+ SfxWorkWindow* pWorkWin = GetFrame().GetWorkWindow_Impl();
SfxStatusBarManager *pMgr = pWorkWin->GetStatusBarManager_Impl();
if ( pMgr )
pMgr->GetStatusBar()->ShowItems();
@@ -1981,7 +1707,7 @@ void SfxViewFrame::SetViewShell_Impl( SfxViewShell *pVSh )
SfxShell::SetViewShell_Impl( pVSh );
// Hack: InPlaceMode
- if ( pVSh && !pVSh->UseObjectSize() )
+ if ( pVSh )
pImp->bResizeInToOut = sal_False;
}
@@ -1991,21 +1717,10 @@ void SfxViewFrame::SetViewShell_Impl( SfxViewShell *pVSh )
Der ParentViewFrame ist der ViewFrame des Containers bei internem InPlace
*/
-void SfxViewFrame::SetParentViewFrame_Impl(SfxViewFrame *pFrame)
-{
- pImp->pParentViewFrame = pFrame;
-}
-
-//--------------------------------------------------------------------
-/*
- Beschreibung:
- Der ParentViewFrame ist der ViewFrame des Containers bei internem InPlace
-*/
-
//TODO/LATER: is it still necessary? is there a replacement for GetParentViewFrame_Impl?
SfxViewFrame* SfxViewFrame::GetParentViewFrame_Impl() const
{
- return pImp->pParentViewFrame;
+ return NULL;
}
//--------------------------------------------------------------------
@@ -2030,7 +1745,7 @@ void SfxViewFrame::DoAdjustPosSize( SfxViewShell *pSh,
const Point rPos, const Size &rSize )
{
DBG_CHKTHIS(SfxViewFrame, 0);
- if( pSh && !nAdjustPosPixelLock && pSh->UseObjectSize())
+ if( pSh && !nAdjustPosPixelLock )
{
Window *pWindow = pSh->GetWindow();
Point aPos = pWindow->LogicToPixel(rPos);
@@ -2063,7 +1778,7 @@ void SfxViewFrame::Enable( sal_Bool bEnable )
}
else
{
- Window *pWindow = &GetFrame()->GetTopFrame()->GetWindow();
+ Window *pWindow = &GetFrame().GetTopFrame().GetWindow();
if ( !bEnable )
pImp->bWindowWasEnabled = pWindow->IsInputEnabled();
if ( !bEnable || pImp->bWindowWasEnabled )
@@ -2113,7 +1828,7 @@ void SfxViewFrame::Show()
LockObjectShell_Impl( sal_True );
// Doc-Shell Titel-Nummer anpassen, get unique view-no
- if ( 0 == pImp->nDocViewNo && !(GetFrameType() & SFXFRAME_PLUGIN ) )
+ if ( 0 == pImp->nDocViewNo )
{
GetDocNumber_Impl();
UpdateTitle();
@@ -2124,12 +1839,12 @@ void SfxViewFrame::Show()
// Frame-Window anzeigen, aber nur wenn der ViewFrame kein eigenes Window
// hat oder wenn er keine Component enth"alt
- if ( &GetWindow() == &GetFrame()->GetWindow() || !GetFrame()->HasComponent() )
+ if ( &GetWindow() == &GetFrame().GetWindow() || !GetFrame().HasComponent() )
GetWindow().Show();
- GetFrame()->GetWindow().Show();
+ GetFrame().GetWindow().Show();
/* SfxViewFrame* pCurrent = SfxViewFrame::Current();
- if ( GetFrame()->GetFrameInterface()->isActive() &&
+ if ( GetFrame().GetFrameInterface()->isActive() &&
pCurrent != this &&
( !pCurrent || pCurrent->GetParentViewFrame_Impl() != this ) &&
!GetActiveChildFrame_Impl() )
@@ -2144,8 +1859,6 @@ void SfxViewFrame::Show()
//--------------------------------------------------------------------
sal_Bool SfxViewFrame::IsVisible() const
{
- //Window *pWin = pImp->bInCtor ? 0 : &GetWindow();
- //return GetFrame()->HasComponent() || pImp->bObjLocked || ( pWin && pWin->IsVisible() );
return pImp->bObjLocked;
}
@@ -2170,7 +1883,7 @@ void SfxViewFrame::LockObjectShell_Impl( sal_Bool bLock )
//--------------------------------------------------------------------
void SfxViewFrame::MakeActive_Impl( BOOL bGrabFocus )
{
- if ( GetViewShell() && !GetFrame()->IsClosing_Impl() )
+ if ( GetViewShell() && !GetFrame().IsClosing_Impl() )
{
if ( IsVisible() )
{
@@ -2189,7 +1902,7 @@ void SfxViewFrame::MakeActive_Impl( BOOL bGrabFocus )
}
SfxViewFrame* pCurrent = SfxViewFrame::Current();
- css::uno::Reference< css::frame::XFrame > xFrame = GetFrame()->GetFrameInterface();
+ css::uno::Reference< css::frame::XFrame > xFrame = GetFrame().GetFrameInterface();
if ( !bPreview )
{
SetViewFrame( this );
@@ -2205,7 +1918,7 @@ void SfxViewFrame::MakeActive_Impl( BOOL bGrabFocus )
SfxInPlaceClient *pCli = GetViewShell()->GetUIActiveClient();
if ( ( !pCli || !pCli->IsObjectUIActive() ) &&
( !pCurrent || pCurrent->GetParentViewFrame_Impl() != this ) )
- GetFrame()->GrabFocusOnComponent_Impl();
+ GetFrame().GrabFocusOnComponent_Impl();
}
}
else
@@ -2219,89 +1932,6 @@ void SfxViewFrame::MakeActive_Impl( BOOL bGrabFocus )
}
}
-//--------------------------------------------------------------------
-
-SfxViewShell* SfxViewFrame::CreateView_Impl( sal_uInt16 nViewId )
-
-/* [Beschreibung]
-
- Erzeugt eine SfxViewShell f"ur diesen SfxViewFrame. Wird auch aus
- <SfxObjectShell::LoadWindows_Impl()>
- gerufen.
-*/
-
-{
- DBG_ASSERT( GetObjectShell(), "Kein Dokument!" );
-
- LockAdjustPosSizePixel();
-
- // passende ::com::sun::star::sdbcx::View-Factory suchen
- SfxObjectFactory &rDocFact = GetObjectShell()->GetFactory();
- sal_uInt16 nNewNo = nViewId ? USHRT_MAX : 0;
- for ( sal_uInt16 nNo = 0;
- nNo < rDocFact.GetViewFactoryCount();
- ++nNo )
- {
- sal_uInt16 nFoundId = rDocFact.GetViewFactory(nNo).GetOrdinal();
- if ( nNewNo == USHRT_MAX )
- {
- if ( nViewId == nFoundId )
- nNewNo = nNo;
- }
- }
-
- // per Factory erzeugen
- GetBindings().ENTERREGISTRATIONS();
- SfxViewFactory &rViewFactory = rDocFact.GetViewFactory( nNewNo );
- SfxViewShell *pViewShell = rViewFactory.CreateInstance(this, 0);
- SetViewShell_Impl(pViewShell);
- UnlockAdjustPosSizePixel();
-
- if ( GetWindow().IsReallyVisible() )
- DoAdjustPosSizePixel(pViewShell, Point(), GetWindow().GetOutputSizePixel());
-
- // erste jetzt anzeigen (ausser wenn MTs BASIC-IDE mal wieder keins hat)
- Window *pViewWin = pViewShell->GetWindow();
- if ( pViewWin && pViewShell->IsShowView_Impl() )
- pViewWin->Show();
-
- // Dispatcher
- GetDispatcher()->Push( *pViewShell );
- if ( pViewShell->GetSubShell() )
- GetDispatcher()->Push( *pViewShell->GetSubShell() );
- pViewShell->PushSubShells_Impl();
-
-#if defined SFX_HINT_VIEWCREATED
- GetObjectShell()->Broadcast( SfxSimpleHint( SFX_HINT_VIEWCREATED ) );
-#endif
-
- GetBindings().LEAVEREGISTRATIONS();
-
- DBG_ASSERT( SFX_APP()->GetViewFrames_Impl().Count() == SFX_APP()->GetViewShells_Impl().Count(), "Inconsistent view arrays!" );
- return pViewShell;
-}
-
-//-------------------------------------------------------------------------
-SfxViewFrame* SfxViewFrame::SearchViewFrame( SfxViewFrame *pViewFrame,
- const String& rName )
-{
- if ( !pViewFrame )
- pViewFrame = SfxViewFrame::Current();
- if ( !pViewFrame )
- return NULL;
- SfxFrame *pFrame = pViewFrame->GetFrame()->SearchFrame( rName );
- if ( !pFrame )
- return NULL;
-
- // Der Frame ist selbst ein ViewFrame oder enth"alt einen
-/*
- pViewFrame = PTR_CAST( SfxViewFrame, pFrame );
- if ( !pViewFrame && pFrame->GetChildFrameCount() )
- pViewFrame = PTR_CAST( SfxViewFrame, pFrame->GetChildFrame(0) );
-*/
- return pFrame->GetCurrentViewFrame();
-}
-
//-------------------------------------------------------------------------
void SfxViewFrame::SetQuietMode_Impl( sal_Bool bOn )
@@ -2316,11 +1946,6 @@ SfxObjectShell* SfxViewFrame::GetObjectShell()
return xObjSh;
}
-void SfxViewFrame::SetMargin_Impl( const Size& rMargin )
-{
- pImp->aMargin = rMargin;
-}
-
const Size& SfxViewFrame::GetMargin_Impl() const
{
return pImp->aMargin;
@@ -2335,10 +1960,10 @@ void SfxViewFrame::SetActiveChildFrame_Impl( SfxViewFrame *pViewFrame )
pImp->pActiveChild = pViewFrame;
- Reference< XFramesSupplier > xFrame( GetFrame()->GetFrameInterface(), UNO_QUERY );
+ Reference< XFramesSupplier > xFrame( GetFrame().GetFrameInterface(), UNO_QUERY );
Reference< XFrame > xActive;
if ( pViewFrame )
- xActive = pViewFrame->GetFrame()->GetFrameInterface();
+ xActive = pViewFrame->GetFrame().GetFrameInterface();
if ( xFrame.is() ) // PB: #74432# xFrame cann be NULL
xFrame->setActiveFrame( xActive );
@@ -2367,20 +1992,181 @@ SfxViewFrame* SfxViewFrame::GetActiveChildFrame_Impl() const
}
//--------------------------------------------------------------------
+SfxViewFrame* SfxViewFrame::LoadViewIntoFrame_Impl_NoThrow( const SfxObjectShell& i_rDoc, const Reference< XFrame >& i_rFrame,
+ const USHORT i_nViewId, const bool i_bHidden )
+{
+ Reference< XFrame > xFrame( i_rFrame );
+ bool bOwnFrame = false;
+ SfxViewShell* pSuccessView = NULL;
+ try
+ {
+ if ( !xFrame.is() )
+ {
+ ::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() );
+ Reference < XFrame > xDesktop( aContext.createComponent( "com.sun.star.frame.Desktop" ), UNO_QUERY_THROW );
+ xFrame.set( xDesktop->findFrame( DEFINE_CONST_UNICODE("_blank"), 0 ), UNO_SET_THROW );
+ bOwnFrame = true;
+ }
+
+ pSuccessView = LoadViewIntoFrame_Impl(
+ i_rDoc,
+ xFrame,
+ Sequence< PropertyValue >(), // means "reuse existing model's args"
+ i_nViewId,
+ i_bHidden
+ );
+
+ if ( bOwnFrame && !i_bHidden )
+ {
+ // ensure the frame/window is visible
+ Reference< XWindow > xContainerWindow( xFrame->getContainerWindow(), UNO_SET_THROW );
+ xContainerWindow->setVisible( sal_True );
+ }
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+
+ if ( pSuccessView )
+ return pSuccessView->GetViewFrame();
+
+ if ( bOwnFrame )
+ {
+ try
+ {
+ xFrame->dispose();
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ }
+
+ return NULL;
+}
+
+//--------------------------------------------------------------------
+SfxViewShell* SfxViewFrame::LoadViewIntoFrame_Impl( const SfxObjectShell& i_rDoc, const Reference< XFrame >& i_rFrame,
+ const Sequence< PropertyValue >& i_rLoadArgs, const USHORT i_nViewId,
+ const bool i_bHidden )
+{
+ Reference< XModel > xDocument( i_rDoc.GetModel(), UNO_SET_THROW );
+
+ ::comphelper::NamedValueCollection aTransformLoadArgs( i_rLoadArgs.getLength() ? i_rLoadArgs : xDocument->getArgs() );
+ aTransformLoadArgs.put( "Model", xDocument );
+ if ( i_nViewId )
+ aTransformLoadArgs.put( "ViewId", sal_Int16( i_nViewId ) );
+ if ( i_bHidden )
+ aTransformLoadArgs.put( "Hidden", i_bHidden );
+ else
+ aTransformLoadArgs.remove( "Hidden" );
+
+ ::rtl::OUString sURL( xDocument->getURL() );
+ if ( !sURL.getLength() )
+ sURL = i_rDoc.GetFactory().GetFactoryURL();
+
+ Reference< XComponentLoader > xLoader( i_rFrame, UNO_QUERY_THROW );
+ xLoader->loadComponentFromURL( sURL, ::rtl::OUString::createFromAscii( "_self" ), 0,
+ aTransformLoadArgs.getPropertyValues() );
+
+ SfxViewShell* pViewShell = SfxViewShell::Get( i_rFrame->getController() );
+ ENSURE_OR_THROW( pViewShell,
+ "SfxViewFrame::LoadViewIntoFrame_Impl: loading an SFX doc into a frame resulted in a non-SFX view - quite impossible" );
+ return pViewShell;
+}
+
+//--------------------------------------------------------------------
+
+SfxViewFrame* SfxViewFrame::LoadHiddenDocument( SfxObjectShell& i_rDoc, const USHORT i_nViewId )
+{
+ return LoadViewIntoFrame_Impl_NoThrow( i_rDoc, Reference< XFrame >(), i_nViewId, true );
+}
+
+//--------------------------------------------------------------------
+
+SfxViewFrame* SfxViewFrame::LoadDocument( SfxObjectShell& i_rDoc, const USHORT i_nViewId )
+{
+ return LoadViewIntoFrame_Impl_NoThrow( i_rDoc, Reference< XFrame >(), i_nViewId, false );
+}
+
+//--------------------------------------------------------------------
+
+SfxViewFrame* SfxViewFrame::LoadDocumentIntoFrame( SfxObjectShell& i_rDoc, const Reference< XFrame >& i_rTargetFrame, const USHORT i_nViewId )
+{
+ return LoadViewIntoFrame_Impl_NoThrow( i_rDoc, i_rTargetFrame, i_nViewId, false );
+}
+
+//--------------------------------------------------------------------
+
+SfxViewFrame* SfxViewFrame::LoadDocumentIntoFrame( SfxObjectShell& i_rDoc, const SfxFrameItem* i_pFrameItem, const USHORT i_nViewId )
+{
+ return LoadViewIntoFrame_Impl_NoThrow( i_rDoc, i_pFrameItem && i_pFrameItem->GetFrame() ? i_pFrameItem->GetFrame()->GetFrameInterface() : NULL, i_nViewId, false );
+}
+
+//--------------------------------------------------------------------
+SfxViewFrame* SfxViewFrame::DisplayNewDocument( SfxObjectShell& i_rDoc, const SfxRequest& i_rCreateDocRequest, const USHORT i_nViewId )
+{
+ SFX_REQUEST_ARG( i_rCreateDocRequest, pFrameItem, SfxUnoFrameItem, SID_FILLFRAME, FALSE );
+ SFX_REQUEST_ARG( i_rCreateDocRequest, pHiddenItem, SfxBoolItem, SID_HIDDEN, FALSE );
+
+ return LoadViewIntoFrame_Impl_NoThrow(
+ i_rDoc,
+ pFrameItem ? pFrameItem->GetFrame() : NULL,
+ i_nViewId,
+ pHiddenItem ? pHiddenItem->GetValue() : false
+ );
+}
+
+//--------------------------------------------------------------------
+
+SfxViewFrame* SfxViewFrame::Get( const Reference< XController>& i_rController, const SfxObjectShell* i_pDoc )
+{
+ if ( !i_rController.is() )
+ return NULL;
+
+ const SfxObjectShell* pDoc = i_pDoc;
+ if ( !pDoc )
+ {
+ Reference< XModel > xDocument( i_rController->getModel() );
+ for ( pDoc = SfxObjectShell::GetFirst( 0, false );
+ pDoc;
+ pDoc = SfxObjectShell::GetNext( *pDoc, 0, false )
+ )
+ {
+ if ( pDoc->GetModel() == xDocument )
+ break;
+ }
+ }
+
+ SfxViewFrame* pViewFrame = NULL;
+ for ( pViewFrame = SfxViewFrame::GetFirst( pDoc, FALSE );
+ pViewFrame;
+ pViewFrame = SfxViewFrame::GetNext( *pViewFrame, pDoc, FALSE )
+ )
+ {
+ if ( pViewFrame->GetViewShell()->GetController() == i_rController )
+ break;
+ }
+
+ return pViewFrame;
+}
+
+//--------------------------------------------------------------------
sal_Bool SfxViewFrame::SwitchToViewShell_Impl
(
- sal_uInt16 nViewId, /* > 0
- Registrierungs-Id der ::com::sun::star::sdbcx::View, auf die umge-
+ sal_uInt16 nViewIdOrNo, /* > 0
+ Registrierungs-Id der View, auf die umge-
schaltet werden soll, bzw. die erstmalig
erzeugt werden soll.
== 0
- Es soll die Default-::com::sun::star::sdbcx::View verwendet werden. */
+ Es soll die Default-View verwendet werden. */
sal_Bool bIsIndex /* sal_True
- 'nViewId' ist keine Registrations-Id sondern
- ein ::com::sun::star::sdbcx::Index in die f"ur die in diesem
+ 'nViewIdOrNo' ist keine Registrations-Id sondern
+ ein Index in die f"ur die in diesem
<SfxViewFrame> dargestellte <SfxObjectShell>.
*/
)
@@ -2406,174 +2192,64 @@ sal_Bool SfxViewFrame::SwitchToViewShell_Impl
*/
{
- try{
- DBG_ASSERT( GetObjectShell(), "Kein Dokument!" );
-
- SfxObjectFactory &rDocFact = GetObjectShell()->GetFactory();
-
- // find index of old and new ViewShell
- sal_uInt16 nOldNo = USHRT_MAX, nNewNo = USHRT_MAX;
- bIsIndex |= 0 == nViewId;
- for ( sal_uInt16 nNo = 0; nNo < rDocFact.GetViewFactoryCount(); ++nNo )
- {
- sal_uInt16 nFoundId = rDocFact.GetViewFactory(nNo).GetOrdinal();
- if ( nNewNo == USHRT_MAX )
- {
- if ( bIsIndex && nViewId == nNo )
- {
- nNewNo = nNo;
- nViewId = nFoundId; // for nViewId == 0
- }
- else if ( !bIsIndex && nViewId == nFoundId )
- nNewNo = nNo;
- }
- if ( pImp->nCurViewId == nFoundId )
- nOldNo = nNo;
- }
-
- if ( nNewNo == USHRT_MAX )
+ try
{
- // unknown ID -> fall back to default
- sal_uInt16 nFoundId = rDocFact.GetViewFactory(0).GetOrdinal();
- nNewNo = 0;
- nViewId = nFoundId;
- if ( pImp->nCurViewId == nFoundId )
- nOldNo = 0;
- }
-
- SfxViewShell *pSh = GetViewShell();
+ ENSURE_OR_THROW( GetObjectShell() != NULL, "not possible without a document" );
- DBG_ASSERT( !pSh || nOldNo != USHRT_MAX, "old shell id not found" );
-
- // does a ViewShell exist already?
- SfxViewShell *pOldSh = pSh;
- if ( pOldSh )
- {
- // ask wether it can be closed
- if ( !pOldSh->PrepareClose() )
- return sal_False;
-
- // remove SubShells from Dispatcher before switching to new ViewShell
- pOldSh->PushSubShells_Impl( sal_False );
- sal_uInt16 nLevel = pDispatcher->GetShellLevel( *pOldSh );
- if ( nLevel )
+ // if we already have a view shell, remove it
+ SfxViewShell* pOldSh = GetViewShell();
+ OSL_PRECOND( pOldSh, "SfxViewFrame::SwitchToViewShell_Impl: that's called *switch* (not for *initial-load*) for a reason" );
+ if ( pOldSh )
{
- SfxShell *pSubShell = pDispatcher->GetShell( nLevel-1 );
- if ( pSubShell == pOldSh->GetSubShell() )
- //"real" SubShells are not deleted
- pDispatcher->Pop( *pSubShell, SFX_SHELL_POP_UNTIL );
- else
- // SubShells only known to Dispatcher must be deleted
- pDispatcher->Pop( *pSubShell, SFX_SHELL_POP_UNTIL | SFX_SHELL_POP_DELETE );
- }
-
- pDispatcher->Pop( *pOldSh );
- GetBindings().Invalidate( nOldNo + SID_VIEWSHELL0 );
- }
-
- // remember ViewID
- pImp->nCurViewId = nViewId;
- GetBindings().Invalidate( nNewNo + SID_VIEWSHELL0 );
-
- // create new ViewShell
- SfxViewFactory &rViewFactory = rDocFact.GetViewFactory( nNewNo );
- LockAdjustPosSizePixel();
-
- GetBindings().ENTERREGISTRATIONS();
- pSh = rViewFactory.CreateInstance(this, pOldSh);
-
- Window *pEditWin = pSh->GetWindow();
- DBG_ASSERT( !pEditWin || !pEditWin->IsReallyVisible(), "don`t show your ViewShell`s Window by yourself!" );
+ // ask wether it can be closed
+ if ( !pOldSh->PrepareClose( TRUE ) )
+ return sal_False;
- // by setting the ViewShell it is prevented that disposing the Controller will destroy this ViewFrame also
- GetDispatcher()->SetDisableFlags( 0 );
- SetViewShell_Impl(pSh);
-
- Reference < ::com::sun::star::awt::XWindow > xWindow(
- GetFrame()->GetWindow().GetComponentInterface(), UNO_QUERY );
- Reference < XFrame > xFrame( GetFrame()->GetFrameInterface() );
- if ( !pSh->GetController().is() )
- pSh->SetController( new SfxBaseController( pSh ) );
- Reference < XController > xController( pSh->GetController() );
- xFrame->setComponent( xWindow, xController );
-
- xController->attachFrame( xFrame );
- Reference < XModel > xModel( GetObjectShell()->GetModel() );
- if ( xModel.is() )
- {
- xController->attachModel( xModel );
- xModel->connectController( xController );
- xModel->setCurrentController( xController );
- }
-
- GetDispatcher()->Push( *pSh );
- if ( pSh->GetSubShell() )
- GetDispatcher()->Push( *pSh->GetSubShell() );
- pSh->PushSubShells_Impl();
- GetDispatcher()->Flush();
-
- if ( pImp->bRestoreView && pImp->aViewData.Len() )
- {
- // restore view data if required
- pSh->ReadUserData( pImp->aViewData, sal_True );
- pImp->bRestoreView = sal_False;
- }
+ // remove sub shells from Dispatcher before switching to new ViewShell
+ PopShellAndSubShells_Impl( *pOldSh );
+ }
- // create UI elements before size is set
- if ( SfxViewFrame::Current() == this )
- GetDispatcher()->Update_Impl( sal_True );
+ GetBindings().ENTERREGISTRATIONS();
+ LockAdjustPosSizePixel();
- // allow resize events to be processed
- UnlockAdjustPosSizePixel();
+ // ID of the new view
+ SfxObjectFactory& rDocFact = GetObjectShell()->GetFactory();
+ const USHORT nViewId = ( bIsIndex || !nViewIdOrNo ) ? rDocFact.GetViewFactory( nViewIdOrNo ).GetOrdinal() : nViewIdOrNo;
- Window* pFrameWin = &GetWindow();
- if ( pFrameWin != &GetFrame()->GetWindow() )
- pFrameWin->Show();
+ // create and load new ViewShell
+ SfxViewShell* pNewSh = LoadViewIntoFrame_Impl(
+ *GetObjectShell(),
+ GetFrame().GetFrameInterface(),
+ Sequence< PropertyValue >(), // means "reuse existing model's args"
+ nViewId,
+ false
+ );
- if ( GetWindow().IsReallyVisible() )
- DoAdjustPosSizePixel( pSh, Point(), GetWindow().GetOutputSizePixel() );
+ // allow resize events to be processed
+ UnlockAdjustPosSizePixel();
- if ( pEditWin && pSh->IsShowView_Impl() )
- pEditWin->Show();
+ if ( GetWindow().IsReallyVisible() )
+ DoAdjustPosSizePixel( pNewSh, Point(), GetWindow().GetOutputSizePixel() );
- GetBindings().LEAVEREGISTRATIONS();
- delete pOldSh;
+ GetBindings().LEAVEREGISTRATIONS();
+ delete pOldSh;
}
- catch ( com::sun::star::uno::Exception& )
+ catch ( const com::sun::star::uno::Exception& )
{
// the SfxCode is not able to cope with exceptions thrown while creating views
// the code will crash in the stack unwinding procedure, so we shouldn't let exceptions go through here
- DBG_ERROR("Exception in SwitchToViewShell_Impl - urgent issue. Please contact development!");
+ DBG_UNHANDLED_EXCEPTION();
+ return sal_False;
}
DBG_ASSERT( SFX_APP()->GetViewFrames_Impl().Count() == SFX_APP()->GetViewShells_Impl().Count(), "Inconsistent view arrays!" );
return sal_True;
}
-//--------------------------------------------------------------------
-
-void SfxViewFrame::SetViewData_Impl( sal_uInt16 nViewId, const String &rViewData )
-{
- pImp->bRestoreView = sal_True;
- pImp->nCurViewId = nViewId;
- pImp->aViewData = rViewData;
-}
//-------------------------------------------------------------------------
-String& SfxViewFrame::GetViewData_Impl()
+void SfxViewFrame::SetCurViewId_Impl( const USHORT i_nID )
{
- return pImp->aViewData;
-}
-
-//-------------------------------------------------------------------------
-sal_Bool SfxViewFrame::IsRestoreView_Impl() const
-{
- return pImp->bRestoreView;
-}
-
-//-------------------------------------------------------------------------
-void SfxViewFrame::SetRestoreView_Impl( sal_Bool bOn )
-{
- pImp->bRestoreView = bOn;
+ pImp->nCurViewId = i_nID;
}
//-------------------------------------------------------------------------
@@ -2611,58 +2287,17 @@ void SfxViewFrame::ExecView_Impl
break;
}
- case SID_FILLFRAME:
- {
- // Bei Mail etc. k"onnen die Frames nicht angesprochen werden
- SfxFrame *pParent = GetFrame()->GetParentFrame();
- if ( pParent && pParent->GetCurrentViewFrame()->
- GetViewShell()->IsImplementedAsFrameset_Impl() )
- break;
-
- SfxViewFrame *pRet = NULL;
- SFX_REQUEST_ARG(
- rReq, pItem, SfxStringItem, SID_FILLFRAME, sal_False );
- if ( pItem )
- {
- String aName( pItem->GetValue() );
- sal_uInt16 nFrame = (sal_uInt16) aName.ToInt32();
- if ( nFrame == 0 )
- nFrame = USHRT_MAX;
-
- SfxFrameIterator aIter( *GetFrame(), sal_False );
- SfxFrame *pFrame = aIter.FirstFrame();
- sal_uInt16 nActFrame = 1;
- while ( pFrame )
- {
- SfxViewFrame *pView = pFrame->GetCurrentViewFrame();
- if (
- nActFrame == nFrame ||
- (
- pView &&
- aName.CompareIgnoreCaseToAscii( pView->SfxShell::GetName() ) == COMPARE_EQUAL
- )
- )
- {
- pRet = pView;
- break;
- }
-
- pFrame = aIter.NextFrame( *pFrame );
- nActFrame++;
- }
- }
-
- rReq.SetReturnValue( SfxObjectItem( SID_DOCFRAME, pRet ) );
- break;
- }
-
case SID_VIEWSHELL:
{
const SfxPoolItem *pItem = 0;
- if ( rReq.GetArgs() &&
- SFX_ITEM_SET == rReq.GetArgs()->GetItemState( SID_VIEWSHELL, sal_False, &pItem ) )
- rReq.SetReturnValue( SfxBoolItem(0, SwitchToViewShell_Impl(
- (sal_uInt16)((const SfxUInt16Item*) pItem)->GetValue()) ));
+ if ( rReq.GetArgs()
+ && SFX_ITEM_SET == rReq.GetArgs()->GetItemState( SID_VIEWSHELL, sal_False, &pItem )
+ )
+ {
+ const sal_uInt16 nViewId = static_cast< const SfxUInt16Item* >( pItem )->GetValue();
+ BOOL bSuccess = SwitchToViewShell_Impl( nViewId );
+ rReq.SetReturnValue( SfxBoolItem( 0, bSuccess ) );
+ }
break;
}
@@ -2672,86 +2307,40 @@ void SfxViewFrame::ExecView_Impl
case SID_VIEWSHELL3:
case SID_VIEWSHELL4:
{
- rReq.SetReturnValue( SfxBoolItem(0,
- SwitchToViewShell_Impl( rReq.GetSlot() - SID_VIEWSHELL0, sal_True ) ) );
+ const sal_uInt16 nViewNo = rReq.GetSlot() - SID_VIEWSHELL0;
+ BOOL bSuccess = SwitchToViewShell_Impl( nViewNo, sal_True );
+ rReq.SetReturnValue( SfxBoolItem( 0, bSuccess ) );
break;
}
case SID_NEWWINDOW:
{
// Hack. demnaechst virtuelle Funktion
- if ( !GetViewShell()->NewWindowAllowed() && !GetObjectShell()->HasName() )
- return;
-
- // ViewData bei FrameSets rekursiv holen
- GetFrame()->GetViewData_Impl();
- SfxMedium *pMed = GetObjectShell()->GetMedium();
- String aUserData;
- GetViewShell()->WriteUserData( aUserData, sal_True );
if ( !GetViewShell()->NewWindowAllowed() )
{
- SFX_REQUEST_ARG( rReq, pFrameItem, SfxUnoAnyItem, SID_FILLFRAME, sal_False );
- SfxFrame *pFrame = NULL;
- Reference < XFrame > xFrame;
- if ( pFrameItem )
- {
- pFrameItem->GetValue() >>= xFrame;
- pFrame = SfxTopFrame::Create( xFrame );
- }
- else
- pFrame = SfxTopFrame::Create();
-
- SfxAllItemSet aSet( SFX_APP()->GetPool() );
- SFX_REQUEST_ARG( rReq, pHiddenItem, SfxBoolItem, SID_HIDDEN, sal_False );
- if ( pHiddenItem )
- aSet.Put( *pHiddenItem );
-
- SFX_ITEMSET_ARG( pMed->GetItemSet(), pRefererItem, SfxStringItem, SID_REFERER, sal_False );
- SfxStringItem aReferer( SID_REFERER, DEFINE_CONST_UNICODE( "private:user" ) );
- if ( !pRefererItem )
- pRefererItem = &aReferer;
-
- aSet.Put( SfxStringItem( SID_FILE_NAME, pMed->GetName() ) );
- aSet.Put( SfxStringItem( SID_USER_DATA, aUserData ) );
- aSet.Put( SfxUInt16Item( SID_VIEW_ID, GetCurViewId() ) );
- aSet.Put( *pRefererItem );
- if( pMed->GetFilter() )
- aSet.Put( SfxStringItem( SID_FILTER_NAME, pMed->GetFilter()->GetFilterName()) );
- aSet.Put( SfxFrameItem ( SID_DOCFRAME, pFrame ) );
- if ( xFrame.is() )
- GetDispatcher()->Execute( SID_OPENDOC, SFX_CALLMODE_SYNCHRON, aSet );
- else
- GetDispatcher()->Execute( SID_OPENDOC, SFX_CALLMODE_ASYNCHRON, aSet );
- }
- else
- {
- pMed->GetItemSet()->Put( SfxStringItem( SID_USER_DATA, aUserData ) );
-
- BOOL bHidden = FALSE;
- SFX_REQUEST_ARG( rReq, pHiddenItem, SfxBoolItem, SID_HIDDEN, sal_False );
- if ( pHiddenItem )
- bHidden = pHiddenItem->GetValue();
- SFX_REQUEST_ARG( rReq, pFrameItem, SfxUnoAnyItem, SID_FILLFRAME, sal_False );
- if ( pFrameItem )
- {
- Reference < XFrame > xFrame;
- pFrameItem->GetValue() >>= xFrame;
- SfxFrame* pFrame = SfxTopFrame::Create( xFrame );
- pMed->GetItemSet()->ClearItem( SID_HIDDEN );
- pFrame->InsertDocument( GetObjectShell() );
- if ( !bHidden )
- xFrame->getContainerWindow()->setVisible( sal_True );
- }
- else
- {
- SfxAllItemSet aSet( GetPool() );
- aSet.Put( SfxBoolItem( SID_OPEN_NEW_VIEW, TRUE ) );
- SfxFrame* pFrame = SfxTopFrame::Create( GetObjectShell(), GetCurViewId(), bHidden, &aSet );
- if ( bHidden )
- pFrame->GetCurrentViewFrame()->LockObjectShell_Impl( TRUE );
- }
+ OSL_ENSURE( false, "You should have disabled the 'Window/New Window' slot!" );
+ return;
}
+ // ViewData bei FrameSets rekursiv holen
+ GetFrame().GetViewData_Impl();
+ SfxMedium* pMed = GetObjectShell()->GetMedium();
+
+ // do not open the new window hidden
+ pMed->GetItemSet()->ClearItem( SID_HIDDEN );
+
+ // the view ID (optional arg. TODO: this is currently not supported in the slot definition ...)
+ SFX_REQUEST_ARG( rReq, pViewIdItem, SfxUInt16Item, SID_VIEW_ID, sal_False );
+ const USHORT nViewId = pViewIdItem ? pViewIdItem->GetValue() : GetCurViewId();
+
+ Reference < XFrame > xFrame;
+ // the frame (optional arg. TODO: this is currently not supported in the slot definition ...)
+ SFX_REQUEST_ARG( rReq, pFrameItem, SfxUnoFrameItem, SID_FILLFRAME, sal_False );
+ if ( pFrameItem )
+ xFrame = pFrameItem->GetFrame();
+
+ LoadViewIntoFrame_Impl_NoThrow( *GetObjectShell(), xFrame, nViewId, false );
+
rReq.Done();
break;
}
@@ -2915,13 +2504,10 @@ void SfxViewFrame::StateView_Impl
case SID_NEWWINDOW:
{
- if ( !GetViewShell()->NewWindowAllowed() /* && !pDocSh->HasName() */ )
- rSet.DisableItem( nWhich );
- else
- {
- if (impl_maxOpenDocCountReached())
- rSet.DisableItem( nWhich );
- }
+ if ( !GetViewShell()->NewWindowAllowed()
+ || impl_maxOpenDocCountReached()
+ )
+ rSet.DisableItem( nWhich );
break;
}
}
@@ -2930,22 +2516,9 @@ void SfxViewFrame::StateView_Impl
}
//-------------------------------------------------------------------------
-void SfxViewFrame::GetState_Impl( SfxItemSet &rSet )
-{
- if ( GetViewShell() && GetViewShell()->GetVerbs().getLength() && !GetObjectShell()->IsInPlaceActive() )
- {
- uno::Any aAny;
- aAny <<= GetViewShell()->GetVerbs();
- rSet.Put( SfxUnoAnyItem( USHORT( SID_OBJECT ), aAny ) );
- }
- else
- rSet.DisableItem( SID_OBJECT );
-}
-
-//-------------------------------------------------------------------------
void SfxViewFrame::ToTop()
{
- GetFrame()->Appear();
+ GetFrame().Appear();
}
//-------------------------------------------------------------------------
@@ -2955,66 +2528,41 @@ SfxViewFrame* SfxViewFrame::GetParentViewFrame() const
Der ParentViewFrame ist der ViewFrame des ParentFrames
*/
{
- SfxFrame *pFrame = GetFrame()->GetParentFrame();
+ SfxFrame *pFrame = GetFrame().GetParentFrame();
return pFrame ? pFrame->GetCurrentViewFrame() : NULL;
}
//-------------------------------------------------------------------------
-SfxFrame* SfxViewFrame::GetFrame() const
+SfxFrame& SfxViewFrame::GetFrame() const
/*
Beschreibung:
GetFrame liefert den Frame, in dem sich der ViewFrame befindet
*/
{
- return pImp->pFrame;
-}
-
-//-------------------------------------------------------------------------
-void SfxViewFrame::SetFrame_Impl( SfxFrame *pFrame )
-{
- pImp->pFrame = pFrame;
+ return pImp->rFrame;
}
//-------------------------------------------------------------------------
SfxViewFrame* SfxViewFrame::GetTopViewFrame() const
{
- return GetFrame()->GetTopFrame()->GetCurrentViewFrame();
-}
-
-//-------------------------------------------------------------------------
-
-SfxCancelManager *SfxViewFrame::GetCancelManager() const
-
-/* <H3>Description</H3>
-
- Returns a pointer to the <SfxCancelManager> of the top-view-frame of
- this view-frame.
-*/
-
-{
- return GetTopViewFrame()->GetFrame()->GetCancelManager();
-}
-
-void SfxViewFrame::SetWindow_Impl( Window *pWin )
-{
- pImp->pWindow = pWin;
+ return GetFrame().GetTopFrame().GetCurrentViewFrame();
}
Window& SfxViewFrame::GetWindow() const
{
- return pImp->pWindow ? *pImp->pWindow : GetFrame()->GetWindow();
+ return pImp->pWindow ? *pImp->pWindow : GetFrame().GetWindow();
}
sal_Bool SfxViewFrame::DoClose()
{
- return GetFrame()->DoClose();
+ return GetFrame().DoClose();
}
String SfxViewFrame::GetActualPresentationURL_Impl() const
{
if ( xObjSh.Is() )
return xObjSh->GetMedium()->GetName();
- return pImp->aActualPresentationURL;
+ return String();
}
void SfxViewFrame::SetModalMode( sal_Bool bModal )
@@ -3031,7 +2579,7 @@ void SfxViewFrame::SetModalMode( sal_Bool bModal )
BOOL SfxViewFrame::IsInModalMode() const
{
- return pImp->bModal || GetFrame()->GetWindow().IsInModalMode();
+ return pImp->bModal || GetFrame().GetWindow().IsInModalMode();
}
void SfxViewFrame::Resize( BOOL bForce )
@@ -3043,18 +2591,14 @@ void SfxViewFrame::Resize( BOOL bForce )
SfxViewShell *pShell = GetViewShell();
if ( pShell )
{
- if ( GetFrame()->IsInPlace() )
+ if ( GetFrame().IsInPlace() )
{
Point aPoint = GetWindow().GetPosPixel();
DoAdjustPosSizePixel( pShell, aPoint, aSize );
}
else
{
- if ( pShell->UseObjectSize() )
- ForceOuterResize_Impl(TRUE);
DoAdjustPosSizePixel( pShell, Point(), aSize );
- if ( pShell->UseObjectSize() )
- ForceOuterResize_Impl(FALSE);
}
}
}
@@ -3327,7 +2871,7 @@ void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq )
// try to find any active recorder on this frame
::rtl::OUString sProperty = rtl::OUString::createFromAscii("DispatchRecorderSupplier");
com::sun::star::uno::Reference< com::sun::star::frame::XFrame > xFrame(
- GetFrame()->GetFrameInterface(),
+ GetFrame().GetFrameInterface(),
com::sun::star::uno::UNO_QUERY);
com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > xSet(xFrame,com::sun::star::uno::UNO_QUERY);
@@ -3392,7 +2936,7 @@ void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq )
case SID_TOGGLESTATUSBAR:
{
com::sun::star::uno::Reference< com::sun::star::frame::XFrame > xFrame(
- GetFrame()->GetFrameInterface(),
+ GetFrame().GetFrameInterface(),
com::sun::star::uno::UNO_QUERY);
Reference< com::sun::star::beans::XPropertySet > xPropSet( xFrame, UNO_QUERY );
@@ -3439,14 +2983,14 @@ void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq )
case SID_WIN_FULLSCREEN:
{
SFX_REQUEST_ARG(rReq, pItem, SfxBoolItem, rReq.GetSlot(), FALSE);
- SfxTopViewFrame *pTop= PTR_CAST( SfxTopViewFrame, GetTopViewFrame() );
+ SfxViewFrame *pTop = GetTopViewFrame();
if ( pTop )
{
- WorkWindow* pWork = (WorkWindow*) pTop->GetTopFrame_Impl()->GetTopWindow_Impl();
+ WorkWindow* pWork = (WorkWindow*) pTop->GetFrame().GetTopWindow_Impl();
if ( pWork )
{
com::sun::star::uno::Reference< com::sun::star::frame::XFrame > xFrame(
- GetFrame()->GetFrameInterface(),
+ GetFrame().GetFrameInterface(),
com::sun::star::uno::UNO_QUERY);
Reference< ::com::sun::star::beans::XPropertySet > xPropSet( xFrame, UNO_QUERY );
@@ -3481,7 +3025,7 @@ void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq )
}
pWork->ShowFullScreenMode( bNewFullScreenMode );
pWork->SetMenuBarMode( bNewFullScreenMode ? MENUBAR_MODE_HIDE : MENUBAR_MODE_NORMAL );
- GetFrame()->GetWorkWindow_Impl()->SetFullScreen_Impl( bNewFullScreenMode );
+ GetFrame().GetWorkWindow_Impl()->SetFullScreen_Impl( bNewFullScreenMode );
if ( !pItem )
rReq.AppendItem( SfxBoolItem( SID_WIN_FULLSCREEN, bNewFullScreenMode ) );
rReq.Done();
@@ -3535,7 +3079,7 @@ void SfxViewFrame::MiscState_Impl(SfxItemSet &rSet)
::rtl::OUString sProperty = rtl::OUString::createFromAscii("DispatchRecorderSupplier");
com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > xSet(
- GetFrame()->GetFrameInterface(),
+ GetFrame().GetFrameInterface(),
com::sun::star::uno::UNO_QUERY);
com::sun::star::uno::Any aProp = xSet->getPropertyValue(sProperty);
@@ -3558,7 +3102,7 @@ void SfxViewFrame::MiscState_Impl(SfxItemSet &rSet)
::rtl::OUString sProperty = rtl::OUString::createFromAscii("DispatchRecorderSupplier");
com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > xSet(
- GetFrame()->GetFrameInterface(),
+ GetFrame().GetFrameInterface(),
com::sun::star::uno::UNO_QUERY);
com::sun::star::uno::Any aProp = xSet->getPropertyValue(sProperty);
@@ -3572,7 +3116,7 @@ void SfxViewFrame::MiscState_Impl(SfxItemSet &rSet)
{
com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManager > xLayoutManager;
com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > xSet(
- GetFrame()->GetFrameInterface(),
+ GetFrame().GetFrameInterface(),
com::sun::star::uno::UNO_QUERY);
com::sun::star::uno::Any aProp = xSet->getPropertyValue(
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LayoutManager" )) );
@@ -3590,10 +3134,10 @@ void SfxViewFrame::MiscState_Impl(SfxItemSet &rSet)
case SID_WIN_FULLSCREEN:
{
- SfxTopViewFrame *pTop= PTR_CAST( SfxTopViewFrame, GetTopViewFrame() );
+ SfxViewFrame* pTop = GetTopViewFrame();
if ( pTop )
{
- WorkWindow* pWork = (WorkWindow*) pTop->GetTopFrame_Impl()->GetTopWindow_Impl();
+ WorkWindow* pWork = (WorkWindow*) pTop->GetFrame().GetTopWindow_Impl();
if ( pWork )
{
rSet.Put( SfxBoolItem( nWhich, pWork->IsFullScreenMode() ) );
@@ -3642,7 +3186,7 @@ void SfxViewFrame::ChildWindowExecute( SfxRequest &rReq )
{
if (!SvtModuleOptions().IsModuleInstalled(SvtModuleOptions::E_SDATABASE))
return;
- Reference < XFrame > xFrame = GetFrame()->GetTopFrame()->GetFrameInterface();
+ Reference < XFrame > xFrame = GetFrame().GetTopFrame().GetFrameInterface();
Reference < XFrame > xBeamer( xFrame->findFrame( DEFINE_CONST_UNICODE("_beamer"), FrameSearchFlag::CHILDREN ) );
BOOL bShow = FALSE;
BOOL bHasChild = xBeamer.is();
@@ -3743,7 +3287,7 @@ void SfxViewFrame::ChildWindowState( SfxItemSet& rState )
}
else if ( nSID == SID_BROWSER )
{
- Reference < XFrame > xFrame = GetFrame()->GetTopFrame()->GetFrameInterface()->
+ Reference < XFrame > xFrame = GetFrame().GetTopFrame().GetFrameInterface()->
findFrame( DEFINE_CONST_UNICODE("_beamer"), FrameSearchFlag::CHILDREN );
if ( !xFrame.is() )
rState.DisableItem( nSID );
@@ -3761,7 +3305,7 @@ void SfxViewFrame::ChildWindowState( SfxItemSet& rState )
SfxWorkWindow* SfxViewFrame::GetWorkWindow_Impl( USHORT /*nId*/ )
{
SfxWorkWindow* pWork = 0;
- pWork = GetFrame()->GetWorkWindow_Impl();
+ pWork = GetFrame().GetWorkWindow_Impl();
return pWork;
}
@@ -3823,11 +3367,6 @@ SfxChildWindow* SfxViewFrame::GetChildWindow(USHORT nId)
return pWork ? pWork->GetChildWindow_Impl(nId) : NULL;
}
-SfxMacro* SfxViewFrame::GetRecordingMacro_Impl()
-{
- return pImp->pMacro;
-}
-
void SfxViewFrame::UpdateDocument_Impl()
{
SfxObjectShell* pDoc = GetObjectShell();
@@ -3838,29 +3377,6 @@ void SfxViewFrame::UpdateDocument_Impl()
pDoc->UpdateFromTemplate_Impl();
}
-BOOL SfxViewFrame::ClearEventFlag_Impl()
-{
- if ( pImp->bEventFlag )
- {
- pImp->bEventFlag = FALSE;
- return TRUE;
- }
- else
- return FALSE;
-}
-
-SfxViewFrame* SfxViewFrame::CreateViewFrame( SfxObjectShell& rDoc, sal_uInt16 nViewId, sal_Bool bHidden )
-{
- SfxItemSet *pSet = rDoc.GetMedium()->GetItemSet();
- if ( nViewId )
- pSet->Put( SfxUInt16Item( SID_VIEW_ID, nViewId ) );
- if ( bHidden )
- pSet->Put( SfxBoolItem( SID_HIDDEN, sal_True ) );
-
- SfxFrame *pFrame = SfxTopFrame::Create( &rDoc, 0, bHidden );
- return pFrame->GetCurrentViewFrame();
-}
-
void SfxViewFrame::SetViewFrame( SfxViewFrame* pFrame )
{
SFX_APP()->SetViewFrame_Impl( pFrame );
diff --git a/sfx2/source/view/viewfrm2.cxx b/sfx2/source/view/viewfrm2.cxx
new file mode 100644
index 000000000000..480b5307df2e
--- /dev/null
+++ b/sfx2/source/view/viewfrm2.cxx
@@ -0,0 +1,523 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sfx2.hxx"
+
+#include "impviewframe.hxx"
+#include "statcach.hxx"
+#include "viewfac.hxx"
+#include "workwin.hxx"
+
+#include "sfx2/app.hxx"
+#include "sfx2/bindings.hxx"
+#include "sfx2/ctrlitem.hxx"
+#include "sfx2/dispatch.hxx"
+#include "sfx2/docfac.hxx"
+#include "sfx2/docfile.hxx"
+#include "sfx2/objitem.hxx"
+#include "sfx2/objsh.hxx"
+#include "sfx2/request.hxx"
+#include "sfx2/viewfrm.hxx"
+#include "sfx2/viewsh.hxx"
+
+#include <com/sun/star/beans/NamedValue.hpp>
+#include <com/sun/star/beans/XMaterialHolder.hpp>
+#include <com/sun/star/util/XCloseable.hpp>
+
+#include <comphelper/componentcontext.hxx>
+#include <comphelper/namedvaluecollection.hxx>
+#include <comphelper/processfactory.hxx>
+#include <svtools/asynclink.hxx>
+#include <svl/eitem.hxx>
+#include <svl/intitem.hxx>
+#include <svl/rectitem.hxx>
+#include <svl/stritem.hxx>
+#include <tools/diagnose_ex.h>
+#include <tools/urlobj.hxx>
+#include <unotools/bootstrap.hxx>
+#include <unotools/configmgr.hxx>
+#include <vcl/window.hxx>
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::frame;
+using namespace ::com::sun::star::util;
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::beans;
+using ::com::sun::star::lang::XMultiServiceFactory;
+using ::com::sun::star::lang::XComponent;
+
+//------------------------------------------------------------------------
+
+static ::rtl::OUString GetModuleName_Impl( const ::rtl::OUString& sDocService )
+{
+ uno::Reference< container::XNameAccess > xMM( ::comphelper::getProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.frame.ModuleManager")), uno::UNO_QUERY );
+ ::rtl::OUString sVar;
+ if ( !xMM.is() )
+ return sVar;
+
+ try
+ {
+ ::comphelper::NamedValueCollection aAnalyzer( xMM->getByName( sDocService ) );
+ sVar = aAnalyzer.getOrDefault( "ooSetupFactoryUIName", ::rtl::OUString() );
+ }
+ catch( uno::Exception& )
+ {
+ sVar = ::rtl::OUString();
+ }
+
+ return sVar;
+}
+
+//--------------------------------------------------------------------
+void SfxFrameViewWindow_Impl::StateChanged( StateChangedType nStateChange )
+{
+ if ( nStateChange == STATE_CHANGE_INITSHOW )
+ {
+ SfxObjectShell* pDoc = pFrame->GetObjectShell();
+ if ( pDoc && !pFrame->IsVisible() )
+ pFrame->Show();
+
+ pFrame->Resize();
+ }
+ else
+ Window::StateChanged( nStateChange );
+}
+
+void SfxFrameViewWindow_Impl::Resize()
+{
+ if ( IsReallyVisible() || IsReallyShown() || GetOutputSizePixel().Width() )
+ pFrame->Resize();
+}
+
+static String _getTabString()
+{
+ String result;
+
+ Reference < XMaterialHolder > xHolder(
+ ::comphelper::getProcessServiceFactory()->createInstance(
+ DEFINE_CONST_UNICODE("com.sun.star.tab.tabreg") ), UNO_QUERY );
+ if (xHolder.is())
+ {
+ rtl::OUString aTabString;
+ Sequence< NamedValue > sMaterial;
+ if (xHolder->getMaterial() >>= sMaterial) {
+ for (int i=0; i < sMaterial.getLength(); i++) {
+ if ((sMaterial[i].Name.equalsAscii("title")) &&
+ (sMaterial[i].Value >>= aTabString))
+ {
+ result += ' ';
+ result += String(aTabString);
+ }
+ }
+ }
+ }
+ return result;
+}
+
+//========================================================================
+
+//--------------------------------------------------------------------
+String SfxViewFrame::UpdateTitle()
+
+/* [Beschreibung]
+
+ Mit dieser Methode kann der SfxViewFrame gezwungen werden, sich sofort
+ den neuen Titel vom der <SfxObjectShell> zu besorgen.
+
+ [Anmerkung]
+
+ Dies ist z.B. dann notwendig, wenn man der SfxObjectShell als SfxListener
+ zuh"ort und dort auf den <SfxSimpleHint> SFX_HINT_TITLECHANGED reagieren
+ m"ochte, um dann die Titel seiner Views abzufragen. Diese Views (SfxTopViewFrames)
+ jedoch sind ebenfalls SfxListener und da die Reihenfolge der Benachrichtigung
+ nicht feststeht, mu\s deren Titel-Update vorab erzwungen werden.
+
+
+ [Beispiel]
+
+ void SwDocShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
+ {
+ if ( rHint.IsA(TYPE(SfxSimpleHint)) )
+ {
+ switch( ( (SfxSimpleHint&) rHint ).GetId() )
+ {
+ case SFX_HINT_TITLECHANGED:
+ for ( SfxViewFrame *pTop = SfxViewFrame::GetFirst( this );
+ pTop;
+ pTop = SfxViewFrame::GetNext( this );
+ {
+ pTop->UpdateTitle();
+ ... pTop->GetName() ...
+ }
+ break;
+ ...
+ }
+ }
+ }
+*/
+
+{
+ DBG_CHKTHIS(SfxViewFrame, 0);
+
+ const SfxObjectFactory &rFact = GetObjectShell()->GetFactory();
+ pImp->aFactoryName = String::CreateFromAscii( rFact.GetShortName() );
+
+ SfxObjectShell *pObjSh = GetObjectShell();
+ if ( !pObjSh )
+ return String();
+
+// if ( pObjSh->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
+// // kein UpdateTitle mit Embedded-ObjectShell
+// return String();
+
+ const SfxMedium *pMedium = pObjSh->GetMedium();
+ String aURL;
+ GetFrame(); // -Wall required??
+ if ( pObjSh->HasName() )
+ {
+ INetURLObject aTmp( pMedium->GetName() );
+ aURL = aTmp.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET );
+ }
+
+ if ( aURL != pImp->aActualURL )
+ // URL hat sich ge"andert
+ pImp->aActualURL = aURL;
+
+ // gibt es noch eine weitere View?
+ sal_uInt16 nViews=0;
+ for ( SfxViewFrame *pView= GetFirst(pObjSh);
+ pView && nViews<2;
+ pView = GetNext(*pView,pObjSh) )
+ if ( ( pView->GetFrameType() & SFXFRAME_HASTITLE ) &&
+ !IsDowning_Impl())
+ nViews++;
+
+ // Titel des Fensters
+ String aTitle;
+ if ( nViews == 2 || pImp->nDocViewNo > 1 )
+ // dann die Nummer dranh"angen
+ aTitle = pObjSh->UpdateTitle( NULL, pImp->nDocViewNo );
+ else
+ aTitle = pObjSh->UpdateTitle();
+
+ // Name des SbxObjects
+ String aSbxName = pObjSh->SfxShell::GetName();
+ if ( IsVisible() )
+ {
+ aSbxName += ':';
+ aSbxName += String::CreateFromInt32(pImp->nDocViewNo);
+ }
+
+ SetName( aSbxName );
+ pImp->aFrameTitle = aTitle;
+ GetBindings().Invalidate( SID_FRAMETITLE );
+ GetBindings().Invalidate( SID_CURRENT_URL );
+
+ ::rtl::OUString aProductName;
+ ::utl::ConfigManager::GetDirectConfigProperty(::utl::ConfigManager::PRODUCTNAME) >>= aProductName;
+
+ aTitle += String::CreateFromAscii( " - " );
+ aTitle += String(aProductName);
+ aTitle += ' ';
+ ::rtl::OUString aDocServiceName( GetObjectShell()->GetFactory().GetDocumentServiceName() );
+ aTitle += String( GetModuleName_Impl( aDocServiceName ) );
+#ifdef DBG_UTIL
+ ::rtl::OUString aDefault;
+ aTitle += DEFINE_CONST_UNICODE(" [");
+ String aVerId( utl::Bootstrap::getBuildIdData( aDefault ));
+ aTitle += aVerId;
+ aTitle += ']';
+#endif
+
+ // append TAB string if available
+ aTitle += _getTabString();
+
+ GetBindings().Invalidate( SID_NEWDOCDIRECT );
+
+ /* AS_TITLE
+ Window* pWindow = GetFrame()->GetTopWindow_Impl();
+ if ( pWindow && pWindow->GetText() != aTitle )
+ pWindow->SetText( aTitle );
+ */
+ return aTitle;
+}
+
+void SfxViewFrame::Exec_Impl(SfxRequest &rReq )
+{
+ // Wenn gerade die Shells ausgetauscht werden...
+ if ( !GetObjectShell() || !GetViewShell() )
+ return;
+
+ switch ( rReq.GetSlot() )
+ {
+ case SID_SHOWPOPUPS :
+ {
+ SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, SID_SHOWPOPUPS, FALSE);
+ BOOL bShow = pShowItem ? pShowItem->GetValue() : TRUE;
+ SFX_REQUEST_ARG(rReq, pIdItem, SfxUInt16Item, SID_CONFIGITEMID, FALSE);
+ USHORT nId = pIdItem ? pIdItem->GetValue() : 0;
+
+ // ausfuehren
+ SfxWorkWindow *pWorkWin = GetFrame().GetWorkWindow_Impl();
+ if ( bShow )
+ {
+ // Zuerst die Floats auch anzeigbar machen
+ pWorkWin->MakeChildsVisible_Impl( bShow );
+ GetDispatcher()->Update_Impl( TRUE );
+
+ // Dann anzeigen
+ GetBindings().HidePopups( !bShow );
+ }
+ else
+ {
+ // Alles hiden
+ SfxBindings *pBind = &GetBindings();
+ while ( pBind )
+ {
+ pBind->HidePopupCtrls_Impl( !bShow );
+ pBind = pBind->GetSubBindings_Impl();
+ }
+
+ pWorkWin->HidePopups_Impl( !bShow, TRUE, nId );
+ pWorkWin->MakeChildsVisible_Impl( bShow );
+ }
+
+ Invalidate( rReq.GetSlot() );
+ rReq.Done();
+ break;
+ }
+
+ case SID_ACTIVATE:
+ {
+ MakeActive_Impl( TRUE );
+ rReq.SetReturnValue( SfxObjectItem( 0, this ) );
+ break;
+ }
+
+ case SID_NEWDOCDIRECT :
+ {
+ SFX_REQUEST_ARG( rReq, pFactoryItem, SfxStringItem, SID_NEWDOCDIRECT, FALSE);
+ String aFactName;
+ if ( pFactoryItem )
+ aFactName = pFactoryItem->GetValue();
+ else if ( pImp->aFactoryName.Len() )
+ aFactName = pImp->aFactoryName;
+ else
+ {
+ DBG_ERROR("Missing argument!");
+ break;
+ }
+
+ SfxRequest aReq( SID_OPENDOC, SFX_CALLMODE_SYNCHRON, GetPool() );
+ String aFact = String::CreateFromAscii("private:factory/");
+ aFact += aFactName;
+ aReq.AppendItem( SfxStringItem( SID_FILE_NAME, aFact ) );
+ aReq.AppendItem( SfxFrameItem( SID_DOCFRAME, &GetFrame() ) );
+ aReq.AppendItem( SfxStringItem( SID_TARGETNAME, String::CreateFromAscii( "_blank" ) ) );
+ SFX_APP()->ExecuteSlot( aReq );
+ const SfxViewFrameItem* pItem = PTR_CAST( SfxViewFrameItem, aReq.GetReturnValue() );
+ if ( pItem )
+ rReq.SetReturnValue( SfxFrameItem( 0, pItem->GetFrame() ) );
+ break;
+ }
+
+ case SID_CLOSEWIN:
+ {
+ // disable CloseWin, if frame is not a task
+ Reference < XCloseable > xTask( GetFrame().GetFrameInterface(), UNO_QUERY );
+ if ( !xTask.is() )
+ break;
+
+ if ( GetViewShell()->PrepareClose() )
+ {
+ // weitere Views auf dasselbe Doc?
+ SfxObjectShell *pDocSh = GetObjectShell();
+ int bOther = sal_False;
+ for ( const SfxViewFrame* pFrame = SfxViewFrame::GetFirst( pDocSh );
+ !bOther && pFrame;
+ pFrame = SfxViewFrame::GetNext( *pFrame, pDocSh ) )
+ bOther = (pFrame != this);
+
+ // Doc braucht nur gefragt zu werden, wenn keine weitere View
+ sal_Bool bClosed = sal_False;
+ sal_Bool bUI = TRUE;
+ if ( ( bOther || pDocSh->PrepareClose( bUI ) ) )
+ {
+ if ( !bOther )
+ pDocSh->SetModified( FALSE );
+ rReq.Done(); // unbedingt vor Close() rufen!
+ bClosed = sal_False;
+ try
+ {
+ xTask->close(sal_True);
+ bClosed = sal_True;
+ }
+ catch( CloseVetoException& )
+ {
+ bClosed = sal_False;
+ }
+ }
+
+ rReq.SetReturnValue( SfxBoolItem( rReq.GetSlot(), bClosed ));
+ }
+ return;
+ }
+ }
+
+ rReq.Done();
+}
+
+void SfxViewFrame::GetState_Impl( SfxItemSet &rSet )
+{
+ SfxObjectShell *pDocSh = GetObjectShell();
+
+ if ( !pDocSh )
+ return;
+
+ const sal_uInt16 *pRanges = rSet.GetRanges();
+ DBG_ASSERT(pRanges, "Set ohne Bereich");
+ while ( *pRanges )
+ {
+ for ( sal_uInt16 nWhich = *pRanges++; nWhich <= *pRanges; ++nWhich )
+ {
+ switch(nWhich)
+ {
+ case SID_NEWDOCDIRECT :
+ {
+ if ( pImp->aFactoryName.Len() )
+ {
+ String aFact = String::CreateFromAscii("private:factory/");
+ aFact += pImp->aFactoryName;
+ rSet.Put( SfxStringItem( nWhich, aFact ) );
+ }
+ break;
+ }
+
+ case SID_NEWWINDOW:
+ rSet.DisableItem(nWhich);
+ break;
+
+ case SID_CLOSEWIN:
+ {
+ // disable CloseWin, if frame is not a task
+ Reference < XCloseable > xTask( GetFrame().GetFrameInterface(), UNO_QUERY );
+ if ( !xTask.is() )
+ rSet.DisableItem(nWhich);
+ break;
+ }
+
+ case SID_SHOWPOPUPS :
+ break;
+
+ case SID_OBJECT:
+ if ( GetViewShell() && GetViewShell()->GetVerbs().getLength() && !GetObjectShell()->IsInPlaceActive() )
+ {
+ uno::Any aAny;
+ aAny <<= GetViewShell()->GetVerbs();
+ rSet.Put( SfxUnoAnyItem( USHORT( SID_OBJECT ), aAny ) );
+ }
+ else
+ rSet.DisableItem( SID_OBJECT );
+ break;
+
+ default:
+ DBG_ERROR( "invalid message-id" );
+ }
+ }
+ ++pRanges;
+ }
+}
+
+void SfxViewFrame::INetExecute_Impl( SfxRequest &rRequest )
+{
+ sal_uInt16 nSlotId = rRequest.GetSlot();
+ switch( nSlotId )
+ {
+ case SID_BROWSE_FORWARD:
+ case SID_BROWSE_BACKWARD:
+ OSL_ENSURE( false, "SfxViewFrame::INetExecute_Impl: SID_BROWSE_FORWARD/BACKWARD are dead!" );
+ break;
+ case SID_CREATELINK:
+ {
+/*! (pb) we need new implementation to create a link
+*/
+ break;
+ }
+ case SID_FOCUSURLBOX:
+ {
+ SfxStateCache *pCache = GetBindings().GetAnyStateCache_Impl( SID_OPENURL );
+ if( pCache )
+ {
+ SfxControllerItem* pCtrl = pCache->GetItemLink();
+ while( pCtrl )
+ {
+ pCtrl->StateChanged( SID_FOCUSURLBOX, SFX_ITEM_UNKNOWN, 0 );
+ pCtrl = pCtrl->GetItemLink();
+ }
+ }
+ }
+ }
+
+ // Recording
+ rRequest.Done();
+}
+
+void SfxViewFrame::INetState_Impl( SfxItemSet &rItemSet )
+{
+ rItemSet.DisableItem( SID_BROWSE_FORWARD );
+ rItemSet.DisableItem( SID_BROWSE_BACKWARD );
+
+ // Add/SaveToBookmark bei BASIC-IDE, QUERY-EDITOR etc. disablen
+ SfxObjectShell *pDocSh = GetObjectShell();
+ sal_Bool bPseudo = pDocSh && !( pDocSh->GetFactory().GetFlags() & SFXOBJECTSHELL_HASOPENDOC );
+ sal_Bool bEmbedded = pDocSh && pDocSh->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED;
+ if ( !pDocSh || bPseudo || bEmbedded || !pDocSh->HasName() )
+ rItemSet.DisableItem( SID_CREATELINK );
+}
+
+void SfxViewFrame::SetZoomFactor( const Fraction &rZoomX, const Fraction &rZoomY )
+{
+ GetViewShell()->SetZoomFactor( rZoomX, rZoomY );
+}
+
+void SfxViewFrame::Activate( sal_Bool bMDI )
+{
+ DBG_ASSERT(GetViewShell(), "Keine Shell");
+ if ( bMDI )
+ pImp->bActive = sal_True;
+//(mba): hier evtl. wie in Beanframe NotifyEvent ?!
+}
+
+void SfxViewFrame::Deactivate( sal_Bool bMDI )
+{
+ DBG_ASSERT(GetViewShell(), "Keine Shell");
+ if ( bMDI )
+ pImp->bActive = sal_False;
+//(mba): hier evtl. wie in Beanframe NotifyEvent ?!
+}
diff --git a/sfx2/source/view/viewimp.hxx b/sfx2/source/view/viewimp.hxx
index 9e3791340daa..69ce837fb023 100644
--- a/sfx2/source/view/viewimp.hxx
+++ b/sfx2/source/view/viewimp.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: viewimp.hxx,v $
- * $Revision: 1.16 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -87,12 +84,10 @@ struct SfxViewShell_Impl
Size aOptimalSize;
Size aMargin;
USHORT nPrinterLocks;
- BOOL bUseObjectSize;
BOOL bCanPrint;
BOOL bHasPrintOptions;
BOOL bPlugInsActive;
BOOL bIsShowView;
- BOOL bFrameSetImpl;
BOOL bOwnsMenu;
BOOL bGotOwnerShip;
BOOL bGotFrameOwnerShip;
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index 24d31337a662..2d5403b72abd 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: viewprn.cxx,v $
- * $Revision: 1.36.84.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 4ee90289347e..5c65c967434f 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: viewsh.cxx,v $
- * $Revision: 1.82.98.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -84,7 +81,7 @@
#include "view.hrc"
#include "sfxlocal.hrc"
#include <sfx2/sfxbasecontroller.hxx>
-#include <sfx2/topfrm.hxx>
+#include <sfx2/viewfrm.hxx>
#include "mailmodelapi.hxx"
#include <sfx2/event.hxx>
#include <sfx2/fcontnr.hxx>
@@ -392,7 +389,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
case SID_ACTIVATE_STYLE_APPLY:
{
com::sun::star::uno::Reference< com::sun::star::frame::XFrame > xFrame(
- GetViewFrame()->GetFrame()->GetFrameInterface(),
+ GetViewFrame()->GetFrame().GetFrameInterface(),
com::sun::star::uno::UNO_QUERY);
Reference< com::sun::star::beans::XPropertySet > xPropSet( xFrame, UNO_QUERY );
@@ -488,7 +485,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
if ( pMailDocType )
aDocType = pMailDocType->GetValue();
- uno::Reference < frame::XFrame > xFrame( pFrame->GetFrame()->GetFrameInterface() );
+ uno::Reference < frame::XFrame > xFrame( pFrame->GetFrame().GetFrameInterface() );
SfxMailModel::SendMailResult eResult = SfxMailModel::SEND_MAIL_ERROR;
if ( nId == SID_MAIL_SENDDOC )
@@ -532,7 +529,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
const sal_Int32 FILTERFLAG_EXPORT = 0x00000002;
css::uno::Reference< lang::XMultiServiceFactory > xSMGR(::comphelper::getProcessServiceFactory(), css::uno::UNO_QUERY_THROW);
- css::uno::Reference < css::frame::XFrame > xFrame( pFrame->GetFrame()->GetFrameInterface() );
+ css::uno::Reference < css::frame::XFrame > xFrame( pFrame->GetFrame().GetFrameInterface() );
css::uno::Reference< css::frame::XModel > xModel;
const rtl::OUString aModuleManager( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ModuleManager" ));
@@ -689,8 +686,8 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
// ausfuehren
if ( !pShowItem || bActive != pImp->bPlugInsActive )
{
- SfxFrame* pTopFrame = GetFrame()->GetTopFrame();
- if ( pTopFrame != GetFrame()->GetFrame() )
+ SfxFrame* pTopFrame = &GetFrame()->GetTopFrame();
+ if ( pTopFrame != &GetFrame()->GetFrame() )
{
// FramesetDocument
SfxViewShell *pShell = pTopFrame->GetCurrentViewFrame()->GetViewShell();
@@ -776,7 +773,7 @@ void SfxViewShell::GetState_Impl( SfxItemSet &rSet )
aPrinterName = Printer::GetDefaultPrinterName();
if ( aPrinterName.getLength() > 0 )
{
- uno::Reference < frame::XFrame > xFrame( pFrame->GetFrame()->GetFrameInterface() );
+ uno::Reference < frame::XFrame > xFrame( pFrame->GetFrame().GetFrameInterface() );
::rtl::OUStringBuffer aBuffer( 60 );
aBuffer.append( RetrieveLabelFromCommand(
@@ -874,7 +871,7 @@ ErrCode SfxViewShell::DoVerb(long /*nVerb*/)
void SfxViewShell::OutplaceActivated( sal_Bool bActive, SfxInPlaceClient* /*pClient*/ )
{
if ( !bActive )
- GetFrame()->GetFrame()->Appear();
+ GetFrame()->GetFrame().Appear();
}
//--------------------------------------------------------------------
@@ -896,7 +893,7 @@ void SfxViewShell::InplaceDeactivated( SfxInPlaceClient* /*pClient*/ )
void SfxViewShell::UIActivating( SfxInPlaceClient* /*pClient*/ )
{
- uno::Reference < frame::XFrame > xOwnFrame( pFrame->GetFrame()->GetFrameInterface() );
+ uno::Reference < frame::XFrame > xOwnFrame( pFrame->GetFrame().GetFrameInterface() );
uno::Reference < frame::XFramesSupplier > xParentFrame( xOwnFrame->getCreator(), uno::UNO_QUERY );
if ( xParentFrame.is() )
xParentFrame->setActiveFrame( xOwnFrame );
@@ -909,12 +906,12 @@ void SfxViewShell::UIActivating( SfxInPlaceClient* /*pClient*/ )
void SfxViewShell::UIDeactivated( SfxInPlaceClient* /*pClient*/ )
{
- if ( !pFrame->GetFrame()->IsClosing_Impl() ||
+ if ( !pFrame->GetFrame().IsClosing_Impl() ||
SfxViewFrame::Current() != pFrame )
pFrame->GetDispatcher()->Update_Impl( TRUE );
pFrame->GetBindings().HidePopups(FALSE);
- // uno::Reference < frame::XFrame > xOwnFrame( pFrame->GetFrame()->GetFrameInterface() );
+ // uno::Reference < frame::XFrame > xOwnFrame( pFrame->GetFrame().GetFrameInterface() );
// uno::Reference < frame::XFramesSupplier > xParentFrame( xOwnFrame->getCreator(), uno::UNO_QUERY );
// if ( xParentFrame.is() )
// xParentFrame->setActiveFrame( uno::Reference < frame::XFrame >() );
@@ -995,7 +992,7 @@ void SfxViewShell::Activate( BOOL bMDI )
{
SfxObjectShell *pSh = GetViewFrame()->GetObjectShell();
if ( pSh->GetModel().is() )
- pSh->GetModel()->setCurrentController( GetViewFrame()->GetFrame()->GetController() );
+ pSh->GetModel()->setCurrentController( GetViewFrame()->GetFrame().GetController() );
SetCurrentDocument();
}
@@ -1255,8 +1252,6 @@ SfxViewShell::SfxViewShell
,pFrame(pViewFrame)
,pSubShell(0)
,pWindow(0)
- ,bMaximizeFirst( 0 != (nFlags & SFX_VIEW_MAXIMIZE_FIRST) )
- ,bOptimizeEach(0 != (nFlags & SFX_VIEW_OPTIMIZE_EACH))
,bNoNewWindow( 0 != (nFlags & SFX_VIEW_NO_NEWWINDOW) )
{
DBG_CTOR(SfxViewShell, 0);
@@ -1266,11 +1261,7 @@ SfxViewShell::SfxViewShell
pImp->bIsShowView =
!(SFX_VIEW_NO_SHOW == (nFlags & SFX_VIEW_NO_SHOW));
- pImp->bUseObjectSize = FALSE;
-// SFX_CREATE_MODE_EMBEDDED==pFrame->GetObjectShell()->GetCreateMode() &&
-// SFX_VIEW_OBJECTSIZE_EMBEDDED == (nFlags & SFX_VIEW_OBJECTSIZE_EMBEDDED);
pImp->bCanPrint = SFX_VIEW_CAN_PRINT == (nFlags & SFX_VIEW_CAN_PRINT);
- pImp->bFrameSetImpl = (nFlags & SFX_VIEW_IMPLEMENTED_AS_FRAMESET) != 0;
pImp->bHasPrintOptions =
SFX_VIEW_HAS_PRINTOPTIONS == (nFlags & SFX_VIEW_HAS_PRINTOPTIONS);
pImp->bPlugInsActive = TRUE;
@@ -1366,6 +1357,24 @@ SfxViewShell* SfxViewShell::Current()
//--------------------------------------------------------------------
+SfxViewShell* SfxViewShell::Get( const Reference< XController>& i_rController )
+{
+ if ( !i_rController.is() )
+ return NULL;
+
+ for ( SfxViewShell* pViewShell = SfxViewShell::GetFirst( NULL, FALSE );
+ pViewShell;
+ pViewShell = SfxViewShell::GetNext( *pViewShell, NULL, FALSE )
+ )
+ {
+ if ( pViewShell->GetController() == i_rController )
+ return pViewShell;
+ }
+ return NULL;
+}
+
+//--------------------------------------------------------------------
+
SdrView* SfxViewShell::GetDrawView() const
/* [Beschreibung]
@@ -1517,16 +1526,12 @@ void SfxViewShell::PushSubShells_Impl( BOOL bPush )
{
for ( USHORT n=0; n<nCount; n++ )
pDisp->Push( *pImp->aArr[n] );
-
-// HACK(evtl. PushSubShells fuer SW virtuell machen oder im SW umbauen)
-// Notify( *this, SfxSimpleHint( SFX_HINT_RESERVED4 ) );
}
else if ( nCount )
{
- pDisp->Pop( *pImp->aArr[0], SFX_SHELL_POP_UNTIL );
-
-// HACK(evtl. PushSubShells fuer SW virtuell machen oder im SW umbauen)
-// Notify( *this, SfxSimpleHint( SFX_HINT_RESERVED3 ) );
+ SfxShell& rPopUntil = *pImp->aArr[0];
+ if ( pDisp->GetShellLevel( rPopUntil ) != USHRT_MAX )
+ pDisp->Pop( rPopUntil, SFX_SHELL_POP_UNTIL );
}
pDisp->Flush();
@@ -1677,7 +1682,7 @@ BOOL SfxViewShell::ExecKey_Impl(const KeyEvent& aKey)
if (!pImp->pAccExec)
{
pImp->pAccExec = ::svt::AcceleratorExecute::createAcceleratorHelper();
- pImp->pAccExec->init(::comphelper::getProcessServiceFactory(), pFrame->GetFrame()->GetFrameInterface());
+ pImp->pAccExec->init(::comphelper::getProcessServiceFactory(), pFrame->GetFrame().GetFrameInterface());
}
return pImp->pAccExec->execute(aKey.GetKeyCode());
@@ -1782,13 +1787,6 @@ void SfxViewShell::DisconnectAllClients()
//--------------------------------------------------------------------
-BOOL SfxViewShell::UseObjectSize() const
-{
- return pImp->bUseObjectSize;
-}
-
-//--------------------------------------------------------------------
-
void SfxViewShell::QueryObjAreaPixel( Rectangle& ) const
{
}
@@ -1798,14 +1796,7 @@ void SfxViewShell::QueryObjAreaPixel( Rectangle& ) const
void SfxViewShell::AdjustVisArea(const Rectangle& rRect)
{
DBG_ASSERT (pFrame, "Kein Frame?");
- if ( UseObjectSize() )
- {
- Point aPos = rRect.TopLeft();
- Size aSize = GetObjectShell()->GetVisArea().GetSize();
- GetObjectShell()->SetVisArea( Rectangle(aPos, aSize) );
- }
- else
- GetObjectShell()->SetVisArea( rRect );
+ GetObjectShell()->SetVisArea( rRect );
}
//--------------------------------------------------------------------
@@ -1977,13 +1968,6 @@ SfxFrame* SfxViewShell::GetSmartSelf( SfxFrame* pSelf, SfxMedium& /*rMedium*/ )
return pSelf;
}
-//--------------------------------------------------------------------
-
-BOOL SfxViewShell::IsImplementedAsFrameset_Impl( ) const
-{
- return pImp->bFrameSetImpl;
-}
-
//------------------------------------------------------------------------
void SfxViewShell::JumpToMark( const String& rMark )
@@ -2023,6 +2007,11 @@ Reference < XController > SfxViewShell::GetController()
return pImp->pController;
}
+SfxBaseController* SfxViewShell::GetBaseController_Impl() const
+{
+ return pImp->pController;
+}
+
void SfxViewShell::AddContextMenuInterceptor_Impl( const REFERENCE< XCONTEXTMENUINTERCEPTOR >& xInterceptor )
{
pImp->aInterceptorContainer.addInterface( xInterceptor );
@@ -2177,7 +2166,7 @@ void SfxViewShell::CheckOwnerShip_Impl()
{
// document couldn't be closed or it shouldn't, now try at least to close the frame
com::sun::star::uno::Reference < com::sun::star::util::XCloseable > xFrame(
- GetViewFrame()->GetFrame()->GetFrameInterface(), com::sun::star::uno::UNO_QUERY );
+ GetViewFrame()->GetFrame().GetFrameInterface(), com::sun::star::uno::UNO_QUERY );
if ( xFrame.is() )
{
try
@@ -2256,3 +2245,4 @@ void SfxViewShell::AddRemoveClipboardListener( const uno::Reference < datatransf
{
}
}
+
diff --git a/sfx2/util/hidother.src b/sfx2/util/hidother.src
index 92f029929ffb..72b178b2d629 100644
--- a/sfx2/util/hidother.src
+++ b/sfx2/util/hidother.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: hidother.src,v $
- * $Revision: 1.20 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -60,35 +57,12 @@ hidspecial SID_STYLE_FAMILY4 { HelpID = SID_STYLE_FAMILY4; };
hidspecial SID_STYLE_FAMILY5 { HelpID = SID_STYLE_FAMILY5; };
hidspecial SID_FILTER_NAME { HelpID = SID_FILTER_NAME; };
hidspecial HID_NAVIGATOR_WINDOW { HelpID = HID_NAVIGATOR_WINDOW; };
-hidspecial SID_EXPLORERCONTENT_OPEN { HelpId = SID_EXPLORERCONTENT_OPEN; };
-hidspecial SID_EXPLORERCONTENT_OPEN_FOLDER { HelpId = SID_EXPLORERCONTENT_OPEN_FOLDER; };
-hidspecial SID_EXPLORERCONTENT_OPEN_TEMPLATE { HelpId = SID_EXPLORERCONTENT_OPEN_TEMPLATE; };
-hidspecial SID_EXPLORERCONTENT_OPEN_DOCUMENT { HelpId = SID_EXPLORERCONTENT_OPEN_DOCUMENT; };
-hidspecial SID_EXPLORERCONTENT_OPEN_OBJECT { HelpId = SID_EXPLORERCONTENT_OPEN_OBJECT; };
hidspecial HID_HELPAGENT_TIP_BOX { HelpId = HID_HELPAGENT_TIP_BOX; };
-hidspecial SID_EXPLORER_SEARCH_DLG { HelpId = SID_EXPLORER_SEARCH_DLG; };
-hidspecial SID_TRASH_RECOVER { HelpId = SID_TRASH_RECOVER; };
-hidspecial SID_TRASH_AUTOEMPTY { HelpId = SID_TRASH_AUTOEMPTY; };
-hidspecial SID_TRASH_EMPTY { HelpId = SID_TRASH_EMPTY; };
-hidspecial SID_EXPLORERCONTENT_NEW { HelpId = SID_EXPLORERCONTENT_NEW; };
-hidspecial SID_EXPLORERCONTENT_DESTROY { HelpId = SID_EXPLORERCONTENT_DESTROY; };
-hidspecial SID_EXPLORERCONTENT_RENAME { HelpId = SID_EXPLORERCONTENT_RENAME; };
-hidspecial SID_EXPLORERCONTENT_COPY { HelpId = SID_EXPLORERCONTENT_COPY; };
-hidspecial SID_EXPLORERCONTENT_PASTE { HelpId = SID_EXPLORERCONTENT_PASTE; };
-hidspecial SID_EXPLORERCONTENT_CREATELINK { HelpId = SID_EXPLORERCONTENT_CREATELINK; };
-hidspecial SID_EXPLORERCONTENT_MAKEROOT { HelpId = SID_EXPLORERCONTENT_MAKEROOT; };
-hidspecial SID_EXPLORERCONTENT_DEFAULTTEMPLATE { HelpId = SID_EXPLORERCONTENT_DEFAULTTEMPLATE; };
-hidspecial SID_PROPERTIES { HelpId = SID_PROPERTIES; };
-hidspecial SID_EXPLORER_BOOKMARKDIR { HelpId = SID_EXPLORER_BOOKMARKDIR; };
-hidspecial SID_EXPLORER_SEARCHORIG { HelpId = SID_EXPLORER_SEARCHORIG; };
hidspecial HID_TEMPLDLG_TOOLBOX_LEFT { HelpId = HID_TEMPLDLG_TOOLBOX_LEFT;};
hidspecial HID_EXPLORER_SRCH_COUNT { HelpId = HID_EXPLORER_SRCH_COUNT;};
-hidspecial SID_EXPLORER_PASTE_ASLINK { HelpId = SID_EXPLORER_PASTE_ASLINK;};
hidspecial HID_INTERFACE_SFXPLUGINVIEW { HelpID = HID_INTERFACE_SFXPLUGINVIEW; };
hidspecial HID_TABDLG_RESET_BTN { HelpID = HID_TABDLG_RESET_BTN; };
hidspecial HID_TABDLG_STANDARD_BTN { HelpID = HID_TABDLG_STANDARD_BTN; };
-hidspecial SID_EXPLORER_RESETURL { HelpID = SID_EXPLORER_RESETURL; };
-hidspecial SID_ORIG_PROPERTIES { HelpID = SID_ORIG_PROPERTIES; };
hidspecial HID_CONFIG_EVENT_OFFICE_BASED { HelpID = HID_CONFIG_EVENT_OFFICE_BASED; };
hidspecial HID_CONFIG_EVENT_DOCUMENT_BASED { HelpID = HID_CONFIG_EVENT_DOCUMENT_BASED; };
hidspecial HID_EXPLORER_SRCH_LATEST_COUNT { HelpID = HID_EXPLORER_SRCH_LATEST_COUNT; };
@@ -100,10 +74,6 @@ hidspecial HID_CHAOSDOC_WIN { HelpID = HID_CHAOSDOC_WIN; };
hidspecial HID_CHAOSDOC_WIN_HEADER { HelpID = HID_CHAOSDOC_WIN_HEADER; };
hidspecial HID_CHAOSDOC_WIN_PARTS { HelpID = HID_CHAOSDOC_WIN_PARTS; };
hidspecial HID_CHAOSDOC_WIN_BODY { HelpID = HID_CHAOSDOC_WIN_BODY; };
-hidspecial SID_CHAOSDOC_LAYOUT1 { HelpID = SID_CHAOSDOC_LAYOUT1; };
-hidspecial SID_CHAOSDOC_LAYOUT2 { HelpID = SID_CHAOSDOC_LAYOUT2; };
-hidspecial SID_CHAOSDOC_LAYOUT3 { HelpID = SID_CHAOSDOC_LAYOUT3; };
-hidspecial SID_CHAOSDOC_LAYOUT4 { HelpID = SID_CHAOSDOC_LAYOUT4; };
hidspecial HID_BRWBOX_HEADERBAR { HelpID = HID_BRWBOX_HEADERBAR; };
hidspecial HID_TASKBAR { HelpID = HID_TASKBAR; };
hidspecial HID_TASKBUTTONBAR { HelpID = HID_TASKBUTTONBAR; };
@@ -129,9 +99,6 @@ hidspecial HID_CHAOS_NEW_SUBSCR_BOX { HelpID = HID_CHAOS_NEW_SUBSCR_
hidspecial HID_CHAOS_NEW_BOOKMARK { HelpID = HID_CHAOS_NEW_BOOKMARK; };
hidspecial HID_CHAOS_NEW_PUB_BOX { HelpID = HID_CHAOS_NEW_PUB_BOX; };
hidspecial HID_UUI_END { HelpID = HID_UUI_END; }; // aka HID_CHAOS_NEW_DATABASE
-hidspecial SID_EXPLORER_SHOWEXTENSION { HelpID = SID_EXPLORER_SHOWEXTENSION; };
-hidspecial SID_EXPLORER_MAIL_HEADER { HelpID = SID_EXPLORER_MAIL_HEADER; };
-hidspecial SID_EXPLORER_MAIL_BODY { HelpID = SID_EXPLORER_MAIL_BODY; };
hidspecial HID_CNT_DLG_SEARCH_BT_SHOW { HelpID = HID_CNT_DLG_SEARCH_BT_SHOW; };
hidspecial HID_CNT_DLG_SEARCH_BT_UPDATE { HelpID = HID_CNT_DLG_SEARCH_BT_UPDATE; };
hidspecial HID_CNT_DLG_SEARCH_BT_SYNCHRONIZE { HelpID = HID_CNT_DLG_SEARCH_BT_SYNCHRONIZE; };
diff --git a/sfx2/util/makefile.mk b/sfx2/util/makefile.mk
index 10b70b1a1374..2d93e7692d86 100644
--- a/sfx2/util/makefile.mk
+++ b/sfx2/util/makefile.mk
@@ -1,15 +1,11 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE 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.54 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sfx2/util/makefile.pmk b/sfx2/util/makefile.pmk
index 2e0009b87ef6..03817cd477ae 100644
--- a/sfx2/util/makefile.pmk
+++ b/sfx2/util/makefile.pmk
@@ -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.pmk,v $
-#
-# $Revision: 1.4 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify