summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2011-03-18 15:49:47 +0100
committerJan Holesovsky <kendy@suse.cz>2011-03-18 15:49:47 +0100
commit091e4aee3386f3bfee081dc8646494e0eb97f88a (patch)
treedd79298b4e8729ca7dc874274d4a33ea88fe107d /sfx2
parentf0681adbf092e2b455db52535f2df882bc87343a (diff)
parent224bd63b3fa459baa0a6bb5cd03f5dc2ca475d82 (diff)
Merge remote-tracking branch 'origin/integration/dev300_m101'
Conflicts: avmedia/source/framework/mediacontrol.cxx connectivity/source/commontools/DateConversion.cxx desktop/source/deployment/registry/component/dp_component.cxx editeng/inc/editeng/numitem.hxx editeng/inc/editeng/txtrange.hxx editeng/source/editeng/editobj.cxx editeng/source/editeng/editview.cxx editeng/source/editeng/eehtml.cxx editeng/source/editeng/impedit3.cxx editeng/source/editeng/impedit4.cxx editeng/source/misc/txtrange.cxx editeng/source/outliner/outlin2.cxx editeng/source/outliner/outlvw.cxx framework/source/layoutmanager/layoutmanager.cxx linguistic/source/lngsvcmgr.hxx sfx2/source/appl/app.cxx sfx2/source/appl/app.src sfx2/source/appl/appbas.cxx sfx2/source/appl/appcfg.cxx sfx2/source/appl/appdde.cxx sfx2/source/appl/appmain.cxx sfx2/source/appl/appopen.cxx sfx2/source/appl/appquit.cxx sfx2/source/appl/appserv.cxx sfx2/source/appl/childwin.cxx sfx2/source/appl/fileobj.cxx sfx2/source/appl/fileobj.hxx sfx2/source/appl/workwin.cxx sfx2/source/control/dispatch.cxx sfx2/source/control/macro.cxx sfx2/source/control/objface.cxx sfx2/source/control/request.cxx sfx2/source/control/shell.cxx sfx2/source/control/statcach.cxx sfx2/source/dialog/dinfdlg.cxx sfx2/source/dialog/dockwin.cxx sfx2/source/dialog/mailmodel.cxx sfx2/source/dialog/mailmodelapi.cxx sfx2/source/dialog/mgetempl.cxx sfx2/source/dialog/splitwin.cxx sfx2/source/dialog/styledlg.cxx sfx2/source/dialog/tabdlg.cxx sfx2/source/dialog/templdlg.cxx sfx2/source/dialog/tplcitem.cxx sfx2/source/dialog/tplpitem.cxx sfx2/source/doc/doctempl.cxx sfx2/source/doc/docvor.cxx sfx2/source/doc/new.cxx sfx2/source/doc/objcont.cxx sfx2/source/doc/objserv.cxx sfx2/source/doc/objxtor.cxx sfx2/source/inc/appdata.hxx sfx2/source/inc/helpid.hrc sfx2/source/inc/sfxlocal.hrc sfx2/source/inc/statcach.hxx sfx2/source/inc/templdgi.hxx sfx2/source/inc/virtmenu.hxx sfx2/source/inc/workwin.hxx sfx2/source/menu/mnumgr.cxx sfx2/source/menu/virtmenu.cxx sfx2/source/statbar/stbitem.cxx sfx2/source/view/frame.cxx sfx2/source/view/frame2.cxx sfx2/source/view/orgmgr.cxx sfx2/source/view/printer.cxx sfx2/source/view/prnmon.cxx sfx2/source/view/sfxbasecontroller.cxx sfx2/source/view/viewfrm.cxx sfx2/source/view/viewfrm2.cxx sfx2/source/view/viewprn.cxx sfx2/source/view/viewsh.cxx svx/inc/svx/svditer.hxx svx/source/dialog/sdstring.src svx/source/form/fmpage.cxx svx/source/form/formcontroller.cxx svx/source/svdraw/svdcrtv.cxx svx/source/svdraw/svditer.cxx svx/source/svdraw/svdview.cxx xmloff/source/forms/elementimport.cxx
Diffstat (limited to 'sfx2')
-rwxr-xr-xsfx2/AllLangResTarget_sfx2.mk82
-rwxr-xr-x[-rw-r--r--]sfx2/CppunitTest_sfx2_metadatable.mk (renamed from sfx2/source/notify/makefile.mk)36
-rwxr-xr-xsfx2/JunitTest_sfx2_complex.mk78
-rwxr-xr-x[-rw-r--r--]sfx2/JunitTest_sfx2_unoapi.mk (renamed from sfx2/sdi/makefile.mk)50
-rwxr-xr-x[-rw-r--r--]sfx2/Library_qstart.mk (renamed from sfx2/source/bastyp/makefile.mk)80
-rwxr-xr-xsfx2/Library_sfx.mk299
-rwxr-xr-x[-rw-r--r--]sfx2/Makefile (renamed from sfx2/source/config/makefile.mk)25
-rwxr-xr-x[-rw-r--r--]sfx2/Module_sfx2.mk (renamed from sfx2/inc/makefile.mk)44
-rwxr-xr-xsfx2/Package_inc.mk137
-rwxr-xr-x[-rw-r--r--]sfx2/Package_sdi.mk (renamed from sfx2/source/inet/makefile.mk)26
-rwxr-xr-x[-rw-r--r--]sfx2/README0
-rwxr-xr-x[-rw-r--r--]sfx2/inc/about.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/inc/arrdecl.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/inc/bitset.hxx92
-rwxr-xr-x[-rw-r--r--]sfx2/inc/brokenpackageint.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/inc/configmgr.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/inc/docvor.hxx46
-rwxr-xr-x[-rw-r--r--]sfx2/inc/filedlghelper.hrc0
-rwxr-xr-x[-rw-r--r--]sfx2/inc/frmload.hxx6
-rwxr-xr-x[-rw-r--r--]sfx2/inc/fwkhelper.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/inc/guisaveas.hxx6
-rwxr-xr-x[-rw-r--r--]sfx2/inc/idpool.hxx24
-rwxr-xr-x[-rw-r--r--]sfx2/inc/inettbc.hxx6
-rwxr-xr-x[-rw-r--r--]sfx2/inc/macro.hxx20
-rwxr-xr-x[-rw-r--r--]sfx2/inc/msgnodei.hxx56
-rwxr-xr-x[-rw-r--r--]sfx2/inc/orgmgr.hxx36
-rwxr-xr-x[-rw-r--r--]sfx2/inc/pch/precompiled_sfx2.cxx0
-rwxr-xr-x[-rw-r--r--]sfx2/inc/pch/precompiled_sfx2.hxx3
-rwxr-xr-x[-rw-r--r--]sfx2/inc/progind.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/inc/resmgr.hxx18
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/DocumentMetadataAccess.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/Metadatable.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/QuerySaveDocument.hxx (renamed from sfx2/inc/QuerySaveDocument.hxx)0
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/XmlIdRegistry.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/app.hxx59
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/appuno.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/basedlgs.hxx19
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/basmgr.hxx (renamed from sfx2/inc/basmgr.hxx)1
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/bindings.hxx10
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/brokenpackageint.hxx (renamed from sfx2/source/appl/sfxdll.cxx)58
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/chalign.hxx2
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/childwin.hxx8
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/cntids.hrc0
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/controlwrapper.hxx62
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/ctrlitem.hxx24
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/dialogs.hrc0
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/dinfdlg.hxx28
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/dinfedt.hxx (renamed from sfx2/inc/dinfedt.hxx)0
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/dispatch.hxx153
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/dllapi.h0
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/docfac.hxx6
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/docfile.hxx12
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/docfilt.hxx57
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/docinf.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/docinsert.hxx (renamed from sfx2/inc/docinsert.hxx)0
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/dockwin.hxx26
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/docmacromode.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/docstoragemodifylistener.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/doctdlg.hxx2
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/doctempl.hxx74
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/event.hxx31
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/evntconf.hxx20
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/fcontnr.hxx16
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/filedlghelper.hxx3
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/frame.hxx22
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/frmdescr.hxx90
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/frmhtml.hxx2
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/frmhtmlw.hxx6
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/genlink.hxx4
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/hintpost.hxx2
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/htmlmode.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/imagemgr.hxx (renamed from sfx2/inc/imagemgr.hxx)2
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/imgdef.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/imgmgr.hxx (renamed from sfx2/inc/imgmgr.hxx)14
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/ipclient.hxx5
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/itemconnect.hxx30
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/itemwrapper.hxx30
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/layout-post.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/layout-pre.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/layout-tabdlg.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/layout.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/linkmgr.hxx32
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/linksrc.hxx22
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/lnkbase.hxx44
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/macrconf.hxx0
-rwxr-xr-xsfx2/inc/sfx2/macropg.hxx150
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/mailmodelapi.hxx (renamed from sfx2/inc/mailmodelapi.hxx)2
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/mgetempl.hxx13
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/mieclip.hxx (renamed from sfx2/inc/mieclip.hxx)4
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/minarray.hxx226
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/minfitem.hxx (renamed from sfx2/inc/minfitem.hxx)2
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/minstack.hxx18
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/mnuitem.hxx50
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/mnumgr.hxx28
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/module.hxx10
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/msg.hxx59
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/msgpool.hxx18
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/navigat.hxx4
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/new.hxx12
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/newstyle.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/objface.hxx54
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/objitem.hxx2
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/objsh.hxx83
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/objuno.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/opengrf.hxx5
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/passwd.hxx37
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/printer.hxx66
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/printopt.hxx4
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/prnmon.hxx2
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/progress.hxx20
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/querystatus.hxx2
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/request.hxx44
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/securitypage.hxx2
-rwxr-xr-xsfx2/inc/sfx2/sfx.hrc48
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/sfxbasecontroller.hxx9
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/sfxbasemodel.hxx137
-rwxr-xr-xsfx2/inc/sfx2/sfxcommands.h342
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/sfxdefs.hxx2
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/sfxdlg.hxx22
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/sfxhelp.hxx (renamed from sfx2/inc/sfxhelp.hxx)14
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/sfxhtml.hxx38
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/sfxmodelfactory.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/sfxresid.hxx (renamed from sfx2/inc/sfxresid.hxx)8
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/sfxsids.hrc77
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/sfxstatuslistener.hxx12
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/sfxuno.hxx50
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/shell.hxx59
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/signaturestate.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/stbitem.hxx (renamed from sfx2/inc/stbitem.hxx)36
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/styfitem.hxx4
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/styledlg.hxx2
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/tabdlg.hxx108
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/taskpane.hxx2
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/tbxctrl.hxx84
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/templdlg.hxx2
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/titledockwin.hxx16
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/tplpitem.hxx (renamed from sfx2/inc/tplpitem.hxx)10
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/unoctitm.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/userinputinterception.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/viewfac.hxx (renamed from sfx2/inc/viewfac.hxx)7
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/viewfrm.hxx100
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfx2/viewsh.hxx72
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sfxbasic.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/inc/sorgitm.hxx4
-rwxr-xr-x[-rw-r--r--]sfx2/inc/srchdlg.hxx10
-rwxr-xr-x[-rw-r--r--]sfx2/prj/build.lst28
-rwxr-xr-x[-rw-r--r--]sfx2/prj/d.lst46
-rwxr-xr-x[-rw-r--r--]sfx2/prj/makefile.mk (renamed from sfx2/util/makefile.pmk)16
-rw-r--r--sfx2/qa/complex/CheckGlobalEventBroadcaster_writer1.java243
-rw-r--r--sfx2/qa/complex/DocHelper/makefile.mk46
-rw-r--r--sfx2/qa/complex/docinfo/DocumentProperties.java269
-rw-r--r--sfx2/qa/complex/makefile.mk61
-rwxr-xr-xsfx2/qa/complex/sfx2/DocumentInfo.java362
-rwxr-xr-x[-rw-r--r--]sfx2/qa/complex/sfx2/DocumentMetadataAccess.java (renamed from sfx2/qa/complex/DocumentMetadataAccessTest.java)736
-rwxr-xr-x[-rw-r--r--]sfx2/qa/complex/sfx2/DocumentProperties.java (renamed from sfx2/qa/complex/DocumentMetaData.java)311
-rwxr-xr-xsfx2/qa/complex/sfx2/GlobalEventBroadcaster.java273
-rwxr-xr-xsfx2/qa/complex/sfx2/StandaloneDocumentInfo.java99
-rwxr-xr-xsfx2/qa/complex/sfx2/UndoManager.java1464
-rwxr-xr-x[-rw-r--r--]sfx2/qa/complex/sfx2/makefile.mk (renamed from sfx2/qa/complex/docinfo/makefile.mk)56
-rwxr-xr-x[-rw-r--r--]sfx2/qa/complex/sfx2/standalonedocinfo/StandaloneDocumentInfoTest.java (renamed from sfx2/qa/complex/standalonedocumentinfo/StandaloneDocumentInfoTest.java)2
-rwxr-xr-x[-rw-r--r--]sfx2/qa/complex/sfx2/standalonedocinfo/Test01.java (renamed from sfx2/qa/complex/standalonedocumentinfo/Test01.java)41
-rwxr-xr-x[-rw-r--r--]sfx2/qa/complex/sfx2/standalonedocinfo/TestHelper.java (renamed from sfx2/qa/complex/standalonedocumentinfo/TestHelper.java)16
-rwxr-xr-x[-rw-r--r--]sfx2/qa/complex/sfx2/testdocuments/CUSTOM.odt (renamed from sfx2/qa/complex/testdocuments/CUSTOM.odt)bin1021 -> 1021 bytes
-rwxr-xr-x[-rw-r--r--]sfx2/qa/complex/sfx2/testdocuments/TEST.odt (renamed from sfx2/qa/complex/testdocuments/TEST.odt)bin13803 -> 13803 bytes
-rwxr-xr-x[-rw-r--r--]sfx2/qa/complex/sfx2/testdocuments/TESTRDFA.odt (renamed from sfx2/qa/complex/testdocuments/TESTRDFA.odt)bin7540 -> 7540 bytes
-rwxr-xr-xsfx2/qa/complex/sfx2/testdocuments/empty.rdf13
-rwxr-xr-x[-rw-r--r--]sfx2/qa/complex/sfx2/tools/DialogThread.java (renamed from sfx2/qa/complex/DocHelper/DialogThread.java)19
-rwxr-xr-xsfx2/qa/complex/sfx2/tools/TestDocument.java40
-rwxr-xr-x[-rw-r--r--]sfx2/qa/complex/sfx2/tools/WriterHelper.java (renamed from sfx2/qa/complex/DocHelper/WriterHelper.java)101
-rwxr-xr-xsfx2/qa/complex/sfx2/undo/CalcDocumentTest.java96
-rwxr-xr-xsfx2/qa/complex/sfx2/undo/ChartDocumentTest.java277
-rwxr-xr-xsfx2/qa/complex/sfx2/undo/DocumentTest.java61
-rwxr-xr-xsfx2/qa/complex/sfx2/undo/DocumentTestBase.java29
-rwxr-xr-x[-rw-r--r--]sfx2/qa/complex/sfx2/undo/DrawDocumentTest.java (renamed from sfx2/source/config/config.hrc)31
-rwxr-xr-xsfx2/qa/complex/sfx2/undo/DrawingOrPresentationDocumentTest.java196
-rwxr-xr-x[-rw-r--r--]sfx2/qa/complex/sfx2/undo/ImpressDocumentTest.java (renamed from sfx2/source/config/config.src)25
-rwxr-xr-xsfx2/qa/complex/sfx2/undo/WriterDocumentTest.java104
-rw-r--r--sfx2/qa/complex/standalonedocumentinfo/StandaloneDocumentInfoUnitTest.java69
-rw-r--r--sfx2/qa/complex/standalonedocumentinfo/makefile.mk85
-rw-r--r--sfx2/qa/complex/tests.sce3
-rwxr-xr-x[-rw-r--r--]sfx2/qa/cppunit/makefile.mk0
-rwxr-xr-x[-rw-r--r--]sfx2/qa/cppunit/test_metadatable.cxx8
-rwxr-xr-x[-rw-r--r--]sfx2/qa/cppunit/version.map0
-rwxr-xr-x[-rw-r--r--]sfx2/qa/unoapi/Test.java5
-rwxr-xr-x[-rw-r--r--]sfx2/qa/unoapi/knownissues.xcl0
-rw-r--r--sfx2/qa/unoapi/makefile.mk48
-rwxr-xr-x[-rw-r--r--]sfx2/qa/unoapi/sfx.sce2
-rwxr-xr-x[-rw-r--r--]sfx2/qa/unoapi/testdocuments/SfxStandaloneDocInfoObject.sdwbin8192 -> 8192 bytes
-rwxr-xr-x[-rw-r--r--]sfx2/qa/unoapi/testdocuments/report.stwbin11186 -> 11186 bytes
-rwxr-xr-x[-rw-r--r--]sfx2/qa/unoapi/testdocuments/report2.stwbin11000 -> 11000 bytes
-rwxr-xr-x[-rw-r--r--]sfx2/sdi/appslots.sdi0
-rwxr-xr-x[-rw-r--r--]sfx2/sdi/docslots.sdi5
-rwxr-xr-x[-rw-r--r--]sfx2/sdi/frmslots.sdi0
-rwxr-xr-xsfx2/sdi/sfx.sdi79
-rwxr-xr-x[-rw-r--r--]sfx2/sdi/sfxitems.sdi0
-rwxr-xr-x[-rw-r--r--]sfx2/sdi/sfxslots.sdi0
-rwxr-xr-x[-rw-r--r--]sfx2/sdi/viwslots.sdi0
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/app.cxx69
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/app.hrc85
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/app.src649
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/appbas.cxx127
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/appbaslib.cxx3
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/appcfg.cxx261
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/appchild.cxx12
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/appdata.cxx5
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/appdde.cxx79
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/appinit.cxx11
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/appmain.cxx46
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/appmisc.cxx114
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/appopen.cxx187
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/appquit.cxx29
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/appreg.cxx14
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/appserv.cxx176
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/appuno.cxx561
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/childwin.cxx16
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/dde.hrc0
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/dde.src4
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/fileobj.cxx96
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/fileobj.hxx42
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/fwkhelper.cxx0
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/helpdispatch.cxx0
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/helpdispatch.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/helpinterceptor.cxx6
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/helpinterceptor.hxx2
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/imagemgr.cxx8
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/imestatuswindow.cxx0
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/imestatuswindow.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/impldde.cxx68
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/impldde.hxx16
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/linkmgr2.cxx114
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/linksrc.cxx64
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/lnkbase2.cxx102
-rw-r--r--sfx2/source/appl/makefile.mk163
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/module.cxx42
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/newhelp.cxx198
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/newhelp.hrc0
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/newhelp.hxx8
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/newhelp.src12
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/opengrf.cxx27
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/panelist.hxx6
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/sfx.src90
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/sfxhelp.cxx378
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/sfxpicklist.cxx12
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/shutdownicon.cxx14
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/shutdownicon.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/shutdowniconOs2.cxx0
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/shutdowniconaqua.mm0
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/shutdowniconunx.cxx12
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/shutdowniconw32.cxx0
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/workwin.cxx416
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/xpackcreator.cxx0
-rwxr-xr-x[-rw-r--r--]sfx2/source/appl/xpackcreator.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/source/bastyp/bastyp.hrc0
-rwxr-xr-x[-rw-r--r--]sfx2/source/bastyp/bastyp.src0
-rwxr-xr-x[-rw-r--r--]sfx2/source/bastyp/bitset.cxx86
-rwxr-xr-x[-rw-r--r--]sfx2/source/bastyp/fltfnc.cxx34
-rwxr-xr-x[-rw-r--r--]sfx2/source/bastyp/fltfnc.src0
-rwxr-xr-x[-rw-r--r--]sfx2/source/bastyp/fltlst.cxx2
-rwxr-xr-x[-rw-r--r--]sfx2/source/bastyp/fltlst.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/source/bastyp/frmhtml.cxx24
-rwxr-xr-x[-rw-r--r--]sfx2/source/bastyp/frmhtmlw.cxx28
-rwxr-xr-x[-rw-r--r--]sfx2/source/bastyp/helper.cxx6
-rwxr-xr-x[-rw-r--r--]sfx2/source/bastyp/mieclip.cxx14
-rwxr-xr-x[-rw-r--r--]sfx2/source/bastyp/minarray.cxx156
-rwxr-xr-x[-rw-r--r--]sfx2/source/bastyp/misc.cxx2
-rwxr-xr-x[-rw-r--r--]sfx2/source/bastyp/progress.cxx84
-rwxr-xr-x[-rw-r--r--]sfx2/source/bastyp/sfxhtml.cxx48
-rwxr-xr-x[-rw-r--r--]sfx2/source/bastyp/sfxresid.cxx6
-rwxr-xr-x[-rw-r--r--]sfx2/source/config/evntconf.cxx26
-rwxr-xr-x[-rw-r--r--]sfx2/source/control/bindings.cxx59
-rwxr-xr-x[-rw-r--r--]sfx2/source/control/ctrlitem.cxx24
-rwxr-xr-x[-rw-r--r--]sfx2/source/control/dispatch.cxx135
-rwxr-xr-x[-rw-r--r--]sfx2/source/control/macrconf.cxx0
-rwxr-xr-x[-rw-r--r--]sfx2/source/control/macro.cxx30
-rw-r--r--sfx2/source/control/makefile.mk73
-rwxr-xr-x[-rw-r--r--]sfx2/source/control/minfitem.cxx4
-rwxr-xr-x[-rw-r--r--]sfx2/source/control/msg.cxx15
-rwxr-xr-x[-rw-r--r--]sfx2/source/control/msgpool.cxx45
-rwxr-xr-x[-rw-r--r--]sfx2/source/control/objface.cxx112
-rwxr-xr-x[-rw-r--r--]sfx2/source/control/querystatus.cxx10
-rwxr-xr-x[-rw-r--r--]sfx2/source/control/request.cxx136
-rwxr-xr-x[-rw-r--r--]sfx2/source/control/sfxstatuslistener.cxx8
-rwxr-xr-x[-rw-r--r--]sfx2/source/control/shell.cxx156
-rwxr-xr-x[-rw-r--r--]sfx2/source/control/sorgitm.cxx8
-rwxr-xr-x[-rw-r--r--]sfx2/source/control/statcach.cxx10
-rwxr-xr-x[-rw-r--r--]sfx2/source/control/unoctitm.cxx20
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/about.cxx0
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/alienwarn.cxx2
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/alienwarn.hrc0
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/alienwarn.src1
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/basedlgs.cxx73
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/dialog.hrc0
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/dialog.src0
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/dinfdlg.cxx228
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/dinfdlg.hrc4
-rwxr-xr-xsfx2/source/dialog/dinfdlg.src45
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/dinfedt.cxx4
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/dinfedt.hrc0
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/dinfedt.src4
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/dockwin.cxx257
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/filedlghelper.cxx112
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/filedlghelper.src0
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/filedlgimpl.hxx5
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/filtergrouping.cxx2
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/filtergrouping.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/intro.cxx0
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/itemconnect.cxx26
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/mailmodel.cxx145
-rw-r--r--sfx2/source/dialog/mailmodelapi.cxx673
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/mailwindow.src0
-rwxr-xr-xsfx2/source/dialog/makefile.mk115
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/mgetempl.cxx54
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/mgetempl.hrc1
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/mgetempl.src14
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/navigat.cxx10
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/newstyle.cxx3
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/newstyle.hrc0
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/newstyle.src4
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/partwnd.cxx2
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/passwd.cxx136
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/passwd.hrc15
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/passwd.src66
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/printopt.cxx52
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/printopt.hrc0
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/printopt.src22
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/recfloat.cxx18
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/recfloat.src1
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/securitypage.cxx18
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/securitypage.src0
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/sfxdlg.cxx2
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/splitwin.cxx314
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/srchdlg.cxx16
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/srchdlg.hrc0
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/srchdlg.src6
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/styfitem.cxx16
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/styledlg.cxx16
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/tabdlg.cxx273
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/taskpane.cxx33
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/taskpane.src0
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/templdlg.cxx480
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/templdlg.hrc3
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/templdlg.src14
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/titledockwin.cxx36
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/titledockwin.src0
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/tplcitem.cxx12
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/tplpitem.cxx16
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/versdlg.cxx46
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/versdlg.hrc0
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/versdlg.src10
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/DocumentMetadataAccess.cxx0
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/Metadatable.cxx0
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/QuerySaveDocument.cxx4
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/SfxDocumentMetaData.cxx0
-rw-r--r--sfx2/source/doc/applet.cxx377
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/doc.hrc2
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/doc.src13
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/docfac.cxx10
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/docfile.cxx91
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/docfilt.cxx2
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/docinf.cxx2
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/docinsert.cxx18
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/docmacromode.cxx0
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/docstoragemodifylistener.cxx0
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/doctdlg.cxx20
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/doctdlg.hrc0
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/doctdlg.src8
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/doctempl.cxx148
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/doctempl.src0
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/doctemplates.cxx46
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/doctemplateslocal.cxx0
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/doctemplateslocal.hxx0
-rwxr-xr-xsfx2/source/doc/docundomanager.cxx457
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/docvor.cxx382
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/docvor.hrc0
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/docvor.src7
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/frmdescr.cxx50
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/graphhelp.cxx2
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/graphhelp.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/graphhelp.src0
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/guisaveas.cxx60
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/iframe.cxx8
-rw-r--r--sfx2/source/doc/makefile.mk103
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/new.cxx90
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/new.hrc0
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/new.src18
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/objcont.cxx150
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/objembed.cxx12
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/objitem.cxx6
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/objmisc.cxx204
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/objserv.cxx95
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/objstor.cxx94
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/objuno.cxx8
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/objxtor.cxx50
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/oleprops.cxx14
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/oleprops.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/ownsubfilterservice.cxx0
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/plugin.cxx12
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/printhelper.cxx13
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/printhelper.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/querytemplate.cxx6
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/querytemplate.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/sfxacldetect.cxx2
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/sfxacldetect.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/sfxbasemodel.cxx365
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/sfxmodelfactory.cxx0
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/syspath.cxx0
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/syspath.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/syspathw32.cxx4
-rw-r--r--sfx2/source/explorer/makefile.mk47
-rwxr-xr-x[-rw-r--r--]sfx2/source/explorer/nochaos.cxx6
-rwxr-xr-x[-rw-r--r--]sfx2/source/inc/SfxDocumentMetaData.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/source/inc/alienwarn.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/source/inc/appbas.hxx2
-rwxr-xr-x[-rw-r--r--]sfx2/source/inc/appbaslib.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/source/inc/appdata.hxx28
-rw-r--r--sfx2/source/inc/applet.hxx125
-rwxr-xr-x[-rw-r--r--]sfx2/source/inc/doctemplates.hxx0
-rwxr-xr-xsfx2/source/inc/docundomanager.hxx116
-rwxr-xr-x[-rw-r--r--]sfx2/source/inc/eventsupplier.hxx13
-rwxr-xr-x[-rw-r--r--]sfx2/source/inc/fltfnc.hxx2
-rwxr-xr-x[-rw-r--r--]sfx2/source/inc/fltoptint.hxx13
-rwxr-xr-x[-rw-r--r--]sfx2/source/inc/helper.hxx2
-rwxr-xr-xsfx2/source/inc/helpid.hrc619
-rwxr-xr-x[-rw-r--r--]sfx2/source/inc/hexplwnd.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/source/inc/iframe.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/source/inc/intro.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/source/inc/mailmodel.hxx2
-rwxr-xr-x[-rw-r--r--]sfx2/source/inc/mnucfga.hxx2
-rwxr-xr-x[-rw-r--r--]sfx2/source/inc/nfltdlg.hxx2
-rwxr-xr-x[-rw-r--r--]sfx2/source/inc/nochaos.hxx2
-rwxr-xr-x[-rw-r--r--]sfx2/source/inc/objmnctl.hxx4
-rwxr-xr-x[-rw-r--r--]sfx2/source/inc/objshimp.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/source/inc/openflag.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/source/inc/ownsubfilterservice.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/source/inc/partwnd.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/source/inc/plugin.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/source/inc/preview.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/source/inc/recfloat.hxx4
-rwxr-xr-x[-rw-r--r--]sfx2/source/inc/referers.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/source/inc/sfxlocal.hrc8
-rwxr-xr-x[-rw-r--r--]sfx2/source/inc/sfxpicklist.hxx4
-rwxr-xr-x[-rw-r--r--]sfx2/source/inc/sfxtypes.hxx18
-rwxr-xr-x[-rw-r--r--]sfx2/source/inc/sfxurlrelocator.hxx5
-rwxr-xr-x[-rw-r--r--]sfx2/source/inc/slotserv.hxx12
-rwxr-xr-x[-rw-r--r--]sfx2/source/inc/splitwin.hxx66
-rwxr-xr-x[-rw-r--r--]sfx2/source/inc/statcach.hxx8
-rwxr-xr-x[-rw-r--r--]sfx2/source/inc/templdgi.hxx96
-rwxr-xr-x[-rw-r--r--]sfx2/source/inc/tplcitem.hxx6
-rwxr-xr-x[-rw-r--r--]sfx2/source/inc/tplcomp.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/source/inc/versdlg.hxx2
-rwxr-xr-x[-rw-r--r--]sfx2/source/inc/virtmenu.hxx58
-rwxr-xr-x[-rw-r--r--]sfx2/source/inc/workwin.hxx170
-rwxr-xr-x[-rw-r--r--]sfx2/source/inet/inettbc.cxx8
-rwxr-xr-x[-rw-r--r--]sfx2/source/layout/factory.cxx0
-rw-r--r--sfx2/source/layout/makefile.mk56
-rwxr-xr-x[-rw-r--r--]sfx2/source/layout/sfxdialog.cxx0
-rwxr-xr-x[-rw-r--r--]sfx2/source/layout/sfxtabdialog.cxx4
-rwxr-xr-x[-rw-r--r--]sfx2/source/layout/sfxtabpage.cxx0
-rw-r--r--sfx2/source/menu/makefile.mk55
-rwxr-xr-x[-rw-r--r--]sfx2/source/menu/menu.hrc0
-rwxr-xr-x[-rw-r--r--]sfx2/source/menu/menu.src7
-rwxr-xr-x[-rw-r--r--]sfx2/source/menu/mnuitem.cxx87
-rwxr-xr-x[-rw-r--r--]sfx2/source/menu/mnumgr.cxx79
-rwxr-xr-x[-rw-r--r--]sfx2/source/menu/objmnctl.cxx12
-rwxr-xr-x[-rw-r--r--]sfx2/source/menu/thessubmenu.cxx41
-rwxr-xr-x[-rw-r--r--]sfx2/source/menu/thessubmenu.hxx8
-rwxr-xr-x[-rw-r--r--]sfx2/source/menu/virtmenu.cxx232
-rwxr-xr-x[-rw-r--r--]sfx2/source/notify/eventsupplier.cxx134
-rwxr-xr-x[-rw-r--r--]sfx2/source/notify/hintpost.cxx0
-rw-r--r--sfx2/source/statbar/makefile.mk47
-rwxr-xr-x[-rw-r--r--]sfx2/source/statbar/stbitem.cxx57
-rwxr-xr-x[-rw-r--r--]sfx2/source/toolbox/imgmgr.cxx50
-rw-r--r--sfx2/source/toolbox/makefile.mk48
-rwxr-xr-x[-rw-r--r--]sfx2/source/toolbox/tbxitem.cxx159
-rwxr-xr-x[-rw-r--r--]sfx2/source/view/frame.cxx36
-rwxr-xr-x[-rw-r--r--]sfx2/source/view/frame2.cxx38
-rwxr-xr-x[-rw-r--r--]sfx2/source/view/frmload.cxx63
-rwxr-xr-x[-rw-r--r--]sfx2/source/view/impframe.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/source/view/impviewframe.hxx4
-rwxr-xr-x[-rw-r--r--]sfx2/source/view/ipclient.cxx34
-rw-r--r--sfx2/source/view/makefile.mk65
-rwxr-xr-x[-rw-r--r--]sfx2/source/view/orgmgr.cxx202
-rwxr-xr-x[-rw-r--r--]sfx2/source/view/printer.cxx332
-rw-r--r--sfx2/source/view/prnmon.cxx475
-rwxr-xr-x[-rw-r--r--]sfx2/source/view/sfxbasecontroller.cxx58
-rwxr-xr-x[-rw-r--r--]sfx2/source/view/userinputinterception.cxx2
-rwxr-xr-x[-rw-r--r--]sfx2/source/view/view.hrc6
-rwxr-xr-x[-rw-r--r--]sfx2/source/view/view.src0
-rwxr-xr-x[-rw-r--r--]sfx2/source/view/viewfac.cxx4
-rwxr-xr-x[-rw-r--r--]sfx2/source/view/viewfrm.cxx188
-rwxr-xr-x[-rw-r--r--]sfx2/source/view/viewfrm2.cxx24
-rwxr-xr-x[-rw-r--r--]sfx2/source/view/viewimp.hxx33
-rwxr-xr-x[-rw-r--r--]sfx2/source/view/viewprn.cxx187
-rwxr-xr-x[-rw-r--r--]sfx2/source/view/viewsh.cxx939
-rwxr-xr-x[-rw-r--r--]sfx2/util/hidother.src62
-rwxr-xr-x[-rw-r--r--]sfx2/util/make_tco.btm0
-rw-r--r--sfx2/util/makefile.mk160
-rwxr-xr-x[-rw-r--r--]sfx2/util/mkdemo.pl0
-rwxr-xr-xsfx2/util/sfx.component78
-rwxr-xr-x[-rw-r--r--]sfx2/util/sfx.xml0
-rwxr-xr-x[-rw-r--r--]sfx2/workben/custompanel/CalcWindowState.xcu0
-rwxr-xr-x[-rw-r--r--]sfx2/workben/custompanel/DrawWindowState.xcu0
-rwxr-xr-x[-rw-r--r--]sfx2/workben/custompanel/Factories.xcu0
-rwxr-xr-x[-rw-r--r--]sfx2/workben/custompanel/ImpressWindowState.xcu0
-rwxr-xr-x[-rw-r--r--]sfx2/workben/custompanel/WriterWindowState.xcu0
-rwxr-xr-x[-rw-r--r--]sfx2/workben/custompanel/ctp_factory.cxx0
-rwxr-xr-x[-rw-r--r--]sfx2/workben/custompanel/ctp_factory.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/workben/custompanel/ctp_panel.cxx0
-rwxr-xr-x[-rw-r--r--]sfx2/workben/custompanel/ctp_panel.hxx0
-rwxr-xr-x[-rw-r--r--]sfx2/workben/custompanel/ctp_services.cxx0
-rwxr-xr-x[-rw-r--r--]sfx2/workben/custompanel/delzip0
-rwxr-xr-x[-rw-r--r--]sfx2/workben/custompanel/description.xml0
-rw-r--r--sfx2/workben/custompanel/makefile.mk120
-rwxr-xr-x[-rw-r--r--]sfx2/workben/custompanel/manifest.xml0
-rwxr-xr-x[-rw-r--r--]sfx2/workben/custompanel/panel.pngbin202 -> 202 bytes
515 files changed, 13502 insertions, 13900 deletions
diff --git a/sfx2/AllLangResTarget_sfx2.mk b/sfx2/AllLangResTarget_sfx2.mk
new file mode 100755
index 000000000000..77691fe88025
--- /dev/null
+++ b/sfx2/AllLangResTarget_sfx2.mk
@@ -0,0 +1,82 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2011 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.
+#
+#*************************************************************************
+
+$(eval $(call gb_AllLangResTarget_AllLangResTarget,sfx))
+
+$(eval $(call gb_AllLangResTarget_set_reslocation,sfx,sfx2))
+
+$(eval $(call gb_AllLangResTarget_add_srs,sfx,\
+ sfx/res \
+))
+
+$(eval $(call gb_SrsTarget_SrsTarget,sfx/res))
+
+$(eval $(call gb_SrsTarget_set_include,sfx/res,\
+ $$(INCLUDE) \
+ -I$(OUTDIR)/inc \
+ -I$(WORKDIR)/inc \
+ -I$(realpath $(SRCDIR)/sfx2/source/dialog) \
+ -I$(realpath $(SRCDIR)/sfx2/source/inc) \
+ -I$(realpath $(SRCDIR)/sfx2/inc/) \
+ -I$(realpath $(SRCDIR)/sfx2/inc/sfx) \
+))
+
+$(eval $(call gb_SrsTarget_add_files,sfx/res,\
+ sfx2/source/appl/app.src \
+ sfx2/source/appl/dde.src \
+ sfx2/source/appl/newhelp.src \
+ sfx2/source/appl/sfx.src \
+ sfx2/source/bastyp/bastyp.src \
+ sfx2/source/bastyp/fltfnc.src \
+ sfx2/source/dialog/alienwarn.src \
+ sfx2/source/dialog/dialog.src \
+ sfx2/source/dialog/dinfdlg.src \
+ sfx2/source/dialog/dinfedt.src \
+ sfx2/source/dialog/filedlghelper.src \
+ sfx2/source/dialog/mailwindow.src \
+ sfx2/source/dialog/mgetempl.src \
+ sfx2/source/dialog/newstyle.src \
+ sfx2/source/dialog/passwd.src \
+ sfx2/source/dialog/printopt.src \
+ sfx2/source/dialog/recfloat.src \
+ sfx2/source/dialog/securitypage.src \
+ sfx2/source/dialog/srchdlg.src \
+ sfx2/source/dialog/taskpane.src \
+ sfx2/source/dialog/templdlg.src \
+ sfx2/source/dialog/titledockwin.src \
+ sfx2/source/dialog/versdlg.src \
+ sfx2/source/doc/doc.src \
+ sfx2/source/doc/doctdlg.src \
+ sfx2/source/doc/doctempl.src \
+ sfx2/source/doc/docvor.src \
+ sfx2/source/doc/graphhelp.src \
+ sfx2/source/doc/new.src \
+ sfx2/source/menu/menu.src \
+ sfx2/source/view/view.src \
+))
+
+
diff --git a/sfx2/source/notify/makefile.mk b/sfx2/CppunitTest_sfx2_metadatable.mk
index b13857cf10fb..bf86f0a74e25 100644..100755
--- a/sfx2/source/notify/makefile.mk
+++ b/sfx2/CppunitTest_sfx2_metadatable.mk
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
+# Copyright 2000, 2011 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -25,26 +25,22 @@
#
#*************************************************************************
-PRJ=..$/..
+$(eval $(call gb_CppunitTest_CppunitTest,sfx2_metadatable))
-PRJNAME=sfx2
-TARGET=notify
+$(eval $(call gb_CppunitTest_add_exception_objects,sfx2_metadatable, \
+ sfx2/qa/cppunit/test_metadatable \
+))
-# --- Settings -----------------------------------------------------
+$(eval $(call gb_CppunitTest_add_linked_libs,sfx2_metadatable, \
+ sal \
+ sfx \
+ $(gb_STDLIBS) \
+))
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Files --------------------------------------------------------
-
-SLOFILES = \
- $(EXCEPTIONSFILES)
-
-EXCEPTIONSFILES = \
- $(SLO)$/eventsupplier.obj \
- $(SLO)$/hintpost.obj
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
+$(eval $(call gb_CppunitTest_set_include,sfx2_metadatable,\
+ $$(INCLUDE) \
+ -I$(OUTDIR)/inc/offuh \
+ -I$(OUTDIR)/inc \
+))
+# vim: set noet sw=4 ts=4:
diff --git a/sfx2/JunitTest_sfx2_complex.mk b/sfx2/JunitTest_sfx2_complex.mk
new file mode 100755
index 000000000000..800612a6c55d
--- /dev/null
+++ b/sfx2/JunitTest_sfx2_complex.mk
@@ -0,0 +1,78 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2011 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.
+#
+#*************************************************************************
+
+$(eval $(call gb_JunitTest_JunitTest,sfx2_complex))
+
+$(eval $(call gb_JunitTest_set_defs,sfx2_complex,\
+ $$(DEFS) \
+ -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/sfx2/qa/complex/sfx2/testdocuments \
+))
+
+$(eval $(call gb_JunitTest_add_jars,sfx2_complex,\
+ $(OUTDIR)/bin/OOoRunner.jar \
+ $(OUTDIR)/bin/ridl.jar \
+ $(OUTDIR)/bin/test.jar \
+ $(OUTDIR)/bin/test-tools.jar \
+ $(OUTDIR)/bin/unoil.jar \
+ $(OUTDIR)/bin/jurt.jar \
+))
+
+$(eval $(call gb_JunitTest_add_sourcefiles,sfx2_complex,\
+ sfx2/qa/complex/sfx2/tools/DialogThread \
+ sfx2/qa/complex/sfx2/tools/WriterHelper \
+ sfx2/qa/complex/sfx2/tools/TestDocument \
+ sfx2/qa/complex/sfx2/GlobalEventBroadcaster \
+ sfx2/qa/complex/sfx2/DocumentMetadataAccess \
+ sfx2/qa/complex/sfx2/DocumentProperties \
+ sfx2/qa/complex/sfx2/DocumentInfo \
+ sfx2/qa/complex/sfx2/StandaloneDocumentInfo \
+ sfx2/qa/complex/sfx2/UndoManager \
+ sfx2/qa/complex/sfx2/standalonedocinfo/StandaloneDocumentInfoTest \
+ sfx2/qa/complex/sfx2/standalonedocinfo/TestHelper \
+ sfx2/qa/complex/sfx2/standalonedocinfo/Test01 \
+ sfx2/qa/complex/sfx2/undo/CalcDocumentTest \
+ sfx2/qa/complex/sfx2/undo/ChartDocumentTest \
+ sfx2/qa/complex/sfx2/undo/DocumentTest \
+ sfx2/qa/complex/sfx2/undo/DocumentTestBase \
+ sfx2/qa/complex/sfx2/undo/DrawDocumentTest \
+ sfx2/qa/complex/sfx2/undo/DrawingOrPresentationDocumentTest \
+ sfx2/qa/complex/sfx2/undo/ImpressDocumentTest \
+ sfx2/qa/complex/sfx2/undo/WriterDocumentTest \
+))
+
+$(eval $(call gb_JunitTest_add_classes,sfx2_complex,\
+ complex.sfx2.DocumentInfo \
+ complex.sfx2.DocumentProperties \
+ complex.sfx2.DocumentMetadataAccess \
+ complex.sfx2.UndoManager \
+))
+# #i115674# fails currently: misses some OnUnfocus event
+# complex.sfx2.GlobalEventBroadcaster \
+# breaks because binfilter export has been removed
+# complex.sfx2.StandaloneDocumentInfo \
+
+# vim: set noet sw=4 ts=4:
diff --git a/sfx2/sdi/makefile.mk b/sfx2/JunitTest_sfx2_unoapi.mk
index 07e8a4b7fe19..33602a0b720d 100644..100755
--- a/sfx2/sdi/makefile.mk
+++ b/sfx2/JunitTest_sfx2_unoapi.mk
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
+# Copyright 2000, 2011 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -25,35 +25,29 @@
#
#*************************************************************************
-PRJ=..
+$(eval $(call gb_JunitTest_JunitTest,sfx2_unoapi))
-PRJNAME=sfx2
-TARGET=sfxslots
+$(eval $(call gb_JunitTest_set_defs,sfx2_unoapi,\
+ $$(DEFS) \
+ -Dorg.openoffice.test.arg.sce=$(SRCDIR)/sfx2/qa/unoapi/sfx.sce \
+ -Dorg.openoffice.test.arg.xcl=$(SRCDIR)/sfx2/qa/unoapi/knownissues.xcl \
+ -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/sfx2/qa/unoapi/testdocuments \
+))
-# --- Settings -----------------------------------------------------
+$(eval $(call gb_JunitTest_add_jars,sfx2_unoapi,\
+ $(OUTDIR)/bin/OOoRunner.jar \
+ $(OUTDIR)/bin/ridl.jar \
+ $(OUTDIR)/bin/test.jar \
+ $(OUTDIR)/bin/unoil.jar \
+ $(OUTDIR)/bin/jurt.jar \
+))
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
+$(eval $(call gb_JunitTest_add_sourcefiles,sfx2_unoapi,\
+ sfx2/qa/unoapi/Test \
+))
-.IF "$(L10N_framework)"==""
-
-SDI1NAME=$(TARGET)
-SDI1EXPORT=sfx
-
-.ENDIF
-
-# --- Files --------------------------------------------------------
-
-SVSDI1DEPEND= \
- $(PRJ)$/inc$/sfx2$/sfxsids.hrc \
- sfx.sdi \
- appslots.sdi \
- sfxslots.sdi \
- docslots.sdi \
- viwslots.sdi \
- frmslots.sdi
-
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
+$(eval $(call gb_JunitTest_add_classes,sfx2_unoapi,\
+ org.openoffice.sfx2.qa.unoapi.Test \
+))
+# vim: set noet sw=4 ts=4:
diff --git a/sfx2/source/bastyp/makefile.mk b/sfx2/Library_qstart.mk
index 75c0cace40d6..0709f60ba5fa 100644..100755
--- a/sfx2/source/bastyp/makefile.mk
+++ b/sfx2/Library_qstart.mk
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
+# Copyright 2000, 2011 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -25,42 +25,58 @@
#
#*************************************************************************
-PRJ=..$/..
-PRJNAME=sfx2
-TARGET=bastyp
-ENABLE_EXCEPTIONS=TRUE
+$(eval $(call gb_Library_Library,qstart_gtk))
-# --- Settings -----------------------------------------------------
+$(eval $(call gb_Library_set_include,qstart_gtk,\
+ $$(INCLUDE) \
+ -I$(SRCDIR)/sfx2/inc \
+ -I$(SRCDIR)/sfx2/inc/sfx2 \
+ -I$(SRCDIR)/sfx2/inc/pch \
+ -I$(OUTDIR)/inc/offuh \
+ -I$(OUTDIR)/inc \
+ $(filter -I%,$(GTK_CFLAGS)) \
+))
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
+$(eval $(call gb_Library_set_defs,qstart_gtk,\
+ $$(DEFS) \
+ -DDLL_NAME=$(notdir $(call gb_Library_get_target,sfx2)) \
+ -DENABLE_QUICKSTART_APPLET \
+))
-# --- Files --------------------------------------------------------
+$(eval $(call gb_Library_set_cflags,qstart_gtk,\
+ $$(CFLAGS) \
+ $(filter-out -I%,$(GTK_CFLAGS)) \
+))
-SLOFILES =\
- $(SLO)$/sfxhtml.obj \
- $(SLO)$/frmhtml.obj \
- $(SLO)$/frmhtmlw.obj \
- $(SLO)$/misc.obj \
- $(SLO)$/progress.obj \
- $(SLO)$/sfxresid.obj \
- $(SLO)$/bitset.obj \
- $(SLO)$/minarray.obj \
- $(SLO)$/fltfnc.obj \
- $(SLO)$/mieclip.obj \
- $(SLO)$/fltlst.obj \
- $(SLO)$/helper.obj
+$(eval $(call gb_Library_set_ldflags,qstart_gtk,\
+ $$(LDFLAGS) \
+ $(GTK_LIBS) \
+))
-SRS1NAME=$(TARGET)
-SRC1FILES =\
- fltfnc.src \
- bastyp.src
+$(eval $(call gb_Library_add_linked_libs,qstart_gtk,\
+ comphelper \
+ cppu \
+ cppuhelper \
+ fwe \
+ i18nisolang1 \
+ sal \
+ sax \
+ sb \
+ sot \
+ svl \
+ svt \
+ tk \
+ tl \
+ ucbhelper \
+ utl \
+ vcl \
+ xml2 \
+ sfx \
+))
-EXCEPTIONSFILES =\
- $(SLO)$/helper.obj
-
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
+$(eval $(call gb_Library_add_exception_objects,qstart_gtk,\
+ sfx2/source/appl/shutdowniconunx \
+))
+# vim: set noet sw=4 ts=4:
diff --git a/sfx2/Library_sfx.mk b/sfx2/Library_sfx.mk
new file mode 100755
index 000000000000..4d2396bf069c
--- /dev/null
+++ b/sfx2/Library_sfx.mk
@@ -0,0 +1,299 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2011 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.
+#
+#*************************************************************************
+
+$(eval $(call gb_Library_Library,sfx))
+
+$(eval $(call gb_Library_add_package_headers,sfx,\
+ sfx2_inc \
+ sfx2_sdi \
+))
+
+$(eval $(call gb_Library_add_precompiled_header,sfx,$(SRCDIR)/sfx2/inc/pch/precompiled_sfx2))
+
+$(eval $(call gb_Library_add_sdi_headers,sfx,sfx2/sdi/sfxslots))
+
+$(eval $(call gb_Library_set_componentfile,sfx,sfx2/util/sfx))
+
+$(eval $(call gb_Library_set_include,sfx,\
+ -I$(realpath $(SRCDIR)/sfx2/inc) \
+ -I$(realpath $(SRCDIR)/sfx2/inc/sfx2) \
+ -I$(realpath $(SRCDIR)/sfx2/source/inc) \
+ -I$(realpath $(SRCDIR)/sfx2/inc/pch) \
+ -I$(WORKDIR)/SdiTarget/sfx2/sdi \
+ -I$(WORKDIR)/inc/ \
+ $$(INCLUDE) \
+ -I$(OUTDIR)/inc/offuh \
+ -I$(OUTDIR)/inc \
+ $(LIBXML_CFLAGS) \
+))
+
+$(eval $(call gb_Library_set_defs,sfx,\
+ $$(DEFS) \
+ -DSFX2_DLLIMPLEMENTATION \
+))
+
+$(eval $(call gb_Library_add_linked_libs,sfx,\
+ comphelper \
+ cppu \
+ cppuhelper \
+ fwe \
+ i18nisolang1 \
+ sal \
+ sax \
+ sb \
+ sot \
+ svl \
+ svt \
+ tk \
+ tl \
+ ucbhelper \
+ utl \
+ vcl \
+ xml2 \
+ $(gb_STDLIBS) \
+))
+
+$(eval $(call gb_Library_add_exception_objects,sfx,\
+ sfx2/source/appl/app \
+ sfx2/source/appl/appbas \
+ sfx2/source/appl/appbaslib \
+ sfx2/source/appl/appcfg \
+ sfx2/source/appl/appchild \
+ sfx2/source/appl/appdata \
+ sfx2/source/appl/appdde \
+ sfx2/source/appl/appinit \
+ sfx2/source/appl/appmain \
+ sfx2/source/appl/appmisc \
+ sfx2/source/appl/appopen \
+ sfx2/source/appl/appquit \
+ sfx2/source/appl/appreg \
+ sfx2/source/appl/appserv \
+ sfx2/source/appl/appuno \
+ sfx2/source/appl/childwin \
+ sfx2/source/appl/fileobj \
+ sfx2/source/appl/fwkhelper \
+ sfx2/source/appl/helpdispatch \
+ sfx2/source/appl/helpinterceptor \
+ sfx2/source/appl/imagemgr \
+ sfx2/source/appl/imestatuswindow \
+ sfx2/source/appl/impldde \
+ sfx2/source/appl/linkmgr2 \
+ sfx2/source/appl/linksrc \
+ sfx2/source/appl/lnkbase2 \
+ sfx2/source/appl/module \
+ sfx2/source/appl/newhelp \
+ sfx2/source/appl/opengrf \
+ sfx2/source/appl/sfxhelp \
+ sfx2/source/appl/sfxpicklist \
+ sfx2/source/appl/shutdownicon \
+ sfx2/source/appl/workwin \
+ sfx2/source/appl/xpackcreator \
+ sfx2/source/bastyp/bitset \
+ sfx2/source/bastyp/fltfnc \
+ sfx2/source/bastyp/fltlst \
+ sfx2/source/bastyp/frmhtml \
+ sfx2/source/bastyp/frmhtmlw \
+ sfx2/source/bastyp/helper \
+ sfx2/source/bastyp/mieclip \
+ sfx2/source/bastyp/minarray \
+ sfx2/source/bastyp/misc \
+ sfx2/source/bastyp/progress \
+ sfx2/source/bastyp/sfxhtml \
+ sfx2/source/bastyp/sfxresid \
+ sfx2/source/config/evntconf \
+ sfx2/source/control/bindings \
+ sfx2/source/control/ctrlitem \
+ sfx2/source/control/dispatch \
+ sfx2/source/control/macro \
+ sfx2/source/control/minfitem \
+ sfx2/source/control/msg \
+ sfx2/source/control/msgpool \
+ sfx2/source/control/objface \
+ sfx2/source/control/querystatus \
+ sfx2/source/control/request \
+ sfx2/source/control/sfxstatuslistener \
+ sfx2/source/control/shell \
+ sfx2/source/control/sorgitm \
+ sfx2/source/control/statcach \
+ sfx2/source/control/unoctitm \
+ sfx2/source/dialog/alienwarn \
+ sfx2/source/dialog/basedlgs \
+ sfx2/source/dialog/dinfdlg \
+ sfx2/source/dialog/dinfedt \
+ sfx2/source/dialog/dockwin \
+ sfx2/source/dialog/filedlghelper \
+ sfx2/source/dialog/filtergrouping \
+ sfx2/source/dialog/intro \
+ sfx2/source/dialog/itemconnect \
+ sfx2/source/dialog/mailmodel \
+ sfx2/source/dialog/mgetempl \
+ sfx2/source/dialog/navigat \
+ sfx2/source/dialog/newstyle \
+ sfx2/source/dialog/partwnd \
+ sfx2/source/dialog/passwd \
+ sfx2/source/dialog/printopt \
+ sfx2/source/dialog/recfloat \
+ sfx2/source/dialog/securitypage \
+ sfx2/source/dialog/sfxdlg \
+ sfx2/source/dialog/splitwin \
+ sfx2/source/dialog/srchdlg \
+ sfx2/source/dialog/styfitem \
+ sfx2/source/dialog/styledlg \
+ sfx2/source/dialog/tabdlg \
+ sfx2/source/dialog/taskpane \
+ sfx2/source/dialog/templdlg \
+ sfx2/source/dialog/titledockwin \
+ sfx2/source/dialog/tplcitem \
+ sfx2/source/dialog/tplpitem \
+ sfx2/source/dialog/versdlg \
+ sfx2/source/doc/DocumentMetadataAccess \
+ sfx2/source/doc/Metadatable \
+ sfx2/source/doc/QuerySaveDocument \
+ sfx2/source/doc/SfxDocumentMetaData \
+ sfx2/source/doc/docfac \
+ sfx2/source/doc/docfile \
+ sfx2/source/doc/docfilt \
+ sfx2/source/doc/docinf \
+ sfx2/source/doc/docinsert \
+ sfx2/source/doc/docmacromode \
+ sfx2/source/doc/docstoragemodifylistener \
+ sfx2/source/doc/doctdlg \
+ sfx2/source/doc/doctempl \
+ sfx2/source/doc/doctemplates \
+ sfx2/source/doc/doctemplateslocal \
+ sfx2/source/doc/docvor \
+ sfx2/source/doc/frmdescr \
+ sfx2/source/doc/graphhelp \
+ sfx2/source/doc/guisaveas \
+ sfx2/source/doc/iframe \
+ sfx2/source/doc/new \
+ sfx2/source/doc/objcont \
+ sfx2/source/doc/objembed \
+ sfx2/source/doc/objitem \
+ sfx2/source/doc/objmisc \
+ sfx2/source/doc/objserv \
+ sfx2/source/doc/objstor \
+ sfx2/source/doc/objuno \
+ sfx2/source/doc/objxtor \
+ sfx2/source/doc/oleprops \
+ sfx2/source/doc/ownsubfilterservice \
+ sfx2/source/doc/plugin \
+ sfx2/source/doc/printhelper \
+ sfx2/source/doc/querytemplate \
+ sfx2/source/doc/docundomanager \
+ sfx2/source/doc/sfxbasemodel \
+ sfx2/source/doc/sfxmodelfactory \
+ sfx2/source/doc/syspath \
+ sfx2/source/explorer/nochaos \
+ sfx2/source/inet/inettbc \
+ sfx2/source/menu/mnuitem \
+ sfx2/source/menu/mnumgr \
+ sfx2/source/menu/objmnctl \
+ sfx2/source/menu/thessubmenu \
+ sfx2/source/menu/virtmenu \
+ sfx2/source/notify/eventsupplier \
+ sfx2/source/notify/hintpost \
+ sfx2/source/statbar/stbitem \
+ sfx2/source/toolbox/imgmgr \
+ sfx2/source/toolbox/tbxitem \
+ sfx2/source/view/frame \
+ sfx2/source/view/frame2 \
+ sfx2/source/view/frmload \
+ sfx2/source/view/ipclient \
+ sfx2/source/view/orgmgr \
+ sfx2/source/view/printer \
+ sfx2/source/view/sfxbasecontroller \
+ sfx2/source/view/userinputinterception \
+ sfx2/source/view/viewfac \
+ sfx2/source/view/viewfrm \
+ sfx2/source/view/viewfrm2 \
+ sfx2/source/view/viewprn \
+ sfx2/source/view/viewsh \
+))
+
+$(eval $(call gb_SdiTarget_SdiTarget,sfx2/sdi/sfxslots,sfx2/sdi/sfx))
+
+$(eval $(call gb_SdiTarget_set_include,sfx2/sdi/sfxslots,\
+ $$(INCLUDE) \
+ -I$(realpath $(SRCDIR)/sfx2/inc/sfx2) \
+ -I$(realpath $(SRCDIR)/sfx2/inc) \
+ -I$(realpath $(SRCDIR)/sfx2/sdi) \
+))
+
+ifeq ($(OS),$(filter WNT MACOSX,$(OS)))
+$(eval $(call gb_Library_set_defs,sfx,\
+ $$(DEFS) \
+ -DENABLE_QUICKSTART_APPLET \
+))
+endif
+
+ifeq ($(OS),OS2)
+$(eval $(call gb_Library_add_exception_objects,sfx,\
+ sfx2/source/appl/shutdowniconOs2.ob \
+))
+endif
+ifeq ($(OS),MACOSX)
+$(eval $(call gb_Library_add_objcxxobjects,sfx,\
+ sfx2/source/appl/shutdowniconaqua \
+))
+$(eval $(call gb_Library_add_linked_libs,sfx,\
+ objc \
+ Cocoa \
+))
+endif
+
+ifeq ($(OS),WNT)
+
+# workaround: disable PCH for these objects to avoid redeclaration
+# errors - needs to be fixed in module tools
+$(eval $(call gb_Library_add_cxxobjects,sfx,\
+ sfx2/source/appl/shutdowniconw32 \
+ sfx2/source/doc/sfxacldetect \
+ sfx2/source/doc/syspathw32 \
+ , $(gb_LinkTarget_EXCEPTIONFLAGS) $(gb_COMPILEROPTFLAGS) -nologo -UPRECOMPILED_HEADERS \
+))
+
+$(eval $(call gb_Library_add_linked_libs,sfx,\
+ gdi32 \
+ advapi32 \
+ ole32 \
+ shell32 \
+ user32 \
+ uuid \
+))
+
+else
+
+$(eval $(call gb_Library_add_cxxobjects,sfx,\
+ sfx2/source/appl/shutdowniconw32 \
+ sfx2/source/doc/sfxacldetect \
+ , $(gb_LinkTarget_EXCEPTIONFLAGS) $(gb_COMPILEROPTFLAGS) \
+))
+
+endif
+# vim: set noet sw=4 ts=4:
+
diff --git a/sfx2/source/config/makefile.mk b/sfx2/Makefile
index d090babd1505..a79aff831024 100644..100755
--- a/sfx2/source/config/makefile.mk
+++ b/sfx2/Makefile
@@ -25,23 +25,14 @@
#
#*************************************************************************
-PRJ=..$/..
+ifeq ($(strip $(SOLARENV)),)
+$(error No environment set!)
+endif
-PRJNAME=sfx2
-TARGET=config
-ENABLE_EXCEPTIONS=TRUE
+gb_PARTIALBUILD := T
+GBUILDDIR := $(SOLARENV)/gbuild
+include $(GBUILDDIR)/gbuild.mk
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Files --------------------------------------------------------
-
-SLOFILES = \
- $(SLO)$/evntconf.obj
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
+$(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
+# vim: set noet sw=4 ts=4:
diff --git a/sfx2/inc/makefile.mk b/sfx2/Module_sfx2.mk
index b7aa547e2c79..b88e2581f2da 100644..100755
--- a/sfx2/inc/makefile.mk
+++ b/sfx2/Module_sfx2.mk
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
+# Copyright 2000, 2011 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -24,25 +24,37 @@
# for a copy of the LGPLv3 License.
#
#*************************************************************************
-PRJ=..
-PRJNAME=sfx2
-TARGET=inc
+$(eval $(call gb_Module_Module,sfx2))
-# --- Settings -----------------------------------------------------
+$(eval $(call gb_Module_add_targets,sfx2,\
+ AllLangResTarget_sfx2 \
+ Library_sfx \
+ Package_inc \
+ Package_sdi \
+))
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
+$(eval $(call gb_Module_add_check_targets,sfx2,\
+ CppunitTest_sfx2_metadatable \
+))
-# --- Files --------------------------------------------------------
-# --- Targets -------------------------------------------------------
+$(eval $(call gb_Module_add_subsequentcheck_targets,sfx2,\
+ JunitTest_sfx2_complex \
+ JunitTest_sfx2_unoapi \
+))
-.INCLUDE : target.mk
+ifeq ($(OS),LINUX)
+ifeq ($(ENABLE_SYSTRAY_GTK),TRUE)
+$(eval $(call gb_Module_add_targets,sfx2,\
+ Library_qstart \
+))
+endif
+endif
-.IF "$(ENABLE_PCH)"!=""
-ALLTAR : \
- $(SLO)$/precompiled.pch \
- $(SLO)$/precompiled_ex.pch
-
-.ENDIF # "$(ENABLE_PCH)"!=""
+#todo: source/dialog BUILD_VER_STRING
+#todo: source/doc SYSTEM_LIBXML2
+#todo: ENABLE_LAYOUT
+#todo: clean up quickstarter stuff in both libraries
+#todo: move standard pool to svl
+# vim: set noet sw=4 ts=4:
diff --git a/sfx2/Package_inc.mk b/sfx2/Package_inc.mk
new file mode 100755
index 000000000000..57317629323b
--- /dev/null
+++ b/sfx2/Package_inc.mk
@@ -0,0 +1,137 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2011 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.
+#
+#*************************************************************************
+
+$(eval $(call gb_Package_Package,sfx2_inc,$(SRCDIR)/sfx2/inc))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/DocumentMetadataAccess.hxx,sfx2/DocumentMetadataAccess.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/Metadatable.hxx,sfx2/Metadatable.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/QuerySaveDocument.hxx,sfx2/QuerySaveDocument.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/XmlIdRegistry.hxx,sfx2/XmlIdRegistry.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/app.hxx,sfx2/app.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/app.hxx,sfx2/app.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/appuno.hxx,sfx2/appuno.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/basedlgs.hxx,sfx2/basedlgs.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/basmgr.hxx,sfx2/basmgr.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/bindings.hxx,sfx2/bindings.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/brokenpackageint.hxx,sfx2/brokenpackageint.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/chalign.hxx,sfx2/chalign.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/childwin.hxx,sfx2/childwin.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/cntids.hrc,sfx2/cntids.hrc))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/controlwrapper.hxx,sfx2/controlwrapper.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/ctrlitem.hxx,sfx2/ctrlitem.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/dialogs.hrc,sfx2/dialogs.hrc))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/dinfdlg.hxx,sfx2/dinfdlg.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/dinfedt.hxx,sfx2/dinfedt.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/dispatch.hxx,sfx2/dispatch.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/dllapi.h,sfx2/dllapi.h))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/docfac.hxx,sfx2/docfac.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/docfile.hxx,sfx2/docfile.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/docfilt.hxx,sfx2/docfilt.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/docinf.hxx,sfx2/docinf.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/docinsert.hxx,sfx2/docinsert.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/dockwin.hxx,sfx2/dockwin.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/docmacromode.hxx,sfx2/docmacromode.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/docstoragemodifylistener.hxx,sfx2/docstoragemodifylistener.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/doctdlg.hxx,sfx2/doctdlg.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/doctempl.hxx,sfx2/doctempl.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/event.hxx,sfx2/event.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/evntconf.hxx,sfx2/evntconf.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/fcontnr.hxx,sfx2/fcontnr.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/filedlghelper.hxx,sfx2/filedlghelper.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/frame.hxx,sfx2/frame.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/frmdescr.hxx,sfx2/frmdescr.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/frmhtml.hxx,sfx2/frmhtml.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/frmhtmlw.hxx,sfx2/frmhtmlw.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/genlink.hxx,sfx2/genlink.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/hintpost.hxx,sfx2/hintpost.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/htmlmode.hxx,sfx2/htmlmode.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/imagemgr.hxx,sfx2/imagemgr.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/imgdef.hxx,sfx2/imgdef.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/imgmgr.hxx,sfx2/imgmgr.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/ipclient.hxx,sfx2/ipclient.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/itemconnect.hxx,sfx2/itemconnect.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/itemwrapper.hxx,sfx2/itemwrapper.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/layout-post.hxx,sfx2/layout-post.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/layout-pre.hxx,sfx2/layout-pre.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/layout-tabdlg.hxx,sfx2/layout-tabdlg.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/layout.hxx,sfx2/layout.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/linkmgr.hxx,sfx2/linkmgr.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/linksrc.hxx,sfx2/linksrc.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/lnkbase.hxx,sfx2/lnkbase.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/mailmodelapi.hxx,sfx2/mailmodelapi.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/mgetempl.hxx,sfx2/mgetempl.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/mieclip.hxx,sfx2/mieclip.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/minarray.hxx,sfx2/minarray.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/minfitem.hxx,sfx2/minfitem.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/minstack.hxx,sfx2/minstack.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/mnuitem.hxx,sfx2/mnuitem.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/mnumgr.hxx,sfx2/mnumgr.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/module.hxx,sfx2/module.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/msg.hxx,sfx2/msg.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/msgpool.hxx,sfx2/msgpool.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/navigat.hxx,sfx2/navigat.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/new.hxx,sfx2/new.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/newstyle.hxx,sfx2/newstyle.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/objface.hxx,sfx2/objface.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/objitem.hxx,sfx2/objitem.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/objsh.hxx,sfx2/objsh.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/opengrf.hxx,sfx2/opengrf.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/passwd.hxx,sfx2/passwd.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/printer.hxx,sfx2/printer.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/printopt.hxx,sfx2/printopt.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/prnmon.hxx,sfx2/prnmon.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/progress.hxx,sfx2/progress.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/querystatus.hxx,sfx2/querystatus.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/request.hxx,sfx2/request.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfx.hrc,sfx2/sfx.hrc))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxbasecontroller.hxx,sfx2/sfxbasecontroller.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxbasemodel.hxx,sfx2/sfxbasemodel.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxcommands.h,sfx2/sfxcommands.h))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxdefs.hxx,sfx2/sfxdefs.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxdlg.hxx,sfx2/sfxdlg.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxhelp.hxx,sfx2/sfxhelp.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxhtml.hxx,sfx2/sfxhtml.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxmodelfactory.hxx,sfx2/sfxmodelfactory.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxresid.hxx,sfx2/sfxresid.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxsids.hrc,sfx2/sfxsids.hrc))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxstatuslistener.hxx,sfx2/sfxstatuslistener.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxuno.hxx,sfx2/sfxuno.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/shell.hxx,sfx2/shell.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/signaturestate.hxx,sfx2/signaturestate.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/stbitem.hxx,sfx2/stbitem.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/styfitem.hxx,sfx2/styfitem.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/styledlg.hxx,sfx2/styledlg.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/tabdlg.hxx,sfx2/tabdlg.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/taskpane.hxx,sfx2/taskpane.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/tbxctrl.hxx,sfx2/tbxctrl.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/templdlg.hxx,sfx2/templdlg.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/titledockwin.hxx,sfx2/titledockwin.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/tplpitem.hxx,sfx2/tplpitem.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/unoctitm.hxx,sfx2/unoctitm.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/userinputinterception.hxx,sfx2/userinputinterception.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/viewfac.hxx,sfx2/viewfac.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/viewfrm.hxx,sfx2/viewfrm.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/viewsh.hxx,sfx2/viewsh.hxx))
diff --git a/sfx2/source/inet/makefile.mk b/sfx2/Package_sdi.mk
index 9347e68a2cdb..43e484b19a2d 100644..100755
--- a/sfx2/source/inet/makefile.mk
+++ b/sfx2/Package_sdi.mk
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
+# Copyright 2000, 2011 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -25,24 +25,6 @@
#
#*************************************************************************
-PRJ=..$/..
-
-PRJNAME=sfx2
-TARGET=inet
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Files --------------------------------------------------------
-
-
-SLOFILES = \
- $(SLO)$/inettbc.obj
-
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
+$(eval $(call gb_Package_Package,sfx2_sdi,$(SRCDIR)/sfx2/sdi))
+$(eval $(call gb_Package_add_file,sfx2_sdi,inc/sfx2/sfx.sdi,sfx.sdi))
+$(eval $(call gb_Package_add_file,sfx2_sdi,inc/sfx2/sfxitems.sdi,sfxitems.sdi))
diff --git a/sfx2/README b/sfx2/README
index 3b160a25203b..3b160a25203b 100644..100755
--- a/sfx2/README
+++ b/sfx2/README
diff --git a/sfx2/inc/about.hxx b/sfx2/inc/about.hxx
index 2e5c4326f7b0..2e5c4326f7b0 100644..100755
--- a/sfx2/inc/about.hxx
+++ b/sfx2/inc/about.hxx
diff --git a/sfx2/inc/arrdecl.hxx b/sfx2/inc/arrdecl.hxx
index c7d181eb1110..c7d181eb1110 100644..100755
--- a/sfx2/inc/arrdecl.hxx
+++ b/sfx2/inc/arrdecl.hxx
diff --git a/sfx2/inc/bitset.hxx b/sfx2/inc/bitset.hxx
index aa25362c93e2..f61e95984fe8 100644..100755
--- a/sfx2/inc/bitset.hxx
+++ b/sfx2/inc/bitset.hxx
@@ -36,54 +36,54 @@ class BitSet
{
private:
void CopyFrom( const BitSet& rSet );
- USHORT nBlocks;
- USHORT nCount;
- ULONG* pBitmap;
+ sal_uInt16 nBlocks;
+ sal_uInt16 nCount;
+ sal_uIntPtr* pBitmap;
public:
- BitSet operator<<( USHORT nOffset ) const;
- BitSet operator>>( USHORT nOffset ) const;
- static USHORT CountBits( ULONG nBits );
- BOOL operator!() const;
+ BitSet operator<<( sal_uInt16 nOffset ) const;
+ BitSet operator>>( sal_uInt16 nOffset ) const;
+ static sal_uInt16 CountBits( sal_uIntPtr nBits );
+ sal_Bool operator!() const;
BitSet();
BitSet( const BitSet& rOrig );
- BitSet( USHORT* pArray, USHORT nSize );
+ BitSet( sal_uInt16* pArray, sal_uInt16 nSize );
~BitSet();
BitSet( const Range& rRange );
- USHORT Count() const;
+ sal_uInt16 Count() const;
BitSet& operator=( const BitSet& rOrig );
- BitSet& operator=( USHORT nBit );
+ BitSet& operator=( sal_uInt16 nBit );
BitSet operator|( const BitSet& rSet ) const;
- BitSet operator|( USHORT nBit ) const;
+ BitSet operator|( sal_uInt16 nBit ) const;
BitSet& operator|=( const BitSet& rSet );
- BitSet& operator|=( USHORT nBit );
+ BitSet& operator|=( sal_uInt16 nBit );
BitSet operator-( const BitSet& rSet ) const;
- BitSet operator-( USHORT nId ) const;
+ BitSet operator-( sal_uInt16 nId ) const;
BitSet& operator-=( const BitSet& rSet );
- BitSet& operator-=( USHORT nBit );
+ BitSet& operator-=( sal_uInt16 nBit );
BitSet operator&( const BitSet& rSet ) const;
BitSet& operator&=( const BitSet& rSet );
BitSet operator^( const BitSet& rSet ) const;
- BitSet operator^( USHORT nBit ) const;
+ BitSet operator^( sal_uInt16 nBit ) const;
BitSet& operator^=( const BitSet& rSet );
- BitSet& operator^=( USHORT nBit );
- BOOL IsRealSubSet( const BitSet& rSet ) const;
- BOOL IsSubSet( const BitSet& rSet ) const;
- BOOL IsRealSuperSet( const BitSet& rSet ) const;
- BOOL Contains( USHORT nBit ) const;
- BOOL IsSuperSet( const BitSet& rSet ) const;
- BOOL operator==( const BitSet& rSet ) const;
- BOOL operator==( USHORT nBit ) const;
- BOOL operator!=( const BitSet& rSet ) const;
- BOOL operator!=( USHORT nBit ) const;
+ BitSet& operator^=( sal_uInt16 nBit );
+ sal_Bool IsRealSubSet( const BitSet& rSet ) const;
+ sal_Bool IsSubSet( const BitSet& rSet ) const;
+ sal_Bool IsRealSuperSet( const BitSet& rSet ) const;
+ sal_Bool Contains( sal_uInt16 nBit ) const;
+ sal_Bool IsSuperSet( const BitSet& rSet ) const;
+ sal_Bool operator==( const BitSet& rSet ) const;
+ sal_Bool operator==( sal_uInt16 nBit ) const;
+ sal_Bool operator!=( const BitSet& rSet ) const;
+ sal_Bool operator!=( sal_uInt16 nBit ) const;
};
//--------------------------------------------------------------------
-// returns TRUE if the set is empty
+// returns sal_True if the set is empty
-inline BOOL BitSet::operator!() const
+inline sal_Bool BitSet::operator!() const
{
return nCount == 0;
}
@@ -91,7 +91,7 @@ inline BOOL BitSet::operator!() const
// returns the number of bits in the bitset
-inline USHORT BitSet::Count() const
+inline sal_uInt16 BitSet::Count() const
{
return nCount;
}
@@ -107,7 +107,7 @@ inline BitSet BitSet::operator|( const BitSet& rSet ) const
// creates the union of a bitset with a single bit
-inline BitSet BitSet::operator|( USHORT nBit ) const
+inline BitSet BitSet::operator|( sal_uInt16 nBit ) const
{
return BitSet(*this) |= nBit;
}
@@ -124,7 +124,7 @@ inline BitSet BitSet::operator-( const BitSet& ) const
// creates the asymetric difference with a single bit
-inline BitSet BitSet::operator-( USHORT ) const
+inline BitSet BitSet::operator-( sal_uInt16 ) const
{
return BitSet();
}
@@ -165,7 +165,7 @@ inline BitSet BitSet::operator^( const BitSet& ) const
// creates the symetric difference with a single bit
-inline BitSet BitSet::operator^( USHORT ) const
+inline BitSet BitSet::operator^( sal_uInt16 ) const
{
return BitSet();
}
@@ -181,7 +181,7 @@ inline BitSet& BitSet::operator^=( const BitSet& )
#ifdef BITSET_READY
// builds the symetric difference with a single bit
-inline BitSet& BitSet::operator^=( USHORT )
+inline BitSet& BitSet::operator^=( sal_uInt16 )
{
// crash!!!
return BitSet();
@@ -191,48 +191,48 @@ inline BitSet& BitSet::operator^=( USHORT )
// determines if the other bitset is a real superset
-inline BOOL BitSet::IsRealSubSet( const BitSet& ) const
+inline sal_Bool BitSet::IsRealSubSet( const BitSet& ) const
{
- return FALSE;
+ return sal_False;
}
//--------------------------------------------------------------------
// detsermines if the other bitset is a superset or equal
-inline BOOL BitSet::IsSubSet( const BitSet& ) const
+inline sal_Bool BitSet::IsSubSet( const BitSet& ) const
{
- return FALSE;
+ return sal_False;
}
//--------------------------------------------------------------------
// determines if the other bitset is a real subset
-inline BOOL BitSet::IsRealSuperSet( const BitSet& ) const
+inline sal_Bool BitSet::IsRealSuperSet( const BitSet& ) const
{
- return FALSE;
+ return sal_False;
}
//--------------------------------------------------------------------
// determines if the other bitset is a subset or equal
-inline BOOL BitSet::IsSuperSet( const BitSet& ) const
+inline sal_Bool BitSet::IsSuperSet( const BitSet& ) const
{
- return FALSE;
+ return sal_False;
}
//--------------------------------------------------------------------
// determines if the bit is the only one in the bitset
-inline BOOL BitSet::operator==( USHORT ) const
+inline sal_Bool BitSet::operator==( sal_uInt16 ) const
{
- return FALSE;
+ return sal_False;
}
//--------------------------------------------------------------------
// determines if the bitsets aren't equal
-inline BOOL BitSet::operator!=( const BitSet& rSet ) const
+inline sal_Bool BitSet::operator!=( const BitSet& rSet ) const
{
return !( *this == rSet );
}
@@ -240,7 +240,7 @@ inline BOOL BitSet::operator!=( const BitSet& rSet ) const
// determines if the bitset doesn't contain only this bit
-inline BOOL BitSet::operator!=( USHORT nBit ) const
+inline sal_Bool BitSet::operator!=( sal_uInt16 nBit ) const
{
return !( *this == nBit );
}
@@ -249,8 +249,8 @@ inline BOOL BitSet::operator!=( USHORT nBit ) const
class IndexBitSet : BitSet
{
public:
- USHORT GetFreeIndex();
- void ReleaseIndex(USHORT i){*this-=i;}
+ sal_uInt16 GetFreeIndex();
+ void ReleaseIndex(sal_uInt16 i){*this-=i;}
};
diff --git a/sfx2/inc/brokenpackageint.hxx b/sfx2/inc/brokenpackageint.hxx
index daa47dcd9d51..daa47dcd9d51 100644..100755
--- a/sfx2/inc/brokenpackageint.hxx
+++ b/sfx2/inc/brokenpackageint.hxx
diff --git a/sfx2/inc/configmgr.hxx b/sfx2/inc/configmgr.hxx
index 5146fd662101..5146fd662101 100644..100755
--- a/sfx2/inc/configmgr.hxx
+++ b/sfx2/inc/configmgr.hxx
diff --git a/sfx2/inc/docvor.hxx b/sfx2/inc/docvor.hxx
index fb4d4e753501..c800d445f6af 100644..100755
--- a/sfx2/inc/docvor.hxx
+++ b/sfx2/inc/docvor.hxx
@@ -60,27 +60,27 @@ friend class SfxOrganizeDlg_Impl;
SfxOrganizeMgr* pMgr;
SfxOrganizeDlg_Impl* pDlg;
- static BOOL bDropMoveOk;
+ static sal_Bool bDropMoveOk;
DECL_LINK( OnAsyncExecuteDrop, ExecuteDropEvent* );
protected:
- virtual BOOL EditingEntry( SvLBoxEntry* pEntry, Selection & );
- virtual BOOL EditedEntry( SvLBoxEntry* pEntry, const String& rNewText );
- virtual BOOL NotifyMoving(SvLBoxEntry *pSource,
+ virtual sal_Bool EditingEntry( SvLBoxEntry* pEntry, Selection & );
+ virtual sal_Bool EditedEntry( SvLBoxEntry* pEntry, const String& rNewText );
+ virtual sal_Bool NotifyMoving(SvLBoxEntry *pSource,
SvLBoxEntry* pTarget,
- SvLBoxEntry *&pNewParent, ULONG &);
- virtual BOOL NotifyCopying(SvLBoxEntry *pSource,
+ SvLBoxEntry *&pNewParent, sal_uIntPtr &);
+ virtual sal_Bool NotifyCopying(SvLBoxEntry *pSource,
SvLBoxEntry* pTarget,
- SvLBoxEntry *&pNewParent, ULONG &);
+ SvLBoxEntry *&pNewParent, sal_uIntPtr &);
virtual void RequestingChilds( SvLBoxEntry* pParent );
virtual long ExpandingHdl();
- virtual BOOL Select( SvLBoxEntry* pEntry, BOOL bSelect=TRUE );
+ virtual sal_Bool Select( SvLBoxEntry* pEntry, sal_Bool bSelect=sal_True );
using SvLBox::ExecuteDrop;
// new d&d
virtual DragDropMode NotifyStartDrag( TransferDataContainer&, SvLBoxEntry* );
- virtual BOOL NotifyAcceptDrop( SvLBoxEntry* );
+ virtual sal_Bool NotifyAcceptDrop( SvLBoxEntry* );
virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt );
virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt );
virtual void DragFinished( sal_Int8 nDropAction );
@@ -99,34 +99,34 @@ public:
inline void SetBitmaps(
const Image &rOFolderBmp, const Image &rCFolderBmp, const Image &rODocBmp, const Image &rCDocBmp
);
- const Image &GetClosedBmp(USHORT nLevel) const;
- const Image &GetOpenedBmp(USHORT nLevel) const;
+ const Image &GetClosedBmp(sal_uInt16 nLevel) const;
+ const Image &GetOpenedBmp(sal_uInt16 nLevel) const;
virtual PopupMenu* CreateContextMenu();
private:
- BOOL IsStandard_Impl( SvLBoxEntry *) const;
- BOOL MoveOrCopyTemplates(SvLBox *pSourceBox,
+ sal_Bool IsStandard_Impl( SvLBoxEntry *) const;
+ sal_Bool MoveOrCopyTemplates(SvLBox *pSourceBox,
SvLBoxEntry *pSource,
SvLBoxEntry* pTarget,
SvLBoxEntry *&pNewParent,
- ULONG &rIdx,
- BOOL bCopy);
- BOOL MoveOrCopyContents(SvLBox *pSourceBox,
+ sal_uIntPtr &rIdx,
+ sal_Bool bCopy);
+ sal_Bool MoveOrCopyContents(SvLBox *pSourceBox,
SvLBoxEntry *pSource,
SvLBoxEntry* pTarget,
SvLBoxEntry *&pNewParent,
- ULONG &rIdx,
- BOOL bCopy);
- inline USHORT GetDocLevel() const;
+ sal_uIntPtr &rIdx,
+ sal_Bool bCopy);
+ inline sal_uInt16 GetDocLevel() const;
SfxObjectShellRef GetObjectShell( const Path& );
- BOOL IsUniqName_Impl( const String &rText,
+ sal_Bool IsUniqName_Impl( const String &rText,
SvLBoxEntry* pParent, SvLBoxEntry* pEntry = 0 ) const;
- USHORT GetLevelCount_Impl( SvLBoxEntry* pParent ) const;
+ sal_uInt16 GetLevelCount_Impl( SvLBoxEntry* pParent ) const;
SvLBoxEntry* InsertEntryByBmpType( const XubString& rText, BMPTYPE eBmpType,
- SvLBoxEntry* pParent = NULL, BOOL bChildsOnDemand = FALSE,
- ULONG nPos = LIST_APPEND, void* pUserData = NULL );
+ SvLBoxEntry* pParent = NULL, sal_Bool bChildsOnDemand = sal_False,
+ sal_uIntPtr nPos = LIST_APPEND, void* pUserData = NULL );
};
#endif // _SFX_HXX
diff --git a/sfx2/inc/filedlghelper.hrc b/sfx2/inc/filedlghelper.hrc
index a5db7b4fdb30..a5db7b4fdb30 100644..100755
--- a/sfx2/inc/filedlghelper.hrc
+++ b/sfx2/inc/filedlghelper.hrc
diff --git a/sfx2/inc/frmload.hxx b/sfx2/inc/frmload.hxx
index b23ae7a5e67b..a35ce9d5a263 100644..100755
--- a/sfx2/inc/frmload.hxx
+++ b/sfx2/inc/frmload.hxx
@@ -97,7 +97,7 @@ private:
) const;
sal_Bool impl_createNewDocWithSlotParam(
- const USHORT _nSlotID,
+ const sal_uInt16 _nSlotID,
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rxFrame,
const bool i_bHidden
);
@@ -110,11 +110,11 @@ private:
::comphelper::NamedValueCollection& io_rDescriptor
) const;
- USHORT impl_findSlotParam(
+ sal_uInt16 impl_findSlotParam(
const ::rtl::OUString& i_rFactoryURL
) const;
- SfxObjectShellLock impl_findObjectShell(
+ SfxObjectShellRef impl_findObjectShell(
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel2 >& i_rxDocument
) const;
diff --git a/sfx2/inc/fwkhelper.hxx b/sfx2/inc/fwkhelper.hxx
index 1b23e4c2bae6..1b23e4c2bae6 100644..100755
--- a/sfx2/inc/fwkhelper.hxx
+++ b/sfx2/inc/fwkhelper.hxx
diff --git a/sfx2/inc/guisaveas.hxx b/sfx2/inc/guisaveas.hxx
index 078816cc431f..28f8379c6f1f 100644..100755
--- a/sfx2/inc/guisaveas.hxx
+++ b/sfx2/inc/guisaveas.hxx
@@ -80,12 +80,6 @@ public:
::rtl::OUString aUserSelectedName,
sal_uInt16 nDocumentSignatureState = SIGNATURESTATE_NOSIGNATURES );
- static ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SearchForFilter(
- const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerQuery >& xFilterQuery,
- const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& aSearchRequest,
- sal_Int32 nMustFlags,
- sal_Int32 nDontFlags );
-
static sal_Bool CheckFilterOptionsAppearence(
const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& xFilterCFG,
const ::rtl::OUString& aFilterName );
diff --git a/sfx2/inc/idpool.hxx b/sfx2/inc/idpool.hxx
index 4585dc560fc4..d5fc4adb0ed7 100644..100755
--- a/sfx2/inc/idpool.hxx
+++ b/sfx2/inc/idpool.hxx
@@ -36,25 +36,25 @@
class IdPool: private BitSet
{
private:
- USHORT nNextFree;
- USHORT nRange;
- USHORT nOffset;
+ sal_uInt16 nNextFree;
+ sal_uInt16 nRange;
+ sal_uInt16 nOffset;
public:
- BOOL Lock( const BitSet& rLockSet );
- BOOL IsLocked( USHORT nId ) const;
- IdPool( USHORT nMin = 1, USHORT nMax = USHRT_MAX );
- USHORT Get();
- BOOL Put( USHORT nId );
- BOOL Lock( const Range& rRange );
- BOOL Lock( USHORT nId );
+ sal_Bool Lock( const BitSet& rLockSet );
+ sal_Bool IsLocked( sal_uInt16 nId ) const;
+ IdPool( sal_uInt16 nMin = 1, sal_uInt16 nMax = USHRT_MAX );
+ sal_uInt16 Get();
+ sal_Bool Put( sal_uInt16 nId );
+ sal_Bool Lock( const Range& rRange );
+ sal_Bool Lock( sal_uInt16 nId );
};
//------------------------------------------------------------------------
-// returns TRUE if the id is locked
+// returns sal_True if the id is locked
-inline BOOL IdPool::IsLocked( USHORT nId ) const
+inline sal_Bool IdPool::IsLocked( sal_uInt16 nId ) const
{
return ( this->Contains(nId-nOffset) );
}
diff --git a/sfx2/inc/inettbc.hxx b/sfx2/inc/inettbc.hxx
index 51a6d90e01eb..f0a73404320c 100644..100755
--- a/sfx2/inc/inettbc.hxx
+++ b/sfx2/inc/inettbc.hxx
@@ -47,7 +47,7 @@ private:
::svt::AcceleratorExecute* pAccExec;
SvtURLBox* GetURLBox() const;
- void OpenURL( const String& rName, BOOL bNew ) const;
+ void OpenURL( const String& rName, sal_Bool bNew ) const;
DECL_LINK( OpenHdl, void* );
DECL_LINK( SelectHdl, void* );
@@ -66,11 +66,11 @@ public:
SFX_DECL_TOOLBOX_CONTROL();
- SfxURLToolBoxControl_Impl( USHORT nSlotId, USHORT nId, ToolBox& rBox );
+ SfxURLToolBoxControl_Impl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rBox );
virtual ~SfxURLToolBoxControl_Impl();
virtual Window* CreateItemWindow( Window* pParent );
- virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState );
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState );
};
#endif
diff --git a/sfx2/inc/macro.hxx b/sfx2/inc/macro.hxx
index d72ebd2e44e9..13c451836313 100644..100755
--- a/sfx2/inc/macro.hxx
+++ b/sfx2/inc/macro.hxx
@@ -17,17 +17,17 @@ class SfxMacro;
class SfxMacroStatement
{
- USHORT nSlotId; // ausgef"uhrte Slot-Id oder 0, wenn manuell
+ sal_uInt16 nSlotId; // ausgef"uhrte Slot-Id oder 0, wenn manuell
::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue > aArgs; // aktuelle Parameter, falls nSlotId != 0
String aStatement; // Statement in BASIC-Syntax (ggf. mit CR/LF)
- BOOL bDone; // auskommentieren wenn kein Done() gerufen
+ sal_Bool bDone; // auskommentieren wenn kein Done() gerufen
void* pDummy; // f"ur alle F"alle zum kompatibel bleiben
#ifdef _SFXMACRO_HXX
private:
void GenerateNameAndArgs_Impl( SfxMacro *pMacro,
const SfxSlot &rSlot,
- BOOL bRequestDone,
+ sal_Bool bRequestDone,
::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >& aArgs );
#endif
@@ -36,28 +36,28 @@ public:
SfxMacroStatement( const String &rTarget,
const SfxSlot &rSlot,
- BOOL bRequestDone,
+ sal_Bool bRequestDone,
::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >& aArgs );
SfxMacroStatement( const SfxShell &rShell,
const String &rTarget,
- BOOL bAbsolute,
+ sal_Bool bAbsolute,
const SfxSlot &rSlot,
- BOOL bRequestDone,
+ sal_Bool bRequestDone,
::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >& aArgs );
SfxMacroStatement( const String &rStatment );
~SfxMacroStatement();
- USHORT GetSlotId() const;
+ sal_uInt16 GetSlotId() const;
const ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >& GetArgs() const;
- BOOL IsDone() const;
+ sal_Bool IsDone() const;
const String& GetStatement() const;
};
//--------------------------------------------------------------------
-inline USHORT SfxMacroStatement::GetSlotId() const
+inline sal_uInt16 SfxMacroStatement::GetSlotId() const
/* [Beschreibung]
@@ -90,7 +90,7 @@ inline const ::com::sun::star::uno::Sequence < ::com::sun::star::beans::Property
//--------------------------------------------------------------------
-inline BOOL SfxMacroStatement::IsDone() const
+inline sal_Bool SfxMacroStatement::IsDone() const
/* [Beschreibung]
diff --git a/sfx2/inc/msgnodei.hxx b/sfx2/inc/msgnodei.hxx
index f73416fde9c7..53c15fc02d24 100644..100755
--- a/sfx2/inc/msgnodei.hxx
+++ b/sfx2/inc/msgnodei.hxx
@@ -40,8 +40,8 @@ struct SfxMsgAttachFile {
int operator==( const SfxMsgAttachFile& rRec ) const
{
if( aName == rRec.aName && aFile == rRec.aFile )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
SfxMsgAttachFile( const String& rFile, const String& rName)
@@ -66,8 +66,8 @@ struct SfxMsgReceiver {
int operator==( const SfxMsgReceiver& rRec ) const
{
if( aName == rRec.aName && eRole == rRec.eRole )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
SfxMsgReceiver( const String& rName, SfxMsgReceiverRole _eRole )
@@ -81,7 +81,7 @@ struct SfxMsgReceiver {
class SfxMsgReceiverList_Impl : public List
{
- ULONG nRef;
+ sal_uIntPtr nRef;
~SfxMsgReceiverList_Impl();
SfxMsgReceiverList_Impl& operator=( const SfxMsgReceiverList_Impl&); //n.i.
public:
@@ -92,7 +92,7 @@ public:
void Store( SvStream& ) const;
void IncRef() { nRef++; }
void DecRef() { nRef--; if( !nRef ) delete this; }
- ULONG GetRefCount() const { return nRef; }
+ sal_uIntPtr GetRefCount() const { return nRef; }
int operator==( const SfxMsgReceiverList_Impl& ) const;
};
@@ -105,8 +105,8 @@ public:
TYPEINFO();
SfxMsgReceiverListItem();
- SfxMsgReceiverListItem( USHORT nWhich );
- SfxMsgReceiverListItem( USHORT nWhich, SvStream& rStream );
+ SfxMsgReceiverListItem( sal_uInt16 nWhich );
+ SfxMsgReceiverListItem( sal_uInt16 nWhich, SvStream& rStream );
SfxMsgReceiverListItem( const SfxMsgReceiverListItem& rItem );
~SfxMsgReceiverListItem();
@@ -117,14 +117,14 @@ public:
SfxMapUnit ePresMetric,
XubString &rText ) const;
- USHORT Count() const;
- SfxMsgReceiver* GetObject( USHORT nPos );
- void Remove( USHORT nPos );
+ sal_uInt16 Count() const;
+ SfxMsgReceiver* GetObject( sal_uInt16 nPos );
+ void Remove( sal_uInt16 nPos );
void Add( const SfxMsgReceiver& );
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create( SvStream &, USHORT nVersion ) const;
- virtual SvStream& Store( SvStream &, USHORT nItemVersion ) const;
+ virtual SfxPoolItem* Create( SvStream &, sal_uInt16 nVersion ) const;
+ virtual SvStream& Store( SvStream &, sal_uInt16 nItemVersion ) const;
};
@@ -132,7 +132,7 @@ public:
class SfxMsgAttachFileList_Impl : public List
{
- ULONG nRef;
+ sal_uIntPtr nRef;
~SfxMsgAttachFileList_Impl();
SfxMsgAttachFileList_Impl& operator=( const SfxMsgAttachFileList_Impl&); //n.i.
@@ -141,12 +141,12 @@ public:
SfxMsgAttachFileList_Impl(const SfxMsgAttachFileList_Impl&);
int operator==( const SfxMsgAttachFileList_Impl& rRec ) const;
- SfxMsgAttachFile* GetReceiver(ULONG nPos) { return (SfxMsgAttachFile*)List::GetObject(nPos); }
+ SfxMsgAttachFile* GetReceiver(sal_uIntPtr nPos) { return (SfxMsgAttachFile*)List::GetObject(nPos); }
void Load( SvStream& );
void Store( SvStream& ) const;
void IncRef() { nRef++; }
void DecRef() { nRef--; if( !nRef ) delete this; }
- ULONG GetRefCount() const { return nRef; }
+ sal_uIntPtr GetRefCount() const { return nRef; }
};
class SfxMsgAttachFileListItem : public SfxPoolItem
@@ -158,8 +158,8 @@ public:
TYPEINFO();
SfxMsgAttachFileListItem();
- SfxMsgAttachFileListItem( USHORT nWhich );
- SfxMsgAttachFileListItem( USHORT nWhich, SvStream& rStream );
+ SfxMsgAttachFileListItem( sal_uInt16 nWhich );
+ SfxMsgAttachFileListItem( sal_uInt16 nWhich, SvStream& rStream );
SfxMsgAttachFileListItem( const SfxMsgAttachFileListItem& rItem );
~SfxMsgAttachFileListItem();
@@ -170,14 +170,14 @@ public:
SfxMapUnit ePresMetric,
XubString &rText ) const;
- USHORT Count() const;
- SfxMsgAttachFile* GetObject( USHORT nPos );
- void Remove( USHORT nPos );
+ sal_uInt16 Count() const;
+ SfxMsgAttachFile* GetObject( sal_uInt16 nPos );
+ void Remove( sal_uInt16 nPos );
void Add( const SfxMsgAttachFile& );
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create( SvStream &, USHORT nVersion ) const;
- virtual SvStream& Store( SvStream &, USHORT nItemVersion ) const;
+ virtual SfxPoolItem* Create( SvStream &, sal_uInt16 nVersion ) const;
+ virtual SvStream& Store( SvStream &, sal_uInt16 nItemVersion ) const;
};
@@ -196,17 +196,17 @@ class SfxMsgPriorityItem : public SfxEnumItem
public:
TYPEINFO();
- SfxMsgPriorityItem( USHORT nWhich, SfxMsgPriority = MSG_PRIORITY_NORMAL);
+ SfxMsgPriorityItem( sal_uInt16 nWhich, SfxMsgPriority = MSG_PRIORITY_NORMAL);
virtual SfxPoolItem* Clone( SfxItemPool* pPool=0 ) const;
- virtual SfxPoolItem* Create( SvStream&, USHORT ) const;
- virtual SvStream& Store( SvStream&, USHORT ) const;
+ virtual SfxPoolItem* Create( SvStream&, sal_uInt16 ) const;
+ virtual SvStream& Store( SvStream&, sal_uInt16 ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePresentation,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresentationMetric,
String &rText ) const;
- virtual USHORT GetValueCount() const;
- virtual String GetValueTextByPos( USHORT nPos ) const;
+ virtual sal_uInt16 GetValueCount() const;
+ virtual String GetValueTextByPos( sal_uInt16 nPos ) const;
inline SfxMsgPriorityItem& operator=(const SfxMsgPriorityItem& rPrio)
{
diff --git a/sfx2/inc/orgmgr.hxx b/sfx2/inc/orgmgr.hxx
index 25d598df4a14..da26a55f0921 100644..100755
--- a/sfx2/inc/orgmgr.hxx
+++ b/sfx2/inc/orgmgr.hxx
@@ -45,8 +45,8 @@ public:
SfxObjectList();
~SfxObjectList();
- const String& GetBaseName( USHORT nId ) const;
- const String& GetFileName( USHORT nId ) const;
+ const String& GetBaseName( sal_uInt16 nId ) const;
+ const String& GetFileName( sal_uInt16 nId ) const;
};
class IntlWrapper;
@@ -67,8 +67,8 @@ private:
SfxDocumentTemplates* pTemplates;
SfxOrganizeListBox_Impl* pLeftBox;
SfxOrganizeListBox_Impl* pRightBox;
- BOOL bDeleteTemplates :1;
- BOOL bModified :1;
+ sal_Bool bDeleteTemplates :1;
+ sal_Bool bModified :1;
SfxOrganizeListBox_Impl* GetOther( SfxOrganizeListBox_Impl* );
@@ -78,27 +78,27 @@ public:
SfxDocumentTemplates* pTempl = NULL );
~SfxOrganizeMgr();
- BOOL Copy( USHORT nTargetRegion, USHORT nTargetIdx, USHORT nSourceRegion, USHORT nSourceIdx );
- BOOL Move( USHORT nTargetRegion, USHORT nTargetIdx, USHORT nSourceRegion, USHORT nSourceIdx );
- BOOL Delete( SfxOrganizeListBox_Impl* pCaller, USHORT nRegion, USHORT nIdx );
- BOOL InsertDir( SfxOrganizeListBox_Impl* pCaller, const String& rName, USHORT nRegion );
- BOOL SetName( const String& rName, USHORT nRegion, USHORT nIdx = USHRT_MAX );
- BOOL CopyTo( USHORT nRegion, USHORT nIdx, const String& rName ) const;
- BOOL CopyFrom( SfxOrganizeListBox_Impl* pCaller, USHORT nRegion, USHORT nIdx, String& rName );
+ sal_Bool Copy( sal_uInt16 nTargetRegion, sal_uInt16 nTargetIdx, sal_uInt16 nSourceRegion, sal_uInt16 nSourceIdx );
+ sal_Bool Move( sal_uInt16 nTargetRegion, sal_uInt16 nTargetIdx, sal_uInt16 nSourceRegion, sal_uInt16 nSourceIdx );
+ sal_Bool Delete( SfxOrganizeListBox_Impl* pCaller, sal_uInt16 nRegion, sal_uInt16 nIdx );
+ sal_Bool InsertDir( SfxOrganizeListBox_Impl* pCaller, const String& rName, sal_uInt16 nRegion );
+ sal_Bool SetName( const String& rName, sal_uInt16 nRegion, sal_uInt16 nIdx = USHRT_MAX );
+ sal_Bool CopyTo( sal_uInt16 nRegion, sal_uInt16 nIdx, const String& rName ) const;
+ sal_Bool CopyFrom( SfxOrganizeListBox_Impl* pCaller, sal_uInt16 nRegion, sal_uInt16 nIdx, String& rName );
- BOOL Rescan();
- BOOL InsertFile( SfxOrganizeListBox_Impl* pCaller, const String& rFileName );
+ sal_Bool Rescan();
+ sal_Bool InsertFile( SfxOrganizeListBox_Impl* pCaller, const String& rFileName );
- BOOL IsModified() const { return bModified ? TRUE : FALSE; }
+ sal_Bool IsModified() const { return bModified ? sal_True : sal_False; }
const SfxDocumentTemplates* GetTemplates() const { return pTemplates; }
SfxObjectList& GetObjectList() { return *pImpl->pDocList; }
const SfxObjectList& GetObjectList() const { return *pImpl->pDocList; }
- SfxObjectShellRef CreateObjectShell( USHORT nIdx );
- SfxObjectShellRef CreateObjectShell( USHORT nRegion, USHORT nIdx );
- BOOL DeleteObjectShell( USHORT );
- BOOL DeleteObjectShell( USHORT, USHORT );
+ SfxObjectShellRef CreateObjectShell( sal_uInt16 nIdx );
+ SfxObjectShellRef CreateObjectShell( sal_uInt16 nRegion, sal_uInt16 nIdx );
+ sal_Bool DeleteObjectShell( sal_uInt16 );
+ sal_Bool DeleteObjectShell( sal_uInt16, sal_uInt16 );
void SaveAll( Window* pParent );
};
diff --git a/sfx2/inc/pch/precompiled_sfx2.cxx b/sfx2/inc/pch/precompiled_sfx2.cxx
index 7f5f9dd3a307..7f5f9dd3a307 100644..100755
--- a/sfx2/inc/pch/precompiled_sfx2.cxx
+++ b/sfx2/inc/pch/precompiled_sfx2.cxx
diff --git a/sfx2/inc/pch/precompiled_sfx2.hxx b/sfx2/inc/pch/precompiled_sfx2.hxx
index 5bd28af4724a..5c4a41e7d6f2 100644..100755
--- a/sfx2/inc/pch/precompiled_sfx2.hxx
+++ b/sfx2/inc/pch/precompiled_sfx2.hxx
@@ -545,7 +545,6 @@
#include "svl/ownlist.hxx"
#include "svtools/parhtml.hxx"
#include "unotools/pathoptions.hxx"
-#include "svl/pickerhelper.hxx"
#include "svl/poolitem.hxx"
#include "svtools/printoptions.hxx"
#include "unotools/printwarningoptions.hxx"
@@ -656,7 +655,7 @@
#include "vcl/stdtext.hxx"
#include "vcl/timer.hxx"
#include "vcl/unohelp.hxx"
-#include "vcl/wintypes.hxx"
+#include "tools/wintypes.hxx"
#include "osl/diagnose.h"
#include "osl/module.hxx"
#include "osl/mutex.hxx"
diff --git a/sfx2/inc/progind.hxx b/sfx2/inc/progind.hxx
index e06665e41779..e06665e41779 100644..100755
--- a/sfx2/inc/progind.hxx
+++ b/sfx2/inc/progind.hxx
diff --git a/sfx2/inc/resmgr.hxx b/sfx2/inc/resmgr.hxx
index 2802a812b009..3e0fc3cfc1c5 100644..100755
--- a/sfx2/inc/resmgr.hxx
+++ b/sfx2/inc/resmgr.hxx
@@ -43,30 +43,30 @@ class SfxResourceManager
{
SfxResMgrArr aResMgrArr;
SfxResMgrArr aResMgrBmpArr;
- USHORT nEnterCount;
+ sal_uInt16 nEnterCount;
SfxMessageTable* pMessageTable;
private:
void ClearMsgTable_Impl();
- SfxMessageDescription* MakeDesc_Impl(USHORT);
+ SfxMessageDescription* MakeDesc_Impl(sal_uInt16);
public:
SfxResourceManager();
~SfxResourceManager();
- USHORT RegisterResource( const char *pFileName);
- void ReleaseResource( USHORT nRegisterId );
+ sal_uInt16 RegisterResource( const char *pFileName);
+ void ReleaseResource( sal_uInt16 nRegisterId );
- USHORT RegisterBitmap(const char *pMono, const char *pColor);
+ sal_uInt16 RegisterBitmap(const char *pMono, const char *pColor);
- USHORT RegisterBitmap( const char *pSingleFile );
- void ReleaseBitmap( USHORT nRegisterId );
+ sal_uInt16 RegisterBitmap( const char *pSingleFile );
+ void ReleaseBitmap( sal_uInt16 nRegisterId );
- Bitmap GetAllBitmap( USHORT nBmpsPerRow );
+ Bitmap GetAllBitmap( sal_uInt16 nBmpsPerRow );
void Enter();
void Leave();
- SfxMessageDescription* CreateDescription( USHORT nId );
+ SfxMessageDescription* CreateDescription( sal_uInt16 nId );
};
diff --git a/sfx2/inc/sfx2/DocumentMetadataAccess.hxx b/sfx2/inc/sfx2/DocumentMetadataAccess.hxx
index d22f37304445..d22f37304445 100644..100755
--- a/sfx2/inc/sfx2/DocumentMetadataAccess.hxx
+++ b/sfx2/inc/sfx2/DocumentMetadataAccess.hxx
diff --git a/sfx2/inc/sfx2/Metadatable.hxx b/sfx2/inc/sfx2/Metadatable.hxx
index 143f0ec52efb..143f0ec52efb 100644..100755
--- a/sfx2/inc/sfx2/Metadatable.hxx
+++ b/sfx2/inc/sfx2/Metadatable.hxx
diff --git a/sfx2/inc/QuerySaveDocument.hxx b/sfx2/inc/sfx2/QuerySaveDocument.hxx
index 753f6a4b2607..753f6a4b2607 100644..100755
--- a/sfx2/inc/QuerySaveDocument.hxx
+++ b/sfx2/inc/sfx2/QuerySaveDocument.hxx
diff --git a/sfx2/inc/sfx2/XmlIdRegistry.hxx b/sfx2/inc/sfx2/XmlIdRegistry.hxx
index 00c5ae88063a..00c5ae88063a 100644..100755
--- a/sfx2/inc/sfx2/XmlIdRegistry.hxx
+++ b/sfx2/inc/sfx2/XmlIdRegistry.hxx
diff --git a/sfx2/inc/sfx2/app.hxx b/sfx2/inc/sfx2/app.hxx
index 745d650da12a..226aa2d5b051 100644..100755
--- a/sfx2/inc/sfx2/app.hxx
+++ b/sfx2/inc/sfx2/app.hxx
@@ -32,6 +32,7 @@
#include "sfx2/dllapi.h"
#include "sal/types.h"
#include <tools/solar.h>
+#include <tools/errcode.hxx>
#include <svl/smplhint.hxx>
#include <svl/poolitem.hxx>
#include <vcl/image.hxx>
@@ -99,6 +100,8 @@ struct SfxStbCtrlFactory;
struct SfxTbxCtrlFactory;
class SimpleResMgr;
class ModalDialog;
+class SbxArray;
+class SbxValue;
typedef ::std::vector< SfxMedium* > SfxMediumList;
@@ -117,7 +120,7 @@ public:
{ return new SfxLinkItem( *this ); }
virtual int operator==( const SfxPoolItem& rL) const
{ return ((SfxLinkItem&)rL).aLink == aLink; }
- SfxLinkItem( USHORT nWhichId, const Link& rValue ) : SfxPoolItem( nWhichId )
+ SfxLinkItem( sal_uInt16 nWhichId, const Link& rValue ) : SfxPoolItem( nWhichId )
{ aLink = rValue; }
const Link& GetValue() const { return aLink; }
};
@@ -139,7 +142,7 @@ public:
SfxItemFactory_Impl* GetFactory_Impl( TypeId ) const;
const SvGlobalName* GetGlobalName( const SfxPoolItem* pItem ) const;
SfxPoolItem* Create(
- const SvGlobalName& rName, USHORT nId, SvStream* pStrm = 0) const;
+ const SvGlobalName& rName, sal_uInt16 nId, SvStream* pStrm = 0) const;
void RegisterItemFactory(
const SvGlobalName& rName, SfxItemCreateFunc );
};
@@ -163,14 +166,13 @@ class SFX2_DLLPUBLIC SfxApplication: public SfxShell
SfxAppData_Impl* pAppData_Impl;
DECL_DLLPRIVATE_LINK( GlobalBasicErrorHdl_Impl, StarBASIC* );
- SAL_DLLPRIVATE BOOL SaveAll_Impl(BOOL bPrompt = FALSE, BOOL bAutoSave = FALSE);
- SAL_DLLPRIVATE short QuerySave_Impl(SfxObjectShell &, BOOL bAutoSave = FALSE);
- SAL_DLLPRIVATE void InitializeDisplayName_Impl();
+ SAL_DLLPRIVATE sal_Bool SaveAll_Impl(sal_Bool bPrompt = sal_False, sal_Bool bAutoSave = sal_False);
+ SAL_DLLPRIVATE short QuerySave_Impl(SfxObjectShell &, sal_Bool bAutoSave = sal_False);
static SfxApplication* Create();
void Init();
void Exit();
- void SettingsChange( USHORT, const AppSettings & );
+ void SettingsChange( sal_uInt16, const AppSettings & );
void Main( );
void PreInit( );
void Quit();
@@ -185,11 +187,9 @@ public:
static SfxApplication* GetOrCreate();
// Resource Manager
- bool InitLabelResMgr( const char* _pLabelPrefix, bool _bException = false );
SfxResourceManager& GetResourceManager() const;
ResMgr* GetSfxResManager();
SimpleResMgr* GetSimpleResManager();
- ResMgr* GetLabelResManager() const;
static ResMgr* CreateResManager( const char *pPrefix );
SimpleResMgr* CreateSimpleResManager();
@@ -202,14 +202,14 @@ public:
const String& rMimeType,
const ::com::sun::star::uno::Any & rValue );
::sfx2::SvLinkSource* DdeCreateLinkSource( const String& rItem );
- BOOL InitializeDde();
+ sal_Bool InitializeDde();
const DdeService* GetDdeService() const;
DdeService* GetDdeService();
void AddDdeTopic( SfxObjectShell* );
void RemoveDdeTopic( SfxObjectShell* );
// "static" methods
- ULONG LoadTemplate( SfxObjectShellLock& xDoc, const String& rFileName, BOOL bCopy=TRUE, SfxItemSet* pArgs = 0 );
+ sal_uIntPtr LoadTemplate( SfxObjectShellLock& xDoc, const String& rFileName, sal_Bool bCopy=sal_True, SfxItemSet* pArgs = 0 );
::com::sun::star::uno::Reference< ::com::sun::star::task::XStatusIndicator > GetStatusIndicator() const;
SfxTemplateDialog* GetTemplateDialog();
Window* GetTopWindow() const;
@@ -219,40 +219,38 @@ public:
// members
SfxFilterMatcher& GetFilterMatcher();
- SfxMacroConfig* GetMacroConfig() const;
SfxProgress* GetProgress() const;
const String& GetLastSaveDirectory() const;
- USHORT GetFreeIndex();
- void ReleaseIndex(USHORT i);
- SfxEventConfiguration* GetEventConfig() const;
+ sal_uInt16 GetFreeIndex();
+ void ReleaseIndex(sal_uInt16 i);
// Basic/Scripting
static sal_Bool IsXScriptURL( const String& rScriptURL );
static ::rtl::OUString ChooseScript();
- static void MacroOrganizer( INT16 nTabId );
+ static void MacroOrganizer( sal_Int16 nTabId );
+ static ErrCode CallBasic( const String&, BasicManager*, SbxArray *pArgs, SbxValue *pRet );
+ static ErrCode CallAppBasic( const String& i_macroName, SbxArray* i_args = NULL, SbxValue* i_ret = NULL )
+ { return CallBasic( i_macroName, SfxApplication::GetOrCreate()->GetBasicManager(), i_args, i_ret ); }
BasicManager* GetBasicManager();
com::sun::star::uno::Reference< com::sun::star::script::XLibraryContainer >
GetDialogContainer();
com::sun::star::uno::Reference< com::sun::star::script::XLibraryContainer >
GetBasicContainer();
StarBASIC* GetBasic();
- USHORT SaveBasicManager() const;
- USHORT SaveBasicAndDialogContainer() const;
- void EnterBasicCall();
- bool IsInBasicCall() const;
- void LeaveBasicCall();
+ sal_uInt16 SaveBasicManager() const;
+ sal_uInt16 SaveBasicAndDialogContainer() const;
// misc.
- BOOL GetOptions(SfxItemSet &);
+ sal_Bool GetOptions(SfxItemSet &);
void SetOptions(const SfxItemSet &);
- virtual void Invalidate(USHORT nId = 0);
+ virtual void Invalidate(sal_uInt16 nId = 0);
void NotifyEvent(const SfxEventHint& rEvent, bool bSynchron = true );
- BOOL IsDowning() const;
- BOOL IsSecureURL( const INetURLObject &rURL, const String *pReferer ) const;
+ sal_Bool IsDowning() const;
+ sal_Bool IsSecureURL( const INetURLObject &rURL, const String *pReferer ) const;
static SfxObjectShellRef DocAlreadyLoaded( const String &rName,
- BOOL bSilent,
- BOOL bActivate,
- BOOL bForbidVisible = FALSE,
+ sal_Bool bSilent,
+ sal_Bool bActivate,
+ sal_Bool bForbidVisible = sal_False,
const String* pPostStr = 0);
void ResetLastDir();
@@ -260,7 +258,7 @@ public:
SAL_DLLPRIVATE SfxDispatcher* GetAppDispatcher_Impl();
SAL_DLLPRIVATE SfxDispatcher* GetDispatcher_Impl();
- SAL_DLLPRIVATE BOOL QueryExit_Impl();
+ SAL_DLLPRIVATE sal_Bool QueryExit_Impl();
SAL_DLLPRIVATE void SetOptions_Impl(const SfxItemSet &);
SAL_DLLPRIVATE bool Initialize_Impl();
@@ -268,7 +266,7 @@ public:
// Object-Factories/global arrays
SAL_DLLPRIVATE void RegisterChildWindow_Impl(SfxModule*, SfxChildWinFactory*);
- SAL_DLLPRIVATE void RegisterChildWindowContext_Impl(SfxModule*, USHORT, SfxChildWinContextFactory*);
+ SAL_DLLPRIVATE void RegisterChildWindowContext_Impl(SfxModule*, sal_uInt16, SfxChildWinContextFactory*);
SAL_DLLPRIVATE void RegisterStatusBarControl_Impl(SfxModule*, SfxStbCtrlFactory*);
SAL_DLLPRIVATE void RegisterMenuControl_Impl(SfxModule*, SfxMenuCtrlFactory*);
SAL_DLLPRIVATE void RegisterToolBoxControl_Impl( SfxModule*, SfxTbxCtrlFactory*);
@@ -290,8 +288,6 @@ public:
SAL_DLLPRIVATE void MiscState_Impl(SfxItemSet &);
SAL_DLLPRIVATE void PropExec_Impl(SfxRequest &);
SAL_DLLPRIVATE void PropState_Impl(SfxItemSet &);
- SAL_DLLPRIVATE void MacroExec_Impl(SfxRequest &);
- SAL_DLLPRIVATE void MacroState_Impl(SfxItemSet &);
SAL_DLLPRIVATE void INetExecute_Impl(SfxRequest &);
SAL_DLLPRIVATE void INetState_Impl(SfxItemSet &);
SAL_DLLPRIVATE void OfaExec_Impl(SfxRequest &);
@@ -300,7 +296,6 @@ public:
SAL_DLLPRIVATE void SetProgress_Impl(SfxProgress *);
SAL_DLLPRIVATE const String& GetLastDir_Impl() const;
SAL_DLLPRIVATE void SetLastDir_Impl( const String & );
- SAL_DLLPRIVATE void PlayMacro_Impl( SfxRequest &rReq, StarBASIC *pBas );
SAL_DLLPRIVATE void EnterAsynchronCall_Impl();
SAL_DLLPRIVATE bool IsInAsynchronCall_Impl() const;
diff --git a/sfx2/inc/sfx2/appuno.hxx b/sfx2/inc/sfx2/appuno.hxx
index 9c5727e62f1a..9c5727e62f1a 100644..100755
--- a/sfx2/inc/sfx2/appuno.hxx
+++ b/sfx2/inc/sfx2/appuno.hxx
diff --git a/sfx2/inc/sfx2/basedlgs.hxx b/sfx2/inc/sfx2/basedlgs.hxx
index 66f3b67be9a6..3327c2afeb49 100644..100755
--- a/sfx2/inc/sfx2/basedlgs.hxx
+++ b/sfx2/inc/sfx2/basedlgs.hxx
@@ -66,7 +66,6 @@ class SFX2_DLLPUBLIC SfxModalDialog: public ModalDialog
{
sal_uInt32 nUniqId;
String aExtraData;
- Timer aTimer;
const SfxItemSet* pInputSet;
SfxItemSet* pOutputSet;
@@ -74,8 +73,6 @@ private:
SAL_DLLPRIVATE SfxModalDialog(SfxModalDialog &); // not defined
SAL_DLLPRIVATE void operator =(SfxModalDialog &); // not defined
- DECL_DLLPRIVATE_LINK( TimerHdl_Impl, Timer* );
-
SAL_DLLPRIVATE void SetDialogData_Impl();
SAL_DLLPRIVATE void GetDialogData_Impl();
SAL_DLLPRIVATE void init();
@@ -115,7 +112,7 @@ protected:
SfxModelessDialog( SfxBindings*, SfxChildWindow*,
Window*, WinBits nWinStyle = WB_STDMODELESS );
~SfxModelessDialog();
- virtual BOOL Close();
+ virtual sal_Bool Close();
virtual void Resize();
virtual void Move();
virtual void StateChanged( StateChangedType nStateChange );
@@ -154,7 +151,7 @@ protected:
~SfxFloatingWindow();
virtual void StateChanged( StateChangedType nStateChange );
- virtual BOOL Close();
+ virtual sal_Bool Close();
virtual void Resize();
virtual void Move();
virtual long Notify( NotifyEvent& rNEvt );
@@ -186,14 +183,14 @@ struct SingleTabDlgImpl
m_pTabPage( NULL ), m_pSfxPage( NULL ), m_pLine( NULL ), m_pInfoImage( NULL ) {}
};
-typedef USHORT* (*GetTabPageRanges)(); // liefert internationale Which-Werte
+typedef sal_uInt16* (*GetTabPageRanges)(); // liefert internationale Which-Werte
class SFX2_DLLPUBLIC SfxSingleTabDialog : public SfxModalDialog
{
public:
- SfxSingleTabDialog( Window* pParent, const SfxItemSet& rOptionsSet, USHORT nUniqueId );
- SfxSingleTabDialog( Window* pParent, USHORT nUniqueId, const SfxItemSet* pInSet = 0 );
- SfxSingleTabDialog( Window* pParent, USHORT nUniqueId, const String& rInfoURL );
+ SfxSingleTabDialog( Window* pParent, const SfxItemSet& rOptionsSet, sal_uInt16 nUniqueId );
+ SfxSingleTabDialog( Window* pParent, sal_uInt16 nUniqueId, const SfxItemSet* pInSet = 0 );
+ SfxSingleTabDialog( Window* pParent, sal_uInt16 nUniqueId, const String& rInfoURL );
virtual ~SfxSingleTabDialog();
@@ -201,7 +198,7 @@ public:
void SetTabPage( SfxTabPage* pTabPage, GetTabPageRanges pRangesFunc = 0 );
SfxTabPage* GetTabPage() const { return pImpl->m_pSfxPage; }
- const USHORT* GetInputRanges( const SfxItemPool& rPool );
+ const sal_uInt16* GetInputRanges( const SfxItemPool& rPool );
// void SetInputSet( const SfxItemSet* pInSet ) { pOptions = pInSet; }
// const SfxItemSet* GetOutputItemSet() const { return pOutSet; }
OKButton* GetOKButton() const { return pOKBtn; }
@@ -210,7 +207,7 @@ public:
private:
GetTabPageRanges fnGetRanges;
- USHORT* pRanges;
+ sal_uInt16* pRanges;
OKButton* pOKBtn;
CancelButton* pCancelBtn;
diff --git a/sfx2/inc/basmgr.hxx b/sfx2/inc/sfx2/basmgr.hxx
index d173efec5d50..37096a6637ab 100644..100755
--- a/sfx2/inc/basmgr.hxx
+++ b/sfx2/inc/sfx2/basmgr.hxx
@@ -30,6 +30,7 @@
#define _SFX_BASMGR_HXX
#include <basic/basmgr.hxx>
+#include <svtools/svtools.hrc>
#endif //_SFX_BASMGR_HXX
diff --git a/sfx2/inc/sfx2/bindings.hxx b/sfx2/inc/sfx2/bindings.hxx
index 4d64cd5e3b39..c6a9e8870b3d 100644..100755
--- a/sfx2/inc/sfx2/bindings.hxx
+++ b/sfx2/inc/sfx2/bindings.hxx
@@ -120,7 +120,7 @@ friend class SfxBindings_Impl;
private:
SAL_DLLPRIVATE const SfxPoolItem* Execute_Impl( sal_uInt16 nSlot, const SfxPoolItem **pArgs, sal_uInt16 nModi,
- SfxCallMode nCall, const SfxPoolItem **pInternalArgs, BOOL bGlobalOnly=FALSE);
+ SfxCallMode nCall, const SfxPoolItem **pInternalArgs, sal_Bool bGlobalOnly=sal_False);
SAL_DLLPRIVATE void SetSubBindings_Impl( SfxBindings* );
SAL_DLLPRIVATE void UpdateSlotServer_Impl(); // SlotServer aktualisieren
SAL_DLLPRIVATE SfxItemSet* CreateSet_Impl( SfxStateCache* &pCache,
@@ -200,18 +200,18 @@ public:
SAL_DLLPRIVATE void ClearCache_Impl( sal_uInt16 nSlotId );
SAL_DLLPRIVATE sal_Bool IsInUpdate_Impl() const{ return IsInUpdate(); }
SAL_DLLPRIVATE void RegisterInternal_Impl( SfxControllerItem& rBinding );
- SAL_DLLPRIVATE void Register_Impl( SfxControllerItem& rBinding, BOOL );
+ SAL_DLLPRIVATE void Register_Impl( SfxControllerItem& rBinding, sal_Bool );
SAL_DLLPRIVATE SfxWorkWindow* GetWorkWindow_Impl() const;
SAL_DLLPRIVATE void SetWorkWindow_Impl( SfxWorkWindow* );
SAL_DLLPRIVATE SfxBindings* GetSubBindings_Impl( sal_Bool bTop = sal_False ) const;
SAL_DLLPRIVATE void InvalidateUnoControllers_Impl();
SAL_DLLPRIVATE void RegisterUnoController_Impl( SfxUnoControllerItem* );
SAL_DLLPRIVATE void ReleaseUnoController_Impl( SfxUnoControllerItem* );
- SAL_DLLPRIVATE BOOL ExecuteCommand_Impl( const String& rCommand );
+ SAL_DLLPRIVATE sal_Bool ExecuteCommand_Impl( const String& rCommand );
SAL_DLLPRIVATE void SetRecorder_Impl( com::sun::star::uno::Reference< com::sun::star::frame::XDispatchRecorder >& );
- SAL_DLLPRIVATE void ExecuteGlobal_Impl( USHORT nId );
+ SAL_DLLPRIVATE void ExecuteGlobal_Impl( sal_uInt16 nId );
SAL_DLLPRIVATE void InvalidateSlotsInMap_Impl();
- SAL_DLLPRIVATE void AddSlotToInvalidateSlotsMap_Impl( USHORT nId );
+ SAL_DLLPRIVATE void AddSlotToInvalidateSlotsMap_Impl( sal_uInt16 nId );
};
#ifdef DBG_UTIL
diff --git a/sfx2/source/appl/sfxdll.cxx b/sfx2/inc/sfx2/brokenpackageint.hxx
index 18951978b426..5186e875a6ea 100644..100755
--- a/sfx2/source/appl/sfxdll.cxx
+++ b/sfx2/inc/sfx2/brokenpackageint.hxx
@@ -1,4 +1,3 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -26,40 +25,31 @@
*
************************************************************************/
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sfx2.hxx"
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+#include <com/sun/star/document/BrokenPackageRequest.hpp>
+#include <com/sun/star/task/XInteractionApprove.hpp>
+#include <com/sun/star/task/XInteractionDisapprove.hpp>
-#ifdef WIN
-#include <svwin.h>
-
-// Static DLL Administrative variables
-static HINSTANCE hDLLInst = 0;
-
-//==========================================================================
-
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
+class RequestPackageReparation_Impl;
+class SFX2_DLLPUBLIC RequestPackageReparation
{
-#ifndef WNT
- if ( nHeap )
- UnlockData( 0 );
-#endif
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-
-//--------------------------------------------------------------------------
-
-extern "C" int CALLBACK WEP( int )
+ RequestPackageReparation_Impl* pImp;
+public:
+ RequestPackageReparation( ::rtl::OUString aName );
+ ~RequestPackageReparation();
+ sal_Bool isApproved();
+ com::sun::star::uno::Reference < ::com::sun::star::task::XInteractionRequest > GetRequest();
+};
+
+class NotifyBrokenPackage_Impl;
+class SFX2_DLLPUBLIC NotifyBrokenPackage
{
- return 1;
-}
-
-
-//==========================================================================
-
-#endif
+ NotifyBrokenPackage_Impl* pImp;
+public:
+ NotifyBrokenPackage( ::rtl::OUString aName );
+ ~NotifyBrokenPackage();
+ sal_Bool isAborted();
+ com::sun::star::uno::Reference < ::com::sun::star::task::XInteractionRequest > GetRequest();
+};
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/inc/sfx2/chalign.hxx b/sfx2/inc/sfx2/chalign.hxx
index 4cacc5e63147..0b2967bdbd70 100644..100755
--- a/sfx2/inc/sfx2/chalign.hxx
+++ b/sfx2/inc/sfx2/chalign.hxx
@@ -56,7 +56,7 @@ enum SfxChildAlignment
};
// "Uberpr"uft, ob ein g"ultiges Alignment verwendet wird
-inline BOOL SfxChildAlignValid( SfxChildAlignment eAlign )
+inline sal_Bool SfxChildAlignValid( SfxChildAlignment eAlign )
{
return ( eAlign >= SFX_ALIGN_HIGHESTTOP && eAlign <= SFX_ALIGN_NOALIGNMENT );
}
diff --git a/sfx2/inc/sfx2/childwin.hxx b/sfx2/inc/sfx2/childwin.hxx
index e96163de4b3b..3760c1d30be9 100644..100755
--- a/sfx2/inc/sfx2/childwin.hxx
+++ b/sfx2/inc/sfx2/childwin.hxx
@@ -153,7 +153,7 @@ public:
virtual void Resizing( Size& rSize );
virtual sal_Bool Close();
- static void RegisterChildWindowContext(SfxModule*, USHORT, SfxChildWinContextFactory*);
+ static void RegisterChildWindowContext(SfxModule*, sal_uInt16, SfxChildWinContextFactory*);
};
class SFX2_DLLPUBLIC SfxChildWindow
@@ -192,7 +192,7 @@ public:
Point GetPosPixel()
{ return pWindow->GetPosPixel(); }
virtual void Hide();
- virtual void Show( USHORT nFlags );
+ virtual void Show( sal_uInt16 nFlags );
sal_uInt16 GetFlags() const
{ return GetInfo().nFlags; }
sal_Bool CanGetFocus() const;
@@ -220,7 +220,7 @@ public:
void SetHideAtToggle( sal_Bool bOn );
sal_Bool IsHideAtToggle() const;
sal_Bool IsVisible() const;
- void SetWantsFocus( BOOL );
+ void SetWantsFocus( sal_Bool );
sal_Bool WantsFocus() const;
virtual sal_Bool QueryClose();
@@ -259,7 +259,7 @@ public:
SfxBindings *pBindings, SfxChildWinInfo* pInfo ) \
{ \
SfxChildWindowContext *pContext = new Class(pParent, \
- /* cast is safe here! */static_cast< USHORT >(ShellClass::GetInterfaceId()), \
+ /* cast is safe here! */static_cast< sal_uInt16 >(ShellClass::GetInterfaceId()), \
pBindings,pInfo); \
return pContext; \
} \
diff --git a/sfx2/inc/sfx2/cntids.hrc b/sfx2/inc/sfx2/cntids.hrc
index ef652981f76d..ef652981f76d 100644..100755
--- a/sfx2/inc/sfx2/cntids.hrc
+++ b/sfx2/inc/sfx2/cntids.hrc
diff --git a/sfx2/inc/sfx2/controlwrapper.hxx b/sfx2/inc/sfx2/controlwrapper.hxx
index ac772d3940ca..5959e5eed2ea 100644..100755
--- a/sfx2/inc/sfx2/controlwrapper.hxx
+++ b/sfx2/inc/sfx2/controlwrapper.hxx
@@ -49,9 +49,9 @@ namespace sfx {
// ============================================================================
/** List position type of VCL ListBox. */
-typedef USHORT ListBoxPosType;
+typedef sal_uInt16 ListBoxPosType;
/** List position type of SVTOOLS ValueSet. */
-typedef USHORT ValueSetPosType;
+typedef sal_uInt16 ValueSetPosType;
// ============================================================================
// Helpers
@@ -246,7 +246,7 @@ public:
/** A wrapper for the VCL CheckBox. */
class SFX2_DLLPUBLIC CheckBoxWrapper:
- public SingleControlWrapper< CheckBox, BOOL >
+ public SingleControlWrapper< CheckBox, sal_Bool >
{
public:
explicit CheckBoxWrapper( CheckBox& rCheckBox );
@@ -254,8 +254,8 @@ public:
virtual bool IsControlDontKnow() const;
virtual void SetControlDontKnow( bool bSet );
- virtual BOOL GetControlValue() const;
- virtual void SetControlValue( BOOL bValue );
+ virtual sal_Bool GetControlValue() const;
+ virtual void SetControlValue( sal_Bool bValue );
};
// ----------------------------------------------------------------------------
@@ -316,13 +316,13 @@ public:
// ----------------------------------------------------------------------------
-typedef NumericFieldWrapper< INT16 > Int16NumericFieldWrapper;
-typedef NumericFieldWrapper< UINT16 > UInt16NumericFieldWrapper;
-typedef NumericFieldWrapper< INT32 > Int32NumericFieldWrapper;
-typedef NumericFieldWrapper< UINT32 > UInt32NumericFieldWrapper;
+typedef NumericFieldWrapper< sal_Int16 > Int16NumericFieldWrapper;
+typedef NumericFieldWrapper< sal_uInt16 > UInt16NumericFieldWrapper;
+typedef NumericFieldWrapper< sal_Int32 > Int32NumericFieldWrapper;
+typedef NumericFieldWrapper< sal_uInt32 > UInt32NumericFieldWrapper;
-typedef NumericFieldWrapper< USHORT > UShortNumericFieldWrapper;
-typedef NumericFieldWrapper< ULONG > ULongNumericFieldWrapper;
+typedef NumericFieldWrapper< sal_uInt16 > UShortNumericFieldWrapper;
+typedef NumericFieldWrapper< sal_uIntPtr > ULongNumericFieldWrapper;
// ============================================================================
@@ -351,13 +351,13 @@ private:
// ----------------------------------------------------------------------------
-typedef MetricFieldWrapper< INT16 > Int16MetricFieldWrapper;
-typedef MetricFieldWrapper< UINT16 > UInt16MetricFieldWrapper;
-typedef MetricFieldWrapper< INT32 > Int32MetricFieldWrapper;
-typedef MetricFieldWrapper< UINT32 > UInt32MetricFieldWrapper;
+typedef MetricFieldWrapper< sal_Int16 > Int16MetricFieldWrapper;
+typedef MetricFieldWrapper< sal_uInt16 > UInt16MetricFieldWrapper;
+typedef MetricFieldWrapper< sal_Int32 > Int32MetricFieldWrapper;
+typedef MetricFieldWrapper< sal_uInt32 > UInt32MetricFieldWrapper;
-typedef MetricFieldWrapper< USHORT > UShortMetricFieldWrapper;
-typedef MetricFieldWrapper< ULONG > ULongMetricFieldWrapper;
+typedef MetricFieldWrapper< sal_uInt16 > UShortMetricFieldWrapper;
+typedef MetricFieldWrapper< sal_uIntPtr > ULongMetricFieldWrapper;
// ============================================================================
@@ -393,13 +393,13 @@ public:
// ----------------------------------------------------------------------------
-typedef ListBoxWrapper< INT16 > Int16ListBoxWrapper;
-typedef ListBoxWrapper< UINT16 > UInt16ListBoxWrapper;
-typedef ListBoxWrapper< INT32 > Int32ListBoxWrapper;
-typedef ListBoxWrapper< UINT32 > UInt32ListBoxWrapper;
+typedef ListBoxWrapper< sal_Int16 > Int16ListBoxWrapper;
+typedef ListBoxWrapper< sal_uInt16 > UInt16ListBoxWrapper;
+typedef ListBoxWrapper< sal_Int32 > Int32ListBoxWrapper;
+typedef ListBoxWrapper< sal_uInt32 > UInt32ListBoxWrapper;
-typedef ListBoxWrapper< USHORT > UShortListBoxWrapper;
-typedef ListBoxWrapper< ULONG > ULongListBoxWrapper;
+typedef ListBoxWrapper< sal_uInt16 > UShortListBoxWrapper;
+typedef ListBoxWrapper< sal_uIntPtr > ULongListBoxWrapper;
// ============================================================================
@@ -435,13 +435,13 @@ public:
// ----------------------------------------------------------------------------
-typedef ValueSetWrapper< INT16 > Int16ValueSetWrapper;
-typedef ValueSetWrapper< UINT16 > UInt16ValueSetWrapper;
-typedef ValueSetWrapper< INT32 > Int32ValueSetWrapper;
-typedef ValueSetWrapper< UINT32 > UInt32ValueSetWrapper;
+typedef ValueSetWrapper< sal_Int16 > Int16ValueSetWrapper;
+typedef ValueSetWrapper< sal_uInt16 > UInt16ValueSetWrapper;
+typedef ValueSetWrapper< sal_Int32 > Int32ValueSetWrapper;
+typedef ValueSetWrapper< sal_uInt32 > UInt32ValueSetWrapper;
-typedef ValueSetWrapper< USHORT > UShortValueSetWrapper;
-typedef ValueSetWrapper< ULONG > ULongValueSetWrapper;
+typedef ValueSetWrapper< sal_uInt16 > UShortValueSetWrapper;
+typedef ValueSetWrapper< sal_uIntPtr > ULongValueSetWrapper;
// ============================================================================
// Multi control wrappers
@@ -640,7 +640,7 @@ ValueT ListBoxWrapper< ValueT >::GetControlValue() const
template< typename ValueT >
void ListBoxWrapper< ValueT >::SetControlValue( ValueT nValue )
{
- USHORT nPos = GetPosFromValue( nValue );
+ sal_uInt16 nPos = GetPosFromValue( nValue );
if( nPos != this->GetNotFoundPos() )
this->GetControl().SelectEntryPos( nPos );
}
@@ -656,7 +656,7 @@ ValueT ValueSetWrapper< ValueT >::GetControlValue() const
template< typename ValueT >
void ValueSetWrapper< ValueT >::SetControlValue( ValueT nValue )
{
- USHORT nPos = GetPosFromValue( nValue );
+ sal_uInt16 nPos = GetPosFromValue( nValue );
if( nPos != this->GetNotFoundPos() )
this->GetControl().SelectItem( nPos );
}
diff --git a/sfx2/inc/sfx2/ctrlitem.hxx b/sfx2/inc/sfx2/ctrlitem.hxx
index 2d138ba64827..f5ee81b977a1 100644..100755
--- a/sfx2/inc/sfx2/ctrlitem.hxx
+++ b/sfx2/inc/sfx2/ctrlitem.hxx
@@ -40,14 +40,14 @@ class SvStream;
class SFX2_DLLPUBLIC SfxControllerItem
{
private:
- USHORT nId;
+ sal_uInt16 nId;
SfxControllerItem* pNext; // zu benachrichtigendes weiteres ControllerItem
SfxBindings* pBindings;
protected:
//#if defined( DBG_UTIL ) && defined( _SOLAR__PRIVATE )
#if defined( DBG_UTIL )
- SAL_DLLPRIVATE void CheckConfigure_Impl( ULONG nType );
+ SAL_DLLPRIVATE void CheckConfigure_Impl( sal_uIntPtr nType );
#endif
public:
@@ -61,13 +61,13 @@ public:
}
SfxControllerItem(); // fuer arrays
- SfxControllerItem( USHORT nId, SfxBindings & );
+ SfxControllerItem( sal_uInt16 nId, SfxBindings & );
virtual ~SfxControllerItem();
- void Bind( USHORT nNewId, SfxBindings * = 0); // in SfxBindings registrieren
+ void Bind( sal_uInt16 nNewId, SfxBindings * = 0); // in SfxBindings registrieren
void UnBind();
void ReBind();
- BOOL IsBound() const;
+ sal_Bool IsBound() const;
void UpdateSlot();
void ClearCache();
void SetBindings(SfxBindings &rBindings) { pBindings = &rBindings; }
@@ -75,10 +75,10 @@ public:
SfxControllerItem* GetItemLink();
SfxControllerItem* ChangeItemLink( SfxControllerItem* pNewLink );
- void SetId( USHORT nItemId );
- USHORT GetId() const { return nId; }
+ void SetId( sal_uInt16 nItemId );
+ sal_uInt16 GetId() const { return nId; }
- virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
const SfxPoolItem* pState );
virtual void DeleteFloatingWindow();
@@ -86,9 +86,9 @@ public:
static SfxItemState GetItemState( const SfxPoolItem* pState );
- SAL_DLLPRIVATE BOOL IsBindable_Impl() const
+ SAL_DLLPRIVATE sal_Bool IsBindable_Impl() const
{ return pBindings != NULL; }
- SAL_DLLPRIVATE void BindInternal_Impl( USHORT nNewId, SfxBindings* );
+ SAL_DLLPRIVATE void BindInternal_Impl( sal_uInt16 nNewId, SfxBindings* );
};
//====================================================================
@@ -98,11 +98,11 @@ class SFX2_DLLPUBLIC SfxStatusForwarder: public SfxControllerItem
SfxControllerItem* pMaster;
protected:
- virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
const SfxPoolItem* pState );
public:
- SfxStatusForwarder( USHORT nSlotId,
+ SfxStatusForwarder( sal_uInt16 nSlotId,
SfxControllerItem&rMaster );
};
diff --git a/sfx2/inc/sfx2/dialogs.hrc b/sfx2/inc/sfx2/dialogs.hrc
index 97e9dd725c9a..97e9dd725c9a 100644..100755
--- a/sfx2/inc/sfx2/dialogs.hrc
+++ b/sfx2/inc/sfx2/dialogs.hrc
diff --git a/sfx2/inc/sfx2/dinfdlg.hxx b/sfx2/inc/sfx2/dinfdlg.hxx
index 2ee0e6ab67a4..b6cc70f41156 100644..100755
--- a/sfx2/inc/sfx2/dinfdlg.hxx
+++ b/sfx2/inc/sfx2/dinfdlg.hxx
@@ -163,8 +163,8 @@ public:
virtual SfxPoolItem* Clone( SfxItemPool* pPool = NULL ) const;
virtual int operator==( const SfxPoolItem& ) const;
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
};
// class SfxDocumentPage -------------------------------------------------
@@ -208,7 +208,7 @@ private:
String aUnknownSize;
String aMultiSignedStr;
- BOOL bEnableUseUserData : 1,
+ sal_Bool bEnableUseUserData : 1,
bHandleDelete : 1;
DECL_LINK( DeleteHdl, PushButton * );
@@ -218,7 +218,7 @@ private:
protected:
SfxDocumentPage( Window* pParent, const SfxItemSet& );
- virtual BOOL FillItemSet( SfxItemSet& );
+ virtual sal_Bool FillItemSet( SfxItemSet& );
virtual void Reset( const SfxItemSet& );
public:
@@ -245,7 +245,7 @@ private:
protected:
SfxDocumentDescPage( Window* pParent, const SfxItemSet& );
- virtual BOOL FillItemSet( SfxItemSet& );
+ virtual sal_Bool FillItemSet( SfxItemSet& );
virtual void Reset( const SfxItemSet& );
public:
@@ -290,9 +290,9 @@ private:
void ChangeState( STATE eNewState ); // S_Init is not a valid value here
// also checks corresponding radiobutton
- void EnableNoUpdate( BOOL bEnable );
- void EnableReload( BOOL bEnable );
- void EnableForward( BOOL bEnable );
+ void EnableNoUpdate( sal_Bool bEnable );
+ void EnableReload( sal_Bool bEnable );
+ void EnableForward( sal_Bool bEnable );
DECL_LINK( ClickHdlNoUpdate, Control* );
DECL_LINK( ClickHdlReload, Control* );
@@ -306,7 +306,7 @@ protected:
SfxInternetPage( Window* pParent, const SfxItemSet& );
~SfxInternetPage();
- virtual BOOL FillItemSet( SfxItemSet& );
+ virtual sal_Bool FillItemSet( SfxItemSet& );
virtual void Reset( const SfxItemSet& );
virtual int DeactivatePage( SfxItemSet* pSet = 0 );
@@ -319,7 +319,7 @@ public:
class SFX2_DLLPUBLIC SfxDocumentInfoDialog : public SfxTabDialog
{
protected:
- virtual void PageCreated( USHORT nId, SfxTabPage& rPage );
+ virtual void PageCreated( sal_uInt16 nId, SfxTabPage& rPage );
public:
SfxDocumentInfoDialog( Window* pParent, const SfxItemSet& );
@@ -430,7 +430,7 @@ public:
inline void CheckYes() { m_aYesButton.Check(); }
inline void CheckNo() { m_aNoButton.Check(); }
- inline bool IsYesChecked() const { return m_aYesButton.IsChecked() != FALSE; }
+ inline bool IsYesChecked() const { return m_aYesButton.IsChecked() != sal_False; }
};
// struct CustomPropertyLine ---------------------------------------------
@@ -502,7 +502,7 @@ public:
~CustomPropertiesWindow();
void InitControls( HeaderBar* pHeaderBar, const ScrollBar* pScrollBar );
- USHORT GetVisibleLineCount() const;
+ sal_uInt16 GetVisibleLineCount() const;
inline sal_Int32 GetLineHeight() const { return m_nLineHeight; }
void AddLine( const ::rtl::OUString& sName, com::sun::star::uno::Any& rAny );
bool AreAllLinesValid() const;
@@ -552,9 +552,9 @@ public:
class SfxCustomPropertiesPage : public SfxTabPage
{
private:
- FixedText m_aPropertiesFT;
CustomPropertiesControl m_aPropertiesCtrl;
PushButton m_aAddBtn;
+ FixedText m_aPropertiesFT; // Sym2_5121----, Moved by Steve Yin
DECL_LINK( AddHdl, PushButton* );
@@ -563,7 +563,7 @@ private:
protected:
SfxCustomPropertiesPage( Window* pParent, const SfxItemSet& );
- virtual BOOL FillItemSet( SfxItemSet& );
+ virtual sal_Bool FillItemSet( SfxItemSet& );
virtual void Reset( const SfxItemSet& );
virtual int DeactivatePage( SfxItemSet* pSet = NULL );
diff --git a/sfx2/inc/dinfedt.hxx b/sfx2/inc/sfx2/dinfedt.hxx
index 1560ae450da8..1560ae450da8 100644..100755
--- a/sfx2/inc/dinfedt.hxx
+++ b/sfx2/inc/sfx2/dinfedt.hxx
diff --git a/sfx2/inc/sfx2/dispatch.hxx b/sfx2/inc/sfx2/dispatch.hxx
index ece26ef891d8..2e9c39e8b027 100644..100755
--- a/sfx2/inc/sfx2/dispatch.hxx
+++ b/sfx2/inc/sfx2/dispatch.hxx
@@ -83,23 +83,23 @@ typedef SfxItemPtrArray SfxItemArray_Impl;
class SfxExecuteItem : public SfxItemPtrArray, public SfxPoolItem
{
- USHORT nSlot;
+ sal_uInt16 nSlot;
SfxCallMode eCall;
- USHORT nModifier;
+ sal_uInt16 nModifier;
public:
- USHORT GetSlot() const { return nSlot; }
- USHORT GetModifier() const { return nModifier; }
- void SetModifier( USHORT nModifierP ) { nModifier = nModifierP; }
+ sal_uInt16 GetSlot() const { return nSlot; }
+ sal_uInt16 GetModifier() const { return nModifier; }
+ void SetModifier( sal_uInt16 nModifierP ) { nModifier = nModifierP; }
SfxCallMode GetCallMode() const { return eCall; }
void SetCallMode( SfxCallMode eMode ) { eCall = eMode; }
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
SfxExecuteItem(
- USHORT nWhich, USHORT nSlot, SfxCallMode eMode,
+ sal_uInt16 nWhich, sal_uInt16 nSlot, SfxCallMode eMode,
const SfxPoolItem *pArg1, ... );
SfxExecuteItem(
- USHORT nWhich, USHORT nSlot, SfxCallMode eMode );
+ sal_uInt16 nWhich, sal_uInt16 nSlot, SfxCallMode eMode );
SfxExecuteItem( const SfxExecuteItem& );
};
@@ -108,11 +108,11 @@ public:
class SFX2_DLLPUBLIC SfxDispatcher
{
SfxDispatcher_Impl* pImp;
- BOOL bFlushed;
+ sal_Bool bFlushed;
private:
// auf temporaer ausgewerteten Todos suchen
- SAL_DLLPRIVATE BOOL CheckVirtualStack( const SfxShell& rShell, BOOL bDeep );
+ SAL_DLLPRIVATE sal_Bool CheckVirtualStack( const SfxShell& rShell, sal_Bool bDeep );
#ifndef _SFX_HXX
@@ -122,8 +122,8 @@ friend class SfxViewFrame;
DECL_DLLPRIVATE_LINK( EventHdl_Impl, void * );
DECL_DLLPRIVATE_LINK( PostMsgHandler, SfxRequest * );
- SAL_DLLPRIVATE int Call_Impl( SfxShell& rShell, const SfxSlot &rSlot, SfxRequest &rReq, BOOL bRecord );
- SAL_DLLPRIVATE sal_uInt32 _Update_Impl( BOOL,BOOL,BOOL,SfxWorkWindow*);
+ SAL_DLLPRIVATE int Call_Impl( SfxShell& rShell, const SfxSlot &rSlot, SfxRequest &rReq, sal_Bool bRecord );
+ SAL_DLLPRIVATE void _Update_Impl( sal_Bool,sal_Bool,sal_Bool,SfxWorkWindow*);
SAL_DLLPRIVATE void CollectTools_Impl(SfxWorkWindow*);
protected:
@@ -133,15 +133,15 @@ friend class SfxPopupMenuManager;
friend class SfxHelp;
// Fuer die Bindings: Finden einer Message; Level fuer
// erneuten Zugriff
- SAL_DLLPRIVATE BOOL _TryIntercept_Impl( USHORT nId, SfxSlotServer &rServer, BOOL bModal );
- BOOL _FindServer( USHORT nId, SfxSlotServer &rServer, BOOL bModal );
- BOOL _FillState( const SfxSlotServer &rServer,
+ SAL_DLLPRIVATE sal_Bool _TryIntercept_Impl( sal_uInt16 nId, SfxSlotServer &rServer, sal_Bool bModal );
+ sal_Bool _FindServer( sal_uInt16 nId, SfxSlotServer &rServer, sal_Bool bModal );
+ sal_Bool _FillState( const SfxSlotServer &rServer,
SfxItemSet &rState, const SfxSlot *pRealSlot );
const SfxPoolItem* _Execute( const SfxSlotServer &rServer );
void _Execute( SfxShell &rShell, const SfxSlot &rSlot,
SfxRequest &rReq,
SfxCallMode eCall = SFX_CALLMODE_STANDARD);
- const SfxPoolItem* _Execute( USHORT nSlot, SfxCallMode eCall,
+ const SfxPoolItem* _Execute( sal_uInt16 nSlot, SfxCallMode eCall,
va_list pArgs, const SfxPoolItem *pArg1 );
#endif
@@ -157,48 +157,48 @@ public:
virtual ~SfxDispatcher();
const SfxPoolItem* Execute( const SfxExecuteItem& rItem );
- virtual USHORT ExecuteFunction( USHORT nSID, SfxPoolItem** ppArgs=0, USHORT nMode=0 );
- USHORT ExecuteFunction( USHORT nSID, const SfxItemSet& rArgs , USHORT nMode=0 );
+ virtual sal_uInt16 ExecuteFunction( sal_uInt16 nSID, SfxPoolItem** ppArgs=0, sal_uInt16 nMode=0 );
+ sal_uInt16 ExecuteFunction( sal_uInt16 nSID, const SfxItemSet& rArgs , sal_uInt16 nMode=0 );
- virtual void SetExecuteMode( USHORT );
+ virtual void SetExecuteMode( sal_uInt16 );
- const SfxPoolItem* Execute( USHORT nSlot,
+ const SfxPoolItem* Execute( sal_uInt16 nSlot,
SfxCallMode nCall = SFX_CALLMODE_SLOT,
const SfxPoolItem **pArgs = 0,
- USHORT nModi = 0,
+ sal_uInt16 nModi = 0,
const SfxPoolItem **pInternalArgs = 0);
- const SfxPoolItem* Execute( USHORT nSlot,
+ const SfxPoolItem* Execute( sal_uInt16 nSlot,
SfxCallMode nCall,
SfxItemSet* pArgs,
SfxItemSet* pInternalArgs,
- USHORT nModi = 0);
+ sal_uInt16 nModi = 0);
- const SfxPoolItem* Execute( USHORT nSlot,
+ const SfxPoolItem* Execute( sal_uInt16 nSlot,
SfxCallMode nCall,
const SfxPoolItem *pArg1, ... );
- const SfxPoolItem* Execute( USHORT nSlot,
+ const SfxPoolItem* Execute( sal_uInt16 nSlot,
SfxCallMode nCall,
const SfxItemSet &rArgs );
- const SfxPoolItem* Execute( USHORT nSlot,
+ const SfxPoolItem* Execute( sal_uInt16 nSlot,
SfxCallMode nCall,
- USHORT nModi,
+ sal_uInt16 nModi,
const SfxItemSet &rArgs );
- USHORT GetSlotId( const String& rCommand );
+ sal_uInt16 GetSlotId( const String& rCommand );
const SfxSlot* GetSlot( const String& rCommand );
- BOOL IsActive( const SfxShell& rShell );
- BOOL IsOnTop( const SfxShell& rShell );
- USHORT GetShellLevel( const SfxShell &rShell );
+ sal_Bool IsActive( const SfxShell& rShell );
+ sal_Bool IsOnTop( const SfxShell& rShell );
+ sal_uInt16 GetShellLevel( const SfxShell &rShell );
SfxBindings* GetBindings() const;
void Push( SfxShell& rShell );
- void Pop( SfxShell& rShell, USHORT nMode = 0 );
+ void Pop( SfxShell& rShell, sal_uInt16 nMode = 0 );
- SfxShell* GetShell(USHORT nIdx) const;
+ SfxShell* GetShell(sal_uInt16 nIdx) const;
SfxViewFrame* GetFrame() const;
SfxModule* GetModule() const;
// caller has to clean up the Manager on his own
@@ -206,63 +206,60 @@ public:
void ExecutePopup( const ResId &rId,
Window *pWin = 0, const Point *pPosPixel = 0 );
- static void ExecutePopup( USHORT nConfigId = 0,
+ static void ExecutePopup( sal_uInt16 nConfigId = 0,
Window *pWin = 0, const Point *pPosPixel = 0 );
- static void ExecutePopup( USHORT nConfigId,
+ static void ExecutePopup( sal_uInt16 nConfigId,
Window *pWin, const Point *pPosPixel,
const SfxPoolItem *pArg1, ... );
- void EnterAction( const String& rName );
- void LeaveAction();
-
- BOOL IsAppDispatcher() const;
- BOOL IsFlushed() const;
+ sal_Bool IsAppDispatcher() const;
+ sal_Bool IsFlushed() const;
void Flush();
- void Lock( BOOL bLock );
- BOOL IsLocked( USHORT nSID = 0 ) const;
- void SetSlotFilter( BOOL bEnable = FALSE,
- USHORT nCount = 0, const USHORT *pSIDs = 0 );
+ void Lock( sal_Bool bLock );
+ sal_Bool IsLocked( sal_uInt16 nSID = 0 ) const;
+ void SetSlotFilter( sal_Bool bEnable = sal_False,
+ sal_uInt16 nCount = 0, const sal_uInt16 *pSIDs = 0 );
- void HideUI( BOOL bHide = TRUE );
- void ShowObjectBar(USHORT nId, SfxShell *pShell=0) const;
- sal_uInt32 GetObjectBarId( USHORT nPos ) const;
+ void HideUI( sal_Bool bHide = sal_True );
+ void ShowObjectBar(sal_uInt16 nId, SfxShell *pShell=0) const;
+ sal_uInt32 GetObjectBarId( sal_uInt16 nPos ) const;
- SfxItemState QueryState( USHORT nSID, const SfxPoolItem* &rpState );
- SfxItemState QueryState( USHORT nSID, ::com::sun::star::uno::Any& rAny );
+ SfxItemState QueryState( sal_uInt16 nSID, const SfxPoolItem* &rpState );
+ SfxItemState QueryState( sal_uInt16 nSID, ::com::sun::star::uno::Any& rAny );
- BOOL IsAllowed( USHORT nSlot ) const;
+ sal_Bool IsAllowed( sal_uInt16 nSlot ) const;
::com::sun::star::frame::XDispatch* GetDispatchInterface( const String& );
void SetDisableFlags( sal_uInt32 nFlags );
sal_uInt32 GetDisableFlags() const;
- SAL_DLLPRIVATE BOOL HasSlot_Impl( USHORT );
+ SAL_DLLPRIVATE sal_Bool HasSlot_Impl( sal_uInt16 );
SAL_DLLPRIVATE void SetMenu_Impl();
- SAL_DLLPRIVATE long Update_Impl( BOOL bForce = FALSE ); // ObjectBars etc.
- SAL_DLLPRIVATE BOOL IsUpdated_Impl() const;
+ SAL_DLLPRIVATE void Update_Impl( sal_Bool bForce = sal_False ); // ObjectBars etc.
+ SAL_DLLPRIVATE sal_Bool IsUpdated_Impl() const;
SAL_DLLPRIVATE void DebugOutput_Impl() const;
SAL_DLLPRIVATE void ResetObjectBars_Impl();
- SAL_DLLPRIVATE int GetShellAndSlot_Impl( USHORT nSlot, SfxShell **ppShell, const SfxSlot **ppSlot,
- BOOL bOwnShellsOnly, BOOL bModal, BOOL bRealSlot=TRUE );
- SAL_DLLPRIVATE void LockUI_Impl( BOOL bLock = TRUE );
- SAL_DLLPRIVATE void SetReadOnly_Impl( BOOL bOn );
- SAL_DLLPRIVATE BOOL GetReadOnly_Impl() const;
- SAL_DLLPRIVATE BOOL IsSlotEnabledByFilter_Impl( USHORT nSID ) const;
- SAL_DLLPRIVATE void SetQuietMode_Impl( BOOL bOn );
- SAL_DLLPRIVATE void SetModalMode_Impl( BOOL bOn );
- SAL_DLLPRIVATE BOOL IsReadOnlyShell_Impl( USHORT nShell ) const;
+ SAL_DLLPRIVATE int GetShellAndSlot_Impl( sal_uInt16 nSlot, SfxShell **ppShell, const SfxSlot **ppSlot,
+ sal_Bool bOwnShellsOnly, sal_Bool bModal, sal_Bool bRealSlot=sal_True );
+ SAL_DLLPRIVATE void LockUI_Impl( sal_Bool bLock = sal_True );
+ SAL_DLLPRIVATE void SetReadOnly_Impl( sal_Bool bOn );
+ SAL_DLLPRIVATE sal_Bool GetReadOnly_Impl() const;
+ SAL_DLLPRIVATE sal_Bool IsSlotEnabledByFilter_Impl( sal_uInt16 nSID ) const;
+ SAL_DLLPRIVATE void SetQuietMode_Impl( sal_Bool bOn );
+ SAL_DLLPRIVATE void SetModalMode_Impl( sal_Bool bOn );
+ SAL_DLLPRIVATE sal_Bool IsReadOnlyShell_Impl( sal_uInt16 nShell ) const;
SAL_DLLPRIVATE void RemoveShell_Impl( SfxShell& rShell );
- SAL_DLLPRIVATE void InsertShell_Impl( SfxShell& rShell, USHORT nPos );
+ SAL_DLLPRIVATE void InsertShell_Impl( SfxShell& rShell, sal_uInt16 nPos );
SAL_DLLPRIVATE void DoParentActivate_Impl();
SAL_DLLPRIVATE void DoParentDeactivate_Impl();
- SAL_DLLPRIVATE void DoActivate_Impl( BOOL bMDI, SfxViewFrame* pOld );
- SAL_DLLPRIVATE void DoDeactivate_Impl( BOOL bMDI, SfxViewFrame* pNew );
- SAL_DLLPRIVATE void InvalidateBindings_Impl(BOOL);
- SAL_DLLPRIVATE USHORT GetNextToolBox_Impl( USHORT nPos, USHORT nType, String *pStr );
+ SAL_DLLPRIVATE void DoActivate_Impl( sal_Bool bMDI, SfxViewFrame* pOld );
+ SAL_DLLPRIVATE void DoDeactivate_Impl( sal_Bool bMDI, SfxViewFrame* pNew );
+ SAL_DLLPRIVATE void InvalidateBindings_Impl(sal_Bool);
+ SAL_DLLPRIVATE sal_uInt16 GetNextToolBox_Impl( sal_uInt16 nPos, sal_uInt16 nType, String *pStr );
};
//--------------------------------------------------------------------
-inline BOOL SfxDispatcher::IsFlushed() const
+inline sal_Bool SfxDispatcher::IsFlushed() const
/* [Beschreibung]
@@ -283,9 +280,9 @@ inline void SfxDispatcher::Flush()
Diese Methode f"uhrt ausstehenden Push- und Pop-Befehle aus.
F"ur <SfxShell>s, die dabei neu auf den Stack kommen, wird
- <SfxShell::Activate(BOOL)> mit bMDI == TRUE aufgerufen, f"ur
- SfxShells, die vom Stack entfernt werden, wird <SfxShell::Deactivate(BOOL)>
- mit bMDI == TRUE aufgerufen.
+ <SfxShell::Activate(sal_Bool)> mit bMDI == sal_True aufgerufen, f"ur
+ SfxShells, die vom Stack entfernt werden, wird <SfxShell::Deactivate(sal_Bool)>
+ mit bMDI == sal_True aufgerufen.
*/
{
@@ -312,7 +309,7 @@ inline void SfxDispatcher::Push( SfxShell& rShell )
//--------------------------------------------------------------------
-inline BOOL SfxDispatcher::IsActive( const SfxShell& rShell )
+inline sal_Bool SfxDispatcher::IsActive( const SfxShell& rShell )
/* [Beschreibung]
@@ -321,22 +318,22 @@ inline BOOL SfxDispatcher::IsActive( const SfxShell& rShell )
[R"uckgabewert]
- BOOL TRUE
+ sal_Bool sal_True
Die SfxShell-Instanz befindet sich auf dem
SfxDispatcher.
- FALSE
+ sal_False
Die SfxShell-Instanz befindet sich nicht auf dem
SfxDispatcher.
*/
{
- return CheckVirtualStack( rShell, TRUE );
+ return CheckVirtualStack( rShell, sal_True );
}
//--------------------------------------------------------------------
-inline BOOL SfxDispatcher::IsOnTop( const SfxShell& rShell )
+inline sal_Bool SfxDispatcher::IsOnTop( const SfxShell& rShell )
/* [Beschreibung]
@@ -345,18 +342,18 @@ inline BOOL SfxDispatcher::IsOnTop( const SfxShell& rShell )
[R"uckgabewert]
- BOOL TRUE
+ sal_Bool sal_True
Die SfxShell-Instanz befindet sich als oberste
SfxShell auf dem SfxDispatcher.
- FALSE
+ sal_False
Die SfxShell-Instanz befindet sich nicht als
oberste SfxShell auf dem SfxDispatcher.
*/
{
- return CheckVirtualStack( rShell, FALSE );
+ return CheckVirtualStack( rShell, sal_False );
}
//--------------------------------------------------------------------
diff --git a/sfx2/inc/sfx2/dllapi.h b/sfx2/inc/sfx2/dllapi.h
index 82018b6480e5..82018b6480e5 100644..100755
--- a/sfx2/inc/sfx2/dllapi.h
+++ b/sfx2/inc/sfx2/dllapi.h
diff --git a/sfx2/inc/sfx2/docfac.hxx b/sfx2/inc/sfx2/docfac.hxx
index 9e6eae704730..9be57c9bb528 100644..100755
--- a/sfx2/inc/sfx2/docfac.hxx
+++ b/sfx2/inc/sfx2/docfac.hxx
@@ -88,12 +88,12 @@ public:
String GetModuleName() const;
void SetDocumentTypeNameResource( const ResId& rId );
String GetDocumentTypeName() const;
- SfxFilterContainer *GetFilterContainer( BOOL bForceLoad = TRUE) const;
+ SfxFilterContainer *GetFilterContainer( sal_Bool bForceLoad = sal_True) const;
// Views
void RegisterViewFactory(SfxViewFactory &rFactory);
- USHORT GetViewFactoryCount() const;
- SfxViewFactory& GetViewFactory(USHORT i = 0) const;
+ sal_uInt16 GetViewFactoryCount() const;
+ SfxViewFactory& GetViewFactory(sal_uInt16 i = 0) const;
/// returns the view factory whose GetAPIViewName or GetLegacyViewName delivers the requested logical name
SfxViewFactory* GetViewFactoryByViewName( const String& i_rViewName ) const;
diff --git a/sfx2/inc/sfx2/docfile.hxx b/sfx2/inc/sfx2/docfile.hxx
index db9591265f28..e987d3df19a0 100644..100755
--- a/sfx2/inc/sfx2/docfile.hxx
+++ b/sfx2/inc/sfx2/docfile.hxx
@@ -64,7 +64,6 @@ class Timer;
class SfxItemSet;
class DateTime;
class SvStringsDtor;
-class SvEaMgr;
#define S2BS(s) ByteString( s, RTL_TEXTENCODING_MS_1252 )
@@ -78,7 +77,6 @@ class SvEaMgr;
#define OWEAKOBJECT ::cppu::OWeakObject
#define REFERENCE ::com::sun::star::uno::Reference
#define XINTERFACE ::com::sun::star::uno::XInterface
-#define SEQUENCE ::com::sun::star::uno::Sequence
#define EXCEPTION ::com::sun::star::uno::Exception
#define RUNTIMEEXCEPTION ::com::sun::star::uno::RuntimeException
#define ANY ::com::sun::star::uno::Any
@@ -114,7 +112,7 @@ class SFX2_DLLPUBLIC SfxMedium : public SvRefBase
SAL_DLLPRIVATE void CloseStreams_Impl();
DECL_DLLPRIVATE_STATIC_LINK( SfxMedium, UCBHdl_Impl, sal_uInt32 * );
- SAL_DLLPRIVATE void SetPasswordToStorage_Impl();
+ SAL_DLLPRIVATE void SetEncryptionDataToStorage_Impl();
#endif
public:
@@ -124,7 +122,7 @@ public:
SfxMedium();
SfxMedium( const String &rName,
StreamMode nOpenMode,
- sal_Bool bDirect=FALSE,
+ sal_Bool bDirect=sal_False,
const SfxFilter *pFilter = 0,
SfxItemSet *pSet = 0 );
@@ -138,7 +136,7 @@ public:
~SfxMedium();
- void UseInteractionHandler( BOOL );
+ void UseInteractionHandler( sal_Bool );
::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >
GetInteractionHandler();
@@ -204,8 +202,6 @@ public:
SvStream* GetInStream();
SvStream* GetOutStream();
- SvEaMgr* GetEaMgr();
-
sal_Bool Commit();
sal_Bool IsStorage();
@@ -239,7 +235,7 @@ public:
::rtl::OUString GetBaseURL( bool bForSaving=false );
#if _SOLAR__PRIVATE
- SAL_DLLPRIVATE BOOL HasStorage_Impl() const;
+ SAL_DLLPRIVATE sal_Bool HasStorage_Impl() const;
SAL_DLLPRIVATE void StorageBackup_Impl();
SAL_DLLPRIVATE ::rtl::OUString GetBackup_Impl();
diff --git a/sfx2/inc/sfx2/docfilt.hxx b/sfx2/inc/sfx2/docfilt.hxx
index f9c8eea2fb15..a951239d4a25 100644..100755
--- a/sfx2/inc/sfx2/docfilt.hxx
+++ b/sfx2/inc/sfx2/docfilt.hxx
@@ -38,44 +38,9 @@
#include <com/sun/star/uno/RuntimeException.hpp>
#include <tools/wldcrd.hxx>
-// TODO/LATER: The flags should be part of the UNO specification
-#define SFX_FILTER_IMPORT 0x00000001L
-#define SFX_FILTER_EXPORT 0x00000002L
-#define SFX_FILTER_TEMPLATE 0x00000004L
-#define SFX_FILTER_INTERNAL 0x00000008L
-#define SFX_FILTER_TEMPLATEPATH 0x00000010L
-#define SFX_FILTER_OWN 0x00000020L
-#define SFX_FILTER_ALIEN 0x00000040L
-#define SFX_FILTER_USESOPTIONS 0x00000080L
-
-#define SFX_FILTER_DEFAULT 0x00000100L
-#define SFX_FILTER_EXECUTABLE 0x00000200L
-#define SFX_FILTER_SUPPORTSSELECTION 0x00000400L
-#define SFX_FILTER_MAPTOAPPPLUG 0x00000800L
-#define SFX_FILTER_NOTINFILEDLG 0x00001000L
-#define SFX_FILTER_NOTINCHOOSER 0x00002000L
-#define SFX_FILTER_ASYNC 0x00004000L
-// Legt Objekt nur an, kein Laden
-#define SFX_FILTER_CREATOR 0x00008000L
-#define SFX_FILTER_OPENREADONLY 0x00010000L
-#define SFX_FILTER_MUSTINSTALL 0x00020000L
-#define SFX_FILTER_CONSULTSERVICE 0x00040000L
-
-#define SFX_FILTER_STARONEFILTER 0x00080000L
-#define SFX_FILTER_PACKED 0x00100000L
-#define SFX_FILTER_SILENTEXPORT 0x00200000L
-
-#define SFX_FILTER_BROWSERPREFERED 0x00400000L
-
-#define SFX_FILTER_ENCRYPTION 0x01000000L
-#define SFX_FILTER_PASSWORDTOMODIFY 0x02000000L
-
-#define SFX_FILTER_PREFERED 0x10000000L
+#include <comphelper/documentconstants.hxx>
#define SFX_FILTER_STARTPRESENTATION 0x20000000L
-#define SFX_FILTER_VERSION_NONE 0
-#define SFX_FILTER_NOTINSTALLED SFX_FILTER_MUSTINSTALL | SFX_FILTER_CONSULTSERVICE
-
#include <sfx2/sfxdefs.hxx>
//========================================================================
@@ -86,16 +51,16 @@ class SFX2_DLLPUBLIC SfxFilter
friend class SfxFilterContainer;
WildCard aWildCard;
- ULONG lFormat;
+ sal_uIntPtr lFormat;
String aTypeName;
String aUserData;
SfxFilterFlags nFormatType;
- USHORT nDocIcon;
+ sal_uInt16 nDocIcon;
String aServiceName;
String aMimeType;
String aFilterName;
String aPattern;
- ULONG nVersion;
+ sal_uIntPtr nVersion;
String aUIName;
String aDefaultTemplate;
@@ -105,7 +70,7 @@ public:
SfxFilterFlags nFormatType,
sal_uInt32 lFormat,
const String &rTypeName,
- USHORT nDocIcon,
+ sal_uInt16 nDocIcon,
const String &rMimeType,
const String &rUserData,
const String& rServiceName );
@@ -124,19 +89,19 @@ public:
const String& GetName() const { return aFilterName; }
const WildCard& GetWildcard() const { return aWildCard; }
const String& GetRealTypeName() const { return aTypeName; }
- ULONG GetFormat() const { return lFormat; }
+ sal_uIntPtr GetFormat() const { return lFormat; }
const String& GetTypeName() const { return aTypeName; }
const String& GetUIName() const { return aUIName; }
- USHORT GetDocIconId() const { return nDocIcon; }
+ sal_uInt16 GetDocIconId() const { return nDocIcon; }
const String& GetUserData() const { return aUserData; }
const String& GetDefaultTemplate() const { return aDefaultTemplate; }
void SetDefaultTemplate( const String& rStr ) { aDefaultTemplate = rStr; }
- BOOL UsesStorage() const { return GetFormat() != 0; }
+ sal_Bool UsesStorage() const { return GetFormat() != 0; }
void SetURLPattern( const String& rStr ) { aPattern = rStr; aPattern.ToLowerAscii(); }
String GetURLPattern() const { return aPattern; }
void SetUIName( const String& rName ) { aUIName = rName; }
- void SetVersion( ULONG nVersionP ) { nVersion = nVersionP; }
- ULONG GetVersion() const { return nVersion; }
+ void SetVersion( sal_uIntPtr nVersionP ) { nVersion = nVersionP; }
+ sal_uIntPtr GetVersion() const { return nVersion; }
String GetSuffixes() const;
String GetDefaultExtension() const;
const String& GetServiceName() const { return aServiceName; }
@@ -147,7 +112,7 @@ public:
static String GetTypeFromStorage( const SotStorage& rStg );
static String GetTypeFromStorage( const com::sun::star::uno::Reference< com::sun::star::embed::XStorage >& xStorage,
- BOOL bTemplate = FALSE,
+ sal_Bool bTemplate = sal_False,
String* pName=0 )
throw ( ::com::sun::star::beans::UnknownPropertyException,
::com::sun::star::lang::WrappedTargetException,
diff --git a/sfx2/inc/sfx2/docinf.hxx b/sfx2/inc/sfx2/docinf.hxx
index 22b13be1d56d..22b13be1d56d 100644..100755
--- a/sfx2/inc/sfx2/docinf.hxx
+++ b/sfx2/inc/sfx2/docinf.hxx
diff --git a/sfx2/inc/docinsert.hxx b/sfx2/inc/sfx2/docinsert.hxx
index 40969a76dbe1..40969a76dbe1 100644..100755
--- a/sfx2/inc/docinsert.hxx
+++ b/sfx2/inc/sfx2/docinsert.hxx
diff --git a/sfx2/inc/sfx2/dockwin.hxx b/sfx2/inc/sfx2/dockwin.hxx
index 3c64fb0fa913..021b9fdefe44 100644..100755
--- a/sfx2/inc/sfx2/dockwin.hxx
+++ b/sfx2/inc/sfx2/dockwin.hxx
@@ -67,14 +67,14 @@ protected:
CheckAlignment(SfxChildAlignment,SfxChildAlignment);
virtual void Resize();
- virtual BOOL PrepareToggleFloatingMode();
+ virtual sal_Bool PrepareToggleFloatingMode();
virtual void ToggleFloatingMode();
virtual void StartDocking();
- virtual BOOL Docking( const Point& rPos, Rectangle& rRect );
- virtual void EndDocking( const Rectangle& rRect, BOOL bFloatMode );
+ virtual sal_Bool Docking( const Point& rPos, Rectangle& rRect );
+ virtual void EndDocking( const Rectangle& rRect, sal_Bool bFloatMode );
virtual void Resizing( Size& rSize );
virtual void Paint( const Rectangle& rRect );
- virtual BOOL Close();
+ virtual sal_Bool Close();
virtual void Move();
SAL_DLLPRIVATE SfxChildWindow* GetChildWindow_Impl() { return pMgr; }
@@ -99,7 +99,7 @@ public:
const Rectangle& GetInnerRect() const { return aInnerRect; }
const Rectangle& GetOuterRect() const { return aOuterRect; }
SfxBindings& GetBindings() const { return *pBindings; }
- USHORT GetType() const { return pMgr->GetType(); }
+ sal_uInt16 GetType() const { return pMgr->GetType(); }
SfxChildAlignment GetAlignment() const { return pMgr->GetAlignment(); }
void SetAlignment(SfxChildAlignment eAlign) { pMgr->SetAlignment(eAlign); }
Size GetFloatingSize() const { return aFloatSize; }
@@ -108,19 +108,19 @@ public:
void SetMinOutputSizePixel( const Size& rSize );
Size GetMinOutputSizePixel() const;
virtual long Notify( NotifyEvent& rNEvt );
- virtual void FadeIn( BOOL );
- void AutoShow( BOOL bShow = TRUE );
+ virtual void FadeIn( sal_Bool );
+ void AutoShow( sal_Bool bShow = sal_True );
DECL_LINK( TimerHdl, Timer* );
SAL_DLLPRIVATE void Initialize_Impl();
- SAL_DLLPRIVATE USHORT GetWinBits_Impl() const;
+ SAL_DLLPRIVATE sal_uInt16 GetWinBits_Impl() const;
SAL_DLLPRIVATE void SetItemSize_Impl( const Size& rSize );
SAL_DLLPRIVATE void Disappear_Impl();
SAL_DLLPRIVATE void Reappear_Impl();
- SAL_DLLPRIVATE BOOL IsAutoHide_Impl() const;
- SAL_DLLPRIVATE BOOL IsPinned_Impl() const;
- SAL_DLLPRIVATE void AutoShow_Impl( BOOL bShow = TRUE );
- SAL_DLLPRIVATE void Pin_Impl( BOOL bPinned );
+ SAL_DLLPRIVATE sal_Bool IsAutoHide_Impl() const;
+ SAL_DLLPRIVATE sal_Bool IsPinned_Impl() const;
+ SAL_DLLPRIVATE void AutoShow_Impl( sal_Bool bShow = sal_True );
+ SAL_DLLPRIVATE void Pin_Impl( sal_Bool bPinned );
SAL_DLLPRIVATE SfxSplitWindow* GetSplitWindow_Impl() const;
SAL_DLLPRIVATE void ReleaseChildWindow_Impl();
};
@@ -129,7 +129,7 @@ class SfxDockingWrapper : public SfxChildWindow
{
public:
SfxDockingWrapper( Window* pParent ,
- USHORT nId ,
+ sal_uInt16 nId ,
SfxBindings* pBindings ,
SfxChildWinInfo* pInfo );
diff --git a/sfx2/inc/sfx2/docmacromode.hxx b/sfx2/inc/sfx2/docmacromode.hxx
index 48b58b4ecd9b..48b58b4ecd9b 100644..100755
--- a/sfx2/inc/sfx2/docmacromode.hxx
+++ b/sfx2/inc/sfx2/docmacromode.hxx
diff --git a/sfx2/inc/sfx2/docstoragemodifylistener.hxx b/sfx2/inc/sfx2/docstoragemodifylistener.hxx
index b6ac0da8becb..b6ac0da8becb 100644..100755
--- a/sfx2/inc/sfx2/docstoragemodifylistener.hxx
+++ b/sfx2/inc/sfx2/docstoragemodifylistener.hxx
diff --git a/sfx2/inc/sfx2/doctdlg.hxx b/sfx2/inc/sfx2/doctdlg.hxx
index 9dad5b9ae6d4..8d8e7dfdd546 100644..100755
--- a/sfx2/inc/sfx2/doctdlg.hxx
+++ b/sfx2/inc/sfx2/doctdlg.hxx
@@ -77,7 +77,7 @@ public:
{ return aNameEd.GetText().EraseLeadingChars(); }
String GetTemplatePath();
void NewTemplate(const String &rPath);
- USHORT GetRegion() const { return aRegionLb.GetSelectEntryPos(); }
+ sal_uInt16 GetRegion() const { return aRegionLb.GetSelectEntryPos(); }
String GetRegionName() const { return aRegionLb.GetSelectEntry(); }
};
diff --git a/sfx2/inc/sfx2/doctempl.hxx b/sfx2/inc/sfx2/doctempl.hxx
index d6e3a0826efb..ee3db35cebf4 100644..100755
--- a/sfx2/inc/sfx2/doctempl.hxx
+++ b/sfx2/inc/sfx2/doctempl.hxx
@@ -57,70 +57,70 @@ class SFX2_DLLPUBLIC SfxDocumentTemplates
private:
SfxDocTemplate_ImplRef pImp;
- SAL_DLLPRIVATE BOOL CopyOrMove( USHORT nTargetRegion, USHORT nTargetIdx,
- USHORT nSourceRegion, USHORT nSourceIdx, BOOL bMove );
+ SAL_DLLPRIVATE sal_Bool CopyOrMove( sal_uInt16 nTargetRegion, sal_uInt16 nTargetIdx,
+ sal_uInt16 nSourceRegion, sal_uInt16 nSourceIdx, sal_Bool bMove );
public:
SfxDocumentTemplates();
SfxDocumentTemplates(const SfxDocumentTemplates &);
~SfxDocumentTemplates();
- BOOL IsConstructed() { return pImp != NULL; }
+ sal_Bool IsConstructed() { return pImp != NULL; }
void Construct();
- static BOOL SaveDir( /*SfxTemplateDir &rEntry */ ) ;
+ static sal_Bool SaveDir( /*SfxTemplateDir &rEntry */ ) ;
const SfxDocumentTemplates &operator=(const SfxDocumentTemplates &);
- BOOL Rescan( ); // Aktualisieren
+ sal_Bool Rescan( ); // Aktualisieren
void ReInitFromComponent();
- BOOL IsRegionLoaded( USHORT nIdx ) const;
- USHORT GetRegionCount() const;
- const String& GetRegionName(USHORT nIdx) const; //dv!
- String GetFullRegionName(USHORT nIdx) const;
- USHORT GetRegionNo( const String &rRegionName ) const;
+ sal_Bool IsRegionLoaded( sal_uInt16 nIdx ) const;
+ sal_uInt16 GetRegionCount() const;
+ const String& GetRegionName(sal_uInt16 nIdx) const; //dv!
+ String GetFullRegionName(sal_uInt16 nIdx) const;
+ sal_uInt16 GetRegionNo( const String &rRegionName ) const;
- USHORT GetCount(USHORT nRegion) const;
- USHORT GetCount( const String &rName) const;
- const String& GetName(USHORT nRegion, USHORT nIdx) const; //dv!
- String GetFileName(USHORT nRegion, USHORT nIdx) const;
- String GetPath(USHORT nRegion, USHORT nIdx) const;
+ sal_uInt16 GetCount(sal_uInt16 nRegion) const;
+ sal_uInt16 GetCount( const String &rName) const;
+ const String& GetName(sal_uInt16 nRegion, sal_uInt16 nIdx) const; //dv!
+ String GetFileName(sal_uInt16 nRegion, sal_uInt16 nIdx) const;
+ String GetPath(sal_uInt16 nRegion, sal_uInt16 nIdx) const;
String GetDefaultTemplatePath(const String &rLongName);
// Pfad zur Vorlage geben lassen; logischer Name muss angegeben
// werden, damit beim Ueberschreiben einer Vorlage der
// richtige Dateiname gefunden werden kann
- String GetTemplatePath(USHORT nRegion, const String &rLongName) const;
+ String GetTemplatePath(sal_uInt16 nRegion, const String &rLongName) const;
// Allows to retrieve the target template URL from the UCB
::rtl::OUString GetTemplateTargetURLFromComponent( const ::rtl::OUString& aGroupName,
const ::rtl::OUString& aTitle );
// Speichern als Vorlage hat geklappt -> Aktualisieren
- void NewTemplate(USHORT nRegion,
+ void NewTemplate(sal_uInt16 nRegion,
const String &rLongName,
const String &rFileName);
- BOOL Copy(USHORT nTargetRegion,
- USHORT nTargetIdx,
- USHORT nSourceRegion,
- USHORT nSourceIdx);
- BOOL Move(USHORT nTargetRegion,
- USHORT nTargetIdx,
- USHORT nSourceRegion,
- USHORT nSourceIdx);
- BOOL Delete(USHORT nRegion, USHORT nIdx);
- BOOL InsertDir(const String &rText, USHORT nRegion);
- BOOL SetName(const String &rName, USHORT nRegion, USHORT nIdx);
-
- BOOL CopyTo(USHORT nRegion, USHORT nIdx, const String &rName) const;
- BOOL CopyFrom(USHORT nRegion, USHORT nIdx, String &rName);
-
- SfxObjectShellRef CreateObjectShell(USHORT nRegion, USHORT nIdx);
- BOOL DeleteObjectShell(USHORT, USHORT);
-
- BOOL GetFull( const String& rRegion, const String& rName, String& rPath );
- BOOL GetLogicNames( const String& rPath, String& rRegion, String& rName ) const;
+ sal_Bool Copy(sal_uInt16 nTargetRegion,
+ sal_uInt16 nTargetIdx,
+ sal_uInt16 nSourceRegion,
+ sal_uInt16 nSourceIdx);
+ sal_Bool Move(sal_uInt16 nTargetRegion,
+ sal_uInt16 nTargetIdx,
+ sal_uInt16 nSourceRegion,
+ sal_uInt16 nSourceIdx);
+ sal_Bool Delete(sal_uInt16 nRegion, sal_uInt16 nIdx);
+ sal_Bool InsertDir(const String &rText, sal_uInt16 nRegion);
+ sal_Bool SetName(const String &rName, sal_uInt16 nRegion, sal_uInt16 nIdx);
+
+ sal_Bool CopyTo(sal_uInt16 nRegion, sal_uInt16 nIdx, const String &rName) const;
+ sal_Bool CopyFrom(sal_uInt16 nRegion, sal_uInt16 nIdx, String &rName);
+
+ SfxObjectShellRef CreateObjectShell(sal_uInt16 nRegion, sal_uInt16 nIdx);
+ sal_Bool DeleteObjectShell(sal_uInt16, sal_uInt16);
+
+ sal_Bool GetFull( const String& rRegion, const String& rName, String& rPath );
+ sal_Bool GetLogicNames( const String& rPath, String& rRegion, String& rName ) const;
/** updates the configuration where the document templates structure is stored.
diff --git a/sfx2/inc/sfx2/event.hxx b/sfx2/inc/sfx2/event.hxx
index 433353b8341f..6e28386b4f19 100644..100755
--- a/sfx2/inc/sfx2/event.hxx
+++ b/sfx2/inc/sfx2/event.hxx
@@ -37,6 +37,7 @@
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/frame/XController2.hpp>
class SfxObjectShell;
@@ -46,17 +47,17 @@ class SFX2_DLLPUBLIC SfxEventHint : public SfxHint
{
SfxObjectShell* pObjShell;
::rtl::OUString aEventName;
- USHORT nEventId;
+ sal_uInt16 nEventId;
public:
TYPEINFO();
- SfxEventHint( USHORT nId, const ::rtl::OUString& aName, SfxObjectShell *pObj = 0 )
+ SfxEventHint( sal_uInt16 nId, const ::rtl::OUString& aName, SfxObjectShell *pObj = 0 )
: pObjShell(pObj),
aEventName(aName),
nEventId(nId)
{}
- USHORT GetEventId() const
+ sal_uInt16 GetEventId() const
{ return nEventId; }
::rtl::OUString GetEventName() const
@@ -68,6 +69,29 @@ public:
//-------------------------------------------------------------------
+class SFX2_DLLPUBLIC SfxViewEventHint : public SfxEventHint
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController2 > xViewController;
+
+public:
+ TYPEINFO();
+
+ SfxViewEventHint( sal_uInt16 nId, const ::rtl::OUString& aName, SfxObjectShell *pObj, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController >& xController )
+ : SfxEventHint( nId, aName, pObj )
+ , xViewController( xController, ::com::sun::star::uno::UNO_QUERY )
+ {}
+
+ SfxViewEventHint( sal_uInt16 nId, const ::rtl::OUString& aName, SfxObjectShell *pObj, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController2 >& xController )
+ : SfxEventHint( nId, aName, pObj )
+ , xViewController( xController )
+ {}
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController2 > GetController() const
+ { return xViewController; }
+};
+
+//-------------------------------------------------------------------
+
class SfxNamedHint : public SfxHint
{
String _aEventName;
@@ -96,7 +120,6 @@ public:
SfxObjectShell* GetObjShell() const { return _pObjShell; }
};
-class PrintDialog;
class Printer;
class SfxPrintingHint : public SfxHint
{
diff --git a/sfx2/inc/sfx2/evntconf.hxx b/sfx2/inc/sfx2/evntconf.hxx
index 66c8b345422d..89fef8d61687 100644..100755
--- a/sfx2/inc/sfx2/evntconf.hxx
+++ b/sfx2/inc/sfx2/evntconf.hxx
@@ -47,10 +47,6 @@
#include <svl/macitem.hxx>
#include <vector>
-class SfxMacroInfo;
-class SfxMacroInfoArr_Impl;
-class SfxEventConfigItem_Impl;
-class SfxEventInfoArr_Impl;
class SfxObjectShell;
class SvxMacroTableDtor;
@@ -58,11 +54,11 @@ class SvxMacroTableDtor;
struct SFX2_DLLPUBLIC SfxEventName
{
- USHORT mnId;
+ sal_uInt16 mnId;
String maEventName;
String maUIName;
- SfxEventName( USHORT nId,
+ SfxEventName( sal_uInt16 nId,
const String& rEventName,
const String& rUIName )
: mnId( nId )
@@ -99,7 +95,7 @@ class SFX2_DLLPUBLIC SfxEventNamesItem : public SfxPoolItem
public:
TYPEINFO();
- SfxEventNamesItem ( const USHORT nId ) : SfxPoolItem( nId ) {}
+ SfxEventNamesItem ( const sal_uInt16 nId ) : SfxPoolItem( nId ) {}
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
@@ -108,13 +104,13 @@ public:
XubString &rText,
const IntlWrapper * = 0 ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const;
- virtual USHORT GetVersion( USHORT nFileFormatVersion ) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const;
+ virtual sal_uInt16 GetVersion( sal_uInt16 nFileFormatVersion ) const;
const SfxEventNamesList& GetEvents() const { return aEventsList;}
void SetEvents( const SfxEventNamesList& rList ) { aEventsList = rList; }
- void AddEvent( const String&, const String&, USHORT );
+ void AddEvent( const String&, const String&, sal_uInt16 );
};
// -----------------------------------------------------------------------
@@ -129,7 +125,7 @@ class SFX2_DLLPUBLIC SfxEventConfiguration
{
public:
static void ConfigureEvent( ::rtl::OUString aName, const SvxMacro&, SfxObjectShell* pObjSh);
- static SvxMacro* ConvertToMacro( const com::sun::star::uno::Any& rElement, SfxObjectShell* pDoc, BOOL bBlowUp );
+ static SvxMacro* ConvertToMacro( const com::sun::star::uno::Any& rElement, SfxObjectShell* pDoc, sal_Bool bBlowUp );
};
#endif
diff --git a/sfx2/inc/sfx2/fcontnr.hxx b/sfx2/inc/sfx2/fcontnr.hxx
index 271f2e03d369..21c6c27609d8 100644..100755
--- a/sfx2/inc/sfx2/fcontnr.hxx
+++ b/sfx2/inc/sfx2/fcontnr.hxx
@@ -50,7 +50,7 @@ class SfxFilterContainer_Impl;
class SfxFrame;
//#define SFX_FILTER_CONTAINER_FACTORY 1
-typedef USHORT SfxFilterContainerFlags;
+typedef sal_uInt16 SfxFilterContainerFlags;
class SfxRefItem : public SfxPoolItem
{
@@ -60,7 +60,7 @@ public:
{ return new SfxRefItem( *this ); }
virtual int operator==( const SfxPoolItem& rL) const
{ return ((SfxRefItem&)rL).aRef == aRef; }
- SfxRefItem( USHORT nWhichId, const SvRefBaseRef& rValue ) : SfxPoolItem( nWhichId )
+ SfxRefItem( sal_uInt16 nWhichId, const SvRefBaseRef& rValue ) : SfxPoolItem( nWhichId )
{ aRef = rValue; }
const SvRefBaseRef& GetValue() const { return aRef; }
@@ -93,7 +93,7 @@ public:
FactoryFunc GetFactory() { return pFunc; }
};
-typedef ULONG (*SfxDetectFilter)( SfxMedium& rMedium, const SfxFilter **, SfxFilterFlags nMust, SfxFilterFlags nDont );
+typedef sal_uIntPtr (*SfxDetectFilter)( SfxMedium& rMedium, const SfxFilter **, SfxFilterFlags nMust, SfxFilterFlags nDont );
class SFX2_DLLPUBLIC SfxFilterContainer
{
@@ -116,11 +116,11 @@ public:
const SfxFilter* GetFilter4FilterName( const String& rName, SfxFilterFlags nMust = 0, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const;
const SfxFilter* GetFilter4UIName( const String& rName, SfxFilterFlags nMust = 0, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const;
- SAL_DLLPRIVATE static void ReadFilters_Impl( BOOL bUpdate=FALSE );
+ SAL_DLLPRIVATE static void ReadFilters_Impl( sal_Bool bUpdate=sal_False );
SAL_DLLPRIVATE static void ReadSingleFilter_Impl( const ::rtl::OUString& rName,
const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& xTypeCFG,
const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& xFilterCFG,
- BOOL bUpdate );
+ sal_Bool bUpdate );
SAL_DLLPRIVATE static const SfxFilter* GetDefaultFilter_Impl( const String& );
};
@@ -135,13 +135,13 @@ public:
SfxFilterMatcher();
~SfxFilterMatcher();
- SAL_DLLPRIVATE static BOOL IsFilterInstalled_Impl( const SfxFilter* pFilter );
+ SAL_DLLPRIVATE static sal_Bool IsFilterInstalled_Impl( const SfxFilter* pFilter );
DECL_DLLPRIVATE_STATIC_LINK( SfxFilterMatcher, MaybeFileHdl_Impl, String* );
sal_uInt32 GuessFilterIgnoringContent( SfxMedium& rMedium, const SfxFilter **, SfxFilterFlags nMust = SFX_FILTER_IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const;
sal_uInt32 GuessFilter( SfxMedium& rMedium, const SfxFilter **, SfxFilterFlags nMust = SFX_FILTER_IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const;
sal_uInt32 GuessFilterControlDefaultUI( SfxMedium& rMedium, const SfxFilter **, SfxFilterFlags nMust = SFX_FILTER_IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED, sal_Bool bDefUI = sal_True ) const;
- sal_uInt32 DetectFilter( SfxMedium& rMedium, const SfxFilter **, BOOL bPlugIn, BOOL bAPI = FALSE ) const;
+ sal_uInt32 DetectFilter( SfxMedium& rMedium, const SfxFilter **, sal_Bool bPlugIn, sal_Bool bAPI = sal_False ) const;
const SfxFilter* GetFilter4Mime( const String& rMime, SfxFilterFlags nMust = SFX_FILTER_IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED) const;
const SfxFilter* GetFilter4ClipBoardId( sal_uInt32 nId, SfxFilterFlags nMust = SFX_FILTER_IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const;
@@ -158,7 +158,7 @@ class SFX2_DLLPUBLIC SfxFilterMatcherIter
{
SfxFilterFlags nOrMask;
SfxFilterFlags nAndMask;
- USHORT nCurrent;
+ sal_uInt16 nCurrent;
const SfxFilterMatcher_Impl *pMatch;
SAL_DLLPRIVATE const SfxFilter* Find_Impl();
diff --git a/sfx2/inc/sfx2/filedlghelper.hxx b/sfx2/inc/sfx2/filedlghelper.hxx
index b811929d3e31..f31f6d24e5d1 100644..100755
--- a/sfx2/inc/sfx2/filedlghelper.hxx
+++ b/sfx2/inc/sfx2/filedlghelper.hxx
@@ -277,8 +277,7 @@ public:
Pointer to an array of help ids. For each element in _pControlId, there must be
a corresponding element herein.
*/
- void SetControlHelpIds( const sal_Int16* _pControlId, const sal_Int32* _pHelpId );
- void SetDialogHelpId( const sal_Int32 _nHelpId );
+ void SetControlHelpIds( const sal_Int16* _pControlId, const char** _pHelpId );
void CreateMatcher( const String& rName );
/** sets the context of the dialog and trigger necessary actions e.g. loading config, setting help id
diff --git a/sfx2/inc/sfx2/frame.hxx b/sfx2/inc/sfx2/frame.hxx
index 40c72c697ddc..54b3d0330308 100644..100755
--- a/sfx2/inc/sfx2/frame.hxx
+++ b/sfx2/inc/sfx2/frame.hxx
@@ -139,7 +139,7 @@ public:
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 );
+ static SfxFrame* Create( SfxObjectShell& rDoc, Window& rWindow, sal_uInt16 nViewId, bool bHidden );
SvCompatWeakHdl* GetHdl();
Window& GetWindow() const;
@@ -150,7 +150,7 @@ public:
SfxFrame* GetParentFrame() const
{ return pParentFrame; }
- void SetPresentationMode( BOOL bSet );
+ void SetPresentationMode( sal_Bool bSet );
SystemWindow* GetSystemWindow() const;
static SfxFrame* GetFirst();
@@ -219,9 +219,9 @@ public:
SAL_DLLPRIVATE void SetInPlace_Impl( sal_Bool );
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 void LockResize_Impl( sal_Bool bLock );
+ SAL_DLLPRIVATE void SetMenuBarOn_Impl( sal_Bool bOn );
+ SAL_DLLPRIVATE sal_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;
@@ -264,8 +264,8 @@ public:
virtual String GetValueText() const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
sal_Bool FrameKilled() const { return &wFrame != pFrame; }
@@ -283,8 +283,8 @@ public:
{ return aValue; }
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
};
class SFX2_DLLPUBLIC SfxUnoFrameItem : public SfxPoolItem
@@ -301,8 +301,8 @@ public:
{ return m_xFrame; }
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
};
typedef SfxUsrAnyItem SfxUnoAnyItem;
diff --git a/sfx2/inc/sfx2/frmdescr.hxx b/sfx2/inc/sfx2/frmdescr.hxx
index 2a29cd00d885..51305f9a2766 100644..100755
--- a/sfx2/inc/sfx2/frmdescr.hxx
+++ b/sfx2/inc/sfx2/frmdescr.hxx
@@ -91,12 +91,12 @@ class SFX2_DLLPUBLIC SfxFrameDescriptor
long nWidth;
ScrollingMode eScroll;
SizeSelector eSizeSelector;
- USHORT nHasBorder;
- USHORT nItemId;
- BOOL bResizeHorizontal;
- BOOL bResizeVertical;
- BOOL bHasUI;
- BOOL bReadOnly;
+ sal_uInt16 nHasBorder;
+ sal_uInt16 nItemId;
+ sal_Bool bResizeHorizontal;
+ sal_Bool bResizeVertical;
+ sal_Bool bHasUI;
+ sal_Bool bReadOnly;
SfxFrameDescriptor_Impl* pImp;
SvStrings* pScripts;
SvStrings* pComments;
@@ -118,13 +118,13 @@ public:
{ return aActualURL; }
void SetActualURL( const INetURLObject& rURL );
void SetActualURL( const String& rURL );
- BOOL CheckContent() const;
- BOOL CompareOriginal( SfxFrameDescriptor& rSet ) const;
- void UnifyContent( BOOL );
- void SetReadOnly( BOOL bSet ) { bReadOnly = bSet;}
- BOOL IsReadOnly( ) const { return bReadOnly;}
- void SetEditable( BOOL bSet );
- BOOL IsEditable() const;
+ sal_Bool CheckContent() const;
+ sal_Bool CompareOriginal( SfxFrameDescriptor& rSet ) const;
+ void UnifyContent( sal_Bool );
+ void SetReadOnly( sal_Bool bSet ) { bReadOnly = bSet;}
+ sal_Bool IsReadOnly( ) const { return bReadOnly;}
+ void SetEditable( sal_Bool bSet );
+ sal_Bool IsEditable() const;
// Size
void SetWidth( long n )
@@ -139,9 +139,9 @@ public:
{ return nWidth; }
SizeSelector GetSizeSelector() const
{ return eSizeSelector; }
- BOOL IsResizable() const
+ sal_Bool IsResizable() const
{ return bResizeHorizontal && bResizeVertical; }
- void SetResizable( BOOL bRes )
+ void SetResizable( sal_Bool bRes )
{ bResizeHorizontal = bResizeVertical = bRes; }
// FrameName
@@ -163,38 +163,38 @@ public:
// FrameBorder
void SetWallpaper( const Wallpaper& rWallpaper );
const Wallpaper* GetWallpaper() const;
- BOOL HasFrameBorder() const;
+ sal_Bool HasFrameBorder() const;
- BOOL IsFrameBorderOn() const
+ sal_Bool IsFrameBorderOn() const
{ return ( nHasBorder & BORDER_YES ) != 0; }
- void SetFrameBorder( BOOL bBorder )
+ void SetFrameBorder( sal_Bool bBorder )
{
nHasBorder = bBorder ?
BORDER_YES | BORDER_SET :
BORDER_NO | BORDER_SET;
}
- BOOL IsFrameBorderSet() const
+ sal_Bool IsFrameBorderSet() const
{ return (nHasBorder & BORDER_SET) != 0; }
void ResetBorder()
{ nHasBorder = 0; }
- BOOL HasUI() const
+ sal_Bool HasUI() const
{ return bHasUI; }
- void SetHasUI( BOOL bOn )
+ void SetHasUI( sal_Bool bOn )
{ bHasUI = bOn; }
// Attribute f"ur das Splitwindow
- USHORT GetItemId() const
+ sal_uInt16 GetItemId() const
{ return nItemId; }
- void SetItemId( USHORT nId )
+ void SetItemId( sal_uInt16 nId )
{ nItemId = nId; }
- USHORT GetWinBits() const;
+ sal_uInt16 GetWinBits() const;
long GetSize() const;
- USHORT GetItemPos() const;
+ sal_uInt16 GetItemPos() const;
// Kopie z.B. f"ur die Views
- SfxFrameDescriptor* Clone( BOOL bWithIds = TRUE ) const;
+ SfxFrameDescriptor* Clone( sal_Bool bWithIds = sal_True ) const;
};
// Kein Bock, einen operator= zu implementieren...
@@ -211,13 +211,13 @@ struct SfxFrameProperties
ScrollingMode eScroll;
SizeSelector eSizeSelector;
SizeSelector eSetSizeSelector;
- BOOL bHasBorder;
- BOOL bBorderSet;
- BOOL bResizable;
- BOOL bSetResizable;
- BOOL bIsRootSet;
- BOOL bIsInColSet;
- BOOL bHasBorderInherited;
+ sal_Bool bHasBorder;
+ sal_Bool bBorderSet;
+ sal_Bool bResizable;
+ sal_Bool bSetResizable;
+ sal_Bool bIsRootSet;
+ sal_Bool bIsInColSet;
+ sal_Bool bHasBorderInherited;
SfxFrameDescriptor* pFrame;
private:
@@ -233,13 +233,13 @@ public:
eScroll( ScrollingAuto ),
eSizeSelector( SIZE_REL ),
eSetSizeSelector( SIZE_REL ),
- bHasBorder( TRUE ),
- bBorderSet( TRUE ),
- bResizable( TRUE ),
- bSetResizable( TRUE ),
- bIsRootSet( FALSE ),
- bIsInColSet( FALSE ),
- bHasBorderInherited( TRUE ),
+ bHasBorder( sal_True ),
+ bBorderSet( sal_True ),
+ bResizable( sal_True ),
+ bSetResizable( sal_True ),
+ bIsRootSet( sal_False ),
+ bIsInColSet( sal_False ),
+ bHasBorderInherited( sal_True ),
pFrame( 0 ) {}
SfxFrameProperties( const SfxFrameDescriptor *pD );
@@ -255,12 +255,12 @@ class SfxFrameDescriptorItem : public SfxPoolItem
public:
TYPEINFO();
- SfxFrameDescriptorItem ( const SfxFrameDescriptor *pD, const USHORT nId = SID_FRAMEDESCRIPTOR )
+ SfxFrameDescriptorItem ( const SfxFrameDescriptor *pD, const sal_uInt16 nId = SID_FRAMEDESCRIPTOR )
: SfxPoolItem( nId )
, aProperties( pD )
{}
- SfxFrameDescriptorItem ( const USHORT nId = SID_FRAMEDESCRIPTOR )
+ SfxFrameDescriptorItem ( const sal_uInt16 nId = SID_FRAMEDESCRIPTOR )
: SfxPoolItem( nId )
{}
@@ -281,9 +281,9 @@ public:
UniString &rText, const IntlWrapper * = 0 ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- //virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- //virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const;
- //virtual USHORT GetVersion( USHORT nFileFormatVersion ) const;
+ //virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ //virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const;
+ //virtual sal_uInt16 GetVersion( sal_uInt16 nFileFormatVersion ) const;
const SfxFrameProperties& GetProperties() const
{ return aProperties; }
diff --git a/sfx2/inc/sfx2/frmhtml.hxx b/sfx2/inc/sfx2/frmhtml.hxx
index cb6a049b35aa..ac3f2303df7b 100644..100755
--- a/sfx2/inc/sfx2/frmhtml.hxx
+++ b/sfx2/inc/sfx2/frmhtml.hxx
@@ -47,7 +47,7 @@ class SFX2_DLLPUBLIC SfxFrameHTMLParser : public SfxHTMLParser
friend class _SfxFrameHTMLContext;
protected:
- SfxFrameHTMLParser( SvStream& rStream, BOOL bIsNewDoc=TRUE, SfxMedium *pMediumPtr=0 ):
+ SfxFrameHTMLParser( SvStream& rStream, sal_Bool bIsNewDoc=sal_True, SfxMedium *pMediumPtr=0 ):
SfxHTMLParser( rStream, bIsNewDoc, pMediumPtr ) {};
public:
diff --git a/sfx2/inc/sfx2/frmhtmlw.hxx b/sfx2/inc/sfx2/frmhtmlw.hxx
index abc1748c898d..9521d6982fb6 100644..100755
--- a/sfx2/inc/sfx2/frmhtmlw.hxx
+++ b/sfx2/inc/sfx2/frmhtmlw.hxx
@@ -54,12 +54,12 @@ class SFX2_DLLPUBLIC SfxFrameHTMLWriter
SAL_DLLPRIVATE static const sal_Char sNewLine[];
SAL_DLLPRIVATE static void OutMeta( SvStream& rStrm,
const sal_Char *pIndent, const String& rName,
- const String& rContent, BOOL bHTTPEquiv,
+ const String& rContent, sal_Bool bHTTPEquiv,
rtl_TextEncoding eDestEnc,
String *pNonConvertableChars = 0 );
SAL_DLLPRIVATE inline static void OutMeta( SvStream& rStrm,
const sal_Char *pIndent, const sal_Char *pName,
- const String& rContent, BOOL bHTTPEquiv,
+ const String& rContent, sal_Bool bHTTPEquiv,
rtl_TextEncoding eDestEnc,
String *pNonConvertableChars = 0 );
@@ -82,7 +82,7 @@ public:
inline void SfxFrameHTMLWriter::OutMeta( SvStream& rStrm,
const sal_Char *pIndent, const sal_Char *pName,
- const String& rContent, BOOL bHTTPEquiv,
+ const String& rContent, sal_Bool bHTTPEquiv,
rtl_TextEncoding eDestEnc,
String *pNonConvertableChars )
{
diff --git a/sfx2/inc/sfx2/genlink.hxx b/sfx2/inc/sfx2/genlink.hxx
index 3aa5debb947b..81479a0af846 100644..100755
--- a/sfx2/inc/sfx2/genlink.hxx
+++ b/sfx2/inc/sfx2/genlink.hxx
@@ -47,8 +47,8 @@ public:
GenLink& operator = ( const GenLink& rOrig )
{ pFunc = rOrig.pFunc; aLink = rOrig.aLink; return *this; }
- BOOL operator!() const { return !aLink && !pFunc; }
- BOOL IsSet() const { return aLink.IsSet() || pFunc; }
+ sal_Bool operator!() const { return !aLink && !pFunc; }
+ sal_Bool IsSet() const { return aLink.IsSet() || pFunc; }
long Call( void* pCaller )
{ return pFunc ? (*pFunc)(pCaller) : aLink.Call(pCaller); }
diff --git a/sfx2/inc/sfx2/hintpost.hxx b/sfx2/inc/sfx2/hintpost.hxx
index c911e8ee4c5a..0a3fbe1672c6 100644..100755
--- a/sfx2/inc/sfx2/hintpost.hxx
+++ b/sfx2/inc/sfx2/hintpost.hxx
@@ -53,7 +53,7 @@ class SfxHintPoster: public SvRefBase
*/
{
- ULONG nId;
+ sal_uIntPtr nId;
GenLink aLink;
private:
diff --git a/sfx2/inc/sfx2/htmlmode.hxx b/sfx2/inc/sfx2/htmlmode.hxx
index b6f5982b455f..b6f5982b455f 100644..100755
--- a/sfx2/inc/sfx2/htmlmode.hxx
+++ b/sfx2/inc/sfx2/htmlmode.hxx
diff --git a/sfx2/inc/imagemgr.hxx b/sfx2/inc/sfx2/imagemgr.hxx
index 8bdb07d68185..0bbde7a0b47b 100644..100755
--- a/sfx2/inc/imagemgr.hxx
+++ b/sfx2/inc/sfx2/imagemgr.hxx
@@ -37,7 +37,7 @@
SFX2_DLLPUBLIC Image SAL_CALL GetImage(
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,
const ::rtl::OUString& aURL,
- BOOL bBig
+ bool bBig
);
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/inc/sfx2/imgdef.hxx b/sfx2/inc/sfx2/imgdef.hxx
index a729eb6cda84..a729eb6cda84 100644..100755
--- a/sfx2/inc/sfx2/imgdef.hxx
+++ b/sfx2/inc/sfx2/imgdef.hxx
diff --git a/sfx2/inc/imgmgr.hxx b/sfx2/inc/sfx2/imgmgr.hxx
index 506f29d3ad58..de3c9b55ecfc 100644..100755
--- a/sfx2/inc/imgmgr.hxx
+++ b/sfx2/inc/sfx2/imgmgr.hxx
@@ -49,18 +49,18 @@ public:
SfxImageManager( SfxModule* pModule = 0 );
~SfxImageManager();
- void RegisterToolBox( ToolBox *pBox, USHORT nFlags=0xFFFF);
+ void RegisterToolBox( ToolBox *pBox, sal_uInt16 nFlags=0xFFFF);
void ReleaseToolBox( ToolBox *pBox );
// get images from resources
void SetImages( ToolBox& rToolBox );
- void SetImages( ToolBox& rToolBox, BOOL bLarge );
- void SetImagesForceSize( ToolBox& rToolBox, BOOL bLarge );
+ void SetImages( ToolBox& rToolBox, bool bLarge );
+ void SetImagesForceSize( ToolBox& rToolBox, bool bLarge );
- Image GetImage( USHORT nId, BOOL bLarge ) const;
- Image GetImage( USHORT nId) const;
- Image SeekImage( USHORT nId, BOOL bLarge ) const;
- Image SeekImage( USHORT nId ) const;
+ Image GetImage( sal_uInt16 nId, bool bLarge ) const;
+ Image GetImage( sal_uInt16 nId) const;
+ Image SeekImage( sal_uInt16 nId, bool bLarge ) const;
+ Image SeekImage( sal_uInt16 nId ) const;
};
#endif
diff --git a/sfx2/inc/sfx2/ipclient.hxx b/sfx2/inc/sfx2/ipclient.hxx
index aec56328de65..bdcddc500ddb 100644..100755
--- a/sfx2/inc/sfx2/ipclient.hxx
+++ b/sfx2/inc/sfx2/ipclient.hxx
@@ -82,7 +82,7 @@ public:
sal_Bool IsObjectInPlaceActive() const;
sal_Bool IsObjectActive() const;
void DeactivateObject();
- BOOL SetObjArea( const Rectangle & );
+ sal_Bool SetObjArea( const Rectangle & );
Rectangle GetObjArea() const;
Rectangle GetScaledObjArea() const;
void SetSizeScale( const Fraction & rScaleWidth, const Fraction & rScaleHeight );
@@ -97,11 +97,12 @@ public:
ErrCode DoVerb( long nVerb );
void VisAreaChanged();
void ResetObject();
- BOOL IsUIActive();
+ sal_Bool IsUIActive();
// used in Writer
// Rectangle PixelObjVisAreaToLogic( const Rectangle & rObjRect ) const;
// Rectangle LogicObjAreaToPixel( const Rectangle & rRect ) const;
+ virtual void FormatChanged(); // object format was changed (used for StarMath formulas aligning)
};
#endif
diff --git a/sfx2/inc/sfx2/itemconnect.hxx b/sfx2/inc/sfx2/itemconnect.hxx
index a094297bfc01..1ca48d8d8635 100644..100755
--- a/sfx2/inc/sfx2/itemconnect.hxx
+++ b/sfx2/inc/sfx2/itemconnect.hxx
@@ -262,13 +262,13 @@ public:
/** Receives pointer to a newly created control wrapper.
@descr Takes ownership of the control wrapper. */
- explicit ItemControlConnection( USHORT nSlot, ControlWrpT* pNewCtrlWrp,
+ explicit ItemControlConnection( sal_uInt16 nSlot, ControlWrpT* pNewCtrlWrp,
ItemConnFlags nFlags = ITEMCONN_DEFAULT );
/** Convenience constructor. Receives reference to a control directly.
@descr May only be used, if ControlWrpT::ControlWrpT( ControlType& )
constructor exists. */
- explicit ItemControlConnection( USHORT nSlot, ControlType& rControl,
+ explicit ItemControlConnection( sal_uInt16 nSlot, ControlType& rControl,
ItemConnFlags nFlags = ITEMCONN_DEFAULT );
virtual ~ItemControlConnection();
@@ -300,7 +300,7 @@ class SFX2_DLLPUBLIC DummyItemConnection:
public ItemConnectionBase, public DummyWindowWrapper
{
public:
- explicit DummyItemConnection( USHORT nSlot, Window& rWindow,
+ explicit DummyItemConnection( sal_uInt16 nSlot, Window& rWindow,
ItemConnFlags nFlags = ITEMCONN_DEFAULT );
protected:
@@ -309,7 +309,7 @@ protected:
virtual bool FillItemSet( SfxItemSet& rDestSet, const SfxItemSet& rOldSet );
private:
- USHORT mnSlot;
+ sal_uInt16 mnSlot;
};
// ----------------------------------------------------------------------------
@@ -334,7 +334,7 @@ class NumericConnection : public ItemControlConnection< ItemWrpT,
public:
typedef typename ItemControlConnectionType::ControlWrapperType NumericFieldWrapperType;
- explicit NumericConnection( USHORT nSlot, NumericField& rField,
+ explicit NumericConnection( sal_uInt16 nSlot, NumericField& rField,
ItemConnFlags nFlags = ITEMCONN_DEFAULT );
};
@@ -365,7 +365,7 @@ class MetricConnection : public ItemControlConnection< ItemWrpT,
public:
typedef typename ItemControlConnectionType::ControlWrapperType MetricFieldWrapperType;
- explicit MetricConnection( USHORT nSlot, MetricField& rField,
+ explicit MetricConnection( sal_uInt16 nSlot, MetricField& rField,
FieldUnit eItemUnit = FUNIT_NONE, ItemConnFlags nFlags = ITEMCONN_DEFAULT );
};
@@ -397,7 +397,7 @@ public:
typedef typename ItemControlConnectionType::ControlWrapperType ListBoxWrapperType;
typedef typename ListBoxWrapperType::MapEntryType MapEntryType;
- explicit ListBoxConnection( USHORT nSlot, ListBox& rListBox,
+ explicit ListBoxConnection( sal_uInt16 nSlot, ListBox& rListBox,
const MapEntryType* pMap = 0, ItemConnFlags nFlags = ITEMCONN_DEFAULT );
};
@@ -429,7 +429,7 @@ public:
typedef typename ItemControlConnectionType::ControlWrapperType ValueSetWrapperType;
typedef typename ValueSetWrapperType::MapEntryType MapEntryType;
- explicit ValueSetConnection( USHORT nSlot, ValueSet& rValueSet,
+ explicit ValueSetConnection( sal_uInt16 nSlot, ValueSet& rValueSet,
const MapEntryType* pMap = 0, ItemConnFlags nFlags = ITEMCONN_DEFAULT );
};
@@ -484,7 +484,7 @@ private:
template< typename ItemWrpT, typename ControlWrpT >
ItemControlConnection< ItemWrpT, ControlWrpT >::ItemControlConnection(
- USHORT nSlot, ControlWrpT* pNewCtrlWrp, ItemConnFlags nFlags ) :
+ sal_uInt16 nSlot, ControlWrpT* pNewCtrlWrp, ItemConnFlags nFlags ) :
ItemConnectionBase( nFlags ),
maItemWrp( nSlot ),
mxCtrlWrp( pNewCtrlWrp )
@@ -493,7 +493,7 @@ ItemControlConnection< ItemWrpT, ControlWrpT >::ItemControlConnection(
template< typename ItemWrpT, typename ControlWrpT >
ItemControlConnection< ItemWrpT, ControlWrpT >::ItemControlConnection(
- USHORT nSlot, ControlType& rControl, ItemConnFlags nFlags ) :
+ sal_uInt16 nSlot, ControlType& rControl, ItemConnFlags nFlags ) :
ItemConnectionBase( nFlags ),
maItemWrp( nSlot ),
mxCtrlWrp( new ControlWrpT( rControl ) )
@@ -536,7 +536,7 @@ bool ItemControlConnection< ItemWrpT, ControlWrpT >::FillItemSet(
// do not rely on existence of ItemValueType::operator!=
if( !pOldItem || !(maItemWrp.GetItemValue( *pOldItem ) == aNewValue) )
{
- USHORT nWhich = ItemWrapperHelper::GetWhichId( rDestSet, maItemWrp.GetSlotId() );
+ sal_uInt16 nWhich = ItemWrapperHelper::GetWhichId( rDestSet, maItemWrp.GetSlotId() );
std::auto_ptr< ItemType > xItem(
static_cast< ItemType* >( maItemWrp.GetDefaultItem( rDestSet ).Clone() ) );
xItem->SetWhich( nWhich );
@@ -556,7 +556,7 @@ bool ItemControlConnection< ItemWrpT, ControlWrpT >::FillItemSet(
template< typename ItemWrpT >
NumericConnection< ItemWrpT >::NumericConnection(
- USHORT nSlot, NumericField& rField, ItemConnFlags nFlags ) :
+ sal_uInt16 nSlot, NumericField& rField, ItemConnFlags nFlags ) :
ItemControlConnectionType( nSlot, rField, nFlags )
{
}
@@ -565,7 +565,7 @@ NumericConnection< ItemWrpT >::NumericConnection(
template< typename ItemWrpT >
MetricConnection< ItemWrpT >::MetricConnection(
- USHORT nSlot, MetricField& rField, FieldUnit eItemUnit, ItemConnFlags nFlags ) :
+ sal_uInt16 nSlot, MetricField& rField, FieldUnit eItemUnit, ItemConnFlags nFlags ) :
ItemControlConnectionType( nSlot, new MetricFieldWrapperType( rField, eItemUnit ), nFlags )
{
}
@@ -574,7 +574,7 @@ MetricConnection< ItemWrpT >::MetricConnection(
template< typename ItemWrpT >
ListBoxConnection< ItemWrpT >::ListBoxConnection(
- USHORT nSlot, ListBox& rListBox, const MapEntryType* pMap, ItemConnFlags nFlags ) :
+ sal_uInt16 nSlot, ListBox& rListBox, const MapEntryType* pMap, ItemConnFlags nFlags ) :
ItemControlConnectionType( nSlot, new ListBoxWrapperType( rListBox, pMap ), nFlags )
{
}
@@ -583,7 +583,7 @@ ListBoxConnection< ItemWrpT >::ListBoxConnection(
template< typename ItemWrpT >
ValueSetConnection< ItemWrpT >::ValueSetConnection(
- USHORT nSlot, ValueSet& rValueSet, const MapEntryType* pMap, ItemConnFlags nFlags ) :
+ sal_uInt16 nSlot, ValueSet& rValueSet, const MapEntryType* pMap, ItemConnFlags nFlags ) :
ItemControlConnectionType( nSlot, new ValueSetWrapperType( rValueSet, pMap ), nFlags )
{
}
diff --git a/sfx2/inc/sfx2/itemwrapper.hxx b/sfx2/inc/sfx2/itemwrapper.hxx
index ba1f208f78d5..55d7c9b2a4d3 100644..100755
--- a/sfx2/inc/sfx2/itemwrapper.hxx
+++ b/sfx2/inc/sfx2/itemwrapper.hxx
@@ -48,20 +48,20 @@ class SFX2_DLLPUBLIC ItemWrapperHelper
{
public:
/** Returns the WID of the passed SID in the item set. */
- static USHORT GetWhichId( const SfxItemSet& rItemSet, USHORT nSlot );
+ static sal_uInt16 GetWhichId( const SfxItemSet& rItemSet, sal_uInt16 nSlot );
/** Returns true, if the passed item set supports the SID. */
- static bool IsKnownItem( const SfxItemSet& rItemSet, USHORT nSlot );
+ static bool IsKnownItem( const SfxItemSet& rItemSet, sal_uInt16 nSlot );
/** Returns an item from an item set, if it is not in "don't know" state.
@return Pointer to item, or 0 if it has "don't know" state. */
- static const SfxPoolItem* GetUniqueItem( const SfxItemSet& rItemSet, USHORT nSlot );
+ static const SfxPoolItem* GetUniqueItem( const SfxItemSet& rItemSet, sal_uInt16 nSlot );
/** Returns the default item from the pool of the passed item set. */
- static const SfxPoolItem& GetDefaultItem( const SfxItemSet& rItemSet, USHORT nSlot );
+ static const SfxPoolItem& GetDefaultItem( const SfxItemSet& rItemSet, sal_uInt16 nSlot );
/** Removes an item from rDestSet, if it is default in rOldSet. */
- static void RemoveDefaultItem( SfxItemSet& rDestSet, const SfxItemSet& rOldSet, USHORT nSlot );
+ static void RemoveDefaultItem( SfxItemSet& rDestSet, const SfxItemSet& rOldSet, sal_uInt16 nSlot );
};
// ============================================================================
@@ -103,10 +103,10 @@ public:
typedef ValueT ItemValueType;
typedef SingleItemWrapper< ItemT, ValueT > SingleItemWrapperType;
- inline explicit SingleItemWrapper( USHORT nSlot ) : mnSlot( nSlot ) {}
+ inline explicit SingleItemWrapper( sal_uInt16 nSlot ) : mnSlot( nSlot ) {}
/** Returns the SID this wrapper works on. */
- inline USHORT GetSlotId() const { return mnSlot; }
+ inline sal_uInt16 GetSlotId() const { return mnSlot; }
/** Returns the item from an item set, if it is not in "don't know" state.
@descr Similar to ItemWrapperHelper::GetUniqueItem(), but works always
@@ -124,7 +124,7 @@ public:
virtual void SetItemValue( ItemT& rItem, ValueT aValue ) const = 0;
private:
- USHORT mnSlot; /// The SID of this item wrapper.
+ sal_uInt16 mnSlot; /// The SID of this item wrapper.
};
// ============================================================================
@@ -143,7 +143,7 @@ template< typename ItemT, typename ValueT, typename InternalValueT = ValueT >
class ValueItemWrapper : public SingleItemWrapper< ItemT, ValueT >
{
public:
- inline explicit ValueItemWrapper( USHORT nSlot ) :
+ inline explicit ValueItemWrapper( sal_uInt16 nSlot ) :
SingleItemWrapper< ItemT, ValueT >( nSlot ) {}
virtual ValueT GetItemValue( const ItemT& rItem ) const
@@ -154,11 +154,11 @@ public:
// ----------------------------------------------------------------------------
-typedef ValueItemWrapper< SfxBoolItem, BOOL > BoolItemWrapper;
-typedef ValueItemWrapper< SfxInt16Item, INT16 > Int16ItemWrapper;
-typedef ValueItemWrapper< SfxUInt16Item, UINT16 > UInt16ItemWrapper;
-typedef ValueItemWrapper< SfxInt32Item, INT32 > Int32ItemWrapper;
-typedef ValueItemWrapper< SfxUInt32Item, UINT32 > UInt32ItemWrapper;
+typedef ValueItemWrapper< SfxBoolItem, sal_Bool > BoolItemWrapper;
+typedef ValueItemWrapper< SfxInt16Item, sal_Int16 > Int16ItemWrapper;
+typedef ValueItemWrapper< SfxUInt16Item, sal_uInt16 > UInt16ItemWrapper;
+typedef ValueItemWrapper< SfxInt32Item, sal_Int32 > Int32ItemWrapper;
+typedef ValueItemWrapper< SfxUInt32Item, sal_uInt32 > UInt32ItemWrapper;
typedef ValueItemWrapper< SfxStringItem, const String& > StringItemWrapper;
// ============================================================================
@@ -168,7 +168,7 @@ template< typename ItemT >
class IdentItemWrapper : public SingleItemWrapper< ItemT, const ItemT& >
{
public:
- inline explicit IdentItemWrapper( USHORT nSlot ) :
+ inline explicit IdentItemWrapper( sal_uInt16 nSlot ) :
SingleItemWrapper< ItemT, const ItemT& >( nSlot ) {}
virtual const ItemT& GetItemValue( const ItemT& rItem ) const
diff --git a/sfx2/inc/sfx2/layout-post.hxx b/sfx2/inc/sfx2/layout-post.hxx
index e7eddef08f39..e7eddef08f39 100644..100755
--- a/sfx2/inc/sfx2/layout-post.hxx
+++ b/sfx2/inc/sfx2/layout-post.hxx
diff --git a/sfx2/inc/sfx2/layout-pre.hxx b/sfx2/inc/sfx2/layout-pre.hxx
index db467fd06da7..db467fd06da7 100644..100755
--- a/sfx2/inc/sfx2/layout-pre.hxx
+++ b/sfx2/inc/sfx2/layout-pre.hxx
diff --git a/sfx2/inc/sfx2/layout-tabdlg.hxx b/sfx2/inc/sfx2/layout-tabdlg.hxx
index 2629b2c7c106..2629b2c7c106 100644..100755
--- a/sfx2/inc/sfx2/layout-tabdlg.hxx
+++ b/sfx2/inc/sfx2/layout-tabdlg.hxx
diff --git a/sfx2/inc/sfx2/layout.hxx b/sfx2/inc/sfx2/layout.hxx
index 95bd42d39c88..95bd42d39c88 100644..100755
--- a/sfx2/inc/sfx2/layout.hxx
+++ b/sfx2/inc/sfx2/layout.hxx
diff --git a/sfx2/inc/sfx2/linkmgr.hxx b/sfx2/inc/sfx2/linkmgr.hxx
index 19945092f683..dbd792413784 100644..100755
--- a/sfx2/inc/sfx2/linkmgr.hxx
+++ b/sfx2/inc/sfx2/linkmgr.hxx
@@ -73,7 +73,7 @@ class SFX2_DLLPUBLIC LinkManager
SfxObjectShell *pPersist; // LinkMgr muss vor SfxObjectShell freigegeben werden
protected:
- BOOL InsertLink( SvBaseLink* pLink, USHORT nObjType, USHORT nUpdateType,
+ sal_Bool InsertLink( SvBaseLink* pLink, sal_uInt16 nObjType, sal_uInt16 nUpdateType,
const String* pName = 0 );
public:
@@ -101,27 +101,27 @@ public:
void SetPersist( SfxObjectShell * p ) { pPersist = p; }
void Remove( SvBaseLink *pLink );
- void Remove( USHORT nPos, USHORT nCnt = 1 );
- BOOL Insert( SvBaseLink* pLink );
+ void Remove( sal_uInt16 nPos, sal_uInt16 nCnt = 1 );
+ sal_Bool Insert( SvBaseLink* pLink );
// den Link mit einem SvLinkSource verbinden und in die Liste eintragen
- BOOL InsertDDELink( SvBaseLink*,
+ sal_Bool InsertDDELink( SvBaseLink*,
const String& rServer,
const String& rTopic,
const String& rItem );
// falls am Link schon alles eingestellt ist !
- BOOL InsertDDELink( SvBaseLink* );
+ sal_Bool InsertDDELink( SvBaseLink* );
// den Link mit einem PseudoObject verbinden und in die Liste eintragen
- BOOL InsertFileLink( sfx2::SvBaseLink&,
- USHORT nFileType,
+ sal_Bool InsertFileLink( sfx2::SvBaseLink&,
+ sal_uInt16 nFileType,
const String& rTxt,
const String* pFilterNm = 0,
const String* pRange = 0 );
// falls am Link schon alles eingestellt ist !
- BOOL InsertFileLink( sfx2::SvBaseLink& );
+ sal_Bool InsertFileLink( sfx2::SvBaseLink& );
void ReconnectDdeLink(SfxObjectShell& rServer);
@@ -135,7 +135,7 @@ public:
void LinkServerShell(const ::rtl::OUString& rPath, SfxObjectShell& rServer, ::sfx2::SvBaseLink& rLink) const;
// erfrage die Strings fuer den Dialog
- BOOL GetDisplayNames( const SvBaseLink *,
+ sal_Bool GetDisplayNames( const SvBaseLink *,
String* pType,
String* pFile = 0,
String* pLink = 0,
@@ -143,9 +143,9 @@ public:
SvLinkSourceRef CreateObj( SvBaseLink* );
- void UpdateAllLinks( BOOL bAskUpdate = TRUE,
- BOOL bCallErrHdl = TRUE,
- BOOL bUpdateGrfLinks = FALSE,
+ void UpdateAllLinks( sal_Bool bAskUpdate = sal_True,
+ sal_Bool bCallErrHdl = sal_True,
+ sal_Bool bUpdateGrfLinks = sal_False,
Window* pParentWin = 0 );
// Liste aller Links erfragen (z.B. fuer Verknuepfungs-Dialog)
@@ -156,9 +156,9 @@ public:
// Liste der zu serviereden Links erfragen
const SvLinkSources& GetServers() const { return aServerTbl; }
// einen zu servierenden Link eintragen/loeschen
- BOOL InsertServer( SvLinkSource* rObj );
+ sal_Bool InsertServer( SvLinkSource* rObj );
void RemoveServer( SvLinkSource* rObj );
- void RemoveServer( USHORT nPos, USHORT nCnt = 1 )
+ void RemoveServer( sal_uInt16 nPos, sal_uInt16 nCnt = 1 )
{ aServerTbl.Remove( nPos, nCnt ); }
// eine Uebertragung wird abgebrochen, also alle DownloadMedien canceln
@@ -170,11 +170,11 @@ public:
// 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();
+ static sal_uIntPtr 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,
+ static sal_Bool GetGraphicFromAny( const String& rMimeType,
const ::com::sun::star::uno::Any & rValue,
Graphic& rGrf );
diff --git a/sfx2/inc/sfx2/linksrc.hxx b/sfx2/inc/sfx2/linksrc.hxx
index 4a0e38751782..11a9a2281f08 100644..100755
--- a/sfx2/inc/sfx2/linksrc.hxx
+++ b/sfx2/inc/sfx2/linksrc.hxx
@@ -72,12 +72,12 @@ public:
SvLinkSource();
virtual ~SvLinkSource();
- BOOL HasDataLinks( const SvBaseLink* = 0 ) const;
+ sal_Bool HasDataLinks( const SvBaseLink* = 0 ) const;
void Closed();
- ULONG GetUpdateTimeout() const;
- void SetUpdateTimeout( ULONG nTime );
+ sal_uIntPtr GetUpdateTimeout() const;
+ void SetUpdateTimeout( sal_uIntPtr nTime );
// notify the sink, the mime type is not
// a selection criterion
void DataChanged( const String & rMimeType,
@@ -85,22 +85,22 @@ public:
void SendDataChanged();
void NotifyDataChanged();
- virtual BOOL Connect( SvBaseLink* );
- virtual BOOL GetData( ::com::sun::star::uno::Any & rData /*out param*/,
+ virtual sal_Bool Connect( SvBaseLink* );
+ virtual sal_Bool GetData( ::com::sun::star::uno::Any & rData /*out param*/,
const String & rMimeType,
- BOOL bSynchron = FALSE );
+ sal_Bool bSynchron = sal_False );
- // TRUE => waitinmg for data
- virtual BOOL IsPending() const;
- // TRUE => data complete loaded
- virtual BOOL IsDataComplete() const;
+ // sal_True => waitinmg for data
+ virtual sal_Bool IsPending() const;
+ // sal_True => data complete loaded
+ virtual sal_Bool IsDataComplete() const;
// Link impl: DECL_LINK( MyEndEditHdl, sfx2::FileDialogHelper* ); <= param is the dialog
virtual void Edit( Window *, SvBaseLink *, const Link& rEndEditHdl );
void AddDataAdvise( SvBaseLink *, const String & rMimeType,
- USHORT nAdviceMode );
+ sal_uInt16 nAdviceMode );
void RemoveAllDataAdvise( SvBaseLink * );
void AddConnectAdvise( SvBaseLink * );
diff --git a/sfx2/inc/sfx2/lnkbase.hxx b/sfx2/inc/sfx2/lnkbase.hxx
index ddd3ce79de10..2c0e4c625c11 100644..100755
--- a/sfx2/inc/sfx2/lnkbase.hxx
+++ b/sfx2/inc/sfx2/lnkbase.hxx
@@ -81,18 +81,18 @@ private:
SvLinkSourceRef xObj;
String aLinkName;
BaseLink_Impl* pImpl;
- USHORT nObjType;
- BOOL bVisible : 1;
- BOOL bSynchron : 1;
- BOOL bUseCache : 1; // fuer GrafikLinks!
- BOOL bWasLastEditOK : 1;
+ sal_uInt16 nObjType;
+ sal_Bool bVisible : 1;
+ sal_Bool bSynchron : 1;
+ sal_Bool bUseCache : 1; // fuer GrafikLinks!
+ sal_Bool bWasLastEditOK : 1;
DECL_LINK( EndEditHdl, String* );
bool ExecuteEdit( const String& _rNewName );
protected:
- void SetObjType( USHORT );
+ void SetObjType( sal_uInt16 );
// setzen des LinkSourceName ohne aktion
void SetName( const String & rLn );
@@ -106,10 +106,10 @@ protected:
m_xInputStreamToLoadFrom;
SvBaseLink();
- SvBaseLink( USHORT nLinkType, ULONG nContentType = FORMAT_STRING );
+ SvBaseLink( sal_uInt16 nLinkType, sal_uIntPtr nContentType = FORMAT_STRING );
virtual ~SvBaseLink();
- void _GetRealObject( BOOL bConnect = TRUE );
+ void _GetRealObject( sal_Bool bConnect = sal_True );
SvLinkSource* GetRealObject()
{
@@ -122,10 +122,10 @@ public:
TYPEINFO();
// ask JP
virtual void Closed();
- SvBaseLink( const String& rNm, USHORT nObjectType,
+ SvBaseLink( const String& rNm, sal_uInt16 nObjectType,
SvLinkSource* );
- USHORT GetObjType() const { return nObjType; }
+ sal_uInt16 GetObjType() const { return nObjType; }
void SetObj( SvLinkSource * pObj );
SvLinkSource* GetObj() const { return xObj; }
@@ -136,30 +136,30 @@ public:
virtual void DataChanged( const String & rMimeType,
const ::com::sun::star::uno::Any & rValue );
- void SetUpdateMode( USHORT );
- USHORT GetUpdateMode() const;
- ULONG GetContentType() const;
- BOOL SetContentType( ULONG nType );
+ void SetUpdateMode( sal_uInt16 );
+ sal_uInt16 GetUpdateMode() const;
+ sal_uIntPtr GetContentType() const;
+ sal_Bool SetContentType( sal_uIntPtr nType );
LinkManager* GetLinkManager();
const LinkManager* GetLinkManager() const;
void SetLinkManager( LinkManager* _pMgr );
- BOOL Update();
+ sal_Bool Update();
void Disconnect();
// Link impl: DECL_LINK( MyEndDialogHdl, SvBaseLink* ); <= param is this
virtual void Edit( Window*, const Link& rEndEditHdl );
// soll der Link im Dialog angezeigt werden ? (Links im Link im ...)
- BOOL IsVisible() const { return bVisible; }
- void SetVisible( BOOL bFlag ) { bVisible = bFlag; }
+ sal_Bool IsVisible() const { return bVisible; }
+ void SetVisible( sal_Bool bFlag ) { bVisible = bFlag; }
// soll der Link synchron oder asynchron geladen werden?
- BOOL IsSynchron() const { return bSynchron; }
- void SetSynchron( BOOL bFlag ) { bSynchron = bFlag; }
+ sal_Bool IsSynchron() const { return bSynchron; }
+ void SetSynchron( sal_Bool bFlag ) { bSynchron = bFlag; }
- BOOL IsUseCache() const { return bUseCache; }
- void SetUseCache( BOOL bFlag ) { bUseCache = bFlag; }
+ sal_Bool IsUseCache() const { return bUseCache; }
+ void SetUseCache( sal_Bool bFlag ) { bUseCache = bFlag; }
void setStreamToLoadFrom(
const com::sun::star::uno::Reference<com::sun::star::io::XInputStream>& xInputStream,
@@ -169,7 +169,7 @@ public:
// #i88291#
void clearStreamToLoadFrom();
- inline BOOL WasLastEditOK() const { return bWasLastEditOK; }
+ inline sal_Bool WasLastEditOK() const { return bWasLastEditOK; }
FileDialogHelper* GetFileDialog( sal_uInt32 nFlags, const String& rFactory ) const;
};
diff --git a/sfx2/inc/sfx2/macrconf.hxx b/sfx2/inc/sfx2/macrconf.hxx
index 60692b4c49a6..60692b4c49a6 100644..100755
--- a/sfx2/inc/sfx2/macrconf.hxx
+++ b/sfx2/inc/sfx2/macrconf.hxx
diff --git a/sfx2/inc/sfx2/macropg.hxx b/sfx2/inc/sfx2/macropg.hxx
new file mode 100755
index 000000000000..fda2e3feaf96
--- /dev/null
+++ b/sfx2/inc/sfx2/macropg.hxx
@@ -0,0 +1,150 @@
+/*************************************************************************
+ *
+ * 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 _MACROPG_HXX
+#define _MACROPG_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+
+#include <sfx2/basedlgs.hxx>
+#include <sfx2/tabdlg.hxx>
+#include <svl/macitem.hxx>
+#include <vcl/lstbox.hxx>
+#include <com/sun/star/frame/XFrame.hpp>
+
+class _SfxMacroTabPage;
+class SvStringsDtor;
+class SvTabListBox;
+class Edit;
+class String;
+class SfxObjectShell;
+
+typedef SvStringsDtor* (*FNGetRangeHdl)( _SfxMacroTabPage*, const String& rLanguage );
+typedef SvStringsDtor* (*FNGetMacrosOfRangeHdl)( _SfxMacroTabPage*, const String& rLanguage, const String& rRange );
+
+class SfxConfigGroupListBox_Impl;
+class SfxConfigFunctionListBox_Impl;
+
+class _HeaderTabListBox;
+class _SfxMacroTabPage_Impl;
+
+class SFX2_DLLPUBLIC _SfxMacroTabPage : public SfxTabPage
+{
+ SvxMacroTableDtor aTbl;
+//#if 0 // _SOLAR__PRIVATE
+ DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, SelectEvent_Impl, SvTabListBox * );
+ DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, SelectGroup_Impl, ListBox * );
+ DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, SelectMacro_Impl, ListBox * );
+
+ DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, DoubleClickHdl_Impl, Control* );
+ DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, AssignDeleteHdl_Impl, PushButton * );
+
+ DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, ChangeScriptHdl_Impl, RadioButton * );
+ DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, GetFocus_Impl, Edit* );
+ DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, TimeOut_Impl, Timer* );
+//#endif
+protected:
+ _SfxMacroTabPage_Impl* mpImpl;
+
+ _SfxMacroTabPage( Window* pParent, const ResId& rId, const SfxItemSet& rItemSet );
+
+ void InitAndSetHandler();
+ void FillEvents();
+ void FillMacroList();
+ void EnableButtons( const String& rLanguage );
+
+public:
+
+ virtual ~_SfxMacroTabPage();
+
+ void AddEvent( const String & rEventName, sal_uInt16 nEventId );
+
+ const SvxMacroTableDtor& GetMacroTbl() const;
+ void SetMacroTbl( const SvxMacroTableDtor& rTbl );
+ void ClearMacroTbl();
+
+ virtual void ScriptChanged( const String& rLanguage );
+
+ // zum setzen / abfragen der Links
+ void SetGetRangeLink( FNGetRangeHdl pFn );
+ FNGetRangeHdl GetGetRangeLink() const;
+ void SetGetMacrosOfRangeLink( FNGetMacrosOfRangeHdl pFn );
+ FNGetMacrosOfRangeHdl GetGetMacrosOfRangeLink() const;
+
+ // --------- Erben aus der Basis -------------
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
+ virtual void Reset( const SfxItemSet& rSet );
+
+ void SetReadOnly( sal_Bool bSet );
+ sal_Bool IsReadOnly() const;
+ void SelectEvent( const String& rEventName, sal_uInt16 nEventId );
+};
+
+inline const SvxMacroTableDtor& _SfxMacroTabPage::GetMacroTbl() const
+{
+ return aTbl;
+}
+
+inline void _SfxMacroTabPage::SetMacroTbl( const SvxMacroTableDtor& rTbl )
+{
+ aTbl = rTbl;
+}
+
+inline void _SfxMacroTabPage::ClearMacroTbl()
+{
+ aTbl.DelDtor();
+}
+
+class SFX2_DLLPUBLIC SfxMacroTabPage : public _SfxMacroTabPage
+{
+public:
+ SfxMacroTabPage(
+ Window* pParent,
+ const ResId& rId,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxDocumentFrame,
+ const SfxItemSet& rSet
+ );
+
+ // --------- Erben aus der Basis -------------
+ static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet );
+};
+
+class SFX2_DLLPUBLIC SfxMacroAssignDlg : public SfxSingleTabDialog
+{
+public:
+ SfxMacroAssignDlg(
+ Window* pParent,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxDocumentFrame,
+ SfxItemSet& rSet );
+ SfxMacroAssignDlg(
+ Window* pParent,
+ const SfxObjectShell* _pShell,
+ SfxItemSet& rSet );
+ virtual ~SfxMacroAssignDlg();
+};
+
+#endif
diff --git a/sfx2/inc/mailmodelapi.hxx b/sfx2/inc/sfx2/mailmodelapi.hxx
index 6abe5f987597..3411a7647451 100644..100755
--- a/sfx2/inc/mailmodelapi.hxx
+++ b/sfx2/inc/sfx2/mailmodelapi.hxx
@@ -139,7 +139,7 @@ public:
sal_Bool IsEmpty() const;
};
-BOOL CreateFromAddress_Impl( String& rFrom );
+sal_Bool CreateFromAddress_Impl( String& rFrom );
#endif // INCLUDED_SFX_MAILMODEL_HXX
diff --git a/sfx2/inc/sfx2/mgetempl.hxx b/sfx2/inc/sfx2/mgetempl.hxx
index d1f58b7337d4..ee0f313d0470 100644..100755
--- a/sfx2/inc/sfx2/mgetempl.hxx
+++ b/sfx2/inc/sfx2/mgetempl.hxx
@@ -36,6 +36,9 @@
#include <sfx2/tabdlg.hxx>
+#include <svtools/svmedit2.hxx>
+#include <svtools/svmedit.hxx>
+
/* erwartet:
SID_TEMPLATE_NAME : In: StringItem, Name der Vorlage
SID_TEMPLATE_FAMILY : In: Familie der Vorlage
@@ -53,6 +56,8 @@ class SfxManageStyleSheetPage : public SfxTabPage
{
FixedText aNameFt;
Edit aNameEd;
+ ExtMultiLineEdit aNameMLE;
+
CheckBox aAutoCB;
FixedText aFollowFt;
@@ -64,21 +69,21 @@ class SfxManageStyleSheetPage : public SfxTabPage
FixedText aFilterFt;
ListBox aFilterLb;
+ FixedLine aDescGb;
FixedInfo aDescFt;
MultiLineEdit aDescED;
- FixedLine aDescGb;
SfxStyleSheetBase *pStyle;
SfxStyleFamilies *pFamilies;
const SfxStyleFamilyItem *pItem;
String aBuf;
- BOOL bModified;
+ sal_Bool bModified;
// initiale Daten des Styles
String aName;
String aFollow;
String aParent;
- USHORT nFlags;
+ sal_uInt16 nFlags;
private:
friend class SfxStyleDialog;
@@ -95,7 +100,7 @@ friend class SfxStyleDialog;
static SfxTabPage* Create(Window *pParent, const SfxItemSet &rAttrSet );
protected:
- virtual BOOL FillItemSet(SfxItemSet &);
+ virtual sal_Bool FillItemSet(SfxItemSet &);
virtual void Reset(const SfxItemSet &);
using TabPage::ActivatePage;
diff --git a/sfx2/inc/mieclip.hxx b/sfx2/inc/sfx2/mieclip.hxx
index 6ab7c0a0006a..72f2e4e0487b 100644..100755
--- a/sfx2/inc/mieclip.hxx
+++ b/sfx2/inc/sfx2/mieclip.hxx
@@ -49,8 +49,8 @@ public:
~MSE40HTMLClipFormatObj();
//JP 31.01.2001: old interfaces
- SAL_DLLPRIVATE BOOL GetData( SotDataObject& );
- SAL_DLLPRIVATE BOOL GetData( SvData& );
+ SAL_DLLPRIVATE sal_Bool GetData( SotDataObject& );
+ SAL_DLLPRIVATE sal_Bool GetData( SvData& );
//JP 31.01.2001: the new one
SvStream* IsValid( SvStream& );
diff --git a/sfx2/inc/sfx2/minarray.hxx b/sfx2/inc/sfx2/minarray.hxx
index e3913854804c..22b2695ab16a 100644..100755
--- a/sfx2/inc/sfx2/minarray.hxx
+++ b/sfx2/inc/sfx2/minarray.hxx
@@ -47,42 +47,42 @@ class ARR\
{\
private:\
T* pData;\
- USHORT nUsed;\
- BYTE nGrow;\
- BYTE nUnused;\
+ sal_uInt16 nUsed;\
+ sal_uInt8 nGrow;\
+ sal_uInt8 nUnused;\
public:\
- ARR( BYTE nInitSize = nI, BYTE nGrowSize = nG );\
+ ARR( sal_uInt8 nInitSize = nI, sal_uInt8 nGrowSize = nG );\
ARR( const ARR& rOrig );\
~ARR();\
\
ARR& operator= ( const ARR& rOrig );\
\
- const T& GetObject( USHORT nPos ) const; \
- T& GetObject( USHORT nPos ); \
+ const T& GetObject( sal_uInt16 nPos ) const; \
+ T& GetObject( sal_uInt16 nPos ); \
\
- void Insert( USHORT nPos, ARR& rIns, USHORT nStart = 0, USHORT nEnd = USHRT_MAX );\
- void Insert( USHORT nPos, const T& rElem );\
- void Insert( USHORT nPos, const T& rElems, USHORT nLen );\
+ void Insert( sal_uInt16 nPos, ARR& rIns, sal_uInt16 nStart = 0, sal_uInt16 nEnd = USHRT_MAX );\
+ void Insert( sal_uInt16 nPos, const T& rElem );\
+ void Insert( sal_uInt16 nPos, const T& rElems, sal_uInt16 nLen );\
void Append( const T& rElem );\
\
- BOOL Remove( const T& rElem );\
- USHORT Remove( USHORT nPos, USHORT nLen );\
+ sal_Bool Remove( const T& rElem );\
+ sal_uInt16 Remove( sal_uInt16 nPos, sal_uInt16 nLen );\
\
- USHORT Count() const { return nUsed; }\
+ sal_uInt16 Count() const { return nUsed; }\
T* operator*();\
- const T& operator[]( USHORT nPos ) const;\
- T& operator[]( USHORT nPos );\
+ const T& operator[]( sal_uInt16 nPos ) const;\
+ T& operator[]( sal_uInt16 nPos );\
\
- BOOL Contains( const T& rItem ) const;\
+ sal_Bool Contains( const T& rItem ) const;\
void Clear() { Remove( 0, Count() ); }\
};\
\
-inline void ARR::Insert( USHORT nPos, ARR& rIns, USHORT nStart, USHORT nEnd )\
+inline void ARR::Insert( sal_uInt16 nPos, ARR& rIns, sal_uInt16 nStart, sal_uInt16 nEnd )\
{\
Insert( nPos, *(rIns.pData+(sizeof(T)*nStart)), nStart-nEnd+1 );\
}\
\
-inline void ARR::Insert( USHORT nPos, const T& rElem )\
+inline void ARR::Insert( sal_uInt16 nPos, const T& rElem )\
{\
Insert( nPos, rElem, 1 );\
}\
@@ -91,24 +91,24 @@ inline T* ARR::operator*()\
{\
return ( nUsed==0 ? 0 : pData );\
} \
-inline const T& ARR::operator[]( USHORT nPos ) const\
+inline const T& ARR::operator[]( sal_uInt16 nPos ) const\
{\
DBG_ASSERT( nPos < nUsed, "" ); \
return *(pData+nPos);\
} \
-inline T& ARR::operator [] (USHORT nPos) \
+inline T& ARR::operator [] (sal_uInt16 nPos) \
{\
DBG_ASSERT( nPos < nUsed, "" ); \
return *(pData+nPos); \
} \
-inline const T& ARR::GetObject( USHORT nPos ) const { return operator[](nPos); } \
-inline T& ARR::GetObject( USHORT nPos ) { return operator[](nPos); } \
+inline const T& ARR::GetObject( sal_uInt16 nPos ) const { return operator[](nPos); } \
+inline T& ARR::GetObject( sal_uInt16 nPos ) { return operator[](nPos); } \
#ifndef _lint
// String too long
#define IMPL_OBJARRAY( ARR, T ) \
-ARR::ARR( BYTE nInitSize, BYTE nGrowSize ): \
+ARR::ARR( sal_uInt8 nInitSize, sal_uInt8 nGrowSize ): \
nUsed(0), \
nGrow( nGrowSize ? nGrowSize : 1 ), \
nUnused(nInitSize) \
@@ -134,7 +134,7 @@ ARR::ARR( const ARR& rOrig ) \
size_t nBytes = (nUsed + nUnused) * sizeof(T); \
pData = (T*) new char [ nBytes ]; \
memset( pData, 0, nBytes ); \
- for ( USHORT n = 0; n < nUsed; ++n ) \
+ for ( sal_uInt16 n = 0; n < nUsed; ++n ) \
*(pData+n) = *(rOrig.pData+n); \
} \
else \
@@ -143,14 +143,14 @@ ARR::ARR( const ARR& rOrig ) \
\
ARR::~ARR() \
{ \
- for ( USHORT n = 0; n < nUsed; ++n ) \
+ for ( sal_uInt16 n = 0; n < nUsed; ++n ) \
( pData+n )->T::~T(); \
delete[] (char*) pData;\
} \
\
ARR& ARR::operator= ( const ARR& rOrig )\
{ \
- for ( USHORT n = 0; n < nUsed; ++n ) \
+ for ( sal_uInt16 n = 0; n < nUsed; ++n ) \
( pData+n )->T::~T(); \
delete[] (char*) pData;\
\
@@ -163,7 +163,7 @@ ARR& ARR::operator= ( const ARR& rOrig )\
size_t nBytes = (nUsed + nUnused) * sizeof(T); \
pData = (T*) new char[ nBytes ]; \
memset( pData, 0, nBytes ); \
- for ( USHORT n = 0; n < nUsed; ++n ) \
+ for ( sal_uInt16 n = 0; n < nUsed; ++n ) \
*(pData+n) = *(rOrig.pData+n); \
} \
else \
@@ -176,7 +176,7 @@ void ARR::Append( const T& aElem ) \
\
if ( nUnused == 0 ) \
{ \
- USHORT nNewSize = (nUsed == 1) ? (nGrow==1 ? 2 : nGrow) : nUsed+nGrow; \
+ sal_uInt16 nNewSize = (nUsed == 1) ? (nGrow==1 ? 2 : nGrow) : nUsed+nGrow; \
size_t nBytes = nNewSize * sizeof(T); \
T* pNewData = (T*) new char[ nBytes ]; \
memset( pNewData, 0, nBytes ); \
@@ -185,7 +185,7 @@ void ARR::Append( const T& aElem ) \
memcpy( pNewData, pData, nUsed * sizeof(T) ); \
delete[] (char*) pData;\
} \
- nUnused = (BYTE)(nNewSize-nUsed); \
+ nUnused = (sal_uInt8)(nNewSize-nUsed); \
pData = pNewData; \
} \
\
@@ -195,17 +195,17 @@ void ARR::Append( const T& aElem ) \
--nUnused; \
} \
\
-USHORT ARR::Remove( USHORT nPos, USHORT nLen ) \
+sal_uInt16 ARR::Remove( sal_uInt16 nPos, sal_uInt16 nLen ) \
{ \
DBG_ASSERT( (nPos+nLen) < (nUsed+1), "" ); \
DBG_ASSERT( nLen > 0, "" ); \
\
- nLen = Min( (USHORT)(nUsed-nPos), (USHORT)nLen ); \
+ nLen = Min( (sal_uInt16)(nUsed-nPos), (sal_uInt16)nLen ); \
\
if ( nLen == 0 ) \
return 0; \
\
- for ( USHORT n = nPos; n < (nPos+nLen); ++n ) \
+ for ( sal_uInt16 n = nPos; n < (nPos+nLen); ++n ) \
( pData+n )->T::~T(); \
\
if ( (nUsed-nLen) == 0 ) \
@@ -219,8 +219,8 @@ USHORT ARR::Remove( USHORT nPos, USHORT nLen ) \
\
if ( (nUnused+nLen) >= nGrow ) \
{ \
- USHORT nNewUsed = nUsed-nLen; \
- USHORT nNewSize = ((nNewUsed+nGrow-1)/nGrow) * nGrow; \
+ sal_uInt16 nNewUsed = nUsed-nLen; \
+ sal_uInt16 nNewSize = ((nNewUsed+nGrow-1)/nGrow) * nGrow; \
DBG_ASSERT( nNewUsed <= nNewSize && nNewUsed+nGrow > nNewSize, \
"shrink size computation failed" ); \
size_t nBytes = nNewSize * sizeof(T); \
@@ -233,7 +233,7 @@ USHORT ARR::Remove( USHORT nPos, USHORT nLen ) \
delete[] (char*) pData;\
pData = pNewData; \
nUsed = nNewUsed; \
- nUnused = (BYTE)(nNewSize - nNewUsed); \
+ nUnused = (sal_uInt8)(nNewSize - nNewUsed); \
return nLen; \
} \
\
@@ -243,39 +243,39 @@ USHORT ARR::Remove( USHORT nPos, USHORT nLen ) \
memmove(pData+nPos, pData+nPos+nLen, (nUsed-nPos-nLen) * sizeof(T));\
} \
nUsed = nUsed - nLen; \
- nUnused = sal::static_int_cast< BYTE >(nUnused + nLen); \
+ nUnused = sal::static_int_cast< sal_uInt8 >(nUnused + nLen); \
return nLen; \
} \
\
-BOOL ARR::Remove( const T& aElem ) \
+sal_Bool ARR::Remove( const T& aElem ) \
{ \
if ( nUsed == 0 ) \
- return FALSE; \
+ return sal_False; \
\
const T *pIter = pData + nUsed - 1; \
- for ( USHORT n = 0; n < nUsed; ++n, --pIter ) \
+ for ( sal_uInt16 n = 0; n < nUsed; ++n, --pIter ) \
if ( *pIter == aElem ) \
{ \
Remove(nUsed-n-1, 1); \
- return TRUE; \
+ return sal_True; \
} \
- return FALSE; \
+ return sal_False; \
} \
\
-BOOL ARR::Contains( const T& rItem ) const \
+sal_Bool ARR::Contains( const T& rItem ) const \
{ \
if ( !nUsed ) \
- return FALSE; \
- for ( USHORT n = 0; n < nUsed; ++n ) \
+ return sal_False; \
+ for ( sal_uInt16 n = 0; n < nUsed; ++n ) \
{ \
const T& r2ndItem = GetObject(n); \
if ( r2ndItem == rItem ) \
- return TRUE; \
+ return sal_True; \
} \
- return FALSE; \
+ return sal_False; \
} \
\
-void ARR::Insert( USHORT nPos, const T& rElems, USHORT nLen ) \
+void ARR::Insert( sal_uInt16 nPos, const T& rElems, sal_uInt16 nLen ) \
{ \
DBG_ASSERT( nPos <= nUsed, "" ); \
\
@@ -283,7 +283,7 @@ void ARR::Insert( USHORT nPos, const T& rElems, USHORT nLen ) \
{ \
\
/* auf die naechste Grow-Grenze aufgerundet vergroeszern */ \
- USHORT nNewSize; \
+ sal_uInt16 nNewSize; \
for ( nNewSize = nUsed+nGrow; nNewSize < (nUsed + nLen); ++nNewSize ) \
/* empty loop */; \
size_t nBytes = nNewSize * sizeof(T); \
@@ -296,7 +296,7 @@ void ARR::Insert( USHORT nPos, const T& rElems, USHORT nLen ) \
memcpy( pNewData, pData, nUsed * sizeof(T) ); \
delete (char*) pData;\
} \
- nUnused = (BYTE)(nNewSize-nUsed); \
+ nUnused = (sal_uInt8)(nNewSize-nUsed); \
pData = pNewData; \
} \
\
@@ -308,7 +308,7 @@ void ARR::Insert( USHORT nPos, const T& rElems, USHORT nLen ) \
\
memmove(pData+nPos, &rElems, sizeof(T) * nLen); \
nUsed = nUsed + nLen; \
- nUnused = sal::static_int_cast< BYTE >(nUnused - nLen); \
+ nUnused = sal::static_int_cast< sal_uInt8 >(nUnused - nLen); \
}
// _lint
@@ -318,26 +318,26 @@ class SFX2_DLLPUBLIC SfxPtrArr
{
private:
void** pData;
- USHORT nUsed;
- BYTE nGrow;
- BYTE nUnused;
+ sal_uInt16 nUsed;
+ sal_uInt8 nGrow;
+ sal_uInt8 nUnused;
public:
- SfxPtrArr( BYTE nInitSize = 0, BYTE nGrowSize = 8 );
+ SfxPtrArr( sal_uInt8 nInitSize = 0, sal_uInt8 nGrowSize = 8 );
SfxPtrArr( const SfxPtrArr& rOrig );
~SfxPtrArr();
SfxPtrArr& operator= ( const SfxPtrArr& rOrig );
- void* GetObject( USHORT nPos ) const { return operator[](nPos); }
- void*& GetObject( USHORT nPos ) { return operator[](nPos); }
- void Insert( USHORT nPos, void* rElem );
+ void* GetObject( sal_uInt16 nPos ) const { return operator[](nPos); }
+ void*& GetObject( sal_uInt16 nPos ) { return operator[](nPos); }
+ void Insert( sal_uInt16 nPos, void* rElem );
void Append( void* rElem );
- BOOL Replace( void* pOldElem, void* pNewElem );
- BOOL Remove( void* rElem );
- USHORT Remove( USHORT nPos, USHORT nLen );
- USHORT Count() const { return nUsed; }
+ sal_Bool Replace( void* pOldElem, void* pNewElem );
+ sal_Bool Remove( void* rElem );
+ sal_uInt16 Remove( sal_uInt16 nPos, sal_uInt16 nLen );
+ sal_uInt16 Count() const { return nUsed; }
inline void** operator*();
- inline void* operator[]( USHORT nPos ) const;
- inline void*& operator[]( USHORT nPos );
- BOOL Contains( const void* rItem ) const;
+ inline void* operator[]( sal_uInt16 nPos ) const;
+ inline void*& operator[]( sal_uInt16 nPos );
+ sal_Bool Contains( const void* rItem ) const;
void Clear() { Remove( 0, Count() ); }
};
@@ -346,13 +346,13 @@ inline void** SfxPtrArr::operator*()
return ( nUsed==0 ? 0 : pData );
}
-inline void* SfxPtrArr::operator[]( USHORT nPos ) const
+inline void* SfxPtrArr::operator[]( sal_uInt16 nPos ) const
{
DBG_ASSERT( nPos < nUsed, "" );
return *(pData+nPos);
}
-inline void*& SfxPtrArr::operator [] (USHORT nPos)
+inline void*& SfxPtrArr::operator [] (sal_uInt16 nPos)
{
DBG_ASSERT( nPos < nUsed, "" );
return *(pData+nPos);
@@ -363,35 +363,35 @@ inline void*& SfxPtrArr::operator [] (USHORT nPos)
class ARR: public SfxPtrArr\
{\
public:\
- ARR( BYTE nIni=nI, BYTE nGrowValue=nG ):\
+ ARR( sal_uInt8 nIni=nI, sal_uInt8 nGrowValue=nG ):\
SfxPtrArr(nIni,nGrowValue) \
{}\
ARR( const ARR& rOrig ):\
SfxPtrArr(rOrig) \
{}\
- T GetObject( USHORT nPos ) const { return operator[](nPos); } \
- T& GetObject( USHORT nPos ) { return operator[](nPos); } \
- void Insert( USHORT nPos, T aElement ) {\
+ T GetObject( sal_uInt16 nPos ) const { return operator[](nPos); } \
+ T& GetObject( sal_uInt16 nPos ) { return operator[](nPos); } \
+ void Insert( sal_uInt16 nPos, T aElement ) {\
SfxPtrArr::Insert(nPos,(void *)aElement);\
}\
void Append( T aElement ) {\
SfxPtrArr::Append((void *)aElement);\
}\
- BOOL Replace( T aOldElem, T aNewElem ) {\
+ sal_Bool Replace( T aOldElem, T aNewElem ) {\
return SfxPtrArr::Replace((void *)aOldElem, (void*) aNewElem);\
}\
void Remove( T aElement ) {\
SfxPtrArr::Remove((void*)aElement);\
}\
- void Remove( USHORT nPos, USHORT nLen = 1 ) {\
+ void Remove( sal_uInt16 nPos, sal_uInt16 nLen = 1 ) {\
SfxPtrArr::Remove( nPos, nLen ); \
}\
T* operator *() {\
return (T*) SfxPtrArr::operator*();\
}\
- T operator[]( USHORT nPos ) const { \
+ T operator[]( sal_uInt16 nPos ) const { \
return (T) SfxPtrArr::operator[](nPos); } \
- T& operator[]( USHORT nPos ) { \
+ T& operator[]( sal_uInt16 nPos ) { \
return (T&) SfxPtrArr::operator[](nPos); } \
void Clear() { Remove( 0, Count() ); }\
};
@@ -400,25 +400,25 @@ class ByteArr
{
private:
char* pData;
- USHORT nUsed;
- BYTE nGrow;
- BYTE nUnused;
+ sal_uInt16 nUsed;
+ sal_uInt8 nGrow;
+ sal_uInt8 nUnused;
public:
- ByteArr( BYTE nInitSize = 0, BYTE nGrowSize = 8 );
+ ByteArr( sal_uInt8 nInitSize = 0, sal_uInt8 nGrowSize = 8 );
ByteArr( const ByteArr& rOrig );
~ByteArr();
ByteArr& operator= ( const ByteArr& rOrig );
- char GetObject( USHORT nPos ) const { return operator[](nPos); }
- char& GetObject( USHORT nPos ) { return operator[](nPos); }
- void Insert( USHORT nPos, char rElem );
+ char GetObject( sal_uInt16 nPos ) const { return operator[](nPos); }
+ char& GetObject( sal_uInt16 nPos ) { return operator[](nPos); }
+ void Insert( sal_uInt16 nPos, char rElem );
void Append( char rElem );
- BOOL Remove( char rElem );
- USHORT Remove( USHORT nPos, USHORT nLen );
- USHORT Count() const { return nUsed; }
+ sal_Bool Remove( char rElem );
+ sal_uInt16 Remove( sal_uInt16 nPos, sal_uInt16 nLen );
+ sal_uInt16 Count() const { return nUsed; }
char* operator*();
- char operator[]( USHORT nPos ) const;
- char& operator[]( USHORT nPos );
- BOOL Contains( const char rItem ) const;
+ char operator[]( sal_uInt16 nPos ) const;
+ char& operator[]( sal_uInt16 nPos );
+ sal_Bool Contains( const char rItem ) const;
void Clear() { Remove( 0, Count() ); }
};
@@ -431,15 +431,15 @@ inline char* ByteArr::operator*()
class ARR: public ByteArr\
{\
public:\
- ARR( BYTE nIni=nI, BYTE nGrow=nG ):\
+ ARR( sal_uInt8 nIni=nI, sal_uInt8 nGrow=nG ):\
ByteArr(nIni,nGrow) \
{}\
ARR( const ARR& rOrig ):\
ByteArr(rOrig) \
{}\
- T GetObject( USHORT nPos ) const { return operator[](nPos); } \
- T& GetObject( USHORT nPos ) { return operator[](nPos); } \
- void Insert( USHORT nPos, T aElement ) {\
+ T GetObject( sal_uInt16 nPos ) const { return operator[](nPos); } \
+ T& GetObject( sal_uInt16 nPos ) { return operator[](nPos); } \
+ void Insert( sal_uInt16 nPos, T aElement ) {\
ByteArr::Insert(nPos,(char)aElement);\
}\
void Append( T aElement ) {\
@@ -448,15 +448,15 @@ public:\
void Remove( T aElement ) {\
ByteArr::Remove((char)aElement);\
}\
- void Remove( USHORT nPos, USHORT nLen = 1 ) {\
+ void Remove( sal_uInt16 nPos, sal_uInt16 nLen = 1 ) {\
ByteArr::Remove( nPos, nLen ); \
}\
T* operator *() {\
return (T*) ByteArr::operator*();\
}\
- T operator[]( USHORT nPos ) const { \
+ T operator[]( sal_uInt16 nPos ) const { \
return (T) ByteArr::operator[](nPos); } \
- T& operator[]( USHORT nPos ) { \
+ T& operator[]( sal_uInt16 nPos ) { \
return (T&) ByteArr::operator[](nPos); } \
void Clear() { Remove( 0, Count() ); }\
};
@@ -465,25 +465,25 @@ class WordArr
{
private:
short* pData;
- USHORT nUsed;
- BYTE nGrow;
- BYTE nUnused;
+ sal_uInt16 nUsed;
+ sal_uInt8 nGrow;
+ sal_uInt8 nUnused;
public:
- WordArr( BYTE nInitSize = 0, BYTE nGrowSize = 8 );
+ WordArr( sal_uInt8 nInitSize = 0, sal_uInt8 nGrowSize = 8 );
WordArr( const WordArr& rOrig );
~WordArr();
WordArr& operator= ( const WordArr& rOrig );
- short GetObject( USHORT nPos ) const { return operator[](nPos); }
- short& GetObject( USHORT nPos ) { return operator[](nPos); }
- void Insert( USHORT nPos, short rElem );
+ short GetObject( sal_uInt16 nPos ) const { return operator[](nPos); }
+ short& GetObject( sal_uInt16 nPos ) { return operator[](nPos); }
+ void Insert( sal_uInt16 nPos, short rElem );
void Append( short rElem );
- BOOL Remove( short rElem );
- USHORT Remove( USHORT nPos, USHORT nLen );
- USHORT Count() const { return nUsed; }
+ sal_Bool Remove( short rElem );
+ sal_uInt16 Remove( sal_uInt16 nPos, sal_uInt16 nLen );
+ sal_uInt16 Count() const { return nUsed; }
short* operator*();
- short operator[]( USHORT nPos ) const;
- short& operator[]( USHORT nPos );
- BOOL Contains( const short rItem ) const;
+ short operator[]( sal_uInt16 nPos ) const;
+ short& operator[]( sal_uInt16 nPos );
+ sal_Bool Contains( const short rItem ) const;
void Clear() { Remove( 0, Count() ); }
};
@@ -496,15 +496,15 @@ inline short* WordArr::operator*()
class ARR: public WordArr\
{\
public:\
- ARR( BYTE nIni=nI, BYTE nGrowValue=nG ):\
+ ARR( sal_uInt8 nIni=nI, sal_uInt8 nGrowValue=nG ):\
WordArr(nIni,nGrowValue) \
{}\
ARR( const ARR& rOrig ):\
WordArr(rOrig) \
{}\
- T GetObject( USHORT nPos ) const { return operator[](nPos); } \
- T& GetObject( USHORT nPos ) { return operator[](nPos); } \
- void Insert( USHORT nPos, T aElement ) {\
+ T GetObject( sal_uInt16 nPos ) const { return operator[](nPos); } \
+ T& GetObject( sal_uInt16 nPos ) { return operator[](nPos); } \
+ void Insert( sal_uInt16 nPos, T aElement ) {\
WordArr::Insert(nPos,(short)aElement);\
}\
void Append( T aElement ) {\
@@ -513,15 +513,15 @@ public:\
void Remove( T aElement ) {\
WordArr::Remove((short)aElement);\
}\
- void Remove( USHORT nPos, USHORT nLen = 1 ) {\
+ void Remove( sal_uInt16 nPos, sal_uInt16 nLen = 1 ) {\
WordArr::Remove( nPos, nLen ); \
}\
T* operator *() {\
return (T*) WordArr::operator*();\
}\
- T operator[]( USHORT nPos ) const { \
+ T operator[]( sal_uInt16 nPos ) const { \
return (T) WordArr::operator[](nPos); } \
- T& operator[]( USHORT nPos ) { \
+ T& operator[]( sal_uInt16 nPos ) { \
return (T&) WordArr::operator[](nPos); } \
void Clear() { Remove( 0, Count() ); }\
};
diff --git a/sfx2/inc/minfitem.hxx b/sfx2/inc/sfx2/minfitem.hxx
index a3485f8b1934..3d2cd29aaa44 100644..100755
--- a/sfx2/inc/minfitem.hxx
+++ b/sfx2/inc/sfx2/minfitem.hxx
@@ -44,7 +44,7 @@ class SFX2_DLLPUBLIC SfxMacroInfoItem: public SfxPoolItem
public:
TYPEINFO();
- SfxMacroInfoItem( USHORT nWhich,
+ SfxMacroInfoItem( sal_uInt16 nWhich,
const BasicManager* pMgr,
const String &rLibName,
const String &rModuleName,
diff --git a/sfx2/inc/sfx2/minstack.hxx b/sfx2/inc/sfx2/minstack.hxx
index 89a5586d4da9..4c98ec5ef0f2 100644..100755
--- a/sfx2/inc/sfx2/minstack.hxx
+++ b/sfx2/inc/sfx2/minstack.hxx
@@ -35,7 +35,7 @@ DECL_OBJARRAY( ARR##arr_, T, nI, nG ); \
class ARR: private ARR##arr_ \
{ \
public: \
- ARR( BYTE nInitSize = nI, BYTE nGrowSize = nG ): \
+ ARR( sal_uInt8 nInitSize = nI, sal_uInt8 nGrowSize = nG ): \
ARR##arr_( nInitSize, nGrowSize ) \
{} \
\
@@ -43,14 +43,14 @@ public: \
ARR##arr_( rOrig ) \
{} \
\
- USHORT Count() const { return ARR##arr_::Count(); } \
+ sal_uInt16 Count() const { return ARR##arr_::Count(); } \
void Push( const T& rElem ) { Append( rElem ); } \
- const T& Top( USHORT nLevel = 0 ) const \
+ const T& Top( sal_uInt16 nLevel = 0 ) const \
{ return (*this)[Count()-nLevel-1]; } \
const T& Bottom() const { return (*this)[0]; } \
T Pop(); \
void Clear() { ARR##arr_::Clear(); } \
- BOOL Contains( const T& rItem ) const \
+ sal_Bool Contains( const T& rItem ) const \
{ return ARR##arr_::Contains( rItem ); } \
}
@@ -68,7 +68,7 @@ DECL_PTRARRAY( ARR##arr_, T, nI, nG ) \
class ARR: private ARR##arr_ \
{ \
public: \
- ARR( BYTE nInitSize = nI, BYTE nGrowSize = nG ): \
+ ARR( sal_uInt8 nInitSize = nI, sal_uInt8 nGrowSize = nG ): \
ARR##arr_( nInitSize, nGrowSize ) \
{} \
\
@@ -76,11 +76,11 @@ public: \
ARR##arr_( rOrig ) \
{} \
\
- USHORT Count() const { return ARR##arr_::Count(); } \
+ sal_uInt16 Count() const { return ARR##arr_::Count(); } \
void Push( T rElem ) { Append( rElem ); } \
- BOOL Replace( T rOldElem, T rNewElem ) \
+ sal_Bool Replace( T rOldElem, T rNewElem ) \
{ return ARR##arr_::Replace( rOldElem, rNewElem ); } \
- T Top( USHORT nLevel = 0 ) const \
+ T Top( sal_uInt16 nLevel = 0 ) const \
{ return (*this)[Count()-nLevel-1]; } \
T Bottom() const { return (*this)[0]; } \
T Pop() \
@@ -91,7 +91,7 @@ public: \
T* operator*() \
{ return &(*this)[Count()-1]; } \
void Clear() { ARR##arr_::Clear(); } \
- BOOL Contains( const T pItem ) const \
+ sal_Bool Contains( const T pItem ) const \
{ return ARR##arr_::Contains( pItem ); } \
}
diff --git a/sfx2/inc/sfx2/mnuitem.hxx b/sfx2/inc/sfx2/mnuitem.hxx
index 0763115d4749..a4b990c63b1f 100644..100755
--- a/sfx2/inc/sfx2/mnuitem.hxx
+++ b/sfx2/inc/sfx2/mnuitem.hxx
@@ -47,23 +47,23 @@ class SFX2_DLLPUBLIC SfxMenuControl: public SfxControllerItem
String aTitle;
SfxVirtualMenu* pOwnMenu;
SfxVirtualMenu* pSubMenu;
- BOOL b_ShowStrings;
- BOOL b_UnusedDummy;
+ sal_Bool b_ShowStrings;
+ sal_Bool b_UnusedDummy;
public:
SfxMenuControl();
- SfxMenuControl( BOOL bShowStrings );
- SfxMenuControl( USHORT, SfxBindings&);
+ SfxMenuControl( sal_Bool bShowStrings );
+ SfxMenuControl( sal_uInt16, SfxBindings&);
- static SfxMenuControl* CreateImpl( USHORT nId, Menu &rMenu, SfxBindings &rBindings );
- static void RegisterControl( USHORT nSlotId = 0, SfxModule *pMod=NULL );
+ static SfxMenuControl* CreateImpl( sal_uInt16 nId, Menu &rMenu, SfxBindings &rBindings );
+ static void RegisterControl( sal_uInt16 nSlotId = 0, SfxModule *pMod=NULL );
~SfxMenuControl();
using SfxControllerItem::Bind;
- void Bind( SfxVirtualMenu* pOwnMenu, USHORT nId,
+ void Bind( SfxVirtualMenu* pOwnMenu, sal_uInt16 nId,
const String& rTitle, SfxBindings& rBindings );
- void Bind( SfxVirtualMenu* pOwnMenu, USHORT nId,
+ void Bind( SfxVirtualMenu* pOwnMenu, sal_uInt16 nId,
SfxVirtualMenu& rSubMenu,
const String& rTitle, SfxBindings& rBindings );
@@ -73,13 +73,13 @@ public:
void SetOwnMenu( SfxVirtualMenu* pMenu );
void RemovePopup();
- virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
const SfxPoolItem* pState );
- static SfxMenuControl* CreateControl( USHORT nId, Menu &, SfxBindings & );
- static SfxUnoMenuControl* CreateControl( const String&, USHORT, Menu&, SfxBindings&, SfxVirtualMenu* );
- static SfxUnoMenuControl* CreateControl( const String&, USHORT, Menu&, const String& sItemText, SfxBindings&, SfxVirtualMenu* );
- static BOOL IsSpecialControl( USHORT nId, SfxModule* );
+ static SfxMenuControl* CreateControl( sal_uInt16 nId, Menu &, SfxBindings & );
+ static SfxUnoMenuControl* CreateControl( const String&, sal_uInt16, Menu&, SfxBindings&, SfxVirtualMenu* );
+ static SfxUnoMenuControl* CreateControl( const String&, sal_uInt16, Menu&, const String& sItemText, SfxBindings&, SfxVirtualMenu* );
+ static sal_Bool IsSpecialControl( sal_uInt16 nId, SfxModule* );
static void RegisterMenuControl(SfxModule*, SfxMenuCtrlFactory*);
};
@@ -88,25 +88,25 @@ class SfxUnoMenuControl : public SfxMenuControl
{
SfxUnoControllerItem* pUnoCtrl;
public:
- SfxUnoMenuControl( const String&, USHORT nId, Menu&,
+ SfxUnoMenuControl( const String&, sal_uInt16 nId, Menu&,
SfxBindings&, SfxVirtualMenu* );
- SfxUnoMenuControl( const String&, USHORT nId, Menu&,
+ SfxUnoMenuControl( const String&, sal_uInt16 nId, Menu&,
const String&,
SfxBindings&, SfxVirtualMenu* );
~SfxUnoMenuControl();
void Select();
};
-typedef SfxMenuControl* (*SfxMenuControlCtor)( USHORT nId, Menu &, SfxBindings & );
+typedef SfxMenuControl* (*SfxMenuControlCtor)( sal_uInt16 nId, Menu &, SfxBindings & );
struct SfxMenuCtrlFactory
{
SfxMenuControlCtor pCtor;
TypeId nTypeId;
- USHORT nSlotId;
+ sal_uInt16 nSlotId;
SfxMenuCtrlFactory( SfxMenuControlCtor pTheCtor,
- TypeId nTheTypeId, USHORT nTheSlotId ):
+ TypeId nTheTypeId, sal_uInt16 nTheSlotId ):
pCtor(pTheCtor),
nTypeId(nTheTypeId),
nSlotId(nTheSlotId)
@@ -124,13 +124,13 @@ inline SfxVirtualMenu* SfxMenuControl::GetPopupMenu() const
}
#define SFX_DECL_MENU_CONTROL() \
- static SfxMenuControl* CreateImpl( USHORT nId, Menu &rMenu, SfxBindings &rBindings ); \
- static void RegisterControl(USHORT nSlotId = 0, SfxModule *pMod=NULL)
+ static SfxMenuControl* CreateImpl( sal_uInt16 nId, Menu &rMenu, SfxBindings &rBindings ); \
+ static void RegisterControl(sal_uInt16 nSlotId = 0, SfxModule *pMod=NULL)
#define SFX_IMPL_MENU_CONTROL(Class, nItemClass) \
- SfxMenuControl* Class::CreateImpl( USHORT nId, Menu &rMenu, SfxBindings &rBindings ) \
+ SfxMenuControl* Class::CreateImpl( sal_uInt16 nId, Menu &rMenu, SfxBindings &rBindings ) \
{ return new Class(nId, rMenu, rBindings); } \
- void Class::RegisterControl(USHORT nSlotId, SfxModule *pMod) \
+ void Class::RegisterControl(sal_uInt16 nSlotId, SfxModule *pMod) \
{ SfxMenuControl::RegisterMenuControl( pMod, new SfxMenuCtrlFactory( \
Class::CreateImpl, TYPE(nItemClass), nSlotId ) ); }
@@ -138,15 +138,15 @@ inline SfxVirtualMenu* SfxMenuControl::GetPopupMenu() const
class SfxAppMenuControl_Impl : public SfxMenuControl
{
PopupMenu* pMenu;
- ULONG m_nSymbolsStyle;
- BOOL m_bShowMenuImages;
+ sal_uIntPtr m_nSymbolsStyle;
+ sal_Bool m_bShowMenuImages;
protected:
DECL_LINK( Activate, Menu * );
public:
SFX_DECL_MENU_CONTROL();
- SfxAppMenuControl_Impl( USHORT nPos, Menu& rMenu, SfxBindings& rBindings );
+ SfxAppMenuControl_Impl( sal_uInt16 nPos, Menu& rMenu, SfxBindings& rBindings );
~SfxAppMenuControl_Impl();
};
diff --git a/sfx2/inc/sfx2/mnumgr.hxx b/sfx2/inc/sfx2/mnumgr.hxx
index 1ca5aa9d824e..7fd7618ea3ea 100644..100755
--- a/sfx2/inc/sfx2/mnumgr.hxx
+++ b/sfx2/inc/sfx2/mnumgr.hxx
@@ -31,7 +31,7 @@
#include <stdarg.h>
#include <vcl/menu.hxx>
-#include <vcl/wintypes.hxx>
+#include <tools/wintypes.hxx>
#include <tools/link.hxx>
#include <com/sun/star/embed/VerbDescriptor.hpp>
#include <com/sun/star/uno/Sequence.hxx>
@@ -59,11 +59,11 @@ friend class SfxPopupMenuManager;
SfxVirtualMenu* pMenu; // das eigentliche Menu
SfxVirtualMenu* pOldMenu; // only while reconfiguring
- BOOL bMenuBar; // Popup oder MenuBar
+ sal_Bool bMenuBar; // Popup oder MenuBar
SfxBindings* pBindings;
ResMgr* pResMgr;
sal_uInt32 nType;
- BOOL bAddClipboardFuncs : 1;
+ sal_Bool bAddClipboardFuncs : 1;
void Construct( SfxVirtualMenu& rMenu );
@@ -71,7 +71,7 @@ protected:
SfxMenuManager( Menu*, SfxBindings& );
SfxMenuManager( const ResId&, SfxBindings& );
~SfxMenuManager();
- USHORT GetItemPos( USHORT nId );
+ sal_uInt16 GetItemPos( sal_uInt16 nId );
sal_uInt32 GetType() { return nType; }
public:
@@ -86,9 +86,9 @@ public:
const SfxBindings& GetBindings() const { return *pBindings; }
void SetResMgr(ResMgr* pMgr) {pResMgr = pMgr; }
ResMgr* GetResMgr() const { return pResMgr; }
- void SetPopupMenu( USHORT nId, PopupMenu *pMenu );
+ void SetPopupMenu( sal_uInt16 nId, PopupMenu *pMenu );
- void Construct_Impl( Menu* pMenu, BOOL bWithHelp );
+ void Construct_Impl( Menu* pMenu, sal_Bool bWithHelp );
};
//--------------------------------------------------------------------
@@ -118,20 +118,20 @@ public:
// Changing code which relies on Popup would need much more effort.
static SfxPopupMenuManager* Popup( const ResId& rResId, SfxViewFrame* pFrame,const Point& rPoint, Window* pWindow );
- USHORT Execute( const Point& rPos, Window *pWindow );
- USHORT Execute( const Point& rPoint, Window* pWindow, va_list pArgs, const SfxPoolItem *pArg1 );
- USHORT Execute( const Point& rPoint, Window* pWindow, const SfxPoolItem *pArg1 ... );
+ sal_uInt16 Execute( const Point& rPos, Window *pWindow );
+ sal_uInt16 Execute( const Point& rPoint, Window* pWindow, va_list pArgs, const SfxPoolItem *pArg1 );
+ sal_uInt16 Execute( const Point& rPoint, Window* pWindow, const SfxPoolItem *pArg1 ... );
// @deprecated (start)!!
// Don't use these methods any longer. The whole class will be removed in the future.
// Changing code which relies on these methods would need much more effort!
void StartInsert();
void EndInsert();
- void CheckItem( USHORT, BOOL );
- void RemoveItem( USHORT );
- void InsertItem( USHORT, const String&, MenuItemBits,
- USHORT nPos = MENU_APPEND );
- void InsertSeparator( USHORT nPos = MENU_APPEND );
+ void CheckItem( sal_uInt16, sal_Bool );
+ void RemoveItem( sal_uInt16 );
+ void InsertItem( sal_uInt16, const String&, MenuItemBits, const rtl::OString& rHelpId,
+ sal_uInt16 nPos = MENU_APPEND );
+ void InsertSeparator( sal_uInt16 nPos = MENU_APPEND );
// @deprecated (end)
void RemoveDisabledEntries();
diff --git a/sfx2/inc/sfx2/module.hxx b/sfx2/inc/sfx2/module.hxx
index 0ae9c471e493..d737b6cf295d 100644..100755
--- a/sfx2/inc/sfx2/module.hxx
+++ b/sfx2/inc/sfx2/module.hxx
@@ -34,7 +34,7 @@
#include <sfx2/shell.hxx>
#include <sfx2/imgdef.hxx>
#include <sal/types.h>
-#include <vcl/fldunit.hxx>
+#include <tools/fldunit.hxx>
class ImageList;
@@ -89,10 +89,10 @@ public:
virtual SfxTabPage* CreateTabPage( sal_uInt16 nId,
Window* pParent,
const SfxItemSet& rSet );
- virtual void Invalidate(USHORT nId = 0);
- BOOL IsActive() const;
+ virtual void Invalidate(sal_uInt16 nId = 0);
+ sal_Bool IsActive() const;
- /*virtual*/ bool IsChildWindowAvailable( const USHORT i_nId, const SfxViewFrame* i_pViewFrame ) const;
+ /*virtual*/ bool IsChildWindowAvailable( const sal_uInt16 i_nId, const SfxViewFrame* i_pViewFrame ) const;
static SfxModule* GetActiveModule( SfxViewFrame* pFrame=NULL );
static FieldUnit GetCurrentFieldUnit();
@@ -104,7 +104,7 @@ public:
SAL_DLLPRIVATE SfxStbCtrlFactArr_Impl* GetStbCtrlFactories_Impl() const;
SAL_DLLPRIVATE SfxMenuCtrlFactArr_Impl* GetMenuCtrlFactories_Impl() const;
SAL_DLLPRIVATE SfxChildWinFactArr_Impl* GetChildWinFactories_Impl() const;
- SAL_DLLPRIVATE ImageList* GetImageList_Impl( BOOL bBig );
+ SAL_DLLPRIVATE ImageList* GetImageList_Impl( sal_Bool bBig );
};
#endif
diff --git a/sfx2/inc/sfx2/msg.hxx b/sfx2/inc/sfx2/msg.hxx
index 434a9612b005..f13fcabcecfe 100644..100755
--- a/sfx2/inc/sfx2/msg.hxx
+++ b/sfx2/inc/sfx2/msg.hxx
@@ -30,6 +30,9 @@
#include <tools/rtti.hxx>
#include <sfx2/shell.hxx>
+#include <rtl/string.hxx>
+#include <rtl/ustring.hxx>
+#include <sfx2/dllapi.h>
//--------------------------------------------------------------------
@@ -109,14 +112,14 @@ enum SfxSlotKind
struct SfxTypeAttrib
{
- USHORT nAID;
+ sal_uInt16 nAID;
const char* pName;
};
struct SfxType
{
TypeId aTypeId;
- USHORT nAttribs;
+ sal_uInt16 nAttribs;
SfxTypeAttrib aAttrib[16];
const TypeId& Type() const
@@ -128,7 +131,7 @@ struct SfxType
struct SfxType0
{
TypeId aTypeId;
- USHORT nAttribs;
+ sal_uInt16 nAttribs;
const TypeId& Type() const
{ return aTypeId; }
@@ -139,7 +142,7 @@ struct SfxType0
#define SFX_DECL_TYPE(n) struct SfxType##n \
{ \
TypeId aTypeId; \
- USHORT nAttribs; \
+ sal_uInt16 nAttribs; \
SfxTypeAttrib aAttrib[n]; \
}
@@ -238,7 +241,7 @@ struct SfxFormalArgument
{
const SfxType* pType; // Typ des Parameters (SfxPoolItem Subklasse)
const char* pName; // Name des Parameters
- USHORT nSlotId;// Slot-Id zur Identifikation des Parameters
+ sal_uInt16 nSlotId;// Slot-Id zur Identifikation des Parameters
const TypeId& Type() const
{ return pType->aTypeId; }
@@ -251,13 +254,13 @@ struct SfxFormalArgument
class SfxSlot
{
public:
- USHORT nSlotId; // in Shell eindeutige Slot-Id
- USHORT nGroupId; // f"ur Konfigurations-Bereich
- ULONG nHelpId; // i.d.R. == nSlotId
- ULONG nFlags; // artihm. veroderte Flags
+ sal_uInt16 nSlotId; // in Shell eindeutige Slot-Id
+ sal_uInt16 nGroupId; // f"ur Konfigurations-Bereich
+ sal_uIntPtr nHelpId; // i.d.R. == nSlotId
+ sal_uIntPtr nFlags; // artihm. veroderte Flags
- USHORT nMasterSlotId; // Enum-Slot bzw. Which-Id
- USHORT nValue; // Wert, falls Enum-Slot
+ sal_uInt16 nMasterSlotId; // Enum-Slot bzw. Which-Id
+ sal_uInt16 nValue; // Wert, falls Enum-Slot
SfxExecFunc fnExec; // Funktion zum Ausf"uhren
SfxStateFunc fnState; // Funktion f"ur Status
@@ -270,7 +273,7 @@ public:
const SfxSlot* pNextSlot; // mit derselben Status-Methode
const SfxFormalArgument* pFirstArgDef; // erste formale Argument-Definition
- USHORT nArgDefCount; // Anzahl der formalen Argumente
+ sal_uInt16 nArgDefCount; // Anzahl der formalen Argumente
long nDisableFlags; // DisableFlags, die vorhanden sein
// m"ussen, damit der Slot enabled ist
const char* pUnoName; // UnoName des Slots
@@ -278,19 +281,21 @@ public:
public:
SfxSlotKind GetKind() const;
- USHORT GetSlotId() const;
- ULONG GetHelpId() const;
- ULONG GetMode() const;
- BOOL IsMode( ULONG nMode ) const;
- USHORT GetGroupId() const;
- USHORT GetMasterSlotId() const { return nMasterSlotId; }
- USHORT GetWhich( const SfxItemPool &rPool ) const;
- USHORT GetValue() const { return nValue; }
+ sal_uInt16 GetSlotId() const;
+ sal_uIntPtr GetHelpId() const;
+ sal_uIntPtr GetMode() const;
+ sal_Bool IsMode( sal_uIntPtr nMode ) const;
+ sal_uInt16 GetGroupId() const;
+ sal_uInt16 GetMasterSlotId() const { return nMasterSlotId; }
+ sal_uInt16 GetWhich( const SfxItemPool &rPool ) const;
+ sal_uInt16 GetValue() const { return nValue; }
const SfxType* GetType() const { return pType; }
const char* GetUnoName() const { return pUnoName; }
+ SFX2_DLLPUBLIC rtl::OString GetCommand() const;
+ SFX2_DLLPUBLIC rtl::OUString GetCommandString() const;
- USHORT GetFormalArgumentCount() const { return nArgDefCount; }
- const SfxFormalArgument& GetFormalArgument( USHORT nNo ) const
+ sal_uInt16 GetFormalArgumentCount() const { return nArgDefCount; }
+ const SfxFormalArgument& GetFormalArgument( sal_uInt16 nNo ) const
{ return pFirstArgDef[nNo]; }
SfxExecFunc GetExecFnc() const { return fnExec; }
@@ -304,14 +309,14 @@ public:
// returns the id of the function
-inline USHORT SfxSlot::GetSlotId() const
+inline sal_uInt16 SfxSlot::GetSlotId() const
{
return nSlotId;
}
//--------------------------------------------------------------------
// returns the help-id of the slot
-inline ULONG SfxSlot::GetHelpId() const
+inline sal_uIntPtr SfxSlot::GetHelpId() const
{
return nHelpId;
}
@@ -320,7 +325,7 @@ inline ULONG SfxSlot::GetHelpId() const
// returns a bitfield with flags
-inline ULONG SfxSlot::GetMode() const
+inline sal_uIntPtr SfxSlot::GetMode() const
{
return nFlags;
}
@@ -328,7 +333,7 @@ inline ULONG SfxSlot::GetMode() const
// determines if the specified mode is assigned
-inline BOOL SfxSlot::IsMode( ULONG nMode ) const
+inline sal_Bool SfxSlot::IsMode( sal_uIntPtr nMode ) const
{
return (nFlags & nMode) != 0;
}
@@ -336,7 +341,7 @@ inline BOOL SfxSlot::IsMode( ULONG nMode ) const
// returns the id of the associated group
-inline USHORT SfxSlot::GetGroupId() const
+inline sal_uInt16 SfxSlot::GetGroupId() const
{
return nGroupId;
diff --git a/sfx2/inc/sfx2/msgpool.hxx b/sfx2/inc/sfx2/msgpool.hxx
index bb5259779707..05854edbb010 100644..100755
--- a/sfx2/inc/sfx2/msgpool.hxx
+++ b/sfx2/inc/sfx2/msgpool.hxx
@@ -52,13 +52,13 @@ class SFX2_DLLPUBLIC SfxSlotPool
SfxSlotPool* _pParentPool;
ResMgr* _pResMgr;
SfxInterfaceArr_Impl* _pInterfaces;
- USHORT _nCurGroup;
- USHORT _nCurInterface;
- USHORT _nCurMsg;
+ sal_uInt16 _nCurGroup;
+ sal_uInt16 _nCurInterface;
+ sal_uInt16 _nCurMsg;
SfxSlotArr_Impl* _pUnoSlots;
private:
- const SfxSlot* SeekSlot( USHORT nObject );
+ const SfxSlot* SeekSlot( sal_uInt16 nObject );
public:
SfxSlotPool( SfxSlotPool* pParent=0, ResMgr* pMgr=0);
@@ -71,14 +71,14 @@ public:
static SfxSlotPool& GetSlotPool( SfxViewFrame *pFrame=NULL );
- USHORT GetGroupCount();
- String SeekGroup( USHORT nNo );
+ sal_uInt16 GetGroupCount();
+ String SeekGroup( sal_uInt16 nNo );
const SfxSlot* FirstSlot();
const SfxSlot* NextSlot();
- const SfxSlot* GetSlot( USHORT nId );
- const SfxSlot* GetUnoSlot( USHORT nId );
+ const SfxSlot* GetSlot( sal_uInt16 nId );
+ const SfxSlot* GetUnoSlot( sal_uInt16 nId );
const SfxSlot* GetUnoSlot( const String& rUnoName );
- TypeId GetSlotType( USHORT nSlotId ) const;
+ TypeId GetSlotType( sal_uInt16 nSlotId ) const;
};
//--------------------------------------------------------------------
diff --git a/sfx2/inc/sfx2/navigat.hxx b/sfx2/inc/sfx2/navigat.hxx
index 2661cf13db34..2412fca06a09 100644..100755
--- a/sfx2/inc/sfx2/navigat.hxx
+++ b/sfx2/inc/sfx2/navigat.hxx
@@ -39,7 +39,7 @@ class SfxNavigatorWrapper : public SfxChildWindow
public:
SfxNavigatorWrapper( Window* pParent ,
- USHORT nId ,
+ sal_uInt16 nId ,
SfxBindings* pBindings ,
SfxChildWinInfo* pInfo );
@@ -58,7 +58,7 @@ public:
virtual void Resize();
virtual void Resizing( Size& rSize );
- virtual BOOL Close();
+ virtual sal_Bool Close();
};
#endif
diff --git a/sfx2/inc/sfx2/new.hxx b/sfx2/inc/sfx2/new.hxx
index a566703508c6..d97ee529b3c3 100644..100755
--- a/sfx2/inc/sfx2/new.hxx
+++ b/sfx2/inc/sfx2/new.hxx
@@ -79,20 +79,20 @@ private:
public:
- SfxNewFileDialog(Window *pParent, USHORT nFlags = 0);
+ SfxNewFileDialog(Window *pParent, sal_uInt16 nFlags = 0);
~SfxNewFileDialog();
- // Liefert FALSE, wenn '- Keine -' als Vorlage eingestellt ist
- // Nur wenn IsTemplate() TRUE liefert, koennen Vorlagennamen
+ // Liefert sal_False, wenn '- Keine -' als Vorlage eingestellt ist
+ // Nur wenn IsTemplate() sal_True liefert, koennen Vorlagennamen
// erfragt werden
- BOOL IsTemplate() const;
+ sal_Bool IsTemplate() const;
String GetTemplateRegion() const;
String GetTemplateName() const;
String GetTemplateFileName() const;
// load template methods
- USHORT GetTemplateFlags()const;
- void SetTemplateFlags(USHORT nSet);
+ sal_uInt16 GetTemplateFlags()const;
+ void SetTemplateFlags(sal_uInt16 nSet);
};
#endif
diff --git a/sfx2/inc/sfx2/newstyle.hxx b/sfx2/inc/sfx2/newstyle.hxx
index 22f47eec8974..22f47eec8974 100644..100755
--- a/sfx2/inc/sfx2/newstyle.hxx
+++ b/sfx2/inc/sfx2/newstyle.hxx
diff --git a/sfx2/inc/sfx2/objface.hxx b/sfx2/inc/sfx2/objface.hxx
index e77681223411..d867bd065f2b 100644..100755
--- a/sfx2/inc/sfx2/objface.hxx
+++ b/sfx2/inc/sfx2/objface.hxx
@@ -54,27 +54,27 @@ friend class SfxSlotPool;
const char* pName; // Sfx-internal name of interface
const SfxInterface* pGenoType; // base interface
SfxSlot* pSlots; // SlotMap
- USHORT nCount; // number of slots in SlotMap
+ sal_uInt16 nCount; // number of slots in SlotMap
SfxInterfaceId nClassId; // Id of interface
ResId aNameResId; // ResId of external interface name
SfxInterface_Impl* pImpData;
- SfxSlot* operator[]( USHORT nPos ) const;
+ SfxSlot* operator[]( sal_uInt16 nPos ) const;
public:
SfxInterface( const char *pClass,
const ResId& rResId,
SfxInterfaceId nClassId,
const SfxInterface* pGeno,
- SfxSlot &rMessages, USHORT nMsgCount );
+ SfxSlot &rMessages, sal_uInt16 nMsgCount );
virtual ~SfxInterface();
- void SetSlotMap( SfxSlot& rMessages, USHORT nMsgCount );
- inline USHORT Count() const;
+ void SetSlotMap( SfxSlot& rMessages, sal_uInt16 nMsgCount );
+ inline sal_uInt16 Count() const;
const SfxSlot* GetRealSlot( const SfxSlot * ) const;
- const SfxSlot* GetRealSlot( USHORT nSlotId ) const;
- virtual const SfxSlot* GetSlot( USHORT nSlotId ) const;
+ const SfxSlot* GetRealSlot( sal_uInt16 nSlotId ) const;
+ virtual const SfxSlot* GetSlot( sal_uInt16 nSlotId ) const;
const SfxSlot* GetSlot( const String& rCommand ) const;
const char* GetClassName() const { return pName; }
@@ -87,21 +87,21 @@ public:
const SfxInterface* GetGenoType() const { return pGenoType; }
const SfxInterface* GetRealInterfaceForSlot( const SfxSlot* ) const;
- void RegisterObjectBar( USHORT, const ResId&, const String* pST=0 );
- void RegisterObjectBar( USHORT, const ResId&, sal_uInt32 nFeature, const String* pST=0 );
- void RegisterChildWindow( USHORT, BOOL bContext, const String* pST=0 );
- void RegisterChildWindow( USHORT, BOOL bContext, sal_uInt32 nFeature, const String* pST=0 );
+ void RegisterObjectBar( sal_uInt16, const ResId&, const String* pST=0 );
+ void RegisterObjectBar( sal_uInt16, const ResId&, sal_uInt32 nFeature, const String* pST=0 );
+ void RegisterChildWindow( sal_uInt16, sal_Bool bContext, const String* pST=0 );
+ void RegisterChildWindow( sal_uInt16, sal_Bool bContext, sal_uInt32 nFeature, const String* pST=0 );
void RegisterStatusBar( const ResId& );
- const ResId& GetObjectBarResId( USHORT nNo ) const;
- USHORT GetObjectBarPos( USHORT nNo ) const;
- sal_uInt32 GetObjectBarFeature( USHORT nNo ) const;
- USHORT GetObjectBarCount() const;
- void SetObjectBarPos( USHORT nPos, USHORT nId );
- const String* GetObjectBarName( USHORT nNo ) const;
- BOOL IsObjectBarVisible( USHORT nNo) const;
- sal_uInt32 GetChildWindowFeature( USHORT nNo ) const;
- sal_uInt32 GetChildWindowId( USHORT nNo ) const;
- USHORT GetChildWindowCount() const;
+ const ResId& GetObjectBarResId( sal_uInt16 nNo ) const;
+ sal_uInt16 GetObjectBarPos( sal_uInt16 nNo ) const;
+ sal_uInt32 GetObjectBarFeature( sal_uInt16 nNo ) const;
+ sal_uInt16 GetObjectBarCount() const;
+ void SetObjectBarPos( sal_uInt16 nPos, sal_uInt16 nId );
+ const String* GetObjectBarName( sal_uInt16 nNo ) const;
+ sal_Bool IsObjectBarVisible( sal_uInt16 nNo) const;
+ sal_uInt32 GetChildWindowFeature( sal_uInt16 nNo ) const;
+ sal_uInt32 GetChildWindowId( sal_uInt16 nNo ) const;
+ sal_uInt16 GetChildWindowCount() const;
void RegisterPopupMenu( const ResId& );
const ResId& GetPopupMenuResId() const;
const ResId& GetStatusBarResId() const;
@@ -118,7 +118,7 @@ public:
// returns the number of functions in this cluster
-inline USHORT SfxInterface::Count() const
+inline sal_uInt16 SfxInterface::Count() const
{
return nCount;
}
@@ -127,7 +127,7 @@ inline USHORT SfxInterface::Count() const
// returns a function by position in the array
-inline SfxSlot* SfxInterface::operator[]( USHORT nPos ) const
+inline SfxSlot* SfxInterface::operator[]( sal_uInt16 nPos ) const
{
return nPos < nCount? pSlots+nPos: 0;
}
@@ -135,15 +135,15 @@ inline SfxSlot* SfxInterface::operator[]( USHORT nPos ) const
class SfxIFConfig_Impl
{
friend class SfxInterface;
- USHORT nCount;
+ sal_uInt16 nCount;
SfxObjectUIArr_Impl* pObjectBars;
public:
SfxIFConfig_Impl();
~SfxIFConfig_Impl();
- BOOL Store(SvStream&);
- void RegisterObjectBar( USHORT, const ResId&, sal_uInt32 nFeature, const String* pST=0 );
- USHORT GetType();
+ sal_Bool Store(SvStream&);
+ void RegisterObjectBar( sal_uInt16, const ResId&, sal_uInt32 nFeature, const String* pST=0 );
+ sal_uInt16 GetType();
};
#endif
diff --git a/sfx2/inc/sfx2/objitem.hxx b/sfx2/inc/sfx2/objitem.hxx
index b4d340e41b9c..cc14c6881791 100644..100755
--- a/sfx2/inc/sfx2/objitem.hxx
+++ b/sfx2/inc/sfx2/objitem.hxx
@@ -42,7 +42,7 @@ class SFX2_DLLPUBLIC SfxObjectItem: public SfxPoolItem
public:
TYPEINFO();
- SfxObjectItem( USHORT nWhich=0, SfxShell *pSh=0 );
+ SfxObjectItem( sal_uInt16 nWhich=0, SfxShell *pSh=0 );
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
diff --git a/sfx2/inc/sfx2/objsh.hxx b/sfx2/inc/sfx2/objsh.hxx
index 6664786b99e7..a3ad4fbf917c 100644..100755
--- a/sfx2/inc/sfx2/objsh.hxx
+++ b/sfx2/inc/sfx2/objsh.hxx
@@ -69,7 +69,6 @@ class BasicManager;
class SfxMedium;
class SfxObjectFactory;
class SfxDocumentInfoDialog;
-class SfxEventConfigItem_Impl;
class SfxStyleSheetBasePool;
class INote;
class SfxStyleSheetPool;
@@ -157,11 +156,6 @@ typedef sal_uInt32 SfxObjectShellFlags;
//--------------------------------------------------------------------
-#define SEQUENCE ::com::sun::star::uno::Sequence
-#define OUSTRING ::rtl::OUString
-
-//--------------------------------------------------------------------
-
#define HIDDENINFORMATION_RECORDEDCHANGES 0x0001
#define HIDDENINFORMATION_NOTES 0x0002
#define HIDDENINFORMATION_DOCUMENTVERSIONS 0x0004
@@ -194,12 +188,6 @@ in fremde Objekte integriert werden k"onnen.
----------------------------------------------------------------------*/
-enum SfxTitleQuery
-{
- SFX_TITLE_QUERY_SAVE_NAME_PROPOSAL
-};
-
-
class SfxToolBoxConfig;
struct TransferableObjectDescriptor;
@@ -208,6 +196,7 @@ class SFX2_DLLPUBLIC SfxObjectShell :
public ::comphelper::IEmbeddedHelper, public ::sfx2::IXmlIdRegistrySupplier
{
friend struct ModifyBlocker_Impl;
+friend class SfxObjectShellLock;
private:
struct SfxObjectShell_Impl* pImp; // interne Daten
@@ -263,7 +252,7 @@ public:
GetCurrentComponent();
static void SetCurrentComponent( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxComponent );
- virtual void Invalidate(USHORT nId = 0);
+ virtual void Invalidate(sal_uInt16 nId = 0);
void SetFlags( SfxObjectShellFlags eFlags );
SfxObjectShellFlags GetFlags( ) const ;
@@ -317,7 +306,7 @@ public:
sal_Bool DoLoad( SfxMedium* pMedium );
sal_Bool DoSave();
sal_Bool DoSaveAs( SfxMedium &rNewStor );
- sal_Bool DoSaveObjectAs( SfxMedium &rNewStor, BOOL bCommit );
+ sal_Bool DoSaveObjectAs( SfxMedium &rNewStor, sal_Bool bCommit );
// TODO/LATER: currently only overloaded in Calc, should be made non-virtual
virtual sal_Bool DoSaveCompleted( SfxMedium* pNewStor=0 );
@@ -344,9 +333,9 @@ public:
void SetConfigOptionsChecked( sal_Bool bChecked );
// called for a few slots like SID_SAVE[AS]DOC, SID_PRINTDOC[DIRECT], derived classes may abort the action
- virtual sal_Bool QuerySlotExecutable( USHORT nSlotId );
+ virtual sal_Bool QuerySlotExecutable( sal_uInt16 nSlotId );
- sal_Bool SaveChildren(BOOL bObjectsOnly=FALSE);
+ sal_Bool SaveChildren(sal_Bool bObjectsOnly=sal_False);
sal_Bool SaveAsChildren( SfxMedium &rMedium );
sal_Bool SwitchChildrenPersistance(
const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage,
@@ -363,36 +352,11 @@ public:
sal_uInt16 GetScriptingSignatureState();
void SignScriptingContent();
- virtual String QueryTitle( SfxTitleQuery ) const;
virtual SfxDocumentInfoDialog* CreateDocumentInfoDialog(
Window *pParent, const SfxItemSet& );
- sal_Bool IsBasic( const String & rCode, SbxObject * pVCtrl = NULL );
ErrCode CallBasic( const String& rMacro, const String& rBasicName,
- SbxObject* pVCtrl, SbxArray* pArgs = 0, SbxValue* pRet = 0 );
- ErrCode Call( const String & rCode, sal_Bool bIsBasicReturn, SbxObject * pVCtrl = NULL );
-
- ErrCode CallScript(
- const String & rScriptType, const String & rCode, const void* pArgs = NULL, void* pRet = NULL );
-
- /** calls a StarBasic script without magic
- @param _rMacroName
- specifies the name of the method to execute
- @param _rLocation
- specifies the location of the script to execute. Allowed values are "application" and "document".
- @param _pArguments
- This is a pointer to a Sequence< Any >. All elements of the Sequence are wrapped into Basic objects
- and passed as arguments to the method specified by <arg>_rMacroName</arg>
- @param _pReturn
- If not <NULL/>, the Any pointed to by this argument contains the return value of the (synchronous) call
- to the StarBasic macro
- */
- ErrCode CallStarBasicScript(
- const String& _rMacroName,
- const String& _rLocation,
- const void* _pArguments = NULL,
- void* _pReturn = NULL
- );
+ SbxArray* pArgs = 0, SbxValue* pRet = 0 );
ErrCode CallXScript(
const String& rScriptURL,
@@ -496,7 +460,7 @@ public:
SfxObjectCreateMode GetCreateMode() const { return eCreateMode; }
virtual void MemoryError();
SfxProgress* GetProgress() const;
- void SetWaitCursor( BOOL bSet ) const;
+ void SetWaitCursor( sal_Bool bSet ) const;
// Naming Interface
void SetTitle( const String& rTitle );
@@ -599,10 +563,10 @@ public:
::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > GetBaseModel() const;
// Nur uebergangsweise fuer die Applikationen !!!
- virtual SEQUENCE< OUSTRING > GetEventNames();
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > GetEventNames();
Window* GetDialogParent( SfxMedium* pMedium=0 );
- String UpdateTitle( SfxMedium* pMed=NULL, USHORT nDocViewNo=0 );
+ String UpdateTitle( SfxMedium* pMed=NULL, sal_uInt16 nDocViewNo=0 );
static SfxObjectShell* CreateObject( const String& rServiceName, SfxObjectCreateMode = SFX_CREATE_MODE_STANDARD );
static SfxObjectShell* CreateObjectByFactoryName( const String& rURL, SfxObjectCreateMode = SFX_CREATE_MODE_STANDARD );
static SfxObjectShell* CreateAndLoadObject( const SfxItemSet& rSet, SfxFrame* pFrame=0 );
@@ -610,10 +574,10 @@ public:
CreateAndLoadComponent( const SfxItemSet& rSet, SfxFrame* pFrame = NULL );
static SfxObjectShell* GetShellFromComponent( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& xComp );
static String GetServiceNameFromFactory( const String& rFact );
- BOOL IsInPlaceActive();
- BOOL IsUIActive();
- virtual void InPlaceActivate( BOOL );
- virtual void UIActivate( BOOL );
+ sal_Bool IsInPlaceActive();
+ sal_Bool IsUIActive();
+ virtual void InPlaceActivate( sal_Bool );
+ virtual void UIActivate( sal_Bool );
static sal_Bool CopyStoragesOfUnknownMediaType(
const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xSource,
@@ -655,11 +619,11 @@ public:
virtual Printer * GetDocumentPrinter();
virtual OutputDevice* GetDocumentRefDev();
virtual void OnDocumentPrinterChanged( Printer * pNewPrinter );
- virtual Rectangle GetVisArea( USHORT nAspect ) const;
+ virtual Rectangle GetVisArea( sal_uInt16 nAspect ) const;
virtual void SetVisArea( const Rectangle & rVisArea );
const Rectangle & GetVisArea() const;
void SetVisAreaSize( const Size & rVisSize );
- virtual ULONG GetMiscStatus() const;
+ virtual sal_uIntPtr GetMiscStatus() const;
MapUnit GetMapUnit() const;
void SetMapUnit( MapUnit nMUnit );
@@ -668,9 +632,9 @@ public:
void DoDraw( OutputDevice *, const Point & rObjPos,
const Size & rSize,
const JobSetup & rSetup,
- USHORT nAspect = ASPECT_CONTENT );
+ sal_uInt16 nAspect = ASPECT_CONTENT );
virtual void Draw( OutputDevice *, const JobSetup & rSetup,
- USHORT nAspect = ASPECT_CONTENT ) = 0;
+ sal_uInt16 nAspect = ASPECT_CONTENT ) = 0;
virtual void FillClass( SvGlobalName * pClassName,
@@ -734,7 +698,7 @@ public:
const Fraction & rScaleX,
const Fraction & rScaleY,
const JobSetup & rSetup,
- USHORT nAspect );
+ sal_uInt16 nAspect );
// Shell Interface
SAL_DLLPRIVATE void ExecFile_Impl(SfxRequest &);
@@ -773,9 +737,8 @@ public:
SAL_DLLPRIVATE SfxObjectShell* GetParentShellByModel_Impl();
// configuration items
- SAL_DLLPRIVATE SfxEventConfigItem_Impl* GetEventConfig_Impl( sal_Bool bForce=sal_False );
SAL_DLLPRIVATE SfxToolBoxConfig* GetToolBoxConfig_Impl();
- SAL_DLLPRIVATE sal_uInt16 ImplGetSignatureState( sal_Bool bScriptingContent = FALSE );
+ SAL_DLLPRIVATE sal_uInt16 ImplGetSignatureState( sal_Bool bScriptingContent = sal_False );
SAL_DLLPRIVATE ::com::sun::star::uno::Sequence< ::com::sun::star::security::DocumentSignatureInformation >
ImplAnalyzeSignature(
@@ -783,7 +746,7 @@ public:
const ::com::sun::star::uno::Reference< ::com::sun::star::security::XDocumentDigitalSignatures >& xSigner
= ::com::sun::star::uno::Reference< ::com::sun::star::security::XDocumentDigitalSignatures >() );
- SAL_DLLPRIVATE void ImplSign( sal_Bool bScriptingContent = FALSE );
+ SAL_DLLPRIVATE void ImplSign( sal_Bool bScriptingContent = sal_False );
SAL_DLLPRIVATE sal_Bool QuerySaveSizeExceededModules_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& xHandler );
};
@@ -810,7 +773,6 @@ public:
//--------------------------------------------------------------------
-
#ifndef SFX_DECL_OBJECTSHELL_DEFINED
#define SFX_DECL_OBJECTSHELL_DEFINED
SV_DECL_REF(SfxObjectShell)
@@ -819,7 +781,6 @@ SV_DECL_LOCK(SfxObjectShell)
SV_IMPL_LOCK(SfxObjectShell)
SV_IMPL_REF(SfxObjectShell)
-SfxObjectShellRef MakeObjectShellForOrganizer_Impl( const String& rName, BOOL bWriting );
//--------------------------------------------------------------------
class AutoReloadTimer_Impl : public Timer
{
@@ -858,8 +819,8 @@ public:
virtual int operator==( const SfxPoolItem& ) const;
virtual String GetValueText() const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
SfxObjectShell* GetObjectShell() const
{ return pObjSh; }
diff --git a/sfx2/inc/sfx2/objuno.hxx b/sfx2/inc/sfx2/objuno.hxx
index 1c7a63998c03..1c7a63998c03 100644..100755
--- a/sfx2/inc/sfx2/objuno.hxx
+++ b/sfx2/inc/sfx2/objuno.hxx
diff --git a/sfx2/inc/sfx2/opengrf.hxx b/sfx2/inc/sfx2/opengrf.hxx
index 45787962a1ef..3c9f20a18632 100644..100755
--- a/sfx2/inc/sfx2/opengrf.hxx
+++ b/sfx2/inc/sfx2/opengrf.hxx
@@ -55,10 +55,7 @@ public:
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 );
+ void SetControlHelpIds( const sal_Int16* _pControlId, const char** _pHelpId );
private:
// disable copy and assignment
SFX2_DLLPRIVATE SvxOpenGraphicDialog (const SvxOpenGraphicDialog&);
diff --git a/sfx2/inc/sfx2/passwd.hxx b/sfx2/inc/sfx2/passwd.hxx
index 5e426d9cfae9..567320cfa58e 100644..100755
--- a/sfx2/inc/sfx2/passwd.hxx
+++ b/sfx2/inc/sfx2/passwd.hxx
@@ -29,25 +29,28 @@
#define _SFX_PASSWD_HXX
#include "sal/config.h"
-#include "sfx2/dllapi.h"
-
+#include <sfx2/dllapi.h>
#include <vcl/button.hxx>
#include <vcl/dialog.hxx>
#include <vcl/edit.hxx>
#include <vcl/fixed.hxx>
+#include <sfx2/app.hxx>
// defines ---------------------------------------------------------------
-#define SHOWEXTRAS_NONE ((USHORT)0x0000)
-#define SHOWEXTRAS_USER ((USHORT)0x0001)
-#define SHOWEXTRAS_CONFIRM ((USHORT)0x0002)
-#define SHOWEXTRAS_ALL ((USHORT)(SHOWEXTRAS_USER | SHOWEXTRAS_CONFIRM))
+#define SHOWEXTRAS_NONE ((sal_uInt16)0x0000)
+#define SHOWEXTRAS_USER ((sal_uInt16)0x0001)
+#define SHOWEXTRAS_CONFIRM ((sal_uInt16)0x0002)
+#define SHOWEXTRAS_PASSWORD2 ((sal_uInt16)0x0004)
+#define SHOWEXTRAS_CONFIRM2 ((sal_uInt16)0x0008)
+#define SHOWEXTRAS_ALL ((sal_uInt16)(SHOWEXTRAS_USER | SHOWEXTRAS_CONFIRM))
// class SfxPasswordDialog -----------------------------------------------
class SFX2_DLLPUBLIC SfxPasswordDialog : public ModalDialog
{
private:
+ FixedLine maPasswordBox;
FixedText maUserFT;
Edit maUserED;
FixedText maPasswordFT;
@@ -55,18 +58,22 @@ private:
FixedText maConfirmFT;
Edit maConfirmED;
FixedText maMinLengthFT;
- FixedLine maPasswordBox;
+ FixedLine maPassword2Box;
+ FixedText maPassword2FT;
+ Edit maPassword2ED;
+ FixedText maConfirm2FT;
+ Edit maConfirm2ED;
OKButton maOKBtn;
CancelButton maCancelBtn;
HelpButton maHelpBtn;
String maConfirmStr;
- USHORT mnMinLen;
String maMinLenPwdStr;
String maEmptyPwdStr;
String maMainPwdStr;
- USHORT mnExtras;
+ sal_uInt16 mnMinLen;
+ sal_uInt16 mnExtras;
bool mbAsciiOnly;
DECL_DLLPRIVATE_LINK( EditModifyHdl, Edit* );
@@ -81,10 +88,14 @@ public:
String GetPassword() const { return maPasswordED.GetText(); }
String GetConfirm() const { return maConfirmED.GetText(); }
- void SetMinLen( USHORT Len );
- void SetMaxLen( USHORT Len );
- void SetEditHelpId( ULONG nId ) { maPasswordED.SetHelpId( nId ); }
- void ShowExtras( USHORT nExtras ) { mnExtras = nExtras; }
+ String GetPassword2() const { return maPassword2ED.GetText(); }
+ String GetConfirm2() const { return maConfirm2ED.GetText(); }
+ void SetGroup2Text( const String& i_rText ) { maPassword2Box.SetText( i_rText ); }
+
+ void SetMinLen( sal_uInt16 Len );
+ void SetMaxLen( sal_uInt16 Len );
+ void SetEditHelpId( const rtl::OString& rId ) { maPasswordED.SetHelpId( rId ); }
+ void ShowExtras( sal_uInt16 nExtras ) { mnExtras = nExtras; }
void AllowAsciiOnly( bool i_bAsciiOnly = true ) { mbAsciiOnly = i_bAsciiOnly; }
virtual short Execute();
diff --git a/sfx2/inc/sfx2/printer.hxx b/sfx2/inc/sfx2/printer.hxx
index 2aa07e65be68..68315b772736 100644..100755
--- a/sfx2/inc/sfx2/printer.hxx
+++ b/sfx2/inc/sfx2/printer.hxx
@@ -33,60 +33,11 @@
#include "sal/types.h"
#include <vcl/print.hxx>
-class SfxFont;
class SfxTabPage;
class SfxItemSet;
struct SfxPrinter_Impl;
-#define SFX_RANGE_NOTSET ((USHORT)0xFFFF)
-
-// class SfxFontSizeInfo -------------------------------------------------
-
-class SfxFontSizeInfo
-{
-private:
- static USHORT pStaticSizes[];
- Size* pSizes;
- USHORT nSizes;
- BOOL bScalable;
-
-public:
- SfxFontSizeInfo( const SfxFont& rFont, const OutputDevice& rDevice );
- ~SfxFontSizeInfo();
-
- BOOL HasSize(const Size &rSize) const;
- BOOL IsScalable() const { return bScalable; }
-
- USHORT SizeCount() const { return nSizes; }
- const Size& GetSize( USHORT nNo ) const
- { return pSizes[nNo]; }
-};
-
-// class SfxFont ---------------------------------------------------------
-
-class SFX2_DLLPUBLIC SfxFont
-{
-private:
- String aName;
- FontFamily eFamily;
- FontPitch ePitch;
- CharSet eCharSet;
-
- SfxFont& operator=(const SfxFont& rFont); // not implemented
-
-public:
- SfxFont( const FontFamily eFam,
- const String& aName,
- const FontPitch eFontPitch = PITCH_DONTKNOW,
- const CharSet eFontCharSet = RTL_TEXTENCODING_DONTKNOW );
- // ZugriffsMethoden:
- inline const String& GetName() const { return aName; }
- inline FontFamily GetFamily() const { return eFamily; }
- inline FontPitch GetPitch() const { return ePitch; }
- inline CharSet GetCharSet() const { return eCharSet; }
-};
-
// class SfxPrinter ------------------------------------------------------
class SFX2_DLLPUBLIC SfxPrinter : public Printer
@@ -95,7 +46,7 @@ private:
JobSetup aOrigJobSetup;
SfxItemSet* pOptions;
SfxPrinter_Impl* pImpl;
- BOOL bKnown;
+ sal_Bool bKnown;
SAL_DLLPRIVATE void operator =(SfxPrinter &); // not defined
@@ -124,19 +75,8 @@ public:
const SfxItemSet& GetOptions() const { return *pOptions; }
void SetOptions( const SfxItemSet &rNewOptions );
- void EnableRange( USHORT nRange );
- void DisableRange( USHORT nRange );
- BOOL IsRangeEnabled( USHORT nRange ) const;
-
- BOOL IsKnown() const { return bKnown; }
- BOOL IsOriginal() const { return bKnown; }
-
- using OutputDevice::GetFont;
- USHORT GetFontCount();
- const SfxFont* GetFont( USHORT nNo ) const;
- const SfxFont* GetFontByName( const String &rFontName );
-
- BOOL InitJob( Window* pUIParent, BOOL bAskAboutTransparentObjects );
+ sal_Bool IsKnown() const { return bKnown; }
+ sal_Bool IsOriginal() const { return bKnown; }
};
#endif
diff --git a/sfx2/inc/sfx2/printopt.hxx b/sfx2/inc/sfx2/printopt.hxx
index 18fc31ddc744..0b25dec5dc38 100644..100755
--- a/sfx2/inc/sfx2/printopt.hxx
+++ b/sfx2/inc/sfx2/printopt.hxx
@@ -114,7 +114,7 @@ public:
SfxCommonPrintOptionsTabPage( Window* pParent, const SfxItemSet& rSet );
~SfxCommonPrintOptionsTabPage();
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
virtual Window* GetParentLabeledBy( const Window* pLabel ) const;
virtual Window* GetParentLabelFor( const Window* pLabel ) const;
@@ -140,7 +140,7 @@ public:
TransparencyPrintWarningBox( Window* pParent );
~TransparencyPrintWarningBox();
- BOOL IsNoWarningChecked() const { return aNoWarnCB.IsChecked(); }
+ sal_Bool IsNoWarningChecked() const { return aNoWarnCB.IsChecked(); }
};
#endif // #ifndef _SFX_PRINTOPT_HXX
diff --git a/sfx2/inc/sfx2/prnmon.hxx b/sfx2/inc/sfx2/prnmon.hxx
index e15d6bbd49e3..c11f45e06396 100644..100755
--- a/sfx2/inc/sfx2/prnmon.hxx
+++ b/sfx2/inc/sfx2/prnmon.hxx
@@ -64,7 +64,7 @@ public:
const SfxItemSet *rOptions );
virtual ~SfxPrintOptionsDialog();
- BOOL Construct();
+ sal_Bool Construct();
virtual short Execute();
virtual long Notify( NotifyEvent& rNEvt );
diff --git a/sfx2/inc/sfx2/progress.hxx b/sfx2/inc/sfx2/progress.hxx
index 0b8fbf920d0f..f8bd9e7ffb9d 100644..100755
--- a/sfx2/inc/sfx2/progress.hxx
+++ b/sfx2/inc/sfx2/progress.hxx
@@ -48,24 +48,24 @@ struct SvProgressArg;
class SFX2_DLLPUBLIC SfxProgress
{
SfxProgress_Impl* pImp;
- ULONG nVal;
- BOOL bSuspended;
+ sal_uIntPtr nVal;
+ sal_Bool bSuspended;
public:
SfxProgress( SfxObjectShell* pObjSh,
const String& rText,
- ULONG nRange, BOOL bAllDocs = FALSE,
- BOOL bWait = TRUE );
+ sal_uIntPtr nRange, sal_Bool bAllDocs = sal_False,
+ sal_Bool bWait = sal_True );
virtual ~SfxProgress();
virtual void SetText( const String& rText );
- BOOL SetStateText( ULONG nVal, const String &rVal, ULONG nNewRange = 0 );
- virtual BOOL SetState( ULONG nVal, ULONG nNewRange = 0 );
- ULONG GetState() const { return nVal; }
+ sal_Bool SetStateText( sal_uIntPtr nVal, const String &rVal, sal_uIntPtr nNewRange = 0 );
+ virtual sal_Bool SetState( sal_uIntPtr nVal, sal_uIntPtr nNewRange = 0 );
+ sal_uIntPtr GetState() const { return nVal; }
void Resume();
void Suspend();
- BOOL IsSuspended() const { return bSuspended; }
+ sal_Bool IsSuspended() const { return bSuspended; }
void Lock();
void UnLock();
@@ -73,8 +73,8 @@ public:
void Stop();
- void SetWaitMode( BOOL bWait );
- BOOL GetWaitMode() const;
+ void SetWaitMode( sal_Bool bWait );
+ sal_Bool GetWaitMode() const;
static SfxProgress* GetActiveProgress( SfxObjectShell *pDocSh = 0 );
static void EnterLock();
diff --git a/sfx2/inc/sfx2/querystatus.hxx b/sfx2/inc/sfx2/querystatus.hxx
index 0df2789acb47..28a0460a4b5b 100644..100755
--- a/sfx2/inc/sfx2/querystatus.hxx
+++ b/sfx2/inc/sfx2/querystatus.hxx
@@ -44,7 +44,7 @@ class SfxQueryStatus_Impl;
class SFX2_DLLPUBLIC SfxQueryStatus
{
public:
- SfxQueryStatus( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider >& rDispatchProvider, USHORT nSlotId, const rtl::OUString& aCommand );
+ SfxQueryStatus( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider >& rDispatchProvider, sal_uInt16 nSlotId, const rtl::OUString& aCommand );
~SfxQueryStatus();
// Query method
diff --git a/sfx2/inc/sfx2/request.hxx b/sfx2/inc/sfx2/request.hxx
index d9dd1531de27..d7c993b94148 100644..100755
--- a/sfx2/inc/sfx2/request.hxx
+++ b/sfx2/inc/sfx2/request.hxx
@@ -57,7 +57,7 @@ class SFX2_DLLPUBLIC SfxRequest: public SfxHint
{
friend struct SfxRequest_Impl;
- USHORT nSlot;
+ sal_uInt16 nSlot;
SfxAllItemSet* pArgs;
SfxRequest_Impl* pImp;
@@ -72,52 +72,52 @@ private:
//---------------------------------------------------------------------
public:
- SfxRequest( SfxViewFrame*, USHORT nSlotId );
- SfxRequest( USHORT nSlot, USHORT nCallMode, SfxItemPool &rPool );
+ SfxRequest( SfxViewFrame*, sal_uInt16 nSlotId );
+ SfxRequest( sal_uInt16 nSlot, sal_uInt16 nCallMode, SfxItemPool &rPool );
SfxRequest( const SfxSlot* pSlot, const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >& rArgs,
- USHORT nCallMode, SfxItemPool &rPool );
- SfxRequest( USHORT nSlot, USHORT nCallMode, const SfxAllItemSet& rSfxArgs );
+ sal_uInt16 nCallMode, SfxItemPool &rPool );
+ SfxRequest( sal_uInt16 nSlot, sal_uInt16 nCallMode, const SfxAllItemSet& rSfxArgs );
SfxRequest( const SfxRequest& rOrig );
~SfxRequest();
- USHORT GetSlot() const { return nSlot; }
- void SetSlot(USHORT nNewSlot) { nSlot = nNewSlot; }
+ sal_uInt16 GetSlot() const { return nSlot; }
+ void SetSlot(sal_uInt16 nNewSlot) { nSlot = nNewSlot; }
- USHORT GetModifier() const;
- void SetModifier( USHORT nModi );
+ sal_uInt16 GetModifier() const;
+ void SetModifier( sal_uInt16 nModi );
SAL_DLLPRIVATE void SetInternalArgs_Impl( const SfxAllItemSet& rArgs );
SAL_DLLPRIVATE const SfxItemSet* GetInternalArgs_Impl() const;
const SfxItemSet* GetArgs() const { return pArgs; }
void SetArgs( const SfxAllItemSet& rArgs );
void AppendItem(const SfxPoolItem &);
- void RemoveItem( USHORT nSlotId );
+ void RemoveItem( sal_uInt16 nSlotId );
- static const SfxPoolItem* GetItem( const SfxItemSet*, USHORT nSlotId,
+ static const SfxPoolItem* GetItem( const SfxItemSet*, sal_uInt16 nSlotId,
bool bDeep = false,
TypeId aType = 0 );
- const SfxPoolItem* GetArg( USHORT nSlotId, bool bDeep = false, TypeId aType = 0 ) const;
+ const SfxPoolItem* GetArg( sal_uInt16 nSlotId, bool bDeep = false, TypeId aType = 0 ) const;
void ReleaseArgs();
void SetReturnValue(const SfxPoolItem &);
const SfxPoolItem* GetReturnValue() const;
static SfxMacro* GetRecordingMacro();
static com::sun::star::uno::Reference< com::sun::star::frame::XDispatchRecorder > GetMacroRecorder( SfxViewFrame* pFrame=NULL );
- static BOOL HasMacroRecorder( SfxViewFrame* pFrame=NULL );
- USHORT GetCallMode() const;
+ static sal_Bool HasMacroRecorder( SfxViewFrame* pFrame=NULL );
+ sal_uInt16 GetCallMode() const;
bool IsRecording() const;
- void AllowRecording( BOOL );
- BOOL AllowsRecording() const;
- BOOL IsAPI() const;
- BOOL IsSynchronCall() const;
- void SetSynchronCall( BOOL bSynchron );
+ void AllowRecording( sal_Bool );
+ sal_Bool AllowsRecording() const;
+ sal_Bool IsAPI() const;
+ sal_Bool IsSynchronCall() const;
+ void SetSynchronCall( sal_Bool bSynchron );
void SetTarget( const String &rTarget );
- BOOL IsDone() const;
- void Done( BOOL bRemove = FALSE );
+ sal_Bool IsDone() const;
+ void Done( sal_Bool bRemove = sal_False );
void Ignore();
void Cancel();
- BOOL IsCancelled() const;
+ sal_Bool IsCancelled() const;
void Done(const SfxItemSet &, bool bKeep = true );
void ForgetAllArgs();
diff --git a/sfx2/inc/sfx2/securitypage.hxx b/sfx2/inc/sfx2/securitypage.hxx
index fd1cc6209510..93f5611a287f 100644..100755
--- a/sfx2/inc/sfx2/securitypage.hxx
+++ b/sfx2/inc/sfx2/securitypage.hxx
@@ -46,7 +46,7 @@ protected:
SfxSecurityPage( Window* pParent, const SfxItemSet& );
virtual ~SfxSecurityPage();
- virtual BOOL FillItemSet( SfxItemSet& );
+ virtual sal_Bool FillItemSet( SfxItemSet& );
virtual void Reset( const SfxItemSet& );
public:
diff --git a/sfx2/inc/sfx2/sfx.hrc b/sfx2/inc/sfx2/sfx.hrc
index 2004955a5d36..65b620a9ec62 100755
--- a/sfx2/inc/sfx2/sfx.hrc
+++ b/sfx2/inc/sfx2/sfx.hrc
@@ -206,24 +206,13 @@
#define RID_DEFAULTABOUT (RID_SFX_START+0)
-#define ABOUT_BTN_OK 1
-
-#define ABOUT_FTXT_VERSION 1
-#define ABOUT_FTXT_COPYRIGHT 2
#define ABOUT_FTXT_LINK 3
-
-#define ABOUT_STR_DEVELOPER_ARY 1
-#define ABOUT_STR_FRENCH_COPYRIGHT 2
-#define ABOUT_STR_ACCEL 3
#define ABOUT_STR_VERSION 4
#define ABOUT_STR_COPYRIGHT 5
#define ABOUT_STR_LINK 6
-
#define RID_APPTITLE (RID_SFX_START+4)
-#define RID_BUILDVERSION (RID_SFX_START+5)
#define RID_DOCALREADYLOADED_DLG (RID_SFX_START+1)
-#define RID_CANTLOADDOC_DLG (RID_SFX_START+2)
#define TP_DOCINFODESC (RID_SFX_START+3)
#define TP_DOCINFODOC (RID_SFX_START+4)
@@ -258,14 +247,15 @@
#define STR_MB (RID_SFX_START+113)
#define STR_GB (RID_SFX_START+114)
-#define STR_VERSION_TYPE (RID_SFX_START+115)
-#define STR_VERSION_ID (RID_SFX_START+116)
#define STR_STANDARD_SHORTCUT (RID_SFX_START+117)
#define STR_REPAIREDDOCUMENT (RID_SFX_START+118)
#define STR_ERRUNOEVENTBINDUNG (RID_SFX_START+119)
#define STR_SHARED (RID_SFX_START+120)
#define RID_XMLSEC_DOCUMENTSIGNED (RID_SFX_START+121)
+// IAccessibility2 implementation 2009. ------
+#define STR_ACCTITLE_PRODUCTIVITYTOOLS (RID_SFX_START+157)
+// ------ IAccessibility2 implementation 2009.
//=========================================================================
@@ -313,16 +303,8 @@
// ------------------------------------------------------------------------
-#define BMP_COLS 21
-#define BMP_SFX_SMALL 1
-#define BMP_SFX_LARGE 2
-
#define RID_SFX_GLOBALS 1000
-#define BMP_SFX_COLOR (RID_SFX_GLOBALS + 1)
-#define BMP_SFX_MONO (RID_SFX_GLOBALS + 2)
-#define SFX_MSG_RES (RID_SFX_GLOBALS + 3)
-
// =========================================================================
#define RID_OPTIONS_START (SID_LIB_START + 2000)
@@ -330,24 +312,6 @@
// ResId's ------------------------------------------------------------------
-#define RID_SFXLANG_BEGIN (RID_OPTIONS_START + 0)
-#define RID_SFXLANG_NO (RID_SFXLANG_BEGIN + 0)
-#define RID_SFXLANG_GERMAN (RID_SFXLANG_BEGIN + 1)
-#define RID_SFXLANG_SWISS_GERMAN (RID_SFXLANG_BEGIN + 2)
-#define RID_SFXLANG_US_ENGLISH (RID_SFXLANG_BEGIN + 3)
-#define RID_SFXLANG_UK_ENGLISH (RID_SFXLANG_BEGIN + 4)
-#define RID_SFXLANG_FRENCH (RID_SFXLANG_BEGIN + 5)
-#define RID_SFXLANG_ITALIAN (RID_SFXLANG_BEGIN + 6)
-#define RID_SFXLANG_CAST_SPANISH (RID_SFXLANG_BEGIN + 7)
-#define RID_SFXLANG_PORTUGUESE (RID_SFXLANG_BEGIN + 8)
-#define RID_SFXLANG_DANISH (RID_SFXLANG_BEGIN + 9)
-#define RID_SFXLANG_DUTCH (RID_SFXLANG_BEGIN + 10)
-#define RID_SFXLANG_SWEDISH (RID_SFXLANG_BEGIN + 11)
-#define RID_SFXLANG_FINNISH (RID_SFXLANG_BEGIN + 12)
-#define RID_SFXLANG_NORWEG_BOKMAL (RID_SFXLANG_BEGIN + 13)
-#define RID_SFXLANG_NORWEG_NYNORSK (RID_SFXLANG_BEGIN + 14)
-#define RID_SFXLANG_ALL (RID_SFXLANG_BEGIN + 15)
-
#define RID_SFXPAGE_SAVE (RID_OPTIONS_START + 0)
#define RID_SFXPAGE_GENERAL (RID_OPTIONS_START + 1)
#define RID_SFXPAGE_SPELL (RID_OPTIONS_START + 2)
@@ -356,15 +320,9 @@
#define RID_SFXQB_DELDICT (RID_OPTIONS_START + 5)
#define RID_SFXPAGE_PATH (RID_OPTIONS_START + 6)
#define RID_SFXPAGE_LINGU (RID_OPTIONS_START + 7)
-#define RID_SFXPAGE_INET (RID_OPTIONS_START + 8)
-#define RID_SFXQB_DEL_IGNORELIST (RID_OPTIONS_START + 9)
#define RID_SFXQB_SET_LANGUAGE (RID_OPTIONS_START + 10)
-#define RID_ITEMLIST_LINGU (RID_OPTIONS_START + 11)
#define RID_SFXPAGE_PRINTOPTIONS (RID_OPTIONS_START + 12)
-#define STR_UNDO (RID_SFX_VIEW_START+11)
-#define STR_REDO (RID_SFX_VIEW_START+12)
-#define STR_REPEAT (RID_SFX_VIEW_START+13)
#define RID_STR_NEW_TASK (RID_SFX_DOC_START+ 76)
// Member-Ids ------------------------------------------------------------
diff --git a/sfx2/inc/sfx2/sfxbasecontroller.hxx b/sfx2/inc/sfx2/sfxbasecontroller.hxx
index dc3b3e061d15..cd0f1e8ce50d 100644..100755
--- a/sfx2/inc/sfx2/sfxbasecontroller.hxx
+++ b/sfx2/inc/sfx2/sfxbasecontroller.hxx
@@ -67,7 +67,6 @@
// Some defines to write better code :-)
#define REFERENCE ::com::sun::star::uno::Reference
#define ANY ::com::sun::star::uno::Any
-#define SEQUENCE ::com::sun::star::uno::Sequence
#define XDISPATCH ::com::sun::star::frame::XDispatch
#define DISPATCHDESCRIPTOR ::com::sun::star::frame::DispatchDescriptor
#define XMODEL ::com::sun::star::frame::XModel
@@ -305,7 +304,7 @@ public:
@onerror -
*/
- virtual SEQUENCE< REFERENCE< XDISPATCH > > SAL_CALL queryDispatches( const SEQUENCE< DISPATCHDESCRIPTOR >& seqDescriptor ) throw( RUNTIMEEXCEPTION ) ;
+ virtual ::com::sun::star::uno::Sequence< REFERENCE< XDISPATCH > > SAL_CALL queryDispatches( const ::com::sun::star::uno::Sequence< DISPATCHDESCRIPTOR >& seqDescriptor ) throw( RUNTIMEEXCEPTION ) ;
//____________________________________________________________________________________________________
// XControllerBorder
@@ -389,9 +388,9 @@ public:
// FIXME: TL needs this in sw/source/ui/uno/unotxdoc.cxx now;
// either the _Impl name should vanish or there should be an "official" API
SfxViewShell* GetViewShell_Impl() const;
- SAL_DLLPRIVATE BOOL HandleEvent_Impl( NotifyEvent& rEvent );
- SAL_DLLPRIVATE BOOL HasKeyListeners_Impl();
- SAL_DLLPRIVATE BOOL HasMouseClickListeners_Impl();
+ SAL_DLLPRIVATE sal_Bool HandleEvent_Impl( NotifyEvent& rEvent );
+ SAL_DLLPRIVATE sal_Bool HasKeyListeners_Impl();
+ SAL_DLLPRIVATE sal_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 ();
private:
diff --git a/sfx2/inc/sfx2/sfxbasemodel.hxx b/sfx2/inc/sfx2/sfxbasemodel.hxx
index f58757afb622..167618a792c3 100644..100755
--- a/sfx2/inc/sfx2/sfxbasemodel.hxx
+++ b/sfx2/inc/sfx2/sfxbasemodel.hxx
@@ -40,15 +40,17 @@
#include <com/sun/star/container/XChild.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/container/XNameReplace.hpp>
-#include <com/sun/star/frame/XController.hpp>
+#include <com/sun/star/frame/XController2.hpp>
#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/document/XUndoManagerSupplier.hpp>
#include <com/sun/star/rdf/XDocumentMetadataAccess.hpp>
#include <com/sun/star/document/XEventBroadcaster.hpp>
+#include <com/sun/star/document/XDocumentEventBroadcaster.hpp>
#include <com/sun/star/document/XEventListener.hpp>
#include <com/sun/star/document/XEventsSupplier.hpp>
#include <com/sun/star/document/XEmbeddedScripts.hpp>
@@ -97,9 +99,9 @@
#include <com/sun/star/task/XInteractionHandler.hpp>
//________________________________________________________________________________________________________
-#if ! defined(INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_30)
-#define INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_30
-#define COMPHELPER_IMPLBASE_INTERFACE_NUMBER 30
+#if ! defined(INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_32)
+#define INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_32
+#define COMPHELPER_IMPLBASE_INTERFACE_NUMBER 32
#include <comphelper/implbase_var.hxx>
#endif
@@ -144,6 +146,7 @@
#define XDOCUMENTINFO ::com::sun::star::document::XDocumentInfo
#define XDOCUMENTINFOSUPPLIER ::com::sun::star::document::XDocumentInfoSupplier
#define XEVENTBROADCASTER ::com::sun::star::document::XEventBroadcaster
+#define XDOCUMENTEVENTBROADCASTER ::com::sun::star::document::XDocumentEventBroadcaster
#define XEVENTSSUPPLIER ::com::sun::star::document::XEventsSupplier
#define XEMBEDDEDSCRIPTS ::com::sun::star::document::XEmbeddedScripts
#define XSCRIPTINVOCATIONCONTEXT ::com::sun::star::document::XScriptInvocationContext
@@ -160,7 +163,6 @@
#define EVENTOBJECT ::com::sun::star::lang::EventObject
#define PROPERTYVALUE ::com::sun::star::beans::PropertyValue
#define REFERENCE ::com::sun::star::uno::Reference
-#define SEQUENCE ::com::sun::star::uno::Sequence
#define MUTEX ::osl::Mutex
#define OUSTRING ::rtl::OUString
#define UNOTYPE ::com::sun::star::uno::Type
@@ -238,12 +240,14 @@ namespace sfx { namespace intern {
SfxListener
*/
-typedef ::comphelper::WeakImplHelper30 < XCHILD
+typedef ::comphelper::WeakImplHelper32 < XCHILD
, XDOCUMENTINFOSUPPLIER
, ::com::sun::star::document::XDocumentPropertiesSupplier
, ::com::sun::star::rdf::XDocumentMetadataAccess
, ::com::sun::star::document::XDocumentRecovery
+ , ::com::sun::star::document::XUndoManagerSupplier
, XEVENTBROADCASTER
+ , XDOCUMENTEVENTBROADCASTER
, XEVENTLISTENER
, XEVENTSSUPPLIER
, XEMBEDDEDSCRIPTS
@@ -383,7 +387,7 @@ public:
@onerror A RuntimeException is thrown.
*/
- virtual SEQUENCE< UNOTYPE > SAL_CALL getTypes() throw( RUNTIMEEXCEPTION ) ;
+ virtual ::com::sun::star::uno::Sequence< UNOTYPE > SAL_CALL getTypes() throw( RUNTIMEEXCEPTION ) ;
/**___________________________________________________________________________________________________
@short get implementation id
@@ -399,7 +403,7 @@ public:
@onerror A RuntimeException is thrown.
*/
- virtual SEQUENCE< sal_Int8 > SAL_CALL getImplementationId() throw( RUNTIMEEXCEPTION ) ;
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw( RUNTIMEEXCEPTION ) ;
//____________________________________________________________________________________________________
@@ -578,7 +582,7 @@ public:
*/
virtual sal_Bool SAL_CALL attachResource( const OUSTRING& sURL ,
- const SEQUENCE< PROPERTYVALUE >& aArgs )
+ const ::com::sun::star::uno::Sequence< PROPERTYVALUE >& aArgs )
throw (::com::sun::star::uno::RuntimeException);
/**___________________________________________________________________________________________________
@@ -609,7 +613,7 @@ public:
@onerror -
*/
- virtual SEQUENCE< PROPERTYVALUE > SAL_CALL getArgs() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< PROPERTYVALUE > SAL_CALL getArgs() throw (::com::sun::star::uno::RuntimeException);
/**___________________________________________________________________________________________________
@short -
@@ -859,7 +863,7 @@ public:
@onerror -
*/
- virtual SEQUENCE< PROPERTYVALUE > SAL_CALL getPrinter() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< PROPERTYVALUE > SAL_CALL getPrinter() throw (::com::sun::star::uno::RuntimeException);
/**___________________________________________________________________________________________________
@short -
@@ -874,7 +878,7 @@ public:
@onerror -
*/
- virtual void SAL_CALL setPrinter( const SEQUENCE< PROPERTYVALUE >& seqPrinter )
+ virtual void SAL_CALL setPrinter( const ::com::sun::star::uno::Sequence< PROPERTYVALUE >& seqPrinter )
throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
/**___________________________________________________________________________________________________
@short -
@@ -889,14 +893,14 @@ public:
@onerror -
*/
- virtual void SAL_CALL print( const SEQUENCE< PROPERTYVALUE >& seqOptions )
+ virtual void SAL_CALL print( const ::com::sun::star::uno::Sequence< PROPERTYVALUE >& seqOptions )
throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
//____________________________________________________________________________________________________
// XStorable2
//____________________________________________________________________________________________________
- virtual void SAL_CALL storeSelf( const SEQUENCE< PROPERTYVALUE >& seqArguments )
+ virtual void SAL_CALL storeSelf( const ::com::sun::star::uno::Sequence< PROPERTYVALUE >& seqArguments )
throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
//____________________________________________________________________________________________________
@@ -977,7 +981,7 @@ public:
*/
virtual void SAL_CALL storeAsURL( const OUSTRING& sURL ,
- const SEQUENCE< PROPERTYVALUE >& seqArguments )
+ const ::com::sun::star::uno::Sequence< PROPERTYVALUE >& seqArguments )
throw (::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException) ;
/**___________________________________________________________________________________________________
@@ -994,7 +998,7 @@ public:
*/
virtual void SAL_CALL storeToURL( const OUSTRING& sURL ,
- const SEQUENCE< PROPERTYVALUE >& seqArguments )
+ const ::com::sun::star::uno::Sequence< PROPERTYVALUE >& seqArguments )
throw (::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
@@ -1035,7 +1039,7 @@ public:
@onerror -
*/
- virtual void SAL_CALL load( const SEQUENCE< PROPERTYVALUE >& seqArguments )
+ virtual void SAL_CALL load( const ::com::sun::star::uno::Sequence< PROPERTYVALUE >& seqArguments )
throw (::com::sun::star::frame::DoubleInitializationException,
::com::sun::star::io::IOException,
::com::sun::star::uno::RuntimeException,
@@ -1056,7 +1060,7 @@ public:
//____________________________________________________________________________________________________
virtual void SAL_CALL loadFromStorage( const REFERENCE< XSTORAGE >& xStorage,
- const SEQUENCE< PROPERTYVALUE >& aMediaDescriptor )
+ const ::com::sun::star::uno::Sequence< PROPERTYVALUE >& aMediaDescriptor )
throw ( ILLEGALARGUMENTEXCEPTION,
DOUBLEINITIALIZATIONEXCEPTION,
IOEXCEPTION,
@@ -1064,7 +1068,7 @@ public:
RUNTIMEEXCEPTION );
virtual void SAL_CALL storeToStorage( const REFERENCE< XSTORAGE >& xStorage,
- const SEQUENCE< PROPERTYVALUE >& aMediaDescriptor )
+ const ::com::sun::star::uno::Sequence< PROPERTYVALUE >& aMediaDescriptor )
throw ( ILLEGALARGUMENTEXCEPTION,
IOEXCEPTION,
EXCEPTION,
@@ -1162,7 +1166,7 @@ public:
*/
- virtual SEQUENCE< DATAFLAVOR > SAL_CALL getTransferDataFlavors()
+ virtual ::com::sun::star::uno::Sequence< DATAFLAVOR > SAL_CALL getTransferDataFlavors()
throw (::com::sun::star::uno::RuntimeException);
/**___________________________________________________________________________________________________
@@ -1250,6 +1254,18 @@ public:
virtual void SAL_CALL removeEventListener( const REFERENCE< XDOCEVENTLISTENER >& xListener ) throw( RUNTIMEEXCEPTION );
+ //____________________________________________________________________________________________________
+ // XDocumentEventBroadcaster
+ //____________________________________________________________________________________________________
+
+ virtual void SAL_CALL addDocumentEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::document::XDocumentEventListener >& _Listener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeDocumentEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::document::XDocumentEventListener >& _Listener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL notifyDocumentEvent( const ::rtl::OUString& _EventName, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController2 >& _ViewController, const ::com::sun::star::uno::Any& _Supplement ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException);
+
+ //____________________________________________________________________________________________________
+ // XUnoTunnel
+ //____________________________________________________________________________________________________
+
virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
// css.frame.XModule
@@ -1307,6 +1323,9 @@ public:
::com::sun::star::io::IOException,
::com::sun::star::lang::WrappedTargetException );
+ // css.document.XUndoManagerSupplier
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::document::XUndoManager > SAL_CALL getUndoManager( ) throw (::com::sun::star::uno::RuntimeException);
+
//____________________________________________________________________________________________________
// ::com::sun::star::rdf::XNode:
@@ -1471,22 +1490,11 @@ public:
SfxObjectShell* GetObjectShell() const ;
SAL_DLLPRIVATE SfxObjectShell* impl_getObjectShell() const ;
- /**___________________________________________________________________________________________________
- @short -
- @descr -
-
- @seealso -
-
- @param -
-
- @return -
-
- @onerror -
- */
-
SAL_DLLPRIVATE sal_Bool impl_isDisposed() const ;
- sal_Bool IsDisposed() const ;
sal_Bool IsInitialized() const;
+ sal_Bool IsDisposed() const { return impl_isDisposed(); }
+ void MethodEntryCheck( const bool i_mustBeInitialized ) const;
+ ::osl::Mutex& getMutex() const { return m_aMutex; }
::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);
@@ -1531,9 +1539,11 @@ private:
SAL_DLLPRIVATE ::rtl::OUString GetMediumFilterName_Impl();
SAL_DLLPRIVATE void impl_store( const OUSTRING& sURL ,
- const SEQUENCE< PROPERTYVALUE >& seqArguments ,
+ const ::com::sun::star::uno::Sequence< PROPERTYVALUE >& seqArguments ,
sal_Bool bSaveTo ) ;
- SAL_DLLPRIVATE void postEvent_Impl( ::rtl::OUString );
+
+ SAL_DLLPRIVATE void postEvent_Impl( const ::rtl::OUString& aName, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController2 >& xController = ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController2 >() );
+
SAL_DLLPRIVATE String getEventName_Impl( long nID );
SAL_DLLPRIVATE void NotifyStorageListeners_Impl();
SAL_DLLPRIVATE bool QuerySaveSizeExceededModules( const com::sun::star::uno::Reference< com::sun::star::task::XInteractionHandler >& xHandler );
@@ -1561,6 +1571,44 @@ private:
} ; // class SfxBaseModel
+/** base class for sub components of an SfxBaseModel, which share their ref count and lifetime with the SfxBaseModel
+*/
+class SFX2_DLLPUBLIC SfxModelSubComponent
+{
+public:
+ /** checks whether the instance is alive, i.e. properly initialized, and not yet disposed
+ */
+ void MethodEntryCheck()
+ {
+ m_rModel.MethodEntryCheck( true );
+ }
+
+ // called when the SfxBaseModel which the component is superordinate of is being disposed
+ virtual void disposing();
+
+protected:
+ SfxModelSubComponent( SfxBaseModel& i_model )
+ :m_rModel( i_model )
+ {
+ }
+ virtual ~SfxModelSubComponent();
+
+ // helpers for implementing XInterface - delegates ref counting to the SfxBaseModel
+ void acquire() { m_rModel.acquire(); }
+ void release() { m_rModel.release(); }
+
+ bool isDisposed() const { return m_rModel.IsDisposed(); }
+
+protected:
+ const SfxBaseModel& getBaseModel() const { return m_rModel; }
+ SfxBaseModel& getBaseModel() { return m_rModel; }
+
+ ::osl::Mutex& getMutex() { return m_rModel.getMutex(); }
+
+private:
+ SfxBaseModel& m_rModel;
+};
+
class SFX2_DLLPUBLIC SfxModelGuard
{
public:
@@ -1575,22 +1623,29 @@ public:
SfxModelGuard( SfxBaseModel& i_rModel, const AllowedModelState i_eState = E_FULLY_ALIVE )
: m_aGuard()
{
- 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 );
+ i_rModel.MethodEntryCheck( i_eState != E_INITIALIZING );
+ }
+ SfxModelGuard( SfxModelSubComponent& i_rSubComponent )
+ :m_aGuard()
+ {
+ i_rSubComponent.MethodEntryCheck();
}
~SfxModelGuard()
{
}
+ void reset()
+ {
+ m_aGuard.reset();
+ }
+
void clear()
{
m_aGuard.clear();
}
private:
- SolarMutexClearableGuard m_aGuard;
+ SolarMutexResettableGuard m_aGuard;
};
#undef css
diff --git a/sfx2/inc/sfx2/sfxcommands.h b/sfx2/inc/sfx2/sfxcommands.h
new file mode 100755
index 000000000000..035f2f187bb8
--- /dev/null
+++ b/sfx2/inc/sfx2/sfxcommands.h
@@ -0,0 +1,342 @@
+/*************************************************************************
+ *
+ * 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_SFXCOMMANDS_HRC
+#define SFX2_SFXCOMMANDS_HRC
+
+#define CMD_SID_VIEWSHELL0 ".uno:_SwitchViewShell0"
+#define CMD_SID_VIEWSHELL1 ".uno:_SwitchViewShell1"
+#define CMD_SID_VIEWSHELL2 ".uno:_SwitchViewShell2"
+#define CMD_SID_VIEWSHELL3 ".uno:_SwitchViewShell3"
+#define CMD_SID_VIEWSHELL4 ".uno:_SwitchViewShell4"
+#define CMD_SID_ABOUT ".uno:About"
+#define CMD_SID_ACTIVATE ".uno:Activate"
+#define CMD_SID_HELPBALLOONS ".uno:ActiveHelp"
+#define CMD_SID_STYLE_FAMILY ".uno:ActualStyleFamily"
+#define CMD_SID_NEWDOC ".uno:NewDoc"
+#define CMD_SID_CREATELINK ".uno:AddBookmark"
+#define CMD_SID_NEWDOCDIRECT ".uno:AddDirect"
+#define CMD_SID_TEMPLATE_ADDRESSBOKSOURCE ".uno:AddressBookSource"
+#define CMD_SID_BASICIDE_ADDWATCH ".uno:AddWatch"
+#define CMD_SID_DOCINFO_AUTHOR ".uno:Author"
+#define CMD_SID_AUTOHIDE ".uno:AutoHide"
+#define CMD_SID_AUTOPILOTMENU ".uno:AutoPilotMenu"
+#define CMD_SID_GALLERY_BG_BRUSH ".uno:BackgroundImage"
+#define CMD_SID_BACKSPACE ".uno:Backspace"
+#define CMD_SID_BASICBREAK ".uno:BasicBreak"
+#define CMD_SID_BASICIDE_APPEAR ".uno:BasicIDEAppear"
+#define CMD_SID_BASICSTEPINTO ".uno:BasicStepInto"
+#define CMD_SID_BASICSTEPOUT ".uno:BasicStepOut"
+#define CMD_SID_BASICSTEPOVER ".uno:BasicStepOver"
+#define CMD_SID_BASICSTOP ".uno:BasicStop"
+#define CMD_SID_BROWSER ".uno:Beamer"
+#define CMD_SID_BASICIDE_BRKPNTSCHANGED ".uno:BreakPointsChanged"
+#define CMD_SID_BROWSE_BACKWARD ".uno:BrowseBackward"
+#define CMD_SID_BROWSE_FORWARD ".uno:BrowseForward"
+#define CMD_SID_BROWSER_MODE ".uno:BrowseView"
+#define CMD_SID_BUILD_VERSION ".uno:BuildVersion"
+#define CMD_SID_CAPTION ".uno:Caption"
+#define CMD_SID_STYLE_FAMILY1 ".uno:CharStyle"
+#define CMD_SID_CHECK_KEY ".uno:CheckKey"
+#define CMD_SID_BASICIDE_CHOOSEMACRO ".uno:ChooseMacro"
+#define CMD_SID_CLEARHISTORY ".uno:ClearHistory"
+#define CMD_SID_CLOSEWINS ".uno:CloseWins"
+#define CMD_SID_CLOSEDOCS ".uno:CloseDocs"
+#define CMD_SID_CLOSEDOC ".uno:CloseDoc"
+#define CMD_SID_CLOSEWIN ".uno:CloseWin"
+#define CMD_SID_CLOSING ".uno:Closing"
+#define CMD_SID_DOCINFO_COMMENTS ".uno:Comments"
+#define CMD_SID_OFFICE_COMMERCIAL_USE ".uno:CommercialUse"
+#define CMD_SID_DOCUMENT_COMPARE ".uno:CompareDocuments"
+#define CMD_SID_BASICCOMPILE ".uno:CompileBasic"
+#define CMD_SID_CONFIG ".uno:ConfigureDialog"
+#define CMD_SID_CONTEXT ".uno:Context"
+#define CMD_SID_COPY ".uno:Copy"
+#define CMD_SID_CRASH ".uno:Crash"
+#define CMD_SID_BASICIDE_CREATEMACRO ".uno:CreateMacro"
+#define CMD_SID_CURRENT_URL ".uno:CurrentURL"
+#define CMD_SID_CURSORENDOFSCREEN ".uno:CursorEndOfScreen"
+#define CMD_SID_CURSORTOPOFSCREEN ".uno:CursorTopOfScreen"
+#define CMD_SID_OFFICE_CUSTOMERNUMBER ".uno:CustomerNumber"
+#define CMD_SID_CUT ".uno:Cut"
+#define CMD_SID_DEFAULTFILEPATH ".uno:DefaultFilePath"
+#define CMD_SID_DEFAULTFILENAME ".uno:DefaultFileName"
+#define CMD_SID_DELETE ".uno:Delete"
+#define CMD_SID_BASICIDE_DELETECURRENT ".uno:DeleteCurrent"
+#define CMD_SID_STYLE_DELETE ".uno:DeleteStyle"
+#define CMD_SID_STYLE_DESIGNER ".uno:DesignerDialog"
+#define CMD_SID_STYLE_DRAGHIERARCHIE ".uno:DragHierarchy"
+#define CMD_SID_EDITDOC ".uno:EditDoc"
+#define CMD_SID_BASICIDE_EDITMACRO ".uno:EditMacro"
+#define CMD_SID_STYLE_EDIT ".uno:EditStyle"
+#define CMD_FID_SEARCH_NOW ".uno:ExecuteSearch"
+#define CMD_SID_EXTENDEDHELP ".uno:ExtendedHelp"
+#define CMD_SID_FILE_NAME ".uno:FileName"
+#define CMD_SID_FOCUSURLBOX ".uno:FocusUrlBox"
+#define CMD_SID_FORMATMENU ".uno:FormatMenu"
+#define CMD_SID_STYLE_FAMILY3 ".uno:FrameStyle"
+#define CMD_SID_FRAMETITLE ".uno:FrameTitle"
+#define CMD_SID_PROGFILENAME ".uno:FullName"
+#define CMD_SID_DOCFULLNAME ".uno:FullName"
+#define CMD_SID_WIN_FULLSCREEN ".uno:FullScreen"
+#define CMD_SID_FILLFRAME ".uno:GetFrameWindow"
+#define CMD_SID_CURSORDOWN ".uno:GoDown"
+#define CMD_SID_CURSORPAGEDOWN ".uno:GoDownBlock"
+#define CMD_SID_CURSORPAGEDOWN_SEL ".uno:GoDownBlockSel"
+#define CMD_SID_CURSORDOWN_SEL ".uno:GoDownSel"
+#define CMD_SID_CURSORLEFT ".uno:GoLeft"
+#define CMD_SID_CURSORPAGELEFT ".uno:GoLeftBlock"
+#define CMD_SID_CURSORPAGELEFT_SEL ".uno:GoLeftBlockSel"
+#define CMD_SID_CURSORLEFT_SEL ".uno:GoLeftSel"
+#define CMD_SID_CURSORRIGHT ".uno:GoRight"
+#define CMD_SID_CURSORRIGHT_SEL ".uno:GoRightSel"
+#define CMD_SID_CURSORENDOFFILE ".uno:GoToEndOfData"
+#define CMD_SID_CURSORENDOFFILE_SEL ".uno:GoToEndOfDataSel"
+#define CMD_SID_CURSOREND ".uno:GoToEndOfRow"
+#define CMD_SID_CURSOREND_SEL ".uno:GoToEndOfRowSel"
+#define CMD_SID_CURSORTOPOFFILE ".uno:GoToStart"
+#define CMD_SID_CURSORHOME ".uno:GoToStartOfRow"
+#define CMD_SID_CURSORHOME_SEL ".uno:GoToStartOfRowSel"
+#define CMD_SID_CURSORTOPOFFILE_SEL ".uno:GoToStartSel"
+#define CMD_SID_CURSORUP ".uno:GoUp"
+#define CMD_SID_CURSORPAGEUP ".uno:GoUpBlock"
+#define CMD_SID_CURSORPAGEUP_SEL ".uno:GoUpBlockSel"
+#define CMD_SID_CURSORUP_SEL ".uno:GoUpSel"
+#define CMD_SID_HELP_ANNOTATE ".uno:HelpAnnotate"
+#define CMD_SID_HELP_BOOKMARK ".uno:HelpBookmark"
+#define CMD_SID_HELP_HELPFILEBOX ".uno:HelpChooseFile"
+#define CMD_SID_HELP_DOWNLOAD ".uno:HelpDownload"
+#define CMD_SID_HELP_PI ".uno:HelperDialog"
+#define CMD_SID_HELPINDEX ".uno:HelpIndex"
+#define CMD_SID_HELPMENU ".uno:HelpMenu"
+#define CMD_SID_HELPONHELP ".uno:HelpOnHelp"
+#define CMD_SID_HELP_SEARCH ".uno:HelpSearch"
+#define CMD_SID_HELPTIPS ".uno:HelpTip"
+#define CMD_SID_HELP_ZOOMIN ".uno:HelpZoomIn"
+#define CMD_SID_HELP_ZOOMOUT ".uno:HelpZoomOut"
+#define CMD_SID_BASICIDE_HIDECURPAGE ".uno:HideCurPage"
+#define CMD_SID_HYPERLINK_DIALOG ".uno:HyperlinkDialog"
+#define CMD_SID_INSERTDOC ".uno:InsertDoc"
+#define CMD_SID_HYPERLINK_INSERT ".uno:InsertHyperlink"
+#define CMD_SID_INSERT_FLOATINGFRAME ".uno:InsertObjectFloatingFrame"
+#define CMD_SID_INTERNET_ONLINE ".uno:InternetOnline"
+#define CMD_SID_INTERNET_SEARCH ".uno:InternetSearch"
+#define CMD_SID_DOC_LOADING ".uno:IsLoading"
+#define CMD_SID_IMG_LOADING ".uno:IsLoadingImages"
+#define CMD_SID_PRINTOUT ".uno:IsPrinting"
+#define CMD_SID_JUMPTOMARK ".uno:JumpToMark"
+#define CMD_SID_DOCINFO_KEYWORDS ".uno:Keywords"
+#define CMD_SID_BASICIDE_LIBLOADED ".uno:LibLoaded"
+#define CMD_SID_BASICIDE_LIBREMOVED ".uno:LibRemoved"
+#define CMD_SID_BASICIDE_LIBSELECTED ".uno:LibSelect"
+#define CMD_SID_BASICIDE_LIBSELECTOR ".uno:LibSelector"
+#define CMD_SID_OFFICE_PLK ".uno:LicenceKey"
+#define CMD_SID_CONFIGACCEL ".uno:LoadAccel"
+#define CMD_SID_BASICLOAD ".uno:LoadBasic"
+#define CMD_SID_LOADCONFIG ".uno:LoadConfiguration"
+#define CMD_SID_CONFIGEVENT ".uno:LoadEvents"
+#define CMD_SID_CONFIGMENU ".uno:LoadMenu"
+#define CMD_SID_CONFIGSTATUSBAR ".uno:LoadStatusBar"
+#define CMD_SID_TOOLBOXOPTIONS ".uno:LoadToolBox"
+#define CMD_SID_LOGOUT ".uno:Logout"
+#define CMD_SID_SCRIPTORGANIZER ".uno:ScriptOrganizer"
+#define CMD_SID_MACROORGANIZER ".uno:MacroOrganizer"
+#define CMD_SID_RUNMACRO ".uno:RunMacro"
+#define CMD_SID_BASICCHOOSER ".uno:MacroDialog"
+#define CMD_SID_MAIL_NOTIFY ".uno:MailReceipt"
+#define CMD_SID_MAIL_CHILDWIN ".uno:MailWindow"
+#define CMD_SID_BASICIDE_MATCHGROUP ".uno:MatchGroup"
+#define CMD_SID_TOGGLE_MENUBAR ".uno:MenuBarVisible"
+#define CMD_SID_DOCUMENT_MERGE ".uno:MergeDocuments"
+#define CMD_SID_ATTR_METRIC ".uno:MetricUnit"
+#define CMD_SID_MODIFIED ".uno:Modified"
+#define CMD_SID_DOC_MODIFIED ".uno:ModifiedStatus"
+#define CMD_SID_BASICIDE_MODULEDLG ".uno:ModuleDialog"
+#define CMD_SID_BASICIDE_NAMECHANGEDONTAB ".uno:NameChangedOnTab"
+#define CMD_SID_NAVIGATOR ".uno:Navigator"
+#define CMD_SID_RESTORE_EDITING_VIEW ".uno:RestoreEditingView"
+#define CMD_SID_BASICIDE_NEWDIALOG ".uno:NewDialog"
+#define CMD_SID_BASICIDE_NEWMODULE ".uno:NewModule"
+#define CMD_SID_CREATE_BASICOBJECT ".uno:NewObject"
+#define CMD_SID_STYLE_NEW ".uno:NewStyle"
+#define CMD_SID_NEWWINDOW ".uno:NewWindow"
+#define CMD_SID_BASICIDE_OBJCAT ".uno:ObjectCatalog"
+#define CMD_SID_OBJECT ".uno:ObjectMenue"
+#define CMD_SID_OLD_PALK ".uno:OldPALK"
+#define CMD_SID_OPENDOC ".uno:Open"
+#define CMD_SID_WEBHTML ".uno:WebHtml"
+#define CMD_SID_OPENHYPERLINK ".uno:OpenHyperlink"
+#define CMD_SID_DOCINFO_TITLE ".uno:DocInfoTitle"
+#define CMD_SID_OPENTEMPLATE ".uno:OpenTemplate"
+#define CMD_SID_OPENURL ".uno:OpenUrl"
+#define CMD_SID_OPTIONS ".uno:Options"
+#define CMD_SID_ORGANIZER ".uno:Organizer"
+#define CMD_SID_STYLE_FAMILY4 ".uno:PageStyle"
+#define CMD_SID_STYLE_FAMILY2 ".uno:ParaStyle"
+#define CMD_SID_PARTWIN ".uno:PartWindow"
+#define CMD_SID_PASTE ".uno:Paste"
+#define CMD_SID_CLIPBOARD_FORMAT_ITEMS ".uno:ClipboardFormatItems"
+#define CMD_SID_PASTE_SPECIAL ".uno:PasteSpecial"
+#define CMD_SID_DOCPATH ".uno:DocPath"
+#define CMD_SID_PICKLIST ".uno:PickList"
+#define CMD_SID_PLUGINS_ACTIVE ".uno:PlugInsActive"
+#define CMD_SID_PRINTDOC ".uno:Print"
+#define CMD_SID_PRINTDOCDIRECT ".uno:PrintDefault"
+#define CMD_SID_PRINTER_NAME ".uno:Printer"
+#define CMD_SID_SETUPPRINTER ".uno:PrinterSetup"
+#define CMD_SID_PRINTPREVIEW ".uno:PrintPreview"
+#define CMD_SID_OFFICE_PRIVATE_USE ".uno:PrivateUse"
+#define CMD_SID_DOCINFO ".uno:SetDocumentProperties"
+#define CMD_SID_QUITAPP ".uno:Quit"
+#define CMD_SID_DOC_READONLY ".uno:ReadOnly"
+#define CMD_SID_RECORDMACRO ".uno:MacroRecorder"
+#define CMD_SID_STOP_RECORDING ".uno:StopRecording"
+#define CMD_SID_RECORDING_FLOATWINDOW ".uno:MacroRecordingFloat"
+#define CMD_SID_REDO ".uno:Redo"
+#define CMD_SID_DELETE_BASICOBJECT ".uno:ReleaseObject"
+#define CMD_SID_RELOAD ".uno:Reload"
+#define CMD_SID_BASICIDE_REMOVEWATCH ".uno:RemoveWatch"
+#define CMD_SID_BASICIDE_RENAMECURRENT ".uno:RenameCurrent"
+#define CMD_SID_REPAINT ".uno:Repaint"
+#define CMD_SID_REPEAT ".uno:RepeatAction"
+#define CMD_SID_RUBY_DIALOG ".uno:RubyDialog"
+#define CMD_SID_BASICRUN ".uno:RunBasic"
+#define CMD_SID_SAVEDOC ".uno:Save"
+#define CMD_SID_SAVEDOCS ".uno:SaveAll"
+#define CMD_SID_SAVEASDOC ".uno:SaveAs"
+#define CMD_SID_DOCTEMPLATE ".uno:SaveAsTemplate"
+#define CMD_SID_BASICSAVEAS ".uno:SaveBasicAs"
+#define CMD_SID_EXPORT_DIALOG ".uno:ExportDialog"
+#define CMD_SID_IMPORT_DIALOG ".uno:ImportDialog"
+#define CMD_SID_SAVECONFIG ".uno:SaveConfiguration"
+#define CMD_SID_DOC_SAVED ".uno:Saved"
+#define CMD_SID_BASICIDE_SBXDELETED ".uno:SbxDeleted"
+#define CMD_SID_BASICIDE_SBXINSERTED ".uno:SbxInserted"
+#define CMD_SID_BASICIDE_SBXRENAMED ".uno:SbxRenamed"
+#define CMD_SID_MAIL_SCROLLBODY_PAGEDOWN ".uno:ScrollBodyPageDown"
+#define CMD_SID_SEARCH_DLG ".uno:SearchDialog"
+#define CMD_SID_SEARCH_OPTIONS ".uno:SearchOptions"
+#define CMD_SID_SEARCH_ITEM ".uno:SearchProperties"
+#define CMD_SID_SELECTALL ".uno:SelectAll"
+#define CMD_FN_FAX ".uno:SendFax"
+#define CMD_SID_MAIL_SENDDOC ".uno:SendMail"
+#define CMD_SID_MAIL_SENDDOCASPDF ".uno:SendMailDocAsPDF"
+#define CMD_SID_MAIL_SENDDOCASFORMAT ".uno:SendMailDocAsFormat"
+#define CMD_SID_MAIL_SENDDOCASMS ".uno:SendMailDocAsMS"
+#define CMD_SID_MAIL_SENDDOCASOOO ".uno:SendMailDocAsOOo"
+#define CMD_SID_SETOPTIONS ".uno:SetOptions"
+#define CMD_SID_OFFICE_PALK ".uno:SetPALK"
+#define CMD_SID_SHOW_BROWSER ".uno:ShowBrowser"
+#define CMD_SID_SHOWPOPUPS ".uno:ShowPopups"
+#define CMD_SID_BASICIDE_SHOWSBX ".uno:ShowSbx"
+#define CMD_SID_SOURCEVIEW ".uno:SourceView"
+#define CMD_SID_ONLINE_REGISTRATION_DLG ".uno:StartRegistrationDialog"
+#define CMD_SID_STATUSBARTEXT ".uno:StatusBar"
+#define CMD_SID_TOGGLESTATUSBAR ".uno:StatusBarVisible"
+#define CMD_SID_BASICIDE_STAT_DATE ".uno:StatusGetDate"
+#define CMD_SID_BASICIDE_STAT_POS ".uno:StatusGetPosition"
+#define CMD_SID_BASICIDE_STAT_TITLE ".uno:StatusGetTitle"
+#define CMD_SID_BASICIDE_STOREALLMODULESOURCES ".uno:StoreAllModuleSources"
+#define CMD_SID_BASICIDE_STOREMODULESOURCE ".uno:StoreModuleSource"
+#define CMD_SID_STYLE_APPLY ".uno:StyleApplyState"
+#define CMD_SID_STYLE_CATALOG ".uno:StyleCatalog"
+#define CMD_SID_STYLE_NEW_BY_EXAMPLE ".uno:StyleNewByExample"
+#define CMD_SID_STYLE_UPDATE_BY_EXAMPLE ".uno:StyleUpdateByExample"
+#define CMD_SID_STYLE_WATERCAN ".uno:StyleWatercanMode"
+#define CMD_SID_VIEWSHELL ".uno:SwitchViewShell"
+#define CMD_SID_TASKBAR ".uno:TaskBarVisible"
+#define CMD_SID_STYLE_FAMILY5 ".uno:ListStyle"
+#define CMD_SID_TIPWINDOW ".uno:TipsDialog"
+#define CMD_SID_DOCTITLE ".uno:Title"
+#define CMD_SID_TITLE ".uno:Title"
+#define CMD_SID_BASICIDE_TOGGLEBRKPNT ".uno:ToggleBreakPoint"
+#define CMD_SID_BASICIDE_SHOWWINDOW ".uno:BasicIDEShowWindow"
+#define CMD_SID_UNDO ".uno:Undo"
+#define CMD_SID_FORMATPAINTBRUSH ".uno:FormatPaintbrush"
+#define CMD_SID_ATTR_UNDO_COUNT ".uno:UndoCount"
+#define CMD_SID_BASICIDE_UPDATEALLMODULESOURCES ".uno:UpdateAllModuleSources"
+#define CMD_SID_BASICIDE_UPDATEMODULESOURCE ".uno:UpdateModuleSource"
+#define CMD_SID_BASICIDE_MANAGEBRKPNTS ".uno:ManageBreakPoints"
+#define CMD_SID_BASICIDE_TOGGLEBRKPNTENABLED ".uno:ToggleBreakPointEnabled"
+#define CMD_SID_UPDATE_VERSION ".uno:UpdateVersion"
+#define CMD_SID_VERSION ".uno:VersionDialog"
+#define CMD_SID_SIGNATURE ".uno:Signature"
+#define CMD_SID_MACRO_SIGNATURE ".uno:MacroSignature"
+#define CMD_SID_VERSION_VISIBLE ".uno:VersionVisible"
+#define CMD_SID_VIEW_DATA_SOURCE_BROWSER ".uno:ViewDataSourceBrowser"
+#define CMD_SID_WIN_VISIBLE ".uno:WinVisible"
+#define CMD_SID_MDIWINDOWLIST ".uno:WindowList"
+#define CMD_SID_ZOOM_IN ".uno:ZoomMinus"
+#define CMD_SID_ZOOM ".uno:Zooming"
+#define CMD_SID_ZOOM_NEXT ".uno:ZoomNext"
+#define CMD_SID_ZOOM_OUT ".uno:ZoomPlus"
+#define CMD_SID_ZOOM_PREV ".uno:ZoomPrevious"
+#define CMD_SID_ZOOM_TOOLBOX ".uno:ZoomToolBox"
+#define CMD_SID_EXPORTDOC ".uno:ExportTo"
+#define CMD_SID_EXPORTDOCASPDF ".uno:ExportToPDF"
+#define CMD_SID_DIRECTEXPORTDOCASPDF ".uno:ExportDirectToPDF"
+#define CMD_SID_IMAGE_ORIENTATION ".uno:ImageOrientation"
+#define CMD_SID_SAVE_VERSION_ON_CLOSE ".uno:SaveVersionOnClose"
+#define CMD_SID_ADDONS ".uno:Addons"
+#define CMD_SID_SHOW_IME_STATUS_WINDOW ".uno:ShowImeStatusWindow"
+#define CMD_SID_UPDATE_CONFIG ".uno:UpdateConfiguration"
+#define CMD_SID_HELP_SUPPORTPAGE ".uno:HelpSupport"
+#define CMD_SID_HELP_TUTORIALS ".uno:HelpTutorials"
+#define CMD_SID_ADDONHELP ".uno:AddonHelp"
+#define CMD_SID_FORMATMENUSTATE ".uno:FormatMenuState"
+#define CMD_SID_INET_DLG ".uno:InternetDialog"
+#define CMD_SID_ONLINE_REGISTRATION ".uno:OnlineRegistrationDlg"
+#define CMD_SID_OFFICE_CHECK_PLZ ".uno:CheckPLZ"
+#define CMD_SID_ADDRESS_DATA_SOURCE ".uno:AutoPilotAddressDataSource"
+#define CMD_FN_BUSINESS_CARD ".uno:InsertBusinessCard"
+#define CMD_FN_LABEL ".uno:InsertLabels"
+#define CMD_FN_XFORMS_INIT ".uno:NewXForms"
+#define CMD_SID_SD_AUTOPILOT ".uno:AutoPilotPresentations"
+#define CMD_SID_NEWSD ".uno:NewPresentation"
+#define CMD_SID_COMP_BIBLIOGRAPHY ".uno:BibliographyComponent"
+#define CMD_SID_MINIMIZED ".uno:Minimized"
+#define CMD_SID_AUTO_CORRECT_DLG ".uno:AutoCorrectDlg"
+#define CMD_SID_OPTIONS_TREEDIALOG ".uno:OptionsTreeDialog"
+#define CMD_SID_TERMINATE_INPLACEACTIVATION ".uno:TerminateInplaceActivation"
+#define CMD_SID_RECENTFILELIST ".uno:RecentFileList"
+#define CMD_SID_AVAILABLE_TOOLBARS ".uno:AvailableToolbars"
+#define CMD_SID_AVMEDIA_PLAYER ".uno:AVMediaPlayer"
+#define CMD_SID_INSERT_AVMEDIA ".uno:InsertAVMedia"
+#define CMD_SID_MORE_DICTIONARIES ".uno:MoreDictionaries"
+#define CMD_SID_ACTIVATE_STYLE_APPLY ".uno:ActivateStyleApply"
+#define CMD_SID_DOCKWIN_0 ".uno:DockingWindow0"
+#define CMD_SID_DOCKWIN_1 ".uno:DockingWindow1"
+#define CMD_SID_DOCKWIN_2 ".uno:DockingWindow2"
+#define CMD_SID_DOCKWIN_3 ".uno:DockingWindow3"
+#define CMD_SID_DOCKWIN_4 ".uno:DockingWindow4"
+#define CMD_SID_DOCKWIN_5 ".uno:DockingWindow5"
+#define CMD_SID_DOCKWIN_6 ".uno:DockingWindow6"
+#define CMD_SID_DOCKWIN_7 ".uno:DockingWindow7"
+#define CMD_SID_DOCKWIN_8 ".uno:DockingWindow8"
+#define CMD_SID_DOCKWIN_9 ".uno:DockingWindow9"
+#define CMD_SID_PASTE_UNFORMATTED ".uno:PasteUnformatted"
+
+#endif
diff --git a/sfx2/inc/sfx2/sfxdefs.hxx b/sfx2/inc/sfx2/sfxdefs.hxx
index 95b8647a6eb0..2a9c64a87936 100644..100755
--- a/sfx2/inc/sfx2/sfxdefs.hxx
+++ b/sfx2/inc/sfx2/sfxdefs.hxx
@@ -33,7 +33,7 @@
#define MESSAGEFILE_EXT "smd" // Extension der Single-Mail/News-Files
#define MESSAGETEMPFILE_EXT "sd~" // Extension f"ur Mail/News-TempFiles
-#define SfxFilterFlags ULONG
+#define SfxFilterFlags sal_uLong
#define PRODUCT_VERSION "5.0"
#endif
diff --git a/sfx2/inc/sfx2/sfxdlg.hxx b/sfx2/inc/sfx2/sfxdlg.hxx
index 8b4f151e6ca8..b1ab1b879c98 100644..100755
--- a/sfx2/inc/sfx2/sfxdlg.hxx
+++ b/sfx2/inc/sfx2/sfxdlg.hxx
@@ -55,7 +55,7 @@ struct TransferableObjectDescriptor;
#include <sfx2/tabdlg.hxx>
//typedef SfxTabPage* (*CreateTabPage)(Window *pParent, const SfxItemSet &rAttrSet);
-//typedef USHORT* (*GetTabPageRanges)();
+//typedef sal_uInt16* (*GetTabPageRanges)();
namespace sfx2
{
@@ -77,8 +77,8 @@ public:
class SfxAbstractTabDialog : public SfxAbstractDialog
{
public:
- virtual void SetCurPageId( USHORT nId ) = 0;
- virtual const USHORT* GetInputRanges( const SfxItemPool& ) = 0;
+ virtual void SetCurPageId( sal_uInt16 nId ) = 0;
+ virtual const sal_uInt16* GetInputRanges( const SfxItemPool& ) = 0;
virtual void SetInputSet( const SfxItemSet* pInSet ) = 0;
};
@@ -87,7 +87,7 @@ class SfxAbstractInsertObjectDialog : public VclAbstractDialog
public:
virtual com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > GetObject()=0;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > GetIconIfIconified( ::rtl::OUString* pGraphicMediaType )=0;
- virtual BOOL IsCreateNew()=0;
+ virtual sal_Bool IsCreateNew()=0;
};
class SfxAbstractPasteDialog : public VclAbstractDialog
@@ -95,7 +95,7 @@ class SfxAbstractPasteDialog : public VclAbstractDialog
public:
virtual void Insert( SotFormatStringId nFormat, const String & rFormatName ) = 0;
virtual void SetObjName( const SvGlobalName & rClass, const String & rObjName ) = 0;
- virtual ULONG GetFormat( const TransferableDataHelper& aHelper,
+ virtual sal_uIntPtr GetFormat( const TransferableDataHelper& aHelper,
const DataFlavorExVector* pFormats=0,
const TransferableObjectDescriptor* pDesc=0 ) = 0;
};
@@ -132,21 +132,21 @@ public:
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xViewFrame,
bool bEditFmt=false,
const String *pUserButtonText=0 ) = 0;
- virtual CreateTabPage GetTabPageCreatorFunc( USHORT nId ) = 0;
- virtual GetTabPageRanges GetTabPageRangesFunc( USHORT nId ) = 0;
- virtual SfxAbstractInsertObjectDialog* CreateInsertObjectDialog( Window* pParent, USHORT nSlotId,
+ virtual CreateTabPage GetTabPageCreatorFunc( sal_uInt16 nId ) = 0;
+ virtual GetTabPageRanges GetTabPageRangesFunc( sal_uInt16 nId ) = 0;
+ virtual SfxAbstractInsertObjectDialog* CreateInsertObjectDialog( Window* pParent, const rtl::OUString& rCommand,
const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& xStor,
const SvObjectServerList* pList = 0 )=0;
- virtual VclAbstractDialog* CreateEditObjectDialog( Window* pParent, USHORT nSlotId,
+ virtual VclAbstractDialog* CreateEditObjectDialog( Window* pParent, const rtl::OUString& rCommand,
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::LinkManager* pMgr, BOOL bHTML=FALSE, sfx2::SvBaseLink* p=0 )=0;
+ virtual SfxAbstractLinksDialog* CreateLinksDialog( Window* pParent, sfx2::LinkManager* pMgr, sal_Bool bHTML=sal_False, sfx2::SvBaseLink* p=0 )=0;
virtual VclAbstractDialog * CreateSvxScriptOrgDialog( Window* pParent, const String& rLanguage ) = 0;
virtual AbstractScriptSelectorDialog*
CreateScriptSelectorDialog(
Window* pParent,
- BOOL bShowSlots,
+ sal_Bool bShowSlots,
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxFrame
) = 0;
diff --git a/sfx2/inc/sfxhelp.hxx b/sfx2/inc/sfx2/sfxhelp.hxx
index 2a25941cb91d..8c11031ff8e9 100644..100755
--- a/sfx2/inc/sfxhelp.hxx
+++ b/sfx2/inc/sfx2/sfxhelp.hxx
@@ -46,12 +46,11 @@ class SFX2_DLLPUBLIC SfxHelp : public Help
SfxHelp_Impl* pImp;
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 sal_Bool Start_Impl( const String& rURL, const Window* pWindow, const String& rKeyword );
+ SAL_DLLPRIVATE virtual sal_Bool SearchKeyword( const XubString& rKeyWord );
+ SAL_DLLPRIVATE virtual sal_Bool Start( const String& rURL, const Window* pWindow );
+ SAL_DLLPRIVATE virtual void OpenHelpAgent( const rtl::OString& sHelpId );
SAL_DLLPRIVATE String GetHelpModuleName_Impl();
- SAL_DLLPRIVATE String CreateHelpURL_Impl( ULONG nHelpId, const String& rModuleName );
SAL_DLLPRIVATE String CreateHelpURL_Impl( const String& aCommandURL, const String& rModuleName );
public:
@@ -61,12 +60,11 @@ public:
inline void SetTicket( const String& rTicket ) { aTicket = rTicket; }
inline void SetUser( const String& rUser ) { aUser = rUser; }
- virtual XubString GetHelpText( ULONG nHelpId, const Window* pWindow );
virtual XubString GetHelpText( const String&, const Window* pWindow );
- static String CreateHelpURL( ULONG nHelpId, const String& rModuleName );
static String CreateHelpURL( const String& aCommandURL, const String& rModuleName );
- static void OpenHelpAgent( SfxFrame* pFrame, ULONG nHelpId );
+ using Help::OpenHelpAgent;
+ static void OpenHelpAgent( SfxFrame* pFrame, const rtl::OString& sHelpId );
static String GetDefaultHelpModule();
static ::rtl::OUString GetCurrentModuleIdentifier();
};
diff --git a/sfx2/inc/sfx2/sfxhtml.hxx b/sfx2/inc/sfx2/sfxhtml.hxx
index 86c6f4243b71..3141c862db39 100644..100755
--- a/sfx2/inc/sfx2/sfxhtml.hxx
+++ b/sfx2/inc/sfx2/sfxhtml.hxx
@@ -50,32 +50,32 @@ class SFX2_DLLPUBLIC SfxHTMLParser : public HTMLParser
SfxMedium* pMedium;
SfxMedium *pDLMedium; // Medium fuer Download von Files
- USHORT nMetaTags; // Anzahl der bisher gelesenen Meta-Tags
+ sal_uInt16 nMetaTags; // Anzahl der bisher gelesenen Meta-Tags
ScriptType eScriptType;
SAL_DLLPRIVATE void GetScriptType_Impl( SvKeyValueIterator* );
protected:
- SfxHTMLParser( SvStream& rStream, BOOL bNewDoc=TRUE, SfxMedium *pMedium=0 );
+ SfxHTMLParser( SvStream& rStream, sal_Bool bNewDoc=sal_True, SfxMedium *pMedium=0 );
virtual ~SfxHTMLParser();
public:
// Lesen der Optionen einer Image-Map
- // <MAP>: TRUE = Image-Map hat einen Namen
- // <AREA>: TRUE = Image-Map hat jetzt einen Bereich mehr
- static BOOL ParseMapOptions(ImageMap * pImageMap,
+ // <MAP>: sal_True = Image-Map hat einen Namen
+ // <AREA>: sal_True = Image-Map hat jetzt einen Bereich mehr
+ static sal_Bool ParseMapOptions(ImageMap * pImageMap,
const HTMLOptions * pOptions );
- BOOL ParseMapOptions(ImageMap * pImageMap)
+ sal_Bool ParseMapOptions(ImageMap * pImageMap)
{ return ParseMapOptions(pImageMap, GetOptions()); }
- static BOOL ParseAreaOptions(ImageMap * pImageMap, const String& rBaseURL,
+ static sal_Bool ParseAreaOptions(ImageMap * pImageMap, const String& rBaseURL,
const HTMLOptions * pOptions,
- USHORT nEventMouseOver = 0,
- USHORT nEventMouseOut = 0 );
- inline BOOL ParseAreaOptions(ImageMap * pImageMap, const String& rBaseURL,
- USHORT nEventMouseOver = 0,
- USHORT nEventMouseOut = 0);
+ sal_uInt16 nEventMouseOver = 0,
+ sal_uInt16 nEventMouseOut = 0 );
+ inline sal_Bool ParseAreaOptions(ImageMap * pImageMap, const String& rBaseURL,
+ sal_uInt16 nEventMouseOver = 0,
+ sal_uInt16 nEventMouseOut = 0);
// <TD SDVAL="..." SDNUM="...">
static double GetTableDataOptionsValNum( sal_uInt32& nNumForm,
@@ -99,14 +99,14 @@ protected:
void StartFileDownload( const String& rURL, int nToken,
SfxObjectShell *pSh=0 );
- // Beenden eines asynchronen File-Downloads. Gibt TRUE zurueck, wenn
+ // Beenden eines asynchronen File-Downloads. Gibt sal_True zurueck, wenn
// der Download geklappt hat. Das gelesene File befindet sich dann in
// dem uebergeben String.
- BOOL FinishFileDownload( String& rStr );
+ sal_Bool FinishFileDownload( String& rStr );
- // Gibt TRUE zurueck, wenn ein File downloaded wurde und
+ // Gibt sal_True zurueck, wenn ein File downloaded wurde und
// FileDownloadFinished noch nicht gerufen wurde.
- BOOL ShouldFinishFileDownload() const { return pDLMedium != 0; }
+ sal_Bool ShouldFinishFileDownload() const { return pDLMedium != 0; }
SfxMedium *GetMedium() { return pMedium; }
const SfxMedium *GetMedium() const { return pMedium; }
@@ -116,9 +116,9 @@ protected:
const String& GetScriptTypeString( SvKeyValueIterator* ) const;
};
-inline BOOL SfxHTMLParser::ParseAreaOptions(ImageMap * pImageMap, const String& rBaseURL,
- USHORT nEventMouseOver,
- USHORT nEventMouseOut)
+inline sal_Bool SfxHTMLParser::ParseAreaOptions(ImageMap * pImageMap, const String& rBaseURL,
+ sal_uInt16 nEventMouseOver,
+ sal_uInt16 nEventMouseOut)
{
return ParseAreaOptions( pImageMap, rBaseURL, GetOptions(),
nEventMouseOver, nEventMouseOut );
diff --git a/sfx2/inc/sfx2/sfxmodelfactory.hxx b/sfx2/inc/sfx2/sfxmodelfactory.hxx
index 37e6582b697d..37e6582b697d 100644..100755
--- a/sfx2/inc/sfx2/sfxmodelfactory.hxx
+++ b/sfx2/inc/sfx2/sfxmodelfactory.hxx
diff --git a/sfx2/inc/sfxresid.hxx b/sfx2/inc/sfx2/sfxresid.hxx
index 8eb9412db12f..320d18bf0f03 100644..100755
--- a/sfx2/inc/sfxresid.hxx
+++ b/sfx2/inc/sfx2/sfxresid.hxx
@@ -29,13 +29,13 @@
#define _SFX_SFXRESID_HXX
#include <tools/string.hxx>
-
+#include "sfx2/dllapi.h"
#include <tools/resid.hxx>
-class SfxResId: public ResId
+class SFX2_DLLPUBLIC SfxResId: public ResId
{
public:
- SfxResId( USHORT nId );
+ SfxResId( sal_uInt16 nId );
static ResMgr* GetResMgr();
static void DeleteResMgr();
};
@@ -46,7 +46,7 @@ class SfxSimpleResId
String m_sText;
public:
- SfxSimpleResId(USHORT nID);
+ SfxSimpleResId(sal_uInt16 nID);
String getText() const { return m_sText; }
diff --git a/sfx2/inc/sfx2/sfxsids.hrc b/sfx2/inc/sfx2/sfxsids.hrc
index 6e87e86c89a0..268c8f9a671f 100644..100755
--- a/sfx2/inc/sfx2/sfxsids.hrc
+++ b/sfx2/inc/sfx2/sfxsids.hrc
@@ -94,6 +94,8 @@
#define SID_MAIL_PRIORITY (SID_SFX_START + 337)
#define SID_MAIL_ATTACH_FILE (SID_SFX_START + 375)
+#define SID_MAIL_PREPAREEXPORT (SID_SFX_START + 385)
+#define SID_MAIL_NEEDS_PREPAREEXPORT (SID_SFX_START + 386)
#define SID_MAIL_EXPORT_FINISHED (SID_SFX_START + 388)
#define SID_WEBHTML (SID_SFX_START + 393)
@@ -193,7 +195,7 @@
#define SID_EXPLORER_FILEPROPS_END (SID_SFX_START + 1399)
#define ID_FILETP_START SID_EXPLORER_FILEPROPS_START
-#define ID_FILETP_READONLY (ID_FILETP_START + 0)
+#define ID_FILETP_READONLY (ID_FILETP_START + 0)
#define ID_FILETP_TITLE (ID_FILETP_START + 1)
#define SID_EXPLORER_PROPS_START (SID_SFX_START + 1410)
@@ -227,9 +229,9 @@
#define SID_OFFICE_PLK (SID_SFX_START + 1601)
#define SID_OFFICE_PALK (SID_SFX_START + 1604)
#define SID_CHECK_KEY (SID_SFX_START + 1605)
-#define SID_OFFICE_PRIVATE_USE (SID_SFX_START + 1606)
-#define SID_OFFICE_COMMERCIAL_USE (SID_SFX_START + 1607)
-#define SID_OFFICE_CUSTOMERNUMBER (SID_SFX_START + 1608)
+#define SID_OFFICE_PRIVATE_USE (SID_SFX_START + 1606)
+#define SID_OFFICE_COMMERCIAL_USE (SID_SFX_START + 1607)
+#define SID_OFFICE_CUSTOMERNUMBER (SID_SFX_START + 1608)
#define SID_OFFICE_INVALIDATE_TITLE (SID_SFX_START + 1609)
#define SID_OFFICE_CHECK_PLZ (SID_SFX_START + 1610)
#define SID_INTERNET_SEARCH (SID_SFX_START + 1611)
@@ -242,11 +244,11 @@
#define SID_NEW_MSG_PARENT (SID_SFX_START + 1622)
-#define SID_PGP_ENCODE (SID_SFX_START + 1625)
-#define SID_PGP_DECODE (SID_SFX_START + 1626)
-#define SID_TIPWINDOW (SID_SFX_START + 1632)
+#define SID_PGP_ENCODE (SID_SFX_START + 1625)
+#define SID_PGP_DECODE (SID_SFX_START + 1626)
+#define SID_TIPWINDOW (SID_SFX_START + 1632)
#define SID_CHARSET (SID_SFX_START + 1633)
-#define SID_OVERWRITE (SID_SFX_START + 1634)
+#define SID_OVERWRITE (SID_SFX_START + 1634)
#define SID_RENAME (SID_SFX_START + 1653)
#define SID_PARTWIN (SID_SFX_START + 1640)
#define SID_CRASH (SID_SFX_START + 1645)
@@ -277,7 +279,7 @@
#define SID_SHOW_IME_STATUS_WINDOW (SID_SFX_START + 1680)
#define SID_UPDATE_CONFIG (SID_SFX_START + 1681)
#define SID_VIEWONLY (SID_SFX_START + 1682)
-#define SID_REPAIRPACKAGE (SID_SFX_START + 1683)
+#define SID_REPAIRPACKAGE (SID_SFX_START + 1683)
#define SID_ADDONHELP (SID_SFX_START + 1684)
#define SID_OBJECTSHELL (SID_SFX_START + 1685)
#define SID_MINIMIZED (SID_SFX_START + 1687)
@@ -311,7 +313,11 @@
#define SID_DEFAULTFILENAME (SID_SFX_START + 1717)
#define SID_MODIFYPASSWORDINFO (SID_SFX_START + 1718)
#define SID_RECOMMENDREADONLY (SID_SFX_START + 1719)
-#define SID_SFX_free_START (SID_SFX_START + 1720)
+#define SID_SUGGESTEDSAVEASDIR (SID_SFX_START + 1720)
+#define SID_SUGGESTEDSAVEASNAME (SID_SFX_START + 1721)
+#define SID_ENCRYPTIONDATA (SID_SFX_START + 1722)
+#define SID_PASSWORDINTERACTION (SID_SFX_START + 1723)
+#define SID_SFX_free_START (SID_SFX_START + 1724)
#define SID_SFX_free_END (SID_SFX_START + 3999)
#define SID_OPEN_NEW_VIEW (SID_SFX_START + 520)
@@ -424,7 +430,6 @@
#define SID_INSERT_PLUGIN (SID_SFX_START + 672)
#define SID_INSERT_SOUND (SID_SFX_START + 676)
#define SID_INSERT_VIDEO (SID_SFX_START + 677)
-#define SID_INSERT_APPLET (SID_SFX_START + 673)
#define SID_HYPERLINK_DIALOG (SID_SFX_START + 678)
@@ -496,7 +501,7 @@
#define SID_PASTE (SID_SFX_START + 712)
// steht unter diesem Wert in chaos/cntids.hrc!!!
-//#define SID_DELETE (SID_SFX_START + 713)
+//#define SID_DELETE (SID_SFX_START + 713)
#define SID_BACKSPACE (SID_SFX_START + 714)
#define SID_FORMATPAINTBRUSH (SID_SFX_START + 715)
@@ -520,41 +525,29 @@
#define SID_CURSORTOPOFSCREEN (SID_SFX_START + 744)
#define SID_CURSORHOME (SID_SFX_START + 745)
#define SID_CURSOREND (SID_SFX_START + 746)
-#define SID_SCROLLDOWN (SID_SFX_START + 751)
-#define SID_SCROLLUP (SID_SFX_START + 752)
#define SID_FORMATMENU (SID_SFX_START + 780)
#define SID_OBJECTMENU0 SID_FORMATMENU
#define SID_OBJECTMENU1 (SID_SFX_START + 781)
#define SID_OBJECTMENU2 (SID_SFX_START + 782)
#define SID_OBJECTMENU3 (SID_SFX_START + 783)
#define SID_OBJECTMENU_LAST SID_OBJECTMENU3
-#define SID_EDITMENU (SID_SFX_START + 790)
#define SID_FORMATMENUSTATE (SID_SFX_START + 791)
// default-ids for macros
#define SID_RECORDING_FLOATWINDOW (SID_SFX_START + 800)
#define SID_RECORDMACRO (SID_SFX_START + 1669)
-#define SID_PLAYMACRO (SID_SFX_START + 801)
-#define SID_EDITMACRO (SID_SFX_START + 802)
-#define SID_MACROLIBMANAGER (SID_SFX_START + 803)
-#define SID_LOADMACROLIB (SID_SFX_START + 804)
-#define SID_RELEASEMACROLIB (SID_SFX_START + 805)
-#define SID_BASICNAME (SID_SFX_START + 806)
-#define SID_LIBNAME (SID_SFX_START + 807)
-#define SID_MODULENAME (SID_SFX_START + 808)
-#define SID_STATEMENT (SID_SFX_START + 810)
+ // FREE: SID_SFX_START + 801
+ // FREE: SID_SFX_START + 802
+ // FREE: SID_SFX_START + 803
+ // FREE: SID_SFX_START + 804
+ // FREE: SID_SFX_START + 805
+ // FREE: SID_SFX_START + 806
+ // FREE: SID_SFX_START + 807
+ // FREE: SID_SFX_START + 808
+ // FREE: SID_SFX_START + 809
+ // FREE: SID_SFX_START + 810
#define SID_ASYNCHRON (SID_SFX_START + 811)
-#define SID_START_APP (SID_SFX_START + 820)
-#define SID_START_BEGIN (SID_SFX_START + 821)
-#define SID_STARTSW SID_START_BEGIN
-#define SID_STARTSC (SID_START_BEGIN + 1)
-#define SID_STARTSD (SID_START_BEGIN + 2)
-#define SID_STARTSIM (SID_START_BEGIN + 3)
-#define SID_STARTSCH (SID_START_BEGIN + 4)
-#define SID_STARTSMA (SID_START_BEGIN + 5)
-#define SID_START_END SID_STARTSMA
-
// default-ids for configuration
#define SID_RESTOREMENU (SID_SFX_START + 901)
#define SID_RESTOREACCELS (SID_SFX_START + 902)
@@ -620,11 +613,9 @@
#define SID_OBJECTRESIZE (SID_SFX_START + 1000)
#define SID_INSERT_TEXT (SID_SFX_START + 1001)
-#define SID_MACRO_START (SID_SFX_START + 1002)
-#define SID_MACRO_END (SID_SFX_START + 1100)
-#define SID_EVENTCONFIG (SID_MACRO_END + 1)
-#define SID_VERB_START (SID_MACRO_END + 2)
-#define SID_VERB_END (SID_MACRO_END + 21)
+#define SID_EVENTCONFIG (SID_SFX_START + 1101)
+#define SID_VERB_START (SID_SFX_START + 1100)
+#define SID_VERB_END (SID_SFX_START + 1121)
#define SID_BROWSER_TASK (SID_MACRO_END + 22)
@@ -660,7 +651,7 @@
#define SID_OPT_HELP_PATH (SID_SFX_START + 1560)
#define SID_OPT_BOOKMARKS_PATH (SID_SFX_START + 1561)
#define SID_OPT_GALLERY_PATH (SID_SFX_START + 1562)
-#define SID_OPT_NEWDOC_PATH (SID_SFX_START + 1563)
+#define SID_OPT_NEWDOC_PATH (SID_SFX_START + 1563)
#define SID_OPT_AGENTS_PATH (SID_SFX_START + 1564)
#define SID_OPT_AUTOPILOT_PATH (SID_SFX_START + 1565)
#define SID_OPT_EXPLORER_PATH (SID_SFX_START + 1566)
@@ -754,9 +745,9 @@
#define SID_ATTR_AUTOHELPAGENT (SID_OPTIONS_START + 67)
#define SID_AUTOHELPAGENT_RESET (SID_OPTIONS_START + 68)
#define SID_HELPAGENT_TIMEOUT (SID_OPTIONS_START + 93)
-#define SID_ATTR_WELCOMESCREEN (SID_OPTIONS_START + 81)
+#define SID_ATTR_WELCOMESCREEN (SID_OPTIONS_START + 81)
#define SID_WELCOMESCREEN_RESET (SID_OPTIONS_START + 82)
-#define SID_RESTORE_EXPAND_STATE (SID_OPTIONS_START + 83)
+#define SID_RESTORE_EXPAND_STATE (SID_OPTIONS_START + 83)
#define SID_ATTR_QUICKLAUNCHER (SID_OPTIONS_START + 74)
#define SID_ATTR_YEAR2000 (SID_OPTIONS_START + 87)
#define SID_ATTR_ALLOWFOLDERWEBVIEW (SID_OPTIONS_START + 92)
@@ -829,7 +820,7 @@
#define SID_INET_CHANNELS_ONOFF (SID_OPTIONS_START + 64)
-#define SID_INET_COOKIESHANDLE (SID_OPTIONS_START + 69)
+#define SID_INET_COOKIESHANDLE (SID_OPTIONS_START + 69)
#define SID_INET_CACHEJS (SID_OPTIONS_START + 70)
#define SID_INET_CACHEEXPIRED (SID_OPTIONS_START + 71)
diff --git a/sfx2/inc/sfx2/sfxstatuslistener.hxx b/sfx2/inc/sfx2/sfxstatuslistener.hxx
index 8d9f4c614763..c8b709e2aeb5 100644..100755
--- a/sfx2/inc/sfx2/sfxstatuslistener.hxx
+++ b/sfx2/inc/sfx2/sfxstatuslistener.hxx
@@ -45,7 +45,7 @@
class SfxStatusListenerInterface
{
public:
- virtual void StateChanged( USHORT nSlotId, SfxItemState eState, const SfxPoolItem* pState ) = 0;
+ virtual void StateChanged( sal_uInt16 nSlotId, SfxItemState eState, const SfxPoolItem* pState ) = 0;
};
class SFX2_DLLPUBLIC SfxStatusListener :
@@ -57,17 +57,17 @@ class SFX2_DLLPUBLIC SfxStatusListener :
public:
SFX_DECL_XINTERFACE_XTYPEPROVIDER
- SfxStatusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider >& rDispatchProvider, USHORT nSlotId, const rtl::OUString& aCommand );
+ SfxStatusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider >& rDispatchProvider, sal_uInt16 nSlotId, const rtl::OUString& aCommand );
virtual ~SfxStatusListener();
// old methods from SfxControllerItem
- USHORT GetId() const { return m_nSlotID; }
+ sal_uInt16 GetId() const { return m_nSlotID; }
void Bind();
- void Bind( USHORT nSlotID, const rtl::OUString& rNewCommand );
+ void Bind( sal_uInt16 nSlotID, const rtl::OUString& rNewCommand );
void UnBind();
void ReBind();
- virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState );
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState );
// XComponent
virtual void SAL_CALL dispose() throw( ::com::sun::star::uno::RuntimeException );
@@ -85,7 +85,7 @@ class SFX2_DLLPUBLIC SfxStatusListener :
SfxStatusListener();
SfxStatusListener& operator=( const SfxStatusListener& );
- USHORT m_nSlotID;
+ sal_uInt16 m_nSlotID;
::com::sun::star::util::URL m_aCommand;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > m_xDispatchProvider;
::com::sun::star::uno::Reference< com::sun::star::frame::XDispatch > m_xDispatch;
diff --git a/sfx2/inc/sfx2/sfxuno.hxx b/sfx2/inc/sfx2/sfxuno.hxx
index 1933626ab1e3..d0fc3601b593 100644..100755
--- a/sfx2/inc/sfx2/sfxuno.hxx
+++ b/sfx2/inc/sfx2/sfxuno.hxx
@@ -38,6 +38,7 @@
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/task/ErrorCodeIOException.hpp>
+#include <com/sun/star/beans/NamedValue.hpp>
//________________________________________________________________________________________________________________________
@@ -72,7 +73,6 @@
#define UNOPROPERTYVALUE ::com::sun::star::beans::PropertyValue
#define UNOREFERENCE ::com::sun::star::uno::Reference
#define UNORUNTIMEEXCEPTION ::com::sun::star::uno::RuntimeException
-#define UNOINVALIDREGISTRYEXCEPTION ::com::sun::star::registry::InvalidRegistryException
#define UNOSEQUENCE ::com::sun::star::uno::Sequence
#define UNOTYPE ::com::sun::star::uno::Type
#define UNOURL ::com::sun::star::util::URL
@@ -104,7 +104,7 @@ SFX2_DLLPUBLIC void TransformItems( sal_uInt16
UNOSEQUENCE< UNOPROPERTYVALUE >& seqArgs ,
const SfxSlot* pSlot = 0 );
-sal_Bool GetPasswd_Impl( const SfxItemSet* pSet, ::rtl::OUString& rPasswd );
+bool GetEncryptionData_Impl( const SfxItemSet* pSet, ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& aEncryptionData );
#define FrameSearchFlags sal_Int32
@@ -590,52 +590,6 @@ sal_Bool GetPasswd_Impl( const SfxItemSet* pSet, ::rtl::OUString& rPasswd );
}
//************************************************************************************************************************
-// definition for "extern c component_writeInfo()"
-//************************************************************************************************************************
-#define COMPONENT_INFO(CLASS) \
- \
- try \
- { \
- /* Set default result of follow operations !!! */ \
- bReturn = sal_False ; \
- \
- /* Do the follow only, if given key is valid ! */ \
- if ( xKey.is () ) \
- { \
- /* Build new keyname */ \
- sKeyName = UNOOUSTRING(RTL_CONSTASCII_USTRINGPARAM( "/" )) ; \
- sKeyName += CLASS::impl_getStaticImplementationName() ; \
- sKeyName += UNOOUSTRING(RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES" )); \
- \
- /* Create new key with new name. */ \
- xNewKey = xKey->createKey( sKeyName ); \
- \
- /* If this new key valid ... */ \
- if ( xNewKey.is () ) \
- { \
- /* Get information about supported services. */ \
- seqServiceNames = CLASS::impl_getStaticSupportedServiceNames() ; \
- pArray = seqServiceNames.getArray() ; \
- nLength = seqServiceNames.getLength() ; \
- nCounter = 0 ; \
- \
- /* Then set this information on this key. */ \
- for ( nCounter = 0; nCounter < nLength; ++nCounter ) \
- { \
- xNewKey->createKey( pArray [nCounter] ); \
- } \
- \
- /* Result of this operations = OK. */ \
- bReturn = sal_True ; \
- } \
- } \
- } \
- catch( UNOINVALIDREGISTRYEXCEPTION& ) \
- { \
- bReturn = sal_False ; \
- } \
-
-//************************************************************************************************************************
// definition for "extern c component_getFactory()"
//************************************************************************************************************************
#define CREATEFACTORY(CLASS) \
diff --git a/sfx2/inc/sfx2/shell.hxx b/sfx2/inc/sfx2/shell.hxx
index 87de8bf275f5..fc6c273a9f6c 100644..100755
--- a/sfx2/inc/sfx2/shell.hxx
+++ b/sfx2/inc/sfx2/shell.hxx
@@ -66,12 +66,16 @@ class SfxShellSubObject;
class SfxDispatcher;
class SfxViewFrame;
class SfxSlot;
-class SfxUndoManager;
class SfxRepeatTarget;
class SbxVariable;
class SbxBase;
class SfxBindings;
+namespace svl
+{
+ class IUndoManager;
+}
+
//====================================================================
enum SfxInterfaceId
@@ -163,7 +167,7 @@ class SFX2_DLLPUBLIC SfxShell: public SfxBroadcaster
SfxShell_Impl* pImp;
SfxItemPool* pPool;
- SfxUndoManager* pUndoMgr;
+ ::svl::IUndoManager* pUndoMgr;
private:
SfxShell( const SfxShell & ); // n.i.
@@ -175,7 +179,7 @@ protected:
#ifndef _SFXSH_HXX
SAL_DLLPRIVATE void SetViewShell_Impl( SfxViewShell* pView );
- SAL_DLLPRIVATE void Invalidate_Impl( SfxBindings& rBindings, USHORT nId );
+ SAL_DLLPRIVATE void Invalidate_Impl( SfxBindings& rBindings, sal_uInt16 nId );
SAL_DLLPRIVATE SfxShellObject* GetShellObj_Impl() const;
SAL_DLLPRIVATE void SetShellObj_Impl( SfxShellObject* pObj );
#endif
@@ -205,25 +209,26 @@ public:
static void EmptyExecStub(SfxShell *pShell, SfxRequest &);
static void EmptyStateStub(SfxShell *pShell, SfxItemSet &);
- const SfxPoolItem* GetSlotState( USHORT nSlotId, const SfxInterface *pIF = 0, SfxItemSet *pStateSet = 0 );
+ const SfxPoolItem* GetSlotState( sal_uInt16 nSlotId, const SfxInterface *pIF = 0, SfxItemSet *pStateSet = 0 );
const SfxPoolItem* ExecuteSlot( SfxRequest &rReq, const SfxInterface *pIF = 0 );
- const SfxPoolItem* ExecuteSlot( SfxRequest &rReq, BOOL bAsync );
- ULONG ExecuteSlot( USHORT nSlot, USHORT nMemberId, SbxVariable& rRet, SbxBase* pArgs = 0 );
+ const SfxPoolItem* ExecuteSlot( SfxRequest &rReq, sal_Bool bAsync );
+ sal_uIntPtr ExecuteSlot( sal_uInt16 nSlot, sal_uInt16 nMemberId, SbxVariable& rRet, SbxBase* pArgs = 0 );
inline SfxItemPool& GetPool() const;
inline void SetPool( SfxItemPool *pNewPool ) ;
- virtual SfxUndoManager* GetUndoManager();
- void SetUndoManager( SfxUndoManager *pNewUndoMgr );
+ virtual ::svl::IUndoManager*
+ GetUndoManager();
+ void SetUndoManager( ::svl::IUndoManager *pNewUndoMgr );
SfxRepeatTarget* GetRepeatTarget() const;
void SetRepeatTarget( SfxRepeatTarget *pTarget );
- virtual void Invalidate(USHORT nId = 0);
+ virtual void Invalidate(sal_uInt16 nId = 0);
- BOOL IsActive() const;
- virtual void Activate(BOOL bMDI);
- virtual void Deactivate(BOOL bMDI);
+ sal_Bool IsActive() const;
+ virtual void Activate(sal_Bool bMDI);
+ virtual void Deactivate(sal_Bool bMDI);
virtual void ParentActivate();
virtual void ParentDeactivate();
@@ -234,30 +239,30 @@ public:
void UIFeatureChanged();
// Items
- const SfxPoolItem* GetItem( USHORT nSlotId ) const;
+ const SfxPoolItem* GetItem( sal_uInt16 nSlotId ) const;
void PutItem( const SfxPoolItem& rItem );
- void RemoveItem( USHORT nSlotId );
+ void RemoveItem( sal_uInt16 nSlotId );
// TODO/CLEANUP: still needed?!
void SetVerbs(const com::sun::star::uno::Sequence < com::sun::star::embed::VerbDescriptor >& aVerbs);
const com::sun::star::uno::Sequence < com::sun::star::embed::VerbDescriptor >& GetVerbs() const;
void VerbExec (SfxRequest&);
void VerbState (SfxItemSet&);
- SAL_DLLPRIVATE const SfxSlot* GetVerbSlot_Impl(USHORT nId) const;
+ SAL_DLLPRIVATE const SfxSlot* GetVerbSlot_Impl(sal_uInt16 nId) const;
- void SetHelpId(ULONG nId);
- ULONG GetHelpId() const;
+ void SetHelpId(sal_uIntPtr nId);
+ sal_uIntPtr GetHelpId() const;
virtual SfxObjectShell* GetObjectShell();
- void SetDisableFlags( ULONG nFlags );
- ULONG GetDisableFlags() const;
+ void SetDisableFlags( sal_uIntPtr nFlags );
+ sal_uIntPtr GetDisableFlags() const;
- virtual SfxItemSet* CreateItemSet( USHORT nId );
- virtual void ApplyItemSet( USHORT nId, const SfxItemSet& rSet );
+ virtual SfxItemSet* CreateItemSet( sal_uInt16 nId );
+ virtual void ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet );
#ifndef _SFXSH_HXX
SAL_DLLPRIVATE bool CanExecuteSlot_Impl( const SfxSlot &rSlot );
- SAL_DLLPRIVATE void DoActivate_Impl( SfxViewFrame *pFrame, BOOL bMDI);
- SAL_DLLPRIVATE void DoDeactivate_Impl( SfxViewFrame *pFrame, BOOL bMDI);
+ SAL_DLLPRIVATE void DoActivate_Impl( SfxViewFrame *pFrame, sal_Bool bMDI);
+ SAL_DLLPRIVATE void DoDeactivate_Impl( SfxViewFrame *pFrame, sal_Bool bMDI);
#endif
};
@@ -332,7 +337,7 @@ inline void SfxShell::SetPool
#Class, NameResId, GetInterfaceId(), \
SuperClass::GetStaticInterface(), \
a##Class##Slots_Impl[0], \
- (USHORT) (sizeof(a##Class##Slots_Impl) / sizeof(SfxSlot) ) ); \
+ (sal_uInt16) (sizeof(a##Class##Slots_Impl) / sizeof(SfxSlot) ) ); \
InitInterface_Impl(); \
} \
return pInterface; \
@@ -373,13 +378,13 @@ inline void SfxShell::SetPool
GetStaticInterface()->RegisterObjectBar( nPos, rResId, nFeature )
#define SFX_CHILDWINDOW_REGISTRATION(nId) \
- GetStaticInterface()->RegisterChildWindow( nId, (BOOL) FALSE )
+ GetStaticInterface()->RegisterChildWindow( nId, (sal_Bool) sal_False )
#define SFX_FEATURED_CHILDWINDOW_REGISTRATION(nId,nFeature) \
- GetStaticInterface()->RegisterChildWindow( nId, (BOOL) FALSE, nFeature )
+ GetStaticInterface()->RegisterChildWindow( nId, (sal_Bool) sal_False, nFeature )
#define SFX_CHILDWINDOW_CONTEXT_REGISTRATION(nId) \
- GetStaticInterface()->RegisterChildWindow( nId, (BOOL) TRUE )
+ GetStaticInterface()->RegisterChildWindow( nId, (sal_Bool) sal_True )
#define SFX_POPUPMENU_REGISTRATION(rResId) \
GetStaticInterface()->RegisterPopupMenu( rResId )
diff --git a/sfx2/inc/sfx2/signaturestate.hxx b/sfx2/inc/sfx2/signaturestate.hxx
index a7e68013d499..a7e68013d499 100644..100755
--- a/sfx2/inc/sfx2/signaturestate.hxx
+++ b/sfx2/inc/sfx2/signaturestate.hxx
diff --git a/sfx2/inc/stbitem.hxx b/sfx2/inc/sfx2/stbitem.hxx
index df478dd04ecd..8be28db84d92 100644..100755
--- a/sfx2/inc/stbitem.hxx
+++ b/sfx2/inc/sfx2/stbitem.hxx
@@ -45,16 +45,16 @@ svt::StatusbarController* SAL_CALL SfxStatusBarControllerFactory(
StatusBar* pStatusBar,
unsigned short nID,
const ::rtl::OUString& aCommandURL );
-typedef SfxStatusBarControl* (*SfxStatusBarControlCtor)( USHORT nSlotId, USHORT nId, StatusBar &rStb );
+typedef SfxStatusBarControl* (*SfxStatusBarControlCtor)( sal_uInt16 nSlotId, sal_uInt16 nId, StatusBar &rStb );
struct SfxStbCtrlFactory
{
SfxStatusBarControlCtor pCtor;
TypeId nTypeId;
- USHORT nSlotId;
+ sal_uInt16 nSlotId;
SfxStbCtrlFactory( SfxStatusBarControlCtor pTheCtor,
- TypeId nTheTypeId, USHORT nTheSlotId ):
+ TypeId nTheTypeId, sal_uInt16 nTheSlotId ):
pCtor(pTheCtor),
nTypeId(nTheTypeId),
nSlotId(nTheSlotId)
@@ -69,8 +69,8 @@ class UserDrawEvent;
class SFX2_DLLPUBLIC SfxStatusBarControl: public svt::StatusbarController
{
- USHORT nSlotId;
- USHORT nId;
+ sal_uInt16 nSlotId;
+ sal_uInt16 nId;
StatusBar* pBar;
protected:
@@ -105,29 +105,29 @@ protected:
virtual void SAL_CALL doubleClick() throw (::com::sun::star::uno::RuntimeException);
// Old sfx2 interface
- virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
const SfxPoolItem* pState );
virtual void Click();
virtual void DoubleClick();
virtual void Command( const CommandEvent& rCEvt );
- virtual BOOL MouseButtonDown( const MouseEvent & );
- virtual BOOL MouseMove( const MouseEvent & );
- virtual BOOL MouseButtonUp( const MouseEvent & );
+ virtual sal_Bool MouseButtonDown( const MouseEvent & );
+ virtual sal_Bool MouseMove( const MouseEvent & );
+ virtual sal_Bool MouseButtonUp( const MouseEvent & );
virtual void Paint( const UserDrawEvent &rUDEvt );
- static USHORT convertAwtToVCLMouseButtons( sal_Int16 nAwtMouseButtons );
+ static sal_uInt16 convertAwtToVCLMouseButtons( sal_Int16 nAwtMouseButtons );
public:
- SfxStatusBarControl( USHORT nSlotID, USHORT nId, StatusBar& rBar );
+ SfxStatusBarControl( sal_uInt16 nSlotID, sal_uInt16 nId, StatusBar& rBar );
virtual ~SfxStatusBarControl();
- USHORT GetSlotId() const { return nSlotId; }
- USHORT GetId() const { return nId; }
+ sal_uInt16 GetSlotId() const { return nSlotId; }
+ sal_uInt16 GetId() const { return nId; }
StatusBar& GetStatusBar() const { return *pBar; }
void CaptureMouse();
void ReleaseMouse();
- static SfxStatusBarControl* CreateControl( USHORT nSlotID, USHORT nId, StatusBar *pBar, SfxModule* );
+ static SfxStatusBarControl* CreateControl( sal_uInt16 nSlotID, sal_uInt16 nId, StatusBar *pBar, SfxModule* );
static void RegisterStatusBarControl(SfxModule*, SfxStbCtrlFactory*);
};
@@ -135,13 +135,13 @@ public:
//------------------------------------------------------------------
#define SFX_DECL_STATUSBAR_CONTROL() \
- static SfxStatusBarControl* CreateImpl( USHORT nSlotId, USHORT nId, StatusBar &rStb ); \
- static void RegisterControl(USHORT nSlotId = 0, SfxModule *pMod=NULL)
+ static SfxStatusBarControl* CreateImpl( sal_uInt16 nSlotId, sal_uInt16 nId, StatusBar &rStb ); \
+ static void RegisterControl(sal_uInt16 nSlotId = 0, SfxModule *pMod=NULL)
#define SFX_IMPL_STATUSBAR_CONTROL(Class, nItemClass) \
- SfxStatusBarControl* Class::CreateImpl( USHORT nSlotId, USHORT nId, StatusBar &rStb ) \
+ SfxStatusBarControl* Class::CreateImpl( sal_uInt16 nSlotId, sal_uInt16 nId, StatusBar &rStb ) \
{ return new Class( nSlotId, nId, rStb ); } \
- void Class::RegisterControl(USHORT nSlotId, SfxModule *pMod) \
+ void Class::RegisterControl(sal_uInt16 nSlotId, SfxModule *pMod) \
{ SfxStatusBarControl::RegisterStatusBarControl( pMod, new SfxStbCtrlFactory( \
Class::CreateImpl, TYPE(nItemClass), nSlotId ) ); }
diff --git a/sfx2/inc/sfx2/styfitem.hxx b/sfx2/inc/sfx2/styfitem.hxx
index 5434daec054d..dd79ff6556f8 100644..100755
--- a/sfx2/inc/sfx2/styfitem.hxx
+++ b/sfx2/inc/sfx2/styfitem.hxx
@@ -39,7 +39,7 @@
struct SfxFilterTupel {
String aName;
- USHORT nFlags;
+ sal_uInt16 nFlags;
};
typedef ::std::vector< SfxFilterTupel* > SfxStyleFilter;
@@ -51,7 +51,7 @@ class SfxStyleFamilyItem: public Resource
Bitmap aBitmap;
String aText;
String aHelpText;
- USHORT nFamily;
+ sal_uInt16 nFamily;
SfxStyleFilter aFilterList;
public:
diff --git a/sfx2/inc/sfx2/styledlg.hxx b/sfx2/inc/sfx2/styledlg.hxx
index 3094964babbb..4d121edf0e24 100644..100755
--- a/sfx2/inc/sfx2/styledlg.hxx
+++ b/sfx2/inc/sfx2/styledlg.hxx
@@ -46,7 +46,7 @@ protected:
public:
#define ID_TABPAGE_MANAGESTYLES 1
SfxStyleDialog( Window* pParent, const ResId& rResId, SfxStyleSheetBase&,
- BOOL bFreeRes = TRUE, const String* pUserBtnTxt = 0 );
+ sal_Bool bFreeRes = sal_True, const String* pUserBtnTxt = 0 );
~SfxStyleDialog();
diff --git a/sfx2/inc/sfx2/tabdlg.hxx b/sfx2/inc/sfx2/tabdlg.hxx
index 01137af6831a..c426476cbf02 100644..100755
--- a/sfx2/inc/sfx2/tabdlg.hxx
+++ b/sfx2/inc/sfx2/tabdlg.hxx
@@ -58,7 +58,7 @@ class SfxBindings;
#endif /* !ENABLE_LAYOUT_SFX_TABDIALOG*/
typedef SfxTabPage* (*CreateTabPage)(Window *pParent, const SfxItemSet &rAttrSet);
-typedef USHORT* (*GetTabPageRanges)(); // liefert internationale Which-Wert
+typedef sal_uInt16* (*GetTabPageRanges)(); // liefert internationale Which-Wert
struct TabPageImpl;
class SfxUs_Impl;
@@ -80,10 +80,10 @@ class SFX2_DLLPUBLIC SfxTabDialogItem: public SfxSetItem
{
public:
TYPEINFO();
- SfxTabDialogItem( USHORT nId, const SfxItemSet& rItemSet );
+ SfxTabDialogItem( sal_uInt16 nId, const SfxItemSet& rItemSet );
SfxTabDialogItem(const SfxTabDialogItem& rAttr, SfxItemPool* pItemPool=NULL);
virtual SfxPoolItem* Clone(SfxItemPool* pToPool) const;
- virtual SfxPoolItem* Create(SvStream& rStream, USHORT nVersion) const;
+ virtual SfxPoolItem* Create(SvStream& rStream, sal_uInt16 nVersion) const;
};
class SFX2_DLLPUBLIC SfxTabDialog : public TabDialog
@@ -105,11 +105,11 @@ friend class SfxTabDialogController;
const SfxItemSet* pSet;
SfxItemSet* pOutSet;
TabDlg_Impl* pImpl;
- USHORT* pRanges;
+ sal_uInt16* pRanges;
sal_uInt32 nResId;
- USHORT nAppPageId;
- BOOL bItemsReset;
- BOOL bFmt;
+ sal_uInt16 nAppPageId;
+ sal_Bool bItemsReset;
+ sal_Bool bFmt;
DECL_DLLPRIVATE_LINK( ActivatePageHdl, TabControl * );
DECL_DLLPRIVATE_LINK( DeactivatePageHdl, TabControl * );
@@ -118,80 +118,80 @@ friend class SfxTabDialogController;
DECL_DLLPRIVATE_LINK( BaseFmtHdl, Button * );
DECL_DLLPRIVATE_LINK( UserHdl, Button * );
DECL_DLLPRIVATE_LINK( CancelHdl, Button * );
- SAL_DLLPRIVATE void Init_Impl(BOOL, const String *);
+ SAL_DLLPRIVATE void Init_Impl(sal_Bool, const String *);
protected:
virtual short Ok();
// wird im Sfx gel"oscht!
- virtual SfxItemSet* CreateInputItemSet( USHORT nId );
+ virtual SfxItemSet* CreateInputItemSet( sal_uInt16 nId );
// wird *nicht* im Sfx gel"oscht!
virtual const SfxItemSet* GetRefreshedSet();
- virtual void PageCreated( USHORT nId, SfxTabPage &rPage );
+ virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
virtual long Notify( NotifyEvent& rNEvt );
SfxItemSet* pExampleSet;
SfxItemSet* GetInputSetImpl();
- SfxTabPage* GetTabPage( USHORT nPageId ) const;
+ SfxTabPage* GetTabPage( sal_uInt16 nPageId ) const;
- BOOL IsInOK() const;
+ sal_Bool IsInOK() const;
/** prepare to leace the current page. Calls the DeactivatePage method of the current page, (if necessary),
handles the item sets to copy.
- @return TRUE if it is allowed to leave the current page, FALSE otherwise
+ @return sal_True if it is allowed to leave the current page, sal_False otherwise
*/
bool PrepareLeaveCurrentPage();
public:
- SfxTabDialog( Window* pParent, const ResId &rResId, USHORT nSetId, SfxBindings& rBindings,
- BOOL bEditFmt = FALSE, const String *pUserButtonText = 0 );
+ SfxTabDialog( Window* pParent, const ResId &rResId, sal_uInt16 nSetId, SfxBindings& rBindings,
+ sal_Bool bEditFmt = sal_False, const String *pUserButtonText = 0 );
SfxTabDialog( Window* pParent, const ResId &rResId, const SfxItemSet * = 0,
- BOOL bEditFmt = FALSE, const String *pUserButtonText = 0 );
+ sal_Bool bEditFmt = sal_False, const String *pUserButtonText = 0 );
SfxTabDialog( SfxViewFrame *pViewFrame, Window* pParent, const ResId &rResId,
- const SfxItemSet * = 0, BOOL bEditFmt = FALSE,
+ const SfxItemSet * = 0, sal_Bool bEditFmt = sal_False,
const String *pUserButtonText = 0 );
~SfxTabDialog();
- void AddTabPage( USHORT nId,
+ void AddTabPage( sal_uInt16 nId,
CreateTabPage pCreateFunc, // != 0
GetTabPageRanges pRangesFunc, // darf 0 sein
- BOOL bItemsOnDemand = FALSE);
- void AddTabPage( USHORT nId,
+ sal_Bool bItemsOnDemand = sal_False);
+ void AddTabPage( sal_uInt16 nId,
const String &rRiderText,
CreateTabPage pCreateFunc, // != 0
GetTabPageRanges pRangesFunc, // darf 0 sein
- BOOL bItemsOnDemand = FALSE,
- USHORT nPos = TAB_APPEND);
- void AddTabPage( USHORT nId,
+ sal_Bool bItemsOnDemand = sal_False,
+ sal_uInt16 nPos = TAB_APPEND);
+ void AddTabPage( sal_uInt16 nId,
const Bitmap &rRiderBitmap,
CreateTabPage pCreateFunc, // != 0
GetTabPageRanges pRangesFunc, // darf 0 sein
- BOOL bItemsOnDemand = FALSE,
- USHORT nPos = TAB_APPEND);
+ sal_Bool bItemsOnDemand = sal_False,
+ sal_uInt16 nPos = TAB_APPEND);
- void AddTabPage( USHORT nId,
- BOOL bItemsOnDemand = FALSE);
- void AddTabPage( USHORT nId,
+ void AddTabPage( sal_uInt16 nId,
+ sal_Bool bItemsOnDemand = sal_False);
+ void AddTabPage( sal_uInt16 nId,
const String &rRiderText,
- BOOL bItemsOnDemand = FALSE,
- USHORT nPos = TAB_APPEND);
- void AddTabPage( USHORT nId,
+ sal_Bool bItemsOnDemand = sal_False,
+ sal_uInt16 nPos = TAB_APPEND);
+ void AddTabPage( sal_uInt16 nId,
const Bitmap &rRiderBitmap,
- BOOL bItemsOnDemand = FALSE,
- USHORT nPos = TAB_APPEND);
+ sal_Bool bItemsOnDemand = sal_False,
+ sal_uInt16 nPos = TAB_APPEND);
- void RemoveTabPage( USHORT nId );
+ void RemoveTabPage( sal_uInt16 nId );
- void SetCurPageId( USHORT nId ) { nAppPageId = nId; }
- USHORT GetCurPageId() const
+ void SetCurPageId( sal_uInt16 nId ) { nAppPageId = nId; }
+ sal_uInt16 GetCurPageId() const
{ return aTabCtrl.GetCurPageId(); }
- void ShowPage( USHORT nId );
+ void ShowPage( sal_uInt16 nId );
// liefert ggf. per Map konvertierte lokale Slots
- const USHORT* GetInputRanges( const SfxItemPool& );
+ const sal_uInt16* GetInputRanges( const SfxItemPool& );
void SetInputSet( const SfxItemSet* pInSet );
const SfxItemSet* GetOutputItemSet() const { return pOutSet; }
- const SfxItemSet* GetOutputItemSet( USHORT nId ) const;
+ const SfxItemSet* GetOutputItemSet( sal_uInt16 nId ) const;
int FillOutputItemSet();
- BOOL IsFormat() const { return bFmt; }
+ sal_Bool IsFormat() const { return bFmt; }
const OKButton& GetOKButton() const { return aOKBtn; }
OKButton& GetOKButton() { return aOKBtn; }
@@ -211,7 +211,7 @@ public:
short Execute();
void StartExecuteModal( const Link& rEndDialogHdl );
- void Start( BOOL bShow = TRUE );
+ void Start( sal_Bool bShow = sal_True );
#if !ENABLE_LAYOUT_SFX_TABDIALOG
const SfxItemSet* GetExampleSet() const { return pExampleSet; }
@@ -220,13 +220,13 @@ public:
#endif /* ENABLE_LAYOUT_SFX_TABDIALOG */
SfxViewFrame* GetViewFrame() const { return pFrame; }
- void EnableApplyButton(BOOL bEnable = TRUE);
- BOOL IsApplyButtonEnabled() const;
+ void EnableApplyButton(sal_Bool bEnable = sal_True);
+ sal_Bool IsApplyButtonEnabled() const;
void SetApplyHandler(const Link& _rHdl);
Link GetApplyHandler() const;
SAL_DLLPRIVATE void Start_Impl();
- SAL_DLLPRIVATE BOOL OK_Impl() { return PrepareLeaveCurrentPage(); }
+ SAL_DLLPRIVATE sal_Bool OK_Impl() { return PrepareLeaveCurrentPage(); }
};
END_NAMESPACE_LAYOUT_SFX_TABDIALOG
@@ -249,7 +249,7 @@ friend class SfxTabDialog;
private:
const SfxItemSet* pSet;
String aUserString;
- BOOL bHasExchangeSupport;
+ sal_Bool bHasExchangeSupport;
SfxTabDialog* pTabDlg;
TabPageImpl* pImpl;
@@ -260,12 +260,12 @@ protected:
SfxTabPage( Window *pParent, const ResId &, const SfxItemSet &rAttrSet );
SfxTabPage( Window *pParent, WinBits nStyle, const SfxItemSet &rAttrSet );
- USHORT GetSlot( USHORT nWhich ) const
+ sal_uInt16 GetSlot( sal_uInt16 nWhich ) const
{ return pSet->GetPool()->GetSlotId( nWhich ); }
- USHORT GetWhich( USHORT nSlot, sal_Bool bDeep = sal_True ) const
+ sal_uInt16 GetWhich( sal_uInt16 nSlot, sal_Bool bDeep = sal_True ) const
{ return pSet->GetPool()->GetWhich( nSlot, bDeep ); }
- const SfxPoolItem* GetOldItem( const SfxItemSet& rSet, USHORT nSlot, sal_Bool bDeep = sal_True );
- const SfxPoolItem* GetExchangeItem( const SfxItemSet& rSet, USHORT nSlot );
+ const SfxPoolItem* GetOldItem( const SfxItemSet& rSet, sal_uInt16 nSlot, sal_Bool bDeep = sal_True );
+ const SfxPoolItem* GetExchangeItem( const SfxItemSet& rSet, sal_uInt16 nSlot );
SfxTabDialog* GetTabDialog() const { return pTabDlg; }
void AddItemConnection( sfx::ItemConnectionBase* pConnection );
@@ -275,12 +275,12 @@ public:
const SfxItemSet& GetItemSet() const { return *pSet; }
- virtual BOOL FillItemSet( SfxItemSet& );
+ virtual sal_Bool FillItemSet( SfxItemSet& );
virtual void Reset( const SfxItemSet& );
- BOOL HasExchangeSupport() const
+ sal_Bool HasExchangeSupport() const
{ return bHasExchangeSupport; }
- void SetExchangeSupport( BOOL bNew = TRUE )
+ void SetExchangeSupport( sal_Bool bNew = sal_True )
{ bHasExchangeSupport = bNew; }
enum sfxpg {
@@ -301,9 +301,9 @@ public:
{ aUserString = rString; }
String GetUserData() { return aUserString; }
virtual void FillUserData();
- virtual BOOL IsReadOnly() const;
+ virtual sal_Bool IsReadOnly() const;
virtual void PageCreated (SfxAllItemSet aSet);
- static const SfxPoolItem* GetItem( const SfxItemSet& rSet, USHORT nSlot, sal_Bool bDeep = sal_True );
+ static const SfxPoolItem* GetItem( const SfxItemSet& rSet, sal_uInt16 nSlot, sal_Bool bDeep = sal_True );
void SetFrame(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame);
::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > GetFrame();
diff --git a/sfx2/inc/sfx2/taskpane.hxx b/sfx2/inc/sfx2/taskpane.hxx
index 1086efde6fd9..f80b66c4d0ee 100644..100755
--- a/sfx2/inc/sfx2/taskpane.hxx
+++ b/sfx2/inc/sfx2/taskpane.hxx
@@ -66,7 +66,7 @@ namespace sfx2
public:
TaskPaneWrapper(
Window* i_pParent,
- USHORT i_nId,
+ sal_uInt16 i_nId,
SfxBindings* i_pBindings,
SfxChildWinInfo* i_pInfo
);
diff --git a/sfx2/inc/sfx2/tbxctrl.hxx b/sfx2/inc/sfx2/tbxctrl.hxx
index caa17a247694..3051f3ed188f 100644..100755
--- a/sfx2/inc/sfx2/tbxctrl.hxx
+++ b/sfx2/inc/sfx2/tbxctrl.hxx
@@ -56,16 +56,16 @@ class SfxUnoControllerItem;
svt::ToolboxController* SAL_CALL SfxToolBoxControllerFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, ToolBox* pToolbox, unsigned short nID, const ::rtl::OUString& aCommandURL );
-typedef SfxToolBoxControl* (*SfxToolBoxControlCtor)( USHORT nSlotId, USHORT nId, ToolBox& rBox );
+typedef SfxToolBoxControl* (*SfxToolBoxControlCtor)( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rBox );
struct SfxTbxCtrlFactory
{
SfxToolBoxControlCtor pCtor;
TypeId nTypeId;
- USHORT nSlotId;
+ sal_uInt16 nSlotId;
SfxTbxCtrlFactory( SfxToolBoxControlCtor pTheCtor,
- TypeId nTheTypeId, USHORT nTheSlotId ):
+ TypeId nTheTypeId, sal_uInt16 nTheSlotId ):
pCtor(pTheCtor),
nTypeId(nTheTypeId),
nSlotId(nTheSlotId)
@@ -112,11 +112,11 @@ class SfxFrameStatusListener : public svt::FrameStatusListener
class SFX2_DLLPUBLIC SfxPopupWindow: public FloatingWindow, public SfxStatusListenerInterface
{
friend class SfxToolBox_Impl;
- BOOL m_bFloating;
- ULONG m_nEventId;
- BOOL m_bCascading;
+ sal_Bool m_bFloating;
+ sal_uIntPtr m_nEventId;
+ sal_Bool m_bCascading;
Link m_aDeleteLink;
- USHORT m_nId;
+ sal_uInt16 m_nId;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xFrame;
SfxFrameStatusListener* m_pStatusListener;
::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > m_xStatusListener;
@@ -131,10 +131,10 @@ private:
protected:
virtual void PopupModeEnd();
- virtual BOOL Close();
+ virtual sal_Bool Close();
virtual void DeleteFloatingWindow();
- USHORT GetId() const { return m_nId; }
+ sal_uInt16 GetId() const { return m_nId; }
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& GetFrame() const { return m_xFrame; }
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& GetServiceManager() const { return m_xServiceManager; }
@@ -146,21 +146,21 @@ protected:
// SfxStatusListenerInterface
using FloatingWindow::StateChanged;
- virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
const SfxPoolItem* pState );
public:
- SfxPopupWindow( USHORT nId,
+ SfxPopupWindow( sal_uInt16 nId,
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,
WinBits nBits );
- SfxPopupWindow( USHORT nId,
+ SfxPopupWindow( sal_uInt16 nId,
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,
const ResId &rId );
- SfxPopupWindow( USHORT nId,
+ SfxPopupWindow( sal_uInt16 nId,
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,
Window* pParentWindow,
const ResId &rId );
- SfxPopupWindow( USHORT nId,
+ SfxPopupWindow( sal_uInt16 nId,
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,
Window* pParentWindow,
WinBits nBits );
@@ -181,8 +181,8 @@ public:
//------------------------------------------------------------------
#define SFX_DECL_TOOLBOX_CONTROL() \
- static SfxToolBoxControl* CreateImpl( USHORT nSlotId, USHORT nId, ToolBox &rTbx ); \
- static void RegisterControl(USHORT nSlotId = 0, SfxModule *pMod=NULL)
+ static SfxToolBoxControl* CreateImpl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox &rTbx ); \
+ static void RegisterControl(sal_uInt16 nSlotId = 0, SfxModule *pMod=NULL)
/* F"ur spezielle ToolBox-Controls, z.B. eine Font-Auswahl-Box oder
aus ToolBoxen abrei"sbare FloatingWindows mu"s passend zur Item-Subclass
@@ -214,9 +214,9 @@ protected:
DECL_LINK( ClosePopupWindow, SfxPopupWindow * );
// old SfxToolBoxControl methods
- virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState );
- virtual void Select( BOOL bMod1 = FALSE );
- virtual void Select( USHORT nModifier );
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState );
+ virtual void Select( sal_Bool bMod1 = sal_False );
+ virtual void Select( sal_uInt16 nModifier );
virtual void DoubleClick();
virtual void Click();
@@ -279,7 +279,7 @@ protected:
public:
SFX_DECL_TOOLBOX_CONTROL();
- SfxToolBoxControl( USHORT nSlotID, USHORT nId, ToolBox& rBox, BOOL bShowStrings = FALSE );
+ SfxToolBoxControl( sal_uInt16 nSlotID, sal_uInt16 nId, ToolBox& rBox, sal_Bool bShowStrings = sal_False );
virtual ~SfxToolBoxControl();
ToolBox& GetToolBox() const;
@@ -293,21 +293,21 @@ public:
::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgs );
static SfxItemState GetItemState( const SfxPoolItem* pState );
- static SfxToolBoxControl* CreateControl( USHORT nSlotId, USHORT nTbxId, ToolBox *pBox, SfxModule *pMod );
+ static SfxToolBoxControl* CreateControl( sal_uInt16 nSlotId, sal_uInt16 nTbxId, ToolBox *pBox, SfxModule *pMod );
static void RegisterToolBoxControl( SfxModule*, SfxTbxCtrlFactory*);
};
#define SFX_IMPL_TOOLBOX_CONTROL(Class, nItemClass) \
- SfxToolBoxControl* Class::CreateImpl( USHORT nSlotId, USHORT nId, ToolBox &rTbx ) \
+ SfxToolBoxControl* Class::CreateImpl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox &rTbx ) \
{ return new Class( nSlotId, nId, rTbx ); } \
- void Class::RegisterControl(USHORT nSlotId, SfxModule *pMod) \
+ void Class::RegisterControl(sal_uInt16 nSlotId, SfxModule *pMod) \
{ SfxToolBoxControl::RegisterToolBoxControl( pMod, new SfxTbxCtrlFactory( \
Class::CreateImpl, TYPE(nItemClass), nSlotId ) ); }
#define SFX_IMPL_TOOLBOX_CONTROL_ARG(Class, nItemClass, Arg) \
- SfxToolBoxControl* Class::CreateImpl( USHORT nSlotId, USHORT nId, ToolBox &rTbx ) \
+ SfxToolBoxControl* Class::CreateImpl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox &rTbx ) \
{ return new Class( nSlotId, nId, rTbx, Arg); } \
- void Class::RegisterControl(USHORT nSlotId, SfxModule *pMod) \
+ void Class::RegisterControl(sal_uInt16 nSlotId, SfxModule *pMod) \
{ SfxToolBoxControl::RegisterToolBoxControl( pMod, new SfxTbxCtrlFactory( \
Class::CreateImpl, TYPE(nItemClass), nSlotId ) ); }
@@ -328,10 +328,10 @@ class SfxDragToolBoxControl_Impl : public SfxToolBoxControl
{
public:
SFX_DECL_TOOLBOX_CONTROL();
- SfxDragToolBoxControl_Impl( USHORT nId, ToolBox& rBox );
+ SfxDragToolBoxControl_Impl( sal_uInt16 nId, ToolBox& rBox );
virtual Window* CreateItemWindow( Window *pParent );
using SfxToolBoxControl::Select;
- virtual void Select( BOOL bMod1 = FALSE );
+ virtual void Select( sal_Bool bMod1 = sal_False );
};
//------------------------------------------------------------------------
@@ -347,7 +347,7 @@ class SfxAppToolBoxControl_Impl : public SfxToolBoxControl
{
public:
SFX_DECL_TOOLBOX_CONTROL();
- SfxAppToolBoxControl_Impl( USHORT nSlotId, USHORT nId, ToolBox& rBox );
+ SfxAppToolBoxControl_Impl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rBox );
~SfxAppToolBoxControl_Impl();
void SetImage( const String& rFacName );
@@ -363,16 +363,16 @@ public:
protected:
virtual void Click();
using SfxToolBoxControl::Select;
- virtual void Select( BOOL );
- virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState );
+ virtual void Select( sal_Bool );
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState );
virtual SfxPopupWindow* CreatePopupWindow();
DECL_LINK( Activate, Menu * );
private:
String aLastURL;
- BOOL bBigImages;
+ sal_Bool bBigImages;
PopupMenu* pMenu;
- ULONG m_nSymbolsStyle;
- BOOL m_bShowMenuImages;
+ sal_uIntPtr m_nSymbolsStyle;
+ sal_Bool m_bShowMenuImages;
};
class SfxHistoryToolBoxControl_Impl : public SfxToolBoxControl
@@ -385,22 +385,22 @@ private:
protected:
virtual void Click( );
using SfxToolBoxControl::Select;
- virtual void Select( BOOL );
+ virtual void Select( sal_Bool );
public:
SFX_DECL_TOOLBOX_CONTROL();
- SfxHistoryToolBoxControl_Impl( USHORT nId, ToolBox& rBox );
+ SfxHistoryToolBoxControl_Impl( sal_uInt16 nId, ToolBox& rBox );
};
class SfxReloadToolBoxControl_Impl : public SfxToolBoxControl
{
protected:
using SfxToolBoxControl::Select;
- virtual void Select( USHORT nSelectModifier );
+ virtual void Select( sal_uInt16 nSelectModifier );
public:
SFX_DECL_TOOLBOX_CONTROL();
- SfxReloadToolBoxControl_Impl( USHORT nSlotId, USHORT nId, ToolBox& rBox );
+ SfxReloadToolBoxControl_Impl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rBox );
};
class SfxPopupMenuManager;
@@ -413,19 +413,19 @@ class SfxAddonsToolBoxControl_Impl : public SfxToolBoxControl
*/
{
- BOOL bBigImages;
+ sal_Bool bBigImages;
PopupMenu* pMenu;
- BOOL m_bShowMenuImages;
+ sal_Bool m_bShowMenuImages;
protected:
virtual void Click();
using SfxToolBoxControl::Select;
- virtual void Select( BOOL );
- virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState );
+ virtual void Select( sal_Bool );
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState );
DECL_LINK( Activate, Menu * );
public:
SFX_DECL_TOOLBOX_CONTROL();
- SfxAddonsToolBoxControl_Impl( USHORT nSlotId, USHORT nId, ToolBox& rBox );
+ SfxAddonsToolBoxControl_Impl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rBox );
~SfxAddonsToolBoxControl_Impl();
void RefreshMenuImages( Menu* pMenu );
diff --git a/sfx2/inc/sfx2/templdlg.hxx b/sfx2/inc/sfx2/templdlg.hxx
index 22303fda3a21..e235e760698c 100644..100755
--- a/sfx2/inc/sfx2/templdlg.hxx
+++ b/sfx2/inc/sfx2/templdlg.hxx
@@ -93,7 +93,7 @@ class SFX2_DLLPUBLIC SfxTemplateDialogWrapper : public SfxChildWindow
{
public:
SfxTemplateDialogWrapper
- (Window*,USHORT,SfxBindings*,SfxChildWinInfo*);
+ (Window*,sal_uInt16,SfxBindings*,SfxChildWinInfo*);
SFX_DECL_CHILDWINDOW(SfxTemplateDialogWrapper);
void SetParagraphFamily();
diff --git a/sfx2/inc/sfx2/titledockwin.hxx b/sfx2/inc/sfx2/titledockwin.hxx
index b8606a84a836..8b03be062387 100644..100755
--- a/sfx2/inc/sfx2/titledockwin.hxx
+++ b/sfx2/inc/sfx2/titledockwin.hxx
@@ -77,7 +77,7 @@ namespace sfx2
@return
the ID of the newly created toolbox item
*/
- USHORT AddDropDownToolBoxItem( const String& i_rItemText, ULONG i_nHelpId, const Link& i_rCallback )
+ sal_uInt16 AddDropDownToolBoxItem( const String& i_rItemText, const rtl::OString& i_nHelpId, const Link& i_rCallback )
{
return impl_addDropDownToolBoxItem( i_rItemText, i_nHelpId, i_rCallback );
}
@@ -101,6 +101,11 @@ namespace sfx2
ToolBox& GetToolBox() { return m_aToolbox; }
const ToolBox& GetToolBox() const { return m_aToolbox; }
+ /** Return the border that is painted around the inner window as
+ decoration.
+ */
+ SvBorder GetDecorationBorder (void) const { return m_aBorder; }
+
protected:
// Window overridables
virtual void Paint( const Rectangle& i_rArea );
@@ -110,7 +115,7 @@ namespace sfx2
virtual void SetText( const String& i_rText );
// DockingWindow overridables
- void EndDocking( const Rectangle& rRect, BOOL bFloatMode );
+ void EndDocking( const Rectangle& rRect, sal_Bool bFloatMode );
// own overridables
virtual void onLayoutDone();
@@ -122,7 +127,7 @@ namespace sfx2
/** internal version of AddDropDownToolBoxItem
*/
- USHORT impl_addDropDownToolBoxItem( const String& i_rItemText, ULONG i_nHelpId, const Link& i_rCallback );
+ sal_uInt16 impl_addDropDownToolBoxItem( const String& i_rItemText, const rtl::OString& i_nHelpId, const Link& i_rCallback );
/** returns the current title.
@@ -154,6 +159,11 @@ namespace sfx2
since the last Paint().
*/
bool m_bLayoutPending;
+
+ /** Height of the title bar. Calculated in impl_layout().
+ */
+ int m_nTitleBarHeight;
+
};
//......................................................................................................................
diff --git a/sfx2/inc/tplpitem.hxx b/sfx2/inc/sfx2/tplpitem.hxx
index 2821bba00419..c8c9765be13c 100644..100755
--- a/sfx2/inc/tplpitem.hxx
+++ b/sfx2/inc/sfx2/tplpitem.hxx
@@ -40,18 +40,18 @@ class SFX2_DLLPUBLIC SfxTemplateItem: public SfxFlagItem
public:
TYPEINFO();
SfxTemplateItem();
- SfxTemplateItem( USHORT nWhich,
+ SfxTemplateItem( sal_uInt16 nWhich,
const String &rStyle,
- USHORT nMask = 0xffff );
+ sal_uInt16 nMask = 0xffff );
SfxTemplateItem( const SfxTemplateItem& );
const String& GetStyleName() const { return aStyle; }
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual int operator==( const SfxPoolItem& ) const;
- virtual BYTE GetFlagCount() const;
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ virtual sal_uInt8 GetFlagCount() const;
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
};
#endif
diff --git a/sfx2/inc/sfx2/unoctitm.hxx b/sfx2/inc/sfx2/unoctitm.hxx
index d1fcf169046b..d1fcf169046b 100644..100755
--- a/sfx2/inc/sfx2/unoctitm.hxx
+++ b/sfx2/inc/sfx2/unoctitm.hxx
diff --git a/sfx2/inc/sfx2/userinputinterception.hxx b/sfx2/inc/sfx2/userinputinterception.hxx
index 4f7311125bd3..4f7311125bd3 100644..100755
--- a/sfx2/inc/sfx2/userinputinterception.hxx
+++ b/sfx2/inc/sfx2/userinputinterception.hxx
diff --git a/sfx2/inc/viewfac.hxx b/sfx2/inc/sfx2/viewfac.hxx
index 2cf735cb304c..da4d7902c30a 100644..100755
--- a/sfx2/inc/viewfac.hxx
+++ b/sfx2/inc/sfx2/viewfac.hxx
@@ -45,13 +45,12 @@ class SFX2_DLLPUBLIC SfxViewFactory
{
public:
SfxViewFactory( SfxViewCtor fnC, SfxViewInit fnI,
- USHORT nOrdinal, const sal_Char* asciiViewName );
+ sal_uInt16 nOrdinal, const sal_Char* asciiViewName );
~SfxViewFactory();
SfxViewShell *CreateInstance(SfxViewFrame *pViewFrame, SfxViewShell *pOldSh);
void InitFactory();
-
- USHORT GetOrdinal() const { return nOrd; }
+ sal_uInt16 GetOrdinal() const { return nOrd; }
/// returns a legacy view name. This is "view" with an appended ordinal/ID.
String GetLegacyViewName() const;
@@ -66,7 +65,7 @@ public:
private:
SfxViewCtor fnCreate;
SfxViewInit fnInit;
- USHORT nOrd;
+ sal_uInt16 nOrd;
const String m_sViewName;
};
diff --git a/sfx2/inc/sfx2/viewfrm.hxx b/sfx2/inc/sfx2/viewfrm.hxx
index 327c54cd301d..f450e0108690 100644..100755
--- a/sfx2/inc/sfx2/viewfrm.hxx
+++ b/sfx2/inc/sfx2/viewfrm.hxx
@@ -81,7 +81,7 @@ class SFX2_DLLPUBLIC SfxViewFrame: public SfxShell, public SfxListener
SfxObjectShellRef xObjSh;
SfxDispatcher* pDispatcher;
SfxBindings* pBindings;
- USHORT nAdjustPosPixelLock;
+ sal_uInt16 nAdjustPosPixelLock;
private:
#ifndef _SFX_HXX
@@ -105,21 +105,21 @@ public:
static void SetViewFrame( SfxViewFrame* );
- 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* LoadHiddenDocument( SfxObjectShell& i_rDoc, const sal_uInt16 i_nViewId );
+ static SfxViewFrame* LoadDocument( SfxObjectShell& i_rDoc, const sal_uInt16 i_nViewId );
+ static SfxViewFrame* LoadDocumentIntoFrame( SfxObjectShell& i_rDoc, const SfxFrameItem* i_pFrameItem, const sal_uInt16 i_nViewId = 0 );
+ static SfxViewFrame* LoadDocumentIntoFrame( SfxObjectShell& i_rDoc, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rFrameItem, const sal_uInt16 i_nViewId = 0 );
+ static SfxViewFrame* DisplayNewDocument( SfxObjectShell& i_rDoc, const SfxRequest& i_rCreateDocRequest, const sal_uInt16 i_nViewId = 0 );
static SfxViewFrame* Current();
- 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* GetFirst( const SfxObjectShell* pDoc = 0, sal_Bool bOnlyVisible = sal_True );
+ static SfxViewFrame* GetNext( const SfxViewFrame& rPrev, const SfxObjectShell* pDoc = 0, sal_Bool bOnlyVisible = sal_True );
+ static sal_uInt16 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);
+ void DoActivate(sal_Bool bMDI, SfxViewFrame *pOld=NULL);
+ void DoDeactivate(sal_Bool bMDI, SfxViewFrame *pOld=NULL);
SfxViewFrame* GetParentViewFrame() const;
@@ -148,12 +148,12 @@ public:
const Point &rPos, const Size &rSize );
void Hide();
void Show();
- BOOL IsVisible() const;
+ sal_Bool IsVisible() const;
void ToTop();
- void Enable( BOOL bEnable );
- virtual BOOL Close();
- virtual void Activate( BOOL bUI );
- virtual void Deactivate( BOOL bUI );
+ void Enable( sal_Bool bEnable );
+ virtual sal_Bool Close();
+ virtual void Activate( sal_Bool bUI );
+ virtual void Deactivate( sal_Bool bUI );
// DDE-Interface
virtual long DdeExecute( const String& rCmd );
@@ -173,17 +173,17 @@ public:
static void ActivateToolPanel( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rFrame, const ::rtl::OUString& i_rPanelURL );
// interne Handler
- SAL_DLLPRIVATE virtual BOOL SetBorderPixelImpl( const SfxViewShell *pSh, const SvBorder &rBorder );
+ SAL_DLLPRIVATE virtual sal_Bool SetBorderPixelImpl( const SfxViewShell *pSh, const SvBorder &rBorder );
SAL_DLLPRIVATE virtual const SvBorder& GetBorderPixelImpl( const SfxViewShell *pSh ) const;
SAL_DLLPRIVATE virtual void InvalidateBorderImpl( const SfxViewShell *pSh );
virtual SfxObjectShell* GetObjectShell();
- USHORT GetCurViewId() const;
+ sal_uInt16 GetCurViewId() const;
SfxFrame& GetFrame() const;
SfxViewFrame* GetTopViewFrame() const;
- BOOL DoClose();
- ULONG GetFrameType() const
+ sal_Bool DoClose();
+ sal_uIntPtr GetFrameType() const
{ return GetFrame().GetFrameType(); }
SfxFrame& GetTopFrame() const
{ return GetFrame().GetTopFrame(); }
@@ -192,46 +192,46 @@ public:
void CancelTransfers()
{ GetFrame().CancelTransfers(); }
- void SetModalMode( BOOL );
- BOOL IsInModalMode() const;
- void Resize(BOOL bForce=FALSE);
-
- //void SetChildWindow(USHORT nId, BOOL bVisible );
- void SetChildWindow(USHORT nId, BOOL bVisible, BOOL bSetFocus=TRUE);
- void ToggleChildWindow(USHORT);
- BOOL HasChildWindow(USHORT);
- BOOL KnowsChildWindow(USHORT);
- void ShowChildWindow(USHORT,BOOL bVisible=TRUE);
- SfxChildWindow* GetChildWindow(USHORT);
+ void SetModalMode( sal_Bool );
+ sal_Bool IsInModalMode() const;
+ void Resize(sal_Bool bForce=sal_False);
+
+ //void SetChildWindow(sal_uInt16 nId, sal_Bool bVisible );
+ void SetChildWindow(sal_uInt16 nId, sal_Bool bVisible, sal_Bool bSetFocus=sal_True);
+ void ToggleChildWindow(sal_uInt16);
+ sal_Bool HasChildWindow(sal_uInt16);
+ sal_Bool KnowsChildWindow(sal_uInt16);
+ void ShowChildWindow(sal_uInt16,sal_Bool bVisible=sal_True);
+ SfxChildWindow* GetChildWindow(sal_uInt16);
void ChildWindowExecute(SfxRequest&);
void ChildWindowState(SfxItemSet&);
SAL_DLLPRIVATE void SetDowning_Impl();
SAL_DLLPRIVATE void GetDocNumber_Impl();
- SAL_DLLPRIVATE BOOL IsDowning_Impl() const;
+ SAL_DLLPRIVATE sal_Bool IsDowning_Impl() const;
SAL_DLLPRIVATE void SetViewShell_Impl( SfxViewShell *pVSh );
SAL_DLLPRIVATE void ReleaseObjectShell_Impl();
SAL_DLLPRIVATE void GetState_Impl( SfxItemSet &rSet );
SAL_DLLPRIVATE void ExecReload_Impl( SfxRequest &rReq );
- SAL_DLLPRIVATE void ExecReload_Impl( SfxRequest &rReq, BOOL bAsync );
+ SAL_DLLPRIVATE void ExecReload_Impl( SfxRequest &rReq, sal_Bool bAsync );
SAL_DLLPRIVATE void StateReload_Impl( SfxItemSet &rSet );
SAL_DLLPRIVATE void ExecView_Impl( SfxRequest &rReq );
SAL_DLLPRIVATE void StateView_Impl( SfxItemSet &rSet );
SAL_DLLPRIVATE void ExecHistory_Impl( SfxRequest &rReq );
SAL_DLLPRIVATE void StateHistory_Impl( SfxItemSet &rSet );
SAL_DLLPRIVATE SfxViewFrame* GetParentViewFrame_Impl() const;
- SAL_DLLPRIVATE void ForceOuterResize_Impl(BOOL bOn=TRUE);
- SAL_DLLPRIVATE BOOL IsResizeInToOut_Impl() const;
- SAL_DLLPRIVATE BOOL IsAdjustPosSizePixelLocked_Impl() const
+ SAL_DLLPRIVATE void ForceOuterResize_Impl(sal_Bool bOn=sal_True);
+ SAL_DLLPRIVATE sal_Bool IsResizeInToOut_Impl() const;
+ SAL_DLLPRIVATE sal_Bool IsAdjustPosSizePixelLocked_Impl() const
{ return nAdjustPosPixelLock != 0; }
- SAL_DLLPRIVATE void ForceInnerResize_Impl( BOOL bOn );
+ SAL_DLLPRIVATE void ForceInnerResize_Impl( sal_Bool bOn );
SAL_DLLPRIVATE void UpdateDocument_Impl();
- SAL_DLLPRIVATE void LockObjectShell_Impl(BOOL bLock=TRUE);
+ SAL_DLLPRIVATE void LockObjectShell_Impl(sal_Bool bLock=sal_True);
- SAL_DLLPRIVATE void MakeActive_Impl( BOOL bActivate );
- SAL_DLLPRIVATE void SetQuietMode_Impl( BOOL );
+ SAL_DLLPRIVATE void MakeActive_Impl( sal_Bool bActivate );
+ SAL_DLLPRIVATE void SetQuietMode_Impl( sal_Bool );
SAL_DLLPRIVATE const Size& GetMargin_Impl() const;
SAL_DLLPRIVATE void SetActiveChildFrame_Impl( SfxViewFrame* );
SAL_DLLPRIVATE SfxViewFrame* GetActiveChildFrame_Impl() const;
@@ -239,20 +239,20 @@ public:
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 SfxWorkWindow* GetWorkWindow_Impl( sal_uInt16 nId );
SAL_DLLPRIVATE void AddDispatchMacroToBasic_Impl(const ::rtl::OUString& sMacro);
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 );
+ SAL_DLLPRIVATE void SetCurViewId_Impl( const sal_uInt16 i_nID );
SAL_DLLPRIVATE void ActivateToolPanel_Impl( const ::rtl::OUString& i_rPanelURL );
private:
- SAL_DLLPRIVATE BOOL SwitchToViewShell_Impl( USHORT nNo, BOOL bIsIndex = FALSE );
+ SAL_DLLPRIVATE sal_Bool SwitchToViewShell_Impl( sal_uInt16 nNo, sal_Bool bIsIndex = sal_False );
SAL_DLLPRIVATE void PopShellAndSubShells_Impl( SfxViewShell& i_rViewShell );
- SAL_DLLPRIVATE void SaveCurrentViewData_Impl( const USHORT i_nNewViewId );
+ SAL_DLLPRIVATE void SaveCurrentViewData_Impl( const sal_uInt16 i_nNewViewId );
/** loads the given existing document into the given frame
@@ -275,7 +275,7 @@ private:
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 sal_uInt16 i_nViewId,
const bool i_bHidden
);
@@ -297,7 +297,7 @@ private:
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 sal_uInt16 i_nViewId,
const bool i_bHidden
);
};
@@ -314,7 +314,7 @@ public:
SfxPoolItem( 0 ),
pFrame( pViewFrame)
{}
- SfxViewFrameItem( USHORT nWhichId, SfxViewFrame *pViewFrame ):
+ SfxViewFrameItem( sal_uInt16 nWhichId, SfxViewFrame *pViewFrame ):
SfxPoolItem( nWhichId ),
pFrame( pViewFrame)
{}
@@ -333,16 +333,16 @@ class SfxVerbListItem : public SfxPoolItem
public:
TYPEINFO();
- SfxVerbListItem( USHORT nWhichId = SID_OBJECT ) :
+ SfxVerbListItem( sal_uInt16 nWhichId = SID_OBJECT ) :
SfxPoolItem( nWhichId )
{}
- SfxVerbListItem( USHORT nWhichId, const com::sun::star::uno::Sequence < com::sun::star::embed::VerbDescriptor >& );
+ SfxVerbListItem( sal_uInt16 nWhichId, const com::sun::star::uno::Sequence < com::sun::star::embed::VerbDescriptor >& );
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
const com::sun::star::uno::Sequence < com::sun::star::embed::VerbDescriptor >& GetVerbList() const { return aVerbs; }
};
diff --git a/sfx2/inc/sfx2/viewsh.hxx b/sfx2/inc/sfx2/viewsh.hxx
index 1cb69aaf41f0..135506bc6133 100644..100755
--- a/sfx2/inc/sfx2/viewsh.hxx
+++ b/sfx2/inc/sfx2/viewsh.hxx
@@ -38,6 +38,7 @@
#include <svl/lstner.hxx>
#include <com/sun/star/ui/XContextMenuInterceptor.hpp>
#include <com/sun/star/datatransfer/clipboard/XClipboardListener.hpp>
+#include <com/sun/star/datatransfer/clipboard/XClipboardNotifier.hpp>
#include <cppuhelper/interfacecontainer.hxx>
#include "shell.hxx"
#include <tools/gen.hxx>
@@ -61,7 +62,6 @@ class SfxItemPool;
class SfxTabPage;
class SfxPrintMonitor;
class SfxFrameSetDescriptor;
-class PrintDialog;
class Printer;
class SfxPrinter;
class SfxProgress;
@@ -122,7 +122,7 @@ private: \
static SfxViewFactory *pFactory; \
public: \
static SfxViewShell *CreateInstance(SfxViewFrame *pFrame, SfxViewShell *pOldView); \
- static void RegisterFactory( USHORT nPrio = USHRT_MAX ); \
+ static void RegisterFactory( sal_uInt16 nPrio = USHRT_MAX ); \
static SfxViewFactory&Factory() { return *pFactory; } \
static void InitFactory()
@@ -130,7 +130,7 @@ public: \
SfxViewFactory* Class::pFactory; \
SfxViewShell* Class::CreateInstance(SfxViewFrame *pFrame, SfxViewShell *pOldView) \
{ return new Class(pFrame, pOldView); } \
- void Class::RegisterFactory( USHORT nPrio ) \
+ void Class::RegisterFactory( sal_uInt16 nPrio ) \
{ \
pFactory = new SfxViewFactory(&CreateInstance,&InitFactory,nPrio,AsciiViewName);\
InitFactory(); \
@@ -161,11 +161,11 @@ friend class SfxPrinterController;
SfxViewFrame* pFrame;
SfxShell* pSubShell;
Window* pWindow;
- BOOL bNoNewWindow;
+ sal_Bool bNoNewWindow;
protected:
- virtual void Activate(BOOL IsMDIActivate);
- virtual void Deactivate(BOOL IsMDIActivate);
+ virtual void Activate(sal_Bool IsMDIActivate);
+ virtual void Deactivate(sal_Bool IsMDIActivate);
virtual Size GetOptimalSizePixel() const;
@@ -179,9 +179,9 @@ protected:
public:
// Iteration
- static SfxViewShell* GetFirst( const TypeId* pType = 0, BOOL bOnlyVisible = TRUE );
+ static SfxViewShell* GetFirst( const TypeId* pType = 0, sal_Bool bOnlyVisible = sal_True );
static SfxViewShell* GetNext( const SfxViewShell& rPrev,
- const TypeId* pType = 0, BOOL bOnlyVisible = TRUE );
+ const TypeId* pType = 0, sal_Bool bOnlyVisible = sal_True );
static SfxViewShell* Current();
static SfxViewShell* Get( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController>& i_rController );
@@ -190,7 +190,7 @@ public:
TYPEINFO();
SFX_DECL_INTERFACE(SFX_INTERFACE_SFXVIEWSH)
- SfxViewShell( SfxViewFrame *pFrame, USHORT nFlags = 0 );
+ SfxViewShell( SfxViewFrame *pFrame, sal_uInt16 nFlags = 0 );
virtual ~SfxViewShell();
SfxInPlaceClient* GetIPClient() const;
@@ -213,22 +213,23 @@ public:
void SetScrollingMode( SfxScrollingMode eMode );
// Misc
- virtual USHORT PrepareClose( BOOL bUI = TRUE, BOOL bForBrowsing = FALSE );
- virtual String GetSelectionText( BOOL bCompleteWords = FALSE );
- virtual BOOL HasSelection( BOOL bText = TRUE ) const;
+ virtual sal_uInt16 PrepareClose( sal_Bool bUI = sal_True, sal_Bool bForBrowsing = sal_False );
+ virtual String GetSelectionText( sal_Bool bCompleteWords = sal_False );
+ virtual sal_Bool HasSelection( sal_Bool bText = sal_True ) const;
virtual SdrView* GetDrawView() const;
+
void SetSubShell( SfxShell *pShell );
SfxShell* GetSubShell() const { return pSubShell; }
void AddSubShell( SfxShell& rShell );
void RemoveSubShell( SfxShell *pShell=NULL );
- SfxShell* GetSubShell( USHORT );
+ SfxShell* GetSubShell( sal_uInt16 );
// Focus, KeyInput, Cursor
void GotFocus() const;
inline void LostFocus() const;
virtual void ShowCursor( bool bOn = true );
virtual bool KeyInput( const KeyEvent &rKeyEvent );
- BOOL Escape();
+ sal_Bool Escape();
// Viewing Interface
Window* GetWindow() const { return pWindow; }
@@ -241,21 +242,17 @@ public:
void AdjustVisArea(const Rectangle& rRect);
// Printing Interface
- virtual void PreparePrint( PrintDialog *pPrintDialog = 0 );
- virtual ErrCode DoPrint( SfxPrinter *pPrinter, PrintDialog *pPrintDialog, BOOL bSilent, BOOL bIsAPI );
- virtual USHORT Print( SfxProgress &rProgress, BOOL bIsAPI, PrintDialog *pPrintDialog = 0 );
- virtual SfxPrinter* GetPrinter( BOOL bCreate = FALSE );
- virtual USHORT SetPrinter( SfxPrinter *pNewPrinter, USHORT nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=FALSE );
+ virtual SfxPrinter* GetPrinter( sal_Bool bCreate = sal_False );
+ virtual sal_uInt16 SetPrinter( SfxPrinter *pNewPrinter, sal_uInt16 nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=sal_False );
virtual SfxTabPage* CreatePrintOptionsPage( Window *pParent, const SfxItemSet &rOptions );
- virtual PrintDialog* CreatePrintDialog( Window *pParent );
- void LockPrinter( BOOL bLock = TRUE );
- BOOL IsPrinterLocked() const;
+ void LockPrinter( sal_Bool bLock = sal_True );
+ sal_Bool IsPrinterLocked() const;
virtual JobSetup GetJobSetup() const;
Printer* GetActivePrinter() const;
// Workingset
- virtual void WriteUserData( String&, BOOL bBrowse = FALSE );
- virtual void ReadUserData( const String&, BOOL bBrowse = FALSE );
+ virtual void WriteUserData( String&, sal_Bool bBrowse = sal_False );
+ virtual void ReadUserData( const String&, sal_Bool bBrowse = sal_False );
virtual void WriteUserDataSequence ( ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = sal_False );
virtual void ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = sal_False );
virtual void QueryObjAreaPixel( Rectangle& rRect ) const;
@@ -282,20 +279,21 @@ public:
void SetMargin( const Size& );
void DisconnectAllClients();
virtual SfxFrame* GetSmartSelf( SfxFrame* pSelf, SfxMedium& rMedium );
- BOOL NewWindowAllowed() const { return !bNoNewWindow; }
- void SetNewWindowAllowed( BOOL bSet ) { bNoNewWindow = !bSet; }
+ sal_Bool NewWindowAllowed() const { return !bNoNewWindow; }
+ void SetNewWindowAllowed( sal_Bool bSet ) { bNoNewWindow = !bSet; }
void SetController( SfxBaseController* pController );
::com::sun::star::uno::Reference< ::com::sun::star::frame::XController >
GetController();
::cppu::OInterfaceContainerHelper& GetContextMenuInterceptors() const;
- BOOL TryContextMenuInterception( Menu& rIn, const ::rtl::OUString& rMenuIdentifier, Menu*& rpOut, ::com::sun::star::ui::ContextMenuExecuteEvent aEvent );
+ sal_Bool TryContextMenuInterception( Menu& rIn, const ::rtl::OUString& rMenuIdentifier, Menu*& rpOut, ::com::sun::star::ui::ContextMenuExecuteEvent aEvent );
void SetAdditionalPrintOptions( const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >& );
void ExecPrint( const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >&, sal_Bool, sal_Bool );
- void AddRemoveClipboardListener( const com::sun::star::uno::Reference < com::sun::star::datatransfer::clipboard::XClipboardListener>&, BOOL );
+ void AddRemoveClipboardListener( const com::sun::star::uno::Reference < com::sun::star::datatransfer::clipboard::XClipboardListener>&, sal_Bool );
+ ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboardNotifier > GetClipboardNotifier();
#if _SOLAR__PRIVATE
SAL_DLLPRIVATE SfxInPlaceClient* GetUIActiveIPClient_Impl() const;
@@ -304,19 +302,19 @@ public:
SAL_DLLPRIVATE bool GlobalKeyInput_Impl( const KeyEvent &rKeyEvent );
SAL_DLLPRIVATE void NewIPClient_Impl( SfxInPlaceClient *pIPClient )
- { GetIPClientList_Impl(TRUE)->push_back(pIPClient); }
+ { GetIPClientList_Impl(sal_True)->push_back(pIPClient); }
SAL_DLLPRIVATE void IPClientGone_Impl( SfxInPlaceClient *pIPClient );
- SAL_DLLPRIVATE SfxInPlaceClientList* GetIPClientList_Impl( BOOL bCreate = TRUE ) const;
+ SAL_DLLPRIVATE SfxInPlaceClientList* GetIPClientList_Impl( sal_Bool bCreate = sal_True ) const;
SAL_DLLPRIVATE void ResetAllClients_Impl( SfxInPlaceClient *pIP );
SAL_DLLPRIVATE void DiscardClients_Impl();
- SAL_DLLPRIVATE BOOL PlugInsActive() const;
+ SAL_DLLPRIVATE sal_Bool PlugInsActive() const;
SAL_DLLPRIVATE SfxPrinter* SetPrinter_Impl( SfxPrinter *pNewPrinter );
- SAL_DLLPRIVATE BOOL IsShowView_Impl() const;
+ SAL_DLLPRIVATE sal_Bool IsShowView_Impl() const;
SAL_DLLPRIVATE long HandleNotifyEvent_Impl( NotifyEvent& rEvent );
- SAL_DLLPRIVATE BOOL HasKeyListeners_Impl();
- SAL_DLLPRIVATE BOOL HasMouseClickListeners_Impl();
+ SAL_DLLPRIVATE sal_Bool HasKeyListeners_Impl();
+ SAL_DLLPRIVATE sal_Bool HasMouseClickListeners_Impl();
SAL_DLLPRIVATE SfxBaseController* GetBaseController_Impl() const;
@@ -327,12 +325,12 @@ public:
SAL_DLLPRIVATE SfxFrameSetDescriptor* GetFrameSet_Impl() const;
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 PushSubShells_Impl( sal_Bool bPush=sal_True );
+ SAL_DLLPRIVATE void PopSubShells_Impl() { PushSubShells_Impl( sal_False ); }
SAL_DLLPRIVATE void TakeOwnerShip_Impl();
SAL_DLLPRIVATE void CheckOwnerShip_Impl();
SAL_DLLPRIVATE void TakeFrameOwnerShip_Impl();
- SAL_DLLPRIVATE BOOL ExecKey_Impl(const KeyEvent& aKey);
+ SAL_DLLPRIVATE sal_Bool ExecKey_Impl(const KeyEvent& aKey);
#endif
};
diff --git a/sfx2/inc/sfxbasic.hxx b/sfx2/inc/sfxbasic.hxx
index 14a8bd7f9904..14a8bd7f9904 100644..100755
--- a/sfx2/inc/sfxbasic.hxx
+++ b/sfx2/inc/sfxbasic.hxx
diff --git a/sfx2/inc/sorgitm.hxx b/sfx2/inc/sorgitm.hxx
index f0148d5e03cc..aedb2ab16ac8 100644..100755
--- a/sfx2/inc/sorgitm.hxx
+++ b/sfx2/inc/sorgitm.hxx
@@ -46,8 +46,8 @@ public:
virtual SfxPoolItem* Clone( SfxItemPool* pPool = NULL ) const;
virtual int operator==( const SfxPoolItem& ) const;
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
String getLanguage() { return aLanguage; };
};
diff --git a/sfx2/inc/srchdlg.hxx b/sfx2/inc/srchdlg.hxx
index a36527b66cda..2e6d1effb4c7 100644..100755
--- a/sfx2/inc/srchdlg.hxx
+++ b/sfx2/inc/srchdlg.hxx
@@ -78,14 +78,14 @@ public:
inline String GetSearchText() const { return m_aSearchEdit.GetText(); }
inline void SetSearchText( const String& _rText ) { m_aSearchEdit.SetText( _rText ); }
- inline bool IsOnlyWholeWords() const { return ( m_aWholeWordsBox.IsChecked() != FALSE ); }
- inline bool IsMarchCase() const { return ( m_aMatchCaseBox.IsChecked() != FALSE ); }
- inline bool IsWrapAround() const { return ( m_aWrapAroundBox.IsChecked() != FALSE ); }
- inline bool IsSearchBackwards() const { return ( m_aBackwardsBox.IsChecked() != FALSE ); }
+ inline bool IsOnlyWholeWords() const { return ( m_aWholeWordsBox.IsChecked() != sal_False ); }
+ inline bool IsMarchCase() const { return ( m_aMatchCaseBox.IsChecked() != sal_False ); }
+ inline bool IsWrapAround() const { return ( m_aWrapAroundBox.IsChecked() != sal_False ); }
+ inline bool IsSearchBackwards() const { return ( m_aBackwardsBox.IsChecked() != sal_False ); }
void SetFocusOnEdit();
- virtual BOOL Close();
+ virtual sal_Bool Close();
virtual void Move();
virtual void StateChanged( StateChangedType nStateChange );
};
diff --git a/sfx2/prj/build.lst b/sfx2/prj/build.lst
index f00df5afb9b3..27a2e6edb2d3 100644..100755
--- a/sfx2/prj/build.lst
+++ b/sfx2/prj/build.lst
@@ -1,25 +1,3 @@
-sf sfx2 : l10n idl basic xmlscript framework readlicense_oo shell setup_native sax LIBXML2:libxml2 NULL
-sf sfx2 usr1 - all sf_mkout NULL
-sf sfx2\inc nmake - all sf_inc NULL
-sf sfx2\prj get - all sf_prj NULL
-sf sfx2\mac\res get - all sf_mres NULL
-sf sfx2\source\inc get - all sf_sinc NULL
-sf sfx2\sdi nmake - all sf_sdi NULL
-sf sfx2\source\appl nmake - all sf_appl sf_sdi sf_inc NULL
-sf sfx2\source\view nmake - all sf_view sf_sdi sf_inc NULL
-sf sfx2\source\bastyp nmake - all sf_bast sf_sdi sf_inc NULL
-sf sfx2\source\config nmake - all sf_cnfg sf_sdi sf_inc NULL
-sf sfx2\source\control nmake - all sf_ctrl sf_sdi sf_inc NULL
-sf sfx2\source\dialog nmake - all sf_dlg sf_sdi sf_inc NULL
-sf sfx2\source\doc nmake - all sf_doc sf_sdi sf_inc NULL
-sf sfx2\source\layout nmake - all sf_layout sf_sdi sf_inc NULL
-sf sfx2\source\menu nmake - all sf_menu sf_sdi sf_inc NULL
-sf sfx2\source\notify nmake - all sf_noti sf_sdi sf_inc NULL
-sf sfx2\source\statbar nmake - all sf_sbar sf_sdi sf_inc NULL
-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\workben\custompanel nmake - all sf_wb_custompanel 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
-sf sfx2\qa\cppunit nmake - all sf_qa_cppunit sf_util NULL
+sf sfx2 : L10N:l10n idl basic xmlscript framework readlicense_oo shell setup_native sax LIBXML2:libxml2 LIBXSLT:libxslt NULL
+sf sfx2\prj nmake - all sf_prj NULL
+
diff --git a/sfx2/prj/d.lst b/sfx2/prj/d.lst
index 0748aa19cd65..e69de29bb2d1 100644..100755
--- a/sfx2/prj/d.lst
+++ b/sfx2/prj/d.lst
@@ -1,46 +0,0 @@
-mkdir: %COMMON_DEST%\bin%_EXT%\hid
-mkdir: %COMMON_DEST%\res%_EXT%
-mkdir: %_DEST%\inc%_EXT%\sfx2
-
-..\%COMMON_OUTDIR%\misc\*.hid %COMMON_DEST%\bin%_EXT%\hid\*.hid
-..\%__SRC%\lib\sfx.lib %_DEST%\lib%_EXT%\sfx.lib
-..\%__SRC%\lib\lib*.so %_DEST%\lib%_EXT%
-..\%__SRC%\lib\*.a %_DEST%\lib%_EXT%\*.a
-..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib
-..\%__SRC%\slb\sfx.lib %_DEST%\lib%_EXT%\xsfx.lib
-..\%__SRC%\lib\isfx.lib %_DEST%\lib%_EXT%\isfx.lib
-..\%__SRC%\lib\debug.lib %_DEST%\lib%_EXT%\sfxdebug.lib
-..\%__SRC%\bin\sfx?????.sym %_DEST%\bin%_EXT%\sfx?????.sym
-..\%__SRC%\bin\sfx?????.dll %_DEST%\bin%_EXT%\sfx?????.dll
-..\%__SRC%\bin\sfx*.res %_DEST%\bin%_EXT%\sfx*.res
-..\%__SRC%\bin\sfx?????.sym %_DEST%\bin%_EXT%\sfx?????.sym
-..\%__SRC%\misc\sfx?????.map %_DEST%\bin%_EXT%\sfx?????.map
-..\%__SRC%\bin\elc?????.dll %_DEST%\bin%_EXT%\elc?????.dll
-..\%__SRC%\srs\sfx.srs %_DEST%\res%_EXT%\sfx.srs
-..\%COMMON_OUTDIR%\srs\sfx_srs.hid %COMMON_DEST%\res%_EXT%\sfx_srs.hid
-..\%__SRC%\srs\sfxslots.srs %_DEST%\res%_EXT%\sfxslots.srs
-..\%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\*.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\brokenpackageint.hxx %_DEST%\inc%_EXT%\sfx2\brokenpackageint.hxx
-..\inc\dinfedt.hxx %_DEST%\inc%_EXT%\sfx2\dinfedt.hxx
-..\inc\imgmgr.hxx %_DEST%\inc%_EXT%\sfx2\imgmgr.hxx
-..\inc\mieclip.hxx %_DEST%\inc%_EXT%\sfx2\mieclip.hxx
-..\inc\minfitem.hxx %_DEST%\inc%_EXT%\sfx2\minfitem.hxx
-..\inc\sfxhelp.hxx %_DEST%\inc%_EXT%\sfx2\sfxhelp.hxx
-..\inc\stbitem.hxx %_DEST%\inc%_EXT%\sfx2\stbitem.hxx
-..\inc\tplpitem.hxx %_DEST%\inc%_EXT%\sfx2\tplpitem.hxx
-..\inc\viewfac.hxx %_DEST%\inc%_EXT%\sfx2\viewfac.hxx
-..\inc\basmgr.hxx %_DEST%\inc%_EXT%\sfx2\basmgr.hxx
-..\inc\imagemgr.hxx %_DEST%\inc%_EXT%\sfx2\imagemgr.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
-
diff --git a/sfx2/util/makefile.pmk b/sfx2/prj/makefile.mk
index 03817cd477ae..e312a7ccab65 100644..100755
--- a/sfx2/util/makefile.pmk
+++ b/sfx2/prj/makefile.mk
@@ -25,6 +25,16 @@
#
#*************************************************************************
-# Reduction of exported symbols:
-CDEFS += -DSFX2_DLLIMPLEMENTATION
-VISIBILITY_HIDDEN=TRUE
+PRJ=..
+TARGET=prj
+
+.INCLUDE : settings.mk
+
+.IF "$(VERBOSE)"!=""
+VERBOSEFLAG :=
+.ELSE
+VERBOSEFLAG := -s
+.ENDIF
+
+all:
+ cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) && $(GNUMAKE) $(VERBOSEFLAG) -r deliverlog
diff --git a/sfx2/qa/complex/CheckGlobalEventBroadcaster_writer1.java b/sfx2/qa/complex/CheckGlobalEventBroadcaster_writer1.java
deleted file mode 100644
index d5dc17e183eb..000000000000
--- a/sfx2/qa/complex/CheckGlobalEventBroadcaster_writer1.java
+++ /dev/null
@@ -1,243 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-package complex.framework;
-
-import com.sun.star.awt.XWindow;
-import com.sun.star.document.XEventBroadcaster;
-import com.sun.star.document.XEventListener;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.sheet.XSpreadsheetDocument;
-import com.sun.star.text.XTextDocument;
-import com.sun.star.uno.UnoRuntime;
-import complex.framework.DocHelper.WriterHelper;
-import complexlib.ComplexTestCase;
-import java.util.ArrayList;
-import com.sun.star.task.XJobExecutor;
-import com.sun.star.util.URL;
-import util.UITools;
-
-/**
- * This testcase checks the GlobalEventBroadcaster
- * it will add an XEventListener and verify the Events
- * raised when opening/changing and closing Office Documents
- */
-public class CheckGlobalEventBroadcaster_writer1 extends ComplexTestCase {
- XMultiServiceFactory m_xMSF = null;
- XEventBroadcaster m_xEventBroadcaster = null;
- ArrayList notifyEvents = new ArrayList();
- XTextDocument xTextDoc;
- XSpreadsheetDocument xSheetDoc;
- XEventListener m_xEventListener = new EventListenerImpl();
-
- public String[] getTestMethodNames() {
- return new String[] {
- "initialize", "checkWriter", "cleanup"
- };
- }
-
- public void initialize() {
- m_xMSF = (XMultiServiceFactory) param.getMSF();
- log.println("check wether there is a valid MultiServiceFactory");
-
- if (m_xMSF == null) {
- assure("## Couldn't get MultiServiceFactory make sure your Office is started",
- true);
- }
-
- log.println("... done");
-
- log.println(
- "Create an instance of com.sun.star.frame.GlobalEventBroadcaster");
-
- Object GlobalEventBroadcaster = null;
- Object dispatcher = null;
-
- try {
- GlobalEventBroadcaster = m_xMSF.createInstance(
- "com.sun.star.frame.GlobalEventBroadcaster");
- } catch (com.sun.star.uno.Exception e) {
- assure("## Exception while creating instance", false);
- }
-
- log.println("... done");
-
- log.println("check wether the created instance is valid");
-
- if (GlobalEventBroadcaster == null) {
- assure("couldn't create service", false);
- }
-
- log.println("... done");
-
- log.println(
- "try to query the XEventBroadcaster from the gained Object");
- m_xEventBroadcaster = (XEventBroadcaster) UnoRuntime.queryInterface(
- XEventBroadcaster.class,
- GlobalEventBroadcaster);
-
- if (util.utils.isVoid(m_xEventBroadcaster)) {
- assure("couldn't get XEventBroadcaster", false);
- }
-
- log.println("... done");
-
- log.println("adding Listener");
- m_xEventBroadcaster.addEventListener(m_xEventListener);
- log.println("... done");
- }
-
- public void checkWriter() {
- log.println("-- Checking Writer --");
-
- WriterHelper wHelper = new WriterHelper(m_xMSF);
- String[] expected;
- boolean locRes = true;
- log.println("opening an empty writer doc");
- notifyEvents.clear();
- xTextDoc = wHelper.openEmptyDoc();
- shortWait();
- expected = new String[] { "OnUnfocus", "OnCreate", "OnViewCreated", "OnFocus" };
-
- assure("Wrong events fired when opening empty doc",
- proveExpectation(expected));
- log.println("... done");
-
- log.println("changing the writer doc");
- notifyEvents.clear();
- xTextDoc.getText().setString("GlobalEventBroadcaster");
- shortWait();
- expected = new String[] { "OnModifyChanged" };
-
- assure("Wrong events fired when changing doc",
- proveExpectation(expected));
- log.println("... done");
-
- log.println("closing the empty writer doc");
- notifyEvents.clear();
- wHelper.closeDoc(xTextDoc);
- shortWait();
- expected = new String[] { "OnUnfocus", "OnFocus", "OnViewClosed", "OnUnload" };
-
- assure("Wrong events fired when closing empty doc",
- proveExpectation(expected));
- log.println("... done");
-
- log.println("opening an writer doc via Window-New Window");
- notifyEvents.clear();
- xTextDoc = wHelper.openFromDialog(".uno:NewWindow", "", false);
- shortWait();
- expected = new String[] { "OnUnfocus", "OnCreate", "OnViewCreated", "OnFocus", "OnUnfocus", "OnViewCreated", "OnFocus", };
-
- assure("Wrong events fired when opening an writer doc via Window-New Window",
- proveExpectation(expected));
- log.println("... done");
-
- log.println("closing the created writer doc");
- notifyEvents.clear();
-
- wHelper.closeDoc(xTextDoc);
- shortWait();
- expected = new String[] { "OnViewClosed", "OnUnfocus", "OnFocus", "OnViewClosed", "OnUnload" };
-
- assure("Wrong events fired when closing Window-New Window",
- proveExpectation(expected));
-
- log.println("... done");
-
- log.println("Opening document with label wizard");
- xTextDoc = wHelper.openFromDialog("private:factory/swriter?slot=21051", "", false);
- shortWait();
- XWindow xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, wHelper.getToolkit ().getActiveTopWindow ());
- UITools ut = new UITools(m_xMSF,xWindow);
- notifyEvents.clear();
- log.println("pressing button 'New Document'");
- try{
- ut.clickButton ("New Document");
- } catch (Exception e) {
- log.println("Couldn't press Button");
- }
- log.println("... done");
- shortWait();
- shortWait();
- shortWait();
- expected = new String[] { "OnViewClosed", "OnCreate", "OnFocus", "OnModifyChanged" };
-
- assure("Wrong events fired when starting labels wizard",
- proveExpectation(expected));
-
- log.println("-- Done Writer --");
- }
-
- public void cleanup() {
- log.println("removing Listener");
- m_xEventBroadcaster.removeEventListener(m_xEventListener);
- log.println("... done");
- }
-
- /**
- * Sleeps for 0.5 sec. to allow StarOffice to react on <code>
- * reset</code> call.
- */
- private void shortWait() {
- try {
- Thread.sleep(2000);
- } catch (InterruptedException e) {
- log.println("While waiting :" + e);
- }
- }
-
- private boolean proveExpectation(String[] expected) {
- boolean locRes = true;
- boolean failure = false;
-
- log.println("Fired Events:");
- for (int k=0;k<notifyEvents.size();k++) {
- System.out.println("\t- "+notifyEvents.get(k));
- }
-
- for (int i = 0; i < expected.length; i++) {
- locRes = notifyEvents.contains(expected[i]);
-
- if (!locRes) {
- log.println("The event " + expected[i] + " isn't fired");
- failure = true;
- }
- }
-
- return !failure;
- }
-
- public class EventListenerImpl implements XEventListener {
- public void disposing(com.sun.star.lang.EventObject eventObject) {
- log.println("disposing: " + eventObject.Source.toString());
- }
-
- public void notifyEvent(com.sun.star.document.EventObject eventObject) {
- notifyEvents.add(eventObject.EventName);
- }
- }
-}
diff --git a/sfx2/qa/complex/DocHelper/makefile.mk b/sfx2/qa/complex/DocHelper/makefile.mk
deleted file mode 100644
index 6b6ac9191cdb..000000000000
--- a/sfx2/qa/complex/DocHelper/makefile.mk
+++ /dev/null
@@ -1,46 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ = ..$/..$/..
-TARGET = DocHelper
-PRJNAME = $(TARGET)
-PACKAGE = complex$/framework$/dochelper
-
-# --- Settings -----------------------------------------------------
-.INCLUDE: settings.mk
-
-
-#----- compile .java files -----------------------------------------
-
-JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
-JAVAFILES = DialogThread.java WriterHelper.java
-JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sfx2/qa/complex/docinfo/DocumentProperties.java b/sfx2/qa/complex/docinfo/DocumentProperties.java
deleted file mode 100644
index cff1dd341d48..000000000000
--- a/sfx2/qa/complex/docinfo/DocumentProperties.java
+++ /dev/null
@@ -1,269 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-package complex.docinfo;
-
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.beans.XPropertyContainer;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.document.XDocumentInfo;
-import com.sun.star.document.XDocumentInfoSupplier;
-import com.sun.star.frame.XComponentLoader;
-import com.sun.star.frame.XStorable;
-import com.sun.star.lang.XComponent;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.text.XTextDocument;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XInterface;
-import com.sun.star.util.Date;
-
-import complexlib.ComplexTestCase;
-
-import util.DesktopTools;
-import util.WriterTools;
-
-
-public class DocumentProperties extends ComplexTestCase {
- XMultiServiceFactory m_xMSF = null;
- XTextDocument xTextDoc = null;
-
- public String[] getTestMethodNames() {
- return new String[] {"checkDocInfo", "cleanup"};
- }
-
- public void checkDocInfo() {
- m_xMSF = (XMultiServiceFactory) param.getMSF();
-
- log.println(
- "check wether there is a valid MultiServiceFactory");
-
- if (m_xMSF == null) {
- assure("## Couldn't get MultiServiceFactory make sure your Office is started",
- true);
- }
-
- log.println("... done");
-
- log.println("Opening a Writer document");
- xTextDoc = WriterTools.createTextDoc(m_xMSF);
- log.println("... done");
-
- XDocumentInfoSupplier xDocInfoSup =
- (XDocumentInfoSupplier) UnoRuntime.queryInterface(XDocumentInfoSupplier.class,
- xTextDoc);
- XDocumentInfo xDocInfo = xDocInfoSup.getDocumentInfo();
- XPropertyContainer xPropContainer =
- (XPropertyContainer) UnoRuntime.queryInterface(XPropertyContainer.class,
- xDocInfo);
-
- log.println("Trying to add a existing property");
-
- boolean worked =
- addProperty(xPropContainer, "Author", (short) 0, "");
- assure("Could set an existing property", !worked);
- log.println("...done");
-
- log.println("Trying to add a integer property");
- worked =
- addProperty(xPropContainer, "intValue", com.sun.star.beans.PropertyAttribute.READONLY,
- new Integer(17));
- assure("Couldn't set an integer property", worked);
- log.println("...done");
-
- log.println("Trying to add a double property");
- worked =
- addProperty(xPropContainer, "doubleValue", com.sun.star.beans.PropertyAttribute.REMOVEABLE ,
- new Double(17.7));
- assure("Couldn't set an double property", worked);
- log.println("...done");
-
- log.println("Trying to add a boolean property");
- worked =
- addProperty(xPropContainer, "booleanValue", com.sun.star.beans.PropertyAttribute.REMOVEABLE,
- Boolean.TRUE);
- assure("Couldn't set an boolean property", worked);
- log.println("...done");
-
- log.println("Trying to add a date property");
- worked =
- addProperty(xPropContainer, "dateValue", com.sun.star.beans.PropertyAttribute.REMOVEABLE,
- new Date());
- assure("Couldn't set an date property", worked);
- log.println("...done");
-
- log.println("trying to remove a read only Property");
- try {
- xPropContainer.removeProperty ("intValue");
- assure("Could remove read only property", false);
- } catch (Exception e) {
- log.println("\tException was thrown "+e);
- log.println("\t...OK");
- }
- log.println("...done");
-
-
- String tempdir = System.getProperty("java.io.tmpdir");
- String fs = System.getProperty("file.separator");
-
- if (!tempdir.endsWith(fs)) {
- tempdir += fs;
- }
-
- tempdir = util.utils.getFullURL(tempdir);
-
- log.println("Storing the document");
-
- try {
- XStorable store =
- (XStorable) UnoRuntime.queryInterface(XStorable.class,
- xTextDoc);
- store.storeToURL(tempdir + "DocInfo.oot",
- new PropertyValue[] {});
- DesktopTools.closeDoc(xTextDoc);
- } catch (Exception e) {
- assure("Couldn't store document", false);
- }
-
- log.println("...done");
-
- log.println("loading the document");
-
- try {
- XComponentLoader xCL =
- (XComponentLoader) UnoRuntime.queryInterface(XComponentLoader.class,
- m_xMSF.createInstance(
- "com.sun.star.frame.Desktop"));
- XComponent xComp =
- xCL.loadComponentFromURL(tempdir + "DocInfo.oot",
- "_blank", 0, new PropertyValue[] {});
- xTextDoc =
- (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class,
- xComp);
- } catch (Exception e) {
- assure("Couldn't load document", false);
- }
-
- log.println("...done");
-
- xDocInfoSup =
- (XDocumentInfoSupplier) UnoRuntime.queryInterface(XDocumentInfoSupplier.class,
- xTextDoc);
- xDocInfo = xDocInfoSup.getDocumentInfo();
-
- XPropertySet xProps =
- (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class,
- xDocInfo);
-
- assure("Integer doesn't work",
- checkType(xProps, "intValue", "java.lang.Integer"));
- assure("Double doesn't work",
- checkType(xProps, "doubleValue", "java.lang.Double"));
- assure("Boolean doesn't work",
- checkType(xProps, "booleanValue", "java.lang.Boolean"));
- assure("Date doesn't work",
- checkType(xProps, "dateValue",
- "com.sun.star.util.DateTime"));
-
- xPropContainer =
- (XPropertyContainer) UnoRuntime.queryInterface(XPropertyContainer.class,
- xDocInfo);
-
- log.println("trying to remove a not user defined Property");
- try {
- xPropContainer.removeProperty ("Author");
- assure("Could remove non user defined property", false);
- } catch (Exception e) {
- log.println("\tException was thrown "+e);
- log.println("\t...OK");
- }
- log.println("...done");
-
- log.println("Trying to remove a user defined property");
- try {
- xPropContainer.removeProperty ("dateValue");
- log.println("\t...OK");
- } catch (Exception e) {
- log.println("\tException was thrown "+e);
- log.println("\t...FAILED");
- assure("Could not remove user defined property", false);
- }
- log.println("...done");
-
- }
-
- public void cleanup() {
- DesktopTools.closeDoc(xTextDoc);
- }
-
- private boolean checkType(XPropertySet xProps, String aName,
- String expected) {
- boolean ret = true;
- log.println("Checking " + expected);
-
- String getting =
- getPropertyByName(xProps, aName).getClass().getName();
-
- if (!getting.equals(expected)) {
- log.println("\t Expected: " + expected);
- log.println("\t Detting: " + getting);
- ret = false;
- }
-
- if (ret) {
- log.println("...OK");
- }
-
- return ret;
- }
-
- private Object getPropertyByName(XPropertySet xProps, String aName) {
- Object ret = null;
-
- try {
- ret = xProps.getPropertyValue(aName);
- } catch (Exception e) {
- log.println("\tCouldn't get Property " + aName);
- log.println("\tMessage " + e);
- }
-
- return ret;
- }
-
- private boolean addProperty(XPropertyContainer xPropContainer,
- String aName, short attr, Object defaults) {
- boolean ret = true;
-
- try {
- xPropContainer.addProperty(aName, attr, defaults);
- } catch (Exception e) {
- ret = false;
- log.println("\tCouldn't get Property " + aName);
- log.println("\tMessage " + e);
- }
-
- return ret;
- }
-}
diff --git a/sfx2/qa/complex/makefile.mk b/sfx2/qa/complex/makefile.mk
deleted file mode 100644
index b8bc897fccf7..000000000000
--- a/sfx2/qa/complex/makefile.mk
+++ /dev/null
@@ -1,61 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ = ..$/..
-TARGET = CheckGlobalEventBroadcaster_writer1
-PRJNAME = $(TARGET)
-PACKAGE = complex$/framework
-
-# --- Settings -----------------------------------------------------
-.INCLUDE: settings.mk
-
-
-#----- compile .java files -----------------------------------------
-
-JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
-JAVAFILES = CheckGlobalEventBroadcaster_writer1.java \
- DocumentMetaData.java \
- DocumentMetadataAccessTest.java
-
-JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
-
-SUBDIRS = DocHelper
-#----- make a jar from compiled files ------------------------------
-
-MAXLINELENGTH = 100000
-
-JARCLASSDIRS = $(PACKAGE)
-JARTARGET = $(TARGET).jar
-JARCOMPRESS = TRUE
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
-
-run:
- +java -cp $(CLASSPATH) org.openoffice.Runner -TestBase java_complex -sce tests.sce -tdoc $(PWD)$/testdocuments
diff --git a/sfx2/qa/complex/sfx2/DocumentInfo.java b/sfx2/qa/complex/sfx2/DocumentInfo.java
new file mode 100755
index 000000000000..ca7ae8b1dda0
--- /dev/null
+++ b/sfx2/qa/complex/sfx2/DocumentInfo.java
@@ -0,0 +1,362 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+package complex.sfx2;
+
+import com.sun.star.beans.PropertyAttribute;
+import com.sun.star.beans.Property;
+import com.sun.star.beans.PropertyValue;
+import com.sun.star.beans.XPropertyContainer;
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.beans.XPropertySetInfo;
+import com.sun.star.document.XDocumentInfo;
+import com.sun.star.document.XDocumentInfoSupplier;
+import com.sun.star.frame.XComponentLoader;
+import com.sun.star.frame.XStorable;
+import com.sun.star.lang.XComponent;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.text.XTextDocument;
+import com.sun.star.uno.UnoRuntime;
+import com.sun.star.util.Date;
+
+
+
+import util.DesktopTools;
+import util.WriterTools;
+
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openoffice.test.OfficeConnection;
+import static org.junit.Assert.*;
+
+public class DocumentInfo
+{
+ XMultiServiceFactory m_xMSF = null;
+ XTextDocument xTextDoc = null;
+ XTextDocument xTextDocSecond = null;
+
+ @Test public void checkDocInfo()
+ {
+ m_xMSF = getMSF();
+
+ System.out.println("check wether there is a valid MultiServiceFactory");
+
+ assertNotNull("## Couldn't get MultiServiceFactory make sure your Office is started", m_xMSF);
+
+ // TODO: need other temp directory!
+ String tempdir = System.getProperty("java.io.tmpdir");
+ String fs = System.getProperty("file.separator");
+
+ if (!tempdir.endsWith(fs))
+ {
+ tempdir += fs;
+ }
+ tempdir = util.utils.getFullURL(tempdir);
+ final String sTempDocument = tempdir + "DocInfo.oot";
+
+ if (true)
+ {
+ System.out.println("... done");
+
+
+ System.out.println("Opening a Writer document");
+ xTextDoc = WriterTools.createTextDoc(m_xMSF);
+ System.out.println("... done");
+
+ XDocumentInfoSupplier xDocInfoSup = UnoRuntime.queryInterface(XDocumentInfoSupplier.class, xTextDoc);
+ XDocumentInfo xDocInfo = xDocInfoSup.getDocumentInfo();
+ XPropertyContainer xPropContainer = UnoRuntime.queryInterface(XPropertyContainer.class, xDocInfo);
+
+ System.out.println("Trying to add a existing property");
+
+ boolean worked = addProperty(xPropContainer, "Author", (short) 0, "");
+ assertTrue("Could set an existing property", !worked);
+ System.out.println("...done");
+
+ System.out.println("Trying to add a integer property");
+ worked = addProperty(xPropContainer, "intValue", com.sun.star.beans.PropertyAttribute.READONLY, new Integer(17));
+ assertTrue("Couldn't set an integer property", worked);
+ System.out.println("...done");
+
+ System.out.println("Trying to add a double property");
+ worked = addProperty(xPropContainer, "doubleValue", com.sun.star.beans.PropertyAttribute.REMOVEABLE, new Double(17.7));
+ assertTrue("Couldn't set an double property", worked);
+ System.out.println("...done");
+
+ System.out.println("Trying to add a boolean property");
+ worked = addProperty(xPropContainer, "booleanValue", com.sun.star.beans.PropertyAttribute.REMOVEABLE, Boolean.TRUE);
+ assertTrue("Couldn't set an boolean property", worked);
+ System.out.println("...done");
+
+ System.out.println("Trying to add a date property");
+ worked = addProperty(xPropContainer, "dateValue", com.sun.star.beans.PropertyAttribute.REMOVEABLE, new Date());
+ assertTrue("Couldn't set an date property", worked);
+ System.out.println("...done");
+
+ System.out.println("trying to remove a read only Property");
+ try
+ {
+ xPropContainer.removeProperty("intValue");
+ fail("Could remove read only property");
+ }
+ catch (Exception e)
+ {
+ System.out.println("\tException was thrown " + e);
+ System.out.println("\t...OK");
+ }
+ System.out.println("...done");
+
+ XPropertySet xProps2 = UnoRuntime.queryInterface(XPropertySet.class, xPropContainer);
+ showPropertySet(xProps2);
+
+
+ System.out.println("Storing the document");
+ try
+ {
+ XStorable store = UnoRuntime.queryInterface(XStorable.class, xTextDoc);
+ store.storeToURL(sTempDocument, new PropertyValue[] {});
+ DesktopTools.closeDoc(xTextDoc);
+ }
+ catch (Exception e)
+ {
+ fail("Couldn't store document");
+ }
+
+ System.out.println("...done");
+ }
+
+
+ if (true)
+ {
+ System.out.println("loading the document");
+
+ try
+ {
+ XComponentLoader xCL = UnoRuntime.queryInterface(XComponentLoader.class, m_xMSF.createInstance("com.sun.star.frame.Desktop"));
+ XComponent xComp = xCL.loadComponentFromURL(sTempDocument, "_blank", 0, new PropertyValue[] {});
+ xTextDocSecond = UnoRuntime.queryInterface(XTextDocument.class, xComp);
+ }
+ catch (Exception e)
+ {
+ fail("Couldn't load document");
+ }
+
+ System.out.println("...done");
+
+ XDocumentInfoSupplier xDocInfoSup = UnoRuntime.queryInterface(XDocumentInfoSupplier.class, xTextDocSecond);
+ XDocumentInfo xDocInfo = xDocInfoSup.getDocumentInfo();
+ XPropertyContainer xPropContainer = UnoRuntime.queryInterface(XPropertyContainer.class, xDocInfo);
+
+ XPropertySet xProps = UnoRuntime.queryInterface(XPropertySet.class, xDocInfo);
+ showPropertySet(xProps);
+
+ assertTrue("Double doesn't work", checkType(xProps, "doubleValue", "java.lang.Double"));
+ assertTrue("Boolean doesn't work", checkType(xProps, "booleanValue", "java.lang.Boolean"));
+
+ // TODO: dateValue does not exist.
+ // assertTrue("Date doesn't work", checkType(xProps, "dateValue", "com.sun.star.util.DateTime"));
+
+ // TODO: is java.lang.Double
+ // assertTrue("Integer doesn't work", checkType(xProps, "intValue", "java.lang.Integer"));
+
+ xPropContainer = UnoRuntime.queryInterface(XPropertyContainer.class, xDocInfo);
+
+ System.out.println("trying to remove a not user defined Property");
+ try
+ {
+ xPropContainer.removeProperty("Author");
+ fail("Could remove non user defined property");
+ }
+ catch (Exception e)
+ {
+ System.out.println("\tException was thrown " + e);
+ System.out.println("\t...OK");
+ }
+ System.out.println("...done");
+
+
+ System.out.println("Trying to remove a user defined property");
+ try
+ {
+ xPropContainer.removeProperty("booleanValue");
+ System.out.println("\t...OK");
+ }
+ catch (Exception e)
+ {
+ System.out.println("\tException was thrown " + e);
+ System.out.println("\t...FAILED");
+ fail("Could not remove user defined property");
+ }
+ showPropertySet(xProps);
+ System.out.println("...done");
+ }
+ }
+
+ @After public void cleanup()
+ {
+ DesktopTools.closeDoc(xTextDocSecond);
+ DesktopTools.closeDoc(xTextDoc);
+ }
+
+ private void showPropertySet(XPropertySet xProps)
+ {
+ try
+ {
+ // get an XPropertySet, here the one of a text cursor
+ // XPropertySet xCursorProps = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class, mxDocCursor);
+
+ // get the property info interface of this XPropertySet
+ XPropertySetInfo xPropsInfo = xProps.getPropertySetInfo();
+
+ // get all properties (NOT the values) from XPropertySetInfo
+ Property[] aProps = xPropsInfo.getProperties();
+ int i;
+ for (i = 0; i < aProps.length; ++i) {
+ // number of property within this info object
+ System.out.print("Property #" + i);
+
+ // name of property
+ System.out.print(": Name<" + aProps[i].Name);
+
+ // handle of property (only for XFastPropertySet)
+ System.out.print("> Handle<" + aProps[i].Handle);
+
+ // type of property
+ System.out.print("> " + aProps[i].Type.toString());
+
+ // attributes (flags)
+ System.out.print(" Attributes<");
+ short nAttribs = aProps[i].Attributes;
+ if ((nAttribs & PropertyAttribute.MAYBEVOID) != 0)
+ System.out.print("MAYBEVOID|");
+ if ((nAttribs & PropertyAttribute.BOUND) != 0)
+ System.out.print("BOUND|");
+ if ((nAttribs & PropertyAttribute.CONSTRAINED) != 0)
+ System.out.print("CONSTRAINED|");
+ if ((nAttribs & PropertyAttribute.READONLY) != 0)
+ System.out.print("READONLY|");
+ if ((nAttribs & PropertyAttribute.TRANSIENT) != 0)
+ System.out.print("TRANSIENT|");
+ if ((nAttribs & PropertyAttribute.MAYBEAMBIGUOUS ) != 0)
+ System.out.print("MAYBEAMBIGUOUS|");
+ if ((nAttribs & PropertyAttribute.MAYBEDEFAULT) != 0)
+ System.out.print("MAYBEDEFAULT|");
+ if ((nAttribs & PropertyAttribute.REMOVEABLE) != 0)
+ System.out.print("REMOVEABLE|");
+ System.out.println("0>");
+ }
+ } catch (Exception e) {
+ // If anything goes wrong, give the user a stack trace
+ e.printStackTrace(System.out);
+ }
+ }
+
+ private boolean checkType(XPropertySet xProps, String aName,
+ String expected)
+ {
+ boolean ret = true;
+ System.out.println("Checking " + expected);
+
+ String getting =
+ getPropertyByName(xProps, aName).getClass().getName();
+
+ if (!getting.equals(expected))
+ {
+ System.out.println("\t Expected: " + expected);
+ System.out.println("\t Getting: " + getting);
+ ret = false;
+ }
+
+ if (ret)
+ {
+ System.out.println("...OK");
+ }
+ return ret;
+ }
+
+ private Object getPropertyByName(XPropertySet xProps, String aName)
+ {
+ Object ret = null;
+
+ try
+ {
+ ret = xProps.getPropertyValue(aName);
+ }
+ catch (Exception e)
+ {
+ System.out.println("\tCouldn't get Property " + aName);
+ System.out.println("\tMessage " + e);
+ }
+
+ return ret;
+ }
+
+ private boolean addProperty(XPropertyContainer xPropContainer,
+ String aName, short attr, Object defaults)
+ {
+ boolean ret = true;
+
+ try
+ {
+ xPropContainer.addProperty(aName, attr, defaults);
+ }
+ catch (Exception e)
+ {
+ ret = false;
+ System.out.println("\tCouldn't get Property " + aName);
+ System.out.println("\tMessage " + e);
+ }
+
+ return ret;
+ }
+
+ private XMultiServiceFactory getMSF()
+ {
+ final XMultiServiceFactory xMSF1 = UnoRuntime.queryInterface(XMultiServiceFactory.class, connection.getComponentContext().getServiceManager());
+ return xMSF1;
+ }
+
+ // setup and close connections
+ @BeforeClass public static void setUpConnection() throws Exception
+ {
+ System.out.println( "------------------------------------------------------------" );
+ System.out.println( "starting class: " + DocumentInfo.class.getName() );
+ System.out.println( "------------------------------------------------------------" );
+ connection.setUp();
+ }
+
+ @AfterClass public static void tearDownConnection()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ System.out.println( "------------------------------------------------------------" );
+ System.out.println( "finishing class: " + DocumentInfo.class.getName() );
+ System.out.println( "------------------------------------------------------------" );
+ connection.tearDown();
+ }
+ private static final OfficeConnection connection = new OfficeConnection();
+}
diff --git a/sfx2/qa/complex/DocumentMetadataAccessTest.java b/sfx2/qa/complex/sfx2/DocumentMetadataAccess.java
index a61280c45fe5..d145b9028473 100644..100755
--- a/sfx2/qa/complex/DocumentMetadataAccessTest.java
+++ b/sfx2/qa/complex/sfx2/DocumentMetadataAccess.java
@@ -25,38 +25,60 @@
*
************************************************************************/
-package complex.framework;
+package complex.sfx2;
-import complexlib.ComplexTestCase;
+// import complexlib.ComplexTestCase;
+import com.sun.star.beans.Pair;
+import com.sun.star.rdf.Literal;
+import com.sun.star.rdf.XLiteral;
+import com.sun.star.rdf.XNamedGraph;
+import com.sun.star.rdf.BlankNode;
+import com.sun.star.rdf.XQuerySelectResult;
+import com.sun.star.rdf.XNode;
+import com.sun.star.rdf.XDocumentRepository;
+import com.sun.star.rdf.XMetadatable;
+import com.sun.star.rdf.Statement;
+import com.sun.star.rdf.FileFormat;
+import com.sun.star.rdf.URIs;
+import com.sun.star.rdf.URI;
+import com.sun.star.rdf.XDocumentMetadataAccess;
+import com.sun.star.rdf.XRepositorySupplier;
+import com.sun.star.rdf.XRepository;
+import com.sun.star.rdf.XBlankNode;
+import com.sun.star.rdf.XURI;
import helper.StreamSimulator;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.XComponentContext;
-import com.sun.star.uno.Any;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.lang.XComponent;
-import com.sun.star.lang.XInitialization;
+
import com.sun.star.lang.XServiceInfo;
import com.sun.star.lang.IllegalArgumentException;
import com.sun.star.lang.WrappedTargetException;
import com.sun.star.lang.WrappedTargetRuntimeException;
import com.sun.star.beans.XPropertySet;
import com.sun.star.beans.PropertyValue;
-import com.sun.star.beans.Pair;
import com.sun.star.beans.StringPair;
import com.sun.star.container.XEnumerationAccess;
import com.sun.star.container.XEnumeration;
-import com.sun.star.container.ElementExistException;
-import com.sun.star.container.NoSuchElementException;
import com.sun.star.io.XInputStream;
-import com.sun.star.io.XOutputStream;
import com.sun.star.util.XCloseable;
import com.sun.star.frame.XStorable;
-import com.sun.star.frame.XLoadable;
import com.sun.star.text.XTextDocument;
import com.sun.star.text.XTextRange;
import com.sun.star.text.XText;
-import com.sun.star.rdf.*;
+import complex.sfx2.tools.TestDocument;
+import lib.TestParameters;
+
+
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openoffice.test.OfficeConnection;
+import static org.junit.Assert.*;
/**
* Test case for interface com.sun.star.rdf.XDocumentMetadataAccess
@@ -68,7 +90,7 @@ import com.sun.star.rdf.*;
*
* @author mst
*/
-public class DocumentMetadataAccessTest extends ComplexTestCase
+public class DocumentMetadataAccess
{
XMultiServiceFactory xMSF;
XComponentContext xContext;
@@ -105,72 +127,77 @@ public class DocumentMetadataAccessTest extends ComplexTestCase
XRepositorySupplier xRS;
XDocumentMetadataAccess xDMA;
- public String[] getTestMethodNames ()
- {
- return new String[] { "check", "checkRDFa" };
- }
+// public String[] getTestMethodNames ()
+// {
+// return new String[] { "check", "checkRDFa" };
+// }
+ /**
+ * The test parameters
+ */
+ private static TestParameters param = null;
- public void before()
+ @Before public void before()
{
try {
- xMSF = (XMultiServiceFactory) param.getMSF();
- assure("could not create MultiServiceFactory.", xMSF != null);
- XPropertySet xPropertySet = (XPropertySet)
- UnoRuntime.queryInterface(XPropertySet.class, xMSF);
+ xMSF = getMSF();
+ param = new TestParameters();
+ param.put("ServiceFactory", xMSF); // important for param.getMSF()
+
+ assertNotNull("could not create MultiServiceFactory.", xMSF);
+ XPropertySet xPropertySet = UnoRuntime.queryInterface(XPropertySet.class, xMSF);
Object defaultCtx = xPropertySet.getPropertyValue("DefaultContext");
- xContext = (XComponentContext)
- UnoRuntime.queryInterface(XComponentContext.class, defaultCtx);
- assure("could not get component context.", xContext != null);
+ xContext = UnoRuntime.queryInterface(XComponentContext.class, defaultCtx);
+ assertNotNull("could not get component context.", xContext);
tempDir = util.utils.getOfficeTemp/*Dir*/(xMSF);
- log.println("tempdir: " + tempDir);
+ System.out.println("tempdir: " + tempDir);
foo = URI.create(xContext, "uri:foo");
- assure("foo", null != foo);
+ assertNotNull("foo", foo);
bar = URI.create(xContext, "uri:bar");
- assure("bar", null != bar);
+ assertNotNull("bar", bar);
baz = URI.create(xContext, "uri:baz");
- assure("baz", null != baz);
+ assertNotNull("baz", baz);
blank1 = BlankNode.create(xContext, "_:1");
- assure("blank1", null != blank1);
+ assertNotNull("blank1", blank1);
blank2 = BlankNode.create(xContext, "_:2");
- assure("blank2", null != blank2);
+ assertNotNull("blank2", blank2);
blank3 = BlankNode.create(xContext, "_:3");
- assure("blank3", null != blank3);
+ assertNotNull("blank3", blank3);
blank4 = BlankNode.create(xContext, "_:4");
- assure("blank4", null != blank4);
+ assertNotNull("blank4", blank4);
rdf_type = URI.createKnown(xContext, URIs.RDF_TYPE);
- assure("rdf_type", null != rdf_type);
+ assertNotNull("rdf_type", rdf_type);
rdfs_label = URI.createKnown(xContext, URIs.RDFS_LABEL);
- assure("rdfs_label", null != rdfs_label);
+ assertNotNull("rdfs_label", rdfs_label);
pkg_Document = URI.createKnown(xContext, URIs.PKG_DOCUMENT);
- assure("pkg_Document", null != pkg_Document);
+ assertNotNull("pkg_Document", pkg_Document);
pkg_hasPart = URI.createKnown(xContext, URIs.PKG_HASPART);
- assure("pkg_hasPart", null != pkg_hasPart);
+ assertNotNull("pkg_hasPart", pkg_hasPart);
pkg_MetadataFile = URI.createKnown(xContext, URIs.PKG_METADATAFILE);
- assure("pkg_MetadataFile", null != pkg_MetadataFile);
+ assertNotNull("pkg_MetadataFile", pkg_MetadataFile);
odf_ContentFile = URI.createKnown(xContext, URIs.ODF_CONTENTFILE);
- assure("odf_ContentFile", null != odf_ContentFile);
+ assertNotNull("odf_ContentFile", odf_ContentFile);
odf_StylesFile = URI.createKnown(xContext, URIs.ODF_STYLESFILE);
- assure("odf_StylesFile", null != odf_StylesFile);
+ assertNotNull("odf_StylesFile", odf_StylesFile);
odf_Element = URI.createKnown(xContext, URIs.ODF_ELEMENT);
- assure("odf_Element", null != odf_Element);
+ assertNotNull("odf_Element", odf_Element);
} catch (Exception e) {
report(e);
}
}
- public void after()
+ @After public void after()
{
xRep = null;
xRS = null;
xDMA = null;
}
- public void check()
+ @Test public void check()
{
XComponent xComp = null;
XComponent xComp2 = null;
@@ -178,7 +205,7 @@ public class DocumentMetadataAccessTest extends ComplexTestCase
XEnumeration xStmtsEnum;
XNamedGraph xManifest;
- log.println("Creating document with Repository...");
+ System.out.println("Creating document with Repository...");
// we cannot create a XDMA directly, we must create
// a document and get it from there :(
@@ -186,248 +213,241 @@ public class DocumentMetadataAccessTest extends ComplexTestCase
PropertyValue[] loadProps = new PropertyValue[1];
loadProps[0] = new PropertyValue();
loadProps[0].Name = "Hidden";
- loadProps[0].Value = new Boolean(true);
+ loadProps[0].Value = true;
xComp = util.DesktopTools.openNewDoc(xMSF, "swriter", loadProps);
- XTextDocument xText = (XTextDocument) UnoRuntime.queryInterface(
- XTextDocument.class, xComp);
+ XTextDocument xText = UnoRuntime.queryInterface(XTextDocument.class, xComp);
- XRepositorySupplier xRS = (XRepositorySupplier)
- UnoRuntime.queryInterface(XRepositorySupplier.class, xComp);
- assure("xRS null", null != xRS);
- XDocumentMetadataAccess xDMA = (XDocumentMetadataAccess)
- UnoRuntime.queryInterface(XDocumentMetadataAccess.class, xRS);
- assure("xDMA null", null != xDMA);
- xRep = xRS.getRDFRepository();
- assure("xRep null", null != xRep);
+ XRepositorySupplier xRepoSupplier = UnoRuntime.queryInterface(XRepositorySupplier.class, xComp);
+ assertNotNull("xRS null", xRepoSupplier);
+ XDocumentMetadataAccess xDocMDAccess = UnoRuntime.queryInterface(XDocumentMetadataAccess.class, xRepoSupplier);
+ assertNotNull("xDMA null", xDocMDAccess);
+ xRep = xRepoSupplier.getRDFRepository();
+ assertNotNull("xRep null", xRep);
- log.println("...done");
+ System.out.println("...done");
- log.println("Checking that new repository is initialized...");
+ System.out.println("Checking that new repository is initialized...");
- XURI xBaseURI = (XURI) xDMA;
+ XURI xBaseURI = (XURI) xDocMDAccess;
String baseURI = xBaseURI.getStringValue();
- assure("new: baseURI",
- null != xBaseURI && !xBaseURI.getStringValue().equals(""));
+ assertNotNull("new: baseURI", xBaseURI );
+ assertTrue("new: baseURI", !xBaseURI.getStringValue().equals(""));
- assure("new: # graphs", 1 == xRep.getGraphNames().length);
+ assertTrue("new: # graphs", 1 == xRep.getGraphNames().length);
XURI manifest = URI.createNS(xContext, xBaseURI.getStringValue(),
manifestPath);
xManifest = xRep.getGraph(manifest);
- assure("new: manifest graph", null != xManifest);
+ assertTrue("new: manifest graph", null != xManifest);
Statement[] manifestStmts = getManifestStmts(xBaseURI);
xStmtsEnum = xRep.getStatements(null, null, null);
- assure("new: manifest graph", eq(xStmtsEnum, manifestStmts));
+ assertTrue("new: manifest graph", eq(xStmtsEnum, manifestStmts));
- log.println("...done");
+ System.out.println("...done");
- log.println("Checking some invalid args...");
+ System.out.println("Checking some invalid args...");
String content = "behold, for i am the content.";
XTextRange xTR = new TestRange(content);
XMetadatable xM = (XMetadatable) xTR;
try {
- xDMA.getElementByURI(null);
- assure("getElementByURI: null allowed", false);
+ xDocMDAccess.getElementByURI(null);
+ fail("getElementByURI: null allowed");
} catch (IllegalArgumentException e) {
// ignore
}
try {
- xDMA.getMetadataGraphsWithType(null);
- assure("getMetadataGraphsWithType: null URI allowed", false);
+ xDocMDAccess.getMetadataGraphsWithType(null);
+ fail("getMetadataGraphsWithType: null URI allowed");
} catch (IllegalArgumentException e) {
// ignore
}
try {
- xDMA.addMetadataFile("", new XURI[0]);
- assure("addMetadataFile: empty filename allowed", false);
+ xDocMDAccess.addMetadataFile("", new XURI[0]);
+ fail("addMetadataFile: empty filename allowed");
} catch (IllegalArgumentException e) {
// ignore
}
try {
- xDMA.addMetadataFile("/foo", new XURI[0]);
- assure("addMetadataFile: absolute filename allowed", false);
+ xDocMDAccess.addMetadataFile("/foo", new XURI[0]);
+ fail("addMetadataFile: absolute filename allowed");
} catch (IllegalArgumentException e) {
// ignore
}
try {
- xDMA.addMetadataFile("fo\"o", new XURI[0]);
- assure("addMetadataFile: invalid filename allowed", false);
+ xDocMDAccess.addMetadataFile("fo\"o", new XURI[0]);
+ fail("addMetadataFile: invalid filename allowed");
} catch (IllegalArgumentException e) {
// ignore
}
try {
- xDMA.addMetadataFile("../foo", new XURI[0]);
- assure("addMetadataFile: filename with .. allowed", false);
+ xDocMDAccess.addMetadataFile("../foo", new XURI[0]);
+ fail("addMetadataFile: filename with .. allowed");
} catch (IllegalArgumentException e) {
// ignore
}
try {
- xDMA.addMetadataFile("foo/../../bar", new XURI[0]);
- assure("addMetadataFile: filename with nest .. allowed", false);
+ xDocMDAccess.addMetadataFile("foo/../../bar", new XURI[0]);
+ fail("addMetadataFile: filename with nest .. allowed");
} catch (IllegalArgumentException e) {
// ignore
}
try {
- xDMA.addMetadataFile("foo/././bar", new XURI[0]);
- assure("addMetadataFile: filename with nest . allowed", false);
+ xDocMDAccess.addMetadataFile("foo/././bar", new XURI[0]);
+ fail("addMetadataFile: filename with nest . allowed");
} catch (IllegalArgumentException e) {
// ignore
}
try {
- xDMA.addMetadataFile("content.xml", new XURI[0]);
- assure("addMetadataFile: content.xml allowed", false);
+ xDocMDAccess.addMetadataFile("content.xml", new XURI[0]);
+ fail("addMetadataFile: content.xml allowed");
} catch (IllegalArgumentException e) {
// ignore
}
try {
- xDMA.addMetadataFile("styles.xml", new XURI[0]);
- assure("addMetadataFile: styles.xml allowed", false);
+ xDocMDAccess.addMetadataFile("styles.xml", new XURI[0]);
+ fail("addMetadataFile: styles.xml allowed");
} catch (IllegalArgumentException e) {
// ignore
}
try {
- xDMA.addMetadataFile("meta.xml", new XURI[0]);
- assure("addMetadataFile: meta.xml allowed", false);
+ xDocMDAccess.addMetadataFile("meta.xml", new XURI[0]);
+ fail("addMetadataFile: meta.xml allowed");
} catch (IllegalArgumentException e) {
// ignore
}
try {
- xDMA.addMetadataFile("settings.xml", new XURI[0]);
- assure("addMetadataFile: settings.xml allowed", false);
+ xDocMDAccess.addMetadataFile("settings.xml", new XURI[0]);
+ fail("addMetadataFile: settings.xml allowed");
} catch (IllegalArgumentException e) {
// ignore
}
try {
- xDMA.importMetadataFile(FileFormat.RDF_XML, null, "foo",
+ xDocMDAccess.importMetadataFile(FileFormat.RDF_XML, null, "foo",
foo, new XURI[0]);
- assure("importMetadataFile: null stream allowed", false);
+ fail("importMetadataFile: null stream allowed");
} catch (IllegalArgumentException e) {
// ignore
}
+
+ final String sEmptyRDF = TestDocument.getUrl("empty.rdf");
try {
- XInputStream xFooIn =
- new StreamSimulator(tempDir + "empty.rdf", true, param);
- xDMA.importMetadataFile(FileFormat.RDF_XML, xFooIn, "",
+ XInputStream xFooIn = new StreamSimulator(sEmptyRDF, true, param);
+ xDocMDAccess.importMetadataFile(FileFormat.RDF_XML, xFooIn, "",
foo, new XURI[0]);
- assure("importMetadataFile: empty filename allowed", false);
+ fail("importMetadataFile: empty filename allowed");
} catch (IllegalArgumentException e) {
// ignore
}
try {
XInputStream xFooIn =
- new StreamSimulator(tempDir + "empty.rdf", true, param);
- xDMA.importMetadataFile(FileFormat.RDF_XML, xFooIn, "meta.xml",
+ new StreamSimulator(sEmptyRDF, true, param);
+ xDocMDAccess.importMetadataFile(FileFormat.RDF_XML, xFooIn, "meta.xml",
foo, new XURI[0]);
- assure("importMetadataFile: meta.xml filename allowed", false);
+ fail("importMetadataFile: meta.xml filename allowed");
} catch (IllegalArgumentException e) {
// ignore
}
try {
XInputStream xFooIn =
- new StreamSimulator(tempDir + "empty.rdf", true, param);
- xDMA.importMetadataFile(FileFormat.RDF_XML,
+ new StreamSimulator(sEmptyRDF, true, param);
+ xDocMDAccess.importMetadataFile(FileFormat.RDF_XML,
xFooIn, "foo", null, new XURI[0]);
- assure("importMetadataFile: null base URI allowed", false);
+ fail("importMetadataFile: null base URI allowed");
} catch (IllegalArgumentException e) {
// ignore
}
try {
XInputStream xFooIn =
- new StreamSimulator(tempDir + "empty.rdf", true, param);
- xDMA.importMetadataFile(FileFormat.RDF_XML,
+ new StreamSimulator(sEmptyRDF, true, param);
+ xDocMDAccess.importMetadataFile(FileFormat.RDF_XML,
xFooIn, "foo", rdf_type, new XURI[0]);
- assure("importMetadataFile: non-absolute base URI allowed",
- false);
+ fail("importMetadataFile: non-absolute base URI allowed");
} catch (IllegalArgumentException e) {
// ignore
}
try {
- xDMA.removeMetadataFile(null);
- assure("removeMetadataFile: null URI allowed", false);
+ xDocMDAccess.removeMetadataFile(null);
+ fail("removeMetadataFile: null URI allowed");
} catch (IllegalArgumentException e) {
// ignore
}
try {
- xDMA.addContentOrStylesFile("");
- assure("addContentOrStylesFile: empty filename allowed",
- false);
+ xDocMDAccess.addContentOrStylesFile("");
+ fail("addContentOrStylesFile: empty filename allowed");
} catch (IllegalArgumentException e) {
// ignore
}
try {
- xDMA.addContentOrStylesFile("/content.xml");
- assure("addContentOrStylesFile: absolute filename allowed",
- false);
+ xDocMDAccess.addContentOrStylesFile("/content.xml");
+ fail("addContentOrStylesFile: absolute filename allowed");
} catch (IllegalArgumentException e) {
// ignore
}
try {
- xDMA.addContentOrStylesFile("foo.rdf");
- assure("addContentOrStylesFile: invalid filename allowed",
- false);
+ xDocMDAccess.addContentOrStylesFile("foo.rdf");
+ fail("addContentOrStylesFile: invalid filename allowed");
} catch (IllegalArgumentException e) {
// ignore
}
try {
- xDMA.removeContentOrStylesFile("");
- assure("removeContentOrStylesFile: empty filename allowed",
- false);
+ xDocMDAccess.removeContentOrStylesFile("");
+ fail("removeContentOrStylesFile: empty filename allowed");
} catch (IllegalArgumentException e) {
// ignore
}
try {
- xDMA.loadMetadataFromStorage(null, foo, null);
- assure("loadMetadataFromStorage: null storage allowed", false);
+ xDocMDAccess.loadMetadataFromStorage(null, foo, null);
+ fail("loadMetadataFromStorage: null storage allowed");
} catch (IllegalArgumentException e) {
// ignore
}
try {
- xDMA.storeMetadataToStorage(null/*, base*/);
- assure("storeMetadataToStorage: null storage allowed", false);
+ xDocMDAccess.storeMetadataToStorage(null/*, base*/);
+ fail("storeMetadataToStorage: null storage allowed");
} catch (IllegalArgumentException e) {
// ignore
}
try {
- xDMA.loadMetadataFromMedium(new PropertyValue[0]);
- assure("loadMetadataFromMedium: empty medium allowed", false);
+ xDocMDAccess.loadMetadataFromMedium(new PropertyValue[0]);
+ fail("loadMetadataFromMedium: empty medium allowed");
} catch (IllegalArgumentException e) {
// ignore
}
try {
- xDMA.storeMetadataToMedium(new PropertyValue[0]);
- assure("storeMetadataToMedium: empty medium allowed", false);
+ xDocMDAccess.storeMetadataToMedium(new PropertyValue[0]);
+ fail("storeMetadataToMedium: empty medium allowed");
} catch (IllegalArgumentException e) {
// ignore
}
- log.println("...done");
+ System.out.println("...done");
- log.println("Checking file addition/removal...");
+ System.out.println("Checking file addition/removal...");
- xDMA.removeContentOrStylesFile(contentPath);
+ xDocMDAccess.removeContentOrStylesFile(contentPath);
xStmtsEnum = xManifest.getStatements(null, null, null);
- assure("removeContentOrStylesFile (content)",
+ assertTrue("removeContentOrStylesFile (content)",
eq(xStmtsEnum, new Statement[] {
manifestStmts[0], manifestStmts[2], manifestStmts[4]
}));
- xDMA.addContentOrStylesFile(contentPath);
+ xDocMDAccess.addContentOrStylesFile(contentPath);
xStmtsEnum = xManifest.getStatements(null, null, null);
- assure("addContentOrStylesFile (content)",
+ assertTrue("addContentOrStylesFile (content)",
eq(xStmtsEnum, manifestStmts));
- xDMA.removeContentOrStylesFile(stylesPath);
+ xDocMDAccess.removeContentOrStylesFile(stylesPath);
xStmtsEnum = xManifest.getStatements(null, null, null);
- assure("removeContentOrStylesFile (styles)",
+ assertTrue("removeContentOrStylesFile (styles)",
eq(xStmtsEnum, new Statement[] {
manifestStmts[0], manifestStmts[1], manifestStmts[3]
}));
- xDMA.addContentOrStylesFile(stylesPath);
+ xDocMDAccess.addContentOrStylesFile(stylesPath);
xStmtsEnum = xManifest.getStatements(null, null, null);
- assure("addContentOrStylesFile (styles)",
+ assertTrue("addContentOrStylesFile (styles)",
eq(xStmtsEnum, manifestStmts));
XURI xFoo = URI.createNS(xContext, xBaseURI.getStringValue(),
@@ -438,70 +458,67 @@ public class DocumentMetadataAccessTest extends ComplexTestCase
new Statement(xFoo, rdf_type, pkg_MetadataFile, manifest);
Statement xM_FooTypeBar =
new Statement(xFoo, rdf_type, bar, manifest);
- xDMA.addMetadataFile(fooPath, new XURI[] { bar });
+ xDocMDAccess.addMetadataFile(fooPath, new XURI[] { bar });
xStmtsEnum = xManifest.getStatements(null, null, null);
- assure("addMetadataFile",
+ assertTrue("addMetadataFile",
eq(xStmtsEnum, merge(manifestStmts, new Statement[] {
xM_BaseHaspartFoo, xM_FooTypeMetadata, xM_FooTypeBar
})));
- XURI[] graphsBar = xDMA.getMetadataGraphsWithType(bar);
- assure("getMetadataGraphsWithType",
+ XURI[] graphsBar = xDocMDAccess.getMetadataGraphsWithType(bar);
+ assertTrue("getMetadataGraphsWithType",
graphsBar.length == 1 && eq(graphsBar[0], xFoo));
- xDMA.removeMetadataFile(xFoo);
+ xDocMDAccess.removeMetadataFile(xFoo);
xStmtsEnum = xManifest.getStatements(null, null, null);
- assure("removeMetadataFile",
+ assertTrue("removeMetadataFile",
eq(xStmtsEnum, manifestStmts));
- log.println("...done");
+ System.out.println("...done");
- log.println("Checking mapping...");
+ System.out.println("Checking mapping...");
- XEnumerationAccess xTextEnum = (XEnumerationAccess)
- UnoRuntime.queryInterface(XEnumerationAccess.class,
- xText.getText());
+ XEnumerationAccess xTextEnum = UnoRuntime.queryInterface(XEnumerationAccess.class, xText.getText());
Object o = xTextEnum.createEnumeration().nextElement();
- XMetadatable xMeta1 = (XMetadatable) UnoRuntime.queryInterface(
- XMetadatable.class, o);
+ XMetadatable xMeta1 = UnoRuntime.queryInterface(XMetadatable.class, o);
XURI uri;
XMetadatable xMeta;
- xMeta = xDMA.getElementByURI(xMeta1);
- assure("getElementByURI: null", null != xMeta);
+ xMeta = xDocMDAccess.getElementByURI(xMeta1);
+ assertTrue("getElementByURI: null", null != xMeta);
String XmlId = xMeta.getMetadataReference().Second;
String XmlId1 = xMeta1.getMetadataReference().Second;
- assure("getElementByURI: no xml id", !XmlId.equals(""));
- assure("getElementByURI: different xml id", XmlId.equals(XmlId1));
+ assertTrue("getElementByURI: no xml id", !XmlId.equals(""));
+ assertTrue("getElementByURI: different xml id", XmlId.equals(XmlId1));
- log.println("...done");
+ System.out.println("...done");
- log.println("Checking storing and loading...");
+ System.out.println("Checking storing and loading...");
XURI xFoobar = URI.createNS(xContext, xBaseURI.getStringValue(),
fooBarPath);
Statement[] metadataStmts = getMetadataFileStmts(xBaseURI,
fooBarPath);
- xDMA.addMetadataFile(fooBarPath, new XURI[0]);
+ xDocMDAccess.addMetadataFile(fooBarPath, new XURI[0]);
xStmtsEnum = xRep.getStatements(null, null, null);
- assure("addMetadataFile",
+ assertTrue("addMetadataFile",
eq(xStmtsEnum, merge(manifestStmts, metadataStmts )));
Statement xFoobar_FooBarFoo =
new Statement(foo, bar, foo, xFoobar);
xRep.getGraph(xFoobar).addStatement(foo, bar, foo);
xStmtsEnum = xRep.getStatements(null, null, null);
- assure("addStatement",
+ assertTrue("addStatement",
eq(xStmtsEnum, merge(manifestStmts, merge(metadataStmts,
new Statement[] { xFoobar_FooBarFoo }))));
PropertyValue noMDNoContentFile = new PropertyValue();
noMDNoContentFile.Name = "URL";
- noMDNoContentFile.Value = util.utils.getFullTestURL("CUSTOM.odt");
+ noMDNoContentFile.Value = TestDocument.getUrl("CUSTOM.odt");
PropertyValue noMDFile = new PropertyValue();
noMDFile.Name = "URL";
- noMDFile.Value = util.utils.getFullTestURL("TEST.odt");
+ noMDFile.Value = TestDocument.getUrl("TEST.odt");
PropertyValue file = new PropertyValue();
file.Name = "URL";
file.Value = tempDir + "TESTDMA.odt";
@@ -520,76 +537,72 @@ public class DocumentMetadataAccessTest extends ComplexTestCase
xStmtsEnum = xRep.getStatements(null, null, null);
XURI[] graphs = xRep.getGraphNames();
- xDMA.storeMetadataToMedium(args);
+ xDocMDAccess.storeMetadataToMedium(args);
// this should re-init
- xDMA.loadMetadataFromMedium(argsEmptyNoContent);
- xRep = xRS.getRDFRepository();
- assure("xRep null", null != xRep);
- assure("baseURI still tdoc?",
- !baseURI.equals(xDMA.getStringValue()));
- Statement[] manifestStmts2 = getManifestStmts((XURI) xDMA);
+ xDocMDAccess.loadMetadataFromMedium(argsEmptyNoContent);
+ xRep = xRepoSupplier.getRDFRepository();
+ assertTrue("xRep null", null != xRep);
+ assertTrue("baseURI still tdoc?",
+ !baseURI.equals(xDocMDAccess.getStringValue()));
+ Statement[] manifestStmts2 = getManifestStmts((XURI) xDocMDAccess);
xStmtsEnum = xRep.getStatements(null, null, null);
// there is no content or styles file in here, so we have just
// the package stmt
- assure("loadMetadataFromMedium (no metadata, no content)",
+ assertTrue("loadMetadataFromMedium (no metadata, no content)",
eq(xStmtsEnum, new Statement[] { manifestStmts2[0] }));
// this should re-init
- xDMA.loadMetadataFromMedium(argsEmpty);
- xRep = xRS.getRDFRepository();
- assure("xRep null", null != xRep);
- assure("baseURI still tdoc?",
- !baseURI.equals(xDMA.getStringValue()));
- Statement[] manifestStmts3 = getManifestStmts((XURI) xDMA);
+ xDocMDAccess.loadMetadataFromMedium(argsEmpty);
+ xRep = xRepoSupplier.getRDFRepository();
+ assertTrue("xRep null", null != xRep);
+ assertTrue("baseURI still tdoc?",
+ !baseURI.equals(xDocMDAccess.getStringValue()));
+ Statement[] manifestStmts3 = getManifestStmts((XURI) xDocMDAccess);
xStmtsEnum = xRep.getStatements(null, null, null);
- assure("loadMetadataFromMedium (no metadata)",
+ assertTrue("loadMetadataFromMedium (no metadata)",
eq(xStmtsEnum, manifestStmts3));
- xDMA.loadMetadataFromMedium(args);
- xRep = xRS.getRDFRepository();
- assure("xRep null", null != xRep);
- Statement[] manifestStmts4 = getManifestStmts((XURI) xDMA);
- Statement[] metadataStmts4 = getMetadataFileStmts((XURI) xDMA,
+ xDocMDAccess.loadMetadataFromMedium(args);
+ xRep = xRepoSupplier.getRDFRepository();
+ assertTrue("xRep null", null != xRep);
+ Statement[] manifestStmts4 = getManifestStmts((XURI) xDocMDAccess);
+ Statement[] metadataStmts4 = getMetadataFileStmts((XURI) xDocMDAccess,
fooBarPath);
xStmtsEnum = xRep.getStatements(null, null, null);
- assure("some graph(s) not reloaded",
+ assertTrue("some graph(s) not reloaded",
graphs.length == xRep.getGraphNames().length);
- XURI xFoobar4 = URI.createNS(xContext, xDMA.getStringValue(),
+ XURI xFoobar4 = URI.createNS(xContext, xDocMDAccess.getStringValue(),
fooBarPath);
Statement xFoobar_FooBarFoo4 =
new Statement(foo, bar, foo, xFoobar4);
- assure("loadMetadataFromMedium (re-load)",
+ assertTrue("loadMetadataFromMedium (re-load)",
eq(xStmtsEnum, merge(manifestStmts4, merge(metadataStmts4,
new Statement[] { xFoobar_FooBarFoo4 }))));
- log.println("...done");
+ System.out.println("...done");
- log.println("Checking storing and loading via model...");
+ System.out.println("Checking storing and loading via model...");
String f = tempDir + "TESTPARA.odt";
- XStorable xStor = (XStorable) UnoRuntime.queryInterface(
- XStorable.class, xRS);
+ XStorable xStor = UnoRuntime.queryInterface(XStorable.class, xRepoSupplier);
xStor.storeToURL(f, new PropertyValue[0]);
xComp2 = util.DesktopTools.loadDoc(xMSF, f, loadProps);
- XDocumentMetadataAccess xDMA2 = (XDocumentMetadataAccess)
- UnoRuntime.queryInterface(XDocumentMetadataAccess.class,
- xComp2);
- assure("xDMA2 null", null != xDMA2);
+ XDocumentMetadataAccess xDMA2 = UnoRuntime.queryInterface(XDocumentMetadataAccess.class, xComp2);
+ assertTrue("xDMA2 null", null != xDMA2);
- XRepositorySupplier xRS2 = (XRepositorySupplier)
- UnoRuntime.queryInterface(XRepositorySupplier.class, xComp2);
- assure("xRS2 null", null != xRS2);
+ XRepositorySupplier xRS2 = UnoRuntime.queryInterface(XRepositorySupplier.class, xComp2);
+ assertTrue("xRS2 null", null != xRS2);
XRepository xRep2 = xRS2.getRDFRepository();
- assure("xRep2 null", null != xRep2);
+ assertTrue("xRep2 null", null != xRep2);
Statement[] manifestStmts5 = getManifestStmts((XURI) xDMA2);
Statement[] metadataStmts5 = getMetadataFileStmts((XURI) xDMA2,
@@ -600,11 +613,11 @@ public class DocumentMetadataAccessTest extends ComplexTestCase
new Statement(foo, bar, foo, xFoobar5);
xStmtsEnum = xRep.getStatements(null, null, null);
XEnumeration xStmtsEnum2 = xRep2.getStatements(null, null, null);
- assure("load: repository differs",
+ assertTrue("load: repository differs",
eq(xStmtsEnum2, merge(manifestStmts5, merge(metadataStmts5,
new Statement[] { xFoobar_FooBarFoo5 }))));
- log.println("...done");
+ System.out.println("...done");
} catch (Exception e) {
report(e);
@@ -614,99 +627,91 @@ public class DocumentMetadataAccessTest extends ComplexTestCase
}
}
- public void checkRDFa()
+ @Test public void checkRDFa()
{
XComponent xComp = null;
- String file;
try {
- file = util.utils.getFullTestURL("TESTRDFA.odt");
+ final String file = TestDocument.getUrl("TESTRDFA.odt");
xComp = loadRDFa(file);
if (xComp != null)
{
- file = tempDir + "TESTRDFA.odt";
- storeRDFa(xComp, file);
+ final String sNewFile = tempDir + "TESTRDFA.odt";
+ storeRDFa(xComp, sNewFile);
close(xComp);
- xComp = loadRDFa(file);
+
+ xComp = loadRDFa(sNewFile);
}
} finally {
close(xComp);
}
}
- public void storeRDFa(XComponent xComp, String file)
+ private void storeRDFa(XComponent xComp, String file)
{
try {
- log.println("Storing test document...");
+ System.out.println("Storing test document...");
- XStorable xStor = (XStorable) UnoRuntime.queryInterface(
- XStorable.class, xComp);
+ XStorable xStor = UnoRuntime.queryInterface(XStorable.class, xComp);
xStor.storeToURL(file, new PropertyValue[0]);
- log.println("...done");
+ System.out.println("...done");
} catch (Exception e) {
report(e);
}
}
- public XComponent loadRDFa(String file)
+ private XComponent loadRDFa(String file)
{
XComponent xComp = null;
try {
- log.println("Loading test document...");
+ System.out.println("Loading test document...");
PropertyValue[] loadProps = new PropertyValue[1];
loadProps[0] = new PropertyValue();
loadProps[0].Name = "Hidden";
- loadProps[0].Value = new Boolean(true);
+ loadProps[0].Value = true;
xComp = util.DesktopTools.loadDoc(xMSF, file, loadProps);
- XRepositorySupplier xRS = (XRepositorySupplier)
- UnoRuntime.queryInterface(XRepositorySupplier.class, xComp);
- assure("xRS null", null != xRS);
+ XRepositorySupplier xRepoSupplier = UnoRuntime.queryInterface(XRepositorySupplier.class, xComp);
+ assertTrue("xRS null", null != xRepoSupplier);
- XDocumentRepository xRep = (XDocumentRepository)
- UnoRuntime.queryInterface(XDocumentRepository.class,
- xRS.getRDFRepository());
- assure("xRep null", null != xRep);
+ XDocumentRepository xDocRepository = UnoRuntime.queryInterface(XDocumentRepository.class, xRepoSupplier.getRDFRepository());
+ assertTrue("xRep null", null != xDocRepository);
- XTextDocument xTextDoc = (XTextDocument)
- UnoRuntime.queryInterface(XTextDocument.class, xComp);
+ XTextDocument xTextDoc = UnoRuntime.queryInterface(XTextDocument.class, xComp);
XText xText = xTextDoc.getText();
- XEnumerationAccess xEA = (XEnumerationAccess)
- UnoRuntime.queryInterface(XEnumerationAccess.class, xText);
+ XEnumerationAccess xEA = UnoRuntime.queryInterface(XEnumerationAccess.class, xText);
XEnumeration xEnum = xEA.createEnumeration();
- log.println("...done");
+ System.out.println("...done");
- log.println("Checking RDFa in loaded test document...");
+ System.out.println("Checking RDFa in loaded test document...");
XMetadatable xPara;
Pair<Statement[], Boolean> result;
Statement x_FooBarLit1 = new Statement(foo, bar, mkLit("1"), null);
- xPara = (XMetadatable) UnoRuntime.queryInterface(
- XMetadatable.class, xEnum.nextElement());
- result = xRep.getStatementRDFa(xPara);
- assure("RDFa: 1",
+ xPara = UnoRuntime.queryInterface(XMetadatable.class, xEnum.nextElement());
+ result = xDocRepository.getStatementRDFa(xPara);
+ assertTrue("RDFa: 1",
!result.Second &&
eq(result.First, new Statement[] {
x_FooBarLit1
}));
Statement x_FooBarLit2 = new Statement(foo, bar, mkLit("2"), null);
- xPara = (XMetadatable) UnoRuntime.queryInterface(
- XMetadatable.class, xEnum.nextElement());
- result = xRep.getStatementRDFa(xPara);
- assure("RDFa: 2",
+ xPara = UnoRuntime.queryInterface(XMetadatable.class, xEnum.nextElement());
+ result = xDocRepository.getStatementRDFa(xPara);
+ assertTrue("RDFa: 2",
!result.Second &&
eq(result.First, new Statement[] {
x_FooBarLit2
@@ -714,54 +719,47 @@ public class DocumentMetadataAccessTest extends ComplexTestCase
Statement x_BlankBarLit3 =
new Statement(blank1, bar, mkLit("3"), null);
- xPara = (XMetadatable) UnoRuntime.queryInterface(
- XMetadatable.class, xEnum.nextElement());
- result = xRep.getStatementRDFa(xPara);
- assure("RDFa: 3",
+ xPara = UnoRuntime.queryInterface(XMetadatable.class, xEnum.nextElement());
+ result = xDocRepository.getStatementRDFa(xPara);
+ assertTrue("RDFa: 3",
!result.Second &&
eq(result.First, new Statement[] {
x_BlankBarLit3
}));
- XBlankNode b3 = (XBlankNode) UnoRuntime.queryInterface(
- XBlankNode.class, result.First[0].Subject);
+ XBlankNode b3 = UnoRuntime.queryInterface(XBlankNode.class, result.First[0].Subject);
Statement x_BlankBarLit4 =
new Statement(blank2, bar, mkLit("4"), null);
- xPara = (XMetadatable) UnoRuntime.queryInterface(
- XMetadatable.class, xEnum.nextElement());
- result = xRep.getStatementRDFa(xPara);
- assure("RDFa: 4",
+ xPara = UnoRuntime.queryInterface(XMetadatable.class, xEnum.nextElement());
+ result = xDocRepository.getStatementRDFa(xPara);
+ assertTrue("RDFa: 4",
!result.Second &&
eq(result.First, new Statement[] {
x_BlankBarLit4
}));
- XBlankNode b4 = (XBlankNode) UnoRuntime.queryInterface(
- XBlankNode.class, result.First[0].Subject);
+ XBlankNode b4 = UnoRuntime.queryInterface(XBlankNode.class, result.First[0].Subject);
Statement x_BlankBarLit5 =
new Statement(blank1, bar, mkLit("5"), null);
- xPara = (XMetadatable) UnoRuntime.queryInterface(
- XMetadatable.class, xEnum.nextElement());
- result = xRep.getStatementRDFa(xPara);
- assure("RDFa: 5",
+ xPara = UnoRuntime.queryInterface(XMetadatable.class, xEnum.nextElement());
+ result = xDocRepository.getStatementRDFa(xPara);
+ assertTrue("RDFa: 5",
!result.Second &&
eq(result.First, new Statement[] {
x_BlankBarLit5
}));
- XBlankNode b5 = (XBlankNode) UnoRuntime.queryInterface(
- XBlankNode.class, result.First[0].Subject);
+ XBlankNode b5 = UnoRuntime.queryInterface(XBlankNode.class, result.First[0].Subject);
- assure("RDFa: 3 != 4",
+ assertTrue("RDFa: 3 != 4",
!b3.getStringValue().equals(b4.getStringValue()));
- assure("RDFa: 3 == 5",
+ assertTrue("RDFa: 3 == 5",
b3.getStringValue().equals(b5.getStringValue()));
Statement x_FooBarLit6 = new Statement(foo, bar, mkLit("6"), null);
Statement x_FooBazLit6 = new Statement(foo, baz, mkLit("6"), null);
- xPara = (XMetadatable) UnoRuntime.queryInterface(
- XMetadatable.class, xEnum.nextElement());
- result = xRep.getStatementRDFa(xPara);
- assure("RDFa: 6",
+ xPara = UnoRuntime.queryInterface(XMetadatable.class, xEnum.nextElement());
+ result = xDocRepository.getStatementRDFa(xPara);
+ assertTrue("RDFa: 6",
!result.Second &&
eq(result.First, new Statement[] {
x_FooBarLit6, x_FooBazLit6
@@ -770,10 +768,9 @@ public class DocumentMetadataAccessTest extends ComplexTestCase
Statement x_FooBarLit7 = new Statement(foo, bar, mkLit("7"), null);
Statement x_FooBazLit7 = new Statement(foo, baz, mkLit("7"), null);
Statement x_FooFooLit7 = new Statement(foo, foo, mkLit("7"), null);
- xPara = (XMetadatable) UnoRuntime.queryInterface(
- XMetadatable.class, xEnum.nextElement());
- result = xRep.getStatementRDFa(xPara);
- assure("RDFa: 7",
+ xPara = UnoRuntime.queryInterface(XMetadatable.class, xEnum.nextElement());
+ result = xDocRepository.getStatementRDFa(xPara);
+ assertTrue("RDFa: 7",
!result.Second &&
eq(result.First, new Statement[] {
x_FooBarLit7, x_FooBazLit7, x_FooFooLit7
@@ -784,28 +781,25 @@ public class DocumentMetadataAccessTest extends ComplexTestCase
Statement x_FooBarLit = new Statement(foo, bar, lit, null);
Statement x_FooBarLittype = new Statement(foo, bar, lit_type, null);
- xPara = (XMetadatable) UnoRuntime.queryInterface(
- XMetadatable.class, xEnum.nextElement());
- result = xRep.getStatementRDFa(xPara);
- assure("RDFa: 8",
+ xPara = UnoRuntime.queryInterface(XMetadatable.class, xEnum.nextElement());
+ result = xDocRepository.getStatementRDFa(xPara);
+ assertTrue("RDFa: 8",
result.Second &&
eq(result.First, new Statement[] {
x_FooBarLit
}));
- xPara = (XMetadatable) UnoRuntime.queryInterface(
- XMetadatable.class, xEnum.nextElement());
- result = xRep.getStatementRDFa(xPara);
- assure("RDFa: 9",
+ xPara = UnoRuntime.queryInterface(XMetadatable.class, xEnum.nextElement());
+ result = xDocRepository.getStatementRDFa(xPara);
+ assertTrue("RDFa: 9",
result.Second &&
eq(result.First, new Statement[] {
x_FooBarLit
}));
- xPara = (XMetadatable) UnoRuntime.queryInterface(
- XMetadatable.class, xEnum.nextElement());
- result = xRep.getStatementRDFa(xPara);
- assure("RDFa: 10",
+ xPara = UnoRuntime.queryInterface(XMetadatable.class, xEnum.nextElement());
+ result = xDocRepository.getStatementRDFa(xPara);
+ assertTrue("RDFa: 10",
result.Second &&
eq(result.First, new Statement[] {
x_FooBarLittype
@@ -813,10 +807,9 @@ public class DocumentMetadataAccessTest extends ComplexTestCase
Statement x_FooBarLit11
= new Statement(foo, bar, mkLit("11", bar), null);
- xPara = (XMetadatable) UnoRuntime.queryInterface(
- XMetadatable.class, xEnum.nextElement());
- result = xRep.getStatementRDFa(xPara);
- assure("RDFa: 11",
+ xPara = UnoRuntime.queryInterface(XMetadatable.class, xEnum.nextElement());
+ result = xDocRepository.getStatementRDFa(xPara);
+ assertTrue("RDFa: 11",
!result.Second &&
eq(result.First, new Statement[] {
x_FooBarLit11
@@ -825,19 +818,17 @@ public class DocumentMetadataAccessTest extends ComplexTestCase
XURI xFile = URI.createNS(xContext, file, "/" + contentPath);
Statement x_FileBarLit12 =
new Statement(xFile, bar, mkLit("12"), null);
- xPara = (XMetadatable) UnoRuntime.queryInterface(
- XMetadatable.class, xEnum.nextElement());
- result = xRep.getStatementRDFa(xPara);
- assure("RDFa: 12",
+ xPara = UnoRuntime.queryInterface(XMetadatable.class, xEnum.nextElement());
+ result = xDocRepository.getStatementRDFa(xPara);
+ assertTrue("RDFa: 12",
!result.Second &&
eq(result.First, new Statement[] {
x_FileBarLit12
}));
- xPara = (XMetadatable) UnoRuntime.queryInterface(
- XMetadatable.class, xEnum.nextElement());
- result = xRep.getStatementRDFa(xPara);
- assure("RDFa: 13",
+ xPara = UnoRuntime.queryInterface(XMetadatable.class, xEnum.nextElement());
+ result = xDocRepository.getStatementRDFa(xPara);
+ assertTrue("RDFa: 13",
result.Second &&
eq(result.First, new Statement[] {
x_FooBarLit
@@ -845,51 +836,45 @@ public class DocumentMetadataAccessTest extends ComplexTestCase
Statement x_FooLabelLit14 =
new Statement(foo, rdfs_label, mkLit("14"), null);
- xPara = (XMetadatable) UnoRuntime.queryInterface(
- XMetadatable.class, xEnum.nextElement());
- result = xRep.getStatementRDFa(xPara);
- assure("RDFa: 14",
+ xPara = UnoRuntime.queryInterface(XMetadatable.class, xEnum.nextElement());
+ result = xDocRepository.getStatementRDFa(xPara);
+ assertTrue("RDFa: 14",
result.Second &&
eq(result.First, new Statement[] {
- x_FooBarLit
+ /* x_FooLabelLit14 */ x_FooBarLit
}));
- xPara = (XMetadatable) UnoRuntime.queryInterface(
- XMetadatable.class, xEnum.nextElement());
- result = xRep.getStatementRDFa(xPara);
- assure("RDFa: 15", eq(result.First, new Statement[] { } ));
+ xPara = UnoRuntime.queryInterface(XMetadatable.class, xEnum.nextElement());
+ result = xDocRepository.getStatementRDFa(xPara);
+ assertTrue("RDFa: 15", eq(result.First, new Statement[] { } ));
- xPara = (XMetadatable) UnoRuntime.queryInterface(
- XMetadatable.class, xEnum.nextElement());
- result = xRep.getStatementRDFa(xPara);
- assure("RDFa: 16", eq(result.First, new Statement[] { } ));
+ xPara = UnoRuntime.queryInterface(XMetadatable.class, xEnum.nextElement());
+ result = xDocRepository.getStatementRDFa(xPara);
+ assertTrue("RDFa: 16", eq(result.First, new Statement[] { } ));
- xPara = (XMetadatable) UnoRuntime.queryInterface(
- XMetadatable.class, xEnum.nextElement());
- result = xRep.getStatementRDFa(xPara);
- assure("RDFa: 17", eq(result.First, new Statement[] { } ));
+ xPara = UnoRuntime.queryInterface(XMetadatable.class, xEnum.nextElement());
+ result = xDocRepository.getStatementRDFa(xPara);
+ assertTrue("RDFa: 17", eq(result.First, new Statement[] { } ));
- xPara = (XMetadatable) UnoRuntime.queryInterface(
- XMetadatable.class, xEnum.nextElement());
- result = xRep.getStatementRDFa(xPara);
- assure("RDFa: 18", eq(result.First, new Statement[] { } ));
+ xPara = UnoRuntime.queryInterface(XMetadatable.class, xEnum.nextElement());
+ result = xDocRepository.getStatementRDFa(xPara);
+ assertTrue("RDFa: 18", eq(result.First, new Statement[] { } ));
- xPara = (XMetadatable) UnoRuntime.queryInterface(
- XMetadatable.class, xEnum.nextElement());
- result = xRep.getStatementRDFa(xPara);
- assure("RDFa: 19", eq(result.First, new Statement[] { } ));
+ xPara = UnoRuntime.queryInterface(XMetadatable.class, xEnum.nextElement());
+ result = xDocRepository.getStatementRDFa(xPara);
+ assertTrue("RDFa: 19", eq(result.First, new Statement[] { } ));
- xPara = (XMetadatable) UnoRuntime.queryInterface(
+ xPara = UnoRuntime.queryInterface(
XMetadatable.class, xEnum.nextElement());
- result = xRep.getStatementRDFa(xPara);
- assure("RDFa: 20", eq(result.First, new Statement[] { } ));
+ result = xDocRepository.getStatementRDFa(xPara);
+ assertTrue("RDFa: 20", eq(result.First, new Statement[] { } ));
- xPara = (XMetadatable) UnoRuntime.queryInterface(
+ xPara = UnoRuntime.queryInterface(
XMetadatable.class, xEnum.nextElement());
- result = xRep.getStatementRDFa(xPara);
- assure("RDFa: 21", eq(result.First, new Statement[] { } ));
+ result = xDocRepository.getStatementRDFa(xPara);
+ assertTrue("RDFa: 21", eq(result.First, new Statement[] { } ));
- log.println("...done");
+ System.out.println("...done");
} catch (Exception e) {
report(e);
@@ -905,33 +890,35 @@ public class DocumentMetadataAccessTest extends ComplexTestCase
{
if (e instanceof WrappedTargetException)
{
- log.println("Cause:");
+ System.out.println("Cause:");
Exception cause = (Exception)
(((WrappedTargetException)e).TargetException);
- log.println(cause.toString());
+ System.out.println(cause.toString());
report2(cause);
} else if (e instanceof WrappedTargetRuntimeException) {
- log.println("Cause:");
+ System.out.println("Cause:");
Exception cause = (Exception)
(((WrappedTargetRuntimeException)e).TargetException);
- log.println(cause.toString());
+ System.out.println(cause.toString());
report2(cause);
}
}
public void report(Exception e) {
- log.println("Exception occurred:");
- e.printStackTrace((java.io.PrintWriter) log);
+ System.out.println("Exception occurred:");
+ e.printStackTrace(System.out);
report2(e);
- failed();
+ fail();
}
static void close(XComponent i_comp)
{
try {
- XCloseable xClos = (XCloseable) UnoRuntime.queryInterface(
- XCloseable.class, i_comp);
- if (xClos != null) xClos.close(true);
+ XCloseable xClos = UnoRuntime.queryInterface(XCloseable.class, i_comp);
+ if (xClos != null)
+ {
+ xClos.close(true);
+ }
} catch (Exception e) {
}
}
@@ -960,14 +947,16 @@ public class DocumentMetadataAccessTest extends ComplexTestCase
}
public static String toS(XNode n) {
- if (null == n) return "< null >";
+ if (null == n)
+ {
+ return "< null >";
+ }
return n.getStringValue();
}
static boolean isBlank(XNode i_node)
{
- XBlankNode blank = (XBlankNode) UnoRuntime.queryInterface(
- XBlankNode.class, i_node);
+ XBlankNode blank = UnoRuntime.queryInterface(XBlankNode.class, i_node);
return blank != null;
}
@@ -1000,7 +989,7 @@ public class DocumentMetadataAccessTest extends ComplexTestCase
java.util.Collection c = new java.util.Vector();
while (i_Enum.hasMoreElements()) {
Statement s = (Statement) i_Enum.nextElement();
-//log.println("toSeq: " + s.getSubject().getStringValue() + " " + s.getPredicate().getStringValue() + " " + s.getObject().getStringValue() + ".");
+//System.out.println("toSeq: " + s.getSubject().getStringValue() + " " + s.getPredicate().getStringValue() + " " + s.getObject().getStringValue() + ".");
c.add(s);
}
// return (Statement[]) c.toArray();
@@ -1035,11 +1024,17 @@ public class DocumentMetadataAccessTest extends ComplexTestCase
{
XNode[] left = (XNode[]) i_Left;
XNode[] right = (XNode[]) i_Right;
- if (left.length != right.length) throw new RuntimeException();
+ if (left.length != right.length)
+ {
+ throw new RuntimeException();
+ }
for (int i = 0; i < left.length; ++i) {
int eq = (left[i].getStringValue().compareTo(
right[i].getStringValue()));
- if (eq != 0) return eq;
+ if (eq != 0)
+ {
+ return eq;
+ }
}
return 0;
}
@@ -1078,23 +1073,23 @@ public class DocumentMetadataAccessTest extends ComplexTestCase
XURI lG = i_Left.Graph;
XURI rG = i_Right.Graph;
if (!eq(lG, rG)) {
- log.println("Graphs differ: " + toS(lG) + " != " + toS(rG));
+ System.out.println("Graphs differ: " + toS(lG) + " != " + toS(rG));
return false;
}
if (!eq(i_Left.Subject, i_Right.Subject)) {
- log.println("Subjects differ: " +
+ System.out.println("Subjects differ: " +
i_Left.Subject.getStringValue() + " != " +
i_Right.Subject.getStringValue());
return false;
}
if (!eq(i_Left.Predicate, i_Right.Predicate)) {
- log.println("Predicates differ: " +
+ System.out.println("Predicates differ: " +
i_Left.Predicate.getStringValue() + " != " +
i_Right.Predicate.getStringValue());
return false;
}
if (!eq(i_Left.Object, i_Right.Object)) {
- log.println("Objects differ: " +
+ System.out.println("Objects differ: " +
i_Left.Object.getStringValue() + " != " +
i_Right.Object.getStringValue());
return false;
@@ -1105,7 +1100,7 @@ public class DocumentMetadataAccessTest extends ComplexTestCase
static boolean eq(Statement[] i_Result, Statement[] i_Expected)
{
if (i_Result.length != i_Expected.length) {
- log.println("eq: different lengths: " + i_Result.length + " " +
+ System.out.println("eq: different lengths: " + i_Result.length + " " +
i_Expected.length);
return false;
}
@@ -1113,8 +1108,13 @@ public class DocumentMetadataAccessTest extends ComplexTestCase
java.util.Arrays.asList(i_Expected).toArray();
java.util.Arrays.sort(i_Result, new StmtComp());
java.util.Arrays.sort(expected, new StmtComp());
- for (int i = 0; i < expected.length; ++i) {
- if (!eq(i_Result[i], expected[i])) return false;
+ for (int i = 0; i < expected.length; ++i)
+ {
+ // This is better for debug!
+ final Statement a = i_Result[i];
+ final Statement b = expected[i];
+ final boolean cond = eq(a, b);
+ if (!cond) return false;
}
return true;
}
@@ -1141,15 +1141,15 @@ public class DocumentMetadataAccessTest extends ComplexTestCase
static boolean eq(XQuerySelectResult i_Result,
String[] i_Vars, XNode[][] i_Bindings) throws Exception
{
- String[] vars = (String[]) i_Result.getBindingNames();
+ String[] vars = i_Result.getBindingNames();
XEnumeration iter = (XEnumeration) i_Result;
XNode[][] bindings = toSeqs(iter);
if (vars.length != i_Vars.length) {
- log.println("var lengths differ");
+ System.out.println("var lengths differ");
return false;
}
if (bindings.length != i_Bindings.length) {
- log.println("binding lengths differ: " + i_Bindings.length +
+ System.out.println("binding lengths differ: " + i_Bindings.length +
" vs " + bindings.length );
return false;
}
@@ -1157,16 +1157,16 @@ public class DocumentMetadataAccessTest extends ComplexTestCase
java.util.Arrays.sort(i_Bindings, new BindingComp());
for (int i = 0; i < i_Bindings.length; ++i) {
if (i_Bindings[i].length != i_Vars.length) {
- log.println("TEST ERROR!");
+ System.out.println("TEST ERROR!");
throw new Exception();
}
if (bindings[i].length != i_Vars.length) {
- log.println("binding length and var length differ");
+ System.out.println("binding length and var length differ");
return false;
}
for (int j = 0; j < i_Vars.length; ++j) {
if (!eq(bindings[i][j], i_Bindings[i][j])) {
- log.println("bindings differ: " +
+ System.out.println("bindings differ: " +
toS(bindings[i][j]) + " != " + toS(i_Bindings[i][j]));
return false;
}
@@ -1174,7 +1174,7 @@ public class DocumentMetadataAccessTest extends ComplexTestCase
}
for (int i = 0; i < i_Vars.length; ++i) {
if (!vars[i].equals(i_Vars[i])) {
- log.println("variable names differ: " +
+ System.out.println("variable names differ: " +
vars[i] + " != " + i_Vars[i]);
return false;
}
@@ -1253,17 +1253,27 @@ public class DocumentMetadataAccessTest extends ComplexTestCase
public String getLocalName() { return ""; }
public StringPair getMetadataReference()
- { return new StringPair(m_Stream, m_XmlId); }
+ {
+ return new StringPair(m_Stream, m_XmlId);
+ }
public void setMetadataReference(StringPair i_Ref)
throws IllegalArgumentException
- { m_Stream = (String)i_Ref.First; m_XmlId = (String)i_Ref.Second; }
+ {
+ m_Stream = i_Ref.First;
+ m_XmlId = i_Ref.Second;
+ }
public void ensureMetadataReference()
- { m_Stream = "content.xml"; m_XmlId = "42"; }
+ {
+ m_Stream = "content.xml";
+ m_XmlId = "42";
+ }
public String getImplementationName() { return null; }
public String[] getSupportedServiceNames() { return null; }
public boolean supportsService(String i_Svc)
- { return i_Svc.equals("com.sun.star.text.Paragraph"); }
+ {
+ return i_Svc.equals("com.sun.star.text.Paragraph");
+ }
public XText getText() { return null; }
public XTextRange getStart() { return null; }
@@ -1271,5 +1281,33 @@ public class DocumentMetadataAccessTest extends ComplexTestCase
public String getString() { return m_Text; }
public void setString(String i_Str) { m_Text = i_Str; }
}
+
+
+
+ private XMultiServiceFactory getMSF()
+ {
+ final XMultiServiceFactory xMSF1 = UnoRuntime.queryInterface(XMultiServiceFactory.class, connection.getComponentContext().getServiceManager());
+ return xMSF1;
+ }
+
+ // setup and close connections
+ @BeforeClass public static void setUpConnection() throws Exception {
+ System.out.println( "------------------------------------------------------------" );
+ System.out.println( "starting class: " + DocumentMetadataAccess.class.getName() );
+ System.out.println( "------------------------------------------------------------" );
+ connection.setUp();
+ }
+
+ @AfterClass public static void tearDownConnection()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ System.out.println( "------------------------------------------------------------" );
+ System.out.println( "finishing class: " + DocumentMetadataAccess.class.getName() );
+ System.out.println( "------------------------------------------------------------" );
+ connection.tearDown();
+ }
+
+ private static final OfficeConnection connection = new OfficeConnection();
+
}
diff --git a/sfx2/qa/complex/DocumentMetaData.java b/sfx2/qa/complex/sfx2/DocumentProperties.java
index ae7970227c75..01ccaa21619b 100644..100755
--- a/sfx2/qa/complex/DocumentMetaData.java
+++ b/sfx2/qa/complex/sfx2/DocumentProperties.java
@@ -25,16 +25,14 @@
*
************************************************************************/
-package complex.framework;
+package complex.sfx2;
-import complexlib.ComplexTestCase;
-import helper.StreamSimulator;
+import complex.sfx2.tools.TestDocument;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.XComponentContext;
-import com.sun.star.uno.Any;
import com.sun.star.lang.XInitialization;
-import com.sun.star.lang.XSingleServiceFactory;
+
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.lang.Locale;
import com.sun.star.lang.EventObject;
@@ -51,10 +49,15 @@ import com.sun.star.beans.NamedValue;
import com.sun.star.beans.PropertyAttribute;
import com.sun.star.beans.UnknownPropertyException;
import com.sun.star.beans.IllegalTypeException;
-import com.sun.star.embed.XStorage;
-import com.sun.star.io.XInputStream;
+
import com.sun.star.document.XDocumentProperties;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openoffice.test.OfficeConnection;
+import static org.junit.Assert.*;
/**
* Test case for the service com.sun.star.document.DocumentProperties.
@@ -63,13 +66,9 @@ import com.sun.star.document.XDocumentProperties;
*
* @author mst
*/
-public class DocumentMetaData extends ComplexTestCase
+public class DocumentProperties
{
- public String[] getTestMethodNames () {
- return new String[] { "check", "cleanup" };
- }
-
- public void cleanup() {
+ @After public void cleanup() {
// nothing to do
}
@@ -77,7 +76,7 @@ public class DocumentMetaData extends ComplexTestCase
class Listener implements XModifyListener {
private boolean m_Called;
- public Listener() {
+ Listener() {
m_Called = false;
}
@@ -95,19 +94,18 @@ public class DocumentMetaData extends ComplexTestCase
}
}
- public void check() {
+ @Test public void check() {
try {
- XMultiServiceFactory xMSF = (XMultiServiceFactory) param.getMSF();
- assure("could not create MultiServiceFactory.", xMSF != null);
- XPropertySet xPropertySet = (XPropertySet)
- UnoRuntime.queryInterface(XPropertySet.class, xMSF);
+ XMultiServiceFactory xMSF = getMSF();
+ assertNotNull("could not create MultiServiceFactory.", xMSF);
+ XPropertySet xPropertySet = UnoRuntime.queryInterface(XPropertySet.class, xMSF);
Object defaultCtx = xPropertySet.getPropertyValue("DefaultContext");
- XComponentContext xContext = (XComponentContext)
- UnoRuntime.queryInterface(XComponentContext.class, defaultCtx);
- assure("could not get component context.", xContext != null);
+ XComponentContext xContext = UnoRuntime.queryInterface(XComponentContext.class, defaultCtx);
+ assertNotNull("could not get component context.", xContext);
+ // TODO: Path to temp
String temp = util.utils.getOfficeTemp/*Dir*/(xMSF);
- log.println("tempdir: " + temp);
+ System.out.println("tempdir: " + temp);
PropertyValue[] noArgs = { };
PropertyValue mimetype = new PropertyValue();
@@ -120,61 +118,56 @@ public class DocumentMetaData extends ComplexTestCase
cfile.Value = temp + "EMPTY.odt";
PropertyValue[] mimeEmptyArgs = { mimetype, cfile };
- log.println("Creating service DocumentProperties...");
+ System.out.println("Creating service DocumentProperties...");
Object oDP =
// xMSF.createInstanceWithContext(
// "com.sun.star.document.DocumentProperties", xContext);
xMSF.createInstance("com.sun.star.document.DocumentProperties");
- XDocumentProperties xDP = (XDocumentProperties)
- UnoRuntime.queryInterface(XDocumentProperties.class, oDP);
+ XDocumentProperties xDP = UnoRuntime.queryInterface(XDocumentProperties.class, oDP);
- log.println("...done");
+ System.out.println("...done");
- log.println("Checking initialize ...");
+ System.out.println("Checking initialize ...");
- XDocumentProperties xDP2 = (XDocumentProperties)
- UnoRuntime.queryInterface(XDocumentProperties.class,
- xMSF.createInstance(
- "com.sun.star.document.DocumentProperties"));
- XInitialization xInit = (XInitialization)
- UnoRuntime.queryInterface(XInitialization.class, xDP2);
+ XDocumentProperties xDP2 = UnoRuntime.queryInterface(XDocumentProperties.class, xMSF.createInstance("com.sun.star.document.DocumentProperties"));
+ XInitialization xInit = UnoRuntime.queryInterface(XInitialization.class, xDP2);
xInit.initialize(new Object[] { });
- log.println("...done");
+ System.out.println("...done");
- log.println("Checking storing default-initialized meta data ...");
+ System.out.println("Checking storing default-initialized meta data ...");
// xDP2.storeToMedium(temp + "EMPTY.odt", mimeArgs);
xDP2.storeToMedium("", mimeEmptyArgs);
- log.println("...done");
+ System.out.println("...done");
- log.println("Checking loading default-initialized meta data ...");
+ System.out.println("Checking loading default-initialized meta data ...");
// xDP2.loadFromMedium(temp + "EMPTY.odt", noArgs);
xDP2.loadFromMedium("", mimeEmptyArgs);
- assure ("Author", "".equals(xDP2.getAuthor()));
+ assertTrue ("Author", "".equals(xDP2.getAuthor()));
- log.println("...done");
+ System.out.println("...done");
- log.println("(Not) Checking preservation of custom meta data ...");
+ System.out.println("(Not) Checking preservation of custom meta data ...");
- xDP2.loadFromMedium(util.utils.getFullTestURL("CUSTOM.odt"),
+ xDP2.loadFromMedium(TestDocument.getUrl("CUSTOM.odt"),
noArgs);
- assure ("Author", "".equals(xDP2.getAuthor()));
+ assertTrue ("Author", "".equals(xDP2.getAuthor()));
xDP2.storeToMedium(temp + "CUSTOM.odt", mimeArgs);
//FIXME: now what? comparing for binary equality seems useless
// we could unzip the written file and grep for the custom stuff
// but would that work on windows...
- log.println("...done");
+ System.out.println("...done");
- log.println("Checking loading from test document...");
+ System.out.println("Checking loading from test document...");
- String file = util.utils.getFullTestURL("TEST.odt");
+ String file = TestDocument.getUrl("TEST.odt");
xDP.loadFromMedium(file, noArgs);
/* XInputStream xStream =
new StreamSimulator("./testdocuments/TEST.odt", true, param);
@@ -188,68 +181,67 @@ public class DocumentMetaData extends ComplexTestCase
XStorage.class, oStor);
xDP.loadFromStorage(xStor);*/
- log.println("...done");
+ System.out.println("...done");
- log.println("Checking meta-data import...");
+ System.out.println("Checking meta-data import...");
- assure ("Author", "Karl-Heinz Mustermann".equals(xDP.getAuthor()));
- assure ("Generator",
+ assertTrue("Author", "Karl-Heinz Mustermann".equals(xDP.getAuthor()));
+ assertTrue("Generator",
"StarOffice/8$Solaris_x86 OpenOffice.org_project/680m232$Build-9227"
.equals(xDP.getGenerator()));
- assure ("CreationDate", 2007 == xDP.getCreationDate().Year);
- assure ("Title", "Urgent Memo".equals(xDP.getTitle()));
- assure ("Subject", "Wichtige Mitteilung".equals(xDP.getSubject()));
- assure ("Description",
+ assertTrue("CreationDate", 2007 == xDP.getCreationDate().Year);
+ assertTrue("Title", "Urgent Memo".equals(xDP.getTitle()));
+ assertTrue("Subject", "Wichtige Mitteilung".equals(xDP.getSubject()));
+ assertTrue("Description",
"Modern internal company memorandum in full-blocked style"
.equals(xDP.getDescription()));
-// assure ("Language", "".equals(xDP.getLanguage()));
- assure ("ModifiedBy",
+// assertTrue("Language", "".equals(xDP.getLanguage()));
+ assertTrue("ModifiedBy",
"Karl-Heinz Mustermann".equals(xDP.getModifiedBy()));
- assure ("ModificationDate", 10 == xDP.getModificationDate().Month);
- assure ("PrintedBy",
+ assertTrue("ModificationDate", 10 == xDP.getModificationDate().Month);
+ assertTrue("PrintedBy",
"Karl-Heinz Mustermann".equals(xDP.getPrintedBy()));
- assure ("PrintDate", 29 == xDP.getPrintDate().Day);
- assure ("TemplateName",
+ assertTrue("PrintDate", 29 == xDP.getPrintDate().Day);
+ assertTrue("TemplateName",
"Modern Memo".equals(xDP.getTemplateName()));
- assure ("TemplateURL",
+ assertTrue("TemplateURL",
xDP.getTemplateURL().endsWith("memmodern.ott"));
- assure ("TemplateDate", 17 == xDP.getTemplateDate().Hours);
- assure ("AutoloadURL", "../TEST.odt".equals(xDP.getAutoloadURL()));
- assure ("AutoloadSecs", 0 == xDP.getAutoloadSecs());
- assure ("DefaultTarget", "_blank".equals(xDP.getDefaultTarget()));
- assure ("EditingCycles", 3 == xDP.getEditingCycles());
- assure ("EditingDuration", 320 == xDP.getEditingDuration());
+ assertTrue("TemplateDate", 17 == xDP.getTemplateDate().Hours);
+ assertTrue("AutoloadURL", "../TEST.odt".equals(xDP.getAutoloadURL()));
+ assertTrue("AutoloadSecs", 0 == xDP.getAutoloadSecs());
+ assertTrue("DefaultTarget", "_blank".equals(xDP.getDefaultTarget()));
+ assertTrue("EditingCycles", 3 == xDP.getEditingCycles());
+ assertTrue("EditingDuration", 320 == xDP.getEditingDuration());
String[] kws = xDP.getKeywords();
- assure ("Keywords", fromArray(kws).containsAll(
+ assertTrue("Keywords", fromArray(kws).containsAll(
fromArray(new Object[] { "Asien", "Memo", "Reis" })));
NamedValue[] ds = xDP.getDocumentStatistics();
/* for (int i = 0; i < ds.length; ++i) {
- log.println("nv: " + ds[i].Name + " " + ds[i].Value);
+ System.out.println("nv: " + ds[i].Name + " " + ds[i].Value);
}
NamedValue nv1 = new NamedValue("WordCount", new Integer(23));
NamedValue nv2 = new NamedValue("WordCount", new Integer(23));
- log.println("eq: " + nv1.equals(nv2)); // grrr, this is false...
+ System.out.println("eq: " + nv1.equals(nv2)); // grrr, this is false...
*/
- assure ("DocumentStatistics:WordCount", containsNV(ds,
+ assertTrue("DocumentStatistics:WordCount", containsNV(ds,
new NamedValue("WordCount", new Integer(23))));
- assure ("DocumentStatistics:PageCount", containsNV(ds,
+ assertTrue("DocumentStatistics:PageCount", containsNV(ds,
new NamedValue("PageCount", new Integer(1))));
XPropertyContainer udpc = xDP.getUserDefinedProperties();
- XPropertySet udps = (XPropertySet) UnoRuntime.queryInterface(
- XPropertySet.class, udpc);
- assure ("UserDefined 1", "Dies ist ein wichtiger Hinweis"
+ XPropertySet udps = UnoRuntime.queryInterface( XPropertySet.class, udpc );
+ assertTrue("UserDefined 1", "Dies ist ein wichtiger Hinweis"
.equals(udps.getPropertyValue("Hinweis")));
- assure ("UserDefined 2", ("Kann Spuren von N"
+ assertTrue("UserDefined 2", ("Kann Spuren von N"
+ new String(new byte[] { (byte) 0xc3, (byte) 0xbc }, "UTF-8")
+ "ssen enthalten")
.equals(udps.getPropertyValue("Warnung")));
- log.println("...done");
+ System.out.println("...done");
- log.println("Checking meta-data updates...");
+ System.out.println("Checking meta-data updates...");
String str;
DateTime dt = new DateTime();
@@ -258,75 +250,75 @@ public class DocumentMetaData extends ComplexTestCase
str = "me";
xDP.setAuthor(str);
- assure ("setAuthor", str.equals(xDP.getAuthor()));
+ assertTrue("setAuthor", str.equals(xDP.getAuthor()));
str = "the computa";
xDP.setGenerator(str);
- assure ("setGenerator", str.equals(xDP.getGenerator()));
+ assertTrue("setGenerator", str.equals(xDP.getGenerator()));
dt.Year = 2038;
dt.Month = 1;
dt.Day = 1;
xDP.setCreationDate(dt);
- assure ("setCreationDate", dt.Year == xDP.getCreationDate().Year);
+ assertTrue("setCreationDate", dt.Year == xDP.getCreationDate().Year);
str = "El t'itulo";
xDP.setTitle(str);
- assure ("setTitle", str.equals(xDP.getTitle()));
+ assertTrue("setTitle", str.equals(xDP.getTitle()));
str = "Ein verkommenes Subjekt";
xDP.setSubject(str);
- assure ("setSubject", str.equals(xDP.getSubject()));
+ assertTrue("setSubject", str.equals(xDP.getSubject()));
str = "Este descripci'on no es importante";
xDP.setDescription(str);
- assure ("setDescription", str.equals(xDP.getDescription()));
+ assertTrue("setDescription", str.equals(xDP.getDescription()));
l.Language = "en";
l.Country = "GB";
xDP.setLanguage(l);
Locale l2 = xDP.getLanguage();
- assure ("setLanguage Lang", l.Language.equals(l2.Language));
- assure ("setLanguage Cty", l.Country.equals(l2.Country));
+ assertTrue("setLanguage Lang", l.Language.equals(l2.Language));
+ assertTrue("setLanguage Cty", l.Country.equals(l2.Country));
str = "myself";
xDP.setModifiedBy(str);
- assure ("setModifiedBy", str.equals(xDP.getModifiedBy()));
+ assertTrue("setModifiedBy", str.equals(xDP.getModifiedBy()));
dt.Year = 2042;
xDP.setModificationDate(dt);
- assure ("setModificationDate",
+ assertTrue("setModificationDate",
dt.Year == xDP.getModificationDate().Year);
str = "i didnt do it";
xDP.setPrintedBy(str);
- assure ("setPrintedBy", str.equals(xDP.getPrintedBy()));
+ assertTrue("setPrintedBy", str.equals(xDP.getPrintedBy()));
dt.Year = 2024;
xDP.setPrintDate(dt);
- assure ("setPrintDate", dt.Year == xDP.getPrintDate().Year);
+ assertTrue("setPrintDate", dt.Year == xDP.getPrintDate().Year);
str = "blah";
xDP.setTemplateName(str);
- assure ("setTemplateName", str.equals(xDP.getTemplateName()));
+ assertTrue("setTemplateName", str.equals(xDP.getTemplateName()));
str = "gopher://some-hole-in-the-ground/";
xDP.setTemplateURL(str);
- assure ("setTemplateURL", str.equals(xDP.getTemplateURL()));
+ assertTrue("setTemplateURL", str.equals(xDP.getTemplateURL()));
dt.Year = 2043;
xDP.setTemplateDate(dt);
- assure ("setTemplateDate", dt.Year == xDP.getTemplateDate().Year);
+ assertTrue("setTemplateDate", dt.Year == xDP.getTemplateDate().Year);
str = "http://nowhere/";
xDP.setAutoloadURL(str);
- assure ("setAutoloadURL", str.equals(xDP.getAutoloadURL()));
+ assertTrue("setAutoloadURL", str.equals(xDP.getAutoloadURL()));
i = 3661; // this might not work (due to conversion via double...)
xDP.setAutoloadSecs(i);
-// log.println("set: " + i + " get: " + xDP.getAutoloadSecs());
- assure ("setAutoloadSecs", i == xDP.getAutoloadSecs());
+// System.out.println("set: " + i + " get: " + xDP.getAutoloadSecs());
+ assertTrue("setAutoloadSecs", i == xDP.getAutoloadSecs());
str = "_blank";
xDP.setDefaultTarget(str);
- assure ("setDefaultTarget", str.equals(xDP.getDefaultTarget()));
+ assertTrue("setDefaultTarget", str.equals(xDP.getDefaultTarget()));
i = 42;
xDP.setEditingCycles((short) i);
- assure ("setEditingCycles", i == xDP.getEditingCycles());
+ assertTrue("setEditingCycles", i == xDP.getEditingCycles());
i = 84;
xDP.setEditingDuration(i);
- assure ("setEditingDuration", i == xDP.getEditingDuration());
+ assertTrue("setEditingDuration", i == xDP.getEditingDuration());
str = "";
String[] kws2 = new String[] {
"keywordly", "keywordlike", "keywordalicious" };
xDP.setKeywords(kws2);
kws = xDP.getKeywords();
- assure ("setKeywords", fromArray(kws).containsAll(fromArray(kws2)));
+ assertTrue("setKeywords", fromArray(kws).containsAll(fromArray(kws2)));
NamedValue[] ds2 = new NamedValue[] {
new NamedValue("SyllableCount", new Integer(9)),
@@ -334,16 +326,16 @@ public class DocumentMetaData extends ComplexTestCase
new NamedValue("SentenceCount", new Integer(7)) };
xDP.setDocumentStatistics(ds2);
ds = xDP.getDocumentStatistics();
- assure ("setDocumentStatistics:SyllableCount", containsNV(ds,
+ assertTrue("setDocumentStatistics:SyllableCount", containsNV(ds,
new NamedValue("SyllableCount", new Integer(9))));
- assure ("setDocumentStatistics:FrameCount", containsNV(ds,
+ assertTrue("setDocumentStatistics:FrameCount", containsNV(ds,
new NamedValue("FrameCount", new Integer(2))));
- assure ("setDocumentStatistics:SentenceCount", containsNV(ds,
+ assertTrue("setDocumentStatistics:SentenceCount", containsNV(ds,
new NamedValue("SentenceCount", new Integer(7))));
- log.println("...done");
+ System.out.println("...done");
- log.println("Checking user-defined meta-data updates...");
+ System.out.println("Checking user-defined meta-data updates...");
// actually, this tests the PropertyBag service
// but maybe the DocumentProperties service will be implemented
@@ -369,8 +361,7 @@ public class DocumentMetaData extends ComplexTestCase
dur.Seconds = 555;
dur.MilliSeconds = 444;
- udpc.addProperty("Frobnicate", PropertyAttribute.REMOVEABLE,
- new Boolean(b));
+ udpc.addProperty("Frobnicate", PropertyAttribute.REMOVEABLE, b);
udpc.addProperty("FrobDuration", PropertyAttribute.REMOVEABLE, dur);
udpc.addProperty("FrobDuration2", PropertyAttribute.REMOVEABLE, t);
udpc.addProperty("FrobEndDate", PropertyAttribute.REMOVEABLE, date);
@@ -384,109 +375,106 @@ public class DocumentMetaData extends ComplexTestCase
udpc.removeProperty("Info 1");
udpc.removeProperty("Removed");
} catch (UnknownPropertyException e) {
- assure("removeProperty failed", false);
+ fail("removeProperty failed");
}
try {
udpc.addProperty("Forbidden", PropertyAttribute.REMOVEABLE,
new String[] { "foo", "bar" });
- assure("inserting value of non-supported type did not fail",
- false);
+ fail("inserting value of non-supported type did not fail");
} catch (IllegalTypeException e) {
// ignore
}
- assure ("UserDefined bool", new Boolean(b).equals(
+ assertTrue("UserDefined bool", new Boolean(b).equals(
udps.getPropertyValue("Frobnicate")));
- assure ("UserDefined duration", eqDuration(dur, (Duration)
+ assertTrue("UserDefined duration", eqDuration(dur, (Duration)
udps.getPropertyValue("FrobDuration")));
- assure ("UserDefined time", eqTime(t, (Time)
+ assertTrue("UserDefined time", eqTime(t, (Time)
udps.getPropertyValue("FrobDuration2")));
- assure ("UserDefined date", eqDate(date, (Date)
+ assertTrue("UserDefined date", eqDate(date, (Date)
udps.getPropertyValue("FrobEndDate")));
- assure ("UserDefined datetime", eqDateTime(dt, (DateTime)
+ assertTrue("UserDefined datetime", eqDateTime(dt, (DateTime)
udps.getPropertyValue("FrobStartTime")));
- assure ("UserDefined float", new Double(d).equals(
+ assertTrue("UserDefined float", new Double(d).equals(
udps.getPropertyValue("Pi")));
- assure ("UserDefined string", "bar".equals(
+ assertTrue("UserDefined string", "bar".equals(
udps.getPropertyValue("Foo")));
- assure ("UserDefined empty name", "eeeeek".equals(
+ assertTrue("UserDefined empty name", "eeeeek".equals(
udps.getPropertyValue("")));
try {
udps.getPropertyValue("Removed");
- assure("UserDefined remove didn't", false);
+ fail("UserDefined remove didn't");
} catch (UnknownPropertyException e) {
// ok
}
- log.println("...done");
+ System.out.println("...done");
- log.println("Checking storing meta-data to file...");
+ System.out.println("Checking storing meta-data to file...");
xDP.storeToMedium(temp + "TEST.odt", mimeArgs);
- log.println("...done");
+ System.out.println("...done");
- log.println("Checking loading meta-data from stored file...");
+ System.out.println("Checking loading meta-data from stored file...");
xDP.loadFromMedium(temp + "TEST.odt", noArgs);
- log.println("...done");
+ System.out.println("...done");
- log.println("Checking user-defined meta-data from stored file...");
+ System.out.println("Checking user-defined meta-data from stored file...");
udpc = xDP.getUserDefinedProperties();
- udps = (XPropertySet) UnoRuntime.queryInterface(
- XPropertySet.class, udpc);
+ udps = UnoRuntime.queryInterface( XPropertySet.class, udpc );
- assure ("UserDefined bool", new Boolean(b).equals(
+ assertTrue("UserDefined bool", new Boolean(b).equals(
udps.getPropertyValue("Frobnicate")));
- assure ("UserDefined duration", eqDuration(dur, (Duration)
+ assertTrue("UserDefined duration", eqDuration(dur, (Duration)
udps.getPropertyValue("FrobDuration")));
// 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)
+ assertTrue("UserDefined time", eqDuration(t_dur, (Duration)
udps.getPropertyValue("FrobDuration2")));
- assure ("UserDefined date", eqDate(date, (Date)
+ assertTrue("UserDefined date", eqDate(date, (Date)
udps.getPropertyValue("FrobEndDate")));
- assure ("UserDefined datetime", eqDateTime(dt, (DateTime)
+ assertTrue("UserDefined datetime", eqDateTime(dt, (DateTime)
udps.getPropertyValue("FrobStartTime")));
- assure ("UserDefined float", new Double(d).equals(
+ assertTrue("UserDefined float", new Double(d).equals(
udps.getPropertyValue("Pi")));
- assure ("UserDefined string", "bar".equals(
+ assertTrue("UserDefined string", "bar".equals(
udps.getPropertyValue("Foo")));
try {
udps.getPropertyValue("Removed");
- assure("UserDefined remove didn't", false);
+ fail("UserDefined remove didn't");
} catch (UnknownPropertyException e) {
// ok
}
- log.println("...done");
+ System.out.println("...done");
- log.println("Checking notification listener interface...");
+ System.out.println("Checking notification listener interface...");
Listener listener = new Listener();
- XModifyBroadcaster xMB = (XModifyBroadcaster)
- UnoRuntime.queryInterface(XModifyBroadcaster.class, xDP);
+ XModifyBroadcaster xMB = UnoRuntime.queryInterface( XModifyBroadcaster.class, xDP );
xMB.addModifyListener(listener);
xDP.setAuthor("not me");
- assure ("Listener Author", listener.reset());
+ assertTrue("Listener Author", listener.reset());
udpc.addProperty("Listener", PropertyAttribute.REMOVEABLE, "foo");
- assure ("Listener UserDefined Add", listener.reset());
+ assertTrue("Listener UserDefined Add", listener.reset());
udps.setPropertyValue("Listener", "bar");
- assure ("Listener UserDefined Set", listener.reset());
+ assertTrue("Listener UserDefined Set", listener.reset());
udpc.removeProperty("Listener");
- assure ("Listener UserDefined Remove", listener.reset());
+ assertTrue("Listener UserDefined Remove", listener.reset());
xMB.removeModifyListener(listener);
udpc.addProperty("Listener2", PropertyAttribute.REMOVEABLE, "foo");
- assure ("Removed Listener UserDefined Add", !listener.reset());
+ assertTrue("Removed Listener UserDefined Add", !listener.reset());
- log.println("...done");
+ System.out.println("...done");
} catch (Exception e) {
report(e);
@@ -538,9 +526,36 @@ public class DocumentMetaData extends ComplexTestCase
}
public void report(Exception e) {
- log.println("Exception occurred:");
- e.printStackTrace((java.io.PrintWriter) log);
- failed();
+ System.out.println("Exception occurred:");
+ e.printStackTrace();
+ fail();
+ }
+
+
+ private XMultiServiceFactory getMSF()
+ {
+ final XMultiServiceFactory xMSF1 = UnoRuntime.queryInterface( XMultiServiceFactory.class, connection.getComponentContext().getServiceManager() );
+ return xMSF1;
}
+
+ // setup and close connections
+ @BeforeClass public static void setUpConnection() throws Exception {
+ System.out.println( "------------------------------------------------------------" );
+ System.out.println( "starting class: " + DocumentProperties.class.getName() );
+ System.out.println( "------------------------------------------------------------" );
+ connection.setUp();
+ }
+
+ @AfterClass public static void tearDownConnection()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ System.out.println( "------------------------------------------------------------" );
+ System.out.println( "finishing class: " + DocumentProperties.class.getName() );
+ System.out.println( "------------------------------------------------------------" );
+ connection.tearDown();
+ }
+
+ private static final OfficeConnection connection = new OfficeConnection();
+
}
diff --git a/sfx2/qa/complex/sfx2/GlobalEventBroadcaster.java b/sfx2/qa/complex/sfx2/GlobalEventBroadcaster.java
new file mode 100755
index 000000000000..41bd66ccb5b9
--- /dev/null
+++ b/sfx2/qa/complex/sfx2/GlobalEventBroadcaster.java
@@ -0,0 +1,273 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+package complex.sfx2;
+
+import com.sun.star.awt.XWindow;
+import com.sun.star.document.XEventBroadcaster;
+import com.sun.star.document.XEventListener;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.sheet.XSpreadsheetDocument;
+import com.sun.star.text.XTextDocument;
+import com.sun.star.uno.UnoRuntime;
+import complex.sfx2.tools.WriterHelper;
+
+import java.util.ArrayList;
+
+import util.UITools;
+
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openoffice.test.OfficeConnection;
+import static org.junit.Assert.*;
+
+
+/**
+ * This testcase checks the GlobalEventBroadcaster
+ * it will add an XEventListener and verify the Events
+ * raised when opening/changing and closing Office Documents
+ */
+public class GlobalEventBroadcaster {
+ XMultiServiceFactory m_xMSF = null;
+ XEventBroadcaster m_xEventBroadcaster = null;
+ ArrayList notifyEvents = new ArrayList();
+ // XTextDocument xTextDoc;
+ XSpreadsheetDocument xSheetDoc;
+ XEventListener m_xEventListener = new EventListenerImpl();
+
+ @Before public void initialize() {
+ m_xMSF = getMSF();
+ System.out.println("check wether there is a valid MultiServiceFactory");
+
+ assertNotNull("## Couldn't get MultiServiceFactory make sure your Office is started", m_xMSF);
+
+ System.out.println("... done");
+
+ System.out.println(
+ "Create an instance of com.sun.star.frame.GlobalEventBroadcaster");
+
+ Object GlobalEventBroadcaster = null;
+
+ try {
+ GlobalEventBroadcaster = m_xMSF.createInstance(
+ "com.sun.star.frame.GlobalEventBroadcaster");
+ } catch (com.sun.star.uno.Exception e) {
+ fail("## Exception while creating instance");
+ }
+
+ System.out.println("... done");
+
+ System.out.println("check wether the created instance is valid");
+
+ assertNotNull("couldn't create service", GlobalEventBroadcaster);
+
+ System.out.println("... done");
+
+ System.out.println(
+ "try to query the XEventBroadcaster from the gained Object");
+ m_xEventBroadcaster = UnoRuntime.queryInterface(XEventBroadcaster.class, GlobalEventBroadcaster);
+
+ if (util.utils.isVoid(m_xEventBroadcaster)) {
+ fail("couldn't get XEventBroadcaster");
+ }
+
+ System.out.println("... done");
+
+ System.out.println("adding Listener");
+ m_xEventBroadcaster.addEventListener(m_xEventListener);
+ System.out.println("... done");
+ }
+
+ @Test public void checkWriter() {
+ System.out.println("-- Checking Writer --");
+
+ WriterHelper wHelper = new WriterHelper(m_xMSF);
+ String[] expected;
+ System.out.println("opening an empty writer doc");
+ notifyEvents.clear();
+ {
+ XTextDocument xTextDoc = wHelper.openEmptyDoc();
+ shortWait();
+ expected = new String[] { "OnUnfocus", "OnCreate", "OnViewCreated", "OnFocus" };
+
+ assertTrue("Wrong events fired when opening empty doc",
+ proveExpectation(expected));
+ System.out.println("... done");
+
+ System.out.println("changing the writer doc");
+ notifyEvents.clear();
+ xTextDoc.getText().setString("GlobalEventBroadcaster");
+ shortWait();
+ expected = new String[] { "OnModifyChanged" };
+
+ assertTrue("Wrong events fired when changing doc",
+ proveExpectation(expected));
+ System.out.println("... done");
+
+ System.out.println("closing the empty writer doc");
+ notifyEvents.clear();
+ wHelper.closeDoc(xTextDoc);
+ shortWait();
+ }
+ expected = new String[] { "OnUnfocus", "OnFocus", "OnViewClosed", "OnUnload" };
+
+ assertTrue("Wrong events fired when closing empty doc",
+ proveExpectation(expected));
+ System.out.println("... done");
+
+ System.out.println("opening an writer doc via Window-New Window");
+ notifyEvents.clear();
+ {
+ XTextDocument xTextDoc = wHelper.openFromDialog(".uno:NewWindow", "", false);
+
+ shortWait();
+ expected = new String[] { "OnUnfocus", "OnCreate", "OnViewCreated", "OnFocus", "OnUnfocus", "OnViewCreated", "OnFocus", };
+
+ assertTrue("Wrong events fired when opening an writer doc via Window-New Window",
+ proveExpectation(expected));
+ System.out.println("... done");
+
+ System.out.println("closing the created writer doc");
+ notifyEvents.clear();
+
+ wHelper.closeDoc(xTextDoc);
+ shortWait();
+ }
+ expected = new String[] { "OnViewClosed", "OnUnfocus", "OnFocus", "OnViewClosed", "OnUnload" };
+
+ assertTrue("Wrong events fired when closing Window-New Window",
+ proveExpectation(expected));
+
+ System.out.println("... done");
+ // TODO: It seems not possible to close the document without interactiv question
+ // there the follow test will not be execute
+ if (false) {
+ System.out.println("Opening document with label wizard");
+ XTextDocument xTextDoc = wHelper.openFromDialog("private:factory/swriter?slot=21051", "", false);
+ shortWait();
+ XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, wHelper.getToolkit().getActiveTopWindow());
+ UITools ut = new UITools(m_xMSF,xWindow);
+ notifyEvents.clear();
+ System.out.println("pressing button 'New Document'");
+ try{
+ ut.clickButton ("New Document");
+ } catch (Exception e) {
+ System.out.println("Couldn't press Button");
+ }
+ System.out.println("... done");
+ shortWait();
+ shortWait();
+ shortWait();
+ expected = new String[] { "OnViewClosed", "OnCreate", "OnFocus", "OnModifyChanged" };
+
+ assertTrue("Wrong events fired when starting labels wizard",
+ proveExpectation(expected));
+
+ System.out.println("Try to close document...");
+ wHelper.closeDoc(xTextDoc);
+ shortWait();
+ wHelper.closeFromDialog();
+ shortWait();
+ xTextDoc = null;
+ }
+
+ System.out.println("-- Done Writer --");
+ }
+
+ @After public void cleanup() {
+ System.out.println("removing Listener");
+ m_xEventBroadcaster.removeEventListener(m_xEventListener);
+ System.out.println("... done");
+ }
+
+ /**
+ * Sleeps for 0.5 sec. to allow StarOffice to react on <code>
+ * reset</code> call.
+ */
+ private void shortWait() {
+ try {
+ Thread.sleep(2000);
+ } catch (InterruptedException e) {
+ System.out.println("While waiting :" + e);
+ }
+ }
+
+ private boolean proveExpectation(String[] expected) {
+ boolean locRes = true;
+ boolean failure = false;
+
+ System.out.println("Fired Events:");
+ for (int k=0;k<notifyEvents.size();k++) {
+ System.out.println("\t- "+notifyEvents.get(k));
+ }
+
+ for (int i = 0; i < expected.length; i++) {
+ locRes = notifyEvents.contains(expected[i]);
+
+ if (!locRes) {
+ System.out.println("The event " + expected[i] + " isn't fired");
+ failure = true;
+ }
+ }
+
+ return !failure;
+ }
+
+ public class EventListenerImpl implements XEventListener {
+ public void disposing(com.sun.star.lang.EventObject eventObject) {
+ System.out.println("disposing: " + eventObject.Source.toString());
+ }
+
+ public void notifyEvent(com.sun.star.document.EventObject eventObject) {
+ notifyEvents.add(eventObject.EventName);
+ }
+ }
+
+ private XMultiServiceFactory getMSF()
+ {
+ final XMultiServiceFactory xMSF1 = UnoRuntime.queryInterface(XMultiServiceFactory.class, connection.getComponentContext().getServiceManager());
+ return xMSF1;
+ }
+
+ // setup and close connections
+ @BeforeClass public static void setUpConnection() throws Exception {
+ System.out.println("setUpConnection()");
+ connection.setUp();
+ }
+
+ @AfterClass public static void tearDownConnection()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ System.out.println("tearDownConnection() CheckGlobalEventBroadcaster_writer1");
+ connection.tearDown();
+ }
+
+ private static final OfficeConnection connection = new OfficeConnection();
+
+}
diff --git a/sfx2/qa/complex/sfx2/StandaloneDocumentInfo.java b/sfx2/qa/complex/sfx2/StandaloneDocumentInfo.java
new file mode 100755
index 000000000000..1e9cbb1f4738
--- /dev/null
+++ b/sfx2/qa/complex/sfx2/StandaloneDocumentInfo.java
@@ -0,0 +1,99 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+package complex.sfx2;
+
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.uno.UnoRuntime;
+import complex.sfx2.standalonedocinfo.StandaloneDocumentInfoTest;
+import complex.sfx2.standalonedocinfo.Test01;
+
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openoffice.test.OfficeConnection;
+import static org.junit.Assert.*;
+
+/* Document here
+*/
+
+public class StandaloneDocumentInfo {
+ private XMultiServiceFactory m_xMSF = null;
+
+ @Before public void before() {
+ try {
+ m_xMSF = getMSF();
+ } catch(Exception e) {
+ fail( "Failed to create service factory!" );
+ }
+ if( m_xMSF ==null ) {
+ fail( "Failed to create service factory!" );
+ }
+ }
+
+ @After public void after() {
+ m_xMSF = null;
+ }
+
+ @Test public void ExecuteTest01() {
+ StandaloneDocumentInfoTest aTest = new Test01 (m_xMSF);
+ assertTrue( "Test01 failed!", aTest.test() );
+ }
+
+
+
+
+ private XMultiServiceFactory getMSF()
+ {
+ final XMultiServiceFactory xMSF1 = UnoRuntime.queryInterface(XMultiServiceFactory.class, connection.getComponentContext().getServiceManager());
+ return xMSF1;
+ }
+
+ // setup and close connections
+ @BeforeClass public static void setUpConnection() throws Exception
+ {
+ System.out.println( "------------------------------------------------------------" );
+ System.out.println( "starting class: " + StandaloneDocumentInfo.class.getName() );
+ System.out.println( "------------------------------------------------------------" );
+ connection.setUp();
+ }
+
+ @AfterClass public static void tearDownConnection()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ System.out.println( "------------------------------------------------------------" );
+ System.out.println( "finishing class: " + StandaloneDocumentInfo.class.getName() );
+ System.out.println( "------------------------------------------------------------" );
+ connection.tearDown();
+ }
+
+ private static final OfficeConnection connection = new OfficeConnection();
+
+}
+
+
diff --git a/sfx2/qa/complex/sfx2/UndoManager.java b/sfx2/qa/complex/sfx2/UndoManager.java
new file mode 100755
index 000000000000..f37530aba726
--- /dev/null
+++ b/sfx2/qa/complex/sfx2/UndoManager.java
@@ -0,0 +1,1464 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+package complex.sfx2;
+
+import com.sun.star.accessibility.XAccessible;
+import com.sun.star.accessibility.XAccessibleAction;
+import com.sun.star.awt.Point;
+import com.sun.star.awt.Size;
+import com.sun.star.awt.XControl;
+import com.sun.star.awt.XControlModel;
+import com.sun.star.beans.NamedValue;
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.container.NoSuchElementException;
+import com.sun.star.container.XChild;
+import com.sun.star.container.XIndexContainer;
+import com.sun.star.container.XNameContainer;
+import com.sun.star.container.XNameReplace;
+import com.sun.star.container.XSet;
+import com.sun.star.document.EmptyUndoStackException;
+import com.sun.star.document.UndoContextNotClosedException;
+import com.sun.star.document.UndoFailedException;
+import com.sun.star.document.UndoManagerEvent;
+import com.sun.star.document.XEmbeddedScripts;
+import com.sun.star.document.XEventsSupplier;
+import com.sun.star.document.XUndoAction;
+import com.sun.star.lang.EventObject;
+import com.sun.star.lang.IndexOutOfBoundsException;
+import com.sun.star.lang.XEventListener;
+import java.lang.reflect.InvocationTargetException;
+import org.openoffice.test.tools.OfficeDocument;
+import com.sun.star.document.XUndoManagerSupplier;
+import com.sun.star.document.XUndoManager;
+import com.sun.star.document.XUndoManagerListener;
+import com.sun.star.drawing.XControlShape;
+import com.sun.star.drawing.XDrawPage;
+import com.sun.star.drawing.XDrawPageSupplier;
+import com.sun.star.drawing.XShapes;
+import com.sun.star.lang.XComponent;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.lang.XServiceInfo;
+import com.sun.star.lang.XSingleComponentFactory;
+import com.sun.star.lang.XTypeProvider;
+import com.sun.star.script.ScriptEventDescriptor;
+import com.sun.star.script.XEventAttacherManager;
+import com.sun.star.script.XLibraryContainer;
+import com.sun.star.task.XJob;
+import com.sun.star.uno.Type;
+import com.sun.star.uno.UnoRuntime;
+import com.sun.star.uno.XComponentContext;
+import com.sun.star.util.InvalidStateException;
+import com.sun.star.util.NotLockedException;
+import com.sun.star.view.XControlAccess;
+import complex.sfx2.undo.CalcDocumentTest;
+import complex.sfx2.undo.ChartDocumentTest;
+import complex.sfx2.undo.DocumentTest;
+import complex.sfx2.undo.DrawDocumentTest;
+import complex.sfx2.undo.ImpressDocumentTest;
+import complex.sfx2.undo.WriterDocumentTest;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.Stack;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import static org.junit.Assert.*;
+import org.openoffice.test.OfficeConnection;
+import org.openoffice.test.tools.DocumentType;
+import org.openoffice.test.tools.SpreadsheetDocument;
+
+/**
+ * Unit test for the UndoManager API
+ *
+ * @author frank.schoenheit@oracle.com
+ */
+public class UndoManager
+{
+ // -----------------------------------------------------------------------------------------------------------------
+ @Before
+ public void beforeTest() throws com.sun.star.uno.Exception
+ {
+ m_currentTestCase = null;
+ m_currentDocument = null;
+ m_undoListener = null;
+
+ // at our service factory, insert a new factory for our CallbackComponent
+ // this will allow the Basic code in our test documents to call back into this test case
+ // here, by just instantiating this service
+ final XSet globalFactory = UnoRuntime.queryInterface( XSet.class, getORB() );
+ m_callbackFactory = new CallbackComponentFactory();
+ globalFactory.insert( m_callbackFactory );
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ @Test
+ public void checkWriterUndo() throws Exception
+ {
+ m_currentTestCase = new WriterDocumentTest( getORB() );
+ impl_checkUndo();
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ @Test
+ public void checkCalcUndo() throws Exception
+ {
+ m_currentTestCase = new CalcDocumentTest( getORB() );
+ impl_checkUndo();
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ @Test
+ public void checkDrawUndo() throws Exception
+ {
+ m_currentTestCase = new DrawDocumentTest( getORB() );
+ impl_checkUndo();
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ @Test
+ public void checkImpressUndo() throws Exception
+ {
+ m_currentTestCase = new ImpressDocumentTest( getORB() );
+ impl_checkUndo();
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ @Test
+ public void checkChartUndo() throws Exception
+ {
+ m_currentTestCase = new ChartDocumentTest( getORB() );
+ impl_checkUndo();
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+//#i116813# disabled @Test
+ public void checkBrokenScripts() throws com.sun.star.uno.Exception, InterruptedException
+ {
+ System.out.println( "testing: broken scripts" );
+
+ m_currentDocument = OfficeDocument.blankDocument( getORB(), DocumentType.CALC );
+ m_undoListener = new UndoListener();
+ getUndoManager().addUndoManagerListener( m_undoListener );
+
+ impl_setupBrokenBasicScript();
+ final String scriptURI = "vnd.sun.star.script:default.callbacks.brokenScript?language=Basic&location=document";
+
+ // .............................................................................................................
+ // scenario 1: Pressing a button which is bound to execute the script
+ // (This is one of the many cases where SfxObjectShell::CallXScript is invoked)
+
+ // set up the button
+ final XPropertySet buttonModel = impl_setupButton();
+ buttonModel.setPropertyValue( "Label", "exec broken script" );
+ impl_assignScript( buttonModel, "XActionListener", "actionPerformed",
+ scriptURI );
+
+ // switch the doc's view to form alive mode (so the button will actually work)
+ m_currentDocument.getCurrentView().dispatch( ".uno:SwitchControlDesignMode" );
+
+ // click the button
+ m_callbackCalled = false;
+ impl_clickButton( buttonModel );
+ // the macro is executed asynchronously by the button, so wait at most 2 seconds for the callback to be
+ // triggered
+ impl_waitFor( m_callbackCondition, 2000 );
+ // check the callback has actually been called
+ assertTrue( "clicking the test button did not work as expected - basic script not called", m_callbackCalled );
+
+ // again, since the script is executed asynchronously, we might arrive here while its execution
+ // is not completely finished. Give OOo another (at most) 2 seconds to finish it.
+ m_undoListener.waitForAllContextsClosed( 20000 );
+ // assure that the Undo Context Depth of the doc is still "0": The Basic script entered such a
+ // context, and didn't close it (thus it is broken), but the application framework should have
+ // auto-closed the context after the macro finished.
+ assertEquals( "undo context was not auto-closed as expected", 0, m_undoListener.getCurrentUndoContextDepth() );
+
+ // .............................................................................................................
+ // scenario 2: dispatching the script URL. Technically, this is equivalent to configuring the
+ // script into a menu or toolbar, and selecting the respective menu/toolbar item
+ m_callbackCalled = false;
+ m_currentDocument.getCurrentView().dispatch( scriptURI );
+ assertTrue( "dispatching the Script URL did not work as expected - basic script not called", m_callbackCalled );
+ // same as above: The script didn't close the context, but the OOo framework should have
+ assertEquals( "undo context was not auto-closed as expected", 0, m_undoListener.getCurrentUndoContextDepth() );
+
+ // .............................................................................................................
+ // scenario 3: assigning the script to some document event, and triggering this event
+ final XEventsSupplier eventSupplier = UnoRuntime.queryInterface( XEventsSupplier.class, m_currentDocument.getDocument() );
+ final XNameReplace events = UnoRuntime.queryInterface( XNameReplace.class, eventSupplier.getEvents() );
+ final NamedValue[] scriptDescriptor = new NamedValue[] {
+ new NamedValue( "EventType", "Script" ),
+ new NamedValue( "Script", scriptURI )
+ };
+ events.replaceByName( "OnViewCreated", scriptDescriptor );
+
+ // The below doesn't work: event notification is broken in m96, see http://www.openoffice.org/issues/show_bug.cgi?id=116313
+/* m_callbackCalled = false;
+ m_currentDocument.getCurrentView().dispatch( ".uno:NewWindow" );
+ assertTrue( "triggering an event did not work as expected - basic script not called", m_callbackCalled );
+ // same as above: The script didn't close the context, but the OOo framework should have
+ assertEquals( "undo context was not auto-closed as expected", 0, m_undoListener.getCurrentUndoContextDepth() );
+ */
+
+ // .............................................................................................................
+ // scenario 4: let the script enter an Undo context, but not close it, as usual.
+ // Additionally, let the script close the document - the OOo framework code which cares for
+ // auto-closing of Undo contexts should survive this, ideally ...
+ m_closeAfterCallback = true;
+ m_callbackCalled = false;
+ m_currentDocument.getCurrentView().dispatch( scriptURI );
+ assertTrue( m_callbackCalled );
+ assertTrue( "The Basic script should have closed the document.", m_undoListener.isDisposed() );
+ m_currentDocument = null;
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ @Test
+ public void checkSerialization() throws com.sun.star.uno.Exception, InterruptedException
+ {
+ System.out.println( "testing: request serialization" );
+
+ m_currentDocument = OfficeDocument.blankDocument( getORB(), DocumentType.CALC );
+ final XUndoManager undoManager = getUndoManager();
+
+ final int threadCount = 10;
+ final int actionsPerThread = 10;
+ final int actionCount = threadCount * actionsPerThread;
+
+ // add some actions to the UndoManager, each knowing its position on the stack
+ final Object lock = new Object();
+ final Integer actionsUndone[] = new Integer[] { 0 };
+ for ( int i=actionCount; i>0; )
+ undoManager.addUndoAction( new CountingUndoAction( --i, lock, actionsUndone ) );
+
+ // some concurrent threads which undo the actions
+ Thread[] threads = new Thread[threadCount];
+ for ( int i=0; i<threadCount; ++i )
+ {
+ threads[i] = new Thread()
+ {
+ @Override
+ public void run()
+ {
+ for ( int j=0; j<actionsPerThread; ++j )
+ {
+ try { undoManager.undo(); }
+ catch ( final Exception e )
+ {
+ fail( "Those dummy actions are not expected to fail." );
+ return;
+ }
+ }
+ }
+ };
+ }
+
+ // start the threads
+ for ( int i=0; i<threadCount; ++i )
+ threads[i].start();
+
+ // wait for them to be finished
+ for ( int i=0; i<threadCount; ++i )
+ threads[i].join();
+
+ // ensure all actions have been undone
+ assertEquals( "not all actions have been undone", actionCount, actionsUndone[0].intValue() );
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ @After
+ public void afterTest()
+ {
+ if ( m_currentTestCase != null )
+ m_currentTestCase.closeDocument();
+ else if ( m_currentDocument != null )
+ m_currentDocument.close();
+ m_currentTestCase = null;
+ m_currentDocument = null;
+ m_callbackFactory.dispose();
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ /**
+ * returns the undo manager belonging to a given document
+ * @return
+ */
+ private XUndoManager getUndoManager()
+ {
+ final XUndoManagerSupplier suppUndo = UnoRuntime.queryInterface( XUndoManagerSupplier.class, m_currentDocument.getDocument() );
+ final XUndoManager undoManager = suppUndo.getUndoManager();
+ assertTrue( UnoRuntime.areSame( undoManager.getParent(), m_currentDocument.getDocument() ) );
+ return undoManager;
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ private void impl_waitFor( final Object i_condition, final int i_milliSeconds ) throws InterruptedException
+ {
+ synchronized( i_condition )
+ {
+ i_condition.wait( i_milliSeconds );
+ }
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ private void impl_setupBrokenBasicScript()
+ {
+ try
+ {
+ final XEmbeddedScripts embeddedScripts = UnoRuntime.queryInterface( XEmbeddedScripts.class, m_currentDocument.getDocument() );
+ final XLibraryContainer basicLibs = embeddedScripts.getBasicLibraries();
+ final XNameContainer basicLib = basicLibs.createLibrary( "default" );
+
+ final String brokenScriptCode =
+ "Option Explicit\n" +
+ "\n" +
+ "Sub brokenScript\n" +
+ " Dim callback as Object\n" +
+ " ThisComponent.UndoManager.enterUndoContext( \"" + getCallbackUndoContextTitle() + "\" )\n" +
+ "\n" +
+ " callback = createUnoService( \"" + getCallbackComponentServiceName() + "\" )\n" +
+ " Dim emptyArgs() as new com.sun.star.beans.NamedValue\n" +
+ " Dim result as String\n" +
+ " result = callback.execute( emptyArgs() )\n" +
+ " If result = \"close\" Then\n" +
+ " ThisComponent.close( TRUE )\n" +
+ " End If\n" +
+ "End Sub\n" +
+ "\n";
+
+ basicLib.insertByName( "callbacks", brokenScriptCode );
+ }
+ catch( com.sun.star.uno.Exception e )
+ {
+ fail( "caught an exception while setting up the script: " + e.toString() );
+ }
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ private XPropertySet impl_setupButton() throws com.sun.star.uno.Exception
+ {
+ // let the document create a shape
+ final XMultiServiceFactory docAsFactory = UnoRuntime.queryInterface( XMultiServiceFactory.class,
+ m_currentDocument.getDocument() );
+ final XControlShape xShape = UnoRuntime.queryInterface( XControlShape.class,
+ docAsFactory.createInstance( "com.sun.star.drawing.ControlShape" ) );
+
+ // position and size of the shape
+ xShape.setSize( new Size( 28 * 100, 10 * 100 ) );
+ xShape.setPosition( new Point( 10 * 100, 10 * 100 ) );
+
+ // create the form component (the model of a form control)
+ final String sQualifiedComponentName = "com.sun.star.form.component.CommandButton";
+ final XControlModel controlModel = UnoRuntime.queryInterface( XControlModel.class,
+ getORB().createInstance( sQualifiedComponentName ) );
+
+ // knitt both
+ xShape.setControl( controlModel );
+
+ // add the shape to the shapes collection of the document
+ SpreadsheetDocument spreadsheetDoc = (SpreadsheetDocument)m_currentDocument;
+ final XDrawPageSupplier suppDrawPage = UnoRuntime.queryInterface( XDrawPageSupplier.class,
+ spreadsheetDoc.getSheet( 0 ) );
+ final XDrawPage insertIntoPage = suppDrawPage.getDrawPage();
+
+ final XShapes sheetShapes = UnoRuntime.queryInterface( XShapes.class, insertIntoPage );
+ sheetShapes.add( xShape );
+
+ return UnoRuntime.queryInterface( XPropertySet.class, controlModel );
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ private void impl_assignScript( final XPropertySet i_controlModel, final String i_interfaceName,
+ final String i_interfaceMethod, final String i_scriptURI )
+ {
+ try
+ {
+ final XChild modelAsChild = UnoRuntime.queryInterface( XChild.class, i_controlModel );
+ final XIndexContainer parentForm = UnoRuntime.queryInterface( XIndexContainer.class, modelAsChild.getParent() );
+
+ final XEventAttacherManager manager = UnoRuntime.queryInterface( XEventAttacherManager.class, parentForm );
+
+ int containerPosition = -1;
+ for ( int i = 0; i < parentForm.getCount(); ++i )
+ {
+ final XPropertySet child = UnoRuntime.queryInterface( XPropertySet.class, parentForm.getByIndex( i ) );
+ if ( UnoRuntime.areSame( child, i_controlModel ) )
+ {
+ containerPosition = i;
+ break;
+ }
+ }
+ assertFalse( "could not find the given control model within its parent", containerPosition == -1 );
+ manager.registerScriptEvent( containerPosition, new ScriptEventDescriptor(
+ i_interfaceName,
+ i_interfaceMethod,
+ "",
+ "Script",
+ i_scriptURI
+ ) );
+ }
+ catch( com.sun.star.uno.Exception e )
+ {
+ fail( "caught an exception while assigning the script event to the button: " + e.toString() );
+ }
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ private void impl_clickButton( final XPropertySet i_buttonModel ) throws NoSuchElementException, IndexOutOfBoundsException
+ {
+ final XControlAccess controlAccess = UnoRuntime.queryInterface( XControlAccess.class,
+ m_currentDocument.getCurrentView().getController() );
+ final XControl control = controlAccess.getControl( UnoRuntime.queryInterface( XControlModel.class, i_buttonModel ) );
+ final XAccessible accessible = UnoRuntime.queryInterface( XAccessible.class, control );
+ final XAccessibleAction controlActions = UnoRuntime.queryInterface( XAccessibleAction.class, accessible.getAccessibleContext() );
+ for ( int i=0; i<controlActions.getAccessibleActionCount(); ++i )
+ {
+ if ( controlActions.getAccessibleActionDescription(i).equals( "click" ) )
+ {
+ controlActions.doAccessibleAction(i);
+ return;
+ }
+ }
+ fail( "did not find the accessible action named 'click'" );
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ private static class UndoListener implements XUndoManagerListener
+ {
+ public void undoActionAdded( UndoManagerEvent i_event )
+ {
+ assertFalse( "|undoActionAdded| called after document was disposed", m_isDisposed );
+
+ ++m_undoActionsAdded;
+ m_mostRecentlyAddedAction = i_event.UndoActionTitle;
+ }
+
+ public void actionUndone( UndoManagerEvent i_event )
+ {
+ assertFalse( "|actionUndone| called after document was disposed", m_isDisposed );
+
+ ++m_undoCount;
+ m_mostRecentlyUndone = i_event.UndoActionTitle;
+ }
+
+ public void actionRedone( UndoManagerEvent i_event )
+ {
+ assertFalse( "|actionRedone| called after document was disposed", m_isDisposed );
+
+ ++m_redoCount;
+ }
+
+ public void allActionsCleared( EventObject eo )
+ {
+ assertFalse( "|allActionsCleared| called after document was disposed", m_isDisposed );
+
+ m_wasCleared = true;
+ }
+
+ public void redoActionsCleared( EventObject eo )
+ {
+ assertFalse( "|redoActionsCleared| called after document was disposed", m_isDisposed );
+
+ m_redoWasCleared = true;
+ }
+
+ public void resetAll( EventObject i_event )
+ {
+ assertFalse( "|resetAll| called after document was disposed", m_isDisposed );
+
+ m_managerWasReset = true;
+ m_activeUndoContexts.clear();
+ }
+
+ public void enteredContext( UndoManagerEvent i_event )
+ {
+ assertFalse( "|enteredContext| called after document was disposed", m_isDisposed );
+
+ m_activeUndoContexts.push( i_event.UndoActionTitle );
+ assertEquals( "different opinions on the context nesting level (after entering)",
+ m_activeUndoContexts.size(), i_event.UndoContextDepth );
+ }
+
+ public void enteredHiddenContext( UndoManagerEvent i_event )
+ {
+ assertFalse( "|enteredHiddenContext| called after document was disposed", m_isDisposed );
+
+ m_activeUndoContexts.push( i_event.UndoActionTitle );
+ assertEquals( "different opinions on the context nesting level (after entering hidden)",
+ m_activeUndoContexts.size(), i_event.UndoContextDepth );
+ }
+
+ public void leftContext( UndoManagerEvent i_event )
+ {
+ assertFalse( "|leftContext| called after document was disposed", m_isDisposed );
+
+ assertEquals( "nested undo context descriptions do not match", m_activeUndoContexts.pop(), i_event.UndoActionTitle );
+ assertEquals( "different opinions on the context nesting level (after leaving)",
+ m_activeUndoContexts.size(), i_event.UndoContextDepth );
+ m_leftContext = true;
+ impl_notifyContextDepth();
+ }
+
+ public void leftHiddenContext( UndoManagerEvent i_event )
+ {
+ assertFalse( "|leftHiddenContext| called after document was disposed", m_isDisposed );
+ assertEquals( "|leftHiddenContext| is not expected to notify an action title", 0, i_event.UndoActionTitle.length() );
+
+ m_activeUndoContexts.pop();
+ assertEquals( "different opinions on the context nesting level (after leaving)",
+ m_activeUndoContexts.size(), i_event.UndoContextDepth );
+ m_leftHiddenContext = true;
+ impl_notifyContextDepth();
+ }
+
+ public void cancelledContext( UndoManagerEvent i_event )
+ {
+ assertFalse( "|cancelledContext| called after document was disposed", m_isDisposed );
+ assertEquals( "|cancelledContext| is not expected to notify an action title", 0, i_event.UndoActionTitle.length() );
+
+ m_activeUndoContexts.pop();
+ assertEquals( "different opinions on the context nesting level (after cancelling)",
+ m_activeUndoContexts.size(), i_event.UndoContextDepth );
+ m_cancelledContext = true;
+ impl_notifyContextDepth();
+ }
+
+ public void disposing( EventObject i_event )
+ {
+ m_isDisposed = true;
+ }
+
+ public void waitForAllContextsClosed( final int i_milliSeconds ) throws InterruptedException
+ {
+ synchronized ( m_allContextsClosedCondition )
+ {
+ if ( m_activeUndoContexts.empty() )
+ return;
+ m_allContextsClosedCondition.wait( i_milliSeconds );
+ }
+ }
+
+ private void impl_notifyContextDepth()
+ {
+ synchronized ( m_allContextsClosedCondition )
+ {
+ if ( m_activeUndoContexts.empty() )
+ {
+ m_allContextsClosedCondition.notifyAll();
+ }
+ }
+ }
+
+ private int getUndoActionsAdded() { return m_undoActionsAdded; }
+ private int getUndoActionCount() { return m_undoCount; }
+ private int getRedoActionCount() { return m_redoCount; }
+ private String getCurrentUndoContextTitle() { return m_activeUndoContexts.peek(); }
+ private String getMostRecentlyAddedActionTitle() { return m_mostRecentlyAddedAction; };
+ private String getMostRecentlyUndoneTitle() { return m_mostRecentlyUndone; }
+ private int getCurrentUndoContextDepth() { return m_activeUndoContexts.size(); }
+ private boolean isDisposed() { return m_isDisposed; }
+ private boolean wasContextLeft() { return m_leftContext; }
+ private boolean wasHiddenContextLeft() { return m_leftHiddenContext; }
+ private boolean hasContextBeenCancelled() { return m_cancelledContext; }
+ private boolean wereStacksCleared() { return m_wasCleared; }
+ private boolean wasRedoStackCleared() { return m_redoWasCleared; }
+ private boolean wasManagerReset() { return m_managerWasReset; }
+
+ void reset()
+ {
+ m_undoActionsAdded = m_undoCount = m_redoCount = 0;
+ m_activeUndoContexts.clear();
+ m_mostRecentlyAddedAction = m_mostRecentlyUndone = null;
+ // m_isDisposed is not cleared, intentionally
+ m_leftContext = m_leftHiddenContext = m_cancelledContext = m_wasCleared = m_redoWasCleared = m_managerWasReset = false;
+ }
+
+ private int m_undoActionsAdded = 0;
+ private int m_undoCount = 0;
+ private int m_redoCount = 0;
+ private boolean m_isDisposed = false;
+ private boolean m_leftContext = false;
+ private boolean m_leftHiddenContext = false;
+ private boolean m_cancelledContext = false;
+ private boolean m_wasCleared = false;
+ private boolean m_redoWasCleared = false;
+ private boolean m_managerWasReset = false;
+ private Stack< String >
+ m_activeUndoContexts = new Stack<String>();
+ private String m_mostRecentlyAddedAction = null;
+ private String m_mostRecentlyUndone = null;
+ private final Object m_allContextsClosedCondition = new Object();
+ };
+
+ // -----------------------------------------------------------------------------------------------------------------
+ private void impl_checkUndo() throws Exception
+ {
+ System.out.println( "testing: " + m_currentTestCase.getDocumentDescription() );
+ m_currentDocument = m_currentTestCase.getDocument();
+ m_currentTestCase.initializeDocument();
+ m_currentTestCase.verifyInitialDocumentState();
+
+ final XUndoManager undoManager = getUndoManager();
+ undoManager.clear();
+ assertFalse( "clearing the Undo manager should result in the impossibility to undo anything", undoManager.isUndoPossible() );
+ assertFalse( "clearing the Undo manager should result in the impossibility to redo anything", undoManager.isRedoPossible() );
+
+ m_undoListener = new UndoListener();
+ undoManager.addUndoManagerListener( m_undoListener );
+
+ impl_testSingleModification( undoManager );
+ impl_testMultipleModifications( undoManager );
+ impl_testCustomUndoActions( undoManager );
+ impl_testLocking( undoManager );
+ impl_testNestedContexts( undoManager );
+ impl_testErrorHandling( undoManager );
+ impl_testContextHandling( undoManager );
+ impl_testStackHandling( undoManager );
+ impl_testClearance( undoManager );
+ impl_testHiddenContexts( undoManager );
+
+ // close the document, ensure the Undo manager listener gets notified
+ m_currentTestCase.closeDocument();
+ m_currentTestCase = null;
+ m_currentDocument = null;
+ assertTrue( "document is closed, but the UndoManagerListener has not been notified of the disposal", m_undoListener.isDisposed() );
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ private void impl_testSingleModification( final XUndoManager i_undoManager ) throws com.sun.star.uno.Exception
+ {
+ m_currentTestCase.doSingleModification();
+ m_currentTestCase.verifySingleModificationDocumentState();
+
+ // undo the modification, ensure the listener got the proper notifications
+ assertEquals( "We did not yet do a undo!", 0, m_undoListener.getUndoActionCount() );
+ i_undoManager.undo();
+ assertEquals( "A simple undo does not result in the proper Undo count.",
+ 1, m_undoListener.getUndoActionCount() );
+
+ // verify the document is in its initial state, again
+ m_currentTestCase.verifyInitialDocumentState();
+
+ // redo the modification, ensure the listener got the proper notifications
+ assertEquals( "did not yet do a redo!", 0, m_undoListener.getRedoActionCount() );
+ i_undoManager.redo();
+ assertEquals( "did a redo, but got no notification of it!", 1, m_undoListener.getRedoActionCount() );
+ // ensure the document is in the proper state, again
+ m_currentTestCase.verifySingleModificationDocumentState();
+
+ // now do an Undo via the UI (aka the dispatch API), and see if this works, and notifies the listener as
+ // expected
+ m_currentTestCase.getDocument().getCurrentView().dispatch( ".uno:Undo" );
+ m_currentTestCase.verifyInitialDocumentState();
+ assertEquals( "UI-Undo does not notify the listener", 2, m_undoListener.getUndoActionCount() );
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ private void impl_testMultipleModifications( final XUndoManager i_undoManager ) throws com.sun.star.uno.Exception
+ {
+ m_undoListener.reset();
+ assertEquals( "unexpected initial undo context depth", 0, m_undoListener.getCurrentUndoContextDepth() );
+ i_undoManager.enterUndoContext( "Batch Changes" );
+ assertEquals( "unexpected undo context depth after entering a context",
+ 1, m_undoListener.getCurrentUndoContextDepth() );
+ assertEquals( "entering an Undo context has not been notified properly",
+ "Batch Changes", m_undoListener.getCurrentUndoContextTitle() );
+
+ final int modifications = m_currentTestCase.doMultipleModifications();
+ assertEquals( "unexpected number of undo actions while doing batch changes to the document",
+ modifications, m_undoListener.getUndoActionsAdded() );
+ assertEquals( "seems the document operations touched the undo context depth",
+ 1, m_undoListener.getCurrentUndoContextDepth() );
+
+ i_undoManager.leaveUndoContext();
+ assertEquals( "unexpected undo context depth after leaving the last context",
+ 0, m_undoListener.getCurrentUndoContextDepth() );
+ assertEquals( "no Undo done, yet - still the listener has been notified of an Undo action",
+ 0, m_undoListener.getUndoActionCount() );
+
+ i_undoManager.undo();
+ assertEquals( "Just did an undo - the listener should have been notified", 1, m_undoListener.getUndoActionCount() );
+ m_currentTestCase.verifyInitialDocumentState();
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ private void impl_testCustomUndoActions( final XUndoManager i_undoManager ) throws com.sun.star.uno.Exception
+ {
+ i_undoManager.clear();
+ m_undoListener.reset();
+ assertFalse( "undo stack not empty after clearing the undo manager", i_undoManager.isUndoPossible() );
+ assertFalse( "redo stack not empty after clearing the undo manager", i_undoManager.isRedoPossible() );
+ assertArrayEquals( ">0 descriptions for an empty undo stack?",
+ new String[0], i_undoManager.getAllUndoActionTitles() );
+ assertArrayEquals( ">0 descriptions for an empty redo stack?",
+ new String[0], i_undoManager.getAllRedoActionTitles() );
+
+ // add two actions, one directly, one within a context
+ final CustomUndoAction action1 = new CustomUndoAction( "UndoAction1" );
+ i_undoManager.addUndoAction( action1 );
+ assertEquals( "Adding an undo action not observed by the listener", 1, m_undoListener.getUndoActionsAdded() );
+ assertEquals( "Adding an undo action did not notify the proper title",
+ action1.getTitle(), m_undoListener.getMostRecentlyAddedActionTitle() );
+ final String contextTitle = "Undo Context";
+ i_undoManager.enterUndoContext( contextTitle );
+ final CustomUndoAction action2 = new CustomUndoAction( "UndoAction2" );
+ i_undoManager.addUndoAction( action2 );
+ assertEquals( "Adding an undo action not observed by the listener",
+ 2, m_undoListener.getUndoActionsAdded() );
+ assertEquals( "Adding an undo action did not notify the proper title",
+ action2.getTitle(), m_undoListener.getMostRecentlyAddedActionTitle() );
+ i_undoManager.leaveUndoContext();
+
+ // see if the manager has proper descriptions
+ assertArrayEquals( "unexpected Redo descriptions after adding two actions",
+ new String[0], i_undoManager.getAllRedoActionTitles() );
+ assertArrayEquals( "unexpected Undo descriptions after adding two actions",
+ new String[]{contextTitle, action1.getTitle()}, i_undoManager.getAllUndoActionTitles() );
+
+ // undo one action
+ i_undoManager.undo();
+ assertEquals( "improper action title notified during programmatic Undo",
+ contextTitle, m_undoListener.getMostRecentlyUndoneTitle() );
+ assertTrue( "nested custom undo action has not been undone as expected", action2.undoCalled() );
+ assertFalse( "nested custom undo action has not been undone as expected", action1.undoCalled() );
+ assertArrayEquals( "unexpected Redo descriptions after undoing a nested custom action",
+ new String[]{contextTitle}, i_undoManager.getAllRedoActionTitles() );
+ assertArrayEquals( "unexpected Undo descriptions after undoing a nested custom action",
+ new String[]{action1.getTitle()}, i_undoManager.getAllUndoActionTitles() );
+
+ // undo the second action, via UI dispatches
+ m_currentTestCase.getDocument().getCurrentView().dispatch( ".uno:Undo" );
+ assertEquals( "improper action title notified during UI Undo", action1.getTitle(), m_undoListener.getMostRecentlyUndoneTitle() );
+ assertTrue( "nested custom undo action has not been undone as expected", action1.undoCalled() );
+ assertArrayEquals( "unexpected Redo descriptions after undoing the second custom action",
+ new String[]{action1.getTitle(), contextTitle}, i_undoManager.getAllRedoActionTitles() );
+ assertArrayEquals( "unexpected Undo descriptions after undoing the second custom action",
+ new String[0], i_undoManager.getAllUndoActionTitles() );
+
+ // check the actions are disposed when the stacks are cleared
+ i_undoManager.clear();
+ assertTrue( action1.disposed() && action2.disposed() );
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ private void impl_testLocking( final XUndoManager i_undoManager ) throws com.sun.star.uno.Exception
+ {
+ i_undoManager.reset();
+ m_undoListener.reset();
+
+ // implicit Undo actions, triggered by changes to the document
+ assertFalse( "unexpected initial locking state", i_undoManager.isLocked() );
+ i_undoManager.lock();
+ assertTrue( "just locked the manager, why does it lie?", i_undoManager.isLocked() );
+ m_currentTestCase.doSingleModification();
+ assertEquals( "when the Undo manager is locked, no implicit additions should happen",
+ 0, m_undoListener.getUndoActionsAdded() );
+ i_undoManager.unlock();
+ assertEquals( "unlock is not expected to add collected actions - they should be discarded",
+ 0, m_undoListener.getUndoActionsAdded() );
+ assertFalse( "just unlocked the manager, why does it lie?", i_undoManager.isLocked() );
+
+ // explicit Undo actions
+ i_undoManager.lock();
+ i_undoManager.addUndoAction( new CustomUndoAction() );
+ i_undoManager.unlock();
+ assertEquals( "explicit Undo actions are expected to be ignored when the manager is locked",
+ 0, m_undoListener.getUndoActionsAdded() );
+
+ // Undo contexts while being locked
+ i_undoManager.lock();
+ i_undoManager.enterUndoContext( "Dummy Context" );
+ i_undoManager.enterHiddenUndoContext();
+ assertEquals( "entering Undo contexts should be ignored when the manager is locked", 0, m_undoListener.getCurrentUndoContextDepth() );
+ i_undoManager.leaveUndoContext();
+ i_undoManager.leaveUndoContext();
+ i_undoManager.unlock();
+
+ // |unlock| error handling
+ assertFalse( "internal error: manager should not be locked at this point in time", i_undoManager.isLocked() );
+ boolean caughtExpected = false;
+ try { i_undoManager.unlock(); } catch ( final NotLockedException e ) { caughtExpected = true; }
+ assertTrue( "unlocking the manager when it is not locked should throw", caughtExpected );
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ private void impl_testContextHandling( final XUndoManager i_undoManager ) throws com.sun.star.uno.Exception
+ {
+ // .............................................................................................................
+ // part I: non-empty contexts
+ i_undoManager.reset();
+ m_undoListener.reset();
+
+ // put one action on the undo and one on the redo stack, as precondition for the following tests
+ final XUndoAction undoAction1 = new CustomUndoAction( "Undo Action 1" );
+ i_undoManager.addUndoAction( undoAction1 );
+ final XUndoAction undoAction2 = new CustomUndoAction( "Undo Action 2" );
+ i_undoManager.addUndoAction( undoAction2 );
+ i_undoManager.undo();
+ assertTrue( "precondition for context handling tests not met (1)", i_undoManager.isUndoPossible() );
+ assertTrue( "precondition for context handling tests not met (2)", i_undoManager.isRedoPossible() );
+ assertArrayEquals( new String[] { undoAction1.getTitle() }, i_undoManager.getAllUndoActionTitles() );
+ assertArrayEquals( new String[] { undoAction2.getTitle() }, i_undoManager.getAllRedoActionTitles() );
+
+ final String[] expectedRedoActionComments = new String[] { undoAction2.getTitle() };
+ assertArrayEquals( expectedRedoActionComments, i_undoManager.getAllRedoActionTitles() );
+
+ // enter a context
+ i_undoManager.enterUndoContext( "Undo Context" );
+ // this should not (yet) touch the redo stack
+ assertArrayEquals( expectedRedoActionComments, i_undoManager.getAllRedoActionTitles() );
+ assertEquals( "unexpected undo context depth after entering a context", 1, m_undoListener.getCurrentUndoContextDepth() );
+ // add a single action
+ XUndoAction undoAction3 = new CustomUndoAction( "Undo Action 3" );
+ i_undoManager.addUndoAction( undoAction3 );
+ // still, the redo stack should be untouched - added at a lower level does not affect it at all
+ assertArrayEquals( expectedRedoActionComments, i_undoManager.getAllRedoActionTitles() );
+
+ // while the context is open, its title should already contribute to the stack, ...
+ assertEquals( "Undo Context", i_undoManager.getCurrentUndoActionTitle() );
+ // ... getAllUndo/RedoActionTitles should operate on the top level, not on the level defined by the open
+ // context, ...
+ assertArrayEquals( new String[] { "Undo Context", undoAction1.getTitle() },
+ i_undoManager.getAllUndoActionTitles() );
+ // ... but Undo and Redo should be impossible as long as the context is open
+ assertFalse( i_undoManager.isUndoPossible() );
+ assertFalse( i_undoManager.isRedoPossible() );
+
+ // leave the context, check the listener has been notified properly, and the notified context depth is correct
+ i_undoManager.leaveUndoContext();
+ assertTrue( m_undoListener.wasContextLeft() );
+ assertFalse( m_undoListener.wasHiddenContextLeft() );
+ assertFalse( m_undoListener.hasContextBeenCancelled() );
+ assertEquals( "unexpected undo context depth leaving a non-empty context", 0, m_undoListener.getCurrentUndoContextDepth() );
+ // leaving a non-empty context should have cleare the redo stack
+ assertArrayEquals( new String[0], i_undoManager.getAllRedoActionTitles() );
+ assertTrue( m_undoListener.wasRedoStackCleared() );
+
+ // .............................................................................................................
+ // part II: empty contexts
+ i_undoManager.reset();
+ m_undoListener.reset();
+
+ // enter a context, leave it immediately without adding an action to it
+ i_undoManager.enterUndoContext( "Undo Context" );
+ i_undoManager.leaveUndoContext();
+ assertFalse( m_undoListener.wasContextLeft() );
+ assertFalse( m_undoListener.wasHiddenContextLeft() );
+ assertTrue( m_undoListener.hasContextBeenCancelled() );
+ assertFalse( "leaving an empty context should silently remove it, and not contribute to the stack",
+ i_undoManager.isUndoPossible() );
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ private void impl_testNestedContexts( final XUndoManager i_undoManager ) throws com.sun.star.uno.Exception
+ {
+ i_undoManager.reset();
+ m_undoListener.reset();
+ i_undoManager.enterUndoContext( "context 1" );
+ i_undoManager.enterUndoContext( "context 1.1" );
+ final CustomUndoAction action1 = new CustomUndoAction( "action 1.1.1" );
+ i_undoManager.addUndoAction( action1 );
+ i_undoManager.enterUndoContext( "context 1.1.2" );
+ final CustomUndoAction action2 = new CustomUndoAction( "action 1.1.2.1" );
+ i_undoManager.addUndoAction( action2 );
+ i_undoManager.leaveUndoContext();
+ final CustomUndoAction action3 = new CustomUndoAction( "action 1.1.3" );
+ i_undoManager.addUndoAction( action3 );
+ i_undoManager.leaveUndoContext();
+ i_undoManager.leaveUndoContext();
+ final CustomUndoAction action4 = new CustomUndoAction( "action 1.2" );
+ i_undoManager.addUndoAction( action4 );
+
+ i_undoManager.undo();
+ assertEquals( "undoing a single action notifies a wrong title", action4.getTitle(), m_undoListener.getMostRecentlyUndoneTitle() );
+ assertTrue( "custom Undo not called", action4.undoCalled() );
+ assertFalse( "too many custom Undos called", action1.undoCalled() || action2.undoCalled() || action3.undoCalled() );
+ i_undoManager.undo();
+ assertTrue( "nested actions not properly undone", action1.undoCalled() && action2.undoCalled() && action3.undoCalled() );
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ private void impl_testErrorHandling( final XUndoManager i_undoManager ) throws com.sun.star.uno.Exception
+ {
+ i_undoManager.reset();
+ m_undoListener.reset();
+
+ // try retrieving the comments for the current Undo/Redo - this should fail
+ boolean caughtExpected = false;
+ try { i_undoManager.getCurrentUndoActionTitle(); }
+ catch( final EmptyUndoStackException e ) { caughtExpected = true; }
+ assertTrue( "trying the title of the current Undo action is expected to fail for an empty stack", caughtExpected );
+
+ caughtExpected = false;
+ try { i_undoManager.getCurrentRedoActionTitle(); }
+ catch( final EmptyUndoStackException e ) { caughtExpected = true; }
+ assertTrue( "trying the title of the current Redo action is expected to fail for an empty stack", caughtExpected );
+
+ caughtExpected = false;
+ try { i_undoManager.undo(); } catch ( final EmptyUndoStackException e ) { caughtExpected = true; }
+ assertTrue( "undo should throw if no Undo action is on the stack", caughtExpected );
+
+ caughtExpected = false;
+ try { i_undoManager.redo(); } catch ( final EmptyUndoStackException e ) { caughtExpected = true; }
+ assertTrue( "redo should throw if no Redo action is on the stack", caughtExpected );
+
+ caughtExpected = false;
+ try { i_undoManager.leaveUndoContext(); } catch ( final InvalidStateException e ) { caughtExpected = true; }
+ assertTrue( "leaveUndoContext should throw if no context is currently open", caughtExpected );
+
+ caughtExpected = false;
+ try { i_undoManager.addUndoAction( null ); } catch ( com.sun.star.lang.IllegalArgumentException e ) { caughtExpected = true; }
+ assertTrue( "adding a NULL action should be rejected", caughtExpected );
+
+ i_undoManager.reset();
+ i_undoManager.addUndoAction( new CustomUndoAction() );
+ i_undoManager.addUndoAction( new CustomUndoAction() );
+ i_undoManager.undo();
+ i_undoManager.enterUndoContext( "Undo Context" );
+ // those methods should fail when a context is open:
+ final String[] methodNames = new String[] { "undo", "redo", "clear", "clearRedo" };
+ for ( int i=0; i<methodNames.length; ++i )
+ {
+ caughtExpected = false;
+ try
+ {
+ Method method = i_undoManager.getClass().getMethod( methodNames[i], new Class[0] );
+ method.invoke( i_undoManager, new Object[0] );
+ }
+ catch ( IllegalAccessException ex ) { }
+ catch ( IllegalArgumentException ex ) { }
+ catch ( InvocationTargetException ex )
+ {
+ Throwable targetException = ex.getTargetException();
+ caughtExpected = ( targetException instanceof UndoContextNotClosedException );
+ }
+ catch ( NoSuchMethodException ex ) { }
+ catch ( SecurityException ex ) { }
+
+ assertTrue( methodNames[i] + " should be rejected when there is an open context", caughtExpected );
+ }
+ i_undoManager.leaveUndoContext();
+
+ // try Undo actions which fail in their Undo/Redo
+ for ( int i=0; i<4; ++i )
+ {
+ final boolean undo = ( i < 2 );
+ final boolean doByAPI = ( i % 2 ) == 0;
+
+ i_undoManager.reset();
+ i_undoManager.addUndoAction( new CustomUndoAction() );
+ i_undoManager.addUndoAction( new FailingUndoAction( undo ? FAIL_UNDO : FAIL_REDO ) );
+ i_undoManager.addUndoAction( new CustomUndoAction() );
+ i_undoManager.undo();
+ if ( !undo )
+ i_undoManager.undo();
+ // assert preconditions for the below test
+ assertTrue( i_undoManager.isUndoPossible() );
+ assertTrue( i_undoManager.isRedoPossible() );
+
+ boolean caughtUndoFailed = false;
+ try
+ {
+ if ( undo )
+ if ( doByAPI )
+ i_undoManager.undo();
+ else
+ m_currentTestCase.getDocument().getCurrentView().dispatch( ".uno:Undo" );
+ else
+ if ( doByAPI )
+ i_undoManager.redo();
+ else
+ m_currentTestCase.getDocument().getCurrentView().dispatch( ".uno:Redo" );
+ }
+ catch ( UndoFailedException e )
+ {
+ caughtUndoFailed = true;
+ }
+ if ( doByAPI )
+ assertTrue( "Exceptions in XUndoAction.undo should be propagated at the API", caughtUndoFailed );
+ else
+ assertFalse( "Undo/Redo by UI should not let escape Exceptions", caughtUndoFailed );
+ if ( undo )
+ {
+ assertFalse( "a failing Undo should clear the Undo stack", i_undoManager.isUndoPossible() );
+ assertTrue( "a failing Undo should /not/ clear the Redo stack", i_undoManager.isRedoPossible() );
+ }
+ else
+ {
+ assertTrue( "a failing Redo should /not/ clear the Undo stack", i_undoManager.isUndoPossible() );
+ assertFalse( "a failing Redo should clear the Redo stack", i_undoManager.isRedoPossible() );
+ }
+ }
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ private void impl_testStackHandling( final XUndoManager i_undoManager ) throws com.sun.star.uno.Exception
+ {
+ i_undoManager.reset();
+ m_undoListener.reset();
+
+ assertFalse( i_undoManager.isUndoPossible() );
+ assertFalse( i_undoManager.isRedoPossible() );
+
+ i_undoManager.addUndoAction( new CustomUndoAction() );
+ assertTrue( i_undoManager.isUndoPossible() );
+ assertFalse( i_undoManager.isRedoPossible() );
+ i_undoManager.addUndoAction( new CustomUndoAction() );
+ assertTrue( i_undoManager.isUndoPossible() );
+ assertFalse( i_undoManager.isRedoPossible() );
+ i_undoManager.undo();
+ assertTrue( i_undoManager.isUndoPossible() );
+ assertTrue( i_undoManager.isRedoPossible() );
+ i_undoManager.undo();
+ assertFalse( i_undoManager.isUndoPossible() );
+ assertTrue( i_undoManager.isRedoPossible() );
+ i_undoManager.addUndoAction( new CustomUndoAction() );
+ assertTrue( i_undoManager.isUndoPossible() );
+ assertFalse( "adding a new action should have cleared the Redo stack", i_undoManager.isRedoPossible() );
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ private void impl_testClearance( final XUndoManager i_undoManager ) throws com.sun.star.uno.Exception
+ {
+ i_undoManager.reset();
+ m_undoListener.reset();
+
+ // add an action, clear the stack, verify the listener has been called
+ i_undoManager.addUndoAction( new CustomUndoAction() );
+ assertFalse( "clearance listener unexpectedly called", m_undoListener.wereStacksCleared() );
+ assertFalse( "redo-clearance listener unexpectedly called", m_undoListener.wasRedoStackCleared() );
+ i_undoManager.clear();
+ assertTrue( "clearance listener not called as expected", m_undoListener.wereStacksCleared() );
+ assertFalse( "redo-clearance listener unexpectedly called (2)", m_undoListener.wasRedoStackCleared() );
+
+ // ensure the listener is also called if the stack is actually empty at the moment of the call
+ m_undoListener.reset();
+ assertFalse( i_undoManager.isUndoPossible() );
+ i_undoManager.clear();
+ assertTrue( "clearance listener is also expected to be called if the stack was empty before", m_undoListener.wereStacksCleared() );
+
+ // ensure the proper listeners are called for clearRedo
+ m_undoListener.reset();
+ i_undoManager.clearRedo();
+ assertFalse( m_undoListener.wereStacksCleared() );
+ assertTrue( m_undoListener.wasRedoStackCleared() );
+
+ // ensure the redo listener is also called upon implicit redo stack clearance
+ m_undoListener.reset();
+ i_undoManager.addUndoAction( new CustomUndoAction() );
+ i_undoManager.addUndoAction( new CustomUndoAction() );
+ i_undoManager.undo();
+ assertTrue( i_undoManager.isUndoPossible() );
+ assertTrue( i_undoManager.isRedoPossible() );
+ i_undoManager.addUndoAction( new CustomUndoAction() );
+ assertFalse( i_undoManager.isRedoPossible() );
+ assertTrue( "implicit clearance of the Redo stack does not notify listeners", m_undoListener.wasRedoStackCleared() );
+
+ // test resetting the manager
+ m_undoListener.reset();
+ i_undoManager.addUndoAction( new CustomUndoAction() );
+ i_undoManager.addUndoAction( new CustomUndoAction() );
+ i_undoManager.undo();
+ assertTrue( i_undoManager.isUndoPossible() );
+ assertTrue( i_undoManager.isRedoPossible() );
+ i_undoManager.reset();
+ assertFalse( i_undoManager.isUndoPossible() );
+ assertFalse( i_undoManager.isRedoPossible() );
+ assertTrue( "|reset| does not properly notify", m_undoListener.wasManagerReset() );
+
+ // resetting the manager, with open undo contexts
+ m_undoListener.reset();
+ i_undoManager.addUndoAction( new CustomUndoAction() );
+ i_undoManager.enterUndoContext( "Undo Context" );
+ i_undoManager.addUndoAction( new CustomUndoAction() );
+ i_undoManager.enterHiddenUndoContext();
+ i_undoManager.reset();
+ assertTrue( "|reset| while contexts are open does not properly notify", m_undoListener.wasManagerReset() );
+ // verify the manager really has the proper context depth now
+ i_undoManager.enterUndoContext( "Undo Context" );
+ assertEquals( "seems that |reset| did not really close the open contexts", 1, m_undoListener.getCurrentUndoContextDepth() );
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ private void impl_testHiddenContexts( final XUndoManager i_undoManager ) throws com.sun.star.uno.Exception
+ {
+ i_undoManager.reset();
+ m_undoListener.reset();
+ assertFalse( "precondition for testing hidden undo contexts not met", i_undoManager.isUndoPossible() );
+
+ // entering a hidden context should be rejected if the stack is empty
+ boolean caughtExpected = false;
+ try { i_undoManager.enterHiddenUndoContext(); }
+ catch ( final EmptyUndoStackException e ) { caughtExpected = true; }
+ assertTrue( "entering hidden contexts should be denied on an empty stack", caughtExpected );
+
+ // but it should be allowed if the context is not empty
+ final CustomUndoAction undoAction0 = new CustomUndoAction( "Step 0" );
+ i_undoManager.addUndoAction( undoAction0 );
+ final CustomUndoAction undoAction1 = new CustomUndoAction( "Step 1" );
+ i_undoManager.addUndoAction( undoAction1 );
+ i_undoManager.enterHiddenUndoContext();
+ final CustomUndoAction hiddenUndoAction = new CustomUndoAction( "hidden context action" );
+ i_undoManager.addUndoAction( hiddenUndoAction );
+ i_undoManager.leaveUndoContext();
+ assertFalse( "leaving a hidden should not call |leftUndocontext|", m_undoListener.wasContextLeft() );
+ assertTrue( "leaving a hidden does not call |leftHiddenUndocontext|", m_undoListener.wasHiddenContextLeft() );
+ assertFalse( "leaving a non-empty hidden context claims to have cancelled it", m_undoListener.hasContextBeenCancelled() );
+ assertEquals( "leaving a hidden context is not properly notified", 0, m_undoListener.getCurrentUndoContextDepth() );
+ assertArrayEquals( "unexpected Undo stack after leaving a hidden context",
+ new String[] { undoAction1.getTitle(), undoAction0.getTitle() },
+ i_undoManager.getAllUndoActionTitles() );
+
+ // and then calling |undo| once should not only undo everything in the hidden context, but also
+ // the previous action - but not more
+ i_undoManager.undo();
+ assertTrue( "Undo after leaving a hidden context does not actually undo the context actions",
+ hiddenUndoAction.undoCalled() );
+ assertTrue( "Undo after leaving a hidden context does not undo the predecessor action",
+ undoAction1.undoCalled() );
+ assertFalse( "Undo after leaving a hidden context undoes too much",
+ undoAction0.undoCalled() );
+
+ // leaving an empty hidden context should call the proper notification method
+ m_undoListener.reset();
+ i_undoManager.enterHiddenUndoContext();
+ i_undoManager.leaveUndoContext();
+ assertFalse( m_undoListener.wasContextLeft() );
+ assertFalse( m_undoListener.wasHiddenContextLeft() );
+ assertTrue( m_undoListener.hasContextBeenCancelled() );
+
+ // nesting hidden and normal contexts
+ m_undoListener.reset();
+ i_undoManager.reset();
+ final CustomUndoAction action0 = new CustomUndoAction( "action 0" );
+ i_undoManager.addUndoAction( action0 );
+ i_undoManager.enterUndoContext( "context 1" );
+ final CustomUndoAction action1 = new CustomUndoAction( "action 1" );
+ i_undoManager.addUndoAction( action1 );
+ i_undoManager.enterHiddenUndoContext();
+ final CustomUndoAction action2 = new CustomUndoAction( "action 2" );
+ i_undoManager.addUndoAction( action2 );
+ i_undoManager.enterUndoContext( "context 2" );
+ // is entering a hidden context rejected even at the nesting level > 0 (the above test was for nesting level == 0)?
+ caughtExpected = false;
+ try { i_undoManager.enterHiddenUndoContext(); }
+ catch( final EmptyUndoStackException e ) { caughtExpected = true; }
+ assertTrue( "at a nesting level > 0, denied hidden contexts does not work as expected", caughtExpected );
+ final CustomUndoAction action3 = new CustomUndoAction( "action 3" );
+ i_undoManager.addUndoAction( action3 );
+ i_undoManager.enterHiddenUndoContext();
+ assertEquals( "mixed hidden/normal context do are not properly notified", 4, m_undoListener.getCurrentUndoContextDepth() );
+ i_undoManager.leaveUndoContext();
+ assertTrue( "the left context was empty - why wasn't 'cancelled' notified?", m_undoListener.hasContextBeenCancelled() );
+ assertFalse( m_undoListener.wasContextLeft() );
+ assertFalse( m_undoListener.wasHiddenContextLeft() );
+ i_undoManager.leaveUndoContext();
+ i_undoManager.leaveUndoContext();
+ i_undoManager.leaveUndoContext();
+ i_undoManager.undo();
+ assertFalse( "one action too much has been undone", action0.undoCalled() );
+ assertTrue( action1.undoCalled() );
+ assertTrue( action2.undoCalled() );
+ assertTrue( action3.undoCalled() );
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ private XComponentContext getContext()
+ {
+ return m_connection.getComponentContext();
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ private XMultiServiceFactory getORB()
+ {
+ final XMultiServiceFactory xMSF1 = UnoRuntime.queryInterface(
+ XMultiServiceFactory.class, getContext().getServiceManager() );
+ return xMSF1;
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ @BeforeClass
+ public static void setUpConnection() throws Exception
+ {
+ System.out.println( "--------------------------------------------------------------------------------" );
+ System.out.println( "starting class: " + UndoManager.class.getName() );
+ System.out.println( "connecting ..." );
+ m_connection.setUp();
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ @AfterClass
+ public static void tearDownConnection() throws InterruptedException, com.sun.star.uno.Exception
+ {
+ System.out.println();
+ System.out.println( "tearing down connection" );
+ m_connection.tearDown();
+ System.out.println( "finished class: " + UndoManager.class.getName() );
+ System.out.println( "--------------------------------------------------------------------------------" );
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ private static class CustomUndoAction implements XUndoAction, XComponent
+ {
+ CustomUndoAction()
+ {
+ m_title = "Custom Undo Action";
+ }
+
+ CustomUndoAction( final String i_title )
+ {
+ m_title = i_title;
+ }
+
+ public String getTitle()
+ {
+ return m_title;
+ }
+
+ public void undo() throws UndoFailedException
+ {
+ m_undoCalled = true;
+ }
+
+ public void redo() throws UndoFailedException
+ {
+ m_redoCalled = true;
+ }
+
+ public void dispose()
+ {
+ m_disposed = true;
+ }
+
+ public void addEventListener( XEventListener xl )
+ {
+ fail( "addEventListener is not expected to be called in the course of this test" );
+ }
+
+ public void removeEventListener( XEventListener xl )
+ {
+ fail( "removeEventListener is not expected to be called in the course of this test" );
+ }
+
+ boolean undoCalled() { return m_undoCalled; }
+ boolean redoCalled() { return m_redoCalled; }
+ boolean disposed() { return m_disposed; }
+
+ private final String m_title;
+ private boolean m_undoCalled = false;
+ private boolean m_redoCalled = false;
+ private boolean m_disposed = false;
+ }
+
+ private static short FAIL_UNDO = 1;
+ private static short FAIL_REDO = 2;
+
+ private static class FailingUndoAction implements XUndoAction
+ {
+ FailingUndoAction( final short i_failWhich )
+ {
+ m_failWhich = i_failWhich;
+ }
+
+ public String getTitle()
+ {
+ return "failing undo";
+ }
+
+ public void undo() throws UndoFailedException
+ {
+ if ( m_failWhich != FAIL_REDO )
+ impl_throw();
+ }
+
+ public void redo() throws UndoFailedException
+ {
+ if ( m_failWhich != FAIL_UNDO )
+ impl_throw();
+ }
+
+ private void impl_throw() throws UndoFailedException
+ {
+ throw new UndoFailedException();
+ }
+
+ private final short m_failWhich;
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ private static class CountingUndoAction implements XUndoAction
+ {
+ CountingUndoAction( final int i_expectedOrder, final Object i_lock, final Integer[] i_actionsUndoneCounter )
+ {
+ m_expectedOrder = i_expectedOrder;
+ m_lock = i_lock;
+ m_actionsUndoneCounter = i_actionsUndoneCounter;
+ }
+
+ public String getTitle()
+ {
+ return "Counting Undo Action";
+ }
+
+ public void undo() throws UndoFailedException
+ {
+ synchronized( m_lock )
+ {
+ assertEquals( "Undo action called out of order", m_expectedOrder, m_actionsUndoneCounter[0].intValue() );
+ ++m_actionsUndoneCounter[0];
+ }
+ }
+
+ public void redo() throws UndoFailedException
+ {
+ fail( "CountingUndoAction.redo is not expected to be called in this test." );
+ }
+ private final int m_expectedOrder;
+ private final Object m_lock;
+ private Integer[] m_actionsUndoneCounter;
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ private static String getCallbackUndoContextTitle()
+ {
+ return "Some Unfinished Undo Context";
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ private static String getCallbackComponentServiceName()
+ {
+ return "org.openoffice.complex.sfx2.Callback";
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ /**
+ * a factory for a callback component which, at OOo runtime, is inserted into OOo's "component repository"
+ */
+ private class CallbackComponentFactory implements XSingleComponentFactory, XServiceInfo, XComponent
+ {
+ public Object createInstanceWithContext( XComponentContext i_context ) throws com.sun.star.uno.Exception
+ {
+ return new CallbackComponent();
+ }
+
+ public Object createInstanceWithArgumentsAndContext( Object[] i_arguments, XComponentContext i_context ) throws com.sun.star.uno.Exception
+ {
+ return createInstanceWithContext( i_context );
+ }
+
+ public String getImplementationName()
+ {
+ return "org.openoffice.complex.sfx2.CallbackComponent";
+ }
+
+ public boolean supportsService( String i_serviceName )
+ {
+ return i_serviceName.equals( getCallbackComponentServiceName() );
+ }
+
+ public String[] getSupportedServiceNames()
+ {
+ return new String[] { getCallbackComponentServiceName() };
+ }
+
+ public void dispose()
+ {
+ final EventObject event = new EventObject( this );
+
+ final ArrayList eventListenersCopy = (ArrayList)m_eventListeners.clone();
+ final Iterator iter = eventListenersCopy.iterator();
+ while ( iter.hasNext() )
+ {
+ ((XEventListener)iter.next()).disposing( event );
+ }
+ }
+
+ public void addEventListener( XEventListener i_listener )
+ {
+ if ( i_listener != null )
+ m_eventListeners.add( i_listener );
+ }
+
+ public void removeEventListener( XEventListener i_listener )
+ {
+ m_eventListeners.remove( i_listener );
+ }
+
+ private final ArrayList m_eventListeners = new ArrayList();
+ };
+
+ // -----------------------------------------------------------------------------------------------------------------
+ private class CallbackComponent implements XJob, XTypeProvider
+ {
+ CallbackComponent()
+ {
+ }
+
+ public Object execute( NamedValue[] i_parameters ) throws com.sun.star.lang.IllegalArgumentException, com.sun.star.uno.Exception
+ {
+ // this method is called from within the Basic script which is to check whether the OOo framework
+ // properly cleans up unfinished Undo contexts. It is called immediately after the context has been
+ // entered, so verify the expected Undo manager state.
+ assertEquals( getCallbackUndoContextTitle(), m_undoListener.getCurrentUndoContextTitle() );
+ assertEquals( 1, m_undoListener.getCurrentUndoContextDepth() );
+
+ synchronized( m_callbackCondition )
+ {
+ m_callbackCalled = true;
+ m_callbackCondition.notifyAll();
+ }
+ return m_closeAfterCallback ? "close" : "";
+ }
+
+ public Type[] getTypes()
+ {
+ final Class interfaces[] = getClass().getInterfaces();
+ Type types[] = new Type[ interfaces.length ];
+ for ( int i = 0; i < interfaces.length; ++i )
+ types[i] = new Type(interfaces[i]);
+ return types;
+ }
+
+ public byte[] getImplementationId()
+ {
+ return getClass().toString().getBytes();
+ }
+ }
+
+ private static final OfficeConnection m_connection = new OfficeConnection();
+ private DocumentTest m_currentTestCase;
+ private OfficeDocument m_currentDocument;
+ private UndoListener m_undoListener;
+ private CallbackComponentFactory m_callbackFactory = null;
+ private boolean m_callbackCalled = false;
+ private boolean m_closeAfterCallback = false;
+ private final Object m_callbackCondition = new Object();
+}
diff --git a/sfx2/qa/complex/docinfo/makefile.mk b/sfx2/qa/complex/sfx2/makefile.mk
index 0c350f1a9618..20b170fba3b4 100644..100755
--- a/sfx2/qa/complex/docinfo/makefile.mk
+++ b/sfx2/qa/complex/sfx2/makefile.mk
@@ -25,32 +25,60 @@
#
#*************************************************************************
-PRJ = ..$/..$/..
-TARGET = DocumentProperties
+.IF "$(OOO_JUNIT_JAR)" == ""
+nothing .PHONY:
+ @echo -----------------------------------------------------
+ @echo - JUnit not available, not building anything
+ @echo -----------------------------------------------------
+.ELSE # IF "$(OOO_JUNIT_JAR)" != ""
+
+PRJ = ../../..
PRJNAME = sfx2
-PACKAGE = complex$/docinfo
+TARGET = qa_complex
+PACKAGE = complex/sfx2
# --- Settings -----------------------------------------------------
-
.INCLUDE: settings.mk
#----- compile .java files -----------------------------------------
-JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
-JAVAFILES = DocumentProperties.java
-
-#----- make a jar from compiled files ------------------------------
+JARFILES = OOoRunnerLight.jar ridl.jar test.jar test-tools.jar unoil.jar
+EXTRAJARFILES = $(OOO_JUNIT_JAR)
+JAVAFILES = $(shell @$(FIND) . -name "*.java") \
-MAXLINELENGTH = 100000
+#----- create a jar from compiled files ----------------------------
-JARCLASSDIRS = $(PACKAGE)
JARTARGET = $(TARGET).jar
-JARCOMPRESS = TRUE
+
+#----- JUnit tests class -------------------------------------------
+
+JAVATESTFILES = \
+ DocumentInfo.java \
+ DocumentProperties.java \
+ StandaloneDocumentInfo.java \
+ DocumentMetadataAccess.java \
+ UndoManager.java \
+
+# disabled: #i115674#
+# GlobalEventBroadcaster.java \
# --- Targets ------------------------------------------------------
-.INCLUDE : target.mk
+.INCLUDE: target.mk
+
+ALL : ALLTAR
+
+# --- subsequent tests ---------------------------------------------
+
+.IF "$(OOO_SUBSEQUENT_TESTS)" != ""
+
+.INCLUDE: installationtest.mk
+
+ALLTAR : javatest
+
+ # Sample how to debug
+ # JAVAIFLAGS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9003,suspend=y
+.END # "$(OOO_SUBSEQUENT_TESTS)" == ""
-run:
- $(JAVAI) $(JAVAIFLAGS) -cp $(CLASSPATH) org.openoffice.Runner -TestBase java_complex -o $(PACKAGE:s#$/#.#).$(JAVAFILES:b)
+.END # ELSE "$(OOO_JUNIT_JAR)" != ""
diff --git a/sfx2/qa/complex/standalonedocumentinfo/StandaloneDocumentInfoTest.java b/sfx2/qa/complex/sfx2/standalonedocinfo/StandaloneDocumentInfoTest.java
index f5512bf9723b..d255f3d16822 100644..100755
--- a/sfx2/qa/complex/standalonedocumentinfo/StandaloneDocumentInfoTest.java
+++ b/sfx2/qa/complex/sfx2/standalonedocinfo/StandaloneDocumentInfoTest.java
@@ -24,7 +24,7 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-package complex.standalonedocumentinfo;
+package complex.sfx2.standalonedocinfo;
public interface StandaloneDocumentInfoTest {
boolean test();
diff --git a/sfx2/qa/complex/standalonedocumentinfo/Test01.java b/sfx2/qa/complex/sfx2/standalonedocinfo/Test01.java
index 92c59d81e1c4..bf54bb4ca90b 100644..100755
--- a/sfx2/qa/complex/standalonedocumentinfo/Test01.java
+++ b/sfx2/qa/complex/sfx2/standalonedocinfo/Test01.java
@@ -24,16 +24,10 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-package complex.standalonedocumentinfo;
-
-import com.sun.star.beans.Property;
-import com.sun.star.beans.XProperty;
-import com.sun.star.beans.XPropertySetInfo;
-import com.sun.star.io.IOException;
-import com.sun.star.io.XInputStream;
-import com.sun.star.io.XOutputStream;
-import complexlib.ComplexTestCase;
+package complex.sfx2.standalonedocinfo;
+import complex.sfx2.standalonedocinfo.TestHelper;
+import complex.sfx2.standalonedocinfo.StandaloneDocumentInfoTest;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.document.XStandaloneDocumentInfo;
import com.sun.star.io.XTempFile;
@@ -43,19 +37,15 @@ import com.sun.star.beans.PropertyValue;
import com.sun.star.beans.XPropertySet;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.AnyConverter;
-import com.sun.star.task.ErrorCodeIOException;
-import java.util.Properties;
-import java.util.Random;
-import share.LogWriter;
public class Test01 implements StandaloneDocumentInfoTest {
XMultiServiceFactory m_xMSF = null;
TestHelper m_aTestHelper = null;
- public Test01 ( XMultiServiceFactory xMSF, LogWriter aLogWriter ) {
+ public Test01 ( XMultiServiceFactory xMSF ) {
m_xMSF = xMSF;
- m_aTestHelper = new TestHelper( aLogWriter, "Test01: " );
+ m_aTestHelper = new TestHelper( "Test01: " );
}
public boolean test() {
@@ -71,19 +61,16 @@ public class Test01 implements StandaloneDocumentInfoTest {
m_aTestHelper.Message ( "==============================" );
//create a new temporary file
Object oTempFile = m_xMSF.createInstance ( "com.sun.star.io.TempFile" );
- XTempFile xTempFile = (XTempFile) UnoRuntime.queryInterface (
- XTempFile.class, oTempFile );
+ XTempFile xTempFile = UnoRuntime.queryInterface(XTempFile.class, oTempFile);
//create a text document and initiallize it
Object oTextDocument = m_xMSF.createInstance ( "com.sun.star.text.TextDocument" );
- XLoadable xLoadable = (XLoadable) UnoRuntime.queryInterface (
- XLoadable.class, oTextDocument );
+ XLoadable xLoadable = UnoRuntime.queryInterface(XLoadable.class, oTextDocument);
xLoadable.initNew();
m_aTestHelper.Message ( "New document initialized." );
//store the instance to the temporary file URL
- XStorable xStorable = (XStorable) UnoRuntime.queryInterface (
- XStorable.class, oTextDocument );
+ XStorable xStorable = UnoRuntime.queryInterface(XStorable.class, oTextDocument);
String sURL = AnyConverter.toString ( xTempFile.getUri () );
PropertyValue aProps[] = new PropertyValue[2];
aProps[0] = new PropertyValue();
@@ -101,15 +88,13 @@ public class Test01 implements StandaloneDocumentInfoTest {
Object oStandaloneDocInfo = m_xMSF.createInstance (
"com.sun.star.document.StandaloneDocumentInfo" );
XStandaloneDocumentInfo xStandaloneDocInfo =
- (XStandaloneDocumentInfo) UnoRuntime.queryInterface (
- XStandaloneDocumentInfo.class, oStandaloneDocInfo );
+ UnoRuntime.queryInterface(XStandaloneDocumentInfo.class, oStandaloneDocInfo);
xStandaloneDocInfo.loadFromURL ( sURL );
m_aTestHelper.Message ( "StandaloneDocumentInfo loaded." );
//get the title from the object and check it
XPropertySet xPropSet =
- (XPropertySet)UnoRuntime.queryInterface (
- XPropertySet.class, oStandaloneDocInfo );
+ UnoRuntime.queryInterface(XPropertySet.class, oStandaloneDocInfo);
String sTitle = xPropSet.getPropertyValue ( "Title" ).toString ();
m_aTestHelper.Message ( "Get title: " + sTitle );
if ( sTitle.compareTo ( sDocTitle[i] ) != 0 ) {
@@ -134,14 +119,12 @@ public class Test01 implements StandaloneDocumentInfoTest {
Object oStandaloneDocInfo_ = m_xMSF.createInstance (
"com.sun.star.document.StandaloneDocumentInfo" );
XStandaloneDocumentInfo xStandaloneDocInfo_ =
- (XStandaloneDocumentInfo)UnoRuntime.queryInterface (
- XStandaloneDocumentInfo.class, oStandaloneDocInfo_ );
+ UnoRuntime.queryInterface(XStandaloneDocumentInfo.class, oStandaloneDocInfo_);
xStandaloneDocInfo_.loadFromURL ( sURL );
m_aTestHelper.Message ( "New StandaloneDocumentInfo loaded." );
//get the title and check it
- XPropertySet xPropSet_ = (XPropertySet)UnoRuntime.queryInterface (
- XPropertySet.class, oStandaloneDocInfo_ );
+ XPropertySet xPropSet_ = UnoRuntime.queryInterface(XPropertySet.class, oStandaloneDocInfo_);
String sTitle_ = xPropSet_.getPropertyValue ( "Title" ).toString ();
m_aTestHelper.Message ( "Get new title: " + sTitle_ );
if ( sTitle_.compareTo ( sTitle ) != 0 ) {
diff --git a/sfx2/qa/complex/standalonedocumentinfo/TestHelper.java b/sfx2/qa/complex/sfx2/standalonedocinfo/TestHelper.java
index f319fe412227..a650ce9bb2e4 100644..100755
--- a/sfx2/qa/complex/standalonedocumentinfo/TestHelper.java
+++ b/sfx2/qa/complex/sfx2/standalonedocinfo/TestHelper.java
@@ -24,25 +24,25 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-package complex.standalonedocumentinfo;
+package complex.sfx2.standalonedocinfo;
-import share.LogWriter;
public class TestHelper {
- LogWriter m_aLogWriter;
+
String m_sTestPrefix;
- /** Creates a new instance of TestHelper */
- public TestHelper ( LogWriter aLogWriter, String sTestPrefix ) {
- m_aLogWriter = aLogWriter;
+ /** Creates a new instance of TestHelper
+ * @param sTestPrefix
+ */
+ public TestHelper ( String sTestPrefix ) {
m_sTestPrefix = sTestPrefix;
}
public void Error ( String sError ) {
- m_aLogWriter.println ( m_sTestPrefix + "Error: " + sError );
+ System.out.println ( m_sTestPrefix + "Error: " + sError );
}
public void Message ( String sMessage ) {
- m_aLogWriter.println ( m_sTestPrefix + sMessage );
+ System.out.println ( m_sTestPrefix + sMessage );
}
}
diff --git a/sfx2/qa/complex/testdocuments/CUSTOM.odt b/sfx2/qa/complex/sfx2/testdocuments/CUSTOM.odt
index 831a8f451dfd..831a8f451dfd 100644..100755
--- a/sfx2/qa/complex/testdocuments/CUSTOM.odt
+++ b/sfx2/qa/complex/sfx2/testdocuments/CUSTOM.odt
Binary files differ
diff --git a/sfx2/qa/complex/testdocuments/TEST.odt b/sfx2/qa/complex/sfx2/testdocuments/TEST.odt
index 7c6f0b60f7b0..7c6f0b60f7b0 100644..100755
--- a/sfx2/qa/complex/testdocuments/TEST.odt
+++ b/sfx2/qa/complex/sfx2/testdocuments/TEST.odt
Binary files differ
diff --git a/sfx2/qa/complex/testdocuments/TESTRDFA.odt b/sfx2/qa/complex/sfx2/testdocuments/TESTRDFA.odt
index d59739142df6..d59739142df6 100644..100755
--- a/sfx2/qa/complex/testdocuments/TESTRDFA.odt
+++ b/sfx2/qa/complex/sfx2/testdocuments/TESTRDFA.odt
Binary files differ
diff --git a/sfx2/qa/complex/sfx2/testdocuments/empty.rdf b/sfx2/qa/complex/sfx2/testdocuments/empty.rdf
new file mode 100755
index 000000000000..af62bab39dfa
--- /dev/null
+++ b/sfx2/qa/complex/sfx2/testdocuments/empty.rdf
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+
+<RDF
+ xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:s="http://www.w3.org/2000/01/rdf-schema#">
+
+<!--
+ This is the RDF Schema for the RDF data model as described in the
+ Resource Description Framework (RDF) Model and Syntax Specification
+ http://www.w3.org/TR/REC-rdf-syntax -->
+
+</RDF>
diff --git a/sfx2/qa/complex/DocHelper/DialogThread.java b/sfx2/qa/complex/sfx2/tools/DialogThread.java
index 7151ccbb292d..e67e65f218db 100644..100755
--- a/sfx2/qa/complex/DocHelper/DialogThread.java
+++ b/sfx2/qa/complex/sfx2/tools/DialogThread.java
@@ -24,7 +24,7 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-package complex.framework.DocHelper;
+package complex.sfx2.tools;
import com.sun.star.beans.PropertyValue;
import com.sun.star.frame.XController;
@@ -37,9 +37,6 @@ import com.sun.star.uno.UnoRuntime;
import com.sun.star.util.URL;
import com.sun.star.util.XURLTransformer;
-import java.lang.Thread;
-
-
/**
* This class opens a given dialog in a separate Thread by dispatching an url
*
@@ -55,21 +52,17 @@ public class DialogThread extends Thread {
this.m_url = url;
}
+ @Override
public void run() {
- XModel aModel = (XModel) UnoRuntime.queryInterface(XModel.class,
- m_xDoc);
+ XModel aModel = UnoRuntime.queryInterface( XModel.class, m_xDoc );
XController xController = aModel.getCurrentController();
//Opening Dialog
try {
- XDispatchProvider xDispProv = (XDispatchProvider) UnoRuntime.queryInterface(
- XDispatchProvider.class,
- xController.getFrame());
- XURLTransformer xParser = (com.sun.star.util.XURLTransformer) UnoRuntime.queryInterface(
- XURLTransformer.class,
- m_xMSF.createInstance(
- "com.sun.star.util.URLTransformer"));
+ XDispatchProvider xDispProv = UnoRuntime.queryInterface( XDispatchProvider.class, xController.getFrame() );
+ XURLTransformer xParser = UnoRuntime.queryInterface( XURLTransformer.class,
+ m_xMSF.createInstance( "com.sun.star.util.URLTransformer" ) );
// Because it's an in/out parameter
// we must use an array of URL objects.
diff --git a/sfx2/qa/complex/sfx2/tools/TestDocument.java b/sfx2/qa/complex/sfx2/tools/TestDocument.java
new file mode 100755
index 000000000000..8f2108df358e
--- /dev/null
+++ b/sfx2/qa/complex/sfx2/tools/TestDocument.java
@@ -0,0 +1,40 @@
+/*************************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+************************************************************************/
+
+package complex.sfx2.tools;
+
+import java.io.File;
+import org.openoffice.test.OfficeFileUrl;
+import org.openoffice.test.Argument;
+
+public final class TestDocument {
+ public static String getUrl(String name) {
+ return OfficeFileUrl.getAbsolute(new File(Argument.get("tdoc"), name));
+ }
+
+ private TestDocument() {}
+}
diff --git a/sfx2/qa/complex/DocHelper/WriterHelper.java b/sfx2/qa/complex/sfx2/tools/WriterHelper.java
index b65e8e915423..4767028572bb 100644..100755
--- a/sfx2/qa/complex/DocHelper/WriterHelper.java
+++ b/sfx2/qa/complex/sfx2/tools/WriterHelper.java
@@ -24,7 +24,7 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-package complex.framework.DocHelper;
+package complex.sfx2.tools;
import com.sun.star.accessibility.AccessibleRole;
import com.sun.star.accessibility.XAccessible;
@@ -40,7 +40,6 @@ import com.sun.star.text.XTextDocument;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.util.XCloseable;
-import complex.framework.DocHelper.DialogThread;
import java.io.PrintWriter;
import util.AccessibilityTools;
@@ -73,19 +72,20 @@ public class WriterHelper {
* @return if an error occurs the errormessage is returned and an empty String if not
*/
public String closeDoc(XTextDocument xTextDoc) {
- XCloseable closer = (XCloseable) UnoRuntime.queryInterface(
- XCloseable.class, xTextDoc);
+ XCloseable closer = UnoRuntime.queryInterface(XCloseable.class, xTextDoc);
String err = "";
try {
closer.close(true);
} catch (com.sun.star.util.CloseVetoException e) {
err = "couldn't close document " + e;
+ System.out.println(err);
}
return err;
}
+ private XTextDocument xLocalDoc = null;
/** a TextDocument is opened by pressing a button in a dialog given by uno-URL
* @param url the uno-URL of the dialog to be opened
* @param createButton the language dependend label of the button to be pressed
@@ -95,30 +95,25 @@ public class WriterHelper {
*/
public XTextDocument openFromDialog(String url, String createButton,
boolean destroyLocal) {
- XTextDocument xLocalDoc = WriterTools.createTextDoc(m_xMSF);
- XComponent comp = (XComponent) UnoRuntime.queryInterface(
- XComponent.class, xLocalDoc);
+ xLocalDoc = WriterTools.createTextDoc(m_xMSF);
+ XComponent comp = UnoRuntime.queryInterface(XComponent.class, xLocalDoc);
DialogThread diagThread = new DialogThread(comp, m_xMSF, url);
diagThread.start();
shortWait();
if (createButton.length() > 1) {
XExtendedToolkit tk = getToolkit();
- AccessibilityTools at = new AccessibilityTools();
Object atw = tk.getActiveTopWindow();
- XWindow xWindow = (XWindow) UnoRuntime.queryInterface(
- XWindow.class, atw);
+ XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, atw);
- XAccessible xRoot = at.getAccessibleObject(xWindow);
- XAccessibleContext buttonContext = at.getAccessibleObjectForRole(
+ XAccessible xRoot = AccessibilityTools.getAccessibleObject(xWindow);
+ XAccessibleContext buttonContext = AccessibilityTools.getAccessibleObjectForRole(
xRoot,
AccessibleRole.PUSH_BUTTON,
createButton);
- XAccessibleAction buttonAction = (XAccessibleAction) UnoRuntime.queryInterface(
- XAccessibleAction.class,
- buttonContext);
+ XAccessibleAction buttonAction = UnoRuntime.queryInterface(XAccessibleAction.class, buttonContext);
try {
System.out.println("Name: " +
@@ -133,47 +128,52 @@ public class WriterHelper {
XDesktop xDesktop = getDesktop();
- XTextDocument returnDoc = (XTextDocument) UnoRuntime.queryInterface(
- XTextDocument.class,
- xDesktop.getCurrentComponent());
+ XTextDocument returnDoc = UnoRuntime.queryInterface(XTextDocument.class, xDesktop.getCurrentComponent());
if (destroyLocal) {
closeDoc(xLocalDoc);
+ xLocalDoc = null;
}
return returnDoc;
}
+ public void closeFromDialog()
+ {
+ closeDoc(xLocalDoc);
+ xLocalDoc = null;
+ }
+ public void kill()
+ {
+ XDesktop xDesktop = getDesktop();
+ xDesktop.terminate();
+ }
+
public XTextDocument DocByAutopilot(XMultiServiceFactory msf,
int[] indexes, boolean destroyLocal,
String bName) {
- XTextDocument xLocalDoc = WriterTools.createTextDoc(m_xMSF);
+ XTextDocument xTextDoc = WriterTools.createTextDoc(m_xMSF);
Object toolkit = null;
try {
toolkit = msf.createInstance("com.sun.star.awt.Toolkit");
} catch (com.sun.star.uno.Exception e) {
- e.printStackTrace();
+ e.printStackTrace( System.err );
}
- XExtendedToolkit tk = (XExtendedToolkit) UnoRuntime.queryInterface(
- XExtendedToolkit.class, toolkit);
+ XExtendedToolkit tk = UnoRuntime.queryInterface(XExtendedToolkit.class, toolkit);
shortWait();
- AccessibilityTools at = new AccessibilityTools();
-
Object atw = tk.getActiveTopWindow();
- XWindow xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class,
- atw);
+ XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, atw);
- XAccessible xRoot = at.getAccessibleObject(xWindow);
+ XAccessible xRoot = AccessibilityTools.getAccessibleObject(xWindow);
- XAccessibleContext ARoot = at.getAccessibleObjectForRole(xRoot,
+ XAccessibleContext ARoot = AccessibilityTools.getAccessibleObjectForRole(xRoot,
AccessibleRole.MENU_BAR);
- XAccessibleSelection sel = (XAccessibleSelection) UnoRuntime.queryInterface(
- XAccessibleSelection.class, ARoot);
+ XAccessibleSelection sel = UnoRuntime.queryInterface(XAccessibleSelection.class, ARoot);
for (int k = 0; k < indexes.length; k++) {
try {
@@ -181,8 +181,7 @@ public class WriterHelper {
shortWait();
ARoot = ARoot.getAccessibleChild(indexes[k])
.getAccessibleContext();
- sel = (XAccessibleSelection) UnoRuntime.queryInterface(
- XAccessibleSelection.class, ARoot);
+ sel = UnoRuntime.queryInterface(XAccessibleSelection.class, ARoot);
} catch (com.sun.star.lang.IndexOutOfBoundsException e) {
}
}
@@ -191,17 +190,13 @@ public class WriterHelper {
atw = tk.getActiveTopWindow();
- xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, atw);
+ xWindow = UnoRuntime.queryInterface(XWindow.class, atw);
- xRoot = at.getAccessibleObject(xWindow);
+ xRoot = AccessibilityTools.getAccessibleObject(xWindow);
//at.printAccessibleTree(new PrintWriter(System.out),xRoot);
- XAccessibleAction action = (XAccessibleAction) UnoRuntime.queryInterface(
- XAccessibleAction.class,
- at.getAccessibleObjectForRole(xRoot,
- AccessibleRole.PUSH_BUTTON,
- bName));
+ XAccessibleAction action = UnoRuntime.queryInterface(XAccessibleAction.class, AccessibilityTools.getAccessibleObjectForRole(xRoot, AccessibleRole.PUSH_BUTTON, bName));
try {
action.doAccessibleAction(0);
@@ -212,17 +207,13 @@ public class WriterHelper {
atw = tk.getActiveTopWindow();
- xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, atw);
+ xWindow = UnoRuntime.queryInterface(XWindow.class, atw);
- xRoot = at.getAccessibleObject(xWindow);
+ xRoot = AccessibilityTools.getAccessibleObject(xWindow);
- at.printAccessibleTree(new PrintWriter(System.out),xRoot);
+ AccessibilityTools.printAccessibleTree(new PrintWriter(System.out),xRoot);
- action = (XAccessibleAction) UnoRuntime.queryInterface(
- XAccessibleAction.class,
- at.getAccessibleObjectForRole(xRoot,
- AccessibleRole.PUSH_BUTTON,
- "Yes"));
+ action = UnoRuntime.queryInterface(XAccessibleAction.class, AccessibilityTools.getAccessibleObjectForRole(xRoot, AccessibleRole.PUSH_BUTTON, "Yes"));
try {
if (action != null) action.doAccessibleAction(0);
@@ -233,12 +224,10 @@ public class WriterHelper {
XDesktop xDesktop = getDesktop();
- XTextDocument returnDoc = (XTextDocument) UnoRuntime.queryInterface(
- XTextDocument.class,
- xDesktop.getCurrentComponent());
+ XTextDocument returnDoc = UnoRuntime.queryInterface(XTextDocument.class, xDesktop.getCurrentComponent());
if (destroyLocal) {
- closeDoc(xLocalDoc);
+ closeDoc(xTextDoc);
}
return returnDoc;
@@ -266,11 +255,10 @@ public class WriterHelper {
toolkit = m_xMSF.createInstance("com.sun.star.awt.Toolkit");
} catch (com.sun.star.uno.Exception e) {
System.out.println("Couldn't get toolkit");
- e.printStackTrace();
+ e.printStackTrace( System.err );
}
- XExtendedToolkit tk = (XExtendedToolkit) UnoRuntime.queryInterface(
- XExtendedToolkit.class, toolkit);
+ XExtendedToolkit tk = UnoRuntime.queryInterface(XExtendedToolkit.class, toolkit);
return tk;
}
@@ -285,11 +273,10 @@ public class WriterHelper {
desk = m_xMSF.createInstance("com.sun.star.frame.Desktop");
} catch (com.sun.star.uno.Exception e) {
System.out.println("Couldn't get desktop");
- e.printStackTrace();
+ e.printStackTrace( System.err );
}
- XDesktop xDesktop = (XDesktop) UnoRuntime.queryInterface(
- XDesktop.class, desk);
+ XDesktop xDesktop = UnoRuntime.queryInterface(XDesktop.class, desk);
return xDesktop;
}
diff --git a/sfx2/qa/complex/sfx2/undo/CalcDocumentTest.java b/sfx2/qa/complex/sfx2/undo/CalcDocumentTest.java
new file mode 100755
index 000000000000..34825fdbada9
--- /dev/null
+++ b/sfx2/qa/complex/sfx2/undo/CalcDocumentTest.java
@@ -0,0 +1,96 @@
+package complex.sfx2.undo;
+
+import org.openoffice.test.tools.SpreadsheetDocument;
+import com.sun.star.table.XCellRange;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.table.XCell;
+import com.sun.star.uno.UnoRuntime;
+import org.openoffice.test.tools.DocumentType;
+import static org.junit.Assert.*;
+
+/**
+ * implements the {@link DocumentTest} interface on top of a spreadsheet document
+ * @author frank.schoenheit@oracle.com
+ */
+public class CalcDocumentTest extends DocumentTestBase
+{
+ public CalcDocumentTest( final XMultiServiceFactory i_orb ) throws Exception
+ {
+ super( i_orb, DocumentType.CALC );
+ }
+
+ public String getDocumentDescription()
+ {
+ return "spreadsheet document";
+ }
+
+ public void initializeDocument() throws com.sun.star.uno.Exception
+ {
+ final XCell cellA1 = getCellA1();
+ cellA1.setValue( INIT_VALUE );
+ assertEquals( "initializing the cell value didn't work", cellA1.getValue(), INIT_VALUE, 0 );
+
+ XCellRange range = UnoRuntime.queryInterface( XCellRange.class,
+ ((SpreadsheetDocument)m_document).getSheet(0) );
+
+ for ( int i=0; i<12; ++i )
+ {
+ XCell cell = range.getCellByPosition( 1, i );
+ cell.setFormula( "" );
+ }
+ }
+
+ public void doSingleModification() throws com.sun.star.uno.Exception
+ {
+ final XCell cellA1 = getCellA1();
+ assertEquals( "initial cell value not as expected", INIT_VALUE, cellA1.getValue(), 0 );
+ cellA1.setValue( MODIFIED_VALUE );
+ assertEquals( "modified cell value not as expected", MODIFIED_VALUE, cellA1.getValue(), 0 );
+ }
+
+ public void verifyInitialDocumentState() throws com.sun.star.uno.Exception
+ {
+ final XCell cellA1 = getCellA1();
+ assertEquals( "cell A1 doesn't have its initial value", INIT_VALUE, cellA1.getValue(), 0 );
+
+ XCellRange range = UnoRuntime.queryInterface( XCellRange.class,
+ ((SpreadsheetDocument)m_document).getSheet(0) );
+ for ( int i=0; i<12; ++i )
+ {
+ final XCell cell = range.getCellByPosition( 1, i );
+ assertEquals( "Cell B" + (i+1) + " not having its initial value (an empty string)", "", cell.getFormula() );
+ }
+ }
+
+ public void verifySingleModificationDocumentState() throws com.sun.star.uno.Exception
+ {
+ final XCell cellA1 = getCellA1();
+ assertEquals( "cell A1 doesn't have the value which we gave it", MODIFIED_VALUE, cellA1.getValue(), 0 );
+ }
+
+ public int doMultipleModifications() throws com.sun.star.uno.Exception
+ {
+ XCellRange range = UnoRuntime.queryInterface( XCellRange.class,
+ ((SpreadsheetDocument)m_document).getSheet(0) );
+
+ final String[] months = new String[] {
+ "January", "February", "March", "April", "May", "June", "July", "August",
+ "September", "October", "November", "December" };
+ for ( int i=0; i<12; ++i )
+ {
+ final XCell cell = range.getCellByPosition( 1, i );
+ cell.setFormula( months[i] );
+ }
+ return 12;
+ }
+
+ private XCell getCellA1() throws com.sun.star.uno.Exception
+ {
+ XCellRange range = UnoRuntime.queryInterface( XCellRange.class,
+ ((SpreadsheetDocument)m_document).getSheet(0) );
+ return range.getCellByPosition( 0, 0 );
+ }
+
+ private static final double INIT_VALUE = 100.0;
+ private static final double MODIFIED_VALUE = 200.0;
+}
diff --git a/sfx2/qa/complex/sfx2/undo/ChartDocumentTest.java b/sfx2/qa/complex/sfx2/undo/ChartDocumentTest.java
new file mode 100755
index 000000000000..7c8421ec6e5b
--- /dev/null
+++ b/sfx2/qa/complex/sfx2/undo/ChartDocumentTest.java
@@ -0,0 +1,277 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ *************************************************************************/
+
+package complex.sfx2.undo;
+
+import com.sun.star.chart2.XAxis;
+import com.sun.star.chart2.XCoordinateSystem;
+import com.sun.star.chart2.XCoordinateSystemContainer;
+import com.sun.star.awt.Size;
+import com.sun.star.beans.NamedValue;
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.chart2.XChartDocument;
+import com.sun.star.chart2.XDiagram;
+import com.sun.star.container.XIndexAccess;
+import com.sun.star.document.UndoFailedException;
+import com.sun.star.document.XUndoAction;
+import com.sun.star.document.XUndoManager;
+import com.sun.star.document.XUndoManagerSupplier;
+import com.sun.star.drawing.XShape;
+import com.sun.star.embed.EmbedStates;
+import com.sun.star.embed.EmbedVerbs;
+import com.sun.star.embed.VerbDescriptor;
+import com.sun.star.embed.WrongStateException;
+import com.sun.star.embed.XEmbeddedObject;
+import com.sun.star.embed.XStateChangeBroadcaster;
+import com.sun.star.embed.XStateChangeListener;
+import com.sun.star.lang.EventObject;
+import com.sun.star.lang.IndexOutOfBoundsException;
+import com.sun.star.lang.WrappedTargetException;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.text.XTextContent;
+import com.sun.star.text.XTextRange;
+import com.sun.star.uno.UnoRuntime;
+import com.sun.star.view.XSelectionSupplier;
+import org.openoffice.test.tools.DocumentType;
+import org.openoffice.test.tools.OfficeDocument;
+import static org.junit.Assert.*;
+
+/**
+ * @author frank.schoenheit@oracle.com
+ */
+public class ChartDocumentTest implements DocumentTest
+{
+ public ChartDocumentTest( final XMultiServiceFactory i_orb ) throws com.sun.star.uno.Exception, InterruptedException
+ {
+ m_textDocument = OfficeDocument.blankDocument( i_orb, DocumentType.WRITER );
+
+ // create a OLE shape in the document
+ final XMultiServiceFactory factory = UnoRuntime.queryInterface( XMultiServiceFactory.class, m_textDocument.getDocument() );
+ final String shapeServiceName = "com.sun.star.text.TextEmbeddedObject";
+ final XPropertySet shapeProps = UnoRuntime.queryInterface( XPropertySet.class, factory.createInstance( shapeServiceName ) );
+ shapeProps.setPropertyValue("CLSID", "12dcae26-281f-416f-a234-c3086127382e");
+
+ final XShape shape = UnoRuntime.queryInterface( XShape.class, shapeProps );
+ shape.setSize( new Size( 16000, 9000 ) );
+
+ final XTextContent chartTextContent = UnoRuntime.queryInterface( XTextContent.class, shapeProps );
+
+ final XSelectionSupplier selSupplier = UnoRuntime.queryInterface( XSelectionSupplier.class,
+ m_textDocument.getCurrentView().getController() );
+ final Object selection = selSupplier.getSelection();
+ final XTextRange textRange = getAssociatedTextRange( selection );
+ if ( textRange == null )
+ throw new RuntimeException( "can't locate a text range" );
+
+ // insert the chart
+ textRange.getText().insertTextContent(textRange, chartTextContent, false);
+
+ // retrieve the chart model
+ XChartDocument chartDoc = UnoRuntime.queryInterface( XChartDocument.class, shapeProps.getPropertyValue( "Model" ) );
+ m_chartDocument = new OfficeDocument( i_orb, chartDoc );
+
+ // actually activate the object
+ final XEmbeddedObject embeddedChart = UnoRuntime.queryInterface( XEmbeddedObject.class,
+ shapeProps.getPropertyValue( "EmbeddedObject" ) );
+ embeddedChart.doVerb( EmbedVerbs.MS_OLEVERB_SHOW );
+
+ final int state = embeddedChart.getCurrentState();
+ if ( state != EmbedStates.UI_ACTIVE )
+ fail( "unable to activate the embedded chart" );
+ }
+
+ public String getDocumentDescription()
+ {
+ return "chart document";
+ }
+
+ public void initializeDocument() throws com.sun.star.uno.Exception
+ {
+ final XPropertySet wallProperties = impl_getWallProperties();
+ wallProperties.setPropertyValue( "FillStyle", com.sun.star.drawing.FillStyle.SOLID );
+ wallProperties.setPropertyValue( "FillColor", 0x00FFFFFF );
+ }
+
+ public void closeDocument()
+ {
+ m_textDocument.close();
+ }
+
+ private XPropertySet impl_getWallProperties()
+ {
+ final XChartDocument chartDoc = UnoRuntime.queryInterface( XChartDocument.class, m_chartDocument.getDocument() );
+ final XDiagram diagram = chartDoc.getFirstDiagram();
+ final XPropertySet wallProperties = diagram.getWall();
+ return wallProperties;
+ }
+
+ private XPropertySet impl_getYAxisProperties()
+ {
+ XPropertySet axisProperties = null;
+ try
+ {
+ final XChartDocument chartDoc = UnoRuntime.queryInterface( XChartDocument.class, m_chartDocument.getDocument() );
+ final XDiagram diagram = chartDoc.getFirstDiagram();
+ final XCoordinateSystemContainer coordContainer = UnoRuntime.queryInterface( XCoordinateSystemContainer.class, diagram );
+ final XCoordinateSystem[] coordSystems = coordContainer.getCoordinateSystems();
+ final XCoordinateSystem coordSystem = coordSystems[0];
+ final XAxis primaryYAxis = coordSystem.getAxisByDimension( 1, 0 );
+ axisProperties = UnoRuntime.queryInterface( XPropertySet.class, primaryYAxis );
+ }
+ catch ( Exception ex )
+ {
+ fail( "internal error: could not retrieve primary Y axis properties" );
+ }
+ return axisProperties;
+ }
+
+ private XUndoManager impl_getUndoManager()
+ {
+ final XUndoManagerSupplier undoManagerSupp = UnoRuntime.queryInterface( XUndoManagerSupplier.class, m_chartDocument.getDocument() );
+ final XUndoManager undoManager = undoManagerSupp.getUndoManager();
+ return undoManager;
+ }
+
+ public void doSingleModification() throws com.sun.star.uno.Exception
+ {
+ final XPropertySet wallProperties = impl_getWallProperties();
+
+ // simulate an Undo action, as long as the chart implementation doesn't add Undo actions itself
+ final XUndoManager undoManager = impl_getUndoManager();
+ undoManager.addUndoAction( new PropertyUndoAction( wallProperties, "FillColor", 0xCCFF44 ) );
+ // (the UndoAction will actually set the property value)
+ }
+
+ public void verifyInitialDocumentState() throws com.sun.star.uno.Exception
+ {
+ final XPropertySet wallProperties = impl_getWallProperties();
+ assertEquals( 0x00FFFFFF, ((Integer)wallProperties.getPropertyValue( "FillColor" )).intValue() );
+ }
+
+ public void verifySingleModificationDocumentState() throws com.sun.star.uno.Exception
+ {
+ final XPropertySet wallProperties = impl_getWallProperties();
+ assertEquals( 0xCCFF44, ((Integer)wallProperties.getPropertyValue( "FillColor" )).intValue() );
+ }
+
+ public int doMultipleModifications() throws com.sun.star.uno.Exception
+ {
+ final XPropertySet axisProperties = impl_getYAxisProperties();
+
+ final XUndoManager undoManager = impl_getUndoManager();
+ undoManager.addUndoAction( new PropertyUndoAction( axisProperties, "LineWidth", 300 ) );
+ undoManager.addUndoAction( new PropertyUndoAction( axisProperties, "LineColor", 0x000000 ) );
+
+ return 2;
+ }
+
+ public OfficeDocument getDocument()
+ {
+ return m_chartDocument;
+ }
+
+ private XTextRange getAssociatedTextRange( final Object i_object ) throws WrappedTargetException, IndexOutOfBoundsException
+ {
+ // possible cases:
+ // 1. a container of other objects - e.g. selection of 0 to n text portions, or 1 to n drawing objects
+ final XIndexAccess indexer = UnoRuntime.queryInterface( XIndexAccess.class, i_object );
+ if ((indexer != null) && indexer.getCount() > 0) {
+ final int count = indexer.getCount();
+ for (int i = 0; i < count; ++i) {
+ final XTextRange range = getAssociatedTextRange( indexer.getByIndex(i) );
+ if (range != null) {
+ return range;
+ }
+ }
+ }
+ // 2. another TextContent, having an anchor we can use
+ final XTextContent textContent = UnoRuntime.queryInterface(XTextContent.class, i_object);
+ if (textContent != null) {
+ final XTextRange range = textContent.getAnchor();
+ if (range != null) {
+ return range;
+ }
+ }
+
+ // an object which supports XTextRange directly
+ final XTextRange range = UnoRuntime.queryInterface(XTextRange.class, i_object);
+ if (range != null) {
+ return range;
+ }
+
+ return null;
+ }
+
+ private static class PropertyUndoAction implements XUndoAction
+ {
+ PropertyUndoAction( final XPropertySet i_component, final String i_propertyName, final Object i_newValue ) throws com.sun.star.uno.Exception
+ {
+ m_component = i_component;
+ m_propertyName = i_propertyName;
+ m_newValue = i_newValue;
+
+ m_oldValue = i_component.getPropertyValue( m_propertyName );
+ i_component.setPropertyValue( m_propertyName, m_newValue );
+ }
+
+ public String getTitle()
+ {
+ return "some dummy Undo Action";
+ }
+
+ public void undo() throws UndoFailedException
+ {
+ try
+ {
+ m_component.setPropertyValue( m_propertyName, m_oldValue );
+ }
+ catch ( com.sun.star.uno.Exception ex )
+ {
+ throw new UndoFailedException( "", this, ex );
+ }
+ }
+
+ public void redo() throws UndoFailedException
+ {
+ try
+ {
+ m_component.setPropertyValue( m_propertyName, m_newValue );
+ }
+ catch ( com.sun.star.uno.Exception ex )
+ {
+ throw new UndoFailedException( "", this, ex );
+ }
+ }
+
+ private final XPropertySet m_component;
+ private final String m_propertyName;
+ private final Object m_oldValue;
+ private final Object m_newValue;
+ }
+
+ private final OfficeDocument m_textDocument;
+ private final OfficeDocument m_chartDocument;
+}
diff --git a/sfx2/qa/complex/sfx2/undo/DocumentTest.java b/sfx2/qa/complex/sfx2/undo/DocumentTest.java
new file mode 100755
index 000000000000..d6de90884673
--- /dev/null
+++ b/sfx2/qa/complex/sfx2/undo/DocumentTest.java
@@ -0,0 +1,61 @@
+package complex.sfx2.undo;
+
+import org.openoffice.test.tools.OfficeDocument;
+
+/**
+ * wrapper around an OfficeDocument, for running a standardized test procedure (related do Undo functionality)
+ * on the document.
+ *
+ * @author frank.schoenheit@oracle.com
+ */
+public interface DocumentTest
+{
+ /**
+ * returns a human-readable description for the document/type which the tests operates on
+ */
+ public String getDocumentDescription();
+
+ /**
+ * initializes the document to a state where the subsequent tests can be ran
+ */
+ public void initializeDocument() throws com.sun.star.uno.Exception;
+
+ /**
+ * closes the document which the test is based on
+ */
+ public void closeDocument();
+
+ /**
+ * does a simple modification to the document, which results in one Undo action being auto-generated
+ * by the OOo implementation
+ */
+ public void doSingleModification() throws com.sun.star.uno.Exception;
+
+ /**
+ * verifies the document is in the same state as after {@link #initializeDocument}
+ */
+ public void verifyInitialDocumentState() throws com.sun.star.uno.Exception;
+
+ /**
+ * verifies the document is in the state as expected after {@link #doSingleModification}
+ * @throws com.sun.star.uno.Exception
+ */
+ public void verifySingleModificationDocumentState() throws com.sun.star.uno.Exception;
+
+ /**
+ * does multiple modifications do the document, which would normally result in multiple Undo actions.
+ *
+ * The test framework will encapsulate the call into an {@link XUndoManager.enterUndoContext()} and
+ * {@link XUndoManager.leaveUndoContext()} call.
+ *
+ * @return
+ * the number of modifications done to the document. The caller assumes (and asserts) that the number
+ * of actions on the Undo stack equals this number.
+ */
+ public int doMultipleModifications() throws com.sun.star.uno.Exception;
+
+ /**
+ * returns the document which the test operates on
+ */
+ public OfficeDocument getDocument();
+}
diff --git a/sfx2/qa/complex/sfx2/undo/DocumentTestBase.java b/sfx2/qa/complex/sfx2/undo/DocumentTestBase.java
new file mode 100755
index 000000000000..11adc80c2e85
--- /dev/null
+++ b/sfx2/qa/complex/sfx2/undo/DocumentTestBase.java
@@ -0,0 +1,29 @@
+package complex.sfx2.undo;
+
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.uno.Exception;
+import org.openoffice.test.tools.DocumentType;
+import org.openoffice.test.tools.OfficeDocument;
+
+/**
+ * @author frank.schoenheit@oracle.com
+ */
+abstract class DocumentTestBase implements DocumentTest
+{
+ DocumentTestBase( final XMultiServiceFactory i_orb, final DocumentType i_docType ) throws Exception
+ {
+ m_document = OfficeDocument.blankDocument( i_orb, i_docType );
+ }
+
+ public OfficeDocument getDocument()
+ {
+ return m_document;
+ }
+
+ public void closeDocument()
+ {
+ m_document.close();
+ }
+
+ protected final OfficeDocument m_document;
+}
diff --git a/sfx2/source/config/config.hrc b/sfx2/qa/complex/sfx2/undo/DrawDocumentTest.java
index 582a2972f913..d98e1372dea5 100644..100755
--- a/sfx2/source/config/config.hrc
+++ b/sfx2/qa/complex/sfx2/undo/DrawDocumentTest.java
@@ -1,5 +1,4 @@
/*************************************************************************
- *
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
@@ -23,19 +22,25 @@
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
- ************************************************************************/
-
-#ifndef _SFX_CONFIG_HRC
-#define _SFX_CONFIG_HRC
-
-#include <sfx2/sfx.hrc>
+ *************************************************************************/
-// #defines *****************************************************************
+package complex.sfx2.undo;
-#define BTN_OK 2
-#define BTN_CANCEL 3
-#define FT_OK 4
-#define FT_CANCEL 5
+import com.sun.star.lang.XMultiServiceFactory;
+import org.openoffice.test.tools.DocumentType;
-#endif
+/**
+ * @author frank.schoenheit@oracle.com
+ */
+public class DrawDocumentTest extends DrawingOrPresentationDocumentTest
+{
+ public DrawDocumentTest( XMultiServiceFactory i_orb ) throws com.sun.star.uno.Exception
+ {
+ super( i_orb, DocumentType.DRAWING );
+ }
+ public String getDocumentDescription()
+ {
+ return "drawing document";
+ }
+}
diff --git a/sfx2/qa/complex/sfx2/undo/DrawingOrPresentationDocumentTest.java b/sfx2/qa/complex/sfx2/undo/DrawingOrPresentationDocumentTest.java
new file mode 100755
index 000000000000..916e1908e93d
--- /dev/null
+++ b/sfx2/qa/complex/sfx2/undo/DrawingOrPresentationDocumentTest.java
@@ -0,0 +1,196 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package complex.sfx2.undo;
+
+import com.sun.star.awt.Rectangle;
+import com.sun.star.document.XUndoManager;
+import com.sun.star.document.XUndoManagerSupplier;
+import com.sun.star.document.XUndoAction;
+import com.sun.star.awt.Point;
+import com.sun.star.awt.Size;
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.drawing.CircleKind;
+import com.sun.star.drawing.XDrawPages;
+import com.sun.star.drawing.XDrawPagesSupplier;
+import com.sun.star.drawing.XShape;
+import com.sun.star.drawing.XShapes;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.uno.UnoRuntime;
+import org.openoffice.test.tools.DocumentType;
+import static org.junit.Assert.*;
+
+/**
+ * implements the {@link DocumentTest} interface on top of a drawing document
+ * @author frank.schoenheit@oracle.com
+ */
+public abstract class DrawingOrPresentationDocumentTest extends DocumentTestBase
+{
+ public DrawingOrPresentationDocumentTest( XMultiServiceFactory i_orb, final DocumentType i_docType ) throws com.sun.star.uno.Exception
+ {
+ super( i_orb, i_docType );
+ }
+
+ public void initializeDocument() throws com.sun.star.uno.Exception
+ {
+ // remove all shapes - Impress has two default shapes in a new doc; just get rid of them
+ final XShapes firstPageShapes = getFirstPageShapes();
+ while ( firstPageShapes.getCount() > 0 )
+ firstPageShapes.remove( UnoRuntime.queryInterface( XShape.class, firstPageShapes.getByIndex( 0 ) ) );
+ }
+
+ public void doSingleModification() throws com.sun.star.uno.Exception
+ {
+ // add a simple centered shape to the first page
+ Rectangle pagePlayground = impl_getFirstPagePlayground();
+ impl_createCircleShape(
+ ( pagePlayground.X + ( pagePlayground.Width - BIG_CIRCLE_SIZE ) / 2 ),
+ ( pagePlayground.Y + ( pagePlayground.Height - BIG_CIRCLE_SIZE ) / 2 ),
+ BIG_CIRCLE_SIZE,
+ FILL_COLOR
+ );
+ }
+
+ public void verifyInitialDocumentState() throws com.sun.star.uno.Exception
+ {
+ final XShapes firstPageShapes = getFirstPageShapes();
+ assertEquals( "there should be no shapes at all", 0, firstPageShapes.getCount() );
+ }
+
+ public void verifySingleModificationDocumentState() throws com.sun.star.uno.Exception
+ {
+ final XShapes firstPageShapes = getFirstPageShapes();
+ assertEquals( "there should be one shape, not more, not less", 1, firstPageShapes.getCount() );
+
+ final Object shape = firstPageShapes.getByIndex(0);
+ verifyShapeGeometry( shape, BIG_CIRCLE_SIZE, BIG_CIRCLE_SIZE );
+ final XPropertySet shapeProps = UnoRuntime.queryInterface( XPropertySet.class, shape );
+ assertEquals( "wrong circle tpye", CIRCLE_TYPE.getValue(), ((CircleKind)shapeProps.getPropertyValue( "CircleKind" )).getValue() );
+ //assertEquals( "wrong circle fill color", FILL_COLOR, ((Integer)shapeProps.getPropertyValue( "FillColor" )).intValue() );
+ // disable this particular check: A bug in the drawing layer API restores the FillColor to its
+ // default value upon re-insertion. This is issue #i115080#
+ }
+
+ public int doMultipleModifications() throws com.sun.star.uno.Exception
+ {
+ // add a simple centered shape to the first page
+ Rectangle pagePlayground = impl_getFirstPagePlayground();
+ impl_createCircleShape(
+ pagePlayground.X,
+ pagePlayground.Y,
+ SMALL_CIRCLE_SIZE,
+ ALTERNATE_FILL_COLOR
+ );
+ impl_createCircleShape(
+ pagePlayground.X + pagePlayground.Width - SMALL_CIRCLE_SIZE,
+ pagePlayground.Y,
+ SMALL_CIRCLE_SIZE,
+ ALTERNATE_FILL_COLOR
+ );
+ impl_createCircleShape(
+ pagePlayground.X,
+ pagePlayground.Y + pagePlayground.Height - SMALL_CIRCLE_SIZE,
+ SMALL_CIRCLE_SIZE,
+ ALTERNATE_FILL_COLOR
+ );
+ impl_createCircleShape(
+ pagePlayground.X + pagePlayground.Width - SMALL_CIRCLE_SIZE,
+ pagePlayground.Y + pagePlayground.Height - SMALL_CIRCLE_SIZE,
+ SMALL_CIRCLE_SIZE,
+ ALTERNATE_FILL_COLOR
+ );
+ return 4;
+ }
+
+ private void impl_createCircleShape( final int i_x, final int i_y, final int i_size, final int i_color ) throws com.sun.star.uno.Exception
+ {
+ final XPropertySet shapeProps = getDocument().createInstance( "com.sun.star.drawing.EllipseShape", XPropertySet.class );
+ shapeProps.setPropertyValue( "CircleKind", CIRCLE_TYPE );
+ shapeProps.setPropertyValue( "FillColor", i_color );
+
+ final XShape shape = UnoRuntime.queryInterface( XShape.class, shapeProps );
+ final Size shapeSize = new Size( i_size, i_size );
+ shape.setSize( shapeSize );
+ final Point shapePos = new Point( i_x, i_y );
+ shape.setPosition( shapePos );
+
+ final XShapes pageShapes = UnoRuntime.queryInterface( XShapes.class, getFirstPageShapes() );
+ pageShapes.add( shape );
+
+ // Sadly, Draw/Impress currently do not create Undo actions for programmatic changes to the document.
+ // Which renders the test here slightly useless ... unless we fake the Undo actions ourself.
+ final XUndoManagerSupplier suppUndoManager = UnoRuntime.queryInterface( XUndoManagerSupplier.class, getDocument().getDocument() );
+ final XUndoManager undoManager = suppUndoManager.getUndoManager();
+ undoManager.addUndoAction( new ShapeInsertionUndoAction( shape, pageShapes ) );
+ }
+
+ private Rectangle impl_getFirstPagePlayground() throws com.sun.star.uno.Exception
+ {
+ final XShapes firstPageShapes = getFirstPageShapes();
+ final XPropertySet firstPageProps = UnoRuntime.queryInterface( XPropertySet.class, firstPageShapes );
+ final int pageWidth = ((Integer)firstPageProps.getPropertyValue( "Width" )).intValue();
+ final int pageHeight = ((Integer)firstPageProps.getPropertyValue( "Height" )).intValue();
+ final int borderLeft = ((Integer)firstPageProps.getPropertyValue( "BorderLeft" )).intValue();
+ final int borderTop = ((Integer)firstPageProps.getPropertyValue( "BorderTop" )).intValue();
+ final int borderRight = ((Integer)firstPageProps.getPropertyValue( "BorderRight" )).intValue();
+ final int borderBottom = ((Integer)firstPageProps.getPropertyValue( "BorderBottom" )).intValue();
+ return new Rectangle( borderLeft, borderTop, pageWidth - borderLeft - borderRight, pageHeight - borderTop - borderBottom );
+ }
+
+ /**
+ * returns the XShapes interface of the first page of our drawing document
+ */
+ private XShapes getFirstPageShapes() throws com.sun.star.uno.Exception
+ {
+ final XDrawPagesSupplier suppPages = UnoRuntime.queryInterface( XDrawPagesSupplier.class, getDocument().getDocument() );
+ final XDrawPages pages = suppPages.getDrawPages();
+ return UnoRuntime.queryInterface( XShapes.class, pages.getByIndex( 0 ) );
+ }
+
+ /**
+ * verifies the given shape has the given size
+ */
+ private void verifyShapeGeometry( final Object i_shapeObject, final int i_expectedWidth, final int i_expectedHeight )
+ throws com.sun.star.uno.Exception
+ {
+ final XShape shape = UnoRuntime.queryInterface( XShape.class, i_shapeObject );
+ final Size shapeSize = shape.getSize();
+ assertEquals( "unexpected shape width", i_expectedWidth, shapeSize.Width );
+ assertEquals( "unexpected shape height", i_expectedHeight, shapeSize.Height );
+ }
+
+ private static class ShapeInsertionUndoAction implements XUndoAction
+ {
+ ShapeInsertionUndoAction( final XShape i_shape, final XShapes i_shapeCollection )
+ {
+ m_shape = i_shape;
+ m_shapeCollection = i_shapeCollection;
+ }
+
+ public String getTitle()
+ {
+ return "insert shape";
+ }
+
+ public void undo()
+ {
+ m_shapeCollection.remove( m_shape );
+ }
+
+ public void redo()
+ {
+ m_shapeCollection.add( m_shape );
+ }
+
+ private final XShape m_shape;
+ private final XShapes m_shapeCollection;
+ }
+
+ private static CircleKind CIRCLE_TYPE = CircleKind.FULL;
+ private static int FILL_COLOR = 0xCC2244;
+ private static int ALTERNATE_FILL_COLOR = 0x44CC22;
+ private static int BIG_CIRCLE_SIZE = 5000;
+ private static int SMALL_CIRCLE_SIZE = 2000;
+}
diff --git a/sfx2/source/config/config.src b/sfx2/qa/complex/sfx2/undo/ImpressDocumentTest.java
index 02afbfae54e7..c15fc760e0c3 100644..100755
--- a/sfx2/source/config/config.src
+++ b/sfx2/qa/complex/sfx2/undo/ImpressDocumentTest.java
@@ -1,5 +1,4 @@
/*************************************************************************
- *
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
@@ -23,11 +22,25 @@
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
- ************************************************************************/
+ *************************************************************************/
+
+package complex.sfx2.undo;
-#include <sfx2/sfx.hrc>
+import com.sun.star.lang.XMultiServiceFactory;
+import org.openoffice.test.tools.DocumentType;
-String STR_FILTERNAME_CFG
+/**
+ * @author frank.schoenheit@oracle.com
+ */
+public class ImpressDocumentTest extends DrawingOrPresentationDocumentTest
{
- Text [ en-US ] = "Configuration" ;
-};
+ public ImpressDocumentTest( XMultiServiceFactory i_orb ) throws com.sun.star.uno.Exception
+ {
+ super( i_orb, DocumentType.PRESENTATION );
+ }
+
+ public String getDocumentDescription()
+ {
+ return "presentation document";
+ }
+}
diff --git a/sfx2/qa/complex/sfx2/undo/WriterDocumentTest.java b/sfx2/qa/complex/sfx2/undo/WriterDocumentTest.java
new file mode 100755
index 000000000000..702fb85ebb11
--- /dev/null
+++ b/sfx2/qa/complex/sfx2/undo/WriterDocumentTest.java
@@ -0,0 +1,104 @@
+package complex.sfx2.undo;
+
+import com.sun.star.text.XTextRange;
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.table.XCell;
+import com.sun.star.table.XCellRange;
+import com.sun.star.text.XTextCursor;
+import com.sun.star.text.XTextTable;
+import com.sun.star.text.XText;
+import com.sun.star.text.XTextDocument;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.uno.UnoRuntime;
+import org.openoffice.test.tools.DocumentType;
+import static org.junit.Assert.*;
+
+/**
+ * implements the {@link DocumentTest} interface on top of a spreadsheet document
+ * @author frank.schoenheit@oracle.com
+ */
+public class WriterDocumentTest extends DocumentTestBase
+{
+ public WriterDocumentTest( final XMultiServiceFactory i_orb ) throws com.sun.star.uno.Exception
+ {
+ super( i_orb, DocumentType.WRITER );
+ }
+
+ public String getDocumentDescription()
+ {
+ return "text document";
+ }
+
+ public void initializeDocument() throws com.sun.star.uno.Exception
+ {
+ // TODO?
+ }
+
+ public void doSingleModification() throws com.sun.star.uno.Exception
+ {
+ final XTextDocument textDoc = UnoRuntime.queryInterface( XTextDocument.class, getDocument().getDocument() );
+ final XText docText = textDoc.getText();
+ docText.setString( s_blindText );
+ }
+
+ public void verifyInitialDocumentState() throws com.sun.star.uno.Exception
+ {
+ final XTextDocument textDoc = UnoRuntime.queryInterface( XTextDocument.class, getDocument().getDocument() );
+ final XText docText = textDoc.getText();
+ assertEquals( "document should be empty", "", docText.getString() );
+ }
+
+ public void verifySingleModificationDocumentState() throws com.sun.star.uno.Exception
+ {
+ final XTextDocument textDoc = UnoRuntime.queryInterface( XTextDocument.class, getDocument().getDocument() );
+ final XText docText = textDoc.getText();
+ assertEquals( "blind text not found", s_blindText, docText.getString() );
+ }
+
+ public int doMultipleModifications() throws com.sun.star.uno.Exception
+ {
+ final XTextDocument textDoc = UnoRuntime.queryInterface( XTextDocument.class, getDocument().getDocument() );
+ final XText docText = textDoc.getText();
+
+ int expectedUndoActions = 0;
+
+ // create a cursor
+ final XTextCursor cursor = docText.createTextCursor();
+
+ // create a table
+ final XTextTable textTable = UnoRuntime.queryInterface( XTextTable.class,
+ getDocument().createInstance( "com.sun.star.text.TextTable" ) );
+ textTable.initialize( 3, 3 );
+ final XPropertySet tableProps = UnoRuntime.queryInterface( XPropertySet.class, textTable );
+ tableProps.setPropertyValue( "BackColor", 0xCCFF44 );
+
+ // insert the table into the doc
+ docText.insertTextContent( cursor, textTable, false );
+ ++expectedUndoActions; //FIXME this will create 2 actions! currently the event is sent for every individual action; should it be sent for top-level actions only? how many internal actions are created is an implementation detail!
+ ++expectedUndoActions;
+
+ // write some content into the center cell
+ final XCellRange cellRange = UnoRuntime.queryInterface( XCellRange.class, textTable );
+ final XCell centerCell = cellRange.getCellByPosition( 1, 1 );
+ final XTextRange cellText = UnoRuntime.queryInterface( XTextRange.class, centerCell );
+ cellText.setString( "Undo Manager API Test" );
+ ++expectedUndoActions;
+
+ // give it another color
+ final XPropertySet cellProps = UnoRuntime.queryInterface( XPropertySet.class, centerCell );
+ cellProps.setPropertyValue( "BackColor", 0x44CCFF );
+ ++expectedUndoActions;
+
+ return expectedUndoActions;
+ }
+
+ private static final String s_blindText =
+ "Lorem ipsum dolor. Sit amet penatibus. A cum turpis. Aenean ac eu. " +
+ "Ligula est urna nulla vestibulum ullamcorper. Nec sit in amet tincidunt mus. " +
+ "Tellus sagittis mi. Suscipit cursus in vestibulum in eros ipsum felis cursus lectus " +
+ "nunc quis condimentum in risus nec wisi aenean luctus hendrerit magna habitasse commodo orci. " +
+ "Nisl etiam quis. Vestibulum justo eleifend aliquet luctus sed turpis volutpat ullamcorper " +
+ "aliquam penatibus sagittis pede tincidunt egestas. Nibh massa lectus. Sem mattis purus morbi " +
+ "scelerisque turpis donec urna phasellus. Quis at lacus. Viverra mauris mollis. " +
+ "Dolor tincidunt condimentum.";
+}
diff --git a/sfx2/qa/complex/standalonedocumentinfo/StandaloneDocumentInfoUnitTest.java b/sfx2/qa/complex/standalonedocumentinfo/StandaloneDocumentInfoUnitTest.java
deleted file mode 100644
index 0136f8941df5..000000000000
--- a/sfx2/qa/complex/standalonedocumentinfo/StandaloneDocumentInfoUnitTest.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-package complex.standalonedocumentinfo;
-
-import complexlib.ComplexTestCase;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.uno.UnoRuntime;
-
-/* Document here
-*/
-
-public class StandaloneDocumentInfoUnitTest extends ComplexTestCase {
- private XMultiServiceFactory m_xMSF = null;
-
- public String[] getTestMethodNames() {
- return new String[] {
- "ExecuteTest01"};
- }
-
- public String[] getTestObjectNames() {
- return new String[] {"StandaloneDocumentInfoUnitTest"};
- }
-
- public void before() {
- try {
- m_xMSF = (XMultiServiceFactory)param.getMSF();
- } catch(Exception e) {
- failed( "Failed to create service factory!" );
- }
- if( m_xMSF ==null ) {
- failed( "Failed to create service factory!" );
- }
- }
-
- public void after() {
- m_xMSF = null;
- }
-
- public void ExecuteTest01() {
- StandaloneDocumentInfoTest aTest = new Test01 (m_xMSF, log);
- assure( "Test01 failed!", aTest.test() );
- }
-}
-
-
diff --git a/sfx2/qa/complex/standalonedocumentinfo/makefile.mk b/sfx2/qa/complex/standalonedocumentinfo/makefile.mk
deleted file mode 100644
index c65556aeb763..000000000000
--- a/sfx2/qa/complex/standalonedocumentinfo/makefile.mk
+++ /dev/null
@@ -1,85 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ = ..$/..$/..
-TARGET = StandaloneDocumentInfoUnitTest
-PRJNAME = binfilter
-PACKAGE = complex$/standalonedocumentinfo
-
-# --- Settings -----------------------------------------------------
-.INCLUDE: settings.mk
-
-
-#----- compile .java files -----------------------------------------
-
-JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
-
-JAVAFILES =\
- StandaloneDocumentInfoUnitTest.java\
- StandaloneDocumentInfoTest.java\
- Test01.java\
- TestHelper.java\
-
-JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
-
-#----- make a jar from compiled files ------------------------------
-
-MAXLINELENGTH = 100000
-
-JARCLASSDIRS = $(PACKAGE)
-JARTARGET = $(TARGET).jar
-JARCOMPRESS = TRUE
-
-# --- Parameters for the test --------------------------------------
-
-# start an office if the parameter is set for the makefile
-.IF "$(OFFICE)" == ""
-CT_APPEXECCOMMAND =
-.ELSE
-CT_APPEXECCOMMAND = -AppExecutionCommand "$(OFFICE)$/soffice -accept=socket,host=localhost,port=8100;urp;"
-.ENDIF
-
-# test base is java complex
-CT_TESTBASE = -TestBase java_complex
-
-# test looks something like the.full.package.TestName
-CT_TEST = -o $(PACKAGE:s\$/\.\).$(JAVAFILES:b)
-
-# start the runner application
-CT_APP = org.openoffice.Runner
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE: target.mk
-
-RUN: run
-
-run:
- +java -cp $(CLASSPATH) $(CT_APP) $(CT_TESTBASE) $(CT_APPEXECCOMMAND) $(CT_TEST)
-
-
-
diff --git a/sfx2/qa/complex/tests.sce b/sfx2/qa/complex/tests.sce
deleted file mode 100644
index c38852927ede..000000000000
--- a/sfx2/qa/complex/tests.sce
+++ /dev/null
@@ -1,3 +0,0 @@
--o complex.framework.DocumentMetaData
--o complex.framework.DocumentMetadataAccessTest
-#-o complex.framework.CheckGlobalEventBroadcaster_writer1
diff --git a/sfx2/qa/cppunit/makefile.mk b/sfx2/qa/cppunit/makefile.mk
index 10e0eaa3d979..10e0eaa3d979 100644..100755
--- a/sfx2/qa/cppunit/makefile.mk
+++ b/sfx2/qa/cppunit/makefile.mk
diff --git a/sfx2/qa/cppunit/test_metadatable.cxx b/sfx2/qa/cppunit/test_metadatable.cxx
index 9afb68f4d081..4a94890f21df 100644..100755
--- a/sfx2/qa/cppunit/test_metadatable.cxx
+++ b/sfx2/qa/cppunit/test_metadatable.cxx
@@ -26,13 +26,7 @@
*
************************************************************************/
-#include "precompiled_sfx2.hxx"
-
-#include <cppunit/TestAssert.h>
-#include <cppunit/TestFixture.h>
-#include <cppunit/extensions/HelperMacros.h>
-#include <cppunit/plugin/TestPlugIn.h>
-
+#include <sal/cppunit.h>
#include <rtl/ustrbuf.hxx>
#include <com/sun/star/util/DateTime.hpp>
diff --git a/sfx2/qa/cppunit/version.map b/sfx2/qa/cppunit/version.map
index 3308588ef6f8..3308588ef6f8 100644..100755
--- a/sfx2/qa/cppunit/version.map
+++ b/sfx2/qa/cppunit/version.map
diff --git a/sfx2/qa/unoapi/Test.java b/sfx2/qa/unoapi/Test.java
index 4263985c133f..c1231c975a2b 100644..100755
--- a/sfx2/qa/unoapi/Test.java
+++ b/sfx2/qa/unoapi/Test.java
@@ -27,6 +27,7 @@ package org.openoffice.sfx2.qa.unoapi;
import org.openoffice.Runner;
import org.openoffice.test.OfficeConnection;
+import org.openoffice.test.Argument;
import static org.junit.Assert.*;
public final class Test {
@@ -43,8 +44,8 @@ public final class Test {
@org.junit.Test public void test() {
assertTrue(
Runner.run(
- "-sce", "sfx.sce", "-xcl", "knownissues.xcl", "-tdoc",
- "testdocuments", "-cs", connection.getDescription()));
+ "-sce", Argument.get("sce"), "-xcl", Argument.get("xcl"), "-tdoc",
+ Argument.get("tdoc"), "-cs", connection.getDescription()));
}
private final OfficeConnection connection = new OfficeConnection();
diff --git a/sfx2/qa/unoapi/knownissues.xcl b/sfx2/qa/unoapi/knownissues.xcl
index 1d87f84c96d2..1d87f84c96d2 100644..100755
--- a/sfx2/qa/unoapi/knownissues.xcl
+++ b/sfx2/qa/unoapi/knownissues.xcl
diff --git a/sfx2/qa/unoapi/makefile.mk b/sfx2/qa/unoapi/makefile.mk
deleted file mode 100644
index ea91ba4d1c44..000000000000
--- a/sfx2/qa/unoapi/makefile.mk
+++ /dev/null
@@ -1,48 +0,0 @@
-#*************************************************************************
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#***********************************************************************/
-
-.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
-nothing .PHONY:
-.ELSE
-
-PRJ = ../..
-PRJNAME = sfx2
-TARGET = qa_unoapi
-
-.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 : javatest
-
-.END
diff --git a/sfx2/qa/unoapi/sfx.sce b/sfx2/qa/unoapi/sfx.sce
index 6176c0668731..ce72c463ee55 100644..100755
--- a/sfx2/qa/unoapi/sfx.sce
+++ b/sfx2/qa/unoapi/sfx.sce
@@ -1,5 +1,5 @@
-o sfx.AppDispatchProvider
--o sfx.DocumentTemplates
+#i113306 -o sfx.DocumentTemplates
-o sfx.FrameLoader
-o sfx.SfxMacroLoader
#i111283 -o sfx.StandaloneDocumentInfo
diff --git a/sfx2/qa/unoapi/testdocuments/SfxStandaloneDocInfoObject.sdw b/sfx2/qa/unoapi/testdocuments/SfxStandaloneDocInfoObject.sdw
index c4b5672f9624..c4b5672f9624 100644..100755
--- a/sfx2/qa/unoapi/testdocuments/SfxStandaloneDocInfoObject.sdw
+++ b/sfx2/qa/unoapi/testdocuments/SfxStandaloneDocInfoObject.sdw
Binary files differ
diff --git a/sfx2/qa/unoapi/testdocuments/report.stw b/sfx2/qa/unoapi/testdocuments/report.stw
index 5b8efafa159b..5b8efafa159b 100644..100755
--- a/sfx2/qa/unoapi/testdocuments/report.stw
+++ b/sfx2/qa/unoapi/testdocuments/report.stw
Binary files differ
diff --git a/sfx2/qa/unoapi/testdocuments/report2.stw b/sfx2/qa/unoapi/testdocuments/report2.stw
index 9ee0a7ee0ee0..9ee0a7ee0ee0 100644..100755
--- a/sfx2/qa/unoapi/testdocuments/report2.stw
+++ b/sfx2/qa/unoapi/testdocuments/report2.stw
Binary files differ
diff --git a/sfx2/sdi/appslots.sdi b/sfx2/sdi/appslots.sdi
index 3bd2bc8b1e02..3bd2bc8b1e02 100644..100755
--- a/sfx2/sdi/appslots.sdi
+++ b/sfx2/sdi/appslots.sdi
diff --git a/sfx2/sdi/docslots.sdi b/sfx2/sdi/docslots.sdi
index d16239535193..0e4a302d9d13 100644..100755
--- a/sfx2/sdi/docslots.sdi
+++ b/sfx2/sdi/docslots.sdi
@@ -171,11 +171,6 @@ interface OfficeDocument : Document
[
StateMethod = StateProps_Impl ;
]
- SID_PLAYMACRO // ole(no) api(final/play/norec)
- [
- ExecMethod = ExecProps_Impl ;
- StateMethod = StateProps_Impl ;
- ]
SID_VERSION
[
ExecMethod = ExecFile_Impl;
diff --git a/sfx2/sdi/frmslots.sdi b/sfx2/sdi/frmslots.sdi
index c17b2b190c08..c17b2b190c08 100644..100755
--- a/sfx2/sdi/frmslots.sdi
+++ b/sfx2/sdi/frmslots.sdi
diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi
index f7e9e687bea7..e69bf590a322 100755
--- a/sfx2/sdi/sfx.sdi
+++ b/sfx2/sdi/sfx.sdi
@@ -4635,31 +4635,6 @@ SfxVoidItem PickList SID_PICKLIST
]
//--------------------------------------------------------------------------
-SfxBoolItem PlayMacro SID_PLAYMACRO
-(SfxStringItem Statement SID_STATEMENT,SfxBoolItem Asynchron SID_ASYNCHRON)
-[
- /* flags: */
- AutoUpdate = TRUE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = FALSE,
- ReadOnlyDoc = TRUE,
- Toggle = FALSE,
- Container = TRUE,
- RecordAbsolute = FALSE,
- NoRecord;
- Synchron;
-
- /* config: */
- AccelConfig = FALSE,
- MenuConfig = FALSE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = FALSE,
- GroupId = GID_MACRO;
-]
-
-//--------------------------------------------------------------------------
SfxBoolItem PlugInsActive SID_PLUGINS_ACTIVE
[
@@ -5238,31 +5213,6 @@ SfxVoidItem RunBasic SID_BASICRUN
]
//--------------------------------------------------------------------------
-SfxVoidItem RunStarWriter SID_STARTSW
-()
-[
- /* 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_APPLICATION;
-]
-
-//--------------------------------------------------------------------------
SfxBoolItem Save SID_SAVEDOC
(SfxStringItem VersionComment SID_DOCINFO_COMMENTS,SfxStringItem Author SID_DOCINFO_AUTHOR)
[
@@ -5317,7 +5267,7 @@ SfxBoolItem SaveAll SID_SAVEDOCS
//--------------------------------------------------------------------------
SfxBoolItem SaveAs SID_SAVEASDOC
-(SfxStringItem URL SID_FILE_NAME,SfxStringItem FilterName SID_FILTER_NAME,SfxStringItem Password SID_PASSWORD,SfxStringItem FilterOptions SID_FILE_FILTEROPTIONS,SfxStringItem VersionComment SID_DOCINFO_COMMENTS,SfxStringItem VersionAuthor SID_DOCINFO_AUTHOR,SfxBoolItem Overwrite SID_OVERWRITE,SfxBoolItem Unpacked SID_UNPACK,SfxBoolItem SaveTo SID_SAVETO)
+(SfxStringItem URL SID_FILE_NAME,SfxStringItem FilterName SID_FILTER_NAME,SfxStringItem Password SID_PASSWORD,SfxBoolItem PasswordInteraction SID_PASSWORDINTERACTION,SfxStringItem FilterOptions SID_FILE_FILTEROPTIONS,SfxStringItem VersionComment SID_DOCINFO_COMMENTS,SfxStringItem VersionAuthor SID_DOCINFO_AUTHOR,SfxBoolItem Overwrite SID_OVERWRITE,SfxBoolItem Unpacked SID_UNPACK,SfxBoolItem SaveTo SID_SAVETO)
[
/* flags: */
AutoUpdate = FALSE,
@@ -6411,7 +6361,7 @@ SfxBoolItem TaskBarVisible SID_TASKBAR
]
//--------------------------------------------------------------------------
-SfxTemplateItem TemplateFamily5 SID_STYLE_FAMILY5
+SfxTemplateItem ListStyle SID_STYLE_FAMILY5
[
/* flags: */
@@ -6570,31 +6520,6 @@ SfxVoidItem BasicIDEShowWindow SID_BASICIDE_SHOWWINDOW
]
//--------------------------------------------------------------------------
-SfxVoidItem ToolsMacroEdit SID_EDITMACRO
-()
-[
- /* flags: */
- AutoUpdate = FALSE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = TRUE,
- ReadOnlyDoc = TRUE,
- Toggle = FALSE,
- Container = TRUE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Synchron;
-
- /* config: */
- AccelConfig = TRUE,
- MenuConfig = TRUE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = TRUE,
- GroupId = GID_MACRO;
-]
-
-//--------------------------------------------------------------------------
SfxVoidItem Undo SID_UNDO
( SfxUInt16Item Undo SID_UNDO )
[
diff --git a/sfx2/sdi/sfxitems.sdi b/sfx2/sdi/sfxitems.sdi
index 421c1cb29529..421c1cb29529 100644..100755
--- a/sfx2/sdi/sfxitems.sdi
+++ b/sfx2/sdi/sfxitems.sdi
diff --git a/sfx2/sdi/sfxslots.sdi b/sfx2/sdi/sfxslots.sdi
index 1479c4716efc..1479c4716efc 100644..100755
--- a/sfx2/sdi/sfxslots.sdi
+++ b/sfx2/sdi/sfxslots.sdi
diff --git a/sfx2/sdi/viwslots.sdi b/sfx2/sdi/viwslots.sdi
index 4d14d927adf6..4d14d927adf6 100644..100755
--- a/sfx2/sdi/viwslots.sdi
+++ b/sfx2/sdi/viwslots.sdi
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
index a632a8fedcfa..b954e9f5e7a9 100644..100755
--- a/sfx2/source/appl/app.cxx
+++ b/sfx2/source/appl/app.cxx
@@ -41,6 +41,8 @@
#include <tools/simplerm.hxx>
#include <tools/config.hxx>
#include <basic/basrdll.hxx>
+#include <basic/sbmeth.hxx>
+#include <basic/sbmod.hxx>
#include <svtools/asynclink.hxx>
#include <svl/stritem.hxx>
#include <vcl/sound.hxx>
@@ -75,18 +77,15 @@
#include <comphelper/processfactory.hxx>
#include <com/sun/star/uri/XUriReferenceFactory.hpp>
#include <com/sun/star/uri/XVndSunStarScriptUrl.hpp>
-
#include <basic/basmgr.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <vcl/svapp.hxx>
-
#include <rtl/logfile.hxx>
-
#include <sfx2/appuno.hxx>
-#include "sfxhelp.hxx"
+#include "sfx2/sfxhelp.hxx"
#include <sfx2/request.hxx>
#include "sfxtypes.hxx"
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include "arrdecl.hxx"
#include <sfx2/progress.hxx>
#include <sfx2/objsh.hxx>
@@ -112,16 +111,17 @@
#include <sfx2/module.hxx>
#include <sfx2/tbxctrl.hxx>
#include <sfx2/sfxdlg.hxx>
-#include "stbitem.hxx"
+#include "sfx2/stbitem.hxx"
#include "eventsupplier.hxx"
#include <sfx2/dockwin.hxx>
+#include <tools/svlibrary.hxx>
#ifdef DBG_UTIL
#include <sfx2/tbxctrl.hxx>
#include <sfx2/mnuitem.hxx>
#endif
-#if defined( WIN ) || defined( WNT ) || defined( OS2 )
+#if defined( WNT ) || defined( OS2 )
#define DDE_AVAILABLE
#endif
@@ -226,7 +226,7 @@ void SfxPropertyHandler::Property( ApplicationProperty& rProp )
String aFactory = String::CreateFromAscii("private:factory/");
if ( pArgs && *pArgs )
{
- SFX_ITEMSET_ARG( &aSet, pFactoryName, SfxStringItem, SID_NEWDOCDIRECT, FALSE );
+ SFX_ITEMSET_ARG( &aSet, pFactoryName, SfxStringItem, SID_NEWDOCDIRECT, sal_False );
if ( pFactoryName )
aFactory += pFactoryName->GetValue();
else
@@ -271,7 +271,7 @@ void SfxPropertyHandler::Property( ApplicationProperty& rProp )
#include <framework/imageproducer.hxx>
#include <framework/acceleratorinfo.hxx>
#include <framework/sfxhelperfunctions.hxx>
-#include "imagemgr.hxx"
+#include "sfx2/imagemgr.hxx"
#include "fwkhelper.hxx"
::osl::Mutex SfxApplication::gMutex;
@@ -352,20 +352,15 @@ SfxApplication::SfxApplication()
#endif
#endif
- if ( !InitLabelResMgr( "iso" ) )
- // no "iso" resource -> search for "ooo" resource
- InitLabelResMgr( "ooo", true );
pBasic = new BasicDLL;
-
StarBASIC::SetGlobalErrorHdl( LINK( this, SfxApplication, GlobalBasicErrorHdl_Impl ) );
-
-
-
RTL_LOGFILE_CONTEXT_TRACE( aLog, "} initialize DDE" );
}
SfxApplication::~SfxApplication()
{
+ OSL_ENSURE( GetObjectShells_Impl().Count() == 0, "Memory leak: some object shells were not removed!" );
+
Broadcast( SfxSimpleHint(SFX_HINT_DYING) );
SfxModule::DestroyModules_Impl();
@@ -466,12 +461,12 @@ void SfxApplication::SetViewFrame_Impl( SfxViewFrame *pFrame )
// DocWinActivate : both frames belong to the same TopWindow
// TopWinActivate : both frames belong to different TopWindows
- BOOL bTaskActivate = pOldContainerFrame != pNewContainerFrame;
+ sal_Bool bTaskActivate = pOldContainerFrame != pNewContainerFrame;
if ( pOldContainerFrame )
{
if ( bTaskActivate )
- NotifyEvent( SfxEventHint( SFX_EVENT_DEACTIVATEDOC, GlobalEventConfig::GetEventName(STR_EVENT_DEACTIVATEDOC), pOldContainerFrame->GetObjectShell() ) );
+ NotifyEvent( SfxViewEventHint( SFX_EVENT_DEACTIVATEDOC, GlobalEventConfig::GetEventName(STR_EVENT_DEACTIVATEDOC), pOldContainerFrame->GetObjectShell(), pOldContainerFrame->GetFrame().GetController() ) );
pOldContainerFrame->DoDeactivate( bTaskActivate, pFrame );
if( pOldContainerFrame->GetProgress() )
@@ -486,7 +481,7 @@ void SfxApplication::SetViewFrame_Impl( SfxViewFrame *pFrame )
if ( bTaskActivate && pNewContainerFrame->GetObjectShell() )
{
pNewContainerFrame->GetObjectShell()->PostActivateEvent_Impl( pNewContainerFrame );
- NotifyEvent(SfxEventHint(SFX_EVENT_ACTIVATEDOC, GlobalEventConfig::GetEventName(STR_EVENT_ACTIVATEDOC), pNewContainerFrame->GetObjectShell() ) );
+ NotifyEvent(SfxViewEventHint(SFX_EVENT_ACTIVATEDOC, GlobalEventConfig::GetEventName(STR_EVENT_ACTIVATEDOC), pNewContainerFrame->GetObjectShell(), pNewContainerFrame->GetFrame().GetController() ) );
}
SfxProgress *pProgress = pNewContainerFrame->GetProgress();
@@ -563,13 +558,6 @@ ResMgr* SfxApplication::GetSfxResManager()
//--------------------------------------------------------------------
-ResMgr* SfxApplication::GetLabelResManager() const
-{
- return pAppData_Impl->pLabelResMgr;
-}
-
-//--------------------------------------------------------------------
-
SimpleResMgr* SfxApplication::GetSimpleResManager()
{
if ( !pAppData_Impl->pSimpleResManager )
@@ -686,7 +674,7 @@ SfxObjectShellArr_Impl& SfxApplication::GetObjectShells_Impl() const
return *pAppData_Impl->pObjShells;
}
-void SfxApplication::Invalidate( USHORT nId )
+void SfxApplication::Invalidate( sal_uInt16 nId )
{
for( SfxViewFrame* pFrame = SfxViewFrame::GetFirst(); pFrame; pFrame = SfxViewFrame::GetNext( *pFrame ) )
Invalidate_Impl( pFrame->GetBindings(), nId );
@@ -696,17 +684,15 @@ void SfxApplication::Invalidate( USHORT nId )
#define STRING( x ) DOSTRING( x )
typedef long (SAL_CALL *basicide_handle_basic_error)(void*);
-typedef rtl_uString* (SAL_CALL *basicide_choose_macro)(void*, BOOL, rtl_uString*);
-typedef void* (SAL_CALL *basicide_macro_organizer)(INT16);
+typedef rtl_uString* (SAL_CALL *basicide_choose_macro)(void*, sal_Bool, rtl_uString*);
+typedef void* (SAL_CALL *basicide_macro_organizer)(sal_Int16);
extern "C" { static void SAL_CALL thisModule() {} }
IMPL_LINK( SfxApplication, GlobalBasicErrorHdl_Impl, StarBASIC*, pStarBasic )
{
// get basctl dllname
- String sLibName = String::CreateFromAscii( STRING( DLL_NAME ) );
- sLibName.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "sfx" ) ), String( RTL_CONSTASCII_USTRINGPARAM( "basctl" ) ) );
- ::rtl::OUString aLibName( sLibName );
+ static ::rtl::OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( SVLIBRARY( "basctl" ) ) );
// load module
oslModule handleMod = osl_loadModuleRelative(
@@ -724,7 +710,7 @@ IMPL_LINK( SfxApplication, GlobalBasicErrorHdl_Impl, StarBASIC*, pStarBasic )
sal_Bool SfxApplication::IsXScriptURL( const String& rScriptURL )
{
- sal_Bool result = FALSE;
+ sal_Bool result = sal_False;
::com::sun::star::uno::Reference
< ::com::sun::star::lang::XMultiServiceFactory > xSMgr =
@@ -748,7 +734,7 @@ sal_Bool SfxApplication::IsXScriptURL( const String& rScriptURL )
if ( xUrl.is() )
{
- result = TRUE;
+ result = sal_True;
}
}
catch ( ::com::sun::star::uno::RuntimeException& )
@@ -774,11 +760,11 @@ SfxApplication::ChooseScript()
uno::Reference< frame::XFrame > xFrame( pFrame ? pFrame->GetFrameInterface() : uno::Reference< frame::XFrame >() );
AbstractScriptSelectorDialog* pDlg =
- pFact->CreateScriptSelectorDialog( NULL, FALSE, xFrame );
+ pFact->CreateScriptSelectorDialog( NULL, sal_False, xFrame );
OSL_TRACE("done, now exec it");
- USHORT nRet = pDlg->Execute();
+ sal_uInt16 nRet = pDlg->Execute();
OSL_TRACE("has returned");
@@ -792,12 +778,10 @@ SfxApplication::ChooseScript()
return aScriptURL;
}
-void SfxApplication::MacroOrganizer( INT16 nTabId )
+void SfxApplication::MacroOrganizer( sal_Int16 nTabId )
{
// get basctl dllname
- String sLibName = String::CreateFromAscii( STRING( DLL_NAME ) );
- sLibName.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "sfx" ) ), String( RTL_CONSTASCII_USTRINGPARAM( "basctl" ) ) );
- ::rtl::OUString aLibName( sLibName );
+ static ::rtl::OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( SVLIBRARY( "basctl" ) ) );
// load module
oslModule handleMod = osl_loadModuleRelative(
@@ -811,4 +795,9 @@ void SfxApplication::MacroOrganizer( INT16 nTabId )
pSymbol( nTabId );
}
+ErrCode SfxApplication::CallBasic( const String& rCode, BasicManager* pMgr, SbxArray* pArgs, SbxValue* pRet )
+{
+ return pMgr->ExecuteMacro( rCode, pArgs, pRet);
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/appl/app.hrc b/sfx2/source/appl/app.hrc
index 6940815f2d83..25e4e4527e37 100644..100755
--- a/sfx2/source/appl/app.hrc
+++ b/sfx2/source/appl/app.hrc
@@ -32,105 +32,27 @@
// #defines *****************************************************************
#define ACC_IBM (RID_SFX_APP_START+2)
-#define MSG_ERR_WRITE_CFG (RID_SFX_APP_START+2)
-#define MSG_ERR_READ_CFG (RID_SFX_APP_START+3)
-#define MSG_ERR_OPEN_CFG (RID_SFX_APP_START+4)
-#define MSG_ERR_FILETYPE_CFG (RID_SFX_APP_START+5)
-#define MSG_ERR_VERSION_CFG (RID_SFX_APP_START+6)
#define MSG_ERR_NO_WEBBROWSER_FOUND (RID_SFX_APP_START+7)
#define MSG_ISPRINTING_QUERYABORT (RID_SFX_APP_START+9)
#define MSG_CANT_QUIT (RID_SFX_APP_START+10)
#define STR_ISMODIFIED (RID_SFX_APP_START+11)
-#define STR_AUTOSAVE (RID_SFX_APP_START+12)
-#define STR_MAIL (RID_SFX_APP_START+13)
-#define MSG_ERR_WRITE_SBL (RID_SFX_APP_START+14)
-#define MSG_IS_SERVER (RID_SFX_APP_START+15)
-
-#define STR_RESEXCEPTION (RID_SFX_APP_START+21)
-#define STR_SYSRESEXCEPTION (RID_SFX_APP_START+22)
-#define STR_DOUBLEEXCEPTION (RID_SFX_APP_START+23)
-#define STR_RESWARNING (RID_SFX_APP_START+24)
-#define STR_ERR_NOTEMPLATE (RID_SFX_APP_START+27)
-#define STR_RECOVER_TITLE (RID_SFX_APP_START+28)
-#define STR_RECOVER_QUERY (RID_SFX_APP_START+29)
-#define STR_RECOVER_PREPARED (RID_SFX_APP_START+30)
-#define MSG_ERR_SOINIT (RID_SFX_APP_START+31)
-
-#define MSG_IOERR_FILE_NOT_FOUND (RID_SFX_APP_START+32)
-#define MSG_IOERR_PATH_NOT_FOUND (RID_SFX_APP_START+33)
-#define MSG_IOERR_TOO_MANY_OPEN_FILES (RID_SFX_APP_START+34)
-#define MSG_IOERR_ACCESS_DENIED (RID_SFX_APP_START+35)
-#define MSG_IOERR_INVALID_ACCESS (RID_SFX_APP_START+36)
-#define MSG_IOERR_INVALID_HANDLE (RID_SFX_APP_START+37)
-#define MSG_IOERR_CANNOT_MAKE (RID_SFX_APP_START+38)
-#define MSG_IOERR_SHARING (RID_SFX_APP_START+39)
-#define MSG_IOERR_INVALID_PARAMETER (RID_SFX_APP_START+40)
-#define MSG_IOERR_GENERAL (RID_SFX_APP_START+41)
#define RID_FULLSCREENTOOLBOX (RID_SFX_APP_START+42)
#define RID_RECORDINGTOOLBOX (RID_SFX_APP_START+43)
#define RID_ENVTOOLBOX (RID_SFX_APP_START+44)
#define STR_QUITAPP (RID_SFX_APP_START+59)
-#define STR_EXITANDRETURN (RID_SFX_APP_START+60)
-#define STR_ERR_NOFILE (RID_SFX_APP_START+61)
-#define STR_EXTHELPSTATUS (RID_SFX_APP_START+62)
-
-#define STR_ADDRESS_NAME (RID_SFX_APP_START+65)
#define RID_STR_HLPFILENOTEXIST (RID_SFX_APP_START+68)
-#define RID_STR_HLPAPPNOTSTARTED (RID_SFX_APP_START+69)
-
-#define STR_NODOUBLE (RID_SFX_APP_START+75)
-#define STR_NOPRINTER (RID_SFX_APP_START+76)
-
-#define MSG_SIGNAL (RID_SFX_APP_START+77)
#define RID_STR_HELP (RID_SFX_APP_START+79)
#define RID_STR_NOAUTOSTARTHELPAGENT (RID_SFX_APP_START+80)
#define RID_HELPBAR (RID_SFX_APP_START+81)
#define RID_SPECIALCONFIG_ERROR (RID_SFX_APP_START+82)
-#define STR_MEMINFO_HEADER (RID_SFX_APP_START+84)
-#define STR_MEMINFO_FOOTER (RID_SFX_APP_START+85)
-#define STR_MEMINFO_OBJINFO (RID_SFX_APP_START+86)
-
-#define RID_PLUGIN (RID_SFX_APP_START+87)
-
-#define RID_WARN_POST_MAILTO (RID_SFX_APP_START+88)
-
-#define RID_STR_NOWELCOMESCREEN (RID_SFX_APP_START+91)
-
-#define STR_CORRUPT_INSTALLATION (RID_SFX_APP_START+94)
-#define IDS_SBERR_STOREREF (RID_SFX_APP_START+97)
-
#define CONFIG_PATH_START (RID_SFX_APP_START+98)
-#define STR_KEY_ADDINS_PATH (CONFIG_PATH_START+0)
-#define STR_KEY_AUTOCORRECT_DIR (CONFIG_PATH_START+1)
-#define STR_KEY_GLOSSARY_PATH (CONFIG_PATH_START+2)
-#define STR_KEY_BACKUP_PATH (CONFIG_PATH_START+3)
-#define STR_KEY_BASIC_PATH (CONFIG_PATH_START+4)
-#define STR_KEY_BITMAP_PATH (CONFIG_PATH_START+5)
-#define STR_KEY_CONFIG_DIR (CONFIG_PATH_START+6)
-#define STR_KEY_DICTIONARY_PATH (CONFIG_PATH_START+7)
-#define STR_KEY_FAVORITES_DIR (CONFIG_PATH_START+8)
-#define STR_KEY_FILTER_PATH (CONFIG_PATH_START+9)
-#define STR_KEY_GALLERY_DIR (CONFIG_PATH_START+10)
-#define STR_KEY_GRAPHICS_PATH (CONFIG_PATH_START+11)
-#define STR_KEY_HELP_DIR (CONFIG_PATH_START+12)
-#define STR_KEY_LINGUISTIC_DIR (CONFIG_PATH_START+13)
-#define STR_KEY_MODULES_PATH (CONFIG_PATH_START+14)
-#define STR_KEY_PALETTE_PATH (CONFIG_PATH_START+15)
-#define STR_KEY_PLUGINS_PATH (CONFIG_PATH_START+16)
-#define STR_KEY_STORAGE_DIR (CONFIG_PATH_START+17)
-#define STR_KEY_TEMP_PATH (CONFIG_PATH_START+18)
-#define STR_KEY_TEMPLATE_PATH (CONFIG_PATH_START+19)
-#define STR_KEY_USERCONFIG_PATH (CONFIG_PATH_START+20)
-#define STR_KEY_USERDICTIONARY_DIR (CONFIG_PATH_START+21)
-#define STR_KEY_WORK_PATH (CONFIG_PATH_START+22)
-
#define WIN_HELPINDEX (RID_SFX_APP_START+99)
#define TP_HELP_CONTENT (RID_SFX_APP_START+100)
#define TP_HELP_INDEX (RID_SFX_APP_START+101)
@@ -155,11 +77,6 @@
#define IMG_HELP_CONTENT_BOOK_CLOSED (RID_SFX_APP_START+122)
#define IMG_HELP_CONTENT_DOC (RID_SFX_APP_START+124)
-#define IMG_MISSING_1 (RID_SFX_APP_START+126) // image
-#define IMG_MISSING_2 (RID_SFX_APP_START+127) // image
-#define IMG_MISSING_3 (RID_SFX_APP_START+128) // image
-#define IMG_MISSING_4 (RID_SFX_APP_START+129) // image
-
#define STR_HELP_WINDOW_TITLE (RID_SFX_APP_START+125) // string
#define STR_HELP_BUTTON_INDEX_ON (RID_SFX_APP_START+126)
@@ -203,8 +120,6 @@
#define RID_SECURITY_WARNING_HYPERLINK (RID_SFX_APP_START + 180)
#define RID_SECURITY_WARNING_TITLE (RID_SFX_APP_START + 181)
-#define RID_INVALID_URL_MSG (RID_SFX_APP_START + 182)
-#define RID_INVALID_URL_TITLE (RID_SFX_APP_START + 183)
#define RID_DESKTOP (RID_SFX_APP_START + 184)
#define RID_XMLSEC_QUERY_LOSINGSIGNATURE (RID_SFX_APP_START + 186)
diff --git a/sfx2/source/appl/app.src b/sfx2/source/appl/app.src
index fa9d65a9fbf0..97dd00a73367 100644..100755
--- a/sfx2/source/appl/app.src
+++ b/sfx2/source/appl/app.src
@@ -31,63 +31,48 @@
#include "app.hrc"
#include "helpid.hrc"
-InfoBox RID_DOCALREADYLOADED_DLG
+String STR_NONAME
{
- Message [ en-US ] = "Document already open." ;
+ Text [ en-US ] = "Untitled" ;
};
-
-ErrorBox RID_CANTLOADDOC_DLG
+String STR_CLOSE
{
- Message [ en-US ] = "Cannot open document." ;
+ Text [ en-US ] = "Close" ;
};
-
-ErrorBox MSG_ERR_READ_CFG
+String STR_STYLE_FILTER_AUTO
{
- BUTTONS = WB_OK ;
- DEFBUTTON = WB_DEF_OK ;
- Message [ en-US ] = "Error reading configuration file." ;
+ Text [ en-US ] = "Automatic" ;
};
-
-ErrorBox MSG_ERR_WRITE_CFG
+String STR_STANDARD_SHORTCUT
{
- BUTTONS = WB_OK ;
- DEFBUTTON = WB_DEF_OK ;
- Message [ en-US ] = "Error writing configuration file." ;
+ Text [ en-US ] = "Standard" ;
};
-
-ErrorBox MSG_ERR_OPEN_CFG
+String STR_BYTES
{
- BUTTONS = WB_OK ;
- DEFBUTTON = WB_DEF_OK ;
- Message [ en-US ] = "Error opening configuration file." ;
+ Text [ en-US ] = "Bytes" ;
};
-
-ErrorBox MSG_ERR_FILETYPE_CFG
+String STR_KB
{
- BUTTONS = WB_OK ;
- DEFBUTTON = WB_DEF_OK ;
- Message [ en-US ] = "File is not a configuration file." ;
+ Text [ en-US ] = "KB" ;
};
-
-ErrorBox MSG_ERR_VERSION_CFG
+String STR_MB
{
- BUTTONS = WB_OK ;
- DEFBUTTON = WB_DEF_OK ;
- Message [ en-US ] = "Configuration file contains the wrong version." ;
+ Text [ en-US ] = "MB" ;
};
-
-ErrorBox MSG_ERR_WRITE_SBL
+String STR_GB
{
- BUTTONS = WB_OK ;
- DEFBUTTON = WB_DEF_OK ;
- Message [ en-US ] = "Error recording BASIC library in\n'@'." ;
+ Text [ en-US ] = "GB" ;
+};
+QueryBox MSG_QUERY_LASTVERSION
+{
+ Buttons = WB_YES_NO ;
+ DefButton = WB_DEF_NO ;
+ Message [ en-US ] = "Cancel all changes?" ;
};
-ErrorBox MSG_SIGNAL
+InfoBox RID_DOCALREADYLOADED_DLG
{
- BUTTONS = WB_YES_NO ;
- DEFBUTTON = WB_DEF_YES ;
- Message [ en-US ] = "An unexpected program error has occurred.\n\nDo you want to try to save your changes in all open documents before the program is terminated?" ;
+ Message [ en-US ] = "Document already open." ;
};
ErrorBox MSG_ERR_NO_WEBBROWSER_FOUND
@@ -102,89 +87,6 @@ Resource SID_UNKNOWN
String 1 "-" ;
};
-Resource BMP_SFX_COLOR
-{
- ExtraData =
- {
- SID_NEWDOC; // 043
- SID_OPENDOC; // 044
- SID_CLOSEDOC; // 045
- SID_RELOAD; // 046
- SID_SAVEASDOC; // 047
- SID_PRINTDOC; // 051
- SID_SETUPPRINTER; // 053
- SID_QUITAPP; // 054
- SID_UNDO; // 055
- SID_REDO; // 056
- SID_REPEAT; // 057
- SID_CUT; // 058
- SID_COPY; // 059
- SID_PASTE; // 060
- SID_DELETE; // 061
- SID_SELECTALL; // 062
- SID_SAVEDOC; // 063 was 046
- SID_EXITANDRETURN; // 064 was 054
- SID_RECORDMACRO; // 095
- SID_EDITMACRO; // 096
- SID_HELPMENU; // 098
- SID_CONFIG; // 123
- SID_CONFIGTOOLBOX; // 124
- 0;
- };
- Bitmap BMP_SFX_SMALL { File = "sco.bmp" ; };
- Bitmap BMP_SFX_LARGE { File = "lco.bmp" ; };
-};
-
-Resource BMP_SFX_MONO
-{
- ExtraData =
- {
- SID_NEWDOC; // 043
- SID_OPENDOC; // 044
- SID_CLOSEDOC; // 045
- SID_RELOAD; // 046
- SID_SAVEASDOC; // 047
- SID_PRINTDOC; // 051
- SID_SETUPPRINTER; // 053
- SID_QUITAPP; // 054
- SID_UNDO; // 055
- SID_REDO; // 056
- SID_REPEAT; // 057
- SID_CUT; // 058
- SID_COPY; // 059
- SID_PASTE; // 060
- SID_DELETE; // 061
- SID_SELECTALL; // 062
- SID_SAVEDOC; // 063 was 046
- SID_EXITANDRETURN; // 064 was 054
- SID_RECORDMACRO; // 095
- SID_EDITMACRO; // 096
- SID_HELPMENU; // 098
- SID_CONFIG; // 123
- SID_CONFIGTOOLBOX; // 124
- 0;
- };
- Bitmap BMP_SFX_SMALL { File = "smo.bmp" ; };
- Bitmap BMP_SFX_LARGE { File = "lmo.bmp" ; };
-};
-
-WarningBox RID_WARN_POST_MAILTO
-{
- BUTTONS = WB_OK_CANCEL ;
- DEFBUTTON = WB_DEF_OK ;
- Message [ en-US ] = "A form is to be sent by e-mail.\nThis means that the receiver will get to see your e-mail address." ;
-};
-
-String STR_RECOVER_TITLE
-{
- Text [ en-US ] = "File Recovery" ;
-};
-
-String STR_RECOVER_QUERY
-{
- Text [ en-US ] = "Should the file \"$1\" be restored?" ;
-};
-
String GID_INTERN
{
Text [ en-US ] = "Internal" ;
@@ -315,155 +217,16 @@ String GID_CONTROLS
Text [ en-US ] = "Controls" ;
};
-TabDialog SID_OPTIONS
-{
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 244 , 155 ) ;
- Text [ en-US ] = "Options" ;
- Moveable = TRUE ;
- Closeable = TRUE ;
- TabControl 1
- {
- SVLook = TRUE ;
- Pos = MAP_APPFONT ( 3 , 15 ) ;
- Size = MAP_APPFONT ( 221 , 130 ) ;
- PageList =
- {
- PageItem
- {
- Identifier = RID_SFXPAGE_GENERAL ;
- Text [ en-US ] = "General" ;
- PageResID = 256 ;
- };
- PageItem
- {
- Identifier = RID_SFXPAGE_SAVE ;
- Text [ en-US ] = "Save" ;
- PageResID = 257 ;
- };
- PageItem
- {
- Identifier = RID_SFXPAGE_PATH ;
- Text [ en-US ] = "Paths" ;
- PageResID = 258 ;
- };
- PageItem
- {
- Identifier = RID_SFXPAGE_SPELL ;
- Text [ en-US ] = "Spellcheck" ;
- PageResID = 259 ;
- };
- };
- };
-};
-
InfoBox MSG_CANT_QUIT
{
Message [ en-US ] = "The application cannot be terminated at the moment.\nPlease wait until all print jobs and/or\nOLE actions have finished and close all dialogs." ;
};
-QueryBox MSG_IS_SERVER
-{
- Buttons = WB_YES_NO ;
- DefButton = WB_DEF_NO ;
- Message [ en-US ] = "This application is as object or print server active.\nDo you want to terminate anyway?" ;
-};
-
-String STR_NODOUBLE
-{
- Text [ en-US ] = "%PRODUCTNAME cannot be started more than once." ;
-};
-
-String STR_NOPRINTER
-{
- Text [ en-US ] = "Some %PRODUCTNAME functions will not work properly without a printer driver.\nPlease install a printer driver." ;
-};
-
String STR_ISMODIFIED
{
Text [ en-US ] = "Do you want to save the changes to %1?" ;
};
-String STR_AUTOSAVE
-{
- Text [ en-US ] = "AutoSave" ;
-};
-
-String STR_RESWARNING
-{
- Text [ en-US ] = "Limited system resources. Please quit other applications or close some windows before continuing." ;
-};
-String STR_RESEXCEPTION
-{
- Text [ en-US ] = "There are files missing. Please check application setup." ;
-};
-
-String STR_DOUBLEEXCEPTION
-{
- Text [ en-US ] = "Another error occurred during the save recovery.\nPossibly, the data could not be entirely saved." ;
-};
-
-String STR_SYSRESEXCEPTION
-{
- Text [ en-US ] = "System resources exhausted. Please restart the application." ;
-};
-
-ErrorBox MSG_ERR_SOINIT
-{
- Message [ en-US ] = "Error initializing object-system." ;
-};
-
-String MSG_IOERR_FILE_NOT_FOUND
-{
- Text [ en-US ] = "The file $(FILE) doesn't exist." ;
-};
-
-String MSG_IOERR_PATH_NOT_FOUND
-{
- Text [ en-US ] = "The path to file $(FILE) doesn't exist." ;
-};
-
-String MSG_IOERR_TOO_MANY_OPEN_FILES
-{
- Text [ en-US ] = "The file $(FILE) could not be opened,\nbecause too many files are open.\nPlease close some files and try again." ;
-};
-
-String MSG_IOERR_ACCESS_DENIED
-{
- Text [ en-US ] = "The file $(FILE) could not be opened due to missing access rights." ;
-};
-
-String MSG_IOERR_INVALID_ACCESS
-{
- Text [ en-US ] = "The file $(FILE) could not be accessed." ;
-};
-
-String MSG_IOERR_INVALID_HANDLE
-{
- Text [ en-US ] = "The file $(FILE) could not be opened due to an invalid file handle." ;
-};
-
-String MSG_IOERR_CANNOT_MAKE
-{
- Text [ en-US ] = "The file $(FILE) could not be created." ;
-};
-
-String MSG_IOERR_SHARING
-{
- Text [ en-US ] = "Error by shared access to $(FILE)." ;
-};
-
-String MSG_IOERR_INVALID_PARAMETER
-{
- Text [ en-US ] = "" ;
-};
-
-String MSG_IOERR_GENERAL
-{
- Text [ en-US ] = "General I/O error accessing $(FILE)." ;
-};
-
String RID_FULLSCREENTOOLBOX
{
Text = "" ;
@@ -499,41 +262,11 @@ ToolBox RID_FULLSCREENTOOLBOX
};
};
-String STR_ERR_NOTEMPLATE
-{
- Text [ en-US ] = "The selected template has an incorrect format" ;
-};
-
-String STR_ERR_NOFILE
-{
- Text [ en-US ] = "Can't open file $." ;
-};
-
String STR_QUITAPP
{
Text [ en-US ] = "E~xit" ;
};
-String STR_EXITANDRETURN
-{
- Text [ en-US ] = "E~xit & return to " ;
-};
-
-String STR_EXTHELPSTATUS
-{
- Text [ en-US ] = "Select a command or click to select a theme." ;
-};
-
-String STR_MAIL
-{
- Text [ en-US ] = "Mail" ;
-};
-
-String STR_ADDRESS_NAME
-{
- Text [ en-US ] = "Addresses" ;
-};
-
String RID_STR_HELP
{
Text [ en-US ] = "Help" ;
@@ -544,11 +277,6 @@ String RID_STR_NOAUTOSTARTHELPAGENT
Text [ en-US ] = "No automatic start at 'XX'" ;
};
-String RID_STR_NOWELCOMESCREEN
-{
- Text [ en-US ] = "Don't display tips" ;
-};
-
String RID_HELPBAR
{
Text [ en-US ] = "Help Bar" ;
@@ -614,11 +342,6 @@ String RID_STR_HLPFILENOTEXIST
Text [ en-US ] = "The help file for this topic is not installed." ;
};
-String RID_STR_HLPAPPNOTSTARTED
-{
- Text [ en-US ] = "The help system could not be started" ;
-};
-
//----------------------------------------------------------------------------
String RID_ENVTOOLBOX
@@ -626,292 +349,11 @@ String RID_ENVTOOLBOX
Text [ en-US ] = "Function Bar" ;
};
-ToolBox RID_ENVTOOLBOX
-{
- HelpId = RID_ENVTOOLBOX ;
- ButtonType = BUTTON_SYMBOL ;
- LineSpacing = TRUE ;
- Border = TRUE ;
- Scroll = TRUE ;
- SVLook = TRUE ;
- Dockable = TRUE ;
- Moveable = TRUE ;
- Sizeable = TRUE ;
- Closeable = TRUE ;
- Zoomable = TRUE ;
- Customize = TRUE ;
- FloatingMode = FALSE ;
- Hide = TRUE ;
- HideWhenDeactivate = TRUE ;
- Align = BOXALIGN_TOP ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = SID_OPENURL ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_NEWDOCDIRECT ;
- DropDown = TRUE;
- };
- ToolBoxItem
- {
- Identifier = SID_NEWDOC ;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Identifier = SID_OPENDOC ;
- };
- ToolBoxItem
- {
- Identifier = SID_SAVEDOC ;
- };
- ToolBoxItem
- {
- Identifier = SID_SAVEASDOC ;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_EDITDOC ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_DIRECTEXPORTDOCASPDF ;
- };
- ToolBoxItem
- {
- Identifier = SID_PRINTDOCDIRECT ;
- };
- ToolBoxItem
- {
- Identifier = FN_FAX ;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_CUT ;
- };
- ToolBoxItem
- {
- Identifier = SID_COPY ;
- };
- ToolBoxItem
- {
- Identifier = SID_PASTE ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_UNDO ;
- };
- ToolBoxItem
- {
- Identifier = SID_REDO ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_NAVIGATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_STYLE_DESIGNER ;
- };
- ToolBoxItem
- {
- Identifier = SID_HYPERLINK_DIALOG ;
- };
- ToolBoxItem
- {
- Identifier = SID_WIN_FULLSCREEN ;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_RECORDMACRO;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_GALLERY ;
- };
- ToolBoxItem
- {
- Identifier = SID_AVMEDIA_PLAYER ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_CLOSEDOC;
- Hide = TRUE;
- };
- };
-};
-
String RID_SPECIALCONFIG_ERROR
{
Text [ en-US ] = "An error has occurred in the special configuration.\nPlease contact your administrator." ;
};
-String STR_MEMINFO_HEADER
-{
-};
-
-String STR_MEMINFO_FOOTER
-{
- Text = "</table>" ;
-};
-
-String STR_MEMINFO_OBJINFO
-{
- Text = "<tr><td >$(VISIBLE)</td><td>$(CACHED)</td><td>$(EXPIRE)</td><td>$(JSDIRTY)</td><td>$(JSEXEC)</td><td>$(FORBID)</td><td>$(FACTORY)</td><td>$(URL)</td><td>$(ORIGURL)</td><td>$(POSTSTRING)</td></tr>" ;
-};
-
-String RID_PLUGIN
-{
- Text [ en-US ] = "Enable plug-ins" ;
-};
-
-String STR_CORRUPT_INSTALLATION
-{
- Text [ en-US ] = "Important program components could not be initialized correctly.\nPlease start the setup program with the option /Repair." ;
-};
-
-String IDS_SBERR_STOREREF
-{
- Text [ en-US ] = "Reference will not be saved: " ;
-};
-
-String STR_KEY_CONFIG_DIR
-{
- Text [ en-US ] = "Configuration" ;
-};
-String STR_KEY_WORK_PATH
-{
- Text [ en-US ] = "My Documents" ;
-};
-String STR_KEY_GRAPHICS_PATH
-{
- Text [ en-US ] = "Graphics" ;
-};
-String STR_KEY_BITMAP_PATH
-{
- Text [ en-US ] = "Icons" ;
-};
-String STR_KEY_BASIC_PATH
-{
- Text = "BASIC" ;
-};
-
-String STR_KEY_PALETTE_PATH
-{
- Text [ en-US ] = "Palettes" ;
-};
-String STR_KEY_BACKUP_PATH
-{
- Text [ en-US ] = "Backups" ;
-};
-String STR_KEY_MODULES_PATH
-{
- Text [ en-US ] = "Modules" ;
-};
-String STR_KEY_TEMPLATE_PATH
-{
- Text [ en-US ] = "Templates" ;
-};
-String STR_KEY_GLOSSARY_PATH
-{
- Text [ en-US ] = "AutoText" ;
-};
-String STR_KEY_DICTIONARY_PATH
-{
- Text [ en-US ] = "Dictionaries" ;
-};
-String STR_KEY_HELP_DIR
-{
- Text [ en-US ] = "Help" ;
-};
-String STR_KEY_GALLERY_DIR
-{
- Text [ en-US ] = "Gallery" ;
-};
-
-String STR_KEY_STORAGE_DIR
-{
- Text [ en-US ] = "Message Storage" ;
-};
-String STR_KEY_TEMP_PATH
-{
- Text [ en-US ] = "Temporary files" ;
-};
-String STR_KEY_PLUGINS_PATH
-{
- Text [ en-US ] = "Plug-ins" ;
-};
-String STR_KEY_FAVORITES_DIR
-{
- Text [ en-US ] = "Folder Bookmarks" ;
-};
-String STR_KEY_FILTER_PATH
-{
- Text [ en-US ] = "Filters" ;
-};
-String STR_KEY_ADDINS_PATH
-{
- Text [ en-US ] = "Add-ins" ;
-};
-String STR_KEY_USERCONFIG_PATH
-{
- Text [ en-US ] = "User Configuration" ;
-};
-String STR_KEY_USERDICTIONARY_DIR
-{
- Text [ en-US ] = "User-defined dictionaries" ;
-};
-String STR_KEY_AUTOCORRECT_DIR
-{
- Text [ en-US ] = "AutoCorrect" ;
-};
-String STR_KEY_LINGUISTIC_DIR
-{
- Text [ en-US ] = "Writing aids" ;
-};
String STR_QUICKSTART_EXIT
{
Text [ en-US ] = "Exit Quickstarter" ;
@@ -986,17 +428,6 @@ String RID_SECURITY_WARNING_TITLE
Text [ en-US ] = "Security Warning" ;
};
-ErrorBox RID_INVALID_URL_MSG
-{
- Buttons = WB_OK ;
- Message [ en-US ] = "The URL is not valid." ;
-};
-
-String RID_INVALID_URL_TITLE
-{
- Text = "%PRODUCTNAME %PRODUCTVERSION" ;
-};
-
String RID_DESKTOP
{
Text = "%PRODUCTNAME" ;
@@ -1029,39 +460,37 @@ String RID_XMLSEC_DOCUMENTSIGNED
Text [ en-US ] = " (Signed)" ;
};
-Image IMG_MISSING_1
-{
- ImageBitmap = Bitmap { File = "sc05539.bmp" ; };
-};
-
-Image IMG_MISSING_2
-{
- ImageBitmap = Bitmap { File = "sc05700.bmp" ; };
-};
-
-Image IMG_MISSING_3
+String STR_STANDARD
{
- ImageBitmap = Bitmap { File = "sc06302.bmp" ; };
+ Text [ en-US ] = "Standard" ;
};
-Image IMG_MISSING_4
+String RID_SVXSTR_FILELINK
{
- ImageBitmap = Bitmap { File = "sn064.bmp" ; };
+ Text [ en-US ] = "Document" ;
};
-String RID_SVXSTR_FILELINK
+String STR_NONE
{
- Text [ en-US ] = "Document" ;
+ Text [ en-US ] = "- None -" ;
};
String RID_SVXSTR_GRAFIKLINK
{
Text [ en-US ] = "Graphic" ;
};
+String STR_SFX_FILTERNAME_ALL
+{
+ Text [ en-US ] = "All files (*.*)" ;
+};
String RID_SVXSTR_EDITGRFLINK
{
Text [ en-US ] = "Link graphics" ;
};
-
+// i66948 used in project scripting
+String STR_ERRUNOEVENTBINDUNG
+{
+ Text [ en-US ] = "An appropriate component method %1\ncould not be found.\n\nCheck spelling of method name.";
+};
String RID_SVXSTR_GRFILTER_OPENERROR
{
Text [ en-US ] = "Graphics file cannot be opened" ;
diff --git a/sfx2/source/appl/appbas.cxx b/sfx2/source/appl/appbas.cxx
index 5ff2f321d371..a776e09d1f74 100644..100755
--- a/sfx2/source/appl/appbas.cxx
+++ b/sfx2/source/appl/appbas.cxx
@@ -61,7 +61,7 @@
#include "arrdecl.hxx"
#include <sfx2/app.hxx>
#include "sfxtypes.hxx"
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include <sfx2/msg.hxx>
#include <sfx2/msgpool.hxx>
#include <sfx2/progress.hxx>
@@ -70,17 +70,16 @@
#include <sfx2/viewfrm.hxx>
#include <sfx2/viewsh.hxx>
#include <sfx2/dispatch.hxx>
-#include "tplpitem.hxx"
-#include "minfitem.hxx"
+#include "sfx2/tplpitem.hxx"
+#include "sfx2/minfitem.hxx"
#include "app.hrc"
#include <sfx2/evntconf.hxx>
-#include <sfx2/macrconf.hxx>
#include <sfx2/request.hxx>
#include <sfx2/dinfdlg.hxx>
#include "appdata.hxx"
#include "appbas.hxx"
-#include "sfxhelp.hxx"
-#include "basmgr.hxx"
+#include "sfx2/sfxhelp.hxx"
+#include "sfx2/basmgr.hxx"
#include "sorgitm.hxx"
#include "appbaslib.hxx"
#include <basic/basicmanagerrepository.hxx>
@@ -147,10 +146,6 @@ SbxVariable* MakeVariable( StarBASIC *pBas, SbxObject *pObject,
BasicManager* SfxApplication::GetBasicManager()
{
- if ( pAppData_Impl->nBasicCallLevel == 0 )
- // precaution
- EnterBasicCall();
-
return BasicManagerRepository::getApplicationBasicManager( true );
}
@@ -179,33 +174,6 @@ StarBASIC* SfxApplication::GetBasic()
return GetBasicManager()->GetLib(0);
}
-//--------------------------------------------------------------------
-
-bool SfxApplication::IsInBasicCall() const
-{
- return 0 != pAppData_Impl->nBasicCallLevel;
-}
-
-//--------------------------------------------------------------------
-
-void SfxApplication::EnterBasicCall()
-{
- if ( 1 == ++pAppData_Impl->nBasicCallLevel )
- {
- OSL_TRACE( "SfxShellObject: BASIC-on-demand" );
-
- // First load the BASIC
- GetBasic();
- }
-}
-
-//--------------------------------------------------------------------
-
-void SfxApplication::LeaveBasicCall()
-{
- --pAppData_Impl->nBasicCallLevel;
-}
-
//-------------------------------------------------------------------------
void SfxApplication::PropExec_Impl( SfxRequest &rReq )
{
@@ -253,10 +221,6 @@ void SfxApplication::PropExec_Impl( SfxRequest &rReq )
break;
}
- case SID_PLAYMACRO:
- PlayMacro_Impl( rReq, GetBasic() );
- break;
-
case SID_OFFICE_PRIVATE_USE:
case SID_OFFICE_COMMERCIAL_USE:
{
@@ -300,27 +264,13 @@ void SfxApplication::PropState_Impl( SfxItemSet &rSet )
break;
case SID_ATTR_UNDO_COUNT:
- rSet.Put( SfxUInt16Item( SID_ATTR_UNDO_COUNT, sal::static_int_cast< UINT16 >( SvtUndoOptions().GetUndoCount() ) ) );
+ rSet.Put( SfxUInt16Item( SID_ATTR_UNDO_COUNT, sal::static_int_cast< sal_uInt16 >( SvtUndoOptions().GetUndoCount() ) ) );
break;
case SID_UPDATE_VERSION:
rSet.Put( SfxUInt32Item( SID_UPDATE_VERSION, SUPD ) );
break;
- case SID_BUILD_VERSION:
- {
- String aVersion = lcl_GetVersionString();
- rSet.Put( SfxUInt32Item( SID_BUILD_VERSION, (sal_uInt32) aVersion.ToInt32() ) );
- break;
- }
-
- case SID_OFFICE_PRIVATE_USE:
- case SID_OFFICE_COMMERCIAL_USE:
- {
- DBG_ASSERT( sal_False, "SfxApplication::PropState_Impl()\nSID_OFFICE_PRIVATE_USE & SID_OFFICE_COMMERCIAL_USE are obsolete!\n" );
- break;
- }
-
case SID_OFFICE_CUSTOMERNUMBER:
{
rSet.Put( SfxStringItem( nSID, SvtUserOptions().GetCustomerNumber() ) );
@@ -330,69 +280,4 @@ void SfxApplication::PropState_Impl( SfxItemSet &rSet )
}
}
-//--------------------------------------------------------------------
-void SfxApplication::MacroExec_Impl( SfxRequest& rReq )
-{
- DBG_MEMTEST();
- if ( SfxMacroConfig::IsMacroSlot( rReq.GetSlot() ) )
- {
- // Create reference to SlotId, so that the excecute in the slot
- // is not cancelled.
- GetMacroConfig()->RegisterSlotId(rReq.GetSlot());
- SFX_REQUEST_ARG(rReq, pArgs, SfxStringItem,
- rReq.GetSlot(), sal_False);
- String aArgs;
- if( pArgs ) aArgs = pArgs->GetValue();
- if ( GetMacroConfig()->ExecuteMacro(rReq.GetSlot(), aArgs ) )
- rReq.Done();
- GetMacroConfig()->ReleaseSlotId(rReq.GetSlot());
- }
-}
-
-//--------------------------------------------------------------------
-void SfxApplication::MacroState_Impl( SfxItemSet& )
-{
- DBG_MEMTEST();
-}
-
-//-------------------------------------------------------------------------
-
-void SfxApplication::PlayMacro_Impl( SfxRequest &rReq, StarBASIC *pBasic )
-{
- EnterBasicCall();
- sal_Bool bOK = sal_False;
-
- // Makro and asynch-Flag
- SFX_REQUEST_ARG(rReq,pMacro,SfxStringItem,SID_STATEMENT,sal_False);
- SFX_REQUEST_ARG(rReq,pAsynch,SfxBoolItem,SID_ASYNCHRON,sal_False);
-
- if ( pAsynch && pAsynch->GetValue() )
- {
- // run asynchronously
- GetDispatcher_Impl()->Execute( SID_PLAYMACRO, SFX_CALLMODE_ASYNCHRON, pMacro, 0L );
- rReq.Done();
- }
- else if ( pMacro )
- {
- // Process statement
- DBG_ASSERT( pBasic, "no BASIC found" ) ;
- String aStatement( '[' );
- aStatement += pMacro->GetValue();
- aStatement += ']';
-
- // Finish the request preventatively because it maybe destroyed
- rReq.Done();
- rReq.ReleaseArgs();
-
- // Process statement
- pBasic->Execute( aStatement );
- bOK = 0 == SbxBase::GetError();
- SbxBase::ResetError();
- }
-
- LeaveBasicCall();
- rReq.SetReturnValue(SfxBoolItem(0,bOK));
-}
-
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/appl/appbaslib.cxx b/sfx2/source/appl/appbaslib.cxx
index 01fe6536d683..eb2c43a27dd3 100644..100755
--- a/sfx2/source/appl/appbaslib.cxx
+++ b/sfx2/source/appl/appbaslib.cxx
@@ -26,6 +26,9 @@
*
************************************************************************/
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sfx2.hxx"
+
#include "appbaslib.hxx"
#include <sfx2/sfxuno.hxx>
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx
index 48b76959a18a..8387c5854b73 100644..100755
--- a/sfx2/source/appl/appcfg.cxx
+++ b/sfx2/source/appl/appcfg.cxx
@@ -75,7 +75,7 @@
#include <sfx2/app.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/viewfrm.hxx>
-#include "sfxhelp.hxx"
+#include "sfx2/sfxhelp.hxx"
#include "sfxtypes.hxx"
#include <sfx2/dispatch.hxx>
#include <sfx2/objsh.hxx>
@@ -85,10 +85,9 @@
#include <sfx2/evntconf.hxx>
#include "appdata.hxx"
#include "workwin.hxx"
-#include <sfx2/macrconf.hxx>
#include "helper.hxx" // SfxContentHelper::...
#include "app.hrc"
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include "shutdownicon.hxx"
using namespace ::com::sun::star::uno;
@@ -168,13 +167,13 @@ IMPL_LINK(SfxEventAsyncer_Impl, TimerHdl, Timer*, pAsyncTimer)
//--------------------------------------------------------------------
-BOOL SfxApplication::GetOptions( SfxItemSet& rSet )
+sal_Bool SfxApplication::GetOptions( SfxItemSet& rSet )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SfxItemPool &rPool = GetPool();
- String aTRUEStr('1');
+ String asal_TrueStr('1');
- const USHORT *pRanges = rSet.GetRanges();
+ const sal_uInt16 *pRanges = rSet.GetRanges();
SvtSaveOptions aSaveOptions;
SvtUndoOptions aUndoOptions;
SvtHelpOptions aHelpOptions;
@@ -184,91 +183,91 @@ BOOL SfxApplication::GetOptions( SfxItemSet& rSet )
while ( *pRanges )
{
- for(USHORT nWhich = *pRanges++; nWhich <= *pRanges; ++nWhich)
+ for(sal_uInt16 nWhich = *pRanges++; nWhich <= *pRanges; ++nWhich)
{
switch(nWhich)
{
case SID_ATTR_BUTTON_OUTSTYLE3D :
if(rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_BUTTON_OUTSTYLE3D ),
aMiscOptions.GetToolboxStyle() != TOOLBOX_STYLE_FLAT)))
- bRet = TRUE;
+ bRet = sal_True;
break;
case SID_ATTR_BUTTON_BIGSIZE :
{
if( rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_BUTTON_BIGSIZE ), aMiscOptions.AreCurrentSymbolsLarge() ) ) )
- bRet = TRUE;
+ bRet = sal_True;
break;
}
case SID_ATTR_BACKUP :
{
- bRet = TRUE;
+ bRet = sal_True;
if (!aSaveOptions.IsReadOnly(SvtSaveOptions::E_BACKUP))
if (!rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_BACKUP ),aSaveOptions.IsBackup())))
- bRet = FALSE;
+ bRet = sal_False;
}
break;
case SID_ATTR_PRETTYPRINTING:
{
- bRet = TRUE;
+ bRet = sal_True;
if (!aSaveOptions.IsReadOnly(SvtSaveOptions::E_DOPRETTYPRINTING))
if (!rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_PRETTYPRINTING ), aSaveOptions.IsPrettyPrinting())))
- bRet = FALSE;
+ bRet = sal_False;
}
break;
case SID_ATTR_WARNALIENFORMAT:
{
- bRet = TRUE;
+ bRet = sal_True;
if (!aSaveOptions.IsReadOnly(SvtSaveOptions::E_WARNALIENFORMAT))
if (!rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_WARNALIENFORMAT ), aSaveOptions.IsWarnAlienFormat())))
- bRet = FALSE;
+ bRet = sal_False;
}
break;
case SID_ATTR_AUTOSAVE :
{
- bRet = TRUE;
+ bRet = sal_True;
if (!aSaveOptions.IsReadOnly(SvtSaveOptions::E_AUTOSAVE))
if (!rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_AUTOSAVE ), aSaveOptions.IsAutoSave())))
- bRet = FALSE;
+ bRet = sal_False;
}
break;
case SID_ATTR_AUTOSAVEPROMPT :
{
- bRet = TRUE;
+ bRet = sal_True;
if (!aSaveOptions.IsReadOnly(SvtSaveOptions::E_AUTOSAVEPROMPT))
if (!rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_AUTOSAVEPROMPT ), aSaveOptions.IsAutoSavePrompt())))
- bRet = FALSE;
+ bRet = sal_False;
}
break;
case SID_ATTR_AUTOSAVEMINUTE :
{
- bRet = TRUE;
+ bRet = sal_True;
if (!aSaveOptions.IsReadOnly(SvtSaveOptions::E_AUTOSAVETIME))
- if (!rSet.Put( SfxUInt16Item( rPool.GetWhich( SID_ATTR_AUTOSAVEMINUTE ), (UINT16)aSaveOptions.GetAutoSaveTime())))
- bRet = FALSE;
+ if (!rSet.Put( SfxUInt16Item( rPool.GetWhich( SID_ATTR_AUTOSAVEMINUTE ), (sal_uInt16)aSaveOptions.GetAutoSaveTime())))
+ bRet = sal_False;
}
break;
case SID_ATTR_DOCINFO :
{
- bRet = TRUE;
+ bRet = sal_True;
if (!aSaveOptions.IsReadOnly(SvtSaveOptions::E_DOCINFSAVE))
if (!rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_DOCINFO ), aSaveOptions.IsDocInfoSave())))
- bRet = FALSE;
+ bRet = sal_False;
}
break;
case SID_ATTR_WORKINGSET :
{
- bRet = TRUE;
+ bRet = sal_True;
if (!aSaveOptions.IsReadOnly(SvtSaveOptions::E_SAVEWORKINGSET))
if (!rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_WORKINGSET ), aSaveOptions.IsSaveWorkingSet())))
- bRet = FALSE;
+ bRet = sal_False;
}
break;
case SID_ATTR_SAVEDOCVIEW :
{
- bRet = TRUE;
+ bRet = sal_True;
if (!aSaveOptions.IsReadOnly(SvtSaveOptions::E_SAVEDOCVIEW))
if (!rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_SAVEDOCVIEW ), aSaveOptions.IsSaveDocView())))
- bRet = FALSE;
+ bRet = sal_False;
}
break;
case SID_ATTR_METRIC :
@@ -276,37 +275,37 @@ BOOL SfxApplication::GetOptions( SfxItemSet& rSet )
case SID_HELPBALLOONS :
if(rSet.Put( SfxBoolItem ( rPool.GetWhich( SID_HELPBALLOONS ),
aHelpOptions.IsExtendedHelp() ) ) )
- bRet = TRUE;
+ bRet = sal_True;
break;
case SID_HELPTIPS :
if(rSet.Put( SfxBoolItem ( rPool.GetWhich( SID_HELPTIPS ),
aHelpOptions.IsHelpTips() ) ) )
- bRet = TRUE;
+ bRet = sal_True;
break;
case SID_ATTR_AUTOHELPAGENT :
if(rSet.Put( SfxBoolItem ( rPool.GetWhich( SID_ATTR_AUTOHELPAGENT ),
aHelpOptions.IsHelpAgentAutoStartMode() ) ) )
- bRet = TRUE;
+ bRet = sal_True;
break;
case SID_HELPAGENT_TIMEOUT :
if ( rSet.Put( SfxInt32Item( rPool.GetWhich( SID_HELPAGENT_TIMEOUT ),
aHelpOptions.GetHelpAgentTimeoutPeriod() ) ) )
- bRet = TRUE;
+ bRet = sal_True;
break;
case SID_ATTR_WELCOMESCREEN :
if(rSet.Put( SfxBoolItem ( rPool.GetWhich( SID_ATTR_WELCOMESCREEN ),
aHelpOptions.IsWelcomeScreen() ) ) )
- bRet = TRUE;
+ bRet = sal_True;
break;
case SID_HELP_STYLESHEET :
if(rSet.Put( SfxStringItem ( rPool.GetWhich( SID_HELP_STYLESHEET ),
aHelpOptions.GetHelpStyleSheet() ) ) )
- bRet = TRUE;
+ bRet = sal_True;
break;
case SID_ATTR_UNDO_COUNT :
if(rSet.Put( SfxUInt16Item ( rPool.GetWhich( SID_ATTR_UNDO_COUNT ),
- (UINT16)aUndoOptions.GetUndoCount() ) ) )
- bRet = TRUE;
+ (sal_uInt16)aUndoOptions.GetUndoCount() ) ) )
+ bRet = sal_True;
break;
case SID_ATTR_QUICKLAUNCHER :
{
@@ -314,74 +313,74 @@ BOOL SfxApplication::GetOptions( SfxItemSet& rSet )
{
if ( rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_QUICKLAUNCHER ),
ShutdownIcon::GetAutostart() ) ) )
- bRet = TRUE;
+ bRet = sal_True;
}
else
{
rSet.DisableItem( rPool.GetWhich( SID_ATTR_QUICKLAUNCHER ) );
- bRet = TRUE;
+ bRet = sal_True;
}
break;
}
case SID_SAVEREL_INET :
{
- bRet = TRUE;
+ bRet = sal_True;
if (!aSaveOptions.IsReadOnly(SvtSaveOptions::E_SAVERELINET))
if (!rSet.Put( SfxBoolItem ( rPool.GetWhich( SID_SAVEREL_INET ), aSaveOptions.IsSaveRelINet() )))
- bRet = FALSE;
+ bRet = sal_False;
}
break;
case SID_SAVEREL_FSYS :
{
- bRet = TRUE;
+ bRet = sal_True;
if (!aSaveOptions.IsReadOnly(SvtSaveOptions::E_SAVERELFSYS))
if (!rSet.Put( SfxBoolItem ( rPool.GetWhich( SID_SAVEREL_FSYS ), aSaveOptions.IsSaveRelFSys() )))
- bRet = FALSE;
+ bRet = sal_False;
}
break;
case SID_BASIC_ENABLED :
{
- bRet = TRUE;
+ bRet = sal_True;
if (!aSecurityOptions.IsReadOnly(SvtSecurityOptions::E_BASICMODE))
{
- if ( !rSet.Put( SfxUInt16Item( rPool.GetWhich( SID_BASIC_ENABLED ), sal::static_int_cast< UINT16 >(aSecurityOptions.GetBasicMode()))))
- bRet = FALSE;
+ if ( !rSet.Put( SfxUInt16Item( rPool.GetWhich( SID_BASIC_ENABLED ), sal::static_int_cast< sal_uInt16 >(aSecurityOptions.GetBasicMode()))))
+ bRet = sal_False;
}
}
break;
case SID_INET_EXE_PLUGIN :
{
- bRet = TRUE;
+ bRet = sal_True;
if (!aSecurityOptions.IsReadOnly(SvtSecurityOptions::E_EXECUTEPLUGINS))
{
if ( !rSet.Put( SfxBoolItem( SID_INET_EXE_PLUGIN, aSecurityOptions.IsExecutePlugins() ) ) )
- bRet = FALSE;
+ bRet = sal_False;
}
}
break;
case SID_MACRO_WARNING :
{
- bRet = TRUE;
+ bRet = sal_True;
if (!aSecurityOptions.IsReadOnly(SvtSecurityOptions::E_WARNING))
{
if ( !rSet.Put( SfxBoolItem( SID_MACRO_WARNING, aSecurityOptions.IsWarningEnabled() ) ) )
- bRet = FALSE;
+ bRet = sal_False;
}
}
break;
case SID_MACRO_CONFIRMATION :
{
- bRet = TRUE;
+ bRet = sal_True;
if (!aSecurityOptions.IsReadOnly(SvtSecurityOptions::E_CONFIRMATION))
{
if ( !rSet.Put( SfxBoolItem( SID_MACRO_CONFIRMATION, aSecurityOptions.IsConfirmationEnabled() ) ) )
- bRet = FALSE;
+ bRet = sal_False;
}
}
break;
case SID_SECURE_URL :
{
- bRet = TRUE;
+ bRet = sal_True;
if (!aSecurityOptions.IsReadOnly(SvtSecurityOptions::E_SECUREURLS))
{
::com::sun::star::uno::Sequence< ::rtl::OUString > seqURLs = aSecurityOptions.GetSecureURLs();
@@ -395,7 +394,7 @@ BOOL SfxApplication::GetOptions( SfxItemSet& rSet )
if( !rSet.Put( SfxStringListItem( rPool.GetWhich(SID_SECURE_URL),
&aList ) ) )
{
- bRet = FALSE;
+ bRet = sal_False;
}
for( nURL=0; nURL<nCount; ++nURL )
{
@@ -413,31 +412,31 @@ BOOL SfxApplication::GetOptions( SfxItemSet& rSet )
case SID_INET_PROXY_TYPE :
{
if( rSet.Put( SfxUInt16Item ( rPool.GetWhich( SID_INET_PROXY_TYPE ),
- (UINT16)aInetOptions.GetProxyType() )))
- bRet = TRUE;
+ (sal_uInt16)aInetOptions.GetProxyType() )))
+ bRet = sal_True;
break;
}
case SID_INET_HTTP_PROXY_NAME :
{
if ( rSet.Put( SfxStringItem ( rPool.GetWhich(SID_INET_HTTP_PROXY_NAME ),
aInetOptions.GetProxyHttpName() )))
- bRet = TRUE;
+ bRet = sal_True;
break;
}
case SID_INET_HTTP_PROXY_PORT :
if ( rSet.Put( SfxInt32Item( rPool.GetWhich(SID_INET_HTTP_PROXY_PORT ),
aInetOptions.GetProxyHttpPort() )))
- bRet = TRUE;
+ bRet = sal_True;
break;
case SID_INET_FTP_PROXY_NAME :
if ( rSet.Put( SfxStringItem ( rPool.GetWhich(SID_INET_FTP_PROXY_NAME ),
aInetOptions.GetProxyFtpName() )))
- bRet = TRUE;
+ bRet = sal_True;
break;
case SID_INET_FTP_PROXY_PORT :
if ( rSet.Put( SfxInt32Item ( rPool.GetWhich(SID_INET_FTP_PROXY_PORT ),
aInetOptions.GetProxyFtpPort() )))
- bRet = TRUE;
+ bRet = sal_True;
break;
case SID_INET_SECURITY_PROXY_NAME :
case SID_INET_SECURITY_PROXY_PORT :
@@ -448,7 +447,7 @@ BOOL SfxApplication::GetOptions( SfxItemSet& rSet )
case SID_INET_NOPROXY :
if( rSet.Put( SfxStringItem ( rPool.GetWhich( SID_INET_NOPROXY),
aInetOptions.GetProxyNoProxy() )))
- bRet = TRUE;
+ bRet = sal_True;
break;
case SID_ATTR_PATHNAME :
case SID_ATTR_PATHGROUP :
@@ -456,7 +455,7 @@ BOOL SfxApplication::GetOptions( SfxItemSet& rSet )
SfxAllEnumItem aNames(rPool.GetWhich(SID_ATTR_PATHGROUP));
SfxAllEnumItem aValues(rPool.GetWhich(SID_ATTR_PATHNAME));
SvtPathOptions aPathCfg;
- for ( USHORT nProp = SvtPathOptions::PATH_ADDIN;
+ for ( sal_uInt16 nProp = SvtPathOptions::PATH_ADDIN;
nProp <= SvtPathOptions::PATH_WORK; nProp++ )
{
const String aName( SfxResId( CONFIG_PATH_START + nProp ) );
@@ -491,7 +490,7 @@ BOOL SfxApplication::GetOptions( SfxItemSet& rSet )
}
if ( rSet.Put(aNames) || rSet.Put(aValues) )
- bRet = TRUE;
+ bRet = sal_True;
}
default:
@@ -510,7 +509,7 @@ BOOL SfxApplication::GetOptions( SfxItemSet& rSet )
}
//--------------------------------------------------------------------
-BOOL SfxApplication::IsSecureURL( const INetURLObject& rURL, const String* pReferer ) const
+sal_Bool SfxApplication::IsSecureURL( const INetURLObject& rURL, const String* pReferer ) const
{
return SvtSecurityOptions().IsSecureURL( rURL.GetMainURL( INetURLObject::NO_DECODE ), *pReferer );
}
@@ -520,7 +519,7 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet )
{
const SfxPoolItem *pItem = 0;
SfxItemPool &rPool = GetPool();
- BOOL bResetSession = FALSE;
+ sal_Bool bResetSession = sal_False;
SvtSaveOptions aSaveOptions;
SvtUndoOptions aUndoOptions;
@@ -529,18 +528,18 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet )
SvtPathOptions aPathOptions;
SvtInetOptions aInetOptions;
SvtMiscOptions aMiscOptions;
- if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_BUTTON_OUTSTYLE3D), TRUE, &pItem) )
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_BUTTON_OUTSTYLE3D), sal_True, &pItem) )
{
DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
- USHORT nOutStyle =
+ sal_uInt16 nOutStyle =
( (const SfxBoolItem *)pItem)->GetValue() ? 0 : TOOLBOX_STYLE_FLAT;
aMiscOptions.SetToolboxStyle( nOutStyle );
}
- if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_BUTTON_BIGSIZE), TRUE, &pItem) )
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_BUTTON_BIGSIZE), sal_True, &pItem) )
{
DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
- BOOL bBigSize = ( (const SfxBoolItem*)pItem )->GetValue();
+ sal_Bool bBigSize = ( (const SfxBoolItem*)pItem )->GetValue();
aMiscOptions.SetSymbolsSize(
sal::static_int_cast< sal_Int16 >(
bBigSize ? SFX_SYMBOLS_SIZE_LARGE : SFX_SYMBOLS_SIZE_SMALL ) );
@@ -555,144 +554,144 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet )
}
// Backup
- if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_BACKUP), TRUE, &pItem) )
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_BACKUP), sal_True, &pItem) )
{
DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
aSaveOptions.SetBackup( ( (const SfxBoolItem*)pItem )->GetValue() );
}
// PrettyPrinting
- if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_ATTR_PRETTYPRINTING ), TRUE, &pItem ) )
+ if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_ATTR_PRETTYPRINTING ), sal_True, &pItem ) )
{
DBG_ASSERT( pItem->ISA( SfxBoolItem ), "BoolItem expected" );
aSaveOptions.SetPrettyPrinting( static_cast< const SfxBoolItem*> ( pItem )->GetValue() );
}
// WarnAlienFormat
- if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_ATTR_WARNALIENFORMAT ), TRUE, &pItem ) )
+ if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_ATTR_WARNALIENFORMAT ), sal_True, &pItem ) )
{
DBG_ASSERT( pItem->ISA( SfxBoolItem ), "BoolItem expected" );
aSaveOptions.SetWarnAlienFormat( static_cast< const SfxBoolItem*> ( pItem )->GetValue() );
}
// AutoSave
- if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_AUTOSAVE), TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_AUTOSAVE), sal_True, &pItem))
{
DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
aSaveOptions.SetAutoSave( ( (const SfxBoolItem*)pItem )->GetValue() );
}
// AutoSave-Propt
- if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_AUTOSAVEPROMPT), TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_AUTOSAVEPROMPT), sal_True, &pItem))
{
DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
aSaveOptions.SetAutoSavePrompt(((const SfxBoolItem *)pItem)->GetValue());
}
// AutoSave-Time
- if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_AUTOSAVEMINUTE), TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_AUTOSAVEMINUTE), sal_True, &pItem))
{
DBG_ASSERT(pItem->ISA(SfxUInt16Item), "UInt16Item expected");
aSaveOptions.SetAutoSaveTime(((const SfxUInt16Item *)pItem)->GetValue());
}
// DocInfo
- if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_DOCINFO), TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_DOCINFO), sal_True, &pItem))
{
DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
aSaveOptions.SetDocInfoSave(((const SfxBoolItem *)pItem)->GetValue());
}
// Mark open Documents
- if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_WORKINGSET), TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_WORKINGSET), sal_True, &pItem))
{
DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
aSaveOptions.SetSaveWorkingSet(((const SfxBoolItem *)pItem)->GetValue());
}
// Save window settings
- if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_SAVEDOCVIEW), TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_SAVEDOCVIEW), sal_True, &pItem))
{
DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
aSaveOptions.SetSaveDocView(((const SfxBoolItem *)pItem)->GetValue());
}
// Metric
- if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_METRIC), TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_METRIC), sal_True, &pItem))
{
DBG_ASSERT(pItem->ISA(SfxUInt16Item), "UInt16Item expected");
}
// HelpBalloons
- if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_HELPBALLOONS), TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_HELPBALLOONS), sal_True, &pItem))
{
DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
aHelpOptions.SetExtendedHelp(((const SfxBoolItem *)pItem)->GetValue());
}
// HelpTips
- if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_HELPTIPS), TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_HELPTIPS), sal_True, &pItem))
{
DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
aHelpOptions.SetHelpTips(((const SfxBoolItem *)pItem)->GetValue());
}
// AutoHelpAgent
- if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_AUTOHELPAGENT ), TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_AUTOHELPAGENT ), sal_True, &pItem))
{
DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
aHelpOptions.SetHelpAgentAutoStartMode( ((const SfxBoolItem *)pItem)->GetValue() );
}
// help agent timeout
- if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_HELPAGENT_TIMEOUT ), TRUE, &pItem ) )
+ if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_HELPAGENT_TIMEOUT ), sal_True, &pItem ) )
{
DBG_ASSERT(pItem->ISA(SfxInt32Item), "Int32Item expected");
aHelpOptions.SetHelpAgentTimeoutPeriod( ( (const SfxInt32Item*)pItem )->GetValue() );
}
// WelcomeScreen
- if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_WELCOMESCREEN ), TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_WELCOMESCREEN ), sal_True, &pItem))
{
DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
aHelpOptions.SetWelcomeScreen( ((const SfxBoolItem *)pItem)->GetValue() );
}
// WelcomeScreen
- if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_WELCOMESCREEN_RESET ), TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_WELCOMESCREEN_RESET ), sal_True, &pItem))
{
DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
- BOOL bReset = ((const SfxBoolItem *)pItem)->GetValue();
+ sal_Bool bReset = ((const SfxBoolItem *)pItem)->GetValue();
if ( bReset )
{
OSL_FAIL( "Not implemented, may be EOL!" );
} }
- if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_HELP_STYLESHEET ), TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_HELP_STYLESHEET ), sal_True, &pItem))
{
DBG_ASSERT(pItem->ISA(SfxStringItem), "StringItem expected");
aHelpOptions.SetHelpStyleSheet( ((const SfxStringItem *)pItem)->GetValue() );
}
// SaveRelINet
- if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_SAVEREL_INET), TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_SAVEREL_INET), sal_True, &pItem))
{
DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
aSaveOptions.SetSaveRelINet(((const SfxBoolItem *)pItem)->GetValue());
}
// SaveRelFSys
- if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_SAVEREL_FSYS), TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_SAVEREL_FSYS), sal_True, &pItem))
{
DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
aSaveOptions.SetSaveRelFSys(((const SfxBoolItem *)pItem)->GetValue());
}
// Undo-Count
- if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_UNDO_COUNT), TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_UNDO_COUNT), sal_True, &pItem))
{
DBG_ASSERT(pItem->ISA(SfxUInt16Item), "UInt16Item expected");
- USHORT nUndoCount = ((const SfxUInt16Item*)pItem)->GetValue();
+ sal_uInt16 nUndoCount = ((const SfxUInt16Item*)pItem)->GetValue();
aUndoOptions.SetUndoCount( nUndoCount );
// To catch all Undo-Managers: Iterate over all Frames
@@ -705,12 +704,12 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet )
pDispat->Flush();
// Iterate over all SfxShells on the Dispatchers Stack
- USHORT nIdx = 0;
+ sal_uInt16 nIdx = 0;
for ( SfxShell *pSh = pDispat->GetShell(nIdx);
pSh;
++nIdx, pSh = pDispat->GetShell(nIdx) )
{
- SfxUndoManager *pShUndoMgr = pSh->GetUndoManager();
+ ::svl::IUndoManager *pShUndoMgr = pSh->GetUndoManager();
if ( pShUndoMgr )
pShUndoMgr->SetMaxUndoActionCount( nUndoCount );
}
@@ -718,67 +717,67 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet )
}
// Office autostart
- if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_QUICKLAUNCHER), TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_QUICKLAUNCHER), sal_True, &pItem))
{
DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
- ShutdownIcon::SetAutostart( ( (const SfxBoolItem*)pItem )->GetValue() != FALSE );
+ ShutdownIcon::SetAutostart( ( (const SfxBoolItem*)pItem )->GetValue() != sal_False );
}
// StarBasic Enable
- if ( SFX_ITEM_SET == rSet.GetItemState(SID_BASIC_ENABLED, TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState(SID_BASIC_ENABLED, sal_True, &pItem))
{
DBG_ASSERT(pItem->ISA(SfxUInt16Item), "SfxInt16Item expected");
aSecurityOptions.SetBasicMode( (EBasicSecurityMode)( (const SfxUInt16Item*)pItem )->GetValue() );
}
// Execute PlugIns
- if ( SFX_ITEM_SET == rSet.GetItemState(SID_INET_EXE_PLUGIN, TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState(SID_INET_EXE_PLUGIN, sal_True, &pItem))
{
DBG_ASSERT(pItem->ISA(SfxBoolItem), "SfxBoolItem expected");
aSecurityOptions.SetExecutePlugins( ( (const SfxBoolItem *)pItem )->GetValue() );
- bResetSession = TRUE;
+ bResetSession = sal_True;
}
- if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_INET_PROXY_TYPE), TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_INET_PROXY_TYPE), sal_True, &pItem))
{
DBG_ASSERT( pItem->ISA(SfxUInt16Item), "UInt16Item expected" );
aInetOptions.SetProxyType((SvtInetOptions::ProxyType)( (const SfxUInt16Item*)pItem )->GetValue());
- bResetSession = TRUE;
+ bResetSession = sal_True;
}
- if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_INET_HTTP_PROXY_NAME ), TRUE, &pItem ) )
+ if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_INET_HTTP_PROXY_NAME ), sal_True, &pItem ) )
{
DBG_ASSERT( pItem->ISA(SfxStringItem), "StringItem expected" );
aInetOptions.SetProxyHttpName( ((const SfxStringItem *)pItem)->GetValue() );
- bResetSession = TRUE;
+ bResetSession = sal_True;
}
- if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_INET_HTTP_PROXY_PORT ), TRUE, &pItem ) )
+ if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_INET_HTTP_PROXY_PORT ), sal_True, &pItem ) )
{
DBG_ASSERT( pItem->ISA(SfxInt32Item), "Int32Item expected" );
aInetOptions.SetProxyHttpPort( ( (const SfxInt32Item*)pItem )->GetValue() );
- bResetSession = TRUE;
+ bResetSession = sal_True;
}
- if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_INET_FTP_PROXY_NAME ), TRUE, &pItem ) )
+ if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_INET_FTP_PROXY_NAME ), sal_True, &pItem ) )
{
DBG_ASSERT( pItem->ISA(SfxStringItem), "StringItem expected" );
aInetOptions.SetProxyFtpName( ((const SfxStringItem *)pItem)->GetValue() );
- bResetSession = TRUE;
+ bResetSession = sal_True;
}
- if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_INET_FTP_PROXY_PORT ), TRUE, &pItem ) )
+ if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_INET_FTP_PROXY_PORT ), sal_True, &pItem ) )
{
DBG_ASSERT( pItem->ISA(SfxInt32Item), "Int32Item expected" );
aInetOptions.SetProxyFtpPort( ( (const SfxInt32Item*)pItem )->GetValue() );
- bResetSession = TRUE;
+ bResetSession = sal_True;
}
- if ( SFX_ITEM_SET == rSet.GetItemState(SID_INET_NOPROXY, TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState(SID_INET_NOPROXY, sal_True, &pItem))
{
DBG_ASSERT(pItem->ISA(SfxStringItem), "StringItem expected");
aInetOptions.SetProxyNoProxy(((const SfxStringItem *)pItem)->GetValue());
- bResetSession = TRUE;
+ bResetSession = sal_True;
}
// Secure-Referers
- if ( SFX_ITEM_SET == rSet.GetItemState(SID_SECURE_URL, TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState(SID_SECURE_URL, sal_True, &pItem))
{
DELETEZ(pAppData_Impl->pSecureURLs);
@@ -793,30 +792,25 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet )
aSecurityOptions.SetSecureURLs( seqURLs );
}
- if ( SFX_ITEM_SET == rSet.GetItemState(SID_MACRO_WARNING, TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState(SID_MACRO_WARNING, sal_True, &pItem))
{
DBG_ASSERT(pItem->ISA(SfxBoolItem), "SfxBoolItem expected");
aSecurityOptions.SetWarningEnabled( ( (const SfxBoolItem *)pItem )->GetValue() );
}
- if ( SFX_ITEM_SET == rSet.GetItemState(SID_MACRO_CONFIRMATION, TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState(SID_MACRO_CONFIRMATION, sal_True, &pItem))
{
DBG_ASSERT(pItem->ISA(SfxBoolItem), "SfxBoolItem expected");
aSecurityOptions.SetConfirmationEnabled( ( (const SfxBoolItem *)pItem )->GetValue() );
}
// EnableMetafilePrint
- if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_ENABLE_METAFILEPRINT ), TRUE, &pItem ) )
+ if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_ENABLE_METAFILEPRINT ), sal_True, &pItem ) )
{
#ifdef ENABLE_MISSINGKEYASSERTIONS//MUSTINI
DBG_ASSERT(sal_False, "SfxApplication::SetOptions_Impl()\nsoffice.ini key \"MetafilPrint\" not supported any longer!\n");
#endif
}
- // Set up INet Session again
- if ( bResetSession )
- {
- }
-
// Store changed data
aInetOptions.flush();
}
@@ -833,7 +827,7 @@ void SfxApplication::SetOptions(const SfxItemSet &rSet)
SfxAllItemSet aSendSet( rSet );
// PathName
- if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_PATHNAME), TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_PATHNAME), sal_True, &pItem))
{
DBG_ASSERT(pItem->ISA(SfxAllEnumItem), "AllEnumItem expected");
const SfxAllEnumItem* pEnumItem = (const SfxAllEnumItem *)pItem;
@@ -841,7 +835,7 @@ void SfxApplication::SetOptions(const SfxItemSet &rSet)
String aNoChangeStr( ' ' );
for( sal_uInt32 nPath=0; nPath<nCount; ++nPath )
{
- String sValue = pEnumItem->GetValueTextByPos((USHORT)nPath);
+ String sValue = pEnumItem->GetValueTextByPos((sal_uInt16)nPath);
if ( sValue != aNoChangeStr )
{
switch( nPath )
@@ -927,11 +921,11 @@ void SfxApplication::SetOptions(const SfxItemSet &rSet)
// Save all Documents
-BOOL SfxApplication::SaveAll_Impl(BOOL bPrompt, BOOL bAutoSave)
+sal_Bool SfxApplication::SaveAll_Impl(sal_Bool bPrompt, sal_Bool bAutoSave)
{
- bAutoSave = FALSE; // functionality moved to new AutoRecovery Service!
+ bAutoSave = sal_False; // functionality moved to new AutoRecovery Service!
- BOOL bFunc = TRUE;
+ sal_Bool bFunc = sal_True;
short nRet;
for ( SfxObjectShell *pDoc = SfxObjectShell::GetFirst();
@@ -959,11 +953,11 @@ BOOL SfxApplication::SaveAll_Impl(BOOL bPrompt, BOOL bAutoSave)
const SfxPoolItem *pPoolItem = pDoc->ExecuteSlot( aReq );
if ( !pPoolItem || !pPoolItem->ISA(SfxBoolItem) ||
!( (const SfxBoolItem*) pPoolItem )->GetValue() )
- bFunc = FALSE;
+ bFunc = sal_False;
}
else if ( nRet == RET_CANCEL )
{
- bFunc = FALSE;
+ bFunc = sal_False;
break;
}
else if ( nRet == RET_NO )
@@ -978,21 +972,6 @@ BOOL SfxApplication::SaveAll_Impl(BOOL bPrompt, BOOL bAutoSave)
//--------------------------------------------------------------------
-SfxMacroConfig* SfxApplication::GetMacroConfig() const
-{
- return SfxMacroConfig::GetOrCreate();
-}
-
-//--------------------------------------------------------------------
-SfxEventConfiguration* SfxApplication::GetEventConfig() const
-{
- if (!pAppData_Impl->pEventConfig)
- pAppData_Impl->pEventConfig = new SfxEventConfiguration;
- return pAppData_Impl->pEventConfig;
-}
-
-//--------------------------------------------------------------------
-
//--------------------------------------------------------------------
void SfxApplication::NotifyEvent( const SfxEventHint& rEventHint, bool bSynchron )
{
diff --git a/sfx2/source/appl/appchild.cxx b/sfx2/source/appl/appchild.cxx
index 204ef0bbf981..08a5fc054425 100644..100755
--- a/sfx2/source/appl/appchild.cxx
+++ b/sfx2/source/appl/appchild.cxx
@@ -59,7 +59,7 @@ void SfxApplication::RegisterChildWindow_Impl( SfxModule *pMod, SfxChildWinFacto
if (!pAppData_Impl->pFactArr)
pAppData_Impl->pFactArr = new SfxChildWinFactArr_Impl;
- for (USHORT nFactory=0; nFactory<pAppData_Impl->pFactArr->Count(); ++nFactory)
+ for (sal_uInt16 nFactory=0; nFactory<pAppData_Impl->pFactArr->Count(); ++nFactory)
{
if (pFact->nId == (*pAppData_Impl->pFactArr)[nFactory]->nId)
{
@@ -71,7 +71,7 @@ void SfxApplication::RegisterChildWindow_Impl( SfxModule *pMod, SfxChildWinFacto
SfxChildWinFactory, pFact, pAppData_Impl->pFactArr->Count() );
}
-void SfxApplication::RegisterChildWindowContext_Impl( SfxModule *pMod, USHORT nId,
+void SfxApplication::RegisterChildWindowContext_Impl( SfxModule *pMod, sal_uInt16 nId,
SfxChildWinContextFactory *pFact)
{
SfxChildWinFactArr_Impl *pFactories;
@@ -82,8 +82,8 @@ void SfxApplication::RegisterChildWindowContext_Impl( SfxModule *pMod, USHORT nI
pFactories = pMod->GetChildWinFactories_Impl();
if ( pFactories )
{
- USHORT nCount = pFactories->Count();
- for (USHORT nFactory=0; nFactory<nCount; ++nFactory)
+ sal_uInt16 nCount = pFactories->Count();
+ for (sal_uInt16 nFactory=0; nFactory<nCount; ++nFactory)
{
SfxChildWinFactory *pFac = (*pFactories)[nFactory];
if ( nId == pFac->nId )
@@ -103,8 +103,8 @@ void SfxApplication::RegisterChildWindowContext_Impl( SfxModule *pMod, USHORT nI
DBG_ASSERT( pAppData_Impl->pFactArr, "No Factories!" );
pFactories = pAppData_Impl->pFactArr;
- USHORT nCount = pFactories->Count();
- for (USHORT nFactory=0; nFactory<nCount; ++nFactory)
+ sal_uInt16 nCount = pFactories->Count();
+ for (sal_uInt16 nFactory=0; nFactory<nCount; ++nFactory)
{
SfxChildWinFactory *pFac = (*pFactories)[nFactory];
if ( nId == pFac->nId )
diff --git a/sfx2/source/appl/appdata.cxx b/sfx2/source/appl/appdata.cxx
index 3cf26042b47d..3b53636f1c45 100644..100755
--- a/sfx2/source/appl/appdata.cxx
+++ b/sfx2/source/appl/appdata.cxx
@@ -56,7 +56,7 @@
#include <sfx2/request.hxx>
#include "referers.hxx"
#include "app.hrc"
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include "objshimp.hxx"
#include <sfx2/appuno.hxx>
#include "imestatuswindow.hxx"
@@ -97,11 +97,9 @@ SfxAppData_Impl::SfxAppData_Impl( SfxApplication* ) :
pTopFrames( new SfxFrameArr_Impl ),
pInitLinkList(0),
pMatcher( 0 ),
- pLabelResMgr( 0 ),
pAppDispatch(NULL),
pTemplates( 0 ),
pPool(0),
- pEventConfig(0),
pDisabledSlotList( 0 ),
pSecureURLs(0),
pSaveOptions( 0 ),
@@ -111,7 +109,6 @@ SfxAppData_Impl::SfxAppData_Impl( SfxApplication* ) :
pTemplateCommon( 0 ),
nDocModalMode(0),
nAutoTabPageId(0),
- nBasicCallLevel(0),
nRescheduleLocks(0),
nInReschedule(0),
nAsynchronCalls(0),
diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx
index 03234cec803a..c3fb0e9dfc92 100644..100755
--- a/sfx2/source/appl/appdde.cxx
+++ b/sfx2/source/appl/appdde.cxx
@@ -39,6 +39,7 @@
#include <sfx2/linkmgr.hxx>
#include <tools/urlobj.hxx>
+#include <tools/diagnose_ex.h>
#include <unotools/pathoptions.hxx>
#include <sfx2/app.hxx>
@@ -73,11 +74,11 @@ public:
ImplDdeService( const String& rNm )
: DdeService( rNm )
{}
- virtual BOOL MakeTopic( const String& );
+ virtual sal_Bool MakeTopic( const String& );
virtual String Topics();
- virtual BOOL SysTopicExecute( const String* pStr );
+ virtual sal_Bool SysTopicExecute( const String* pStr );
};
class SfxDdeTriggerTopic_Impl : public DdeTopic
@@ -87,7 +88,7 @@ public:
: DdeTopic( DEFINE_CONST_UNICODE("TRIGGER") )
{}
- virtual BOOL Execute( const String* );
+ virtual sal_Bool Execute( const String* );
};
class SfxDdeDocTopic_Impl : public DdeTopic
@@ -101,11 +102,11 @@ public:
: DdeTopic( pShell->GetTitle(SFX_TITLE_FULLNAME) ), pSh( pShell )
{}
- virtual DdeData* Get( ULONG );
- virtual BOOL Put( const DdeData* );
- virtual BOOL Execute( const String* );
- virtual BOOL StartAdviseLoop();
- virtual BOOL MakeItem( const String& rItem );
+ virtual DdeData* Get( sal_uIntPtr );
+ virtual sal_Bool Put( const DdeData* );
+ virtual sal_Bool Execute( const String* );
+ virtual sal_Bool StartAdviseLoop();
+ virtual sal_Bool MakeItem( const String& rItem );
};
@@ -114,7 +115,7 @@ SV_IMPL_PTRARR( SfxDdeDocTopics_Impl, SfxDdeDocTopic_Impl *)
//========================================================================
-BOOL SfxAppEvent_Impl( ApplicationEvent &rAppEvent,
+sal_Bool SfxAppEvent_Impl( ApplicationEvent &rAppEvent,
const String &rCmd, const String &rEvent )
/* [Description]
@@ -141,7 +142,7 @@ BOOL SfxAppEvent_Impl( ApplicationEvent &rAppEvent,
{
// Transform into the ApplicationEvent Format
aData.Erase( aData.Len()-1, 1 );
- for ( USHORT n = 0; n < aData.Len(); ++n )
+ for ( sal_uInt16 n = 0; n < aData.Len(); ++n )
{
if ( aData.GetChar(n) == 0x0022 ) // " = 22h
for ( ; aData.GetChar(++n) != 0x0022 ; )
@@ -152,11 +153,11 @@ BOOL SfxAppEvent_Impl( ApplicationEvent &rAppEvent,
aData.EraseAllChars( 0x0022 );
ApplicationAddress aAddr;
rAppEvent = ApplicationEvent( String(), aAddr, U2S(rEvent), aData );
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
//-------------------------------------------------------------------------
@@ -185,11 +186,9 @@ long SfxApplication::DdeExecute
else
{
// all others are BASIC
- EnterBasicCall();
StarBASIC* pBasic = GetBasic();
DBG_ASSERT( pBasic, "Where is the Basic???" );
SbxVariable* pRet = pBasic->Execute( rCmd );
- LeaveBasicCall();
if( !pRet )
{
SbxBase::ResetError();
@@ -453,7 +452,7 @@ long SfxViewFrame::DdeSetData
//========================================================================
-BOOL SfxApplication::InitializeDde()
+sal_Bool SfxApplication::InitializeDde()
{
DBG_ASSERT( !pAppData_Impl->pDdeService,
"Dde can not be initialized multiple times" );
@@ -499,14 +498,14 @@ void SfxApplication::AddDdeTopic( SfxObjectShell* pSh )
// prevent double submit
String sShellNm;
- BOOL bFnd = FALSE;
- for( USHORT n = pAppData_Impl->pDocTopics->Count(); n; )
+ sal_Bool bFnd = sal_False;
+ for( sal_uInt16 n = pAppData_Impl->pDocTopics->Count(); n; )
if( (*pAppData_Impl->pDocTopics)[ --n ]->pSh == pSh )
{
// If the document is untitled, is still a new Topic is created!
if( !bFnd )
{
- bFnd = TRUE;
+ bFnd = sal_True;
(sShellNm = pSh->GetTitle(SFX_TITLE_FULLNAME)).ToLowerAscii();
}
String sNm( (*pAppData_Impl->pDocTopics)[ n ]->GetName() );
@@ -528,7 +527,7 @@ void SfxApplication::RemoveDdeTopic( SfxObjectShell* pSh )
return;
SfxDdeDocTopic_Impl* pTopic;
- for( USHORT n = pAppData_Impl->pDocTopics->Count(); n; )
+ for( sal_uInt16 n = pAppData_Impl->pDocTopics->Count(); n; )
if( ( pTopic = (*pAppData_Impl->pDocTopics)[ --n ])->pSh == pSh )
{
pAppData_Impl->pDdeService->RemoveTopic( *pTopic );
@@ -548,17 +547,17 @@ DdeService* SfxApplication::GetDdeService()
//--------------------------------------------------------------------
-BOOL ImplDdeService::MakeTopic( const String& rNm )
+sal_Bool ImplDdeService::MakeTopic( const String& rNm )
{
// Workaround for Event after Main() under OS/2
// happens when exiting starts the App again
if ( !Application::IsInExecute() )
- return FALSE;
+ return sal_False;
// The Topic rNm is sought, do we have it?
// First only loop over the ObjectShells to find those
// with the specific name:
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
String sNm( rNm );
sNm.ToLowerAscii();
TypeId aType( TYPE(SfxObjectShell) );
@@ -570,7 +569,7 @@ BOOL ImplDdeService::MakeTopic( const String& rNm )
if( sTmp == sNm )
{
SFX_APP()->AddDdeTopic( pShell );
- bRet = TRUE;
+ bRet = sal_True;
break;
}
pShell = SfxObjectShell::GetNext( *pShell, &aType );
@@ -585,9 +584,9 @@ BOOL ImplDdeService::MakeTopic( const String& rNm )
{
// File exists? then try to load it:
SfxStringItem aName( SID_FILE_NAME, aFile.GetMainURL( INetURLObject::NO_DECODE ) );
- SfxBoolItem aNewView(SID_OPEN_NEW_VIEW, TRUE);
+ SfxBoolItem aNewView(SID_OPEN_NEW_VIEW, sal_True);
- SfxBoolItem aSilent(SID_SILENT, TRUE);
+ SfxBoolItem aSilent(SID_SILENT, sal_True);
SfxDispatcher* pDispatcher = SFX_APP()->GetDispatcher_Impl();
const SfxPoolItem* pRet = pDispatcher->Execute( SID_OPENDOC,
SFX_CALLMODE_SYNCHRON,
@@ -600,7 +599,7 @@ BOOL ImplDdeService::MakeTopic( const String& rNm )
->GetFrame()->GetObjectShell() ) )
{
SFX_APP()->AddDdeTopic( pShell );
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -630,20 +629,20 @@ String ImplDdeService::Topics()
return sRet;
}
-BOOL ImplDdeService::SysTopicExecute( const String* pStr )
+sal_Bool ImplDdeService::SysTopicExecute( const String* pStr )
{
- return (BOOL)SFX_APP()->DdeExecute( *pStr );
+ return (sal_Bool)SFX_APP()->DdeExecute( *pStr );
}
//--------------------------------------------------------------------
-BOOL SfxDdeTriggerTopic_Impl::Execute( const String* )
+sal_Bool SfxDdeTriggerTopic_Impl::Execute( const String* )
{
- return TRUE;
+ return sal_True;
}
//--------------------------------------------------------------------
-DdeData* SfxDdeDocTopic_Impl::Get( ULONG nFormat )
+DdeData* SfxDdeDocTopic_Impl::Get( sal_uIntPtr nFormat )
{
String sMimeType( SotExchange::GetFormatMimeType( nFormat ));
::com::sun::star::uno::Any aValue;
@@ -657,11 +656,11 @@ DdeData* SfxDdeDocTopic_Impl::Get( ULONG nFormat )
return 0;
}
-BOOL SfxDdeDocTopic_Impl::Put( const DdeData* pData )
+sal_Bool SfxDdeDocTopic_Impl::Put( const DdeData* pData )
{
aSeq = ::com::sun::star::uno::Sequence< sal_Int8 >(
(sal_Int8*)(const void*)*pData, (long)*pData );
- BOOL bRet;
+ sal_Bool bRet;
if( aSeq.getLength() )
{
::com::sun::star::uno::Any aValue;
@@ -670,25 +669,25 @@ BOOL SfxDdeDocTopic_Impl::Put( const DdeData* pData )
bRet = 0 != pSh->DdeSetData( GetCurItem(), sMimeType, aValue );
}
else
- bRet = FALSE;
+ bRet = sal_False;
return bRet;
}
-BOOL SfxDdeDocTopic_Impl::Execute( const String* pStr )
+sal_Bool SfxDdeDocTopic_Impl::Execute( const String* pStr )
{
long nRet = pStr ? pSh->DdeExecute( *pStr ) : 0;
return 0 != nRet;
}
-BOOL SfxDdeDocTopic_Impl::MakeItem( const String& rItem )
+sal_Bool SfxDdeDocTopic_Impl::MakeItem( const String& rItem )
{
AddItem( DdeItem( rItem ) );
- return TRUE;
+ return sal_True;
}
-BOOL SfxDdeDocTopic_Impl::StartAdviseLoop()
+sal_Bool SfxDdeDocTopic_Impl::StartAdviseLoop()
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
::sfx2::SvLinkSource* pNewObj = pSh->DdeCreateLinkSource( GetCurItem() );
if( pNewObj )
{
@@ -696,7 +695,7 @@ BOOL SfxDdeDocTopic_Impl::StartAdviseLoop()
String sNm, sTmp( Application::GetAppName() );
::sfx2::MakeLnkName( sNm, &sTmp, pSh->GetTitle(SFX_TITLE_FULLNAME), GetCurItem() );
new ::sfx2::SvBaseLink( sNm, OBJECT_DDE_EXTERN, pNewObj );
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
}
diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx
index 57d87b800d45..fe682c3e30e4 100644..100755
--- a/sfx2/source/appl/appinit.cxx
+++ b/sfx2/source/appl/appinit.cxx
@@ -69,18 +69,18 @@
#include <sfx2/docfac.hxx>
#include <sfx2/evntconf.hxx>
#include "intro.hxx"
-#include <sfx2/macrconf.hxx>
#include <sfx2/mnumgr.hxx>
#include <sfx2/msgpool.hxx>
#include <sfx2/progress.hxx>
-#include "sfxhelp.hxx"
-#include "sfxresid.hxx"
+#include "sfx2/sfxhelp.hxx"
+#include "sfx2/sfxresid.hxx"
#include "sfxtypes.hxx"
#include <sfx2/viewsh.hxx>
#include "nochaos.hxx"
#include <sfx2/fcontnr.hxx>
#include "helper.hxx" // SfxContentHelper::Kill()
#include "sfxpicklist.hxx"
+#include <tools/svlibrary.hxx>
#ifdef UNX
#define stricmp(a,b) strcmp(a,b)
@@ -207,10 +207,7 @@ String GetSpecialCharsForEdit(Window* pParent, const Font& rFont)
{
bDetermineFunction = true;
- String sLibName = String::CreateFromAscii( STRING( DLL_NAME ) );
- sLibName.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "sfx" ) ), String( RTL_CONSTASCII_USTRINGPARAM( "cui" ) ) );
-
- rtl::OUString aLibName( sLibName );
+ static ::rtl::OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( SVLIBRARY( "cui" ) ) );
oslModule handleMod = osl_loadModuleRelative(
&thisModule, aLibName.pData, 0 );
diff --git a/sfx2/source/appl/appmain.cxx b/sfx2/source/appl/appmain.cxx
index 854499bdd89d..00ec4e88ecdd 100644..100755
--- a/sfx2/source/appl/appmain.cxx
+++ b/sfx2/source/appl/appmain.cxx
@@ -51,7 +51,7 @@
#include <sfx2/app.hxx>
#include "arrdecl.hxx"
#include <sfx2/dispatch.hxx>
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include <sfx2/fcontnr.hxx>
#include <sfx2/viewsh.hxx>
#include "intro.hxx"
@@ -115,21 +115,6 @@ void SfxApplication::Init
<SfxApplication::OpenClients()>
*/
{
-#ifdef DDE_AVAILABLE
-#ifndef DBG_UTIL
- InitializeDde();
-#else
- if( !InitializeDde() )
- {
- ByteString aStr( "No DDE-Service possible. Error: " );
- if( GetDdeService() )
- aStr += GetDdeService()->GetError();
- else
- aStr += '?';
- DBG_ASSERT( sal_False, aStr.GetBuffer() )
- }
-#endif
-#endif
}
//--------------------------------------------------------------------
@@ -159,35 +144,6 @@ void SfxApplication::PreInit( )
{
}
-//---------------------------------------------------------------------------
-bool SfxApplication::InitLabelResMgr( const char* _pLabelPrefix, bool _bException )
-{
- bool bRet = false;
- // Label-DLL with various resources for OEM-Ver. etc. (Intro, Titel, About)
- DBG_ASSERT( _pLabelPrefix, "Wrong initialisation!" );
- if ( _pLabelPrefix )
- {
- // try to create the Label-DLL
- pAppData_Impl->pLabelResMgr = CreateResManager( _pLabelPrefix );
-
- // no separate label-DLL available?
- if ( !pAppData_Impl->pLabelResMgr )
- {
- if ( _bException )
- {
- // maybe corrupted installation
- throw (::com::sun::star::uno::RuntimeException(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("iso resource could not be loaded by SfxApplication")),
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >()));
- }
- }
- else
- bRet = true;
- }
-
- return bRet;
-}
-
void SfxApplication::Main( )
{
}
diff --git a/sfx2/source/appl/appmisc.cxx b/sfx2/source/appl/appmisc.cxx
index 50db1ffb8669..93abf1c813f8 100644..100755
--- a/sfx2/source/appl/appmisc.cxx
+++ b/sfx2/source/appl/appmisc.cxx
@@ -48,7 +48,6 @@
#include <osl/mutex.hxx>
#include <unotools/configmgr.hxx>
#include <com/sun/star/frame/XDesktop.hpp>
-
#include <unotools/ucbstreamhelper.hxx>
#include <framework/menuconfiguration.hxx>
#include <comphelper/processfactory.hxx>
@@ -56,13 +55,14 @@
#include <unotools/bootstrap.hxx>
#include <unotools/moduleoptions.hxx>
#include <osl/file.hxx>
+#include <rtl/bootstrap.hxx>
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include <sfx2/app.hxx>
#include "appdata.hxx"
#include "arrdecl.hxx"
#include <sfx2/tbxctrl.hxx>
-#include "stbitem.hxx"
+#include "sfx2/stbitem.hxx"
#include <sfx2/mnuitem.hxx>
#include <sfx2/docfac.hxx>
#include <sfx2/docfile.hxx>
@@ -152,38 +152,6 @@ SFX_IMPL_INTERFACE(SfxApplication,SfxShell,SfxResId(RID_DESKTOP))
}
//--------------------------------------------------------------------
-
-void SfxApplication::InitializeDisplayName_Impl()
-{
- SfxAppData_Impl* pAppData = Get_Impl();
- if ( !pAppData->pLabelResMgr )
- return;
-
- String aTitle = Application::GetDisplayName();
- if ( !aTitle.Len() )
- {
- osl::ClearableMutexGuard aGuard( osl::Mutex::getGlobalMutex() );
-
- // load application title
- aTitle = String( ResId( RID_APPTITLE, *pAppData->pLabelResMgr ) );
- // merge version into title
- aTitle.SearchAndReplaceAscii( "$(VER)", String() /*aVersion*/ );
-
- aGuard.clear();
-
-#ifdef DBG_UTIL
- ::rtl::OUString aDefault;
- aTitle += DEFINE_CONST_UNICODE(" [");
-
- String aVerId( utl::Bootstrap::getBuildIdData( aDefault ));
- aTitle += aVerId;
- aTitle += ']';
-#endif
- Application::SetDisplayName( aTitle );
- }
-}
-
-//--------------------------------------------------------------------
SfxProgress* SfxApplication::GetProgress() const
/* [Description]
@@ -221,8 +189,8 @@ SvUShorts* SfxApplication::GetDisabledSlotList_Impl()
pStream = ::utl::UcbStreamHelper::CreateStream( aObj.GetMainURL( INetURLObject::NO_DECODE ), STREAM_STD_READ );
}
- BOOL bSlotsEnabled = SvtInternalOptions().SlotCFGEnabled();
- BOOL bSlots = ( pStream && !pStream->GetError() );
+ sal_Bool bSlotsEnabled = SvtInternalOptions().SlotCFGEnabled();
+ sal_Bool bSlots = ( pStream && !pStream->GetError() );
if( bSlots && bSlotsEnabled )
{
// Read Slot file
@@ -288,7 +256,7 @@ SfxModule* SfxApplication::GetModule_Impl()
{
SfxModule* pModule = SfxModule::GetActiveModule();
if ( !pModule )
- pModule = SfxModule::GetActiveModule( SfxViewFrame::GetFirst( FALSE ) );
+ pModule = SfxModule::GetActiveModule( SfxViewFrame::GetFirst( sal_False ) );
if( pModule )
return pModule;
else
@@ -310,8 +278,76 @@ ISfxTemplateCommon* SfxApplication::GetCurrentTemplateCommon( SfxBindings& rBind
}
SfxResourceManager& SfxApplication::GetResourceManager() const { return *pAppData_Impl->pResMgr; }
-BOOL SfxApplication::IsDowning() const { return pAppData_Impl->bDowning; }
+sal_Bool SfxApplication::IsDowning() const { return pAppData_Impl->bDowning; }
SfxDispatcher* SfxApplication::GetAppDispatcher_Impl() { return pAppData_Impl->pAppDispat; }
SfxSlotPool& SfxApplication::GetAppSlotPool_Impl() const { return *pAppData_Impl->pSlotPool; }
+static bool impl_loadBitmap(
+ const rtl::OUString &rPath, const rtl::OUString &rBmpFileName,
+ Image &rLogo )
+{
+ rtl::OUString uri( rPath );
+ rtl::Bootstrap::expandMacros( uri );
+ INetURLObject aObj( uri );
+ aObj.insertName( rBmpFileName );
+ SvFileStream aStrm( aObj.PathToFileName(), STREAM_STD_READ );
+ if ( !aStrm.GetError() )
+ {
+ // 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;
+ }
+ return false;
+}
+
+/** loads the application logo as used in the about dialog and impress slideshow pause screen */
+Image SfxApplication::GetApplicationLogo()
+{
+ Image aAppLogo;
+
+ rtl::OUString aAbouts;
+ bool bLoaded = false;
+ sal_Int32 nIndex = 0;
+ do
+ {
+ bLoaded = impl_loadBitmap(
+ rtl::OUString::createFromAscii( "$BRAND_BASE_DIR/program" ),
+ aAbouts.getToken( 0, ',', nIndex ), aAppLogo );
+ }
+ while ( !bLoaded && ( nIndex >= 0 ) );
+
+ // fallback to "about.bmp"
+ if ( !bLoaded )
+ {
+ bLoaded = impl_loadBitmap(
+ rtl::OUString::createFromAscii( "$BRAND_BASE_DIR/program/edition" ),
+ 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.png" ), aAppLogo );
+ if ( !bLoaded )
+ bLoaded = impl_loadBitmap(
+ rtl::OUString::createFromAscii( "$BRAND_BASE_DIR/program" ),
+ rtl::OUString::createFromAscii( "about.bmp" ), aAppLogo );
+ }
+
+ return aAppLogo;
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index 25381e4571e9..20b6746476d8 100644..100755
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -99,7 +99,7 @@
#include <sfx2/passwd.hxx>
#include "referers.hxx"
#include <sfx2/request.hxx>
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include <sfx2/viewsh.hxx>
#include "app.hrc"
#include <sfx2/viewfrm.hxx>
@@ -131,20 +131,20 @@ namespace css = ::com::sun::star;
class SfxOpenDocStatusListener_Impl : public WeakImplHelper1< XDispatchResultListener >
{
public:
- BOOL bFinished;
- BOOL bSuccess;
+ sal_Bool bFinished;
+ sal_Bool bSuccess;
virtual void SAL_CALL dispatchFinished( const DispatchResultEvent& Event ) throw(RuntimeException);
virtual void SAL_CALL disposing( const EventObject& Source ) throw(RuntimeException);
SfxOpenDocStatusListener_Impl()
- : bFinished( FALSE )
- , bSuccess( FALSE )
+ : bFinished( sal_False )
+ , bSuccess( sal_False )
{}
};
void SAL_CALL SfxOpenDocStatusListener_Impl::dispatchFinished( const DispatchResultEvent& aEvent ) throw(RuntimeException)
{
bSuccess = ( aEvent.State == DispatchResultState::SUCCESS );
- bFinished = TRUE;
+ bFinished = sal_True;
}
void SAL_CALL SfxOpenDocStatusListener_Impl::disposing( const EventObject& ) throw(RuntimeException)
@@ -154,9 +154,9 @@ void SAL_CALL SfxOpenDocStatusListener_Impl::disposing( const EventObject& ) thr
SfxObjectShellRef SfxApplication::DocAlreadyLoaded
(
const String& rName, // Name of Documents including path
- BOOL bSilent, // TRUE: do not ask for a new view
- BOOL bActivate, // existing view to be activated
- BOOL bForbidVisible,
+ sal_Bool bSilent, // sal_True: do not ask for a new view
+ sal_Bool bActivate, // existing view to be activated
+ sal_Bool bForbidVisible,
const String* pPostStr
)
@@ -184,7 +184,7 @@ SfxObjectShellRef SfxApplication::DocAlreadyLoaded
// then with the normally open Documents
if ( !xDoc.Is() )
{
- xDoc = SfxObjectShell::GetFirst( 0, FALSE ); // also hidden Documents
+ xDoc = SfxObjectShell::GetFirst( 0, sal_False ); // also hidden Documents
while( xDoc.Is() )
{
if ( xDoc->GetMedium() &&
@@ -194,13 +194,13 @@ SfxObjectShellRef SfxApplication::DocAlreadyLoaded
// Comparisons between URLs
INetURLObject aUrl( xDoc->GetMedium()->GetName() );
if ( !aUrl.HasError() && aUrl == aUrlToFind &&
- (!bForbidVisible || !SfxViewFrame::GetFirst( xDoc, TRUE )) &&
+ (!bForbidVisible || !SfxViewFrame::GetFirst( xDoc, sal_True )) &&
!xDoc->IsLoading())
{
break;
}
}
- xDoc = SfxObjectShell::GetNext( *xDoc, 0, FALSE );
+ xDoc = SfxObjectShell::GetNext( *xDoc, 0, sal_False );
}
}
}
@@ -221,7 +221,7 @@ SfxObjectShellRef SfxApplication::DocAlreadyLoaded
InfoBox( 0, SfxResId(RID_DOCALREADYLOADED_DLG)).Execute();
if ( bActivate )
{
- pFrame->MakeActive_Impl( TRUE );
+ pFrame->MakeActive_Impl( sal_True );
}
}
}
@@ -239,8 +239,7 @@ void SetTemplate_Impl( const String &rFileName,
pDoc->ResetFromTemplate( rLongName, rFileName );
}
-//--------------------------------------------------------------------
-
+//====================================================================
class SfxDocPasswordVerifier : public ::comphelper::IDocPasswordVerifier
{
public:
@@ -248,21 +247,33 @@ public:
mxStorage( rxStorage ) {}
virtual ::comphelper::DocPasswordVerifierResult
- verifyPassword( const ::rtl::OUString& rPassword );
+ verifyPassword( const ::rtl::OUString& rPassword, uno::Sequence< beans::NamedValue >& o_rEncryptionData );
+ virtual ::comphelper::DocPasswordVerifierResult
+ verifyEncryptionData( const uno::Sequence< beans::NamedValue >& rEncryptionData );
+
private:
Reference< embed::XStorage > mxStorage;
};
-::comphelper::DocPasswordVerifierResult SfxDocPasswordVerifier::verifyPassword( const ::rtl::OUString& rPassword )
+//--------------------------------------------------------------------
+::comphelper::DocPasswordVerifierResult SfxDocPasswordVerifier::verifyPassword( const ::rtl::OUString& rPassword, uno::Sequence< beans::NamedValue >& o_rEncryptionData )
+{
+ o_rEncryptionData = ::comphelper::OStorageHelper::CreatePackageEncryptionData( rPassword );
+ return verifyEncryptionData( o_rEncryptionData );
+}
+
+
+//--------------------------------------------------------------------
+::comphelper::DocPasswordVerifierResult SfxDocPasswordVerifier::verifyEncryptionData( const uno::Sequence< beans::NamedValue >& rEncryptionData )
{
::comphelper::DocPasswordVerifierResult eResult = ::comphelper::DocPasswordVerifierResult_WRONG_PASSWORD;
try
{
- // check the password
- // if the password correct is the stream will be opened successfuly
+ // check the encryption data
+ // if the data correct is the stream will be opened successfuly
// and immediatelly closed
- ::comphelper::OStorageHelper::SetCommonStoragePassword( mxStorage, rPassword );
+ ::comphelper::OStorageHelper::SetCommonStorageEncryptionData( mxStorage, rEncryptionData );
mxStorage->openStreamElement(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "content.xml" ) ),
@@ -283,6 +294,8 @@ private:
return eResult;
}
+//====================================================================
+
//--------------------------------------------------------------------
sal_uInt32 CheckPasswd_Impl
@@ -300,7 +313,7 @@ sal_uInt32 CheckPasswd_Impl
If the set does not exist the it is created.
*/
{
- ULONG nRet = ERRCODE_NONE;
+ sal_uIntPtr nRet = ERRCODE_NONE;
if( ( !pFile->GetFilter() || pFile->IsStorage() ) )
{
@@ -336,14 +349,28 @@ sal_uInt32 CheckPasswd_Impl
if( xInteractionHandler.is() )
{
// use the comphelper password helper to request a password
+ ::rtl::OUString aPassword;
+ SFX_ITEMSET_ARG( pSet, pPasswordItem, SfxStringItem, SID_PASSWORD, sal_False);
+ if ( pPasswordItem )
+ aPassword = pPasswordItem->GetValue();
+
+ uno::Sequence< beans::NamedValue > aEncryptionData;
+ SFX_ITEMSET_ARG( pSet, pEncryptionDataItem, SfxUnoAnyItem, SID_ENCRYPTIONDATA, sal_False);
+ if ( pEncryptionDataItem )
+ pEncryptionDataItem->GetValue() >>= aEncryptionData;
+
::rtl::OUString aDocumentName = INetURLObject( pFile->GetOrigURL() ).GetMainURL( INetURLObject::DECODE_WITH_CHARSET );
+
SfxDocPasswordVerifier aVerifier( xStorage );
- ::rtl::OUString aPassword = ::comphelper::DocPasswordHelper::requestAndVerifyDocPassword(
- aVerifier, ::rtl::OUString(), xInteractionHandler, aDocumentName, comphelper::DocPasswordRequestType_STANDARD );
+ aEncryptionData = ::comphelper::DocPasswordHelper::requestAndVerifyDocPassword(
+ aVerifier, aEncryptionData, aPassword, xInteractionHandler, aDocumentName, comphelper::DocPasswordRequestType_STANDARD );
+
+ pSet->ClearItem( SID_PASSWORD );
+ pSet->ClearItem( SID_ENCRYPTIONDATA );
- if ( aPassword.getLength() > 0 )
+ if ( aEncryptionData.getLength() > 0 )
{
- pSet->Put( SfxStringItem( SID_PASSWORD, aPassword ) );
+ pSet->Put( SfxUnoAnyItem( SID_ENCRYPTIONDATA, uno::makeAny( aEncryptionData ) ) );
try
{
@@ -377,10 +404,10 @@ sal_uInt32 CheckPasswd_Impl
//--------------------------------------------------------------------
-ULONG SfxApplication::LoadTemplate( SfxObjectShellLock& xDoc, const String &rFileName, BOOL bCopy, SfxItemSet* pSet )
+sal_uIntPtr SfxApplication::LoadTemplate( SfxObjectShellLock& xDoc, const String &rFileName, sal_Bool bCopy, SfxItemSet* pSet )
{
const SfxFilter* pFilter = NULL;
- SfxMedium aMedium( rFileName, ( STREAM_READ | STREAM_SHARE_DENYNONE ), FALSE );
+ SfxMedium aMedium( rFileName, ( STREAM_READ | STREAM_SHARE_DENYNONE ), sal_False );
if ( !aMedium.GetStorage( sal_True ).is() )
aMedium.GetInStream();
@@ -391,8 +418,8 @@ ULONG SfxApplication::LoadTemplate( SfxObjectShellLock& xDoc, const String &rFil
return aMedium.GetErrorCode();
}
- aMedium.UseInteractionHandler( TRUE );
- ULONG nErr = GetFilterMatcher().GuessFilter( aMedium,&pFilter,SFX_FILTER_TEMPLATE, 0 );
+ aMedium.UseInteractionHandler( sal_True );
+ sal_uIntPtr nErr = GetFilterMatcher().GuessFilter( aMedium,&pFilter,SFX_FILTER_TEMPLATE, 0 );
if ( 0 != nErr)
{
delete pSet;
@@ -412,7 +439,7 @@ ULONG SfxApplication::LoadTemplate( SfxObjectShellLock& xDoc, const String &rFil
SfxStringItem aName( SID_FILE_NAME, rFileName );
SfxStringItem aReferer( SID_REFERER, String::CreateFromAscii("private:user") );
SfxStringItem aFlags( SID_OPTIONS, String::CreateFromAscii("T") );
- SfxBoolItem aHidden( SID_HIDDEN, TRUE );
+ SfxBoolItem aHidden( SID_HIDDEN, sal_True );
const SfxPoolItem *pRet = GetDispatcher_Impl()->Execute( SID_OPENDOC, SFX_CALLMODE_SYNCHRON, &aName, &aHidden, &aReferer, &aFlags, 0L );
const SfxObjectItem *pObj = PTR_CAST( SfxObjectItem, pRet );
if ( pObj )
@@ -436,7 +463,7 @@ ULONG SfxApplication::LoadTemplate( SfxObjectShellLock& xDoc, const String &rFil
if ( !xDoc.Is() )
xDoc = SfxObjectShell::CreateObject( pFilter->GetServiceName() );
- SfxMedium *pMedium = new SfxMedium( rFileName, STREAM_STD_READ, FALSE, pFilter, pSet );
+ SfxMedium *pMedium = new SfxMedium( rFileName, STREAM_STD_READ, sal_False, pFilter, pSet );
if(!xDoc->DoLoad(pMedium))
{
ErrCode nErrCode = xDoc->GetErrorCode();
@@ -477,7 +504,7 @@ ULONG SfxApplication::LoadTemplate( SfxObjectShellLock& xDoc, const String &rFil
xDoc->SetNoName();
xDoc->InvalidateName();
- xDoc->SetModified(FALSE);
+ xDoc->SetModified(sal_False);
xDoc->ResetError();
::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > xModel ( xDoc->GetModel(), ::com::sun::star::uno::UNO_QUERY );
@@ -505,7 +532,7 @@ void SfxApplication::NewDocDirectExec_Impl( SfxRequest& rReq )
{
DBG_MEMTEST();
- SFX_REQUEST_ARG( rReq, pFactoryItem, SfxStringItem, SID_NEWDOCDIRECT, FALSE);
+ SFX_REQUEST_ARG( rReq, pFactoryItem, SfxStringItem, SID_NEWDOCDIRECT, sal_False);
String aFactName;
if ( pFactoryItem )
aFactName = pFactoryItem->GetValue();
@@ -521,10 +548,10 @@ void SfxApplication::NewDocDirectExec_Impl( SfxRequest& rReq )
aReq.AppendItem( SfxStringItem( SID_TARGETNAME, String::CreateFromAscii( "_default" ) ) );
// TODO/LATER: Should the other arguments be transfered as well?
- SFX_REQUEST_ARG( rReq, pDefaultPathItem, SfxStringItem, SID_DEFAULTFILEPATH, FALSE);
+ SFX_REQUEST_ARG( rReq, pDefaultPathItem, SfxStringItem, SID_DEFAULTFILEPATH, sal_False);
if ( pDefaultPathItem )
aReq.AppendItem( *pDefaultPathItem );
- SFX_REQUEST_ARG( rReq, pDefaultNameItem, SfxStringItem, SID_DEFAULTFILENAME, FALSE);
+ SFX_REQUEST_ARG( rReq, pDefaultNameItem, SfxStringItem, SID_DEFAULTFILENAME, sal_False);
if ( pDefaultNameItem )
aReq.AppendItem( *pDefaultNameItem );
@@ -541,14 +568,14 @@ void SfxApplication::NewDocExec_Impl( SfxRequest& rReq )
DBG_MEMTEST();
// No Parameter from BASIC only Factory given?
- SFX_REQUEST_ARG(rReq, pTemplNameItem, SfxStringItem, SID_TEMPLATE_NAME, FALSE);
- SFX_REQUEST_ARG(rReq, pTemplFileNameItem, SfxStringItem, SID_FILE_NAME, FALSE);
- SFX_REQUEST_ARG(rReq, pTemplRegionNameItem, SfxStringItem, SID_TEMPLATE_REGIONNAME, FALSE);
+ SFX_REQUEST_ARG(rReq, pTemplNameItem, SfxStringItem, SID_TEMPLATE_NAME, sal_False);
+ SFX_REQUEST_ARG(rReq, pTemplFileNameItem, SfxStringItem, SID_FILE_NAME, sal_False);
+ SFX_REQUEST_ARG(rReq, pTemplRegionNameItem, SfxStringItem, SID_TEMPLATE_REGIONNAME, sal_False);
SfxObjectShellLock xDoc;
String aTemplateRegion, aTemplateName, aTemplateFileName;
- BOOL bDirect = FALSE; // through FileName instead of Region/Template
+ sal_Bool bDirect = sal_False; // through FileName instead of Region/Template
SfxErrorContext aEc(ERRCTX_SFX_NEWDOC);
if ( !pTemplNameItem && !pTemplFileNameItem )
{
@@ -589,13 +616,13 @@ void SfxApplication::NewDocExec_Impl( SfxRequest& rReq )
if ( pTemplFileNameItem )
{
aTemplateFileName = pTemplFileNameItem->GetValue();
- bDirect = TRUE;
+ bDirect = sal_True;
}
}
- ULONG lErr = 0;
+ sal_uIntPtr lErr = 0;
SfxItemSet* pSet = new SfxAllItemSet( GetPool() );
- pSet->Put( SfxBoolItem( SID_TEMPLATE, TRUE ) );
+ pSet->Put( SfxBoolItem( SID_TEMPLATE, sal_True ) );
if ( !bDirect )
{
SfxDocumentTemplates aTmpFac;
@@ -611,7 +638,7 @@ void SfxApplication::NewDocExec_Impl( SfxRequest& rReq )
if ( lErr != ERRCODE_NONE )
{
- ULONG lFatalErr = ERRCODE_TOERROR(lErr);
+ sal_uIntPtr lFatalErr = ERRCODE_TOERROR(lErr);
if ( lFatalErr )
ErrorHandler::HandleError(lErr);
}
@@ -671,8 +698,8 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
{
DBG_MEMTEST();
- USHORT nSID = rReq.GetSlot();
- SFX_REQUEST_ARG( rReq, pFileNameItem, SfxStringItem, SID_FILE_NAME, FALSE );
+ sal_uInt16 nSID = rReq.GetSlot();
+ SFX_REQUEST_ARG( rReq, pFileNameItem, SfxStringItem, SID_FILE_NAME, sal_False );
if ( pFileNameItem )
{
String aCommand( pFileNameItem->GetValue() );
@@ -686,7 +713,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
sal_Int32 nIndex = aCommand.SearchAscii("slot:");
if ( !nIndex )
{
- USHORT nSlotId = (USHORT) String( aCommand, 5, aCommand.Len()-5 ).ToInt32();
+ sal_uInt16 nSlotId = (sal_uInt16) String( aCommand, 5, aCommand.Len()-5 ).ToInt32();
if ( nSlotId == SID_OPENDOC )
pFileNameItem = NULL;
}
@@ -700,7 +727,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
String aFilter;
SfxItemSet* pSet = NULL;
String aPath;
- SFX_REQUEST_ARG( rReq, pFolderNameItem, SfxStringItem, SID_PATH, FALSE );
+ SFX_REQUEST_ARG( rReq, pFolderNameItem, SfxStringItem, SID_PATH, sal_False );
if ( pFolderNameItem )
aPath = pFolderNameItem->GetValue();
else if ( nSID == SID_OPENTEMPLATE )
@@ -714,24 +741,24 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
}
sal_Int16 nDialog = SFX2_IMPL_DIALOG_CONFIG;
- SFX_REQUEST_ARG( rReq, pSystemDialogItem, SfxBoolItem, SID_FILE_DIALOG, FALSE );
+ SFX_REQUEST_ARG( rReq, pSystemDialogItem, SfxBoolItem, SID_FILE_DIALOG, sal_False );
if ( pSystemDialogItem )
nDialog = pSystemDialogItem->GetValue() ? SFX2_IMPL_DIALOG_SYSTEM : SFX2_IMPL_DIALOG_OOO;
String sStandardDir;
- SFX_REQUEST_ARG( rReq, pStandardDirItem, SfxStringItem, SID_STANDARD_DIR, FALSE );
+ SFX_REQUEST_ARG( rReq, pStandardDirItem, SfxStringItem, SID_STANDARD_DIR, sal_False );
if ( pStandardDirItem )
sStandardDir = pStandardDirItem->GetValue();
::com::sun::star::uno::Sequence< ::rtl::OUString > aBlackList;
- SFX_REQUEST_ARG( rReq, pBlackListItem, SfxStringListItem, SID_BLACK_LIST, FALSE );
+ SFX_REQUEST_ARG( rReq, pBlackListItem, SfxStringListItem, SID_BLACK_LIST, sal_False );
if ( pBlackListItem )
pBlackListItem->GetStringList( aBlackList );
- ULONG nErr = sfx2::FileOpenDialog_Impl(
+ sal_uIntPtr nErr = sfx2::FileOpenDialog_Impl(
WB_OPEN | SFXWB_MULTISELECTION | SFXWB_SHOWVERSIONS, String(), pURLList, aFilter, pSet, &aPath, nDialog, sStandardDir, aBlackList );
if ( nErr == ERRCODE_ABORT )
@@ -750,7 +777,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
if ( pURLList->Count() )
{
if ( nSID == SID_OPENTEMPLATE )
- rReq.AppendItem( SfxBoolItem( SID_TEMPLATE, FALSE ) );
+ rReq.AppendItem( SfxBoolItem( SID_TEMPLATE, sal_False ) );
// This helper wraps an existing (or may new created InteractionHandler)
// intercept all incoming interactions and provide usefull informations
@@ -761,7 +788,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
css::uno::Reference< css::task::XInteractionHandler > xWrappedHandler;
// wrap existing handler or create new UUI handler
- SFX_REQUEST_ARG(rReq, pInteractionItem, SfxUnoAnyItem, SID_INTERACTIONHANDLER, FALSE);
+ SFX_REQUEST_ARG(rReq, pInteractionItem, SfxUnoAnyItem, SID_INTERACTIONHANDLER, sal_False);
if (pInteractionItem)
{
pInteractionItem->GetValue() >>= xWrappedHandler;
@@ -778,7 +805,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
::framework::PreventDuplicateInteraction::InteractionInfo aRule (aInteraction, 1);
pHandler->addInteractionRule(aRule);
- for ( USHORT i = 0; i < pURLList->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pURLList->Count(); ++i )
{
String aURL = *(pURLList->GetObject(i));
rReq.RemoveItem( SID_FILE_NAME );
@@ -824,7 +851,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
// return;
}
- BOOL bHyperlinkUsed = FALSE;
+ sal_Bool bHyperlinkUsed = sal_False;
if ( SID_OPENURL == nSID )
{
@@ -834,7 +861,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
}
else if ( nSID == SID_OPENTEMPLATE )
{
- rReq.AppendItem( SfxBoolItem( SID_TEMPLATE, FALSE ) );
+ rReq.AppendItem( SfxBoolItem( SID_TEMPLATE, sal_False ) );
}
// pass URL to OS by using ShellExecuter or open it internal
// if it seams to be an own format.
@@ -847,28 +874,28 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
{
rReq.SetSlot( SID_OPENDOC );
nSID = SID_OPENDOC;
- bHyperlinkUsed = TRUE;
+ bHyperlinkUsed = sal_True;
}
// no else here! It's optional ...
if (!bHyperlinkUsed)
{
- SFX_REQUEST_ARG(rReq, pHyperLinkUsedItem, SfxBoolItem, SID_BROWSE, FALSE);
+ SFX_REQUEST_ARG(rReq, pHyperLinkUsedItem, SfxBoolItem, SID_BROWSE, sal_False);
if ( pHyperLinkUsedItem )
bHyperlinkUsed = pHyperLinkUsedItem->GetValue();
// no "official" item, so remove it from ItemSet before using UNO-API
rReq.RemoveItem( SID_BROWSE );
}
- SFX_REQUEST_ARG( rReq, pFileName, SfxStringItem, SID_FILE_NAME, FALSE );
+ SFX_REQUEST_ARG( rReq, pFileName, SfxStringItem, SID_FILE_NAME, sal_False );
String aFileName = pFileName->GetValue();
String aReferer;
- SFX_REQUEST_ARG( rReq, pRefererItem, SfxStringItem, SID_REFERER, FALSE );
+ SFX_REQUEST_ARG( rReq, pRefererItem, SfxStringItem, SID_REFERER, sal_False );
if ( pRefererItem )
aReferer = pRefererItem->GetValue();
- SFX_REQUEST_ARG( rReq, pFileFlagsItem, SfxStringItem, SID_OPTIONS, FALSE);
+ SFX_REQUEST_ARG( rReq, pFileFlagsItem, SfxStringItem, SID_OPTIONS, sal_False);
if ( pFileFlagsItem )
{
String aFileFlags = pFileFlagsItem->GetValue();
@@ -876,25 +903,25 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
if ( STRING_NOTFOUND != aFileFlags.Search( 0x0054 ) ) // T = 54h
{
rReq.RemoveItem( SID_TEMPLATE );
- rReq.AppendItem( SfxBoolItem( SID_TEMPLATE, TRUE ) );
+ rReq.AppendItem( SfxBoolItem( SID_TEMPLATE, sal_True ) );
}
if ( STRING_NOTFOUND != aFileFlags.Search( 0x0048 ) ) // H = 48h
{
rReq.RemoveItem( SID_HIDDEN );
- rReq.AppendItem( SfxBoolItem( SID_HIDDEN, TRUE ) );
+ rReq.AppendItem( SfxBoolItem( SID_HIDDEN, sal_True ) );
}
if ( STRING_NOTFOUND != aFileFlags.Search( 0x0052 ) ) // R = 52h
{
rReq.RemoveItem( SID_DOC_READONLY );
- rReq.AppendItem( SfxBoolItem( SID_DOC_READONLY, TRUE ) );
+ rReq.AppendItem( SfxBoolItem( SID_DOC_READONLY, sal_True ) );
}
if ( STRING_NOTFOUND != aFileFlags.Search( 0x0042 ) ) // B = 42h
{
rReq.RemoveItem( SID_PREVIEW );
- rReq.AppendItem( SfxBoolItem( SID_PREVIEW, TRUE ) );
+ rReq.AppendItem( SfxBoolItem( SID_PREVIEW, sal_True ) );
}
rReq.RemoveItem( SID_OPTIONS );
@@ -1030,7 +1057,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
if ( !bFound )
{
- BOOL bLoadInternal = FALSE;
+ sal_Bool bLoadInternal = sal_False;
// security reservation: => we have to check the referer before executing
if (SFX_APP()->IsSecureURL(rtl::OUString(), &aReferer))
@@ -1060,7 +1087,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
{
rReq.RemoveItem( SID_TARGETNAME );
rReq.AppendItem( SfxStringItem( SID_TARGETNAME, String::CreateFromAscii("_default") ) );
- bLoadInternal = TRUE;
+ bLoadInternal = sal_True;
}
}
}
@@ -1095,13 +1122,13 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
SfxFrame* pTargetFrame = NULL;
Reference< XFrame > xTargetFrame;
- SFX_REQUEST_ARG(rReq, pFrameItem, SfxFrameItem, SID_DOCFRAME, FALSE);
+ SFX_REQUEST_ARG(rReq, pFrameItem, SfxFrameItem, SID_DOCFRAME, sal_False);
if ( pFrameItem )
pTargetFrame = pFrameItem->GetFrame();
if ( !pTargetFrame )
{
- SFX_REQUEST_ARG(rReq, pUnoFrameItem, SfxUnoFrameItem, SID_FILLFRAME, FALSE);
+ SFX_REQUEST_ARG(rReq, pUnoFrameItem, SfxUnoFrameItem, SID_FILLFRAME, sal_False);
if ( pUnoFrameItem )
xTargetFrame = pUnoFrameItem->GetFrame();
}
@@ -1110,7 +1137,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
pTargetFrame = &SfxViewFrame::Current()->GetFrame();
// check if caller has set a callback
- SFX_REQUEST_ARG(rReq, pLinkItem, SfxLinkItem, SID_DONELINK, FALSE );
+ SFX_REQUEST_ARG(rReq, pLinkItem, SfxLinkItem, SID_DONELINK, sal_False );
// remove from Itemset, because it confuses the parameter transformation
if ( pLinkItem )
@@ -1119,20 +1146,20 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
rReq.RemoveItem( SID_DONELINK );
// check if the view must be hidden
- BOOL bHidden = FALSE;
- SFX_REQUEST_ARG(rReq, pHidItem, SfxBoolItem, SID_HIDDEN, FALSE);
+ sal_Bool bHidden = sal_False;
+ SFX_REQUEST_ARG(rReq, pHidItem, SfxBoolItem, SID_HIDDEN, sal_False);
if ( pHidItem )
bHidden = pHidItem->GetValue();
// This request is a UI call. We have to set the right values inside the MediaDescriptor
// for: InteractionHandler, StatusIndicator, MacroExecutionMode and DocTemplate.
// But we have to look for already existing values or for real hidden requests.
- SFX_REQUEST_ARG(rReq, pPreviewItem, SfxBoolItem, SID_PREVIEW, FALSE);
+ SFX_REQUEST_ARG(rReq, pPreviewItem, SfxBoolItem, SID_PREVIEW, sal_False);
if (!bHidden && ( !pPreviewItem || !pPreviewItem->GetValue() ) )
{
- SFX_REQUEST_ARG(rReq, pInteractionItem, SfxUnoAnyItem, SID_INTERACTIONHANDLER, FALSE);
- SFX_REQUEST_ARG(rReq, pMacroExecItem , SfxUInt16Item, SID_MACROEXECMODE , FALSE);
- SFX_REQUEST_ARG(rReq, pDocTemplateItem, SfxUInt16Item, SID_UPDATEDOCMODE , FALSE);
+ SFX_REQUEST_ARG(rReq, pInteractionItem, SfxUnoAnyItem, SID_INTERACTIONHANDLER, sal_False);
+ SFX_REQUEST_ARG(rReq, pMacroExecItem , SfxUInt16Item, SID_MACROEXECMODE , sal_False);
+ SFX_REQUEST_ARG(rReq, pDocTemplateItem, SfxUInt16Item, SID_UPDATEDOCMODE , sal_False);
if (!pInteractionItem)
{
@@ -1148,12 +1175,12 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
// extract target name
::rtl::OUString aTarget;
- SFX_REQUEST_ARG(rReq, pTargetItem, SfxStringItem, SID_TARGETNAME, FALSE);
+ SFX_REQUEST_ARG(rReq, pTargetItem, SfxStringItem, SID_TARGETNAME, sal_False);
if ( pTargetItem )
aTarget = pTargetItem->GetValue();
else
{
- SFX_REQUEST_ARG( rReq, pNewViewItem, SfxBoolItem, SID_OPEN_NEW_VIEW, FALSE );
+ SFX_REQUEST_ARG( rReq, pNewViewItem, SfxBoolItem, SID_OPEN_NEW_VIEW, sal_False );
if ( pNewViewItem && pNewViewItem->GetValue() )
aTarget = String::CreateFromAscii("_blank" );
}
@@ -1180,7 +1207,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
}
// make URL ready
- SFX_REQUEST_ARG( rReq, pURLItem, SfxStringItem, SID_FILE_NAME, FALSE );
+ SFX_REQUEST_ARG( rReq, pURLItem, SfxStringItem, SID_FILE_NAME, sal_False );
aFileName = pURLItem->GetValue();
if( aFileName.Len() && aFileName.GetChar(0) == '#' ) // Mark without URL
{
@@ -1240,7 +1267,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
{
// try to find the SfxFrame for the controller
SfxFrame* pCntrFrame = NULL;
- for ( SfxViewShell* pShell = SfxViewShell::GetFirst( 0, FALSE ); pShell; pShell = SfxViewShell::GetNext( *pShell, 0, FALSE ) )
+ for ( SfxViewShell* pShell = SfxViewShell::GetFirst( 0, sal_False ); pShell; pShell = SfxViewShell::GetNext( *pShell, 0, sal_False ) )
{
if ( pShell->GetController() == xController )
{
diff --git a/sfx2/source/appl/appquit.cxx b/sfx2/source/appl/appquit.cxx
index 06d1359ea074..993406e41399 100644..100755
--- a/sfx2/source/appl/appquit.cxx
+++ b/sfx2/source/appl/appquit.cxx
@@ -31,9 +31,6 @@
#include <basic/basmgr.hxx>
#include <basic/sbstar.hxx>
-#ifdef WIN
-#define _TL_LANG_SPECIAL
-#endif
#include <svl/svdde.hxx>
#include <vcl/msgbox.hxx>
#include <svl/eitem.hxx>
@@ -43,15 +40,15 @@
#include "app.hrc"
#include <sfx2/app.hxx>
+#include <sfx2/evntconf.hxx>
#include <sfx2/unoctitm.hxx>
#include "appdata.hxx"
#include <sfx2/viewsh.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/printer.hxx>
#include "arrdecl.hxx"
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include <sfx2/event.hxx>
-#include <sfx2/macrconf.hxx>
#include <sfx2/mnumgr.hxx>
#include <sfx2/templdlg.hxx>
#include <sfx2/msgpool.hxx>
@@ -71,9 +68,9 @@
using ::basic::BasicManagerRepository;
//===================================================================
-BOOL SfxApplication::QueryExit_Impl()
+sal_Bool SfxApplication::QueryExit_Impl()
{
- BOOL bQuit = TRUE;
+ sal_Bool bQuit = sal_True;
// Does some instance, that can not be shut down, still require the app?
if ( !bQuit )
@@ -81,11 +78,11 @@ BOOL SfxApplication::QueryExit_Impl()
// Not really exit, only minimize
InfoBox aInfoBox( NULL, SfxResId(MSG_CANT_QUIT) );
aInfoBox.Execute();
- OSL_TRACE( "QueryExit => FALSE (in use)" );
- return FALSE;
+ OSL_TRACE( "QueryExit => sal_False (in use)" );
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
//-------------------------------------------------------------------------
@@ -104,7 +101,7 @@ void SfxApplication::Deinitialize()
SaveBasicAndDialogContainer();
- pAppData_Impl->bDowning = TRUE; // due to Timer from DecAliveCount and QueryExit
+ pAppData_Impl->bDowning = sal_True; // due to Timer from DecAliveCount and QueryExit
DELETEZ( pAppData_Impl->pTemplates );
@@ -112,15 +109,15 @@ void SfxApplication::Deinitialize()
// this method. Therefore this call makes no sense and is the source of
// some stack traces, which we don't understand.
// For more information see:
- pAppData_Impl->bDowning = FALSE;
+ pAppData_Impl->bDowning = sal_False;
DBG_ASSERT( !SfxViewFrame::GetFirst(),
"existing SfxViewFrame after Execute" );
DBG_ASSERT( !SfxObjectShell::GetFirst(),
"existing SfxObjectShell after Execute" );
pAppData_Impl->pAppDispat->Pop( *this, SFX_SHELL_POP_UNTIL );
pAppData_Impl->pAppDispat->Flush();
- pAppData_Impl->bDowning = TRUE;
- pAppData_Impl->pAppDispat->DoDeactivate_Impl( TRUE, NULL );
+ pAppData_Impl->bDowning = sal_True;
+ pAppData_Impl->pAppDispat->DoDeactivate_Impl( sal_True, NULL );
// call derived application-exit
Exit();
@@ -143,11 +140,7 @@ void SfxApplication::Deinitialize()
// from here no SvObjects have to exists
DELETEZ(pAppData_Impl->pMatcher);
- delete pAppData_Impl->pLabelResMgr;
-
DELETEX(pAppData_Impl->pSlotPool);
- DELETEX(pAppData_Impl->pEventConfig);
- SfxMacroConfig::Release_Impl();
DELETEX(pAppData_Impl->pFactArr);
DELETEX(pAppData_Impl->pInitLinkList);
diff --git a/sfx2/source/appl/appreg.cxx b/sfx2/source/appl/appreg.cxx
index f80f3895d6e5..743c783471a3 100644..100755
--- a/sfx2/source/appl/appreg.cxx
+++ b/sfx2/source/appl/appreg.cxx
@@ -34,11 +34,11 @@
#include <sfx2/app.hxx>
#include "appdata.hxx"
#include "arrdecl.hxx"
-#include "sfxhelp.hxx"
+#include "sfx2/sfxhelp.hxx"
#include <sfx2/templdlg.hxx>
#include "objmnctl.hxx"
#include "inettbc.hxx"
-#include "stbitem.hxx"
+#include "sfx2/stbitem.hxx"
#include <sfx2/navigat.hxx>
#include <sfx2/taskpane.hxx>
#include <sfx2/module.hxx>
@@ -63,9 +63,9 @@ void SfxApplication::Registrations_Impl()
// ChildWindows
SfxRecordingFloatWrapper_Impl::RegisterChildWindow();
- SfxNavigatorWrapper::RegisterChildWindow( FALSE, NULL, SFX_CHILDWIN_NEVERHIDE );
+ SfxNavigatorWrapper::RegisterChildWindow( sal_False, NULL, SFX_CHILDWIN_NEVERHIDE );
SfxPartChildWnd_Impl::RegisterChildWindow();
- SfxTemplateDialogWrapper::RegisterChildWindow(TRUE);
+ SfxTemplateDialogWrapper::RegisterChildWindow(sal_True);
SfxDockingWrapper::RegisterChildWindow();
// Controller
@@ -86,7 +86,7 @@ void SfxApplication::RegisterToolBoxControl_Impl( SfxModule *pMod, SfxTbxCtrlFac
}
#ifdef DBG_UTIL
- for ( USHORT n=0; n<pAppData_Impl->pTbxCtrlFac->Count(); n++ )
+ for ( sal_uInt16 n=0; n<pAppData_Impl->pTbxCtrlFac->Count(); n++ )
{
SfxTbxCtrlFactory *pF = (*pAppData_Impl->pTbxCtrlFac)[n];
if ( pF->nTypeId && pF->nTypeId == pFact->nTypeId &&
@@ -111,7 +111,7 @@ void SfxApplication::RegisterStatusBarControl_Impl( SfxModule *pMod, SfxStbCtrlF
}
#ifdef DBG_UTIL
- for ( USHORT n=0; n<pAppData_Impl->pStbCtrlFac->Count(); n++ )
+ for ( sal_uInt16 n=0; n<pAppData_Impl->pStbCtrlFac->Count(); n++ )
{
SfxStbCtrlFactory *pF = (*pAppData_Impl->pStbCtrlFac)[n];
if ( pF->nTypeId && pF->nTypeId == pFact->nTypeId &&
@@ -136,7 +136,7 @@ void SfxApplication::RegisterMenuControl_Impl( SfxModule *pMod, SfxMenuCtrlFacto
}
#ifdef DBG_UTIL
- for ( USHORT n=0; n<pAppData_Impl->pMenuCtrlFac->Count(); n++ )
+ for ( sal_uInt16 n=0; n<pAppData_Impl->pMenuCtrlFac->Count(); n++ )
{
SfxMenuCtrlFactory *pF = (*pAppData_Impl->pMenuCtrlFac)[n];
if ( pF->nTypeId && pF->nTypeId == pFact->nTypeId &&
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index ce56b6cc7e27..e3c7fd09be5c 100644..100755
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -91,7 +91,6 @@
#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>
@@ -111,19 +110,17 @@
#include <sfx2/new.hxx>
#include <sfx2/templdlg.hxx>
#include "sfxtypes.hxx"
-#include "sfxbasic.hxx"
#include <sfx2/tabdlg.hxx>
#include "arrdecl.hxx"
#include "fltfnc.hxx"
#include <sfx2/sfx.hrc>
#include "app.hrc"
#include <sfx2/passwd.hxx>
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include "arrdecl.hxx"
#include <sfx2/childwin.hxx>
#include "appdata.hxx"
-#include <sfx2/macrconf.hxx>
-#include "minfitem.hxx"
+#include "sfx2/minfitem.hxx"
#include <sfx2/event.hxx>
#include <sfx2/module.hxx>
#include <sfx2/viewfrm.hxx>
@@ -132,7 +129,8 @@
#include <sfx2/sfxdlg.hxx>
#include <sfx2/dialogs.hrc>
#include "sorgitm.hxx"
-#include "sfxhelp.hxx"
+#include "sfx2/sfxhelp.hxx"
+#include <tools/svlibrary.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::beans;
@@ -230,7 +228,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
continue;
if ( pObjSh->PrepareClose(2) )
- pObjSh->SetModified( FALSE );
+ pObjSh->SetModified( sal_False );
else
return;
}
@@ -251,21 +249,21 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
if this dialog is closed by the user ...
So we ignore this request now and wait for a new user decision.
*/
- OSL_TRACE( "QueryExit => FALSE (DispatchLevel == %u)", Application::GetDispatchLevel() );
+ OSL_TRACE( "QueryExit => sal_False (DispatchLevel == %u)", Application::GetDispatchLevel() );
return;
}
// block reentrant calls
- pAppData_Impl->bInQuit = TRUE;
+ pAppData_Impl->bInQuit = sal_True;
Reference < XDesktop > xDesktop ( ::comphelper::getProcessServiceFactory()->createInstance( DEFINE_CONST_UNICODE("com.sun.star.frame.Desktop") ), UNO_QUERY );
rReq.ForgetAllArgs();
- // if terminate() failed, pAppData_Impl->bInQuit will now be FALSE, allowing further calls of SID_QUITAPP
- BOOL bTerminated = xDesktop->terminate();
+ // if terminate() failed, pAppData_Impl->bInQuit will now be sal_False, allowing further calls of SID_QUITAPP
+ sal_Bool bTerminated = xDesktop->terminate();
if (!bTerminated)
// if terminate() was successful, SfxApplication is now dead!
- pAppData_Impl->bInQuit = FALSE;
+ pAppData_Impl->bInQuit = sal_False;
// Set return value, terminate if possible
rReq.SetReturnValue( SfxBoolItem( rReq.GetSlot(), bTerminated ) );
@@ -298,7 +296,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
Reference< XFrame > xFrame;
const SfxItemSet* pIntSet = rReq.GetInternalArgs_Impl();
- SFX_ITEMSET_ARG( pIntSet, pFrameItem, SfxUnoFrameItem, SID_FILLFRAME, FALSE );
+ SFX_ITEMSET_ARG( pIntSet, pFrameItem, SfxUnoFrameItem, SID_FILLFRAME, sal_False );
if ( pFrameItem )
xFrame = pFrameItem->GetFrame();
@@ -348,7 +346,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
}
while( sal_True );
- BOOL bOk = ( n == 0);
+ sal_Bool bOk = ( n == 0);
rReq.SetReturnValue( SfxBoolItem( 0, bOk ) );
bDone = true;
break;
@@ -356,7 +354,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
case SID_SAVEDOCS:
{
- BOOL bOK = TRUE;
+ sal_Bool bOK = sal_True;
for ( SfxObjectShell *pObjSh = SfxObjectShell::GetFirst();
pObjSh;
pObjSh = SfxObjectShell::GetNext( *pObjSh ) )
@@ -367,7 +365,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
pObjSh->ExecuteSlot( aReq );
SfxBoolItem *pItem = PTR_CAST( SfxBoolItem, aReq.GetReturnValue() );
if ( !pItem || !pItem->GetValue() )
- bOK = FALSE;
+ bOK = sal_False;
}
}
@@ -430,8 +428,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
Help* pHelp = Application::GetHelp();
if ( pHelp )
{
- ULONG nHelpId = 0;
- pHelp->Start( nHelpId, NULL ); // show start page
+ pHelp->Start( String::CreateFromAscii(".uno:HelpIndex"), NULL ); // show start page
bDone = true;
}
break;
@@ -441,7 +438,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
case SID_HELPTIPS:
{
// Evaluate Parameter
- SFX_REQUEST_ARG(rReq, pOnItem, SfxBoolItem, SID_HELPTIPS, FALSE);
+ SFX_REQUEST_ARG(rReq, pOnItem, SfxBoolItem, SID_HELPTIPS, sal_False);
bool bOn = pOnItem
? ((SfxBoolItem*)pOnItem)->GetValue()
: !Help::IsQuickHelpEnabled();
@@ -468,7 +465,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
case SID_HELPBALLOONS:
{
// Evaluate Parameter
- SFX_REQUEST_ARG(rReq, pOnItem, SfxBoolItem, SID_HELPBALLOONS, FALSE);
+ SFX_REQUEST_ARG(rReq, pOnItem, SfxBoolItem, SID_HELPBALLOONS, sal_False);
bool bOn = pOnItem
? ((SfxBoolItem*)pOnItem)->GetValue()
: !Help::IsBalloonHelpEnabled();
@@ -491,7 +488,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
case SID_HELP_PI:
{
SvtHelpOptions aHelpOpt;
- SFX_REQUEST_ARG(rReq, pOnItem, SfxBoolItem, SID_HELP_PI, FALSE);
+ SFX_REQUEST_ARG(rReq, pOnItem, SfxBoolItem, SID_HELP_PI, sal_False);
sal_Bool bOn = pOnItem
? ((SfxBoolItem*)pOnItem)->GetValue()
: !aHelpOpt.IsHelpAgentAutoStartMode();
@@ -504,85 +501,14 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
case SID_ABOUT:
{
- const String sCWSSchema( String::CreateFromAscii( "[CWS:" ) );
- rtl::OUString sDefault;
- String sBuildId( utl::Bootstrap::getBuildIdData( sDefault ) );
- OSL_ENSURE( sBuildId.Len() > 0, "No BUILDID in bootstrap file" );
- if ( sBuildId.Len() > 0 && sBuildId.Search( sCWSSchema ) == STRING_NOTFOUND )
- {
- // no cws part in brand buildid -> try basis buildid
- rtl::OUString sBasisBuildId( DEFINE_CONST_OUSTRING(
- "${$OOO_BASE_DIR/program/" SAL_CONFIGFILE("version") ":buildid}" ) );
- rtl::Bootstrap::expandMacros( sBasisBuildId );
- sal_Int32 nIndex = sBasisBuildId.indexOf( sCWSSchema );
- if ( nIndex != -1 )
- sBuildId += String( sBasisBuildId.copy( nIndex ) );
- }
-
- String sProductSource( utl::Bootstrap::getProductSource( sDefault ) );
- OSL_ENSURE( sProductSource.Len() > 0, "No ProductSource in bootstrap file" );
-
- // the product source is something like "DEV300", where the
- // build id is something like "300m12(Build:12345)". For better readability,
- // strip the duplicate UPD ("300").
- if ( sProductSource.Len() )
- {
- bool bMatchingUPD =
- ( sProductSource.Len() >= 3 )
- && ( sBuildId.Len() >= 3 )
- && ( sProductSource.Copy( sProductSource.Len() - 3 ) == sBuildId.Copy( 0, 3 ) );
- OSL_ENSURE( bMatchingUPD, "BUILDID and ProductSource do not match in their UPD" );
- if ( bMatchingUPD )
- sProductSource = sProductSource.Copy( 0, sProductSource.Len() - 3 );
-
- // prepend the product source
- sBuildId.Insert( sProductSource, 0 );
- }
-
- // Version information (in about box) (#i94693#)
- /* if the build ids of the basis or ure layer are different from the build id
- * of the brand layer then show them */
- rtl::OUString aBasisProductBuildId( DEFINE_CONST_OUSTRING(
- "${$OOO_BASE_DIR/program/" SAL_CONFIGFILE("version") ":ProductBuildid}" ) );
- rtl::Bootstrap::expandMacros( aBasisProductBuildId );
- rtl::OUString aUREProductBuildId( DEFINE_CONST_OUSTRING(
- "${$URE_BIN_DIR/" SAL_CONFIGFILE("version") ":ProductBuildid}" ) );
- rtl::Bootstrap::expandMacros( aUREProductBuildId );
- if ( sBuildId.Search( String( aBasisProductBuildId ) ) == STRING_NOTFOUND
- || sBuildId.Search( String( aUREProductBuildId ) ) == STRING_NOTFOUND )
- {
- String sTemp( '-' );
- sTemp += String( aBasisProductBuildId );
- sTemp += '-';
- sTemp += String( aUREProductBuildId );
- sBuildId.Insert( sTemp, sBuildId.Search( ')' ) );
- }
-
- // the build id format is "milestone(build)[cwsname]". For readability, it would
- // be nice to have some more spaces in there.
- xub_StrLen nPos = 0;
- if ( ( nPos = sBuildId.Search( sal_Unicode( '(' ) ) ) != STRING_NOTFOUND )
- sBuildId.Insert( sal_Unicode( ' ' ), nPos );
- if ( ( nPos = sBuildId.Search( sal_Unicode( '[' ) ) ) != STRING_NOTFOUND )
- sBuildId.Insert( sal_Unicode( ' ' ), nPos );
-
- // search for the resource of the about box
- ResId aDialogResId( RID_DEFAULTABOUT, *pAppData_Impl->pLabelResMgr );
- ResMgr* pResMgr = pAppData_Impl->pLabelResMgr;
- if( ! pResMgr->IsAvailable( aDialogResId.SetRT( RSC_MODALDIALOG ) ) )
- pResMgr = GetOffResManager_Impl();
-
- aDialogResId.SetResMgr( pResMgr );
- if ( !pResMgr->IsAvailable( aDialogResId ) )
+ SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
+ if ( pFact )
{
- DBG_ERRORFILE( "No RID_DEFAULTABOUT in label-resource-dll" );
- }
-
- // then show the about box
- AboutDialog* pDlg = new AboutDialog( 0, aDialogResId, sBuildId );
- pDlg->Execute();
- delete pDlg;
+ VclAbstractDialog* pDlg = pFact->CreateVclDialog( 0, RID_DEFAULTABOUT );
+ pDlg->Execute();
+ delete pDlg;
bDone = true;
+ }
break;
}
@@ -629,7 +555,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
TYPE(SfxBoolItem)));
bool bShow = pItem == 0
? !pAppData_Impl->m_xImeStatusWindow->isShowing()
- : ( pItem->GetValue() == TRUE );
+ : ( pItem->GetValue() == sal_True );
pAppData_Impl->m_xImeStatusWindow->show(bShow);
if (pItem == 0)
rReq.AppendItem(SfxBoolItem(SID_SHOW_IME_STATUS_WINDOW,
@@ -676,7 +602,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
// Evaluate Parameter
rtl::OUString aToolbarName( aBuf.makeStringAndClear() );
- BOOL bShow( !xLayoutManager->isElementVisible( aToolbarName ));
+ sal_Bool bShow( !xLayoutManager->isElementVisible( aToolbarName ));
if ( bShow )
{
@@ -707,11 +633,11 @@ void SfxApplication::MiscState_Impl(SfxItemSet &rSet)
DBG_MEMTEST();
LocaleDataWrapper aLocaleWrapper( ::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLocale() );
- const USHORT *pRanges = rSet.GetRanges();
+ const sal_uInt16 *pRanges = rSet.GetRanges();
DBG_ASSERT(pRanges && *pRanges, "Set without range");
while ( *pRanges )
{
- for(USHORT nWhich = *pRanges++; nWhich <= *pRanges; ++nWhich)
+ for(sal_uInt16 nWhich = *pRanges++; nWhich <= *pRanges; ++nWhich)
{
switch(nWhich)
{
@@ -779,14 +705,14 @@ void SfxApplication::MiscState_Impl(SfxItemSet &rSet)
case SID_SAVEDOCS:
{
- BOOL bModified = FALSE;
+ sal_Bool bModified = sal_False;
for ( SfxObjectShell *pObjSh = SfxObjectShell::GetFirst();
pObjSh;
pObjSh = SfxObjectShell::GetNext( *pObjSh ) )
{
if ( pObjSh->IsModified() )
{
- bModified = TRUE;
+ bModified = sal_True;
break;
}
}
@@ -821,20 +747,18 @@ static const ::rtl::OUString& getProductRegistrationServiceName( )
return s_sServiceName;
}
-typedef rtl_uString* (SAL_CALL *basicide_choose_macro)(XModel*, BOOL, rtl_uString*);
-typedef void (SAL_CALL *basicide_macro_organizer)( INT16 );
+typedef rtl_uString* (SAL_CALL *basicide_choose_macro)(XModel*, sal_Bool, rtl_uString*);
+typedef void (SAL_CALL *basicide_macro_organizer)( sal_Int16 );
#define DOSTRING( x ) #x
#define STRING( x ) DOSTRING( x )
extern "C" { static void SAL_CALL thisModule() {} }
-::rtl::OUString ChooseMacro( const Reference< XModel >& rxLimitToDocument, BOOL bChooseOnly, const ::rtl::OUString& rMacroDesc = ::rtl::OUString() )
+::rtl::OUString ChooseMacro( const Reference< XModel >& rxLimitToDocument, sal_Bool bChooseOnly, const ::rtl::OUString& rMacroDesc = ::rtl::OUString() )
{
// get basctl dllname
- String sLibName = String::CreateFromAscii( STRING( DLL_NAME ) );
- sLibName.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "sfx" ) ), String( RTL_CONSTASCII_USTRINGPARAM( "basctl" ) ) );
- ::rtl::OUString aLibName( sLibName );
+ static ::rtl::OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( SVLIBRARY( "basctl" ) ) );
// load module
oslModule handleMod = osl_loadModuleRelative(
@@ -851,12 +775,10 @@ extern "C" { static void SAL_CALL thisModule() {} }
return aScriptURL;
}
-void MacroOrganizer( INT16 nTabId )
+void MacroOrganizer( sal_Int16 nTabId )
{
// get basctl dllname
- String sLibName = String::CreateFromAscii( STRING( DLL_NAME ) );
- sLibName.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "sfx" ) ), String( RTL_CONSTASCII_USTRINGPARAM( "basctl" ) ) );
- ::rtl::OUString aLibName( sLibName );
+ static ::rtl::OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( SVLIBRARY( "basctl" ) ) );
// load module
oslModule handleMod = osl_loadModuleRelative(
@@ -1017,7 +939,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
if (pObjSh)
pObjSh->SetConfigOptionsChecked(false);
}
- pView->GetBindings().InvalidateAll(FALSE);
+ pView->GetBindings().InvalidateAll(sal_False);
pView = SfxViewFrame::GetNext( *pView );
}
}
@@ -1100,7 +1022,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
{
SfxObjectShell* pBasicIDE = SfxObjectShell::CreateObject( lcl_getBasicIDEServiceName() );
pBasicIDE->DoInitNew( 0 );
- pBasicIDE->SetModified( FALSE );
+ pBasicIDE->SetModified( sal_False );
try
{
// load the Basic IDE via direct access to the SFX frame loader. A generic loadComponentFromURL
@@ -1157,15 +1079,15 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
{
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
- BOOL bChooseOnly = FALSE;
+ sal_Bool bChooseOnly = sal_False;
Reference< XModel > xLimitToModel;
if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_RECORDMACRO, sal_False, &pItem) )
{
- BOOL bRecord = ((SfxBoolItem*)pItem)->GetValue();
+ sal_Bool bRecord = ((SfxBoolItem*)pItem)->GetValue();
if ( bRecord )
{
// !Hack
- bChooseOnly = FALSE;
+ bChooseOnly = sal_False;
SfxObjectShell* pCurrentShell = SfxObjectShell::Current();
OSL_ENSURE( pCurrentShell, "macro recording outside an SFX document?" );
if ( pCurrentShell )
@@ -1183,7 +1105,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
OSL_TRACE("handling SID_MACROORGANIZER");
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
- INT16 nTabId = 0;
+ sal_Int16 nTabId = 0;
if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_MACROORGANIZER, sal_False, &pItem) )
{
nTabId = ((SfxUInt16Item*)pItem)->GetValue();
@@ -1201,7 +1123,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
Reference< XFrame > xFrame;
const SfxItemSet* pIntSet = rReq.GetInternalArgs_Impl();
- SFX_ITEMSET_ARG( pIntSet, pFrameItem, SfxUnoFrameItem, SID_FILLFRAME, FALSE );
+ SFX_ITEMSET_ARG( pIntSet, pFrameItem, SfxUnoFrameItem, SID_FILLFRAME, sal_False );
if ( pFrameItem )
xFrame = pFrameItem->GetFrame();
@@ -1215,7 +1137,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
do // artificial loop for flow control
{
AbstractScriptSelectorDialog* pDlg = pFact->CreateScriptSelectorDialog(
- lcl_getDialogParent( xFrame, GetTopWindow() ), FALSE, xFrame );
+ lcl_getDialogParent( xFrame, GetTopWindow() ), sal_False, xFrame );
OSL_ENSURE( pDlg, "SfxApplication::OfaExec_Impl( SID_RUNMACRO ): no dialog!" );
if ( !pDlg )
break;
@@ -1283,7 +1205,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
if ( pStringItem )
{
String aPLZ = pStringItem->GetValue();
- bRet = TRUE /*!!!SfxIniManager::CheckPLZ( aPLZ )*/;
+ bRet = sal_True /*!!!SfxIniManager::CheckPLZ( aPLZ )*/;
}
else
SbxBase::SetError( SbxERR_WRONG_ARGS );
@@ -1300,7 +1222,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
const SfxPoolItem* pItem=NULL;
const SfxItemSet* pSet = rReq.GetArgs();
SfxItemPool* pSetPool = pSet ? pSet->GetPool() : NULL;
- if ( pSet && pSet->GetItemState( pSetPool->GetWhich( SID_AUTO_CORRECT_DLG ), FALSE, &pItem ) == SFX_ITEM_SET )
+ if ( pSet && pSet->GetItemState( pSetPool->GetWhich( SID_AUTO_CORRECT_DLG ), sal_False, &pItem ) == SFX_ITEM_SET )
aSet.Put( *pItem );
SfxAbstractTabDialog* pDlg = pFact->CreateTabDialog( RID_OFA_AUTOCORR_DLG, NULL, &aSet, NULL );
@@ -1389,7 +1311,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
if (xDialog.is())
xDialog->execute();
else
- ShowServiceNotAvailableError(NULL, sDialogServiceName, TRUE);
+ ShowServiceNotAvailableError(NULL, sDialogServiceName, sal_True);
}
catch(::com::sun::star::uno::Exception&)
{
@@ -1410,11 +1332,11 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
void SfxApplication::OfaState_Impl(SfxItemSet &rSet)
{
- const USHORT *pRanges = rSet.GetRanges();
+ const sal_uInt16 *pRanges = rSet.GetRanges();
DBG_ASSERT(pRanges && *pRanges, "Set without Region");
while ( *pRanges )
{
- for(USHORT nWhich = *pRanges++; nWhich <= *pRanges; ++nWhich)
+ for(sal_uInt16 nWhich = *pRanges++; nWhich <= *pRanges; ++nWhich)
{
switch(nWhich)
{
diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx
index 9ecd8764fdad..252b3f6ab8e2 100644..100755
--- a/sfx2/source/appl/appuno.cxx
+++ b/sfx2/source/appl/appuno.cxx
@@ -95,7 +95,9 @@
#include <tools/cachestr.hxx>
#include <osl/mutex.hxx>
#include <comphelper/sequence.hxx>
+#include <framework/documentundoguard.hxx>
#include <rtl/ustrbuf.hxx>
+#include <comphelper/interaction.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::ucb;
@@ -116,7 +118,6 @@ using namespace ::com::sun::star::io;
#include <sfx2/fcontnr.hxx>
#include "frmload.hxx"
#include <sfx2/frame.hxx>
-#include "sfxbasic.hxx"
#include <sfx2/objsh.hxx>
#include <sfx2/objuno.hxx>
#include <sfx2/unoctitm.hxx>
@@ -127,7 +128,7 @@ using namespace ::com::sun::star::io;
#include "fltoptint.hxx"
#include <sfx2/docfile.hxx>
#include <sfx2/sfxbasecontroller.hxx>
-#include "brokenpackageint.hxx"
+#include <sfx2/brokenpackageint.hxx>
#include "eventsupplier.hxx"
#include "xpackcreator.hxx"
#include "plugin.hxx"
@@ -135,7 +136,6 @@ using namespace ::com::sun::star::io;
#include <ownsubfilterservice.hxx>
#include "SfxDocumentMetaData.hxx"
-
#define PROTOCOLHANDLER_SERVICENAME "com.sun.star.frame.ProtocolHandler"
static char const sTemplateRegionName[] = "TemplateRegionName";
@@ -161,7 +161,7 @@ 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 sSalvagedFile[] = "SalvagedFile";
static char const sStatusInd[] = "StatusIndicator";
static char const sModel[] = "Model";
static char const sFrame[] = "Frame";
@@ -187,6 +187,10 @@ static char const sUseSystemDialog[] = "UseSystemDialog";
static char const sStandardDir[] = "StandardDir";
static char const sBlackList[] = "BlackList";
static char const sModifyPasswordInfo[] = "ModifyPasswordInfo";
+static char const sSuggestedSaveAsDir[] = "SuggestedSaveAsDir";
+static char const sSuggestedSaveAsName[] = "SuggestedSaveAsName";
+static char const sEncryptionData[] = "EncryptionData";
+
void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& rArgs, SfxAllItemSet& rSet, const SfxSlot* pSlot )
{
@@ -221,10 +225,10 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
return;
}
- USHORT nWhich = rSet.GetPool()->GetWhich(nSlotId);
- BOOL bConvertTwips = ( rSet.GetPool()->GetMetric( nWhich ) == SFX_MAPUNIT_TWIP );
+ sal_uInt16 nWhich = rSet.GetPool()->GetWhich(nSlotId);
+ sal_Bool bConvertTwips = ( rSet.GetPool()->GetMetric( nWhich ) == SFX_MAPUNIT_TWIP );
pItem->SetWhich( nWhich );
- USHORT nSubCount = pType->nAttribs;
+ sal_uInt16 nSubCount = pType->nAttribs;
const ::com::sun::star::beans::PropertyValue& rProp = pPropsVal[0];
String aName = rProp.Name;
@@ -269,11 +273,11 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
}
#endif
// complex property; collect sub items from the parameter set and reconstruct complex item
- USHORT nFound=0;
+ sal_uInt16 nFound=0;
for ( sal_uInt16 n=0; n<nCount; n++ )
{
const ::com::sun::star::beans::PropertyValue& rPropValue = pPropsVal[n];
- USHORT nSub;
+ sal_uInt16 nSub;
for ( nSub=0; nSub<nSubCount; nSub++ )
{
// search sub item by name
@@ -283,7 +287,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
const char* pName = aStr.GetBuffer();
if ( rPropValue.Name.compareToAscii( pName ) == COMPARE_EQUAL )
{
- BYTE nSubId = (BYTE) (sal_Int8) pType->aAttrib[nSub].nAID;
+ sal_uInt8 nSubId = (sal_uInt8) (sal_Int8) pType->aAttrib[nSub].nAID;
if ( bConvertTwips )
nSubId |= CONVERT_TWIPS;
if ( pItem->PutValue( rPropValue.Value, nSubId ) )
@@ -339,11 +343,11 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
return;
}
- USHORT nWhich = rSet.GetPool()->GetWhich(rArg.nSlotId);
- BOOL bConvertTwips = ( rSet.GetPool()->GetMetric( nWhich ) == SFX_MAPUNIT_TWIP );
+ sal_uInt16 nWhich = rSet.GetPool()->GetWhich(rArg.nSlotId);
+ sal_Bool bConvertTwips = ( rSet.GetPool()->GetMetric( nWhich ) == SFX_MAPUNIT_TWIP );
pItem->SetWhich( nWhich );
const SfxType* pType = rArg.pType;
- USHORT nSubCount = pType->nAttribs;
+ sal_uInt16 nSubCount = pType->nAttribs;
if ( nSubCount == 0 )
{
// "simple" (base type) argument
@@ -374,14 +378,14 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
else
{
// complex argument, could be passed in one struct
- BOOL bAsWholeItem = FALSE;
+ sal_Bool bAsWholeItem = sal_False;
for ( sal_uInt16 n=0; n<nCount; n++ )
{
const ::com::sun::star::beans::PropertyValue& rProp = pPropsVal[n];
String aName = rProp.Name;
if ( aName.CompareToAscii(rArg.pName) == COMPARE_EQUAL )
{
- bAsWholeItem = TRUE;
+ bAsWholeItem = sal_True;
#ifdef DBG_UTIL
++nFoundArgs;
#endif
@@ -404,11 +408,11 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
// complex argument; collect sub items from argument array and reconstruct complex item
// only put item if at least one member was found and had the correct type
// (is this a good idea?! Should we ask for *all* members?)
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
for ( sal_uInt16 n=0; n<nCount; n++ )
{
const ::com::sun::star::beans::PropertyValue& rProp = pPropsVal[n];
- for ( USHORT nSub=0; nSub<nSubCount; nSub++ )
+ for ( sal_uInt16 nSub=0; nSub<nSubCount; nSub++ )
{
// search sub item by name
ByteString aStr( rArg.pName );
@@ -418,17 +422,17 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
if ( rProp.Name.compareToAscii( pName ) == COMPARE_EQUAL )
{
// at least one member found ...
- bRet = TRUE;
+ bRet = sal_True;
#ifdef DBG_UTIL
++nFoundArgs;
#endif
- BYTE nSubId = (BYTE) (sal_Int8) pType->aAttrib[nSub].nAID;
+ sal_uInt8 nSubId = (sal_uInt8) (sal_Int8) pType->aAttrib[nSub].nAID;
if ( bConvertTwips )
nSubId |= CONVERT_TWIPS;
if (!pItem->PutValue( rProp.Value, nSubId ) )
{
// ... but it was not convertable
- bRet = FALSE;
+ bRet = sal_False;
#ifdef DBG_UTIL
ByteString aDbgStr( "Property not convertable: ");
aDbgStr += rArg.pName;
@@ -689,7 +693,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
{
::rtl::OUString sVal;
sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength());
- DBG_ASSERT( bOK, "invalid type or value for StanadardDir" );
+ DBG_ASSERT( bOK, "invalid type or value for StandardDir" );
if (bOK)
rSet.Put( SfxStringItem( SID_STANDARD_DIR, sVal ) );
}
@@ -713,11 +717,11 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
if (bOK)
rSet.Put( SfxStringItem( SID_FILE_NAME, sVal ) );
}
- else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sSalvageURL)) )
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sSalvagedFile)) )
{
::rtl::OUString sVal;
sal_Bool bOK = (rProp.Value >>= sVal);
- DBG_ASSERT( bOK, "invalid type or value for SalvageURL" );
+ DBG_ASSERT( bOK, "invalid type or value for SalvagedFile" );
if (bOK)
rSet.Put( SfxStringItem( SID_DOC_SALVAGE, sVal ) );
}
@@ -725,7 +729,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
{
::rtl::OUString sVal;
sal_Bool bOK = (rProp.Value >>= sVal);
- DBG_ASSERT( bOK, "invalid type or value for SalvageURL" );
+ DBG_ASSERT( bOK, "invalid type or value for FolderName" );
if (bOK)
rSet.Put( SfxStringItem( SID_PATH, sVal ) );
}
@@ -854,6 +858,26 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
{
rSet.Put( SfxUnoAnyItem( SID_MODIFYPASSWORDINFO, rProp.Value ) );
}
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sEncryptionData)) )
+ {
+ rSet.Put( SfxUnoAnyItem( SID_ENCRYPTIONDATA, rProp.Value ) );
+ }
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sSuggestedSaveAsDir)) )
+ {
+ ::rtl::OUString sVal;
+ sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength());
+ DBG_ASSERT( bOK, "invalid type or value for SuggestedSaveAsDir" );
+ if (bOK)
+ rSet.Put( SfxStringItem( SID_SUGGESTEDSAVEASDIR, sVal ) );
+ }
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sSuggestedSaveAsName)) )
+ {
+ ::rtl::OUString sVal;
+ sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength());
+ DBG_ASSERT( bOK, "invalid type or value for SuggestedSaveAsName" );
+ if (bOK)
+ rSet.Put( SfxStringItem( SID_SUGGESTEDSAVEASNAME, sVal ) );
+ }
#ifdef DBG_UTIL
else
--nFoundArgs;
@@ -919,10 +943,10 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta
if ( !pSlot->IsMode(SFX_SLOT_METHOD) )
{
// slot is a property
- USHORT nWhich = rSet.GetPool()->GetWhich(nSlotId);
+ sal_uInt16 nWhich = rSet.GetPool()->GetWhich(nSlotId);
if ( rSet.GetItemState( nWhich ) == SFX_ITEM_SET ) //???
{
- USHORT nSubCount = pType->nAttribs;
+ sal_uInt16 nSubCount = pType->nAttribs;
if ( nSubCount )
// it's a complex property, we want it split into simple types
// so we expect to get as many items as we have (sub) members
@@ -948,15 +972,15 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta
else
{
// slot is a method
- USHORT nFormalArgs = pSlot->GetFormalArgumentCount();
- for ( USHORT nArg=0; nArg<nFormalArgs; ++nArg )
+ sal_uInt16 nFormalArgs = pSlot->GetFormalArgumentCount();
+ for ( sal_uInt16 nArg=0; nArg<nFormalArgs; ++nArg )
{
// check every formal argument of the method
const SfxFormalArgument &rArg = pSlot->GetFormalArgument( nArg );
- USHORT nWhich = rSet.GetPool()->GetWhich( rArg.nSlotId );
+ sal_uInt16 nWhich = rSet.GetPool()->GetWhich( rArg.nSlotId );
if ( rSet.GetItemState( nWhich ) == SFX_ITEM_SET ) //???
{
- USHORT nSubCount = rArg.pType->nAttribs;
+ sal_uInt16 nSubCount = rArg.pType->nAttribs;
if ( nSubCount )
// argument has a complex type, we want it split into simple types
// so for this argument we expect to get as many items as we have (sub) members
@@ -1069,6 +1093,13 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta
nAdditional++;
if ( rSet.GetItemState( SID_MODIFYPASSWORDINFO ) == SFX_ITEM_SET )
nAdditional++;
+ if ( rSet.GetItemState( SID_SUGGESTEDSAVEASDIR ) == SFX_ITEM_SET )
+ nAdditional++;
+ if ( rSet.GetItemState( SID_ENCRYPTIONDATA ) == SFX_ITEM_SET )
+ nAdditional++;
+ nAdditional++;
+ if ( rSet.GetItemState( SID_SUGGESTEDSAVEASNAME ) == SFX_ITEM_SET )
+ nAdditional++;
// consider additional arguments
nProps += nAdditional;
@@ -1084,10 +1115,10 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta
if ( rSet.Count() != nItems )
{
// detect unknown item and present error message
- const USHORT *pRanges = rSet.GetRanges();
+ const sal_uInt16 *pRanges = rSet.GetRanges();
while ( *pRanges )
{
- for(USHORT nId = *pRanges++; nId <= *pRanges; ++nId)
+ for(sal_uInt16 nId = *pRanges++; nId <= *pRanges; ++nId)
{
if ( rSet.GetItemState(nId) < SFX_ITEM_SET ) //???
// not really set
@@ -1096,12 +1127,12 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta
if ( !pSlot->IsMode(SFX_SLOT_METHOD) && nId == rSet.GetPool()->GetWhich( pSlot->GetSlotId() ) )
continue;
- USHORT nFormalArgs = pSlot->GetFormalArgumentCount();
- USHORT nArg;
+ sal_uInt16 nFormalArgs = pSlot->GetFormalArgumentCount();
+ sal_uInt16 nArg;
for ( nArg=0; nArg<nFormalArgs; ++nArg )
{
const SfxFormalArgument &rArg = pSlot->GetFormalArgument( nArg );
- USHORT nWhich = rSet.GetPool()->GetWhich( rArg.nSlotId );
+ sal_uInt16 nWhich = rSet.GetPool()->GetWhich( rArg.nSlotId );
if ( nId == nWhich )
break;
}
@@ -1204,12 +1235,18 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta
continue;
if ( nId == SID_NOAUTOSAVE )
continue;
+ if ( nId == SID_ENCRYPTIONDATA )
+ continue;
// used only internally
if ( nId == SID_SAVETO )
continue;
if ( nId == SID_MODIFYPASSWORDINFO )
continue;
+ if ( nId == SID_SUGGESTEDSAVEASDIR )
+ continue;
+ if ( nId == SID_SUGGESTEDSAVEASNAME )
+ continue;
}
ByteString aDbg( "Unknown item detected: ");
@@ -1231,12 +1268,12 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta
if ( !pSlot->IsMode(SFX_SLOT_METHOD) )
{
// slot is a property
- USHORT nWhich = rSet.GetPool()->GetWhich(nSlotId);
- BOOL bConvertTwips = ( rSet.GetPool()->GetMetric( nWhich ) == SFX_MAPUNIT_TWIP );
+ sal_uInt16 nWhich = rSet.GetPool()->GetWhich(nSlotId);
+ sal_Bool bConvertTwips = ( rSet.GetPool()->GetMetric( nWhich ) == SFX_MAPUNIT_TWIP );
SFX_ITEMSET_ARG( &rSet, pItem, SfxPoolItem, nWhich, sal_False );
if ( pItem ) //???
{
- USHORT nSubCount = pType->nAttribs;
+ sal_uInt16 nSubCount = pType->nAttribs;
if ( !nSubCount )
{
pValue[nActProp].Name = String( String::CreateFromAscii( pSlot->pUnoName ) ) ;
@@ -1250,9 +1287,9 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta
else
{
// complex type, add a property value for every member of the struct
- for ( USHORT n=1; n<=nSubCount; ++n )
+ for ( sal_uInt16 n=1; n<=nSubCount; ++n )
{
- BYTE nSubId = (BYTE) (sal_Int8) pType->aAttrib[n-1].nAID;
+ sal_uInt8 nSubId = (sal_uInt8) (sal_Int8) pType->aAttrib[n-1].nAID;
if ( bConvertTwips )
nSubId |= CONVERT_TWIPS;
@@ -1276,16 +1313,16 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta
else
{
// slot is a method
- USHORT nFormalArgs = pSlot->GetFormalArgumentCount();
- for ( USHORT nArg=0; nArg<nFormalArgs; ++nArg )
+ sal_uInt16 nFormalArgs = pSlot->GetFormalArgumentCount();
+ for ( sal_uInt16 nArg=0; nArg<nFormalArgs; ++nArg )
{
const SfxFormalArgument &rArg = pSlot->GetFormalArgument( nArg );
- USHORT nWhich = rSet.GetPool()->GetWhich( rArg.nSlotId );
- BOOL bConvertTwips = ( rSet.GetPool()->GetMetric( nWhich ) == SFX_MAPUNIT_TWIP );
+ sal_uInt16 nWhich = rSet.GetPool()->GetWhich( rArg.nSlotId );
+ sal_Bool bConvertTwips = ( rSet.GetPool()->GetMetric( nWhich ) == SFX_MAPUNIT_TWIP );
SFX_ITEMSET_ARG( &rSet, pItem, SfxPoolItem, nWhich, sal_False );
if ( pItem ) //???
{
- USHORT nSubCount = rArg.pType->nAttribs;
+ sal_uInt16 nSubCount = rArg.pType->nAttribs;
if ( !nSubCount )
{
pValue[nActProp].Name = String( String::CreateFromAscii( rArg.pName ) ) ;
@@ -1299,9 +1336,9 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta
else
{
// complex type, add a property value for every member of the struct
- for ( USHORT n = 1; n <= nSubCount; ++n )
+ for ( sal_uInt16 n = 1; n <= nSubCount; ++n )
{
- BYTE nSubId = (BYTE) (sal_Int8) rArg.pType->aAttrib[n-1].nAID;
+ sal_uInt8 nSubId = (sal_uInt8) (sal_Int8) rArg.pType->aAttrib[n-1].nAID;
if ( bConvertTwips )
nSubId |= CONVERT_TWIPS;
@@ -1495,7 +1532,7 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta
}
if ( rSet.GetItemState( SID_DOC_SALVAGE, sal_False, &pItem ) == SFX_ITEM_SET )
{
- pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sSalvageURL));
+ pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sSalvagedFile));
pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) );
}
if ( rSet.GetItemState( SID_PATH, sal_False, &pItem ) == SFX_ITEM_SET )
@@ -1574,6 +1611,21 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta
pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sModifyPasswordInfo));
pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() );
}
+ if ( rSet.GetItemState( SID_ENCRYPTIONDATA, sal_False, &pItem ) == SFX_ITEM_SET )
+ {
+ pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sEncryptionData));
+ pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() );
+ }
+ if ( rSet.GetItemState( SID_SUGGESTEDSAVEASDIR, sal_False, &pItem ) == SFX_ITEM_SET )
+ {
+ pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sSuggestedSaveAsDir));
+ pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) );
+ }
+ if ( rSet.GetItemState( SID_SUGGESTEDSAVEASNAME, sal_False, &pItem ) == SFX_ITEM_SET )
+ {
+ pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sSuggestedSaveAsName));
+ pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) );
+ }
}
}
@@ -1729,12 +1781,9 @@ void SAL_CALL SfxMacroLoader::removeStatusListener(
{
}
-// -----------------------------------------------------------------------
ErrCode SfxMacroLoader::loadMacro( const ::rtl::OUString& rURL, com::sun::star::uno::Any& rRetval, SfxObjectShell* pSh )
throw ( ::com::sun::star::uno::RuntimeException )
{
- SfxApplication* pApp = SFX_APP();
- pApp->EnterBasicCall();
SfxObjectShell* pCurrent = pSh;
if ( !pCurrent )
// all not full qualified names use the BASIC of the given or current document
@@ -1780,18 +1829,21 @@ ErrCode SfxMacroLoader::loadMacro( const ::rtl::OUString& rURL, com::sun::star::
if ( pBasMgr )
{
- if ( pSh && pDoc )
+ const bool bIsAppBasic = ( pBasMgr == pAppMgr );
+ const bool bIsDocBasic = ( pBasMgr != pAppMgr );
+
+ if ( pDoc )
{
- // security check for macros from document basic if an SFX context (pSh) is given
+ // security check for macros from document basic if an SFX doc is given
if ( !pDoc->AdjustMacroMode( String() ) )
// check forbids execution
return ERRCODE_IO_ACCESSDENIED;
}
- else if ( pSh && pSh->GetMedium() )
+ else if ( pDoc && pDoc->GetMedium() )
{
- pSh->AdjustMacroMode( String() );
- SFX_ITEMSET_ARG( pSh->GetMedium()->GetItemSet(), pUpdateDocItem, SfxUInt16Item, SID_UPDATEDOCMODE, sal_False);
- SFX_ITEMSET_ARG( pSh->GetMedium()->GetItemSet(), pMacroExecModeItem, SfxUInt16Item, SID_MACROEXECMODE, sal_False);
+ pDoc->AdjustMacroMode( String() );
+ SFX_ITEMSET_ARG( pDoc->GetMedium()->GetItemSet(), pUpdateDocItem, SfxUInt16Item, SID_UPDATEDOCMODE, sal_False);
+ SFX_ITEMSET_ARG( pDoc->GetMedium()->GetItemSet(), pMacroExecModeItem, SfxUInt16Item, SID_MACROEXECMODE, sal_False);
if ( pUpdateDocItem && pMacroExecModeItem
&& pUpdateDocItem->GetValue() == document::UpdateDocMode::NO_UPDATE
&& pMacroExecModeItem->GetValue() == document::MacroExecMode::NEVER_EXECUTE )
@@ -1808,76 +1860,49 @@ ErrCode SfxMacroLoader::loadMacro( const ::rtl::OUString& rURL, com::sun::star::
aQualifiedMethod.Erase( nArgsPos - nHashPos - 1 );
}
- SbxMethod *pMethod = SfxQueryMacro( pBasMgr, aQualifiedMethod );
- if ( pMethod )
+ if ( pBasMgr->HasMacro( aQualifiedMethod ) )
{
- // arguments must be quoted
- String aQuotedArgs;
- if ( aArgs.Len()<2 || aArgs.GetBuffer()[1] == '\"')
- // no args or already quoted args
- aQuotedArgs = aArgs;
- else
+ Any aOldThisComponent;
+ const bool bSetDocMacroMode = ( pDoc != NULL ) && bIsDocBasic;
+ const bool bSetGlobalThisComponent = ( pDoc != NULL ) && bIsAppBasic;
+ if ( bSetDocMacroMode )
{
- // quote parameters
- aArgs.Erase(0,1);
- aArgs.Erase( aArgs.Len()-1,1);
-
- aQuotedArgs = '(';
-
- sal_uInt16 nCount = aArgs.GetTokenCount(',');
- for ( sal_uInt16 n=0; n<nCount; n++ )
- {
- aQuotedArgs += '\"';
- aQuotedArgs += aArgs.GetToken( n, ',' );
- aQuotedArgs += '\"';
- if ( n<nCount-1 )
- aQuotedArgs += ',';
- }
-
- aQuotedArgs += ')';
+ // mark document: it executes an own macro, so it's in a modal mode
+ pDoc->SetMacroMode_Impl( sal_True );
}
- Any aOldThisComponent;
- if ( pSh )
+ if ( bSetGlobalThisComponent )
{
- if ( pBasMgr != pAppMgr )
- // mark document: it executes an own macro, so it's in a modal mode
- pSh->SetMacroMode_Impl( TRUE );
- if ( pBasMgr == pAppMgr )
- {
- // document is executed via AppBASIC, adjust ThisComponent variable
- aOldThisComponent = pAppMgr->SetGlobalUNOConstant( "ThisComponent", makeAny( pSh->GetModel() ) );
- }
+ // document is executed via AppBASIC, adjust ThisComponent variable
+ aOldThisComponent = pAppMgr->SetGlobalUNOConstant( "ThisComponent", makeAny( pDoc->GetModel() ) );
}
- // add quoted arguments and do the call
- String aCall( '[' );
- aCall += pMethod->GetName();
- aCall += aQuotedArgs;
- aCall += ']';
-
// just to let the shell be alive
- SfxObjectShellRef rSh = pSh;
+ SfxObjectShellRef xKeepDocAlive = pDoc;
- // execute function using its Sbx parent,
- SbxVariable* pRet = pMethod->GetParent()->Execute( aCall );
- if ( pRet )
{
- USHORT nFlags = pRet->GetFlags();
- pRet->SetFlag( SBX_READWRITE | SBX_NO_BROADCAST );
- rRetval = sbxToUnoValue( pRet );
- pRet->SetFlags( nFlags );
+ // attempt to protect the document against the script tampering with its Undo Context
+ ::std::auto_ptr< ::framework::DocumentUndoGuard > pUndoGuard;
+ if ( bIsDocBasic )
+ pUndoGuard.reset( new ::framework::DocumentUndoGuard( pDoc->GetModel() ) );
+
+ // execute the method
+ SbxVariableRef retValRef = new SbxVariable;
+ nErr = pBasMgr->ExecuteMacro( aQualifiedMethod, aArgs, retValRef );
+ if ( nErr == ERRCODE_NONE )
+ rRetval = sbxToUnoValue( retValRef );
}
- nErr = SbxBase::GetError();
- if ( ( pBasMgr == pAppMgr ) && pSh )
+ if ( bSetGlobalThisComponent )
{
pAppMgr->SetGlobalUNOConstant( "ThisComponent", aOldThisComponent );
}
- if ( pSh && pSh->GetModel().is() )
- // remove flag for modal mode
- pSh->SetMacroMode_Impl( FALSE );
+ if ( bSetDocMacroMode )
+ {
+ // remove flag for modal mode
+ pDoc->SetMacroMode_Impl( sal_False );
+ }
}
else
nErr = ERRCODE_BASIC_PROC_UNDEFINED;
@@ -1896,7 +1921,6 @@ ErrCode SfxMacroLoader::loadMacro( const ::rtl::OUString& rURL, com::sun::star::
nErr = SbxBase::GetError();
}
- pApp->LeaveBasicCall();
SbxBase::ResetError();
return nErr;
}
@@ -1919,7 +1943,7 @@ Reference < XDispatch > SAL_CALL SfxAppDispatchProvider::queryDispatch(
const ::rtl::OUString& /*sTargetFrameName*/,
FrameSearchFlags /*eSearchFlags*/ ) throw( RuntimeException )
{
- USHORT nId( 0 );
+ sal_uInt16 nId( 0 );
sal_Bool bMasterCommand( sal_False );
Reference < XDispatch > xDisp;
const SfxSlot* pSlot = 0;
@@ -1927,9 +1951,9 @@ Reference < XDispatch > SAL_CALL SfxAppDispatchProvider::queryDispatch(
if ( aURL.Protocol.compareToAscii( "slot:" ) == COMPARE_EQUAL ||
aURL.Protocol.compareToAscii( "commandId:" ) == COMPARE_EQUAL )
{
- nId = (USHORT) aURL.Path.toInt32();
+ nId = (sal_uInt16) aURL.Path.toInt32();
SfxShell* pShell;
- pAppDisp->GetShellAndSlot_Impl( nId, &pShell, &pSlot, TRUE, TRUE );
+ pAppDisp->GetShellAndSlot_Impl( nId, &pShell, &pSlot, sal_True, sal_True );
}
else if ( aURL.Protocol.compareToAscii( ".uno:" ) == COMPARE_EQUAL )
{
@@ -1972,10 +1996,10 @@ throw (::com::sun::star::uno::RuntimeException)
std::list< sal_Int16 > aGroupList;
SfxSlotPool* pAppSlotPool = &SFX_APP()->GetAppSlotPool_Impl();
- const ULONG nMode( SFX_SLOT_TOOLBOXCONFIG|SFX_SLOT_ACCELCONFIG|SFX_SLOT_MENUCONFIG );
+ const sal_uIntPtr nMode( SFX_SLOT_TOOLBOXCONFIG|SFX_SLOT_ACCELCONFIG|SFX_SLOT_MENUCONFIG );
// Gruppe anw"ahlen ( Gruppe 0 ist intern )
- for ( USHORT i=0; i<pAppSlotPool->GetGroupCount(); i++ )
+ for ( sal_uInt16 i=0; i<pAppSlotPool->GetGroupCount(); i++ )
{
String aName = pAppSlotPool->SeekGroup( i );
const SfxSlot* pSfxSlot = pAppSlotPool->FirstSlot();
@@ -2007,11 +2031,11 @@ throw (::com::sun::star::uno::RuntimeException)
if ( pAppSlotPool )
{
- const ULONG nMode( SFX_SLOT_TOOLBOXCONFIG|SFX_SLOT_ACCELCONFIG|SFX_SLOT_MENUCONFIG );
+ const sal_uIntPtr nMode( SFX_SLOT_TOOLBOXCONFIG|SFX_SLOT_ACCELCONFIG|SFX_SLOT_MENUCONFIG );
rtl::OUString aCmdPrefix( RTL_CONSTASCII_USTRINGPARAM( ".uno:" ));
// Gruppe anw"ahlen ( Gruppe 0 ist intern )
- for ( USHORT i=0; i<pAppSlotPool->GetGroupCount(); i++ )
+ for ( sal_uInt16 i=0; i<pAppSlotPool->GetGroupCount(); i++ )
{
String aName = pAppSlotPool->SeekGroup( i );
const SfxSlot* pSfxSlot = pAppSlotPool->FirstSlot();
@@ -2126,165 +2150,6 @@ SFX2_DLLPUBLIC void SAL_CALL component_getImplementationEnvironment(
*ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ;
}
-SFX2_DLLPUBLIC sal_Bool SAL_CALL component_writeInfo(
- void* ,
- void* pRegistryKey )
-{
- ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey > xKey( reinterpret_cast< ::com::sun::star::registry::XRegistryKey* >( pRegistryKey ) ) ;
-
- // register actual implementations and their services
- ::rtl::OUString aImpl;
- ::rtl::OUString aTempStr;
- ::rtl::OUString aKeyStr;
- Reference< XRegistryKey > xNewKey;
- Reference< XRegistryKey > xLoaderKey;
-
- // PluginObject
- aImpl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
- aImpl += ::sfx2::PluginObject::impl_getStaticImplementationName();
-
- aTempStr = aImpl;
- aTempStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES"));
- xNewKey = xKey->createKey( aTempStr );
- xNewKey->createKey( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.SpecialEmbeddedObject")) );
-
- // IFrameObject
- aImpl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
- aImpl += ::sfx2::IFrameObject::impl_getStaticImplementationName();
-
- aTempStr = aImpl;
- aTempStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES"));
- xNewKey = xKey->createKey( aTempStr );
- xNewKey->createKey( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.SpecialEmbeddedObject")) );
-
- // global app event broadcaster
- aImpl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
- aImpl += SfxGlobalEvents_Impl::impl_getStaticImplementationName();
-
- aTempStr = aImpl;
- aTempStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES"));
- xNewKey = xKey->createKey( aTempStr );
- xNewKey->createKey( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.GlobalEventBroadcaster")) );
-
- // global app dispatcher
- aImpl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
- aImpl += SfxAppDispatchProvider::impl_getStaticImplementationName();
-
- aTempStr = aImpl;
- aTempStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES"));
- xNewKey = xKey->createKey( aTempStr );
- xNewKey->createKey( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.ProtocolHandler")) );
-
- // standalone document info
- aImpl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
- aImpl += SfxStandaloneDocumentInfoObject::impl_getStaticImplementationName();
-
- aTempStr = aImpl;
- aTempStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES"));
- xNewKey = xKey->createKey( aTempStr );
- xNewKey->createKey( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.StandaloneDocumentInfo")) );
-
- // frame loader
- aImpl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
- aImpl += SfxFrameLoader_Impl::impl_getStaticImplementationName();
-
- aTempStr = aImpl;
- aTempStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES"));
- xNewKey = xKey->createKey( aTempStr );
- Sequence < ::rtl::OUString > aServices = SfxFrameLoader_Impl::impl_getStaticSupportedServiceNames();
- sal_Int32 nCount = aServices.getLength();
- for ( sal_Int16 i=0; i<nCount; i++ )
- xNewKey->createKey( aServices.getConstArray()[i] );
-
- // macro loader
- aImpl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
- aImpl += SfxMacroLoader::impl_getStaticImplementationName();
-
- aTempStr = aImpl;
- aTempStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES"));
- xNewKey = xKey->createKey( aTempStr );
- xNewKey->createKey( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.ProtocolHandler")) );
-
- // - sfx document templates
- aImpl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
- aImpl += SfxDocTplService::impl_getStaticImplementationName();
-
- aTempStr = aImpl;
- aTempStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES"));
- xNewKey = xKey->createKey( aTempStr );
- xNewKey->createKey( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.DocumentTemplates")) );
-
- // quickstart wrapper service
- aImpl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
- aImpl += ShutdownIcon::impl_getStaticImplementationName();
-
- aTempStr = aImpl;
- aTempStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES"));
- xNewKey = xKey->createKey( aTempStr );
- xNewKey->createKey( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.office.Quickstart")) );
-
- // application script library container service
- aImpl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
- aImpl += SfxApplicationScriptLibraryContainer::impl_getStaticImplementationName();
-
- aTempStr = aImpl;
- aTempStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES"));
- xNewKey = xKey->createKey( aTempStr );
- xNewKey->createKey( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.script.ApplicationScriptLibraryContainer")) );
-
- // application dialog library container service
- aImpl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
- aImpl += SfxApplicationDialogLibraryContainer::impl_getStaticImplementationName();
-
- aTempStr = aImpl;
- aTempStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES"));
- xNewKey = xKey->createKey( aTempStr );
- xNewKey->createKey( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.script.ApplicationDialogLibraryContainer")) );
-
- // converter of fs folders to packages
- aImpl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
- aImpl += OPackageStructureCreator::impl_getStaticImplementationName();
-
- aTempStr = aImpl;
- aTempStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES"));
- xNewKey = xKey->createKey( aTempStr );
- Sequence< ::rtl::OUString > rServices = OPackageStructureCreator::impl_getStaticSupportedServiceNames();
- for( sal_Int32 ind = 0; ind < rServices.getLength(); ind++ )
- xNewKey->createKey( rServices.getConstArray()[ind] );
-
- // subfilter to parse a stream in OASIS format generated by the filter
- aImpl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
- aImpl += ::sfx2::OwnSubFilterService::impl_getStaticImplementationName();
-
- aTempStr = aImpl;
- aTempStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES"));
- xNewKey = xKey->createKey( aTempStr );
- rServices = ::sfx2::OwnSubFilterService::impl_getStaticSupportedServiceNames();
- for( sal_Int32 ind = 0; ind < rServices.getLength(); ind++ )
- xNewKey->createKey( rServices.getConstArray()[ind] );
-
- // document meta data
- aImpl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
- aImpl += comp_SfxDocumentMetaData::_getImplementationName();
-
- aTempStr = aImpl;
- aTempStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES"));
- xNewKey = xKey->createKey( aTempStr );
- xNewKey->createKey( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.DocumentProperties")) );
-
-
- // writer compatable document properties
- aImpl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
- aImpl += comp_CompatWriterDocProps::_getImplementationName();
-
- aTempStr = aImpl;
- aTempStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES"));
- xNewKey = xKey->createKey( aTempStr );
- xNewKey->createKey( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.writer.DocumentProperties")) );
-
- return sal_True;
-}
-
SFX2_DLLPUBLIC void* SAL_CALL component_getFactory(
const sal_Char* pImplementationName ,
void* pServiceManager ,
@@ -2381,18 +2246,18 @@ RequestFilterOptions::RequestFilterOptions( ::com::sun::star::uno::Reference< ::
::rtl::OUString temp;
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > temp2;
::com::sun::star::document::FilterOptionsRequest aOptionsRequest( temp,
- temp2,
+ temp2,
rModel,
rProperties );
- m_aRequest <<= aOptionsRequest;
+ m_aRequest <<= aOptionsRequest;
- m_pAbort = new ContinuationAbort;
- m_pOptions = new FilterOptionsContinuation;
+ m_pAbort = new comphelper::OInteractionAbort;
+ m_pOptions = new FilterOptionsContinuation;
- m_lContinuations.realloc( 2 );
- m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pAbort );
- m_lContinuations[1] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pOptions );
+ m_lContinuations.realloc( 2 );
+ m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pAbort );
+ m_lContinuations[1] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pOptions );
}
::com::sun::star::uno::Any SAL_CALL RequestFilterOptions::getRequest()
@@ -2409,108 +2274,140 @@ RequestFilterOptions::RequestFilterOptions( ::com::sun::star::uno::Reference< ::
}
//=========================================================================
+class RequestPackageReparation_Impl : public ::cppu::WeakImplHelper1< ::com::sun::star::task::XInteractionRequest >
+{
+ ::com::sun::star::uno::Any m_aRequest;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > m_lContinuations;
+ comphelper::OInteractionApprove* m_pApprove;
+ comphelper::OInteractionDisapprove* m_pDisapprove;
-RequestPackageReparation::RequestPackageReparation( ::rtl::OUString aName )
+public:
+ RequestPackageReparation_Impl( ::rtl::OUString aName );
+ sal_Bool isApproved();
+ virtual ::com::sun::star::uno::Any SAL_CALL getRequest() throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > SAL_CALL getContinuations()
+ throw( ::com::sun::star::uno::RuntimeException );
+};
+
+RequestPackageReparation_Impl::RequestPackageReparation_Impl( ::rtl::OUString aName )
{
::rtl::OUString temp;
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > temp2;
::com::sun::star::document::BrokenPackageRequest aBrokenPackageRequest( temp,
temp2,
aName );
-
m_aRequest <<= aBrokenPackageRequest;
-
- m_pApprove = new ContinuationApprove;
- m_pDisapprove = new ContinuationDisapprove;
-
+ m_pApprove = new comphelper::OInteractionApprove;
+ m_pDisapprove = new comphelper::OInteractionDisapprove;
m_lContinuations.realloc( 2 );
m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pApprove );
m_lContinuations[1] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pDisapprove );
}
-/*uno::*/Any SAL_CALL RequestPackageReparation::queryInterface( const /*uno::*/Type& rType ) throw (RuntimeException)
+sal_Bool RequestPackageReparation_Impl::isApproved()
{
- return ::cppu::queryInterface ( rType,
- // OWeakObject interfaces
- dynamic_cast< XInterface* > ( (XInteractionRequest *) this ),
- static_cast< XWeak* > ( this ),
- // my own interfaces
- static_cast< XInteractionRequest* > ( this ) );
+ return m_pApprove->wasSelected();
}
-void SAL_CALL RequestPackageReparation::acquire( ) throw ()
+::com::sun::star::uno::Any SAL_CALL RequestPackageReparation_Impl::getRequest()
+ throw( ::com::sun::star::uno::RuntimeException )
{
- OWeakObject::acquire();
+ return m_aRequest;
}
-void SAL_CALL RequestPackageReparation::release( ) throw ()
+::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > >
+ SAL_CALL RequestPackageReparation_Impl::getContinuations()
+ throw( ::com::sun::star::uno::RuntimeException )
{
- OWeakObject::release();
+ return m_lContinuations;
}
-::com::sun::star::uno::Any SAL_CALL RequestPackageReparation::getRequest()
- throw( ::com::sun::star::uno::RuntimeException )
+RequestPackageReparation::RequestPackageReparation( ::rtl::OUString aName )
{
- return m_aRequest;
+ pImp = new RequestPackageReparation_Impl( aName );
+ pImp->acquire();
}
-::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > >
- SAL_CALL RequestPackageReparation::getContinuations()
- throw( ::com::sun::star::uno::RuntimeException )
+RequestPackageReparation::~RequestPackageReparation()
{
- return m_lContinuations;
+ pImp->release();
+}
+
+sal_Bool RequestPackageReparation::isApproved()
+{
+ return pImp->isApproved();
+}
+
+com::sun::star::uno::Reference < ::com::sun::star::task::XInteractionRequest > RequestPackageReparation::GetRequest()
+{
+ return com::sun::star::uno::Reference < ::com::sun::star::task::XInteractionRequest >(pImp);
}
//=========================================================================
+class NotifyBrokenPackage_Impl : public ::cppu::WeakImplHelper1< ::com::sun::star::task::XInteractionRequest >
+{
+ ::com::sun::star::uno::Any m_aRequest;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > m_lContinuations;
+ comphelper::OInteractionAbort* m_pAbort;
-NotifyBrokenPackage::NotifyBrokenPackage( ::rtl::OUString aName )
+public:
+ NotifyBrokenPackage_Impl( ::rtl::OUString aName );
+ sal_Bool isAborted();
+ virtual ::com::sun::star::uno::Any SAL_CALL getRequest() throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > SAL_CALL getContinuations()
+ throw( ::com::sun::star::uno::RuntimeException );
+};
+
+NotifyBrokenPackage_Impl::NotifyBrokenPackage_Impl( ::rtl::OUString aName )
{
::rtl::OUString temp;
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > temp2;
::com::sun::star::document::BrokenPackageRequest aBrokenPackageRequest( temp,
temp2,
aName );
-
m_aRequest <<= aBrokenPackageRequest;
-
- m_pAbort = new ContinuationAbort;
-
+ m_pAbort = new comphelper::OInteractionAbort;
m_lContinuations.realloc( 1 );
m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pAbort );
}
-/*uno::*/Any SAL_CALL NotifyBrokenPackage::queryInterface( const /*uno::*/Type& rType ) throw (RuntimeException)
+sal_Bool NotifyBrokenPackage_Impl::isAborted()
{
- return ::cppu::queryInterface ( rType,
- // OWeakObject interfaces
- dynamic_cast< XInterface* > ( (XInteractionRequest *) this ),
- static_cast< XWeak* > ( this ),
- // my own interfaces
- static_cast< XInteractionRequest* > ( this ) );
+ return m_pAbort->wasSelected();
}
-void SAL_CALL NotifyBrokenPackage::acquire( ) throw ()
+::com::sun::star::uno::Any SAL_CALL NotifyBrokenPackage_Impl::getRequest()
+ throw( ::com::sun::star::uno::RuntimeException )
{
- OWeakObject::acquire();
+ return m_aRequest;
}
-void SAL_CALL NotifyBrokenPackage::release( ) throw ()
+::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > >
+ SAL_CALL NotifyBrokenPackage_Impl::getContinuations()
+ throw( ::com::sun::star::uno::RuntimeException )
{
- OWeakObject::release();
+ return m_lContinuations;
}
-::com::sun::star::uno::Any SAL_CALL NotifyBrokenPackage::getRequest()
- throw( ::com::sun::star::uno::RuntimeException )
+NotifyBrokenPackage::NotifyBrokenPackage( ::rtl::OUString aName )
{
- return m_aRequest;
+ pImp = new NotifyBrokenPackage_Impl( aName );
+ pImp->acquire();
}
-::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > >
- SAL_CALL NotifyBrokenPackage::getContinuations()
- throw( ::com::sun::star::uno::RuntimeException )
+NotifyBrokenPackage::~NotifyBrokenPackage()
{
- return m_lContinuations;
+ pImp->release();
+}
+
+sal_Bool NotifyBrokenPackage::isAborted()
+{
+ return pImp->isAborted();
}
+com::sun::star::uno::Reference < ::com::sun::star::task::XInteractionRequest > NotifyBrokenPackage::GetRequest()
+{
+ return com::sun::star::uno::Reference < ::com::sun::star::task::XInteractionRequest >(pImp);
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx
index 149cf8d96add..3473514de3fc 100644..100755
--- a/sfx2/source/appl/childwin.cxx
+++ b/sfx2/source/appl/childwin.cxx
@@ -342,7 +342,7 @@ SfxChildWinInfo SfxChildWindow::GetInfo() const
aInfo.aSize = pWindow->GetSizePixel();
if ( pWindow->IsSystemWindow() )
{
- ULONG nMask = WINDOWSTATE_MASK_POS | WINDOWSTATE_MASK_STATE;
+ sal_uIntPtr nMask = WINDOWSTATE_MASK_POS | WINDOWSTATE_MASK_STATE;
if ( pWindow->GetStyle() & WB_SIZEABLE )
nMask |= ( WINDOWSTATE_MASK_WIDTH | WINDOWSTATE_MASK_HEIGHT );
aInfo.aWinState = ((SystemWindow*)pWindow)->GetWindowState( nMask );
@@ -415,7 +415,7 @@ void SfxChildWindow::InitializeChildWinFactory_Impl( sal_uInt16 nId, SfxChildWin
nPos = aWinData.Search( cToken );
if (nPos != STRING_NOTFOUND)
{
- USHORT nNextPos = aWinData.Search( cToken, 2 );
+ sal_uInt16 nNextPos = aWinData.Search( cToken, 2 );
if ( nNextPos != STRING_NOTFOUND )
{
// there is extra information
@@ -594,7 +594,7 @@ sal_Bool SfxChildWindow::IsHideAtToggle() const
return pImp->bHideAtToggle;
}
-void SfxChildWindow::SetWantsFocus( BOOL bSet )
+void SfxChildWindow::SetWantsFocus( sal_Bool bSet )
{
pImp->bWantsFocus = bSet;
}
@@ -699,18 +699,18 @@ void SfxChildWindow::Hide()
}
}
-void SfxChildWindow::Show( USHORT nFlags )
+void SfxChildWindow::Show( sal_uInt16 nFlags )
{
switch ( pWindow->GetType() )
{
case RSC_DOCKINGWINDOW :
- ((DockingWindow*)pWindow)->Show( TRUE, nFlags );
+ ((DockingWindow*)pWindow)->Show( sal_True, nFlags );
break;
case RSC_TOOLBOX :
- ((ToolBox*)pWindow)->Show( TRUE, nFlags );
+ ((ToolBox*)pWindow)->Show( sal_True, nFlags );
break;
default:
- pWindow->Show( TRUE, nFlags );
+ pWindow->Show( sal_True, nFlags );
break;
}
}
@@ -787,7 +787,7 @@ sal_Bool SfxChildWindow::CanGetFocus() const
return !(pImp->pFact->aInfo.nFlags & SFX_CHILDWIN_CANTGETFOCUS);
}
-void SfxChildWindowContext::RegisterChildWindowContext(SfxModule* pMod, USHORT nId, SfxChildWinContextFactory* pFact)
+void SfxChildWindowContext::RegisterChildWindowContext(SfxModule* pMod, sal_uInt16 nId, SfxChildWinContextFactory* pFact)
{
SFX_APP()->RegisterChildWindowContext_Impl( pMod, nId, pFact );
}
diff --git a/sfx2/source/appl/dde.hrc b/sfx2/source/appl/dde.hrc
index d3e178606809..d3e178606809 100644..100755
--- a/sfx2/source/appl/dde.hrc
+++ b/sfx2/source/appl/dde.hrc
diff --git a/sfx2/source/appl/dde.src b/sfx2/source/appl/dde.src
index 22df8eff16ba..18f6517f181c 100644..100755
--- a/sfx2/source/appl/dde.src
+++ b/sfx2/source/appl/dde.src
@@ -29,6 +29,7 @@
ModalDialog MD_DDE_LINKEDIT
{
+ HelpID = "sfx2:ModalDialog:MD_DDE_LINKEDIT";
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 223 , 74 ) ;
@@ -42,6 +43,7 @@ ModalDialog MD_DDE_LINKEDIT
};
Edit ED_DDE_APP
{
+ HelpID = "sfx2:Edit:MD_DDE_LINKEDIT:ED_DDE_APP";
Border = TRUE ;
Pos = MAP_APPFONT ( 55 , 14 ) ;
Size = MAP_APPFONT ( 100 , 12 ) ;
@@ -54,6 +56,7 @@ ModalDialog MD_DDE_LINKEDIT
};
Edit ED_DDE_TOPIC
{
+ HelpID = "sfx2:Edit:MD_DDE_LINKEDIT:ED_DDE_TOPIC";
Border = TRUE ;
Pos = MAP_APPFONT ( 55 , 32 ) ;
Size = MAP_APPFONT ( 100 , 12 ) ;
@@ -66,6 +69,7 @@ ModalDialog MD_DDE_LINKEDIT
};
Edit ED_DDE_ITEM
{
+ HelpID = "sfx2:Edit:MD_DDE_LINKEDIT:ED_DDE_ITEM";
Border = TRUE ;
Pos = MAP_APPFONT ( 55 , 50 ) ;
Size = MAP_APPFONT ( 100 , 12 ) ;
diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx
index 0dff92fedf50..b16b673136ec 100644..100755
--- a/sfx2/source/appl/fileobj.cxx
+++ b/sfx2/source/appl/fileobj.cxx
@@ -49,7 +49,7 @@
#include <comphelper/processfactory.hxx>
#include <sfx2/linkmgr.hxx>
#include <sfx2/opengrf.hxx>
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include "fileobj.hxx"
#include "app.hrc"
@@ -82,9 +82,9 @@ struct Impl_DownLoadData
SvFileObject::SvFileObject() :
pDownLoadData( NULL ), pOldParent( NULL ), nType( FILETYPE_TEXT )
{
- bLoadAgain = TRUE;
+ bLoadAgain = sal_True;
bSynchron = bLoadError = bWaitForData = bDataReady = bNativFormat =
- bClearMedium = bStateChangeCalled = bInCallDownLoad = FALSE;
+ bClearMedium = bStateChangeCalled = bInCallDownLoad = sal_False;
}
@@ -100,11 +100,11 @@ SvFileObject::~SvFileObject()
}
-BOOL SvFileObject::GetData( ::com::sun::star::uno::Any & rData,
+sal_Bool SvFileObject::GetData( ::com::sun::star::uno::Any & rData,
const String & rMimeType,
- BOOL bGetSynchron )
+ sal_Bool bGetSynchron )
{
- ULONG nFmt = SotExchange::GetFormatStringId( rMimeType );
+ sal_uIntPtr nFmt = SotExchange::GetFormatStringId( rMimeType );
switch( nType )
{
case FILETYPE_TEXT:
@@ -130,7 +130,7 @@ BOOL SvFileObject::GetData( ::com::sun::star::uno::Any & rData,
// If the native format is reqested, has to be reset at the
// end of the flag. Is solely in the sw/ndgrf.cxx used when
// the link is removed form GraphicNode.
- BOOL bOldNativFormat = bNativFormat;
+ sal_Bool bOldNativFormat = bNativFormat;
// If about to print, waiting for the data to be available
if( bGetSynchron )
@@ -146,7 +146,7 @@ BOOL SvFileObject::GetData( ::com::sun::star::uno::Any & rData,
Application::Reschedule();
xMed = xTmpMed;
- bClearMedium = TRUE;
+ bClearMedium = sal_True;
}
}
@@ -204,7 +204,7 @@ BOOL SvFileObject::GetData( ::com::sun::star::uno::Any & rData,
if( xMed.Is() && !bSynchron && bClearMedium )
{
xMed.Clear();
- bClearMedium = FALSE;
+ bClearMedium = sal_False;
}
}
}
@@ -217,10 +217,10 @@ BOOL SvFileObject::GetData( ::com::sun::star::uno::Any & rData,
return sal_True/*0 != aTypeList.Count()*/;
}
-BOOL SvFileObject::Connect( sfx2::SvBaseLink* pLink )
+sal_Bool SvFileObject::Connect( sfx2::SvBaseLink* pLink )
{
if( !pLink || !pLink->GetLinkManager() )
- return FALSE;
+ return sal_False;
// Test if not another link of the same connection already exists
pLink->GetLinkManager()->GetDisplayNames( pLink, 0, &sFileNm, 0, &sFilter );
@@ -231,7 +231,7 @@ BOOL SvFileObject::Connect( sfx2::SvBaseLink* pLink )
if( pShell.Is() )
{
if( pShell->IsAbortingImport() )
- return FALSE;
+ return sal_False;
if( pShell->GetMedium() )
sReferer = pShell->GetMedium()->GetName();
@@ -255,24 +255,24 @@ BOOL SvFileObject::Connect( sfx2::SvBaseLink* pLink )
break;
default:
- return FALSE;
+ return sal_False;
}
SetUpdateTimeout( 0 );
// and now register by this or other found Pseudo-Object
AddDataAdvise( pLink, SotExchange::GetFormatMimeType( pLink->GetContentType()), 0 );
- return TRUE;
+ return sal_True;
}
-BOOL SvFileObject::LoadFile_Impl()
+sal_Bool SvFileObject::LoadFile_Impl()
{
// We are still at Loading!!
if( bWaitForData || !bLoadAgain || xMed.Is() || pDownLoadData )
- return FALSE;
+ return sal_False;
// at the moment on the current DocShell
- xMed = new SfxMedium( sFileNm, STREAM_STD_READ, TRUE );
+ xMed = new SfxMedium( sFileNm, STREAM_STD_READ, sal_True );
SvLinkSource::StreamToLoadFrom aStreamToLoadFrom =
getStreamToLoadFrom();
xMed->setStreamToLoadFrom(
@@ -283,14 +283,14 @@ BOOL SvFileObject::LoadFile_Impl()
if( !bSynchron )
{
- bLoadAgain = bDataReady = bInNewData = FALSE;
- bWaitForData = TRUE;
+ bLoadAgain = bDataReady = bInNewData = sal_False;
+ bWaitForData = sal_True;
SfxMediumRef xTmpMed = xMed;
xMed->SetDataAvailableLink( STATIC_LINK( this, SvFileObject, LoadGrfNewData_Impl ) );
- bInCallDownLoad = TRUE;
+ bInCallDownLoad = sal_True;
xMed->DownLoad( STATIC_LINK( this, SvFileObject, LoadGrfReady_Impl ) );
- bInCallDownLoad = FALSE;
+ bInCallDownLoad = sal_False;
bClearMedium = !xMed.Is();
if( bClearMedium )
@@ -298,24 +298,24 @@ BOOL SvFileObject::LoadFile_Impl()
return bDataReady;
}
- bWaitForData = TRUE;
- bDataReady = bInNewData = FALSE;
+ bWaitForData = sal_True;
+ bDataReady = bInNewData = sal_False;
xMed->DownLoad();
bLoadAgain = !xMed->IsRemote();
- bWaitForData = FALSE;
+ bWaitForData = sal_False;
// Graphic is finished, also send DataChanged of the Status change:
SendStateChg_Impl( xMed->GetInStream() && xMed->GetInStream()->GetError()
? sfx2::LinkManager::STATE_LOAD_ERROR : sfx2::LinkManager::STATE_LOAD_OK );
- return TRUE;
+ return sal_True;
}
-BOOL SvFileObject::GetGraphic_Impl( Graphic& rGrf, SvStream* pStream )
+sal_Bool SvFileObject::GetGraphic_Impl( Graphic& rGrf, SvStream* pStream )
{
GraphicFilter* pGF = GraphicFilter::GetGraphicFilter();
- const USHORT nFilter = sFilter.Len() && pGF->GetImportFormatCount()
+ const sal_uInt16 nFilter = sFilter.Len() && pGF->GetImportFormatCount()
? pGF->GetImportFormatNumber( sFilter )
: GRFILTER_FORMAT_DONTKNOW;
@@ -353,10 +353,10 @@ BOOL SvFileObject::GetGraphic_Impl( Graphic& rGrf, SvStream* pStream )
xMed->SetDataAvailableLink( Link() );
// xMed->SetDoneLink( Link() );
delete pDownLoadData, pDownLoadData = 0;
- bDataReady = TRUE;
- bWaitForData = FALSE;
+ bDataReady = sal_True;
+ bWaitForData = sal_False;
}
- else if( FALSE )
+ else if( sal_False )
{
// Set up Timer, to return back
pDownLoadData->aTimer.Start();
@@ -506,14 +506,14 @@ void SvFileObject::Edit( Window* pParent, sfx2::SvBaseLink* pLink, const Link& r
IMPL_STATIC_LINK( SvFileObject, LoadGrfReady_Impl, void*, EMPTYARG )
{
// When we come form here there it can not be an error no more.
- pThis->bLoadError = FALSE;
- pThis->bWaitForData = FALSE;
- pThis->bInCallDownLoad = FALSE;
+ pThis->bLoadError = sal_False;
+ pThis->bWaitForData = sal_False;
+ pThis->bInCallDownLoad = sal_False;
if( !pThis->bInNewData && !pThis->bDataReady )
{
// Graphic is finished, also send DataChanged from Status change
- pThis->bDataReady = TRUE;
+ pThis->bDataReady = sal_True;
pThis->SendStateChg_Impl( sfx2::LinkManager::STATE_LOAD_OK );
// and then send the data again
@@ -522,7 +522,7 @@ IMPL_STATIC_LINK( SvFileObject, LoadGrfReady_Impl, void*, EMPTYARG )
if( pThis->bDataReady )
{
- pThis->bLoadAgain = TRUE;
+ pThis->bLoadAgain = sal_True;
if( pThis->xMed.Is() )
{
pThis->xMed->SetDataAvailableLink( Link() );
@@ -553,8 +553,8 @@ IMPL_STATIC_LINK( SvFileObject, LoadGrfNewData_Impl, void*, EMPTYARG )
if( pThis->bInNewData )
return 0;
- pThis->bInNewData = TRUE;
- pThis->bLoadError = FALSE;
+ pThis->bInNewData = sal_True;
+ pThis->bLoadError = sal_False;
if( !pThis->pDownLoadData )
{
@@ -583,7 +583,7 @@ IMPL_STATIC_LINK( SvFileObject, LoadGrfNewData_Impl, void*, EMPTYARG )
// a DataReady in DataChanged?
else if( pThis->bWaitForData && pThis->pDownLoadData )
{
- pThis->bLoadError = TRUE;
+ pThis->bLoadError = sal_True;
}
}
@@ -593,7 +593,7 @@ IMPL_STATIC_LINK( SvFileObject, LoadGrfNewData_Impl, void*, EMPTYARG )
pThis->SendStateChg_Impl( pStrm->GetError() ? sfx2::LinkManager::STATE_LOAD_ERROR : sfx2::LinkManager::STATE_LOAD_OK );
}
- pThis->bInNewData = FALSE;
+ pThis->bInNewData = sal_False;
return 0;
}
@@ -632,28 +632,28 @@ IMPL_LINK( SvFileObject, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg )
ERRCODE_SO_PENDING if it has not been completely read
ERRCODE_SO_FALSE otherwise
*/
-BOOL SvFileObject::IsPending() const
+sal_Bool SvFileObject::IsPending() const
{
return FILETYPE_GRF == nType && !bLoadError &&
( pDownLoadData || bWaitForData );
}
-BOOL SvFileObject::IsDataComplete() const
+sal_Bool SvFileObject::IsDataComplete() const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( FILETYPE_GRF != nType )
- bRet = TRUE;
+ bRet = sal_True;
else if( !bLoadError && ( !bWaitForData && !pDownLoadData ))
{
SvFileObject* pThis = (SvFileObject*)this;
if( bDataReady ||
( bSynchron && pThis->LoadFile_Impl() && xMed.Is() ) )
- bRet = TRUE;
+ bRet = sal_True;
else
{
INetURLObject aUrl( sFileNm );
if( aUrl.HasError() ||
INET_PROT_NOT_VALID == aUrl.GetProtocol() )
- bRet = TRUE;
+ bRet = sal_True;
}
}
return bRet;
@@ -667,8 +667,8 @@ void SvFileObject::CancelTransfers()
if( !bDataReady )
{
// Do not set-up again
- bLoadAgain = FALSE;
- bDataReady = bLoadError = bWaitForData = TRUE;
+ bLoadAgain = sal_False;
+ bDataReady = bLoadError = bWaitForData = sal_True;
SendStateChg_Impl( sfx2::LinkManager::STATE_LOAD_ABORT );
}
}
@@ -682,7 +682,7 @@ void SvFileObject::SendStateChg_Impl( sfx2::LinkManager::LinkState nState )
aAny <<= rtl::OUString::valueOf( (sal_Int32)nState );
DataChanged( SotExchange::GetFormatName(
sfx2::LinkManager::RegisterStatusInfoId()), aAny );
- bStateChangeCalled = TRUE;
+ bStateChangeCalled = sal_True;
}
}
diff --git a/sfx2/source/appl/fileobj.hxx b/sfx2/source/appl/fileobj.hxx
index a902b5875410..ceb0f14ea1bc 100644..100755
--- a/sfx2/source/appl/fileobj.hxx
+++ b/sfx2/source/appl/fileobj.hxx
@@ -47,22 +47,22 @@ class SvFileObject : public sfx2::SvLinkSource
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();
+ sal_uInt8 nType;
+
+ sal_Bool bLoadAgain : 1;
+ sal_Bool bSynchron : 1;
+ sal_Bool bLoadError : 1;
+ sal_Bool bWaitForData : 1;
+ sal_Bool bInNewData : 1;
+ sal_Bool bDataReady : 1;
+ sal_Bool bMedUseCache : 1;
+ sal_Bool bNativFormat : 1;
+ sal_Bool bClearMedium : 1;
+ sal_Bool bStateChangeCalled : 1;
+ sal_Bool bInCallDownLoad : 1;
+
+ sal_Bool GetGraphic_Impl( Graphic&, SvStream* pStream = 0 );
+ sal_Bool LoadFile_Impl();
void SendStateChg_Impl( sfx2::LinkManager::LinkState nState );
DECL_STATIC_LINK( SvFileObject, DelMedium_Impl, SfxMediumRef* );
@@ -76,16 +76,16 @@ protected:
public:
SvFileObject();
- virtual BOOL GetData( ::com::sun::star::uno::Any & rData /*out param*/,
+ virtual sal_Bool GetData( ::com::sun::star::uno::Any & rData /*out param*/,
const String & rMimeType,
- BOOL bSynchron = FALSE );
+ sal_Bool bSynchron = sal_False );
- virtual BOOL Connect( sfx2::SvBaseLink* );
+ virtual sal_Bool Connect( sfx2::SvBaseLink* );
virtual void Edit( Window *, sfx2::SvBaseLink *, const Link& rEndEditHdl );
// Ask whether you can access data directly or whether it has to be triggered
- virtual BOOL IsPending() const;
- virtual BOOL IsDataComplete() const;
+ virtual sal_Bool IsPending() const;
+ virtual sal_Bool IsDataComplete() const;
void CancelTransfers();
};
diff --git a/sfx2/source/appl/fwkhelper.cxx b/sfx2/source/appl/fwkhelper.cxx
index 60ae5499cc8e..60ae5499cc8e 100644..100755
--- a/sfx2/source/appl/fwkhelper.cxx
+++ b/sfx2/source/appl/fwkhelper.cxx
diff --git a/sfx2/source/appl/helpdispatch.cxx b/sfx2/source/appl/helpdispatch.cxx
index 4a7a2f5c0254..4a7a2f5c0254 100644..100755
--- a/sfx2/source/appl/helpdispatch.cxx
+++ b/sfx2/source/appl/helpdispatch.cxx
diff --git a/sfx2/source/appl/helpdispatch.hxx b/sfx2/source/appl/helpdispatch.hxx
index f99c054a3063..f99c054a3063 100644..100755
--- a/sfx2/source/appl/helpdispatch.hxx
+++ b/sfx2/source/appl/helpdispatch.hxx
diff --git a/sfx2/source/appl/helpinterceptor.cxx b/sfx2/source/appl/helpinterceptor.cxx
index 9e05fbfe38e2..26f0117aa566 100644..100755
--- a/sfx2/source/appl/helpinterceptor.cxx
+++ b/sfx2/source/appl/helpinterceptor.cxx
@@ -136,7 +136,7 @@ void HelpInterceptor_Impl::SetStartURL( const String& rURL )
{
m_pHistory = new HelpHistoryList_Impl;
Any aEmptyViewData;
- m_pHistory->insert( m_pHistory->begin(), new HelpHistoryEntry_Impl( rURL, aEmptyViewData ) );
+ m_pHistory->insert( m_pHistory->begin(), new HelpHistoryEntry_Impl( rURL, aEmptyViewData));
m_nCurPos = m_pHistory->size() - 1;
m_pWindow->UpdateToolbox();
@@ -169,7 +169,7 @@ Reference< XDispatch > SAL_CALL HelpInterceptor_Impl::queryDispatch(
if ( m_xSlaveDispatcher.is() )
xResult = m_xSlaveDispatcher->queryDispatch( aURL, aTargetFrameName, nSearchFlags );
- BOOL bHelpURL = aURL.Complete.toAsciiLowerCase().match(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.help")),0);
+ sal_Bool bHelpURL = aURL.Complete.toAsciiLowerCase().match(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.help")),0);
if ( bHelpURL )
{
@@ -277,7 +277,7 @@ void SAL_CALL HelpInterceptor_Impl::dispatch(
}
}
- ULONG nPos = ( bBack && m_nCurPos > 0 ) ? --m_nCurPos
+ sal_uIntPtr nPos = ( bBack && m_nCurPos > 0 ) ? --m_nCurPos
: ( !bBack && m_nCurPos < m_pHistory->size() - 1 )
? ++m_nCurPos
: ULONG_MAX;
diff --git a/sfx2/source/appl/helpinterceptor.hxx b/sfx2/source/appl/helpinterceptor.hxx
index 60adf2d6d934..e912fcdf2364 100644..100755
--- a/sfx2/source/appl/helpinterceptor.hxx
+++ b/sfx2/source/appl/helpinterceptor.hxx
@@ -74,7 +74,7 @@ friend class SfxHelpWindow_Impl;
HelpHistoryList_Impl* m_pHistory;
SfxHelpWindow_Impl* m_pWindow;
- ULONG m_nCurPos;
+ sal_uIntPtr m_nCurPos;
String m_aCurrentURL;
com::sun::star::uno::Any m_aViewData;
diff --git a/sfx2/source/appl/imagemgr.cxx b/sfx2/source/appl/imagemgr.cxx
index c9c52342a139..d4c410a2a7ac 100644..100755
--- a/sfx2/source/appl/imagemgr.cxx
+++ b/sfx2/source/appl/imagemgr.cxx
@@ -28,7 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sfx2.hxx"
-#include "imagemgr.hxx"
+#include "sfx2/imagemgr.hxx"
#include <com/sun/star/frame/XController.hpp>
#include <com/sun/star/ui/XImageManager.hpp>
#include <com/sun/star/frame/XModuleManager.hpp>
@@ -42,7 +42,7 @@
#include <rtl/ustring.hxx>
#include <rtl/logfile.hxx>
-#include "imgmgr.hxx"
+#include "sfx2/imgmgr.hxx"
#include <sfx2/app.hxx>
#include <sfx2/unoctitm.hxx>
#include <sfx2/dispatch.hxx>
@@ -71,7 +71,7 @@ typedef boost::unordered_map< ::rtl::OUString,
Image SAL_CALL GetImage(
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,
const ::rtl::OUString& aURL,
- BOOL bBig
+ bool bBig
)
{
// TODO/LATeR: shouldn't this become a method at SfxViewFrame?! That would save the UnoTunnel
@@ -91,7 +91,7 @@ Image SAL_CALL GetImage(
rtl::OUString aCommandURL( aURL );
if ( nProtocol == INET_PROT_SLOT )
{
- USHORT nId = ( USHORT ) String(aURL).Copy(5).ToInt32();
+ sal_uInt16 nId = ( sal_uInt16 ) String(aURL).Copy(5).ToInt32();
const SfxSlot* pSlot = 0;
if ( xModel.is() )
{
diff --git a/sfx2/source/appl/imestatuswindow.cxx b/sfx2/source/appl/imestatuswindow.cxx
index 092ace28428b..092ace28428b 100644..100755
--- a/sfx2/source/appl/imestatuswindow.cxx
+++ b/sfx2/source/appl/imestatuswindow.cxx
diff --git a/sfx2/source/appl/imestatuswindow.hxx b/sfx2/source/appl/imestatuswindow.hxx
index 184cdc721a6b..184cdc721a6b 100644..100755
--- a/sfx2/source/appl/imestatuswindow.hxx
+++ b/sfx2/source/appl/imestatuswindow.hxx
diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx
index efafab525c12..0aa33ae82c5a 100644..100755
--- a/sfx2/source/appl/impldde.cxx
+++ b/sfx2/source/appl/impldde.cxx
@@ -29,7 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sfx2.hxx"
-#if defined(WIN) || defined(WNT)
+#if defined(WNT)
#include <tools/svwin.h>
#endif
@@ -46,7 +46,7 @@
#include "dde.hrc"
#include <sfx2/lnkbase.hxx>
#include <sfx2/linkmgr.hxx>
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Sequence.hxx>
@@ -132,7 +132,7 @@ SvDDEObject::SvDDEObject()
: pConnection( 0 ), pLink( 0 ), pRequest( 0 ), pGetData( 0 ), nError( 0 )
{
SetUpdateTimeout( 100 );
- bWaitForData = FALSE;
+ bWaitForData = sal_False;
}
SvDDEObject::~SvDDEObject()
@@ -142,12 +142,12 @@ SvDDEObject::~SvDDEObject()
delete pConnection;
}
-BOOL SvDDEObject::GetData( ::com::sun::star::uno::Any & rData /*out param*/,
+sal_Bool SvDDEObject::GetData( ::com::sun::star::uno::Any & rData /*out param*/,
const String & rMimeType,
- BOOL bSynchron )
+ sal_Bool bSynchron )
{
if( !pConnection )
- return FALSE;
+ return sal_False;
if( pConnection->GetError() ) // then we try once more
{
@@ -161,10 +161,10 @@ BOOL SvDDEObject::GetData( ::com::sun::star::uno::Any & rData /*out param*/,
}
if( bWaitForData ) // we are in an rekursive loop, get out again
- return FALSE;
+ return sal_False;
// Lock against Reentrance
- bWaitForData = TRUE;
+ bWaitForData = sal_True;
// if you want to print, we'll wait until the data is available
if( bSynchron )
@@ -182,7 +182,7 @@ BOOL SvDDEObject::GetData( ::com::sun::star::uno::Any & rData /*out param*/,
if( pConnection->GetError() )
nError = DDELINK_ERROR_DATA;
- bWaitForData = FALSE;
+ bWaitForData = sal_False;
}
else
{
@@ -206,12 +206,12 @@ BOOL SvDDEObject::GetData( ::com::sun::star::uno::Any & rData /*out param*/,
}
-BOOL SvDDEObject::Connect( SvBaseLink * pSvLink )
+sal_Bool SvDDEObject::Connect( SvBaseLink * pSvLink )
{
-#if defined(WIN) || defined(WNT)
- static BOOL bInWinExec = FALSE;
+#if defined(WNT)
+ static sal_Bool bInWinExec = sal_False;
#endif
- USHORT nLinkType = pSvLink->GetUpdateMode();
+ sal_uInt16 nLinkType = pSvLink->GetUpdateMode();
if( pConnection ) // Connection is already made
{
// well, then just add it as dependent
@@ -222,17 +222,17 @@ BOOL SvDDEObject::Connect( SvBaseLink * pSvLink )
: 0 );
AddConnectAdvise( pSvLink );
- return TRUE;
+ return sal_True;
}
if( !pSvLink->GetLinkManager() )
- return FALSE;
+ return sal_False;
String sServer, sTopic;
pSvLink->GetLinkManager()->GetDisplayNames( pSvLink, &sServer, &sTopic, &sItem );
if( !sServer.Len() || !sTopic.Len() || !sItem.Len() )
- return FALSE;
+ return sal_False;
pConnection = new DdeConnection( sServer, sTopic );
if( pConnection->GetError() )
@@ -241,7 +241,7 @@ BOOL SvDDEObject::Connect( SvBaseLink * pSvLink )
// then the server is up, it just does not know the topic!
if( sTopic.EqualsIgnoreCaseAscii( "SYSTEM" ) )
{
- BOOL bSysTopic;
+ sal_Bool bSysTopic;
{
DdeConnection aTmp( sServer, String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "SYSTEM" ) ) );
bSysTopic = !aTmp.GetError();
@@ -250,12 +250,12 @@ BOOL SvDDEObject::Connect( SvBaseLink * pSvLink )
if( bSysTopic )
{
nError = DDELINK_ERROR_DATA;
- return FALSE;
+ return sal_False;
}
// otherwise in Win/WinNT, start the Application directly
}
-#if defined(WIN) || defined(WNT)
+#if defined(WNT)
// Server not up, try once more to start it.
if( !bInWinExec )
@@ -268,12 +268,12 @@ BOOL SvDDEObject::Connect( SvBaseLink * pSvLink )
nError = DDELINK_ERROR_APP;
else
{
- USHORT i;
+ sal_uInt16 i;
for( i=0; i<5; i++ )
{
- bInWinExec = TRUE;
+ bInWinExec = sal_True;
Application::Reschedule();
- bInWinExec = FALSE;
+ bInWinExec = sal_False;
delete pConnection;
pConnection = new DdeConnection( sServer, sTopic );
@@ -288,7 +288,7 @@ BOOL SvDDEObject::Connect( SvBaseLink * pSvLink )
}
}
else
-#endif // WIN / WNT
+#endif // WNT
{
nError = DDELINK_ERROR_APP;
}
@@ -305,7 +305,7 @@ BOOL SvDDEObject::Connect( SvBaseLink * pSvLink )
}
if( pConnection->GetError() )
- return FALSE;
+ return sal_False;
AddDataAdvise( pSvLink,
SotExchange::GetFormatMimeType( pSvLink->GetContentType()),
@@ -314,7 +314,7 @@ BOOL SvDDEObject::Connect( SvBaseLink * pSvLink )
: 0 );
AddConnectAdvise( pSvLink );
SetUpdateTimeout( 0 );
- return TRUE;
+ return sal_True;
}
void SvDDEObject::Edit( Window* pParent, sfx2::SvBaseLink* pBaseLink, const Link& rEndEditHdl )
@@ -327,9 +327,9 @@ void SvDDEObject::Edit( Window* pParent, sfx2::SvBaseLink* pBaseLink, const Link
}
}
-BOOL SvDDEObject::ImplHasOtherFormat( DdeTransaction& rReq )
+sal_Bool SvDDEObject::ImplHasOtherFormat( DdeTransaction& rReq )
{
- USHORT nFmt = 0;
+ sal_uInt16 nFmt = 0;
switch( rReq.GetFormat() )
{
case FORMAT_RTF:
@@ -356,7 +356,7 @@ BOOL SvDDEObject::ImplHasOtherFormat( DdeTransaction& rReq )
return 0 != nFmt;
}
-BOOL SvDDEObject::IsPending() const
+sal_Bool SvDDEObject::IsPending() const
/* [Description]
The method determines whether the data-object can be read from a DDE.
@@ -370,14 +370,14 @@ BOOL SvDDEObject::IsPending() const
return bWaitForData;
}
-BOOL SvDDEObject::IsDataComplete() const
+sal_Bool SvDDEObject::IsDataComplete() const
{
return bWaitForData;
}
IMPL_LINK( SvDDEObject, ImplGetDDEData, DdeData*, pData )
{
- ULONG nFmt = pData->GetFormat();
+ sal_uIntPtr nFmt = pData->GetFormat();
switch( nFmt )
{
case FORMAT_GDIMETAFILE:
@@ -403,7 +403,7 @@ IMPL_LINK( SvDDEObject, ImplGetDDEData, DdeData*, pData )
aVal <<= aSeq;
DataChanged( SotExchange::GetFormatMimeType(
pData->GetFormat() ), aVal );
- bWaitForData = FALSE;
+ bWaitForData = sal_False;
}
}
}
@@ -413,7 +413,7 @@ IMPL_LINK( SvDDEObject, ImplGetDDEData, DdeData*, pData )
IMPL_LINK( SvDDEObject, ImplDoneDDEData, void*, pData )
{
- BOOL bValid = (BOOL)(ULONG)pData;
+ sal_Bool bValid = (sal_Bool)(sal_uIntPtr)pData;
if( !bValid && ( pRequest || pLink ))
{
DdeTransaction* pReq = 0;
@@ -430,13 +430,13 @@ IMPL_LINK( SvDDEObject, ImplDoneDDEData, void*, pData )
}
else if( pReq == pRequest )
{
- bWaitForData = FALSE;
+ bWaitForData = sal_False;
}
}
}
else
// End waiting
- bWaitForData = FALSE;
+ bWaitForData = sal_False;
return 0;
}
diff --git a/sfx2/source/appl/impldde.hxx b/sfx2/source/appl/impldde.hxx
index 8f37ca0a6807..3a2a84c2b685 100644..100755
--- a/sfx2/source/appl/impldde.hxx
+++ b/sfx2/source/appl/impldde.hxx
@@ -49,11 +49,11 @@ class SvDDEObject : public SvLinkSource
DdeRequest* pRequest;
::com::sun::star::uno::Any * pGetData;
- BYTE bWaitForData : 1; // waiting for data?
- BYTE nError : 7; // Error code for dialogue
+ sal_uInt8 bWaitForData : 1; // waiting for data?
+ sal_uInt8 nError : 7; // Error code for dialogue
- BOOL ImplHasOtherFormat( DdeTransaction& );
+ sal_Bool ImplHasOtherFormat( DdeTransaction& );
DECL_LINK( ImplGetDDEData, DdeData* );
DECL_LINK( ImplDoneDDEData, void* );
@@ -63,15 +63,15 @@ protected:
public:
SvDDEObject();
- virtual BOOL GetData( ::com::sun::star::uno::Any & rData /*out param*/,
+ virtual sal_Bool GetData( ::com::sun::star::uno::Any & rData /*out param*/,
const String & aMimeType,
- BOOL bSynchron = FALSE );
+ sal_Bool bSynchron = sal_False );
- virtual BOOL Connect( SvBaseLink * );
+ virtual sal_Bool Connect( SvBaseLink * );
virtual void Edit( Window* pParent, sfx2::SvBaseLink* pBaseLink, const Link& rEndEditHdl );
- virtual BOOL IsPending() const;
- virtual BOOL IsDataComplete() const;
+ virtual sal_Bool IsPending() const;
+ virtual sal_Bool IsDataComplete() const;
};
}
diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx
index 06c3e1bd741c..410640750ec3 100644..100755
--- a/sfx2/source/appl/linkmgr2.cxx
+++ b/sfx2/source/appl/linkmgr2.cxx
@@ -51,7 +51,7 @@
#include "fileobj.hxx"
#include "impldde.hxx"
#include "app.hrc"
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#define _SVSTDARR_STRINGSDTOR
#include <svl/svstdarr.hxx>
@@ -74,7 +74,7 @@ class SvxInternalLink : public sfx2::SvLinkSource
public:
SvxInternalLink() {}
- virtual BOOL Connect( sfx2::SvBaseLink* );
+ virtual sal_Bool Connect( sfx2::SvBaseLink* );
};
@@ -89,7 +89,7 @@ LinkManager::LinkManager(SfxObjectShell* p)
LinkManager::~LinkManager()
{
SvBaseLinkRef** ppRef = (SvBaseLinkRef**)aLinkTbl.GetData();
- for( USHORT n = aLinkTbl.Count(); n; --n, ++ppRef )
+ for( sal_uInt16 n = aLinkTbl.Count(); n; --n, ++ppRef )
{
if( (*ppRef)->Is() )
{
@@ -124,16 +124,16 @@ void LinkManager::CloseCachedComps()
void LinkManager::Remove( SvBaseLink *pLink )
{
// No duplicate links inserted
- int bFound = FALSE;
+ int bFound = sal_False;
SvBaseLinkRef** ppRef = (SvBaseLinkRef**)aLinkTbl.GetData();
- for( USHORT n = aLinkTbl.Count(); n; --n, ++ppRef )
+ for( sal_uInt16 n = aLinkTbl.Count(); n; --n, ++ppRef )
{
if( pLink == *(*ppRef) )
{
(*(*ppRef))->Disconnect();
(*(*ppRef))->SetLinkManager( NULL );
(*(*ppRef)).Clear();
- bFound = TRUE;
+ bFound = sal_True;
}
// Remove emty ones if they exist
@@ -149,7 +149,7 @@ void LinkManager::Remove( SvBaseLink *pLink )
}
-void LinkManager::Remove( USHORT nPos, USHORT nCnt )
+void LinkManager::Remove( sal_uInt16 nPos, sal_uInt16 nCnt )
{
if( nCnt && nPos < aLinkTbl.Count() )
{
@@ -157,7 +157,7 @@ void LinkManager::Remove( USHORT nPos, USHORT nCnt )
nCnt = aLinkTbl.Count() - nPos;
SvBaseLinkRef** ppRef = (SvBaseLinkRef**)aLinkTbl.GetData() + nPos;
- for( USHORT n = nCnt; n; --n, ++ppRef )
+ for( sal_uInt16 n = nCnt; n; --n, ++ppRef )
{
if( (*ppRef)->Is() )
{
@@ -171,29 +171,29 @@ void LinkManager::Remove( USHORT nPos, USHORT nCnt )
}
-BOOL LinkManager::Insert( SvBaseLink* pLink )
+sal_Bool LinkManager::Insert( SvBaseLink* pLink )
{
// No duplicate links inserted
- for( USHORT n = 0; n < aLinkTbl.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aLinkTbl.Count(); ++n )
{
SvBaseLinkRef* pTmp = aLinkTbl[ n ];
if( !pTmp->Is() )
aLinkTbl.DeleteAndDestroy( n-- );
if( pLink == *pTmp )
- return FALSE;
+ return sal_False;
}
SvBaseLinkRef* pTmp = new SvBaseLinkRef( pLink );
pLink->SetLinkManager( this );
aLinkTbl.Insert( pTmp, aLinkTbl.Count() );
- return TRUE;
+ return sal_True;
}
-BOOL LinkManager::InsertLink( SvBaseLink * pLink,
- USHORT nObjType,
- USHORT nUpdateMode,
+sal_Bool LinkManager::InsertLink( SvBaseLink * pLink,
+ sal_uInt16 nObjType,
+ sal_uInt16 nUpdateMode,
const String* pName )
{
// This First
@@ -205,13 +205,13 @@ BOOL LinkManager::InsertLink( SvBaseLink * pLink,
}
-BOOL LinkManager::InsertDDELink( SvBaseLink * pLink,
+sal_Bool LinkManager::InsertDDELink( SvBaseLink * pLink,
const String& rServer,
const String& rTopic,
const String& rItem )
{
if( !( OBJECT_CLIENT_SO & pLink->GetObjType() ) )
- return FALSE;
+ return sal_False;
String sCmd;
::sfx2::MakeLnkName( sCmd, &rServer, rTopic, rItem );
@@ -222,11 +222,11 @@ BOOL LinkManager::InsertDDELink( SvBaseLink * pLink,
}
-BOOL LinkManager::InsertDDELink( SvBaseLink * pLink )
+sal_Bool LinkManager::InsertDDELink( SvBaseLink * pLink )
{
DBG_ASSERT( OBJECT_CLIENT_SO & pLink->GetObjType(), "no OBJECT_CLIENT_SO" );
if( !( OBJECT_CLIENT_SO & pLink->GetObjType() ) )
- return FALSE;
+ return sal_False;
if( pLink->GetObjType() == OBJECT_CLIENT_SO )
pLink->SetObjType( OBJECT_CLIENT_DDE );
@@ -236,13 +236,13 @@ BOOL LinkManager::InsertDDELink( SvBaseLink * pLink )
// Obtain the string for the dialog
-BOOL LinkManager::GetDisplayNames( const SvBaseLink * pLink,
+sal_Bool LinkManager::GetDisplayNames( const SvBaseLink * pLink,
String* pType,
String* pFile,
String* pLinkStr,
String* pFilter ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const String sLNm( pLink->GetLinkSourceName() );
if( sLNm.Len() )
{
@@ -252,7 +252,7 @@ BOOL LinkManager::GetDisplayNames( const SvBaseLink * pLink,
case OBJECT_CLIENT_GRF:
case OBJECT_CLIENT_OLE:
{
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
String sFile( sLNm.GetToken( 0, ::sfx2::cTokenSeperator, nPos ) );
String sRange( sLNm.GetToken( 0, ::sfx2::cTokenSeperator, nPos ) );
@@ -271,12 +271,12 @@ BOOL LinkManager::GetDisplayNames( const SvBaseLink * pLink,
? RID_SVXSTR_FILELINK
: RID_SVXSTR_GRAFIKLINK ));
}
- bRet = TRUE;
+ bRet = sal_True;
}
break;
case OBJECT_CLIENT_DDE:
{
- USHORT nTmp = 0;
+ sal_uInt16 nTmp = 0;
String sCmd( sLNm );
String sServer( sCmd.GetToken( 0, cTokenSeperator, nTmp ) );
String sTopic( sCmd.GetToken( 0, cTokenSeperator, nTmp ) );
@@ -287,7 +287,7 @@ BOOL LinkManager::GetDisplayNames( const SvBaseLink * pLink,
*pFile = sTopic;
if( pLinkStr )
*pLinkStr = sCmd.Copy( nTmp );
- bRet = TRUE;
+ bRet = sal_True;
}
break;
default:
@@ -300,9 +300,9 @@ BOOL LinkManager::GetDisplayNames( const SvBaseLink * pLink,
void LinkManager::UpdateAllLinks(
- BOOL bAskUpdate,
- BOOL /*bCallErrHdl*/,
- BOOL bUpdateGrfLinks,
+ sal_Bool bAskUpdate,
+ sal_Bool /*bCallErrHdl*/,
+ sal_Bool bUpdateGrfLinks,
Window* pParentWin )
{
SvStringsDtor aApps, aTopics, aItems;
@@ -311,7 +311,7 @@ void LinkManager::UpdateAllLinks(
// First make a copy of the array in order to update links
// links in ... no contact between them!
SvPtrarr aTmpArr( 255, 50 );
- USHORT n;
+ sal_uInt16 n;
for( n = 0; n < aLinkTbl.Count(); ++n )
{
SvBaseLink* pLink = *aLinkTbl[ n ];
@@ -328,8 +328,8 @@ void LinkManager::UpdateAllLinks(
SvBaseLink* pLink = (SvBaseLink*)aTmpArr[ n ];
// search first in the array after the entry
- USHORT nFndPos = USHRT_MAX;
- for( USHORT i = 0; i < aLinkTbl.Count(); ++i )
+ sal_uInt16 nFndPos = USHRT_MAX;
+ for( sal_uInt16 i = 0; i < aLinkTbl.Count(); ++i )
if( pLink == *aLinkTbl[ i ] )
{
nFndPos = i;
@@ -349,7 +349,7 @@ void LinkManager::UpdateAllLinks(
int nRet = QueryBox( pParentWin, WB_YES_NO | WB_DEF_YES, SfxResId( STR_QUERY_UPDATE_LINKS ) ).Execute();
if( RET_YES != nRet )
return ; // nothing should be updated
- bAskUpdate = FALSE; // once is enough
+ bAskUpdate = sal_False; // once is enough
}
pLink->Update();
@@ -376,20 +376,20 @@ SvLinkSourceRef LinkManager::CreateObj( SvBaseLink * pLink )
}
}
-BOOL LinkManager::InsertServer( SvLinkSource* pObj )
+sal_Bool LinkManager::InsertServer( SvLinkSource* pObj )
{
// no duplicate inserts
if( !pObj || USHRT_MAX != aServerTbl.GetPos( pObj ) )
- return FALSE;
+ return sal_False;
aServerTbl.Insert( pObj, aServerTbl.Count() );
- return TRUE;
+ return sal_True;
}
void LinkManager::RemoveServer( SvLinkSource* pObj )
{
- USHORT nPos = aServerTbl.GetPos( pObj );
+ sal_uInt16 nPos = aServerTbl.GetPos( pObj );
if( USHRT_MAX != nPos )
aServerTbl.Remove( nPos, 1 );
}
@@ -459,14 +459,14 @@ void LinkManager::LinkServerShell(const OUString& rPath, SfxObjectShell& rServer
}
}
-BOOL LinkManager::InsertFileLink( sfx2::SvBaseLink& rLink,
- USHORT nFileType,
+sal_Bool LinkManager::InsertFileLink( sfx2::SvBaseLink& rLink,
+ sal_uInt16 nFileType,
const String& rFileNm,
const String* pFilterNm,
const String* pRange )
{
if( !( OBJECT_CLIENT_SO & rLink.GetObjType() ))
- return FALSE;
+ return sal_False;
String sCmd( rFileNm );
sCmd += ::sfx2::cTokenSeperator;
@@ -478,11 +478,11 @@ BOOL LinkManager::InsertFileLink( sfx2::SvBaseLink& rLink,
return InsertLink( &rLink, nFileType, sfx2::LINKUPDATE_ONCALL, &sCmd );
}
-BOOL LinkManager::InsertFileLink( sfx2::SvBaseLink& rLink )
+sal_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;
+ return sal_False;
}
// A transfer is aborted, so cancel all download media
@@ -493,7 +493,7 @@ void LinkManager::CancelTransfers()
sfx2::SvBaseLink* pLnk;
const sfx2::SvBaseLinks& rLnks = GetLinks();
- for( USHORT n = rLnks.Count(); n; )
+ for( sal_uInt16 n = rLnks.Count(); n; )
if( 0 != ( pLnk = &(*rLnks[ --n ])) &&
OBJECT_CLIENT_FILE == (OBJECT_CLIENT_FILE & pLnk->GetObjType()) &&
0 != ( pFileObj = (SvFileObject*)pLnk->GetObj() ) )
@@ -504,9 +504,9 @@ void LinkManager::CancelTransfers()
// gets the appropriate information as a string
// For now this is required for file object in conjunction with JavaScript
// - needs information about Load/Abort/Error
-ULONG LinkManager::RegisterStatusInfoId()
+sal_uIntPtr LinkManager::RegisterStatusInfoId()
{
- static ULONG nFormat = 0;
+ static sal_uIntPtr nFormat = 0;
if( !nFormat )
{
@@ -521,11 +521,11 @@ ULONG LinkManager::RegisterStatusInfoId()
// ----------------------------------------------------------------------
-BOOL LinkManager::GetGraphicFromAny( const String& rMimeType,
+sal_Bool LinkManager::GetGraphicFromAny( const String& rMimeType,
const ::com::sun::star::uno::Any & rValue,
Graphic& rGrf )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
::com::sun::star::uno::Sequence< sal_Int8 > aSeq;
if( rValue.hasValue() && ( rValue >>= aSeq ) )
{
@@ -538,7 +538,7 @@ BOOL LinkManager::GetGraphicFromAny( const String& rMimeType,
case SOT_FORMATSTR_ID_SVXB:
{
aMemStm >> rGrf;
- bRet = TRUE;
+ bRet = sal_True;
}
break;
case FORMAT_GDIMETAFILE:
@@ -546,7 +546,7 @@ BOOL LinkManager::GetGraphicFromAny( const String& rMimeType,
GDIMetaFile aMtf;
aMtf.Read( aMemStm );
rGrf = aMtf;
- bRet = TRUE;
+ bRet = sal_True;
}
break;
case FORMAT_BITMAP:
@@ -554,7 +554,7 @@ BOOL LinkManager::GetGraphicFromAny( const String& rMimeType,
Bitmap aBmp;
aMemStm >> aBmp;
rGrf = aBmp;
- bRet = TRUE;
+ bRet = sal_True;
}
break;
}
@@ -575,10 +575,10 @@ String lcl_DDE_RelToAbs( const String& rTopic, const String& rBaseURL )
return sRet;
}
-BOOL SvxInternalLink::Connect( sfx2::SvBaseLink* pLink )
+sal_Bool SvxInternalLink::Connect( sfx2::SvBaseLink* pLink )
{
SfxObjectShell* pFndShell = 0;
- USHORT nUpdateMode = com::sun::star::document::UpdateDocMode::NO_UPDATE;
+ sal_uInt16 nUpdateMode = com::sun::star::document::UpdateDocMode::NO_UPDATE;
String sTopic, sItem, sReferer;
LinkManager* pLinkMgr = pLink->GetLinkManager();
if (pLinkMgr && pLinkMgr->GetDisplayNames(pLink, 0, &sTopic, &sItem) && sTopic.Len())
@@ -594,7 +594,7 @@ BOOL SvxInternalLink::Connect( sfx2::SvBaseLink* pLink )
TypeId aType( TYPE(SfxObjectShell) );
- BOOL bFirst = TRUE;
+ sal_Bool bFirst = sal_True;
SfxObjectShell* pShell = pLinkMgr->GetPersist();
if( pShell && pShell->GetMedium() )
{
@@ -609,7 +609,7 @@ BOOL SvxInternalLink::Connect( sfx2::SvBaseLink* pLink )
if ( !pShell )
{
- bFirst = FALSE;
+ bFirst = sal_False;
pShell = SfxObjectShell::GetFirst( &aType, sal_False );
}
@@ -631,7 +631,7 @@ BOOL SvxInternalLink::Connect( sfx2::SvBaseLink* pLink )
if( bFirst )
{
- bFirst = FALSE;
+ bFirst = sal_False;
pShell = SfxObjectShell::GetFirst( &aType, sal_False );
}
else
@@ -643,7 +643,7 @@ BOOL SvxInternalLink::Connect( sfx2::SvBaseLink* pLink )
// empty topics are not allowed - which document is it
if( !sTopic.Len() )
- return FALSE;
+ return sal_False;
if (pFndShell)
{
@@ -671,8 +671,8 @@ BOOL SvxInternalLink::Connect( sfx2::SvBaseLink* pLink )
INET_PROT_HTTP != aURL.GetProtocol() )
{
SfxStringItem aName( SID_FILE_NAME, sTopic );
- SfxBoolItem aMinimized(SID_MINIMIZED, TRUE);
- SfxBoolItem aHidden(SID_HIDDEN, TRUE);
+ SfxBoolItem aMinimized(SID_MINIMIZED, sal_True);
+ SfxBoolItem aHidden(SID_HIDDEN, sal_True);
SfxStringItem aTarget( SID_TARGETNAME, String::CreateFromAscii("_blank") );
SfxStringItem aReferer( SID_REFERER, sReferer );
SfxUInt16Item aUpdate( SID_UPDATEDOCMODE, nUpdateMode );
diff --git a/sfx2/source/appl/linksrc.cxx b/sfx2/source/appl/linksrc.cxx
index 38beca9a8294..70aa59578c2d 100644..100755
--- a/sfx2/source/appl/linksrc.cxx
+++ b/sfx2/source/appl/linksrc.cxx
@@ -67,7 +67,7 @@ void SvLinkSourceTimer::Timeout()
}
static void StartTimer( SvLinkSourceTimer ** ppTimer, SvLinkSource * pOwner,
- ULONG nTimeout )
+ sal_uIntPtr nTimeout )
{
if( !*ppTimer )
{
@@ -82,17 +82,17 @@ struct SvLinkSource_Entry_Impl
{
SvBaseLinkRef xSink;
String aDataMimeType;
- USHORT nAdviseModes;
- BOOL bIsDataSink;
+ sal_uInt16 nAdviseModes;
+ sal_Bool bIsDataSink;
SvLinkSource_Entry_Impl( SvBaseLink* pLink, const String& rMimeType,
- USHORT nAdvMode )
+ sal_uInt16 nAdvMode )
: xSink( pLink ), aDataMimeType( rMimeType ),
- nAdviseModes( nAdvMode ), bIsDataSink( TRUE )
+ nAdviseModes( nAdvMode ), bIsDataSink( sal_True )
{}
SvLinkSource_Entry_Impl( SvBaseLink* pLink )
- : xSink( pLink ), nAdviseModes( 0 ), bIsDataSink( FALSE )
+ : xSink( pLink ), nAdviseModes( 0 ), bIsDataSink( sal_False )
{}
~SvLinkSource_Entry_Impl();
@@ -110,7 +110,7 @@ class SvLinkSource_EntryIter_Impl
{
SvLinkSource_Array_Impl aArr;
const SvLinkSource_Array_Impl& rOrigArr;
- USHORT nPos;
+ sal_uInt16 nPos;
public:
SvLinkSource_EntryIter_Impl( const SvLinkSource_Array_Impl& rArr );
~SvLinkSource_EntryIter_Impl();
@@ -168,7 +168,7 @@ struct SvLinkSource_Impl
SvLinkSource_Array_Impl aArr;
String aDataMimeType;
SvLinkSourceTimer * pTimer;
- ULONG nTimeout;
+ sal_uIntPtr nTimeout;
com::sun::star::uno::Reference<com::sun::star::io::XInputStream>
m_xInputStreamToLoadFrom;
sal_Bool m_bIsReadOnly;
@@ -222,12 +222,12 @@ void SvLinkSource::Closed()
p->xSink->Closed();
}
-ULONG SvLinkSource::GetUpdateTimeout() const
+sal_uIntPtr SvLinkSource::GetUpdateTimeout() const
{
return pImpl->nTimeout;
}
-void SvLinkSource::SetUpdateTimeout( ULONG nTimeout )
+void SvLinkSource::SetUpdateTimeout( sal_uIntPtr nTimeout )
{
pImpl->nTimeout = nTimeout;
if( pImpl->pTimer )
@@ -247,7 +247,7 @@ void SvLinkSource::SendDataChanged()
Any aVal;
if( ( p->nAdviseModes & ADVISEMODE_NODATA ) ||
- GetData( aVal, sDataMimeType, TRUE ) )
+ GetData( aVal, sDataMimeType, sal_True ) )
{
p->xSink->DataChanged( sDataMimeType, aVal );
@@ -256,7 +256,7 @@ void SvLinkSource::SendDataChanged()
if( p->nAdviseModes & ADVISEMODE_ONLYONCE )
{
- USHORT nFndPos = pImpl->aArr.GetPos( p );
+ sal_uInt16 nFndPos = pImpl->aArr.GetPos( p );
if( USHRT_MAX != nFndPos )
pImpl->aArr.DeleteAndDestroy( nFndPos );
}
@@ -284,7 +284,7 @@ void SvLinkSource::NotifyDataChanged()
{
Any aVal;
if( ( p->nAdviseModes & ADVISEMODE_NODATA ) ||
- GetData( aVal, p->aDataMimeType, TRUE ) )
+ GetData( aVal, p->aDataMimeType, sal_True ) )
{
p->xSink->DataChanged( p->aDataMimeType, aVal );
@@ -293,7 +293,7 @@ void SvLinkSource::NotifyDataChanged()
if( p->nAdviseModes & ADVISEMODE_ONLYONCE )
{
- USHORT nFndPos = pImpl->aArr.GetPos( p );
+ sal_uInt16 nFndPos = pImpl->aArr.GetPos( p );
if( USHRT_MAX != nFndPos )
pImpl->aArr.DeleteAndDestroy( nFndPos );
}
@@ -333,7 +333,7 @@ void SvLinkSource::DataChanged( const String & rMimeType,
if( p->nAdviseModes & ADVISEMODE_ONLYONCE )
{
- USHORT nFndPos = pImpl->aArr.GetPos( p );
+ sal_uInt16 nFndPos = pImpl->aArr.GetPos( p );
if( USHRT_MAX != nFndPos )
pImpl->aArr.DeleteAndDestroy( nFndPos );
}
@@ -351,7 +351,7 @@ void SvLinkSource::DataChanged( const String & rMimeType,
// only one link is correct
void SvLinkSource::AddDataAdvise( SvBaseLink * pLink, const String& rMimeType,
- USHORT nAdviseModes )
+ sal_uInt16 nAdviseModes )
{
SvLinkSource_Entry_ImplPtr pNew = new SvLinkSource_Entry_Impl(
pLink, rMimeType, nAdviseModes );
@@ -364,7 +364,7 @@ void SvLinkSource::RemoveAllDataAdvise( SvBaseLink * pLink )
for( SvLinkSource_Entry_ImplPtr p = aIter.Curr(); p; p = aIter.Next() )
if( p->bIsDataSink && &p->xSink == pLink )
{
- USHORT nFndPos = pImpl->aArr.GetPos( p );
+ sal_uInt16 nFndPos = pImpl->aArr.GetPos( p );
if( USHRT_MAX != nFndPos )
pImpl->aArr.DeleteAndDestroy( nFndPos );
}
@@ -383,46 +383,46 @@ void SvLinkSource::RemoveConnectAdvise( SvBaseLink * pLink )
for( SvLinkSource_Entry_ImplPtr p = aIter.Curr(); p; p = aIter.Next() )
if( !p->bIsDataSink && &p->xSink == pLink )
{
- USHORT nFndPos = pImpl->aArr.GetPos( p );
+ sal_uInt16 nFndPos = pImpl->aArr.GetPos( p );
if( USHRT_MAX != nFndPos )
pImpl->aArr.DeleteAndDestroy( nFndPos );
}
}
-BOOL SvLinkSource::HasDataLinks( const SvBaseLink* pLink ) const
+sal_Bool SvLinkSource::HasDataLinks( const SvBaseLink* pLink ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SvLinkSource_Entry_Impl* p;
- for( USHORT n = 0, nEnd = pImpl->aArr.Count(); n < nEnd; ++n )
+ for( sal_uInt16 n = 0, nEnd = pImpl->aArr.Count(); n < nEnd; ++n )
if( ( p = pImpl->aArr[ n ] )->bIsDataSink &&
( !pLink || &p->xSink == pLink ) )
{
- bRet = TRUE;
+ bRet = sal_True;
break;
}
return bRet;
}
-// TRUE => waitinmg for data
-BOOL SvLinkSource::IsPending() const
+// sal_True => waitinmg for data
+sal_Bool SvLinkSource::IsPending() const
{
- return FALSE;
+ return sal_False;
}
-// TRUE => data complete loaded
-BOOL SvLinkSource::IsDataComplete() const
+// sal_True => data complete loaded
+sal_Bool SvLinkSource::IsDataComplete() const
{
- return TRUE;
+ return sal_True;
}
-BOOL SvLinkSource::Connect( SvBaseLink* )
+sal_Bool SvLinkSource::Connect( SvBaseLink* )
{
- return TRUE;
+ return sal_True;
}
-BOOL SvLinkSource::GetData( ::com::sun::star::uno::Any &, const String &, BOOL )
+sal_Bool SvLinkSource::GetData( ::com::sun::star::uno::Any &, const String &, sal_Bool )
{
- return FALSE;
+ return sal_False;
}
void SvLinkSource::Edit( Window *, SvBaseLink *, const Link& )
diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx
index f37b672acbc9..598b08988cbb 100644..100755
--- a/sfx2/source/appl/lnkbase2.cxx
+++ b/sfx2/source/appl/lnkbase2.cxx
@@ -37,7 +37,7 @@
#include <sfx2/linkmgr.hxx>
#include <vcl/svapp.hxx>
#include "app.hrc"
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include <sfx2/filedlghelper.hxx>
#include <tools/debug.hxx>
#include <svl/svdde.hxx>
@@ -49,7 +49,7 @@ namespace sfx2
TYPEINIT0( SvBaseLink )
-static DdeTopic* FindTopic( const String &, USHORT* = 0 );
+static DdeTopic* FindTopic( const String &, sal_uInt16* = 0 );
class ImplDdeItem;
@@ -78,10 +78,10 @@ struct ImplBaseLinkData
struct tClientType
{
// applies for all links
- ULONG nCntntType; // Update Format
+ sal_uIntPtr nCntntType; // Update Format
// Not Ole-Links
- BOOL bIntrnlLnk; // It is an internal link
- USHORT nUpdateMode; // UpdateMode
+ sal_Bool bIntrnlLnk; // It is an internal link
+ sal_uInt16 nUpdateMode; // UpdateMode
};
struct tDDEType
@@ -96,7 +96,7 @@ struct ImplBaseLinkData
ImplBaseLinkData()
{
ClientType.nCntntType = 0;
- ClientType.bIntrnlLnk = FALSE;
+ ClientType.bIntrnlLnk = sal_False;
ClientType.nUpdateMode = 0;
DDEType.pItem = NULL;
}
@@ -108,26 +108,26 @@ class ImplDdeItem : public DdeGetPutItem
SvBaseLink* pLink;
DdeData aData;
Sequence< sal_Int8 > aSeq; // Datacontainer for DdeData !!!
- BOOL bIsValidData : 1;
- BOOL bIsInDTOR : 1;
+ sal_Bool bIsValidData : 1;
+ sal_Bool bIsInDTOR : 1;
public:
ImplDdeItem( SvBaseLink& rLink, const String& rStr )
- : DdeGetPutItem( rStr ), pLink( &rLink ), bIsValidData( FALSE ),
- bIsInDTOR( FALSE )
+ : DdeGetPutItem( rStr ), pLink( &rLink ), bIsValidData( sal_False ),
+ bIsInDTOR( sal_False )
{}
virtual ~ImplDdeItem();
- virtual DdeData* Get( ULONG );
- virtual BOOL Put( const DdeData* );
- virtual void AdviseLoop( BOOL );
+ virtual DdeData* Get( sal_uIntPtr );
+ virtual sal_Bool Put( const DdeData* );
+ virtual void AdviseLoop( sal_Bool );
void Notify()
{
- bIsValidData = FALSE;
+ bIsValidData = sal_False;
DdeGetPutItem::NotifyClient();
}
- BOOL IsInDTOR() const { return bIsInDTOR; }
+ sal_Bool IsInDTOR() const { return bIsInDTOR; }
};
//--------------------------------------------------------------------------
@@ -137,32 +137,32 @@ SvBaseLink::SvBaseLink()
pImpl = new BaseLink_Impl();
nObjType = OBJECT_CLIENT_SO;
pImplData = new ImplBaseLinkData;
- bVisible = bSynchron = bUseCache = TRUE;
- bWasLastEditOK = FALSE;
+ bVisible = bSynchron = bUseCache = sal_True;
+ bWasLastEditOK = sal_False;
}
//--------------------------------------------------------------------------
-SvBaseLink::SvBaseLink( USHORT nUpdateMode, ULONG nContentType )
+SvBaseLink::SvBaseLink( sal_uInt16 nUpdateMode, sal_uIntPtr nContentType )
{
pImpl = new BaseLink_Impl();
nObjType = OBJECT_CLIENT_SO;
pImplData = new ImplBaseLinkData;
- bVisible = bSynchron = bUseCache = TRUE;
- bWasLastEditOK = FALSE;
+ bVisible = bSynchron = bUseCache = sal_True;
+ bWasLastEditOK = sal_False;
// It it going to be a Ole-Link,
pImplData->ClientType.nUpdateMode = nUpdateMode;
pImplData->ClientType.nCntntType = nContentType;
- pImplData->ClientType.bIntrnlLnk = FALSE;
+ pImplData->ClientType.bIntrnlLnk = sal_False;
}
//--------------------------------------------------------------------------
-SvBaseLink::SvBaseLink( const String& rLinkName, USHORT nObjectType, SvLinkSource* pObj )
+SvBaseLink::SvBaseLink( const String& rLinkName, sal_uInt16 nObjectType, SvLinkSource* pObj )
{
- bVisible = bSynchron = bUseCache = TRUE;
- bWasLastEditOK = FALSE;
+ bVisible = bSynchron = bUseCache = sal_True;
+ bWasLastEditOK = sal_False;
aLinkName = rLinkName;
pImplData = new ImplBaseLinkData;
nObjType = nObjectType;
@@ -175,7 +175,7 @@ SvBaseLink::SvBaseLink( const String& rLinkName, USHORT nObjectType, SvLinkSourc
if( OBJECT_DDE_EXTERN == nObjType )
{
- USHORT nItemStt = 0;
+ sal_uInt16 nItemStt = 0;
DdeTopic* pTopic = FindTopic( aLinkName, &nItemStt );
if( pTopic )
{
@@ -226,7 +226,7 @@ IMPL_LINK( SvBaseLink, EndEditHdl, String*, _pNewName )
//--------------------------------------------------------------------------
-void SvBaseLink::SetObjType( USHORT nObjTypeP )
+void SvBaseLink::SetObjType( sal_uInt16 nObjTypeP )
{
DBG_ASSERT( nObjType != OBJECT_CLIENT_DDE, "type already set" );
DBG_ASSERT( !xObj.Is(), "object exist" );
@@ -286,7 +286,7 @@ String SvBaseLink::GetLinkSourceName() const
//--------------------------------------------------------------------------
-void SvBaseLink::SetUpdateMode( USHORT nMode )
+void SvBaseLink::SetUpdateMode( sal_uInt16 nMode )
{
if( ( OBJECT_CLIENT_SO & nObjType ) &&
pImplData->ClientType.nUpdateMode != nMode )
@@ -310,7 +310,7 @@ void SvBaseLink::clearStreamToLoadFrom()
}
}
-BOOL SvBaseLink::Update()
+sal_Bool SvBaseLink::Update()
{
if( OBJECT_CLIENT_SO & nObjType )
{
@@ -333,13 +333,13 @@ BOOL SvBaseLink::Update()
if( OBJECT_CLIENT_DDE == nObjType &&
LINKUPDATE_ONCALL == GetUpdateMode() && xObj.Is() )
xObj->RemoveAllDataAdvise( this );
- return TRUE;
+ return sal_True;
}
if( xObj.Is() )
{
// should be asynschron?
if( xObj->IsPending() )
- return TRUE;
+ return sal_True;
// we do not need the object anymore
AddNextRef();
@@ -348,19 +348,19 @@ BOOL SvBaseLink::Update()
}
}
}
- return FALSE;
+ return sal_False;
}
-USHORT SvBaseLink::GetUpdateMode() const
+sal_uInt16 SvBaseLink::GetUpdateMode() const
{
return ( OBJECT_CLIENT_SO & nObjType )
? pImplData->ClientType.nUpdateMode
- : sal::static_int_cast< USHORT >( LINKUPDATE_ONCALL );
+ : sal::static_int_cast< sal_uInt16 >( LINKUPDATE_ONCALL );
}
-void SvBaseLink::_GetRealObject( BOOL bConnect)
+void SvBaseLink::_GetRealObject( sal_Bool bConnect)
{
if( !pImpl->m_pLinkMgr )
return;
@@ -377,12 +377,12 @@ void SvBaseLink::_GetRealObject( BOOL bConnect)
nObjType = OBJECT_INTERN;
xObj = pImpl->m_pLinkMgr->CreateObj( this );
- pImplData->ClientType.bIntrnlLnk = TRUE;
+ pImplData->ClientType.bIntrnlLnk = sal_True;
nObjType = OBJECT_CLIENT_DDE; // so we know what it once was!
}
else
{
- pImplData->ClientType.bIntrnlLnk = FALSE;
+ pImplData->ClientType.bIntrnlLnk = sal_False;
xObj = pImpl->m_pLinkMgr->CreateObj( this );
}
}
@@ -393,7 +393,7 @@ void SvBaseLink::_GetRealObject( BOOL bConnect)
Disconnect();
}
-ULONG SvBaseLink::GetContentType() const
+sal_uIntPtr SvBaseLink::GetContentType() const
{
if( OBJECT_CLIENT_SO & nObjType )
return pImplData->ClientType.nCntntType;
@@ -402,14 +402,14 @@ ULONG SvBaseLink::GetContentType() const
}
-BOOL SvBaseLink::SetContentType( ULONG nType )
+sal_Bool SvBaseLink::SetContentType( sal_uIntPtr nType )
{
if( OBJECT_CLIENT_SO & nObjType )
{
pImplData->ClientType.nCntntType = nType;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
LinkManager* SvBaseLink::GetLinkManager()
@@ -480,7 +480,7 @@ void SvBaseLink::Edit( Window* pParent, const Link& rEndEditHdl )
if ( !bAsync )
{
ExecuteEdit( String() );
- bWasLastEditOK = FALSE;
+ bWasLastEditOK = sal_False;
if ( pImpl->m_aEndEditLink.IsSet() )
pImpl->m_aEndEditLink.Call( this );
}
@@ -499,7 +499,7 @@ bool SvBaseLink::ExecuteEdit( const String& _rNewName )
{
sError = SfxResId( STR_DDE_ERROR );
- USHORT nFndPos = sError.Search( '%' );
+ sal_uInt16 nFndPos = sError.Search( '%' );
if( STRING_NOTFOUND != nFndPos )
{
sError.Erase( nFndPos, 1 ).Insert( sApp, nFndPos );
@@ -541,13 +541,13 @@ FileDialogHelper* SvBaseLink::GetFileDialog( sal_uInt32 nFlags, const String& rF
ImplDdeItem::~ImplDdeItem()
{
- bIsInDTOR = TRUE;
+ bIsInDTOR = sal_True;
// So that no-one gets the idea to delete the pointer when Disconnecting!
SvBaseLinkRef aRef( pLink );
aRef->Disconnect();
}
-DdeData* ImplDdeItem::Get( ULONG nFormat )
+DdeData* ImplDdeItem::Get( sal_uIntPtr nFormat )
{
if( pLink->GetObj() )
{
@@ -563,25 +563,25 @@ DdeData* ImplDdeItem::Get( ULONG nFormat )
{
aData = DdeData( (const char *)aSeq.getConstArray(), aSeq.getLength(), nFormat );
- bIsValidData = TRUE;
+ bIsValidData = sal_True;
return &aData;
}
}
}
aSeq.realloc( 0 );
- bIsValidData = FALSE;
+ bIsValidData = sal_False;
return 0;
}
-BOOL ImplDdeItem::Put( const DdeData* )
+sal_Bool ImplDdeItem::Put( const DdeData* )
{
OSL_FAIL( "ImplDdeItem::Put not implemented" );
- return FALSE;
+ return sal_False;
}
-void ImplDdeItem::AdviseLoop( BOOL bOpen )
+void ImplDdeItem::AdviseLoop( sal_Bool bOpen )
{
// Connection is closed, so also unsubscribe link
if( pLink->GetObj() )
@@ -606,13 +606,13 @@ void ImplDdeItem::AdviseLoop( BOOL bOpen )
}
-static DdeTopic* FindTopic( const String & rLinkName, USHORT* pItemStt )
+static DdeTopic* FindTopic( const String & rLinkName, sal_uInt16* pItemStt )
{
if( 0 == rLinkName.Len() )
return 0;
String sNm( rLinkName );
- USHORT nTokenPos = 0;
+ sal_uInt16 nTokenPos = 0;
String sService( sNm.GetToken( 0, cTokenSeperator, nTokenPos ) );
DdeServices& rSvc = DdeService::GetServices();
diff --git a/sfx2/source/appl/makefile.mk b/sfx2/source/appl/makefile.mk
deleted file mode 100644
index b1e633402234..000000000000
--- a/sfx2/source/appl/makefile.mk
+++ /dev/null
@@ -1,163 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..
-
-PRJNAME=sfx2
-TARGET=appl
-ENABLE_EXCEPTIONS=TRUE
-LIBTARGET=NO
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# due to compilerbugs
-.IF "$(GUI)"=="WNT"
-.IF "$(COM)"!="GCC"
-CFLAGS+=-Od
-CFLAGS+=-DENABLE_QUICKSTART_APPLET
-.ENDIF
-.ENDIF
-
-.IF "$(GUIBASE)"=="aqua"
-CFLAGS+=-DENABLE_QUICKSTART_APPLET
-.ENDIF
-
-.IF "$(GUI)"=="UNX"
- CDEFS+=-DDLL_NAME=libsfx$(DLLPOSTFIX)$(DLLPOST)
-.IF "$(ENABLE_SYSTRAY_GTK)"=="TRUE"
- PKGCONFIG_MODULES=gtk+-2.0
-.IF "$(ENABLE_GIO)"!=""
- PKGCONFIG_MODULES+=gio-2.0
- CDEFS+=-DENABLE_GIO
-.ENDIF
- .INCLUDE: pkg_config.mk
- CFLAGS+=$(PKGCONFIG_CFLAGS)
- CFLAGS+=-DENABLE_QUICKSTART_APPLET
- CDEFS+=-DPLUGIN_NAME=libqstart_gtk$(DLLPOSTFIX)$(DLLPOST)
-.ENDIF # "$(ENABLE_SYSTRAY_GTK)"=="TRUE"
-.ELSE
- CDEFS+=-DDLL_NAME=sfx$(DLLPOSTFIX)$(DLLPOST)
-.ENDIF
-
-# --- Files --------------------------------------------------------
-
-SRS1NAME=appl
-SRC1FILES = \
- app.src newhelp.src dde.src
-
-SRS2NAME=sfx
-SRC2FILES = \
- sfx.src
-
-SFX_OBJECTS = \
- $(SLO)$/app.obj \
- $(SLO)$/appbas.obj \
- $(SLO)$/appcfg.obj \
- $(SLO)$/appchild.obj \
- $(SLO)$/appdata.obj \
- $(SLO)$/appdde.obj \
- $(SLO)$/appinit.obj \
- $(SLO)$/appmain.obj \
- $(SLO)$/appmisc.obj \
- $(SLO)$/appopen.obj \
- $(SLO)$/appquit.obj \
- $(SLO)$/appreg.obj \
- $(SLO)$/appserv.obj \
- $(SLO)$/appuno.obj \
- $(SLO)$/appbaslib.obj \
- $(SLO)$/childwin.obj \
- $(SLO)$/fileobj.obj \
- $(SLO)$/helpdispatch.obj \
- $(SLO)$/helpinterceptor.obj \
- $(SLO)$/imagemgr.obj\
- $(SLO)$/imestatuswindow.obj \
- $(SLO)$/impldde.obj \
- $(SLO)$/linkmgr2.obj \
- $(SLO)$/linksrc.obj \
- $(SLO)$/lnkbase2.obj \
- $(SLO)$/module.obj \
- $(SLO)$/newhelp.obj \
- $(SLO)$/opengrf.obj \
- $(SLO)$/sfxdll.obj \
- $(SLO)$/sfxhelp.obj \
- $(SLO)$/sfxpicklist.obj \
- $(SLO)$/shutdownicon.obj \
- $(SLO)$/shutdowniconw32.obj \
- $(SLO)$/workwin.obj \
- $(SLO)$/xpackcreator.obj \
- $(SLO)$/fwkhelper.obj
-
-.IF "$(GUI)"=="OS2"
-SFX_OBJECTS += $(SLO)$/shutdowniconOs2.obj
-.ENDIF
-
-.IF "$(GUIBASE)"=="aqua"
-SFX_OBJECTS += $(SLO)$/shutdowniconaqua.obj
-.ENDIF
-
-SLOFILES = $(SFX_OBJECTS)
-LIB1TARGET= $(SLB)$/$(TARGET).lib
-LIB1OBJFILES= $(SFX_OBJECTS)
-
-.IF "$(ENABLE_SYSTRAY_GTK)"=="TRUE"
-QUICKSTART_OBJECTS = $(SLO)$/shutdowniconunx.obj
-SLOFILES += $(QUICKSTART_OBJECTS)
-
-LIB2TARGET= $(SLB)$/quickstart.lib
-LIB2OBJFILES= $(QUICKSTART_OBJECTS)
-.ENDIF
-
-.IF "$(GUI)"=="OS2"
-SLOFILES += $(SLO)$/shutdowniconOs2.obj
-.ENDIF
-
-EXCEPTIONSFILES=\
- $(SLO)$/imagemgr.obj \
- $(SLO)$/appopen.obj \
- $(SLO)$/appmain.obj \
- $(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 \
- $(SLO)$/sfxpicklist.obj \
- $(SLO)$/helpdispatch.obj \
- $(SLO)$/xpackcreator.obj
-
-
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sfx2/source/appl/module.cxx b/sfx2/source/appl/module.cxx
index a8d2c24b939a..1a92d59ea464 100644..100755
--- a/sfx2/source/appl/module.cxx
+++ b/sfx2/source/appl/module.cxx
@@ -36,10 +36,10 @@
#include <sfx2/module.hxx>
#include <sfx2/app.hxx>
#include "arrdecl.hxx"
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include <sfx2/msgpool.hxx>
#include <sfx2/tbxctrl.hxx>
-#include "stbitem.hxx"
+#include "sfx2/stbitem.hxx"
#include <sfx2/mnuitem.hxx>
#include <sfx2/childwin.hxx>
#include <sfx2/mnumgr.hxx>
@@ -69,7 +69,7 @@ public:
SfxModule_Impl();
~SfxModule_Impl();
- ImageList* GetImageList( ResMgr* pResMgr, BOOL bBig );
+ ImageList* GetImageList( ResMgr* pResMgr, bool bBig );
};
SfxModule_Impl::SfxModule_Impl()
@@ -88,7 +88,7 @@ SfxModule_Impl::~SfxModule_Impl()
delete pImgListBig;
}
-ImageList* SfxModule_Impl::GetImageList( ResMgr* pResMgr, BOOL bBig )
+ImageList* SfxModule_Impl::GetImageList( ResMgr* pResMgr, bool bBig )
{
ImageList*& rpList = bBig ? pImgListBig : pImgListSmall;
if ( !rpList )
@@ -124,7 +124,7 @@ ResMgr* SfxModule::GetResMgr()
//====================================================================
-SfxModule::SfxModule( ResMgr* pMgrP, BOOL bDummyP,
+SfxModule::SfxModule( ResMgr* pMgrP, sal_Bool bDummyP,
SfxObjectFactory* pFactoryP, ... )
: pResMgr( pMgrP ), bDummy( bDummyP ), pImpl(0L)
{
@@ -170,7 +170,7 @@ SfxModule::~SfxModule()
// The module will be destroyed before the Deinitialize,
// so remove from the array
SfxModuleArr_Impl& rArr = GetModules_Impl();
- for( USHORT nPos = rArr.Count(); nPos--; )
+ for( sal_uInt16 nPos = rArr.Count(); nPos--; )
{
if( rArr[ nPos ] == this )
{
@@ -202,7 +202,7 @@ void SfxModule::RegisterChildWindow(SfxChildWinFactory *pFact)
if (!pImpl->pFactArr)
pImpl->pFactArr = new SfxChildWinFactArr_Impl;
- for (USHORT nFactory=0; nFactory<pImpl->pFactArr->Count(); ++nFactory)
+ for (sal_uInt16 nFactory=0; nFactory<pImpl->pFactArr->Count(); ++nFactory)
{
if (pFact->nId == (*pImpl->pFactArr)[nFactory]->nId)
{
@@ -218,13 +218,13 @@ void SfxModule::RegisterChildWindow(SfxChildWinFactory *pFact)
//-------------------------------------------------------------------------
-void SfxModule::RegisterChildWindowContext( USHORT nId,
+void SfxModule::RegisterChildWindowContext( sal_uInt16 nId,
SfxChildWinContextFactory *pFact)
{
DBG_ASSERT( pImpl, "No real Module!" );
- USHORT nCount = pImpl->pFactArr->Count();
- for (USHORT nFactory=0; nFactory<nCount; ++nFactory)
+ sal_uInt16 nCount = pImpl->pFactArr->Count();
+ for (sal_uInt16 nFactory=0; nFactory<nCount; ++nFactory)
{
SfxChildWinFactory *pF = (*pImpl->pFactArr)[nFactory];
if ( nId == pF->nId )
@@ -247,7 +247,7 @@ void SfxModule::RegisterToolBoxControl( SfxTbxCtrlFactory *pFact )
pImpl->pTbxCtrlFac = new SfxTbxCtrlFactArr_Impl;
#ifdef DBG_UTIL
- for ( USHORT n=0; n<pImpl->pTbxCtrlFac->Count(); n++ )
+ for ( sal_uInt16 n=0; n<pImpl->pTbxCtrlFac->Count(); n++ )
{
SfxTbxCtrlFactory *pF = (*pImpl->pTbxCtrlFac)[n];
if ( pF->nTypeId && pF->nTypeId == pFact->nTypeId &&
@@ -269,7 +269,7 @@ void SfxModule::RegisterStatusBarControl( SfxStbCtrlFactory *pFact )
pImpl->pStbCtrlFac = new SfxStbCtrlFactArr_Impl;
#ifdef DBG_UTIL
- for ( USHORT n=0; n<pImpl->pStbCtrlFac->Count(); n++ )
+ for ( sal_uInt16 n=0; n<pImpl->pStbCtrlFac->Count(); n++ )
{
SfxStbCtrlFactory *pF = (*pImpl->pStbCtrlFac)[n];
if ( pF->nTypeId && pF->nTypeId == pFact->nTypeId &&
@@ -291,7 +291,7 @@ void SfxModule::RegisterMenuControl( SfxMenuCtrlFactory *pFact )
pImpl->pMenuCtrlFac = new SfxMenuCtrlFactArr_Impl;
#ifdef DBG_UTIL
- for ( USHORT n=0; n<pImpl->pMenuCtrlFac->Count(); n++ )
+ for ( sal_uInt16 n=0; n<pImpl->pMenuCtrlFac->Count(); n++ )
{
SfxMenuCtrlFactory *pF = (*pImpl->pMenuCtrlFac)[n];
if ( pF->nTypeId && pF->nTypeId == pFact->nTypeId &&
@@ -333,12 +333,12 @@ SfxChildWinFactArr_Impl* SfxModule::GetChildWinFactories_Impl() const
return pImpl->pFactArr;
}
-ImageList* SfxModule::GetImageList_Impl( BOOL bBig )
+ImageList* SfxModule::GetImageList_Impl( sal_Bool bBig )
{
return pImpl->GetImageList( pResMgr, bBig );
}
-SfxTabPage* SfxModule::CreateTabPage( USHORT, Window*, const SfxItemSet& )
+SfxTabPage* SfxModule::CreateTabPage( sal_uInt16, Window*, const SfxItemSet& )
{
return NULL;
}
@@ -355,7 +355,7 @@ void SfxModule::DestroyModules_Impl()
if ( pModules )
{
SfxModuleArr_Impl& rModules = *pModules;
- for( USHORT nPos = rModules.Count(); nPos--; )
+ for( sal_uInt16 nPos = rModules.Count(); nPos--; )
{
SfxModule* pMod = rModules.GetObject(nPos);
delete pMod;
@@ -363,22 +363,22 @@ void SfxModule::DestroyModules_Impl()
}
}
-void SfxModule::Invalidate( USHORT nId )
+void SfxModule::Invalidate( sal_uInt16 nId )
{
for( SfxViewFrame* pFrame = SfxViewFrame::GetFirst(); pFrame; pFrame = SfxViewFrame::GetNext( *pFrame ) )
if ( pFrame->GetObjectShell()->GetModule() == this )
Invalidate_Impl( pFrame->GetBindings(), nId );
}
-BOOL SfxModule::IsActive() const
+sal_Bool SfxModule::IsActive() const
{
SfxViewFrame* pFrame = SfxViewFrame::Current();
if ( pFrame && pFrame->GetObjectShell()->GetFactory().GetModule() == this )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
-bool SfxModule::IsChildWindowAvailable( const USHORT i_nId, const SfxViewFrame* i_pViewFrame ) const
+bool SfxModule::IsChildWindowAvailable( const sal_uInt16 i_nId, const SfxViewFrame* i_pViewFrame ) const
{
if ( i_nId != SID_TASKPANE )
// by default, assume it is
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 17f0087109f4..605b674e23ab 100644..100755
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -31,16 +31,16 @@
#include "newhelp.hxx"
#include <sfx2/sfxuno.hxx>
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include "helpinterceptor.hxx"
#include "helper.hxx"
#include <sfx2/msgpool.hxx>
#include <sfx2/app.hxx>
#include "sfxtypes.hxx"
#include "panelist.hxx"
-#include "imgmgr.hxx"
+#include "sfx2/imgmgr.hxx"
#include "srchdlg.hxx"
-#include "sfxhelp.hxx"
+#include "sfx2/sfxhelp.hxx"
#include "app.hrc"
#include "newhelp.hrc"
@@ -182,7 +182,7 @@ namespace sfx2
{
//.........................................................................
- void HandleTaskPaneList( Window* pWindow, BOOL bAddToList )
+ void HandleTaskPaneList( Window* pWindow, sal_Bool bAddToList )
{
Window* pParent = pWindow->GetParent();
DBG_ASSERT( pParent, "HandleTaskPaneList(): every window here should have a parent" );
@@ -224,7 +224,7 @@ namespace sfx2
{
nStartPos = aBoundary.endPos;
String sSearchToken( rSearchString.Copy(
- (USHORT)aBoundary.startPos, (USHORT)aBoundary.endPos - (USHORT)aBoundary.startPos ) );
+ (sal_uInt16)aBoundary.startPos, (sal_uInt16)aBoundary.endPos - (sal_uInt16)aBoundary.startPos ) );
if ( sSearchToken.Len() > 0 && ( sSearchToken.Len() > 1 || sSearchToken.GetChar(0) != '.' ) )
{
if ( bForSearch && sSearchToken.GetChar( sSearchToken.Len() - 1 ) != '*' )
@@ -266,7 +266,7 @@ struct IndexEntry_Impl
};
#define NEW_ENTRY( url, bool ) \
- (void*)(ULONG)( new IndexEntry_Impl( url, bool ) )
+ (void*)(sal_uIntPtr)( new IndexEntry_Impl( url, bool ) )
// struct ContentEntry_Impl ----------------------------------------------
@@ -290,7 +290,7 @@ ContentListBox_Impl::ContentListBox_Impl( Window* pParent, const ResId& rResId )
aDocumentImage ( SfxResId( IMG_HELP_CONTENT_DOC ) )
{
- SetWindowBits( WB_HIDESELECTION | WB_HSCROLL );
+ SetStyle( GetStyle() | WB_HIDESELECTION | WB_HSCROLL );
SetEntryHeight( 16 );
SetSelectionMode( SINGLE_SELECTION );
@@ -307,7 +307,7 @@ ContentListBox_Impl::ContentListBox_Impl( Window* pParent, const ResId& rResId )
ContentListBox_Impl::~ContentListBox_Impl()
{
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
SvLBoxEntry* pEntry = GetEntry( nPos++ );
while ( pEntry )
{
@@ -327,7 +327,7 @@ void ContentListBox_Impl::InitRoot()
SfxContentHelper::GetHelpTreeViewContents( aHelpTreeviewURL );
const ::rtl::OUString* pEntries = aList.getConstArray();
- UINT32 i, nCount = aList.getLength();
+ sal_uInt32 i, nCount = aList.getLength();
for ( i = 0; i < nCount; ++i )
{
String aRow( pEntries[i] );
@@ -337,7 +337,7 @@ void ContentListBox_Impl::InitRoot()
aURL = aRow.GetToken( 0, '\t', nIdx );
sal_Unicode cFolder = aRow.GetToken( 0, '\t', nIdx ).GetChar(0);
sal_Bool bIsFolder = ( '1' == cFolder );
- SvLBoxEntry* pEntry = InsertEntry( aTitle, aOpenBookImage, aClosedBookImage, NULL, TRUE );
+ SvLBoxEntry* pEntry = InsertEntry( aTitle, aOpenBookImage, aClosedBookImage, NULL, sal_True );
if ( bIsFolder )
pEntry->SetUserData( new ContentEntry_Impl( aURL, sal_True ) );
}
@@ -372,7 +372,7 @@ void ContentListBox_Impl::RequestingChilds( SvLBoxEntry* pParent )
SfxContentHelper::GetHelpTreeViewContents( aTmpURL );
const ::rtl::OUString* pEntries = aList.getConstArray();
- UINT32 i, nCount = aList.getLength();
+ sal_uInt32 i, nCount = aList.getLength();
for ( i = 0; i < nCount; ++i )
{
String aRow( pEntries[i] );
@@ -385,7 +385,7 @@ void ContentListBox_Impl::RequestingChilds( SvLBoxEntry* pParent )
SvLBoxEntry* pEntry = NULL;
if ( bIsFolder )
{
- pEntry = InsertEntry( aTitle, aOpenBookImage, aClosedBookImage, pParent, TRUE );
+ pEntry = InsertEntry( aTitle, aOpenBookImage, aClosedBookImage, pParent, sal_True );
pEntry->SetUserData( new ContentEntry_Impl( aURL, sal_True ) );
}
else
@@ -490,15 +490,15 @@ IndexBox_Impl::IndexBox_Impl( Window* pParent, const ResId& rResId ) :
ComboBox( pParent, rResId )
{
- EnableAutocomplete( TRUE );
- EnableUserDraw( TRUE );
+ EnableAutocomplete( sal_True );
+ EnableUserDraw( sal_True );
}
// -----------------------------------------------------------------------
void IndexBox_Impl::UserDraw( const UserDrawEvent& rUDEvt )
{
- IndexEntry_Impl* pEntry = (IndexEntry_Impl*)(ULONG)GetEntryData( rUDEvt.GetItemId() );
+ IndexEntry_Impl* pEntry = (IndexEntry_Impl*)(sal_uIntPtr)GetEntryData( rUDEvt.GetItemId() );
if ( pEntry && pEntry->m_bSubEntry )
{
// indent sub entries
@@ -506,11 +506,11 @@ void IndexBox_Impl::UserDraw( const UserDrawEvent& rUDEvt )
aPos.X() += 8;
aPos.Y() += ( rUDEvt.GetRect().GetHeight() - rUDEvt.GetDevice()->GetTextHeight() ) / 2;
String aEntry( GetEntry( rUDEvt.GetItemId() ) );
- USHORT nPos = aEntry.Search( ';' );
+ sal_uInt16 nPos = aEntry.Search( ';' );
rUDEvt.GetDevice()->DrawText( aPos, ( nPos != STRING_NOTFOUND ) ? aEntry.Copy( nPos + 1 ) : aEntry );
}
else
- DrawEntry( rUDEvt, FALSE, TRUE, TRUE );
+ DrawEntry( rUDEvt, sal_False, sal_True, sal_True );
}
// -----------------------------------------------------------------------
@@ -532,16 +532,16 @@ long IndexBox_Impl::Notify( NotifyEvent& rNEvt )
void IndexBox_Impl::SelectExecutableEntry()
{
- USHORT nPos = GetEntryPos( GetText() );
+ sal_uInt16 nPos = GetEntryPos( GetText() );
if ( nPos != COMBOBOX_ENTRY_NOTFOUND )
{
- USHORT nOldPos = nPos;
+ sal_uInt16 nOldPos = nPos;
String aEntryText;
- IndexEntry_Impl* pEntry = (IndexEntry_Impl*)(ULONG)GetEntryData( nPos );
- USHORT nCount = GetEntryCount();
+ IndexEntry_Impl* pEntry = (IndexEntry_Impl*)(sal_uIntPtr)GetEntryData( nPos );
+ sal_uInt16 nCount = GetEntryCount();
while ( nPos < nCount && ( !pEntry || pEntry->m_aURL.Len() == 0 ) )
{
- pEntry = (IndexEntry_Impl*)(ULONG)GetEntryData( ++nPos );
+ pEntry = (IndexEntry_Impl*)(sal_uIntPtr)GetEntryData( ++nPos );
aEntryText = GetEntry( nPos );
}
@@ -635,7 +635,7 @@ void IndexTabPage_Impl::InitializeIndex()
append[k] = sal_Unicode( ' ' );
sfx2::KeywordInfo aInfo;
- aIndexCB.SetUpdateMode( FALSE );
+ aIndexCB.SetUpdateMode( sal_False );
try
{
@@ -669,7 +669,7 @@ void IndexTabPage_Impl::InitializeIndex()
( aAnySeq[2] >>= aAnchorRefList ) && ( aAnySeq[3] >>= aTitleRefList ) )
{
sal_Bool insert;
- USHORT nPos;
+ sal_uInt16 nPos;
int ndx,tmp;
::rtl::OUString aIndex, aTempString;
::rtl::OUStringBuffer aData( 128 ); // Capacity of up to 128 characters
@@ -735,7 +735,7 @@ void IndexTabPage_Impl::InitializeIndex()
OSL_FAIL( "IndexTabPage_Impl::InitializeIndex(): unexpected exception" );
}
- aIndexCB.SetUpdateMode( TRUE );
+ aIndexCB.SetUpdateMode( sal_True );
if ( sKeyword.Len() > 0 )
aKeywordLink.Call( this );
@@ -748,9 +748,9 @@ void IndexTabPage_Impl::InitializeIndex()
void IndexTabPage_Impl::ClearIndex()
{
- USHORT nCount = aIndexCB.GetEntryCount();
- for ( USHORT i = 0; i < nCount; ++i )
- delete (IndexEntry_Impl*)(ULONG)aIndexCB.GetEntryData(i);
+ sal_uInt16 nCount = aIndexCB.GetEntryCount();
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
+ delete (IndexEntry_Impl*)(sal_uIntPtr)aIndexCB.GetEntryData(i);
aIndexCB.Clear();
}
@@ -859,7 +859,7 @@ void IndexTabPage_Impl::SetFactory( const String& rFactory )
String IndexTabPage_Impl::GetSelectEntry() const
{
String aRet;
- IndexEntry_Impl* pEntry = (IndexEntry_Impl*)(ULONG)aIndexCB.GetEntryData( aIndexCB.GetEntryPos( aIndexCB.GetText() ) );
+ IndexEntry_Impl* pEntry = (IndexEntry_Impl*)(sal_uIntPtr)aIndexCB.GetEntryData( aIndexCB.GetEntryPos( aIndexCB.GetText() ) );
if ( pEntry )
aRet = pEntry->m_aURL;
return aRet;
@@ -884,7 +884,7 @@ sal_Bool IndexTabPage_Impl::HasKeyword() const
sal_Bool bRet = sal_False;
if ( sKeyword.Len() > 0 )
{
- USHORT nPos = aIndexCB.GetEntryPos( sKeyword );
+ sal_uInt16 nPos = aIndexCB.GetEntryPos( sKeyword );
bRet = ( nPos != LISTBOX_ENTRY_NOTFOUND );
}
@@ -898,10 +898,10 @@ sal_Bool IndexTabPage_Impl::HasKeywordIgnoreCase()
sal_Bool bRet = sal_False;
if ( sKeyword.Len() > 0 )
{
- USHORT nEntries = aIndexCB.GetEntryCount();
+ sal_uInt16 nEntries = aIndexCB.GetEntryCount();
String sIndexItem;
const vcl::I18nHelper& rI18nHelper = GetSettings().GetLocaleI18nHelper();
- for ( USHORT n = 0; n < nEntries; n++)
+ for ( sal_uInt16 n = 0; n < nEntries; n++)
{
sIndexItem = aIndexCB.GetEntry( n );
if (rI18nHelper.MatchString( sIndexItem, sKeyword ))
@@ -1001,12 +1001,12 @@ SearchTabPage_Impl::SearchTabPage_Impl( Window* pParent, SfxHelpIndexWindow_Impl
if ( aUserItem >>= aTemp )
{
aUserData = String( aTemp );
- BOOL bChecked = ( 1 == aUserData.GetToken(0).ToInt32() ) ? TRUE : FALSE;
+ sal_Bool bChecked = ( 1 == aUserData.GetToken(0).ToInt32() ) ? sal_True : sal_False;
aFullWordsCB.Check( bChecked );
- bChecked = ( 1 == aUserData.GetToken(1).ToInt32() ) ? TRUE : FALSE;
+ bChecked = ( 1 == aUserData.GetToken(1).ToInt32() ) ? sal_True : sal_False;
aScopeCB.Check( bChecked );
- for ( USHORT i = 2; i < aUserData.GetTokenCount(); ++i )
+ for ( sal_uInt16 i = 2; i < aUserData.GetTokenCount(); ++i )
{
String aToken = aUserData.GetToken(i);
aSearchED.InsertEntry( INetURLObject::decode(
@@ -1029,9 +1029,9 @@ SearchTabPage_Impl::~SearchTabPage_Impl()
nChecked = aScopeCB.IsChecked() ? 1 : 0;
aUserData += String::CreateFromInt32( nChecked );
aUserData += ';';
- USHORT nCount = Min( aSearchED.GetEntryCount(), (USHORT)10 ); // save only 10 entries
+ sal_uInt16 nCount = Min( aSearchED.GetEntryCount(), (sal_uInt16)10 ); // save only 10 entries
- for ( USHORT i = 0; i < nCount; ++i )
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
rtl::OUString aText = aSearchED.GetEntry(i);
aUserData += String(INetURLObject::encode(
@@ -1049,9 +1049,9 @@ SearchTabPage_Impl::~SearchTabPage_Impl()
void SearchTabPage_Impl::ClearSearchResults()
{
- USHORT nCount = aResultsLB.GetEntryCount();
- for ( USHORT i = 0; i < nCount; ++i )
- delete (String*)(ULONG)aResultsLB.GetEntryData(i);
+ sal_uInt16 nCount = aResultsLB.GetEntryCount();
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
+ delete (String*)(sal_uIntPtr)aResultsLB.GetEntryData(i);
aResultsLB.Clear();
aResultsLB.Update();
}
@@ -1060,7 +1060,7 @@ void SearchTabPage_Impl::ClearSearchResults()
void SearchTabPage_Impl::RememberSearchText( const String& rSearchText )
{
- for ( USHORT i = 0; i < aSearchED.GetEntryCount(); ++i )
+ for ( sal_uInt16 i = 0; i < aSearchED.GetEntryCount(); ++i )
{
if ( rSearchText == aSearchED.GetEntry(i) )
{
@@ -1093,7 +1093,7 @@ IMPL_LINK( SearchTabPage_Impl, SearchHdl, PushButton*, EMPTYARG )
aSearchURL += DEFINE_CONST_UNICODE("&Scope=Heading");
Sequence< ::rtl::OUString > aFactories = SfxContentHelper::GetResultSet( aSearchURL );
const ::rtl::OUString* pFacs = aFactories.getConstArray();
- UINT32 i, nCount = aFactories.getLength();
+ sal_uInt32 i, nCount = aFactories.getLength();
for ( i = 0; i < nCount; ++i )
{
String aRow( pFacs[i] );
@@ -1102,8 +1102,8 @@ IMPL_LINK( SearchTabPage_Impl, SearchHdl, PushButton*, EMPTYARG )
aTitle = aRow.GetToken( 0, '\t', nIdx );
aType = aRow.GetToken( 0, '\t', nIdx );
String* pURL = new String( aRow.GetToken( 0, '\t', nIdx ) );
- USHORT nPos = aResultsLB.InsertEntry( aTitle );
- aResultsLB.SetEntryData( nPos, (void*)(ULONG)pURL );
+ sal_uInt16 nPos = aResultsLB.InsertEntry( aTitle );
+ aResultsLB.SetEntryData( nPos, (void*)(sal_uIntPtr)pURL );
}
LeaveWait();
@@ -1204,7 +1204,7 @@ void SearchTabPage_Impl::SetDoubleClickHdl( const Link& rLink )
String SearchTabPage_Impl::GetSelectEntry() const
{
String aRet;
- String* pData = (String*)(ULONG)aResultsLB.GetEntryData( aResultsLB.GetSelectEntryPos() );
+ String* pData = (String*)(sal_uIntPtr)aResultsLB.GetEntryData( aResultsLB.GetSelectEntryPos() );
if ( pData )
aRet = String( *pData );
return aRet;
@@ -1272,11 +1272,11 @@ BookmarksBox_Impl::~BookmarksBox_Impl()
SvtHistoryOptions aHistOpt;
aHistOpt.Clear( eHELPBOOKMARKS );
rtl::OUString sEmpty;
- USHORT nCount = GetEntryCount();
- for ( USHORT i = 0; i < nCount; ++i )
+ sal_uInt16 nCount = GetEntryCount();
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
String aTitle = GetEntry(i);
- String* pURL = (String*)(ULONG)GetEntryData(i);
+ String* pURL = (String*)(sal_uIntPtr)GetEntryData(i);
aHistOpt.AppendItem( eHELPBOOKMARKS, rtl::OUString( *pURL ), sEmpty, rtl::OUString( aTitle ), sEmpty );
delete pURL;
}
@@ -1284,7 +1284,7 @@ BookmarksBox_Impl::~BookmarksBox_Impl()
// -----------------------------------------------------------------------
-void BookmarksBox_Impl::DoAction( USHORT nAction )
+void BookmarksBox_Impl::DoAction( sal_uInt16 nAction )
{
switch ( nAction )
{
@@ -1294,19 +1294,19 @@ void BookmarksBox_Impl::DoAction( USHORT nAction )
case MID_RENAME :
{
- USHORT nPos = GetSelectEntryPos();
+ sal_uInt16 nPos = GetSelectEntryPos();
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
{
SfxAddHelpBookmarkDialog_Impl aDlg( this, sal_True );
aDlg.SetTitle( GetEntry( nPos ) );
if ( aDlg.Execute() == RET_OK )
{
- String* pURL = (String*)(ULONG)GetEntryData( nPos );
+ String* pURL = (String*)(sal_uIntPtr)GetEntryData( nPos );
RemoveEntry( nPos );
rtl::OUString aImageURL = IMAGE_URL;
aImageURL += INetURLObject( *pURL ).GetHost();
nPos = InsertEntry( aDlg.GetTitle(), SvFileInformationManager::GetImage( aImageURL, false ) );
- SetEntryData( nPos, (void*)(ULONG)( new String( *pURL ) ) );
+ SetEntryData( nPos, (void*)(sal_uIntPtr)( new String( *pURL ) ) );
SelectEntryPos( nPos );
delete pURL;
}
@@ -1316,11 +1316,11 @@ void BookmarksBox_Impl::DoAction( USHORT nAction )
case MID_DELETE :
{
- USHORT nPos = GetSelectEntryPos();
+ sal_uInt16 nPos = GetSelectEntryPos();
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
{
RemoveEntry( nPos );
- USHORT nCount = GetEntryCount();
+ sal_uInt16 nCount = GetEntryCount();
if ( nCount )
{
if ( nPos >= nCount )
@@ -1338,10 +1338,10 @@ void BookmarksBox_Impl::DoAction( USHORT nAction )
long BookmarksBox_Impl::Notify( NotifyEvent& rNEvt )
{
long nRet = 0;
- USHORT nType = rNEvt.GetType();
+ sal_uInt16 nType = rNEvt.GetType();
if ( EVENT_KEYINPUT == nType )
{
- USHORT nCode = rNEvt.GetKeyEvent()->GetKeyCode().GetCode();
+ sal_uInt16 nCode = rNEvt.GetKeyEvent()->GetKeyCode().GetCode();
if ( KEY_DELETE == nCode && GetEntryCount() > 0 )
{
DoAction( MID_DELETE );
@@ -1393,7 +1393,7 @@ BookmarksTabPage_Impl::BookmarksTabPage_Impl( Window* pParent, SfxHelpIndexWindo
::rtl::OUString aTitle;
::rtl::OUString aURL;
- UINT32 i, nCount = aBookmarkSeq.getLength();
+ sal_uInt32 i, nCount = aBookmarkSeq.getLength();
for ( i = 0; i < nCount; ++i )
{
GetBookmarkEntry_Impl( aBookmarkSeq[i], aTitle, aURL );
@@ -1466,7 +1466,7 @@ void BookmarksTabPage_Impl::SetDoubleClickHdl( const Link& rLink )
String BookmarksTabPage_Impl::GetSelectEntry() const
{
String aRet;
- String* pData = (String*)(ULONG)aBookmarksBox.GetEntryData( aBookmarksBox.GetSelectEntryPos() );
+ String* pData = (String*)(sal_uIntPtr)aBookmarksBox.GetEntryData( aBookmarksBox.GetSelectEntryPos() );
if ( pData )
aRet = String( *pData );
return aRet;
@@ -1478,8 +1478,8 @@ void BookmarksTabPage_Impl::AddBookmarks( const String& rTitle, const String& rU
{
rtl::OUString aImageURL = IMAGE_URL;
aImageURL += INetURLObject( rURL ).GetHost();
- USHORT nPos = aBookmarksBox.InsertEntry( rTitle, SvFileInformationManager::GetImage( aImageURL, false ) );
- aBookmarksBox.SetEntryData( nPos, (void*)(ULONG)( new String( rURL ) ) );
+ sal_uInt16 nPos = aBookmarksBox.InsertEntry( rTitle, SvFileInformationManager::GetImage( aImageURL, false ) );
+ aBookmarksBox.SetEntryData( nPos, (void*)(sal_uIntPtr)( new String( rURL ) ) );
}
// class SfxHelpIndexWindow_Impl -----------------------------------------
@@ -1599,7 +1599,7 @@ SfxHelpIndexWindow_Impl::SfxHelpIndexWindow_Impl( SfxHelpWindow_Impl* _pParent )
SvtViewOptions aViewOpt( E_TABDIALOG, CONFIGNAME_INDEXWIN );
if ( aViewOpt.Exists() )
nPageId = aViewOpt.GetPageID();
- aTabCtrl.SetCurPageId( (USHORT)nPageId );
+ aTabCtrl.SetCurPageId( (sal_uInt16)nPageId );
ActivatePageHdl( &aTabCtrl );
aActiveLB.SetSelectHdl( LINK( this, SfxHelpIndexWindow_Impl, SelectHdl ) );
nMinWidth = ( aActiveLB.GetSizePixel().Width() / 2 );
@@ -1620,8 +1620,8 @@ SfxHelpIndexWindow_Impl::~SfxHelpIndexWindow_Impl()
DELETEZ( pSPage );
DELETEZ( pBPage );
- for ( USHORT i = 0; i < aActiveLB.GetEntryCount(); ++i )
- delete (String*)(ULONG)aActiveLB.GetEntryData(i);
+ for ( sal_uInt16 i = 0; i < aActiveLB.GetEntryCount(); ++i )
+ delete (String*)(sal_uIntPtr)aActiveLB.GetEntryData(i);
SvtViewOptions aViewOpt( E_TABDIALOG, CONFIGNAME_INDEXWIN );
aViewOpt.SetPageID( (sal_Int32)aTabCtrl.GetCurPageId() );
@@ -1635,7 +1635,7 @@ void SfxHelpIndexWindow_Impl::Initialize()
AppendConfigToken( aHelpURL, sal_True );
Sequence< ::rtl::OUString > aFactories = SfxContentHelper::GetResultSet( aHelpURL );
const ::rtl::OUString* pFacs = aFactories.getConstArray();
- UINT32 i, nCount = aFactories.getLength();
+ sal_uInt32 i, nCount = aFactories.getLength();
for ( i = 0; i < nCount; ++i )
{
String aRow( pFacs[i] );
@@ -1645,11 +1645,11 @@ void SfxHelpIndexWindow_Impl::Initialize()
aType = aRow.GetToken( 0, '\t', nIdx );
aURL = aRow.GetToken( 0, '\t', nIdx );
String* pFactory = new String( INetURLObject( aURL ).GetHost() );
- USHORT nPos = aActiveLB.InsertEntry( aTitle );
- aActiveLB.SetEntryData( nPos, (void*)(ULONG)pFactory );
+ sal_uInt16 nPos = aActiveLB.InsertEntry( aTitle );
+ aActiveLB.SetEntryData( nPos, (void*)(sal_uIntPtr)pFactory );
}
- aActiveLB.SetDropDownLineCount( (USHORT)nCount );
+ aActiveLB.SetDropDownLineCount( (sal_uInt16)nCount );
if ( aActiveLB.GetSelectEntryPos() == LISTBOX_ENTRY_NOTFOUND )
SetActiveFactory();
}
@@ -1665,9 +1665,9 @@ void SfxHelpIndexWindow_Impl::SetActiveFactory()
InitHdl( NULL );
}
- for ( USHORT i = 0; i < aActiveLB.GetEntryCount(); ++i )
+ for ( sal_uInt16 i = 0; i < aActiveLB.GetEntryCount(); ++i )
{
- String* pFactory = (String*)(ULONG)aActiveLB.GetEntryData(i);
+ String* pFactory = (String*)(sal_uIntPtr)aActiveLB.GetEntryData(i);
pFactory->ToLowerAscii();
if ( *pFactory == pIPage->GetFactory() )
{
@@ -1683,7 +1683,7 @@ void SfxHelpIndexWindow_Impl::SetActiveFactory()
// -----------------------------------------------------------------------
-HelpTabPage_Impl* SfxHelpIndexWindow_Impl::GetCurrentPage( USHORT& rCurId )
+HelpTabPage_Impl* SfxHelpIndexWindow_Impl::GetCurrentPage( sal_uInt16& rCurId )
{
rCurId = aTabCtrl.GetCurPageId();
HelpTabPage_Impl* pPage = NULL;
@@ -1723,7 +1723,7 @@ HelpTabPage_Impl* SfxHelpIndexWindow_Impl::GetCurrentPage( USHORT& rCurId )
IMPL_LINK( SfxHelpIndexWindow_Impl, ActivatePageHdl, TabControl *, pTabCtrl )
{
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
TabPage* pPage = GetCurrentPage( nId );
pTabCtrl->SetTabPage( nId, pPage );
return 0;
@@ -1756,7 +1756,7 @@ IMPL_LINK( SfxHelpIndexWindow_Impl, InitHdl, Timer *, EMPTYARG )
IMPL_LINK( SfxHelpIndexWindow_Impl, SelectFactoryHdl, Timer *, EMPTYARG )
{
- String* pFactory = (String*)(ULONG)aActiveLB.GetEntryData( aActiveLB.GetSelectEntryPos() );
+ String* pFactory = (String*)(sal_uIntPtr)aActiveLB.GetEntryData( aActiveLB.GetSelectEntryPos() );
if ( pFactory )
{
String aFactory( *pFactory );
@@ -1778,7 +1778,7 @@ IMPL_LINK( SfxHelpIndexWindow_Impl, KeywordHdl, IndexTabPage_Impl *, EMPTYARG )
if( !bIndex)
bIndex = pIPage->HasKeywordIgnoreCase();
// then set index or search page as current.
- USHORT nPageId = ( bIndex ) ? HELP_INDEX_PAGE_INDEX : HELP_INDEX_PAGE_SEARCH;
+ sal_uInt16 nPageId = ( bIndex ) ? HELP_INDEX_PAGE_INDEX : HELP_INDEX_PAGE_SEARCH;
if ( nPageId != aTabCtrl.GetCurPageId() )
{
aTabCtrl.SetCurPageId( nPageId );
@@ -1822,20 +1822,20 @@ void SfxHelpIndexWindow_Impl::Resize()
long SfxHelpIndexWindow_Impl::PreNotify( NotifyEvent& rNEvt )
{
long nDone = 0;
- USHORT nType = rNEvt.GetType();
+ sal_uInt16 nType = rNEvt.GetType();
if ( EVENT_KEYINPUT == nType && rNEvt.GetKeyEvent() )
{
const KeyCode& rKeyCode = rNEvt.GetKeyEvent()->GetKeyCode();
- USHORT nCode = rKeyCode.GetCode();
+ sal_uInt16 nCode = rKeyCode.GetCode();
if ( KEY_TAB == nCode )
{
// don't exit index pane with <TAB>
- USHORT nPageId = 0;
+ sal_uInt16 nPageId = 0;
HelpTabPage_Impl* pCurPage = GetCurrentPage( nPageId );
Control* pControl = pCurPage->GetLastFocusControl();
- BOOL bShift = rKeyCode.IsShift();
- BOOL bCtrl = rKeyCode.IsMod1();
+ sal_Bool bShift = rKeyCode.IsShift();
+ sal_Bool bCtrl = rKeyCode.IsMod1();
if ( !bCtrl && bShift && aActiveLB.HasChildPathFocus() )
{
pControl->GrabFocus();
@@ -1853,7 +1853,7 @@ long SfxHelpIndexWindow_Impl::PreNotify( NotifyEvent& rNEvt )
nPageId++;
else
nPageId = HELP_INDEX_PAGE_FIRST;
- aTabCtrl.SetCurPageId( (USHORT)nPageId );
+ aTabCtrl.SetCurPageId( (sal_uInt16)nPageId );
ActivatePageHdl( &aTabCtrl );
nDone = 1;
}
@@ -1951,9 +1951,9 @@ void SfxHelpIndexWindow_Impl::AddBookmarks( const String& rTitle, const String&
bool SfxHelpIndexWindow_Impl::IsValidFactory( const String& _rFactory )
{
bool bValid = false;
- for ( USHORT i = 0; i < aActiveLB.GetEntryCount(); ++i )
+ for ( sal_uInt16 i = 0; i < aActiveLB.GetEntryCount(); ++i )
{
- String* pFactory = (String*)(ULONG)aActiveLB.GetEntryData(i);
+ String* pFactory = (String*)(sal_uIntPtr)aActiveLB.GetEntryData(i);
if ( *pFactory == _rFactory )
{
bValid = true;
@@ -2126,7 +2126,7 @@ SfxHelpTextWindow_Impl::SfxHelpTextWindow_Impl( SfxHelpWindow_Impl* pParent ) :
SvtMiscOptions().AddListenerLink( LINK( this, SfxHelpTextWindow_Impl, NotifyHdl ) );
- if ( aOnStartupCB.GetHelpId() == 0 )
+ if ( !aOnStartupCB.GetHelpId().getLength() )
aOnStartupCB.SetHelpId( HID_HELP_ONSTARTUP_BOX );
}
@@ -2216,7 +2216,7 @@ void SfxHelpTextWindow_Impl::InitOnStartupBox( bool bOnlyText )
// Attention: This check boy knows two states:
// 1) Reading of the config key fails with an exception or by getting an empty Any (!) => check box must be hidden
- // 2) We read TRUE/FALSE => check box must be shown and enabled/disabled
+ // 2) We read sal_True/sal_False => check box must be shown and enabled/disabled
bool bHideBox = true;
sal_Bool bHelpAtStartup = sal_False;
@@ -2353,7 +2353,7 @@ Reference< XTextRange > SfxHelpTextWindow_Impl::getCursor() const
bool SfxHelpTextWindow_Impl::isHandledKey( const KeyCode& _rKeyCode )
{
bool bRet = false;
- USHORT nCode = _rKeyCode.GetCode();
+ sal_uInt16 nCode = _rKeyCode.GetCode();
// the keys <STRG><A> (select all), <STRG><C> (copy),
// <STRG><F> (find), <STRG><P> (print) and <STRG><W> (close window)
@@ -2562,7 +2562,7 @@ void SfxHelpTextWindow_Impl::Resize()
long SfxHelpTextWindow_Impl::PreNotify( NotifyEvent& rNEvt )
{
long nDone = 0;
- USHORT nType = rNEvt.GetType();
+ sal_uInt16 nType = rNEvt.GetType();
if ( EVENT_COMMAND == nType && rNEvt.GetCommandEvent() )
{
const CommandEvent* pCmdEvt = rNEvt.GetCommandEvent();
@@ -2640,8 +2640,8 @@ long SfxHelpTextWindow_Impl::PreNotify( NotifyEvent& rNEvt )
aMenu.InsertItem( TBI_COPY,
String( SfxResId( STR_HELP_MENU_TEXT_COPY ) ),
Image( SfxResId( IMG_HELP_TOOLBOX_COPY ) )
- );
- aMenu.SetHelpId( TBI_COPY, SID_COPY );
+ );
+ aMenu.SetHelpId( TBI_COPY, ".uno:Copy" );
aMenu.EnableItem( TBI_COPY, HasSelection() );
if ( bIsDebug )
@@ -2653,7 +2653,7 @@ long SfxHelpTextWindow_Impl::PreNotify( NotifyEvent& rNEvt )
if( SvtMenuOptions().IsEntryHidingEnabled() == sal_False )
aMenu.SetMenuFlags( aMenu.GetMenuFlags() | MENU_FLAG_HIDEDISABLEDENTRIES );
- USHORT nId = aMenu.Execute( this, aPos );
+ sal_uInt16 nId = aMenu.Execute( this, aPos );
pHelpWin->DoAction( nId );
nDone = 1;
}
@@ -2662,8 +2662,8 @@ long SfxHelpTextWindow_Impl::PreNotify( NotifyEvent& rNEvt )
{
const KeyEvent* pKEvt = rNEvt.GetKeyEvent();
const KeyCode& rKeyCode = pKEvt->GetKeyCode();
- USHORT nKeyGroup = rKeyCode.GetGroup();
- USHORT nKey = rKeyCode.GetCode();
+ sal_uInt16 nKeyGroup = rKeyCode.GetGroup();
+ sal_uInt16 nKey = rKeyCode.GetCode();
if ( KEYGROUP_ALPHA == nKeyGroup && !isHandledKey( rKeyCode ) )
{
// do nothing disables the writer accelerators
@@ -2869,23 +2869,23 @@ void SfxHelpWindow_Impl::Split()
nIndexSize = GetItemSize( INDEXWIN_ID );
nTextSize = GetItemSize( TEXTWIN_ID );
- BOOL bMod = FALSE;
+ sal_Bool bMod = sal_False;
if( nIndexSize < nMinSplitSize )
{
nIndexSize = nMinSplitSize;
nTextSize = nMaxSplitSize;
- bMod = TRUE;
+ bMod = sal_True;
}
else if( nTextSize < nMinSplitSize )
{
nTextSize = nMinSplitSize;
nIndexSize = nMaxSplitSize;
- bMod = TRUE;
+ bMod = sal_True;
}
else
- bMod = FALSE;
+ bMod = sal_False;
if( bMod )
{
@@ -2991,7 +2991,7 @@ void SfxHelpWindow_Impl::LoadConfig()
{
aUserData = String( aTemp );
DBG_ASSERT( aUserData.GetTokenCount() == 6, "invalid user data" );
- USHORT nIdx = 0;
+ sal_uInt16 nIdx = 0;
nIndexSize = aUserData.GetToken( 0, ';', nIdx ).ToInt32();
nTextSize = aUserData.GetToken( 0, ';', nIdx ).ToInt32();
sal_Int32 nWidth = aUserData.GetToken( 0, ';', nIdx ).ToInt32();
@@ -3083,7 +3083,7 @@ IMPL_LINK( SfxHelpWindow_Impl, OpenHdl, SfxHelpIndexWindow_Impl* , EMPTYARG )
::rtl::OUString sHelpURL;
- BOOL bComplete = rtl::OUString(aEntry).toAsciiLowerCase().match(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.help")),0);
+ bool bComplete = rtl::OUString(aEntry).toAsciiLowerCase().match(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.help")),0);
if (bComplete)
sHelpURL = ::rtl::OUString(aEntry);
@@ -3175,7 +3175,7 @@ void SfxHelpWindow_Impl::openDone(const ::rtl::OUString& sURL ,
xViewProps->setPropertyValue( DEFINE_CONST_OUSTRING("PreventHelpTips"), aBoolAny );
xViewProps->setPropertyValue( DEFINE_CONST_OUSTRING("ShowGraphics"), aBoolAny );
xViewProps->setPropertyValue( DEFINE_CONST_OUSTRING("ShowTables"), aBoolAny );
- xViewProps->setPropertyValue( DEFINE_CONST_OUSTRING("HelpURL"), makeAny( DEFINE_CONST_OUSTRING("HID:68245") ) );
+ xViewProps->setPropertyValue( DEFINE_CONST_OUSTRING("HelpURL"), makeAny( DEFINE_CONST_OUSTRING("HID:SFX2_HID_HELP_ONHELP") ) );
::rtl::OUString sProperty( DEFINE_CONST_OUSTRING("IsExecuteHyperlinks") );
if ( xInfo->hasPropertyByName( sProperty ) )
xViewProps->setPropertyValue( sProperty, aBoolAny );
@@ -3261,7 +3261,7 @@ long SfxHelpWindow_Impl::PreNotify( NotifyEvent& rNEvt )
{
// Backward == <ALT><LEFT> or <BACKSPACE> Forward == <ALT><RIGHT>
const KeyCode& rKeyCode = rNEvt.GetKeyEvent()->GetKeyCode();
- USHORT nKey = rKeyCode.GetCode();
+ sal_uInt16 nKey = rKeyCode.GetCode();
if ( ( rKeyCode.IsMod2() && ( KEY_LEFT == nKey || KEY_RIGHT == nKey ) ) ||
( !rKeyCode.GetModifier() && KEY_BACKSPACE == nKey && !pIndexWin->HasFocusOnEdit() ) )
{
@@ -3304,7 +3304,7 @@ void SfxHelpWindow_Impl::SetHelpURL( const String& rURL )
// -----------------------------------------------------------------------
-void SfxHelpWindow_Impl::DoAction( USHORT nActionId )
+void SfxHelpWindow_Impl::DoAction( sal_uInt16 nActionId )
{
switch ( nActionId )
{
diff --git a/sfx2/source/appl/newhelp.hrc b/sfx2/source/appl/newhelp.hrc
index 7bb9aa85678c..7bb9aa85678c 100644..100755
--- a/sfx2/source/appl/newhelp.hrc
+++ b/sfx2/source/appl/newhelp.hrc
diff --git a/sfx2/source/appl/newhelp.hxx b/sfx2/source/appl/newhelp.hxx
index 7c9bd4c90c46..ff983671fa8e 100644..100755
--- a/sfx2/source/appl/newhelp.hxx
+++ b/sfx2/source/appl/newhelp.hxx
@@ -65,7 +65,7 @@ private:
String m_sURL;
public:
- OpenStatusListener_Impl() : m_bFinished( FALSE ), m_bSuccess( FALSE ) {}
+ OpenStatusListener_Impl() : m_bFinished( sal_False ), m_bSuccess( sal_False ) {}
virtual void SAL_CALL dispatchFinished( const ::com::sun::star::frame::DispatchResultEvent& Event ) throw(::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException);
@@ -268,7 +268,7 @@ public:
class BookmarksBox_Impl : public ListBox
{
private:
- void DoAction( USHORT nAction );
+ void DoAction( sal_uInt16 nAction );
public:
BookmarksBox_Impl( Window* pParent, const ResId& rResId );
@@ -332,7 +332,7 @@ private:
void Initialize();
void SetActiveFactory();
- HelpTabPage_Impl* GetCurrentPage( USHORT& rCurId );
+ HelpTabPage_Impl* GetCurrentPage( sal_uInt16& rCurId );
inline ContentTabPage_Impl* GetContentPage();
inline IndexTabPage_Impl* GetIndexPage();
@@ -567,7 +567,7 @@ public:
void SetFactory( const String& rFactory );
void SetHelpURL( const String& rURL );
- void DoAction( USHORT nActionId );
+ void DoAction( sal_uInt16 nActionId );
void CloseWindow();
void UpdateToolbox();
diff --git a/sfx2/source/appl/newhelp.src b/sfx2/source/appl/newhelp.src
index c59eb50b193b..da59e0a35f07 100644..100755
--- a/sfx2/source/appl/newhelp.src
+++ b/sfx2/source/appl/newhelp.src
@@ -93,12 +93,14 @@ TabPage TP_HELP_INDEX
};
ComboBox CB_INDEX
{
+ HelpID = "sfx2:ComboBox:TP_HELP_INDEX:CB_INDEX";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 17 ) ;
Size = MAP_APPFONT ( 108 , 97 ) ;
};
PushButton PB_OPEN_INDEX
{
+ HelpID = "sfx2:PushButton:TP_HELP_INDEX:PB_OPEN_INDEX";
Pos = MAP_APPFONT ( 64 , 115 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Display" ;
@@ -119,6 +121,7 @@ TabPage TP_HELP_SEARCH
};
ComboBox ED_SEARCH
{
+ HelpID = "sfx2:ComboBox:TP_HELP_SEARCH:ED_SEARCH";
Border = TRUE ;
DropDown = TRUE;
Pos = MAP_APPFONT ( 6 , 17 ) ;
@@ -126,30 +129,35 @@ TabPage TP_HELP_SEARCH
};
PushButton PB_SEARCH
{
+ HelpID = "sfx2:PushButton:TP_HELP_SEARCH:PB_SEARCH";
Pos = MAP_APPFONT ( 101 , 17 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Find";
};
CheckBox CB_FULLWORDS
{
+ HelpID = "sfx2:CheckBox:TP_HELP_SEARCH:CB_FULLWORDS";
Pos = MAP_APPFONT ( 6, 34 ) ;
Size = MAP_APPFONT ( 128 , 10 ) ;
Text [ en-US ] = "~Complete words only";
};
CheckBox CB_SCOPE
{
+ HelpID = "sfx2:CheckBox:TP_HELP_SEARCH:CB_SCOPE";
Pos = MAP_APPFONT ( 6, 47 ) ;
Size = MAP_APPFONT ( 128 , 10 ) ;
Text [ en-US ] = "Find in ~headings only";
};
ListBox LB_RESULT
{
+ HelpID = "sfx2:ListBox:TP_HELP_SEARCH:LB_RESULT";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 60 ) ;
Size = MAP_APPFONT ( 128 , 30 ) ;
};
PushButton PB_OPEN_SEARCH
{
+ HelpID = "sfx2:PushButton:TP_HELP_SEARCH:PB_OPEN_SEARCH";
Pos = MAP_APPFONT ( 84 , 182 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Display" ;
@@ -170,6 +178,7 @@ TabPage TP_HELP_BOOKMARKS
};
ListBox LB_BOOKMARKS
{
+ HelpID = "sfx2:ListBox:TP_HELP_BOOKMARKS:LB_BOOKMARKS";
Border = TRUE ;
Sort = TRUE;
Pos = MAP_APPFONT ( 6 , 19 ) ;
@@ -177,6 +186,7 @@ TabPage TP_HELP_BOOKMARKS
};
PushButton PB_BOOKMARKS
{
+ HelpID = "sfx2:PushButton:TP_HELP_BOOKMARKS:PB_BOOKMARKS";
Pos = MAP_APPFONT ( 64 , 119 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Display" ;
@@ -346,6 +356,7 @@ String STR_HELP_MENU_TEXT_COPY
ModalDialog DLG_HELP_ADDBOOKMARK
{
+ HelpID = "sfx2:ModalDialog:DLG_HELP_ADDBOOKMARK";
Size = MAP_APPFONT ( 208 , 43 ) ;
Text [ en-US ] = "Add to Bookmarks";
MOVEABLE = TRUE ;
@@ -362,6 +373,7 @@ ModalDialog DLG_HELP_ADDBOOKMARK
};
Edit ED_BOOKMARK_TITLE
{
+ HelpID = "sfx2:Edit:DLG_HELP_ADDBOOKMARK:ED_BOOKMARK_TITLE";
PosSize = MAP_APPFONT ( 6 , 19 , 140 , 12 ) ;
TABSTOP = TRUE ;
BORDER = TRUE ;
diff --git a/sfx2/source/appl/opengrf.cxx b/sfx2/source/appl/opengrf.cxx
index 1c393a21a40c..0eb111dae184 100644..100755
--- a/sfx2/source/appl/opengrf.cxx
+++ b/sfx2/source/appl/opengrf.cxx
@@ -55,7 +55,7 @@
#include <unotools/pathoptions.hxx>
#include <sfx2/opengrf.hxx>
#include "app.hrc"
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
//-----------------------------------------------------------------------------
@@ -69,7 +69,7 @@ using namespace ::cppu;
//-----------------------------------------------------------------------------
-USHORT SvxOpenGrfErr2ResId( short err )
+sal_uInt16 SvxOpenGrfErr2ResId( short err )
{
switch( err )
{
@@ -119,10 +119,10 @@ SvxOpenGraphicDialog::~SvxOpenGraphicDialog()
short SvxOpenGraphicDialog::Execute()
{
- USHORT nImpRet;
- BOOL bQuitLoop(FALSE);
+ sal_uInt16 nImpRet;
+ sal_Bool bQuitLoop(sal_False);
- while( bQuitLoop == FALSE &&
+ while( bQuitLoop == sal_False &&
mpImpl->aFileDlg.Execute() == ERRCODE_NONE )
{
if( GetPath().Len() )
@@ -132,14 +132,14 @@ short SvxOpenGraphicDialog::Execute()
// check whether we can load the graphic
String aCurFilter( GetCurrentFilter() );
- USHORT nFormatNum = pFilter->GetImportFormatNumber( aCurFilter );
- USHORT nRetFormat = 0;
- USHORT nFound = USHRT_MAX;
+ sal_uInt16 nFormatNum = pFilter->GetImportFormatNumber( aCurFilter );
+ sal_uInt16 nRetFormat = 0;
+ sal_uInt16 nFound = USHRT_MAX;
// non-local?
if ( INET_PROT_FILE != aObj.GetProtocol() )
{
- SfxMedium aMed( aObj.GetMainURL( INetURLObject::NO_DECODE ), STREAM_READ, TRUE );
+ SfxMedium aMed( aObj.GetMainURL( INetURLObject::NO_DECODE ), STREAM_READ, sal_True );
aMed.DownLoad();
SvStream* pStream = aMed.GetInStream();
@@ -170,7 +170,7 @@ short SvxOpenGraphicDialog::Execute()
if ( nFound == USHRT_MAX )
{
WarningBox aWarningBox( NULL, WB_3DLOOK | WB_RETRY_CANCEL, String( SfxResId( SvxOpenGrfErr2ResId(nImpRet) ) ) );
- bQuitLoop = aWarningBox.Execute()==RET_RETRY ? FALSE : TRUE;
+ bQuitLoop = aWarningBox.Execute()==RET_RETRY ? sal_False : sal_True;
}
else
{
@@ -285,14 +285,11 @@ void SvxOpenGraphicDialog::SetCurrentFilter(const String& rStr)
mpImpl->aFileDlg.SetCurrentFilter(rStr);
}
-void SvxOpenGraphicDialog::SetControlHelpIds( const INT16* _pControlId, const INT32* _pHelpId )
+void SvxOpenGraphicDialog::SetControlHelpIds( const sal_Int16* _pControlId, const char** _pHelpId )
{
mpImpl->aFileDlg.SetControlHelpIds( _pControlId, _pHelpId );
}
-void SvxOpenGraphicDialog::SetDialogHelpId( const INT32 _nHelpId )
-{
- mpImpl->aFileDlg.SetDialogHelpId( _nHelpId );
-}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/appl/panelist.hxx b/sfx2/source/appl/panelist.hxx
index 83fa3b73b902..e5924071a64e 100644..100755
--- a/sfx2/source/appl/panelist.hxx
+++ b/sfx2/source/appl/panelist.hxx
@@ -34,17 +34,17 @@ namespace sfx2
{
// source in newhelp.cxx
- void HandleTaskPaneList( Window* pWindow, BOOL bAddToList );
+ void HandleTaskPaneList( Window* pWindow, sal_Bool bAddToList );
// pWindow: just a system window or something which is child of a system window
inline void AddToTaskPaneList( Window* pWindowToBeHandled )
{
- HandleTaskPaneList( pWindowToBeHandled, TRUE );
+ HandleTaskPaneList( pWindowToBeHandled, sal_True );
}
inline void RemoveFromTaskPaneList( Window* pWindowToBeHandled )
{
- HandleTaskPaneList( pWindowToBeHandled, FALSE );
+ HandleTaskPaneList( pWindowToBeHandled, sal_False );
}
}
diff --git a/sfx2/source/appl/sfx.src b/sfx2/source/appl/sfx.src
index 7d4bb0db1726..3bca517c5fd5 100644..100755
--- a/sfx2/source/appl/sfx.src
+++ b/sfx2/source/appl/sfx.src
@@ -27,107 +27,21 @@
#include <sfx2/sfx.hrc>
-String STR_NONAME
-{
- Text [ en-US ] = "Untitled" ;
-};
-
-String STR_NONE
-{
- Text [ en-US ] = "- None -" ;
-};
-
-String STR_CLOSE
-{
- Text [ en-US ] = "Close" ;
-};
-
-String STR_STYLE_FILTER_AUTO
-{
- Text [ en-US ] = "Automatic" ;
-};
-
String STR_STYLE_FILTER_USED
{
Text [ en-US ] = "Applied Styles" ;
};
-
-
-
String STR_STYLE_FILTER_USERDEF
{
Text [ en-US ] = "Custom Styles" ;
};
-
String STR_STYLE_FILTER_ALL
{
Text [ en-US ] = "All Styles" ;
};
-String STR_STANDARD
-{
- Text [ en-US ] = "Standard" ;
-};
-String STR_STANDARD_SHORTCUT
-{
- Text [ en-US ] = "Standard" ;
-};
-
-String STR_SFX_FILTERNAME_ALL
-{
- Text [ en-US ] = "All files (*.*)" ;
-};
-
-String STR_BYTES
-{
- Text [ en-US ] = "Bytes" ;
-};
-
-String STR_KB
-{
- Text [ en-US ] = "KB" ;
-};
-
-String STR_MB
-{
- Text [ en-US ] = "MB" ;
-};
-
-
-String STR_GB
-{
- Text [ en-US ] = "GB" ;
-};
-
-String STR_UNDO
-{
- Text [ en-US ] = "Undo: " ;
-};
-
-String STR_REDO
-{
- Text [ en-US ] = "Re~do: " ;
-};
-
-String STR_REPEAT
-{
- Text [ en-US ] = "~Repeat: " ;
-};
-
-String RID_STR_NEW_TASK
-{
- Text [ en-US ] = "New task";
-};
-QueryBox MSG_QUERY_LASTVERSION
-{
- Buttons = WB_YES_NO ;
- DefButton = WB_DEF_NO ;
- Message [ en-US ] = "Cancel all changes?" ;
-};
-
-// i66948 used in project scripting
-String STR_ERRUNOEVENTBINDUNG
+String STR_ACCTITLE_PRODUCTIVITYTOOLS
{
- Text [ en-US ] = "An appropriate component method %1\ncould not be found.\n\nCheck spelling of method name.";
+ Text [ en-US ] = "%PRODUCTNAME";
};
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index 237513dba64a..22c4afff1722 100644..100755
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -29,8 +29,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sfx2.hxx"
-#include "sfxhelp.hxx"
+#include "sfx2/sfxhelp.hxx"
+#include <set>
#include <algorithm>
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/frame/XFrame.hpp>
@@ -73,12 +74,15 @@
#include <svl/svstdarr.hxx>
#include "newhelp.hxx"
-#include "sfxresid.hxx"
+#include <sfx2/objsh.hxx>
+#include <sfx2/docfac.hxx>
+#include "sfx2/sfxresid.hxx"
#include "helper.hxx"
#include "app.hrc"
#include <sfx2/sfxuno.hxx>
#include <vcl/svapp.hxx>
#include <sfx2/frame.hxx>
+#include <rtl/string.hxx>
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::frame;
@@ -219,13 +223,13 @@ sal_Bool GetHelpAnchor_Impl( const String& _rURL, String& _rAnchor )
class SfxHelpOptions_Impl : public utl::ConfigItem
{
private:
- SvULongsSort* m_pIds;
+ std::set < rtl::OString > m_aIds;
public:
SfxHelpOptions_Impl();
~SfxHelpOptions_Impl();
- BOOL HasId( ULONG nId ) { USHORT nDummy; return m_pIds ? m_pIds->Seek_Entry( nId, &nDummy ) : FALSE; }
+ bool HasId( const rtl::OString& rId ) { return m_aIds.size() ? m_aIds.find( rId ) != m_aIds.end() : false; }
virtual void Notify( const com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames );
virtual void Commit();
};
@@ -250,7 +254,6 @@ static Sequence< ::rtl::OUString > GetPropertyNames()
SfxHelpOptions_Impl::SfxHelpOptions_Impl()
: ConfigItem( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Office.SFX/Help")) )
- , m_pIds( NULL )
{
Sequence< ::rtl::OUString > aNames = GetPropertyNames();
Sequence< Any > aValues = GetProperties( aNames );
@@ -271,11 +274,15 @@ SfxHelpOptions_Impl::SfxHelpOptions_Impl()
::rtl::OUString aCodedList;
if ( pValues[nProp] >>= aCodedList )
{
- String aTmp( aCodedList );
- USHORT nCount = aTmp.GetTokenCount( ',' );
- m_pIds = new SvULongsSort();
- for ( USHORT n=0; n<nCount; n++ )
- m_pIds->Insert( (ULONG) aTmp.GetToken( n, ',' ).ToInt64() );
+ rtl::OString aTmp( aCodedList, aCodedList.getLength(), RTL_TEXTENCODING_UTF8 );
+ sal_Int32 nIndex = 0;
+ do
+ {
+ rtl::OString aToken = aTmp.getToken( 0, ',', nIndex );
+ if ( aToken.getLength() )
+ m_aIds.insert( aToken );
+ }
+ while ( nIndex >= 0 );
}
else {
DBG_ERRORFILE( "Wrong property type!" );
@@ -295,7 +302,6 @@ SfxHelpOptions_Impl::SfxHelpOptions_Impl()
SfxHelpOptions_Impl::~SfxHelpOptions_Impl()
{
- delete m_pIds;
}
@@ -320,8 +326,7 @@ public:
~SfxHelp_Impl();
SfxHelpOptions_Impl* GetOptions();
- String GetHelpText( ULONG nHelpId, const String& rModule ); // get "Active Help"
- String GetHelpText( const rtl::OUString& aCommandURL, const String& rModule );
+ static String GetHelpText( const rtl::OUString& aCommandURL, const String& rModule );
sal_Bool HasModule( const ::rtl::OUString& rModule ); // module installed
sal_Bool IsHelpInstalled(); // module list not empty
};
@@ -364,16 +369,6 @@ void SfxHelp_Impl::Load()
}
}
-String SfxHelp_Impl::GetHelpText( ULONG nHelpId, const String& rModule )
-{
- // create help url
- String aHelpURL = SfxHelp::CreateHelpURL( nHelpId, rModule );
- // added 'active' parameter
- aHelpURL.Insert( String( DEFINE_CONST_UNICODE("&Active=true") ), aHelpURL.SearchBackward( '#' ) );
- // load help string
- return SfxContentHelper::GetActiveHelpString( aHelpURL );
-}
-
String SfxHelp_Impl::GetHelpText( const rtl::OUString& aCommandURL, const String& rModule )
{
// create help url
@@ -573,76 +568,6 @@ String SfxHelp::GetHelpModuleName_Impl()
return sModuleName;
}
-String SfxHelp::CreateHelpURL_Impl( ULONG nHelpId, const String& rModuleName )
-{
- String aModuleName( rModuleName );
- if ( aModuleName.Len() == 0 )
- aModuleName = getDefaultModule_Impl();
-
- // build up the help URL
- String aHelpURL;
- if ( aTicket.Len() )
- {
- // if there is a ticket, we are inside a plugin, so a special Help URL must be sent
- aHelpURL = DEFINE_CONST_UNICODE("vnd.sun.star.cmd:help?");
- aHelpURL += DEFINE_CONST_UNICODE("HELP_Request_Mode=contextIndex&HELP_Session_Mode=context&HELP_CallMode=portal&HELP_Device=html");
-
- if ( !nHelpId )
- {
- // no help id -> start page
- aHelpURL += DEFINE_CONST_UNICODE("&HELP_ContextID=start");
- }
- else
- {
- aHelpURL += DEFINE_CONST_UNICODE("&HELP_ContextID=");
- aHelpURL += String::CreateFromInt64( nHelpId );
- }
-
- aHelpURL += DEFINE_CONST_UNICODE("&HELP_ProgramID=");
- aHelpURL += aModuleName;
- aHelpURL += DEFINE_CONST_UNICODE("&HELP_User=");
- aHelpURL += aUser;
- aHelpURL += DEFINE_CONST_UNICODE("&HELP_Ticket=");
- aHelpURL += aTicket;
- aHelpURL += DEFINE_CONST_UNICODE("&HELP_Language=");
- aHelpURL += aLanguageStr;
- if ( aCountryStr.Len() )
- {
- aHelpURL += DEFINE_CONST_UNICODE("&HELP_Country=");
- aHelpURL += aCountryStr;
- }
- }
- else
- {
- sal_Bool bHasAnchor = sal_False;
- String aAnchor;
- aHelpURL = String::CreateFromAscii("vnd.sun.star.help://");
- aHelpURL += aModuleName;
-
- if ( !nHelpId )
- aHelpURL += String::CreateFromAscii("/start");
- else
- {
- aHelpURL += '/';
- aHelpURL += String::CreateFromInt64( nHelpId );
-
- String aTempURL = aHelpURL;
- AppendConfigToken( aTempURL, sal_True );
- bHasAnchor = GetHelpAnchor_Impl( aTempURL, aAnchor );
- }
-
- AppendConfigToken( aHelpURL, sal_True );
-
- if ( bHasAnchor )
- {
- aHelpURL += '#';
- aHelpURL += aAnchor;
- }
- }
-
- return aHelpURL;
-}
-
String SfxHelp::CreateHelpURL_Impl( const String& aCommandURL, const String& rModuleName )
{
// build up the help URL
@@ -665,7 +590,7 @@ String SfxHelp::CreateHelpURL_Impl( const String& aCommandURL, const String& rM
aHelpURL += String( rtl::Uri::encode( aCommandURL,
rtl_UriCharClassRelSegment,
rtl_UriEncodeKeepEscapes,
- RTL_TEXTENCODING_ASCII_US ));
+ RTL_TEXTENCODING_UTF8 ));
String aTempURL = aHelpURL;
AppendConfigToken( aTempURL, sal_True );
@@ -733,16 +658,68 @@ SfxHelpWindow_Impl* impl_createHelp(Reference< XFrame >& rHelpTask ,
return pHelpWindow;
}
+XubString SfxHelp::GetHelpText( const String& aCommandURL, const Window* pWindow )
+{
+ String sModuleName = GetHelpModuleName_Impl();
+ String sHelpText = pImp->GetHelpText( aCommandURL, sModuleName );
+
+ ByteString aNewHelpId;
+
+ if ( pWindow && !sHelpText.Len() )
+ {
+ // no help text found -> try with parent help id.
+ Window* pParent = pWindow->GetParent();
+ while ( pParent )
+ {
+ aNewHelpId = pParent->GetHelpId();
+ sHelpText = pImp->GetHelpText( String( aNewHelpId, RTL_TEXTENCODING_UTF8 ), sModuleName );
+ if ( sHelpText.Len() > 0 )
+ pParent = NULL;
+ else
+ pParent = pParent->GetParent();
+ }
+
+ if ( bIsDebug && !sHelpText.Len() )
+ aNewHelpId.Erase();
+ }
+
+ // add some debug information?
+ if ( bIsDebug )
+ {
+ sHelpText += DEFINE_CONST_UNICODE("\n-------------\n");
+ sHelpText += String( sModuleName );
+ sHelpText += DEFINE_CONST_UNICODE(": ");
+ sHelpText += aCommandURL;
+ if ( aNewHelpId.Len() )
+ {
+ sHelpText += DEFINE_CONST_UNICODE(" - ");
+ sHelpText += String( aNewHelpId, RTL_TEXTENCODING_UTF8 );
+ }
+ }
+
+ return sHelpText;
+}
+
/// Check for built-in help
static bool impl_hasHelpInstalled( const rtl::OUString &rLang = rtl::OUString() )
{
String aHelpRootURL( DEFINE_CONST_OUSTRING("vnd.sun.star.help://") );
- AppendConfigToken( aHelpRootURL, sal_True, rLang );
+ AppendConfigToken( aHelpRootURL, sal_True );
Sequence< ::rtl::OUString > aFactories = SfxContentHelper::GetResultSet( aHelpRootURL );
return ( aFactories.getLength() != 0 );
}
+sal_Bool SfxHelp::SearchKeyword( const XubString& rKeyword )
+{
+ return Start_Impl( String(), NULL, rKeyword );
+}
+
+sal_Bool SfxHelp::Start( const String& rURL, const Window* pWindow )
+{
+ return Start_Impl( rURL, pWindow, String() );
+}
+
/// Redirect the vnd.sun.star.help:// urls to http://help.libreoffice.org
static bool impl_showOnlineHelp( const String& rURL )
{
@@ -771,69 +748,87 @@ static bool impl_showOnlineHelp( const String& rURL )
return false;
}
-BOOL SfxHelp::Start( const String& rURL, const Window* pWindow )
+sal_Bool SfxHelp::Start_Impl( const String& rURL, const Window* pWindow, const String& rKeyword )
{
- String aHelpURL( rURL );
- INetURLObject aParser( aHelpURL );
+ String aHelpRootURL( DEFINE_CONST_OUSTRING("vnd.sun.star.help://") );
+ AppendConfigToken( aHelpRootURL, sal_True);
+ Sequence< ::rtl::OUString > aFactories = SfxContentHelper::GetResultSet( aHelpRootURL );
+
+ /* rURL may be
+ - a "real" URL
+ - a HelpID (formerly a long, now a string)
+ If rURL is a URL, CreateHelpURL should be called for this URL
+ If rURL is an arbitrary string, the same should happen, but the URL should be tried out
+ if it delivers real help content. In case only the Help Error Document is returned, the
+ parent of the window for that help was called, is asked for its HelpID.
+ For compatibility reasons this upward search is not implemented for "real" URLs.
+ Help keyword search now is implemented as own method; in former versions it
+ was done via Help::Start, but this implementation conflicted with the upward search.
+ */
+ String aHelpURL;
+ INetURLObject aParser( rURL );
INetProtocol nProtocol = aParser.GetProtocol();
+ String aHelpModuleName( GetHelpModuleName_Impl() );
- // check if it's an URL or a jump mark!
::rtl::OUString sKeyword;
- if ( nProtocol != INET_PROT_VND_SUN_STAR_HELP )
+ switch ( nProtocol )
{
- // #i90162 Accept anything that is not invalid as help id, as both
- // uno: URLs used as commands/help ids in the Office and the scheme
- // used in extension help ids (e.g. com.foocorp.foo-ext:FooDialogButton)
- // are accepted as INET_PROT_UNO respectively INET_PROT_GENERIC
- bool bAcceptAsURL = ( nProtocol != INET_PROT_NOT_VALID );
-
- // #i94891 As in some extensions help ids like foo.bar.dummy without
- // any : have been used that worked before the fix of #i90162 (see
- // above) strings containing . will be also accepted to avoid brea-
- // king the help of existing extensions.
- if( !bAcceptAsURL )
- bAcceptAsURL = ( rURL.Search( '.' ) != STRING_NOTFOUND );
-
- if ( bAcceptAsURL )
- {
- aHelpURL = CreateHelpURL_Impl( rURL, GetHelpModuleName_Impl( ) );
- }
- else
+ case INET_PROT_VND_SUN_STAR_HELP:
+ // already a vnd.sun.star.help URL -> nothing to do
+ aHelpURL = rURL;
+ break;
+ default:
{
- aHelpURL = CreateHelpURL_Impl( 0, GetHelpModuleName_Impl( ) );
+ // no URL, just a HelpID (maybe empty in case of keyword search)
+ aHelpURL = CreateHelpURL_Impl( rURL, aHelpModuleName );
// pb i91715: strings begin with ".HelpId:" are not words of the basic ide
// they are helpid-strings used by the testtool -> so we ignore them
static const String sHelpIdScheme( DEFINE_CONST_OUSTRING(".HelpId:") );
if ( rURL.Search( sHelpIdScheme ) != 0 )
sKeyword = ::rtl::OUString( rURL );
+
+ if ( pWindow && SfxContentHelper::IsHelpErrorDocument( aHelpURL ) )
+ {
+ // no help found -> try with parent help id.
+ Window* pParent = pWindow->GetParent();
+ while ( pParent )
+ {
+ ByteString aHelpId = pParent->GetHelpId();
+ aHelpURL = CreateHelpURL( String( aHelpId, RTL_TEXTENCODING_UTF8 ), aHelpModuleName );
+ if ( !SfxContentHelper::IsHelpErrorDocument( aHelpURL ) )
+ break;
+ else
+ {
+ pParent = pParent->GetParent();
+ if ( !pParent )
+ // create help url of start page ( helpid == 0 -> start page)
+ aHelpURL = CreateHelpURL( String(), aHelpModuleName );
+ }
+ }
+ }
+ break;
}
}
if ( !impl_hasHelpInstalled() )
{
if ( impl_showOnlineHelp( aHelpURL ) )
- return TRUE;
+ return sal_True;
else
{
NoHelpErrorBox aErrBox( const_cast< Window* >( pWindow ) );
aErrBox.Execute();
- return FALSE;
+ return sal_False;
}
}
Reference < XFrame > xDesktop( ::comphelper::getProcessServiceFactory()->createInstance(
DEFINE_CONST_UNICODE("com.sun.star.frame.Desktop") ), UNO_QUERY );
- // check if help is still open
- // If not - create new one and return acces directly
- // to the internal sub frame, which shows the help content.
-
- // Note further: We search for this sub frame here directly instead of
- // the real top level help task ... It's needed to have the same
- // sub frame available - so we can use it for loading (which is done
- // in both cases)!
-
+ // check if help window is still open
+ // If not, create a new one and return access directly to the internal sub frame showing the help content
+ // search must be done here; search one desktop level could return an arbitraty frame
Reference< XFrame > xHelp = xDesktop->findFrame(
::rtl::OUString(DEFINE_CONST_UNICODE("OFFICE_HELP_TASK")),
FrameSearchFlag::CHILDREN);
@@ -847,113 +842,24 @@ BOOL SfxHelp::Start( const String& rURL, const Window* pWindow )
else
pHelpWindow = (SfxHelpWindow_Impl*)VCLUnoHelper::GetWindow(xHelp->getComponentWindow());
if (!xHelp.is() || !xHelpContent.is() || !pHelpWindow)
- return FALSE;
+ return sal_False;
+
+#ifdef DBG_UTIL
+ ByteString aTmp("SfxHelp: HelpId = ");
+ aTmp += ByteString( aHelpURL, RTL_TEXTENCODING_UTF8 );
+ DBG_TRACE( aTmp.GetBuffer() );
+#endif
pHelpWindow->SetHelpURL( aHelpURL );
pHelpWindow->loadHelpContent(aHelpURL);
- if ( sKeyword.getLength() > 0 )
- pHelpWindow->OpenKeyword( sKeyword );
+ if ( rKeyword.Len() )
+ pHelpWindow->OpenKeyword( rKeyword );
Reference < ::com::sun::star::awt::XTopWindow > xTopWindow( xHelp->getContainerWindow(), UNO_QUERY );
if ( xTopWindow.is() )
xTopWindow->toFront();
- return TRUE;
-}
-
-BOOL SfxHelp::Start( ULONG nHelpId, const Window* pWindow )
-{
- String aHelpModuleName( GetHelpModuleName_Impl() );
- String aHelpURL = CreateHelpURL( nHelpId, aHelpModuleName );
- if ( impl_hasHelpInstalled() && pWindow && SfxContentHelper::IsHelpErrorDocument( aHelpURL ) )
- {
- // no help found -> try with parent help id.
- Window* pParent = pWindow->GetParent();
- while ( pParent )
- {
- nHelpId = pParent->GetSmartUniqueOrHelpId().GetNum();
- aHelpURL = CreateHelpURL( nHelpId, aHelpModuleName );
-
- if ( !SfxContentHelper::IsHelpErrorDocument( aHelpURL ) )
- break;
- else
- {
- pParent = pParent->GetParent();
- if ( !pParent )
- // create help url of start page ( helpid == 0 -> start page)
- aHelpURL = CreateHelpURL( 0, aHelpModuleName );
- }
- }
- }
-
- return Start( aHelpURL, pWindow );
-}
-
-XubString SfxHelp::GetHelpText( ULONG nHelpId, const Window* pWindow )
-{
- String aModuleName = GetHelpModuleName_Impl();
- String aHelpText = pImp->GetHelpText( nHelpId, aModuleName );
- ULONG nNewHelpId = 0;
-
- if ( pWindow && aHelpText.Len() == 0 )
- {
- // no help text found -> try with parent help id.
- Window* pParent = pWindow->GetParent();
- while ( pParent )
- {
- nNewHelpId = pParent->GetHelpId();
- aHelpText = pImp->GetHelpText( nNewHelpId, aModuleName );
-
- if ( aHelpText.Len() > 0 )
- pParent = NULL;
- else
- pParent = pParent->GetParent();
- }
-
- if ( bIsDebug && aHelpText.Len() == 0 )
- nNewHelpId = 0;
- }
-
- if ( bIsDebug )
- {
- aHelpText += DEFINE_CONST_UNICODE("\n\n");
- aHelpText += aModuleName;
- aHelpText += DEFINE_CONST_UNICODE(" - ");
- aHelpText += String::CreateFromInt64( nHelpId );
- if ( nNewHelpId )
- {
- aHelpText += DEFINE_CONST_UNICODE(" - ");
- aHelpText += String::CreateFromInt64( nNewHelpId );
- }
- }
-
- return aHelpText;
-}
-
-XubString SfxHelp::GetHelpText( const String& aCommandURL, const Window* )
-{
- String sModuleName = GetHelpModuleName_Impl();
- String sHelpText = pImp->GetHelpText( aCommandURL, sModuleName );
-
- // add some debug information?
- if ( bIsDebug )
- {
- sHelpText += DEFINE_CONST_UNICODE("\n-------------\n");
- sHelpText += String( sModuleName );
- sHelpText += DEFINE_CONST_UNICODE(": ");
- sHelpText += aCommandURL;
- }
-
- return sHelpText;
-}
-
-String SfxHelp::CreateHelpURL( ULONG nHelpId, const String& rModuleName )
-{
- String aURL;
- SfxHelp* pHelp = SAL_STATIC_CAST( SfxHelp*, Application::GetHelp() );
- if ( pHelp )
- aURL = pHelp->CreateHelpURL_Impl( nHelpId, rModuleName );
- return aURL;
+ return sal_True;
}
String SfxHelp::CreateHelpURL( const String& aCommandURL, const String& rModuleName )
@@ -965,25 +871,25 @@ String SfxHelp::CreateHelpURL( const String& aCommandURL, const String& rModuleN
return aURL;
}
-void SfxHelp::OpenHelpAgent( SfxFrame*, ULONG nHelpId )
+void SfxHelp::OpenHelpAgent( SfxFrame*, const rtl::OString& sHelpId )
{
- SfxHelp* pHelp = SAL_STATIC_CAST( SfxHelp*, Application::GetHelp() );
- if ( pHelp )
- pHelp->OpenHelpAgent( nHelpId );
+ SfxHelp* pHelp = SAL_STATIC_CAST( SfxHelp*, Application::GetHelp() );
+ if ( pHelp )
+ pHelp->OpenHelpAgent( sHelpId );
}
-void SfxHelp::OpenHelpAgent( ULONG nHelpId )
+void SfxHelp::OpenHelpAgent( const rtl::OString& sHelpId )
{
if ( SvtHelpOptions().IsHelpAgentAutoStartMode() )
{
SfxHelpOptions_Impl *pOpt = pImp->GetOptions();
- if ( !pOpt->HasId( nHelpId ) )
+ if ( !pOpt->HasId( sHelpId ) )
return;
try
{
URL aURL;
- aURL.Complete = CreateHelpURL_Impl( nHelpId, GetHelpModuleName_Impl() );
+ aURL.Complete = CreateHelpURL_Impl( String( ByteString(sHelpId), RTL_TEXTENCODING_UTF8 ), GetHelpModuleName_Impl() );
Reference < XURLTransformer > xTrans( ::comphelper::getProcessServiceFactory()->createInstance(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.URLTransformer")) ), UNO_QUERY );
xTrans->parseStrict(aURL);
diff --git a/sfx2/source/appl/sfxpicklist.cxx b/sfx2/source/appl/sfxpicklist.cxx
index 9637ce790b11..727241fd299e 100644..100755
--- a/sfx2/source/appl/sfxpicklist.cxx
+++ b/sfx2/source/appl/sfxpicklist.cxx
@@ -101,7 +101,7 @@ osl::Mutex* SfxPickList::GetOrCreateMutex()
return pMutex;
}
-void SfxPickList::CreatePicklistMenuTitle( Menu* pMenu, USHORT nItemId, const String& aURLString, sal_uInt32 nNo )
+void SfxPickList::CreatePicklistMenuTitle( Menu* pMenu, sal_uInt16 nItemId, const String& aURLString, sal_uInt32 nNo )
{
String aPickEntry;
@@ -291,8 +291,8 @@ void SfxPickList::CreateMenuEntries( Menu* pMenu )
{
PickListEntry* pEntry = GetPickListEntry( i );
- pMenu->InsertItem( (USHORT)(START_ITEMID_PICKLIST + i), aEmptyString );
- CreatePicklistMenuTitle( pMenu, (USHORT)(START_ITEMID_PICKLIST + i), pEntry->aName, i );
+ pMenu->InsertItem( (sal_uInt16)(START_ITEMID_PICKLIST + i), aEmptyString );
+ CreatePicklistMenuTitle( pMenu, (sal_uInt16)(START_ITEMID_PICKLIST + i), pEntry->aName, i );
}
bPickListMenuInitializing = sal_False;
@@ -313,7 +313,7 @@ void SfxPickList::ExecuteEntry( sal_uInt32 nIndex )
String aFilter( pPick->aFilter );
aGuard.clear();
- USHORT nPos=aFilter.Search('|');
+ sal_uInt16 nPos=aFilter.Search('|');
if( nPos != STRING_NOTFOUND )
{
String aOptions(aFilter.Copy( nPos ).GetBuffer()+1);
@@ -327,7 +327,7 @@ void SfxPickList::ExecuteEntry( sal_uInt32 nIndex )
}
}
-void SfxPickList::ExecuteMenuEntry( USHORT nId )
+void SfxPickList::ExecuteMenuEntry( sal_uInt16 nId )
{
ExecuteEntry( (sal_uInt32)( nId - START_ITEMID_PICKLIST ) );
}
@@ -445,7 +445,7 @@ void SfxPickList::Notify( SfxBroadcaster&, const SfxHint& rHint )
return;
// ignore hidden documents
- if ( !SfxViewFrame::GetFirst( pDocSh, TRUE ) )
+ if ( !SfxViewFrame::GetFirst( pDocSh, sal_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 138f48271233..abbcc16e388f 100644..100755
--- a/sfx2/source/appl/shutdownicon.cxx
+++ b/sfx2/source/appl/shutdownicon.cxx
@@ -67,7 +67,7 @@
#endif
#include <vcl/timer.hxx>
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::frame;
@@ -77,7 +77,11 @@ using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::util;
using namespace ::com::sun::star::ui::dialogs;
+#ifdef WNT
+using ::rtl::OUString;
+#else
using namespace ::rtl;
+#endif
using namespace ::sfx2;
#ifdef ENABLE_QUICKSTART_APPLET
@@ -86,6 +90,10 @@ extern "C" { static void SAL_CALL thisModule() {} }
# endif
#endif
+#if defined(UNX) && defined(ENABLE_SYSTRAY_GTK)
+#define PLUGIN_NAME "libqstart_gtkli.so"
+#endif
+
class SfxNotificationListener_Impl : public cppu::WeakImplHelper1< XDispatchResultListener >
{
public:
@@ -754,14 +762,14 @@ void SAL_CALL ShutdownIcon::initialize( const ::com::sun::star::uno::Sequence< :
void ShutdownIcon::EnterModalMode()
{
- bModalMode = TRUE;
+ bModalMode = sal_True;
}
// -------------------------------
void ShutdownIcon::LeaveModalMode()
{
- bModalMode = FALSE;
+ bModalMode = sal_False;
}
#ifdef WNT
diff --git a/sfx2/source/appl/shutdownicon.hxx b/sfx2/source/appl/shutdownicon.hxx
index 7ce6c1e8918d..7ce6c1e8918d 100644..100755
--- a/sfx2/source/appl/shutdownicon.hxx
+++ b/sfx2/source/appl/shutdownicon.hxx
diff --git a/sfx2/source/appl/shutdowniconOs2.cxx b/sfx2/source/appl/shutdowniconOs2.cxx
index 9a3ab850ae36..9a3ab850ae36 100644..100755
--- a/sfx2/source/appl/shutdowniconOs2.cxx
+++ b/sfx2/source/appl/shutdowniconOs2.cxx
diff --git a/sfx2/source/appl/shutdowniconaqua.mm b/sfx2/source/appl/shutdowniconaqua.mm
index f30f940e8bac..f30f940e8bac 100644..100755
--- a/sfx2/source/appl/shutdowniconaqua.mm
+++ b/sfx2/source/appl/shutdowniconaqua.mm
diff --git a/sfx2/source/appl/shutdowniconunx.cxx b/sfx2/source/appl/shutdowniconunx.cxx
index bb296a5e98f0..d8c33ecbb67a 100644..100755
--- a/sfx2/source/appl/shutdowniconunx.cxx
+++ b/sfx2/source/appl/shutdowniconunx.cxx
@@ -83,7 +83,7 @@ static void menu_deactivate_cb( GtkWidget *pMenu )
gtk_menu_popdown( GTK_MENU( pMenu ) );
}
-static GdkPixbuf * ResIdToPixbuf( USHORT nResId )
+static GdkPixbuf * ResIdToPixbuf( sal_uInt16 nResId )
{
ResId aResId( SV_ICON_SMALL_START + nResId, *pVCLResMgr );
BitmapEx aIcon( aResId );
@@ -128,7 +128,7 @@ static GdkPixbuf * ResIdToPixbuf( USHORT nResId )
pInSalAlpha.ReleaseAccess( pSalAlpha );
return gdk_pixbuf_new_from_data( pPixbufData,
- GDK_COLORSPACE_RGB, TRUE, 8,
+ GDK_COLORSPACE_RGB, sal_True, 8,
aSize.Width(), aSize.Height(),
aSize.Width() * 4,
(GdkPixbufDestroyNotify) g_free,
@@ -146,7 +146,7 @@ static void oustring_delete (gpointer data,
static void add_item( GtkMenuShell *pMenuShell, const char *pAsciiURL,
OUString *pOverrideLabel,
- USHORT nResId, GCallback pFnCallback )
+ sal_uInt16 nResId, GCallback pFnCallback )
{
OUString *pURL = new OUString (OStringToOUString( pAsciiURL,
RTL_TEXTENCODING_UTF8 ));
@@ -179,7 +179,7 @@ using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::beans;
static void add_ugly_db_item( GtkMenuShell *pMenuShell, const char *pAsciiURL,
- USHORT nResId, GCallback pFnCallback )
+ sal_uInt16 nResId, GCallback pFnCallback )
{
SvtDynamicMenuOptions aOpt;
Sequence < Sequence < PropertyValue > > aMenu = aOpt.GetMenu( E_NEWMENU );
@@ -304,7 +304,7 @@ static gboolean display_menu_cb( GtkWidget *,
GdkEventButton *event, GtkWidget *pMenu )
{
if (event->button == 2)
- return FALSE;
+ return sal_False;
refresh_menu( pMenu );
@@ -312,7 +312,7 @@ static gboolean display_menu_cb( GtkWidget *,
gtk_status_icon_position_menu, pTrayIcon,
0, event->time );
- return TRUE;
+ return sal_True;
}
#ifdef ENABLE_GIO
diff --git a/sfx2/source/appl/shutdowniconw32.cxx b/sfx2/source/appl/shutdowniconw32.cxx
index 72bd91ae1727..72bd91ae1727 100644..100755
--- a/sfx2/source/appl/shutdowniconw32.cxx
+++ b/sfx2/source/appl/shutdowniconw32.cxx
diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index 5c655496f439..5036790bfe70 100644..100755
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -45,7 +45,7 @@
#include <sfx2/viewsh.hxx>
#include "splitwin.hxx"
#include <sfx2/msgpool.hxx>
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include <sfx2/objsh.hxx>
#include <sfx2/request.hxx> // SFX_ITEMSET_SET
#include <vcl/taskpanelist.hxx>
@@ -72,7 +72,7 @@ namespace css = ::com::sun::star;
struct ResIdToResName
{
- USHORT nId;
+ sal_uInt16 nId;
const char* pName;
};
@@ -302,23 +302,23 @@ throw (css::uno::RuntimeException)
{
if ( eLayoutEvent == css::frame::LayoutManagerEvents::VISIBLE )
{
- m_pWrkWin->MakeVisible_Impl( TRUE );
+ m_pWrkWin->MakeVisible_Impl( sal_True );
m_pWrkWin->ShowChilds_Impl();
- m_pWrkWin->ArrangeChilds_Impl( TRUE );
+ m_pWrkWin->ArrangeChilds_Impl( sal_True );
}
else if ( eLayoutEvent == css::frame::LayoutManagerEvents::INVISIBLE )
{
- m_pWrkWin->MakeVisible_Impl( FALSE );
+ m_pWrkWin->MakeVisible_Impl( sal_False );
m_pWrkWin->HideChilds_Impl();
- m_pWrkWin->ArrangeChilds_Impl( TRUE );
+ m_pWrkWin->ArrangeChilds_Impl( sal_True );
}
else if ( eLayoutEvent == css::frame::LayoutManagerEvents::LOCK )
{
- m_pWrkWin->Lock_Impl( TRUE );
+ m_pWrkWin->Lock_Impl( sal_True );
}
else if ( eLayoutEvent == css::frame::LayoutManagerEvents::UNLOCK )
{
- m_pWrkWin->Lock_Impl( FALSE );
+ m_pWrkWin->Lock_Impl( sal_False );
}
}
}
@@ -330,7 +330,7 @@ typedef boost::unordered_map< sal_Int32, rtl::OUString > ToolBarResIdToResourceU
static sal_Bool bMapInitialized = sal_False;
static ToolBarResIdToResourceURLMap aResIdToResourceURLMap;
-static rtl::OUString GetResourceURLFromResId( USHORT nResId )
+static rtl::OUString GetResourceURLFromResId( sal_uInt16 nResId )
{
if ( !bMapInitialized )
{
@@ -356,20 +356,20 @@ static rtl::OUString GetResourceURLFromResId( USHORT nResId )
return rtl::OUString();
}
-BOOL IsAppWorkWinToolbox_Impl( USHORT nPos )
+sal_Bool IsAppWorkWinToolbox_Impl( sal_uInt16 nPos )
{
switch ( nPos )
{
case SFX_OBJECTBAR_APPLICATION :
case SFX_OBJECTBAR_MACRO:
case SFX_OBJECTBAR_FULLSCREEN:
- return TRUE;
+ return sal_True;
default:
- return FALSE;
+ return sal_False;
}
}
-USHORT TbxMatch( USHORT nPos )
+sal_uInt16 TbxMatch( sal_uInt16 nPos )
{
switch ( nPos )
{
@@ -392,9 +392,9 @@ USHORT TbxMatch( USHORT nPos )
}
}
-USHORT ChildAlignValue(SfxChildAlignment eAlign)
+sal_uInt16 ChildAlignValue(SfxChildAlignment eAlign)
{
- USHORT ret = 17;
+ sal_uInt16 ret = 17;
switch (eAlign)
{
@@ -453,9 +453,9 @@ USHORT ChildAlignValue(SfxChildAlignment eAlign)
return ret;
}
-USHORT ChildTravelValue( SfxChildAlignment eAlign )
+sal_uInt16 ChildTravelValue( SfxChildAlignment eAlign )
{
- USHORT ret = 17;
+ sal_uInt16 ret = 17;
switch (eAlign)
{
@@ -517,12 +517,12 @@ USHORT ChildTravelValue( SfxChildAlignment eAlign )
void SfxWorkWindow::Sort_Impl()
{
aSortedList.Remove(0, aSortedList.Count());
- for (USHORT i=0; i<pChilds->Count(); i++)
+ for (sal_uInt16 i=0; i<pChilds->Count(); i++)
{
SfxChild_Impl *pCli = (*pChilds)[i];
if (pCli)
{
- USHORT k;
+ sal_uInt16 k;
for (k=0; k<aSortedList.Count(); k++)
if (ChildAlignValue((*pChilds)[aSortedList[k]]->eAlign) >
ChildAlignValue(pCli->eAlign))
@@ -531,7 +531,7 @@ void SfxWorkWindow::Sort_Impl()
}
}
- bSorted = TRUE;
+ bSorted = sal_True;
}
@@ -555,7 +555,7 @@ SfxFrameWorkWin_Impl::SfxFrameWorkWin_Impl( Window *pWin, SfxFrame *pFrm, SfxFra
}
// The required split windows (one for each side) can be created
- for ( USHORT n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
+ for ( sal_uInt16 n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
{
// The SplitWindows excludes direct ChildWindows of the WorkWindows
// and receives the docked window.
@@ -584,12 +584,12 @@ SfxWorkWindow::SfxWorkWindow( Window *pWin, SfxBindings& rB, SfxWorkWindow* pPar
pActiveChild( 0 ),
nChilds( 0 ),
nOrigMode( 0 ),
- bSorted( TRUE ),
- bDockingAllowed(TRUE),
- bInternalDockingAllowed(TRUE),
- bAllChildsVisible(TRUE),
- bIsFullScreen( FALSE ),
- bShowStatusBar( TRUE ),
+ bSorted( sal_True ),
+ bDockingAllowed(sal_True),
+ bInternalDockingAllowed(sal_True),
+ bAllChildsVisible(sal_True),
+ bIsFullScreen( sal_False ),
+ bShowStatusBar( sal_True ),
m_nLock( 0 ),
m_aStatusBarResName( RTL_CONSTASCII_USTRINGPARAM( "private:resource/statusbar/statusbar" )),
m_aLayoutManagerPropName( RTL_CONSTASCII_USTRINGPARAM( "LayoutManager" )),
@@ -607,7 +607,7 @@ SfxWorkWindow::SfxWorkWindow( Window *pWin, SfxBindings& rB, SfxWorkWindow* pPar
// For the ObjectBars a integral place in the Childlist is reserved,
// so that they always come in a defined order.
SfxChild_Impl* pChild=0;
- for (USHORT n=0; n < SFX_OBJECTBAR_MAX; ++n)
+ for (sal_uInt16 n=0; n < SFX_OBJECTBAR_MAX; ++n)
pChilds->Insert(0,pChild);
// create and initialize layout manager listener
@@ -627,7 +627,7 @@ SfxWorkWindow::~SfxWorkWindow()
DBG_DTOR(SfxWorkWindow, 0);
// Delete SplitWindows
- for ( USHORT n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
+ for ( sal_uInt16 n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
{
SfxSplitWindow *p = pSplit[n];
if (p->GetWindowCount())
@@ -652,7 +652,7 @@ SystemWindow* SfxWorkWindow::GetTopWindow() const
return (SystemWindow*) pRet;
}
-void SfxWorkWindow::Lock_Impl( BOOL bLock )
+void SfxWorkWindow::Lock_Impl( sal_Bool bLock )
{
if ( bLock )
m_nLock++;
@@ -672,7 +672,7 @@ void SfxWorkWindow::ChangeWindow_Impl( Window *pNew )
{
Window *pOld = pWorkWin;
pWorkWin = pNew;
- for ( USHORT nPos = 0; nPos < pChilds->Count(); ++nPos )
+ for ( sal_uInt16 nPos = 0; nPos < pChilds->Count(); ++nPos )
{
SfxChild_Impl *pCli = (*pChilds)[nPos];
if ( pCli && pCli->pWin && pCli->pWin->GetParent() == pOld )
@@ -684,14 +684,14 @@ void SfxWorkWindow::ChangeWindow_Impl( Window *pNew )
void SfxWorkWindow::SaveStatus_Impl()
{
- USHORT nCount = pChildWins->Count();
- for ( USHORT n=0; n<nCount; n++ )
+ sal_uInt16 nCount = pChildWins->Count();
+ for ( sal_uInt16 n=0; n<nCount; n++ )
{
SfxChildWin_Impl* pCW = (*pChildWins)[n];
SfxChildWindow *pChild = pCW->pWin;
if (pChild)
{
- USHORT nFlags = pCW->aInfo.nFlags;
+ sal_uInt16 nFlags = pCW->aInfo.nFlags;
pCW->aInfo = pChild->GetInfo();
pCW->aInfo.nFlags |= nFlags;
SaveStatus_Impl(pChild, pCW->aInfo);
@@ -711,7 +711,7 @@ void SfxWorkWindow::DeleteControllers_Impl()
// Lock SplitWindows (which means supressing the Resize-Reaction of the
// DockingWindows)
- USHORT n;
+ sal_uInt16 n;
for ( n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
{
SfxSplitWindow *p = pSplit[n];
@@ -773,10 +773,10 @@ void SfxWorkWindow::DeleteControllers_Impl()
// Delete ObjectBars (this is done last, so that pChilds does not
// receive dead Pointers)
- for ( USHORT i = 0; i < aObjBarList.size(); i++ )
+ for ( sal_uInt16 i = 0; i < aObjBarList.size(); i++ )
{
// Not every position must be occupied
- USHORT nId = aObjBarList[i].nId;
+ sal_uInt16 nId = aObjBarList[i].nId;
if ( nId )
aObjBarList[i].nId = 0;
}
@@ -785,7 +785,7 @@ void SfxWorkWindow::DeleteControllers_Impl()
// ObjectBars are all released at once, since they occupy a
// fixed contiguous area in the array pChild
pChilds->Remove(0, SFX_OBJECTBAR_MAX);
- bSorted = FALSE;
+ bSorted = sal_False;
nChilds = 0;
}
@@ -793,12 +793,12 @@ void SfxWorkWindow::DeleteControllers_Impl()
//====================================================================
// Virtual method for placing the child window.
-void SfxWorkWindow::ArrangeChilds_Impl( BOOL /*bForce*/)
+void SfxWorkWindow::ArrangeChilds_Impl( sal_Bool /*bForce*/)
{
Arrange_Impl();
}
-void SfxFrameWorkWin_Impl::ArrangeChilds_Impl( BOOL bForce )
+void SfxFrameWorkWin_Impl::ArrangeChilds_Impl( sal_Bool bForce )
{
if ( pFrame->IsClosing_Impl() || ( m_nLock && !bForce ))
return;
@@ -864,7 +864,7 @@ SvBorder SfxWorkWindow::Arrange_Impl()
Size aSize;
Rectangle aTmp( aClientArea );
- for ( USHORT n=0; n<aSortedList.Count(); ++n )
+ for ( sal_uInt16 n=0; n<aSortedList.Count(); ++n )
{
SfxChild_Impl* pCli = (*pChilds)[aSortedList[n]];
if ( !pCli->pWin )
@@ -883,7 +883,7 @@ SvBorder SfxWorkWindow::Arrange_Impl()
aSize = pCli->pWin->GetSizePixel();
SvBorder aTemp = aBorder;
- BOOL bAllowHiding = TRUE;
+ sal_Bool bAllowHiding = sal_True;
switch ( pCli->eAlign )
{
case SFX_ALIGN_HIGHESTTOP:
@@ -893,7 +893,7 @@ SvBorder SfxWorkWindow::Arrange_Impl()
aSize.Width() = aTmp.GetWidth();
if ( pCli->pWin->GetType() == WINDOW_SPLITWINDOW )
aSize = ((SplitWindow *)(pCli->pWin))->CalcLayoutSizePixel( aSize );
- bAllowHiding = FALSE;
+ bAllowHiding = sal_False;
aBorder.Top() += aSize.Height();
aPos = aTmp.TopLeft();
aTmp.Top() += aSize.Height();
@@ -923,7 +923,7 @@ SvBorder SfxWorkWindow::Arrange_Impl()
aSize.Height() = aTmp.GetHeight();
if ( pCli->pWin->GetType() == WINDOW_SPLITWINDOW )
aSize = ((SplitWindow *)(pCli->pWin))->CalcLayoutSizePixel( aSize );
- bAllowHiding = FALSE;
+ bAllowHiding = sal_False;
aBorder.Left() += aSize.Width();
aPos = aTmp.TopLeft();
aTmp.Left() += aSize.Width();
@@ -948,12 +948,12 @@ SvBorder SfxWorkWindow::Arrange_Impl()
default:
pCli->aSize = pCli->pWin->GetSizePixel();
- pCli->bResize = FALSE;
+ pCli->bResize = sal_False;
continue;
}
pCli->pWin->SetPosSizePixel( aPos, aSize );
- pCli->bResize = FALSE;
+ pCli->bResize = sal_False;
pCli->aSize = aSize;
if( bAllowHiding && !RequestTopToolSpacePixel_Impl( aBorder ) )
{
@@ -995,13 +995,13 @@ SvBorder SfxWorkWindow::Arrange_Impl()
void SfxWorkWindow::Close_Impl()
{
- for (USHORT n=0; n<pChildWins->Count(); n++)
+ for (sal_uInt16 n=0; n<pChildWins->Count(); n++)
{
SfxChildWin_Impl *pCW = (*pChildWins)[n];
SfxChildWindow *pChild = pCW->pWin;
if (pChild)
{
- USHORT nFlags = pCW->aInfo.nFlags;
+ sal_uInt16 nFlags = pCW->aInfo.nFlags;
pCW->aInfo = pChild->GetInfo();
pCW->aInfo.nFlags |= nFlags;
SaveStatus_Impl(pChild, pCW->aInfo);
@@ -1009,23 +1009,23 @@ void SfxWorkWindow::Close_Impl()
}
}
-BOOL SfxWorkWindow::PrepareClose_Impl()
+sal_Bool SfxWorkWindow::PrepareClose_Impl()
{
- for (USHORT n=0; n<pChildWins->Count(); n++)
+ for (sal_uInt16 n=0; n<pChildWins->Count(); n++)
{
SfxChildWin_Impl *pCW = (*pChildWins)[n];
SfxChildWindow *pChild = pCW->pWin;
if ( pChild && !pChild->QueryClose() )
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
//--------------------------------------------------------------------
SfxChild_Impl* SfxWorkWindow::RegisterChild_Impl( Window& rWindow,
- SfxChildAlignment eAlign, BOOL bCanGetFocus )
+ SfxChildAlignment eAlign, sal_Bool bCanGetFocus )
{
DBG_CHKTHIS(SfxWorkWindow, 0);
DBG_ASSERT( pChilds->Count() < 255, "too many children" );
@@ -1041,7 +1041,7 @@ SfxChild_Impl* SfxWorkWindow::RegisterChild_Impl( Window& rWindow,
pChild->bCanGetFocus = bCanGetFocus;
pChilds->Insert(pChilds->Count(), pChild);
- bSorted = FALSE;
+ bSorted = sal_False;
nChilds++;
return (*pChilds)[pChilds->Count()-1];
}
@@ -1059,11 +1059,11 @@ void SfxWorkWindow::AlignChild_Impl( Window& rWindow,
if ( pChild )
{
if (pChild->eAlign != eAlign)
- bSorted = FALSE;
+ bSorted = sal_False;
pChild->eAlign = eAlign;
pChild->aSize = rNewSize;
- pChild->bResize = TRUE;
+ pChild->bResize = sal_True;
}
else {
OSL_FAIL( "aligning unregistered child" );
@@ -1077,7 +1077,7 @@ void SfxWorkWindow::ReleaseChild_Impl( Window& rWindow )
DBG_CHKTHIS(SfxWorkWindow, 0);
SfxChild_Impl *pChild = 0;
- USHORT nPos;
+ sal_uInt16 nPos;
for ( nPos = 0; nPos < pChilds->Count(); ++nPos )
{
pChild = (*pChilds)[nPos];
@@ -1088,7 +1088,7 @@ void SfxWorkWindow::ReleaseChild_Impl( Window& rWindow )
if ( nPos < pChilds->Count() )
{
- bSorted = FALSE;
+ bSorted = sal_False;
nChilds--;
pChilds->Remove(nPos);
delete pChild;
@@ -1105,8 +1105,8 @@ SfxChild_Impl* SfxWorkWindow::FindChild_Impl( const Window& rWindow ) const
DBG_CHKTHIS(SfxWorkWindow, 0);
SfxChild_Impl *pChild = 0;
- USHORT nCount = pChilds->Count();
- for ( USHORT nPos = 0; nPos < nCount; ++nPos )
+ sal_uInt16 nCount = pChilds->Count();
+ for ( sal_uInt16 nPos = 0; nPos < nCount; ++nPos )
{
pChild = (*pChilds)[nPos];
if ( pChild )
@@ -1126,7 +1126,7 @@ void SfxWorkWindow::ShowChilds_Impl()
bool bInvisible = ( !IsVisible_Impl() || ( !pWorkWin->IsReallyVisible() && !pWorkWin->IsReallyShown() ));
SfxChild_Impl *pCli = 0;
- for ( USHORT nPos = 0; nPos < pChilds->Count(); ++nPos )
+ for ( sal_uInt16 nPos = 0; nPos < pChilds->Count(); ++nPos )
{
SfxChildWin_Impl* pCW = 0;
pCli = (*pChilds)[nPos];
@@ -1135,7 +1135,7 @@ void SfxWorkWindow::ShowChilds_Impl()
{
// We have to find the SfxChildWin_Impl to retrieve the
// SFX_CHILDWIN flags that can influence visibility.
- for (USHORT n=0; n<pChildWins->Count(); n++)
+ for (sal_uInt16 n=0; n<pChildWins->Count(); n++)
{
SfxChildWin_Impl* pCWin = (*pChildWins)[n];
SfxChild_Impl* pChild = pCWin->pCli;
@@ -1158,21 +1158,21 @@ void SfxWorkWindow::ShowChilds_Impl()
if ( CHILD_VISIBLE == (pCli->nVisible & CHILD_VISIBLE) && bVisible )
{
- USHORT nFlags = pCli->bSetFocus ? 0 : SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE;
+ sal_uInt16 nFlags = pCli->bSetFocus ? 0 : SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE;
switch ( pCli->pWin->GetType() )
{
case RSC_DOCKINGWINDOW :
- ((DockingWindow*)pCli->pWin)->Show( TRUE, nFlags );
+ ((DockingWindow*)pCli->pWin)->Show( sal_True, nFlags );
break;
case RSC_SPLITWINDOW :
- ((SplitWindow*)pCli->pWin)->Show( TRUE, nFlags );
+ ((SplitWindow*)pCli->pWin)->Show( sal_True, nFlags );
break;
default:
- pCli->pWin->Show( TRUE, nFlags );
+ pCli->pWin->Show( sal_True, nFlags );
break;
}
- pCli->bSetFocus = FALSE;
+ pCli->bSetFocus = sal_False;
}
else
{
@@ -1195,7 +1195,7 @@ void SfxWorkWindow::ShowChilds_Impl()
void SfxWorkWindow::HideChilds_Impl()
{
SfxChild_Impl *pChild = 0;
- for ( USHORT nPos = pChilds->Count(); nPos > 0; --nPos )
+ for ( sal_uInt16 nPos = pChilds->Count(); nPos > 0; --nPos )
{
pChild = (*pChilds)[nPos-1];
if (pChild && pChild->pWin)
@@ -1217,7 +1217,7 @@ void SfxWorkWindow::HideChilds_Impl()
void SfxWorkWindow::ResetObjectBars_Impl()
{
- USHORT n;
+ sal_uInt16 n;
for ( n = 0; n < aObjBarList.size(); n++ )
aObjBarList[n].bDestroy = sal_True;
@@ -1225,24 +1225,24 @@ void SfxWorkWindow::ResetObjectBars_Impl()
(*pChildWins)[n]->nId = 0;
}
-void SfxWorkWindow::NextObjectBar_Impl( USHORT )
+void SfxWorkWindow::NextObjectBar_Impl( sal_uInt16 )
{
}
-USHORT SfxWorkWindow::HasNextObjectBar_Impl( USHORT, String* )
+sal_uInt16 SfxWorkWindow::HasNextObjectBar_Impl( sal_uInt16, String* )
{
return 0;
}
//------------------------------------------------------------------------
-void SfxWorkWindow::SetObjectBar_Impl( USHORT nPos, sal_uInt32 nResId,
+void SfxWorkWindow::SetObjectBar_Impl( sal_uInt16 nPos, sal_uInt32 nResId,
SfxInterface* pIFace, const String *pName)
{
DBG_ASSERT( (nPos & SFX_POSITION_MASK) < SFX_OBJECTBAR_MAX,
"object bar position overflow" );
- USHORT nRealPos = nPos & SFX_POSITION_MASK;
+ sal_uInt16 nRealPos = nPos & SFX_POSITION_MASK;
if ( pParent && IsAppWorkWinToolbox_Impl( nRealPos ) )
{
pParent->SetObjectBar_Impl( nPos, nResId, pIFace, pName );
@@ -1251,7 +1251,7 @@ void SfxWorkWindow::SetObjectBar_Impl( USHORT nPos, sal_uInt32 nResId,
SfxObjectBar_Impl aObjBar;
aObjBar.pIFace = pIFace;
- aObjBar.nId = sal::static_int_cast<USHORT>(nResId);
+ aObjBar.nId = sal::static_int_cast<sal_uInt16>(nResId);
aObjBar.nPos = nRealPos;
aObjBar.nMode = (nPos & SFX_VISIBILITY_MASK);
if (pName)
@@ -1259,7 +1259,7 @@ void SfxWorkWindow::SetObjectBar_Impl( USHORT nPos, sal_uInt32 nResId,
else
aObjBar.aName.Erase();
- for ( USHORT n=0; n<aObjBarList.size(); n++ )
+ for ( sal_uInt16 n=0; n<aObjBarList.size(); n++ )
{
if ( aObjBarList[n].nId == aObjBar.nId )
{
@@ -1273,7 +1273,7 @@ void SfxWorkWindow::SetObjectBar_Impl( USHORT nPos, sal_uInt32 nResId,
//------------------------------------------------------------------------
-bool SfxWorkWindow::KnowsObjectBar_Impl( USHORT nPos ) const
+bool SfxWorkWindow::KnowsObjectBar_Impl( sal_uInt16 nPos ) const
/* [Description]
@@ -1282,29 +1282,29 @@ bool SfxWorkWindow::KnowsObjectBar_Impl( USHORT nPos ) const
*/
{
- USHORT nRealPos = nPos & SFX_POSITION_MASK;
+ sal_uInt16 nRealPos = nPos & SFX_POSITION_MASK;
if ( pParent && IsAppWorkWinToolbox_Impl( nRealPos ) )
return pParent->KnowsObjectBar_Impl( nPos );
- for ( USHORT n=0; n<aObjBarList.size(); n++ )
+ for ( sal_uInt16 n=0; n<aObjBarList.size(); n++ )
{
if ( aObjBarList[n].nPos == nRealPos )
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
//------------------------------------------------------------------------
-BOOL SfxWorkWindow::IsVisible_Impl( USHORT nMode ) const
+sal_Bool SfxWorkWindow::IsVisible_Impl( sal_uInt16 nMode ) const
{
switch( nUpdateMode )
{
case SFX_VISIBILITY_STANDARD:
- return TRUE;
+ return sal_True;
case SFX_VISIBILITY_UNVISIBLE:
- return FALSE;
+ return sal_False;
case SFX_VISIBILITY_PLUGSERVER:
case SFX_VISIBILITY_PLUGCLIENT:
case SFX_VISIBILITY_CLIENT:
@@ -1316,7 +1316,7 @@ BOOL SfxWorkWindow::IsVisible_Impl( USHORT nMode ) const
}
}
-Window* SfxWorkWindow::GetObjectBar_Impl( USHORT, sal_uInt32 )
+Window* SfxWorkWindow::GetObjectBar_Impl( sal_uInt16, sal_uInt32 )
{
return NULL;
}
@@ -1344,7 +1344,7 @@ void SfxFrameWorkWin_Impl::UpdateObjectBars_Impl()
pWork = pWork->GetParent_Impl();
}
- ArrangeChilds_Impl( FALSE );
+ ArrangeChilds_Impl( sal_False );
pWork = pParent;
while ( pWork )
@@ -1424,7 +1424,7 @@ void SfxWorkWindow::UpdateObjectBars_Impl()
{
// Lock SplitWindows (which means supressing the Resize-Reaction of the
// DockingWindows)
- USHORT n;
+ sal_uInt16 n;
for ( n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
{
SfxSplitWindow *p = pSplit[n];
@@ -1461,11 +1461,11 @@ void SfxWorkWindow::UpdateObjectBars_Impl()
xLayoutManager->lock();
for ( n = 0; n < aObjBarList.size(); ++n )
{
- USHORT nId = aObjBarList[n].nId;
+ sal_uInt16 nId = aObjBarList[n].nId;
sal_Bool bDestroy = aObjBarList[n].bDestroy;
// Determine the vaild mode for the ToolBox
- USHORT nTbxMode = aObjBarList[n].nMode;
+ sal_uInt16 nTbxMode = aObjBarList[n].nMode;
bool bFullScreenTbx = SFX_VISIBILITY_FULLSCREEN ==
( nTbxMode & SFX_VISIBILITY_FULLSCREEN );
nTbxMode &= ~SFX_VISIBILITY_FULLSCREEN;
@@ -1514,7 +1514,7 @@ void SfxWorkWindow::UpdateObjectBars_Impl()
{
SfxSplitWindow *p = pSplit[n];
if (p->GetWindowCount())
- p->Lock(FALSE);
+ p->Lock(sal_False);
}
}
@@ -1531,11 +1531,11 @@ bool SfxWorkWindow::AllowChildWindowCreation_Impl( const SfxChildWin_Impl& i_rCW
void SfxWorkWindow::UpdateChildWindows_Impl()
{
// any current or in the context available Childwindows
- for ( USHORT n=0; n<pChildWins->Count(); n++ )
+ for ( sal_uInt16 n=0; n<pChildWins->Count(); n++ )
{
SfxChildWin_Impl *pCW = (*pChildWins)[n];
SfxChildWindow *pChildWin = pCW->pWin;
- BOOL bCreate = FALSE;
+ sal_Bool bCreate = sal_False;
if ( pCW->nId && !pCW->bDisabled && (pCW->aInfo.nFlags & SFX_CHILDWIN_ALWAYSAVAILABLE || IsVisible_Impl( pCW->nVisibility ) ) )
{
// In the context is an appropriate ChildWindow allowed;
@@ -1559,7 +1559,7 @@ void SfxWorkWindow::UpdateChildWindows_Impl()
bCreate = ( eAlign == SFX_ALIGN_NOALIGNMENT );
}
else
- bCreate = TRUE;
+ bCreate = sal_True;
if ( bCreate )
bCreate = AllowChildWindowCreation_Impl( *pCW );
@@ -1567,7 +1567,7 @@ void SfxWorkWindow::UpdateChildWindows_Impl()
// Currently, no window here, but it is enabled; windows
// Create window and if possible theContext
if ( bCreate )
- CreateChildWin_Impl( pCW, FALSE );
+ CreateChildWin_Impl( pCW, sal_False );
if ( !bAllChildsVisible )
{
@@ -1622,10 +1622,10 @@ void SfxWorkWindow::UpdateChildWindows_Impl()
}
}
-void SfxWorkWindow::CreateChildWin_Impl( SfxChildWin_Impl *pCW, BOOL bSetFocus )
+void SfxWorkWindow::CreateChildWin_Impl( SfxChildWin_Impl *pCW, sal_Bool bSetFocus )
{
if ( pCW->aInfo.bVisible != 42 )
- pCW->aInfo.bVisible = TRUE;
+ pCW->aInfo.bVisible = sal_True;
SfxChildWindow *pChildWin = SfxChildWindow::CreateChildWindow( pCW->nId, pWorkWin, &GetBindings(), pCW->aInfo);
if (pChildWin)
@@ -1644,7 +1644,7 @@ void SfxWorkWindow::CreateChildWin_Impl( SfxChildWin_Impl *pCW, BOOL bSetFocus )
// The creation was successful
GetBindings().Invalidate(pCW->nId);
- USHORT nPos = pChildWin->GetPosition();
+ sal_uInt16 nPos = pChildWin->GetPosition();
if (nPos != CHILDWIN_NOPOS)
{
DBG_ASSERT(nPos < SFX_OBJECTBAR_MAX, "Illegal objectbar position!");
@@ -1687,11 +1687,11 @@ void SfxWorkWindow::CreateChildWin_Impl( SfxChildWin_Impl *pCW, BOOL bSetFocus )
void SfxWorkWindow::RemoveChildWin_Impl( SfxChildWin_Impl *pCW )
{
- USHORT nId = pCW->nSaveId;
+ sal_uInt16 nId = pCW->nSaveId;
SfxChildWindow *pChildWin = pCW->pWin;
// Save the information in the INI file
- USHORT nFlags = pCW->aInfo.nFlags;
+ sal_uInt16 nFlags = pCW->aInfo.nFlags;
pCW->aInfo = pChildWin->GetInfo();
pCW->aInfo.nFlags |= nFlags;
SaveStatus_Impl(pChildWin, pCW->aInfo);
@@ -1727,25 +1727,25 @@ void SfxWorkWindow::ResetStatusBar_Impl()
void SfxWorkWindow::SetStatusBar_Impl( sal_uInt32 nResId, SfxShell*, SfxBindings& )
{
if ( nResId && bShowStatusBar && IsVisible_Impl() )
- aStatBar.nId = sal::static_int_cast<USHORT>(nResId);
+ aStatBar.nId = sal::static_int_cast<sal_uInt16>(nResId);
}
#define SFX_ITEMTYPE_STATBAR 4
-void SfxWorkWindow::SetTempStatusBar_Impl( BOOL bSet )
+void SfxWorkWindow::SetTempStatusBar_Impl( sal_Bool bSet )
{
if ( aStatBar.bTemp != bSet && bShowStatusBar && IsVisible_Impl() )
{
- BOOL bOn = FALSE;
- BOOL bReset = FALSE;
+ sal_Bool bOn = sal_False;
+ sal_Bool bReset = sal_False;
if ( bSet && !aStatBar.nId )
{
- bReset = TRUE;
+ bReset = sal_True;
SetStatusBar_Impl( SFX_ITEMTYPE_STATBAR, SFX_APP(), GetBindings() );
}
if ( aStatBar.nId && aStatBar.bOn && !bIsFullScreen )
- bOn = TRUE;
+ bOn = sal_True;
aStatBar.bTemp = bSet;
if ( !bOn || bReset || (!bSet && aStatBar.nId ) )
@@ -1789,7 +1789,7 @@ void SfxWorkWindow::UpdateStatusBar_Impl()
}
}
-void SfxWorkWindow::MakeVisible_Impl( BOOL bVis )
+void SfxWorkWindow::MakeVisible_Impl( sal_Bool bVis )
{
if ( bVis )
nOrigMode = SFX_VISIBILITY_STANDARD;
@@ -1800,15 +1800,15 @@ void SfxWorkWindow::MakeVisible_Impl( BOOL bVis )
nUpdateMode = nOrigMode;
}
-BOOL SfxWorkWindow::IsVisible_Impl()
+sal_Bool SfxWorkWindow::IsVisible_Impl()
{
return nOrigMode != SFX_VISIBILITY_UNVISIBLE;
}
//------------------------------------------------------------------------
-void SfxWorkWindow::HidePopups_Impl(BOOL bHide, BOOL bParent, USHORT nId )
+void SfxWorkWindow::HidePopups_Impl(sal_Bool bHide, sal_Bool bParent, sal_uInt16 nId )
{
- for ( USHORT n = 0; n < pChildWins->Count(); ++n )
+ for ( sal_uInt16 n = 0; n < pChildWins->Count(); ++n )
{
SfxChildWindow *pCW = (*pChildWins)[n]->pWin;
if (pCW && pCW->GetAlignment() == SFX_ALIGN_NOALIGNMENT && pCW->GetType() != nId)
@@ -1836,10 +1836,10 @@ void SfxWorkWindow::HidePopups_Impl(BOOL bHide, BOOL bParent, USHORT nId )
//------------------------------------------------------------------------
void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
- SfxDockingConfig eConfig, USHORT nId)
+ SfxDockingConfig eConfig, sal_uInt16 nId)
{
SfxDockingWindow* pDockWin=0;
- USHORT nPos = USHRT_MAX;
+ sal_uInt16 nPos = USHRT_MAX;
Window *pWin=0;
SfxChildWin_Impl *pCW = 0;
@@ -1850,7 +1850,7 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
else
{
// configure direct childwindow
- for (USHORT n=0; n<pChildWins->Count(); n++)
+ for (sal_uInt16 n=0; n<pChildWins->Count(); n++)
{
pCW = (*pChildWins)[n];
SfxChildWindow *pChild = pCW->pWin;
@@ -1896,7 +1896,7 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
pWin = pSplitWin->GetSplitWindow();
if ( pSplitWin->GetWindowCount() == 1 )
- ((SplitWindow*)pWin)->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE );
+ ((SplitWindow*)pWin)->Show( sal_True, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE );
}
}
@@ -1913,7 +1913,7 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
Sort_Impl();
SfxChild_Impl *pChild = 0;
- USHORT n;
+ sal_uInt16 n;
for ( n=0; n<aSortedList.Count(); ++n )
{
pChild = (*pChilds)[aSortedList[n]];
@@ -1936,13 +1936,13 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
Rectangle aOuterRect( GetTopRect_Impl() );
aOuterRect.SetPos( pWorkWin->OutputToScreenPixel( aOuterRect.TopLeft() ));
Rectangle aInnerRect( aOuterRect );
- BOOL bTbx = (eChild == SFX_CHILDWIN_OBJECTBAR);
+ sal_Bool bTbx = (eChild == SFX_CHILDWIN_OBJECTBAR);
// The current affected window is included in the calculation of
// the inner rectangle!
- for ( USHORT m=0; m<aSortedList.Count(); ++m )
+ for ( sal_uInt16 m=0; m<aSortedList.Count(); ++m )
{
- USHORT i=aSortedList[m];
+ sal_uInt16 i=aSortedList[m];
SfxChild_Impl* pCli = (*pChilds)[i];
if ( pCli && pCli->nVisible == CHILD_VISIBLE && pCli->pWin )
@@ -2061,7 +2061,7 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
if ( eChild == SFX_CHILDWIN_DOCKINGWINDOW || eAlign == SFX_ALIGN_NOALIGNMENT)
{
// configuration inside the SplitWindow, no change for the SplitWindows' configuration
- pCli->bResize = TRUE;
+ pCli->bResize = sal_True;
pCli->aSize = pDockWin->GetSizePixel();
}
}
@@ -2070,7 +2070,7 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
{
if( pCli->eAlign != eAlign )
{
- bSorted = FALSE;
+ bSorted = sal_False;
pCli->eAlign = eAlign;
}
@@ -2081,7 +2081,7 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
if ( pCW && pCW->pWin )
{
// store changed configuration
- USHORT nFlags = pCW->aInfo.nFlags;
+ sal_uInt16 nFlags = pCW->aInfo.nFlags;
pCW->aInfo = pCW->pWin->GetInfo();
pCW->aInfo.nFlags |= nFlags;
if ( eConfig != SFX_MOVEDOCKINGWINDOW )
@@ -2095,10 +2095,10 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
//--------------------------------------------------------------------
-void SfxWorkWindow::SetChildWindowVisible_Impl( sal_uInt32 lId, BOOL bEnabled, USHORT nMode )
+void SfxWorkWindow::SetChildWindowVisible_Impl( sal_uInt32 lId, sal_Bool bEnabled, sal_uInt16 nMode )
{
- USHORT nInter = (USHORT) ( lId >> 16 );
- USHORT nId = (USHORT) ( lId & 0xFFFF );
+ sal_uInt16 nInter = (sal_uInt16) ( lId >> 16 );
+ sal_uInt16 nId = (sal_uInt16) ( lId & 0xFFFF );
SfxChildWin_Impl *pCW=NULL;
SfxWorkWindow *pWork = pParent;
@@ -2111,8 +2111,8 @@ void SfxWorkWindow::SetChildWindowVisible_Impl( sal_uInt32 lId, BOOL bEnabled, U
if ( pWork )
{
// The Parent already known?
- USHORT nCount = pWork->pChildWins->Count();
- for (USHORT n=0; n<nCount; n++)
+ sal_uInt16 nCount = pWork->pChildWins->Count();
+ for (sal_uInt16 n=0; n<nCount; n++)
if ((*pWork->pChildWins)[n]->nSaveId == nId)
{
pCW = (*pWork->pChildWins)[n];
@@ -2123,8 +2123,8 @@ void SfxWorkWindow::SetChildWindowVisible_Impl( sal_uInt32 lId, BOOL bEnabled, U
if ( !pCW )
{
// If no Parent or the Parent us still unknown, then search here
- USHORT nCount = pChildWins->Count();
- for (USHORT n=0; n<nCount; n++)
+ sal_uInt16 nCount = pChildWins->Count();
+ for (sal_uInt16 n=0; n<nCount; n++)
if ((*pChildWins)[n]->nSaveId == nId)
{
pCW = (*pChildWins)[n];
@@ -2156,10 +2156,10 @@ void SfxWorkWindow::SetChildWindowVisible_Impl( sal_uInt32 lId, BOOL bEnabled, U
//--------------------------------------------------------------------
// The on/of-Status of a ChildWindows is switched
-void SfxWorkWindow::ToggleChildWindow_Impl(USHORT nId, BOOL bSetFocus)
+void SfxWorkWindow::ToggleChildWindow_Impl(sal_uInt16 nId, sal_Bool bSetFocus)
{
- USHORT nCount = pChildWins->Count();
- USHORT n;
+ sal_uInt16 nCount = pChildWins->Count();
+ sal_uInt16 n;
for (n=0; n<nCount; n++)
if ((*pChildWins)[n]->nId == nId)
break;
@@ -2186,15 +2186,15 @@ void SfxWorkWindow::ToggleChildWindow_Impl(USHORT nId, BOOL bSetFocus)
{
if ( pChild->QueryClose() )
{
- pCW->bCreate = FALSE;
+ pCW->bCreate = sal_False;
if ( pChild->IsHideAtToggle() )
{
- ShowChildWindow_Impl( nId, FALSE, bSetFocus );
+ ShowChildWindow_Impl( nId, sal_False, bSetFocus );
}
else
{
// The Window should be switched off
- pChild->SetVisible_Impl( FALSE );
+ pChild->SetVisible_Impl( sal_False );
RemoveChildWin_Impl( pCW );
}
}
@@ -2202,7 +2202,7 @@ void SfxWorkWindow::ToggleChildWindow_Impl(USHORT nId, BOOL bSetFocus)
else
{
// no actual Window exists, yet => just remember the "switched off" state
- pCW->bCreate = FALSE;
+ pCW->bCreate = sal_False;
}
}
else
@@ -2212,7 +2212,7 @@ void SfxWorkWindow::ToggleChildWindow_Impl(USHORT nId, BOOL bSetFocus)
{
if ( pChild )
{
- ShowChildWindow_Impl( nId, TRUE, bSetFocus );
+ ShowChildWindow_Impl( nId, sal_True, bSetFocus );
}
else
{
@@ -2220,7 +2220,7 @@ void SfxWorkWindow::ToggleChildWindow_Impl(USHORT nId, BOOL bSetFocus)
CreateChildWin_Impl( pCW, bSetFocus );
if ( !pCW->pWin )
// no success
- pCW->bCreate = FALSE;
+ pCW->bCreate = sal_False;
}
}
}
@@ -2267,10 +2267,10 @@ void SfxWorkWindow::ToggleChildWindow_Impl(USHORT nId, BOOL bSetFocus)
//--------------------------------------------------------------------
-BOOL SfxWorkWindow::HasChildWindow_Impl(USHORT nId)
+sal_Bool SfxWorkWindow::HasChildWindow_Impl(sal_uInt16 nId)
{
- USHORT nCount = pChildWins->Count();
- USHORT n;
+ sal_uInt16 nCount = pChildWins->Count();
+ sal_uInt16 n;
for (n=0; n<nCount; n++)
if ((*pChildWins)[n]->nSaveId == nId)
break;
@@ -2285,10 +2285,10 @@ BOOL SfxWorkWindow::HasChildWindow_Impl(USHORT nId)
if ( pParent )
return pParent->HasChildWindow_Impl( nId );
- return FALSE;
+ return sal_False;
}
-BOOL SfxWorkWindow::IsFloating( USHORT nId )
+sal_Bool SfxWorkWindow::IsFloating( sal_uInt16 nId )
{
SfxChildWin_Impl *pCW=NULL;
SfxWorkWindow *pWork = pParent;
@@ -2301,8 +2301,8 @@ BOOL SfxWorkWindow::IsFloating( USHORT nId )
if ( pWork )
{
// The Parent already known?
- USHORT nCount = pWork->pChildWins->Count();
- for (USHORT n=0; n<nCount; n++)
+ sal_uInt16 nCount = pWork->pChildWins->Count();
+ for (sal_uInt16 n=0; n<nCount; n++)
if ((*pWork->pChildWins)[n]->nSaveId == nId)
{
pCW = (*pWork->pChildWins)[n];
@@ -2313,8 +2313,8 @@ BOOL SfxWorkWindow::IsFloating( USHORT nId )
if ( !pCW )
{
// If no Parent or the Parent us still unknown, then search here
- USHORT nCount = pChildWins->Count();
- for (USHORT n=0; n<nCount; n++)
+ sal_uInt16 nCount = pChildWins->Count();
+ for (sal_uInt16 n=0; n<nCount; n++)
if ((*pChildWins)[n]->nSaveId == nId)
{
pCW = (*pChildWins)[n];
@@ -2327,7 +2327,7 @@ BOOL SfxWorkWindow::IsFloating( USHORT nId )
// If new, then initialize, add this here depending on the flag or
// the Parent
pCW = new SfxChildWin_Impl( nId );
- pCW->bEnable = FALSE;
+ pCW->bEnable = sal_False;
pCW->nId = 0;
pCW->nVisibility = 0;
InitializeChild_Impl( pCW );
@@ -2341,16 +2341,16 @@ BOOL SfxWorkWindow::IsFloating( USHORT nId )
if ( pCW->aInfo.GetExtraData_Impl( &eAlign ) )
return( eAlign == SFX_ALIGN_NOALIGNMENT );
else
- return TRUE;
+ return sal_True;
}
//--------------------------------------------------------------------
-BOOL SfxWorkWindow::KnowsChildWindow_Impl(USHORT nId)
+sal_Bool SfxWorkWindow::KnowsChildWindow_Impl(sal_uInt16 nId)
{
SfxChildWin_Impl *pCW=0;
- USHORT nCount = pChildWins->Count();
- USHORT n;
+ sal_uInt16 nCount = pChildWins->Count();
+ sal_uInt16 n;
for (n=0; n<nCount; n++)
{
pCW = (*pChildWins)[n];
@@ -2361,18 +2361,18 @@ BOOL SfxWorkWindow::KnowsChildWindow_Impl(USHORT nId)
if (n<nCount)
{
if ( !(pCW->aInfo.nFlags & SFX_CHILDWIN_ALWAYSAVAILABLE) && !IsVisible_Impl( pCW->nVisibility ) )
- return FALSE;
+ return sal_False;
return pCW->bEnable;
}
else if ( pParent )
return pParent->KnowsChildWindow_Impl( nId );
else
- return FALSE;
+ return sal_False;
}
//--------------------------------------------------------------------
-void SfxWorkWindow::SetChildWindow_Impl(USHORT nId, BOOL bOn, BOOL bSetFocus)
+void SfxWorkWindow::SetChildWindow_Impl(sal_uInt16 nId, sal_Bool bOn, sal_Bool bSetFocus)
{
SfxChildWin_Impl *pCW=NULL;
SfxWorkWindow *pWork = pParent;
@@ -2385,8 +2385,8 @@ void SfxWorkWindow::SetChildWindow_Impl(USHORT nId, BOOL bOn, BOOL bSetFocus)
if ( pWork )
{
// The Parent already known?
- USHORT nCount = pWork->pChildWins->Count();
- for (USHORT n=0; n<nCount; n++)
+ sal_uInt16 nCount = pWork->pChildWins->Count();
+ for (sal_uInt16 n=0; n<nCount; n++)
if ((*pWork->pChildWins)[n]->nSaveId == nId)
{
pCW = (*pWork->pChildWins)[n];
@@ -2397,8 +2397,8 @@ void SfxWorkWindow::SetChildWindow_Impl(USHORT nId, BOOL bOn, BOOL bSetFocus)
if ( !pCW )
{
// If no Parent or the Parent us still unknown, then search here
- USHORT nCount = pChildWins->Count();
- for (USHORT n=0; n<nCount; n++)
+ sal_uInt16 nCount = pChildWins->Count();
+ for (sal_uInt16 n=0; n<nCount; n++)
if ((*pChildWins)[n]->nSaveId == nId)
{
pCW = (*pChildWins)[n];
@@ -2424,11 +2424,11 @@ void SfxWorkWindow::SetChildWindow_Impl(USHORT nId, BOOL bOn, BOOL bSetFocus)
//--------------------------------------------------------------------
-void SfxWorkWindow::ShowChildWindow_Impl(USHORT nId, BOOL bVisible, BOOL bSetFocus)
+void SfxWorkWindow::ShowChildWindow_Impl(sal_uInt16 nId, sal_Bool bVisible, sal_Bool bSetFocus)
{
- USHORT nCount = pChildWins->Count();
+ sal_uInt16 nCount = pChildWins->Count();
SfxChildWin_Impl* pCW=0;
- USHORT n;
+ sal_uInt16 n;
for (n=0; n<nCount; n++)
{
pCW = (*pChildWins)[n];
@@ -2470,14 +2470,14 @@ void SfxWorkWindow::ShowChildWindow_Impl(USHORT nId, BOOL bVisible, BOOL bSetFoc
}
else if ( bVisible )
{
- SetChildWindow_Impl( nId, TRUE, bSetFocus );
+ SetChildWindow_Impl( nId, sal_True, bSetFocus );
pChildWin = pCW->pWin;
}
if ( pChildWin )
{
pChildWin->SetVisible_Impl( bVisible );
- USHORT nFlags = pCW->aInfo.nFlags;
+ sal_uInt16 nFlags = pCW->aInfo.nFlags;
pCW->aInfo = pChildWin->GetInfo();
pCW->aInfo.nFlags |= nFlags;
if ( !pCW->bCreate )
@@ -2512,10 +2512,10 @@ void SfxWorkWindow::ShowChildWindow_Impl(USHORT nId, BOOL bVisible, BOOL bSetFoc
//--------------------------------------------------------------------
-SfxChildWindow* SfxWorkWindow::GetChildWindow_Impl(USHORT nId)
+SfxChildWindow* SfxWorkWindow::GetChildWindow_Impl(sal_uInt16 nId)
{
- USHORT nCount = pChildWins->Count();
- USHORT n;
+ sal_uInt16 nCount = pChildWins->Count();
+ sal_uInt16 n;
for (n=0; n<nCount; n++)
if ((*pChildWins)[n]->nSaveId == nId)
break;
@@ -2531,10 +2531,10 @@ SfxChildWindow* SfxWorkWindow::GetChildWindow_Impl(USHORT nId)
void SfxWorkWindow::ResetChildWindows_Impl()
{
- for ( USHORT n = 0; n < pChildWins->Count(); ++n )
+ for ( sal_uInt16 n = 0; n < pChildWins->Count(); ++n )
{
(*pChildWins)[n]->nId = 0;
- (*pChildWins)[n]->bEnable = FALSE;
+ (*pChildWins)[n]->bEnable = sal_False;
}
}
@@ -2560,14 +2560,14 @@ Rectangle SfxFrameWorkWin_Impl::GetTopRect_Impl()
// Virtual method to find out if there is room for a ChildWindow in the
// client area of the parent.
-BOOL SfxWorkWindow::RequestTopToolSpacePixel_Impl( SvBorder aBorder )
+sal_Bool SfxWorkWindow::RequestTopToolSpacePixel_Impl( SvBorder aBorder )
{
if ( !IsDockingAllowed() ||
aClientArea.GetWidth() < aBorder.Left() + aBorder.Right() ||
aClientArea.GetHeight() < aBorder.Top() + aBorder.Bottom() )
- return FALSE;
+ return sal_False;
else
- return TRUE;;
+ return sal_True;;
}
void SfxWorkWindow::SaveStatus_Impl(SfxChildWindow *pChild, const SfxChildWinInfo &rInfo)
@@ -2583,7 +2583,7 @@ void SfxWorkWindow::InitializeChild_Impl(SfxChildWin_Impl *pCW)
SfxApplication *pApp = SFX_APP();
{
SfxChildWinFactArr_Impl &rFactories = pApp->GetChildWinFactories_Impl();
- for ( USHORT nFactory = 0; nFactory < rFactories.Count(); ++nFactory )
+ for ( sal_uInt16 nFactory = 0; nFactory < rFactories.Count(); ++nFactory )
{
pFact = rFactories[nFactory];
if ( pFact->nId == pCW->nSaveId )
@@ -2592,7 +2592,7 @@ void SfxWorkWindow::InitializeChild_Impl(SfxChildWin_Impl *pCW)
SfxChildWindow::InitializeChildWinFactory_Impl(
pCW->nSaveId, pCW->aInfo);
pCW->bCreate = pCW->aInfo.bVisible;
- USHORT nFlags = pFact->aInfo.nFlags;
+ sal_uInt16 nFlags = pFact->aInfo.nFlags;
if ( nFlags & SFX_CHILDWIN_TASK )
pCW->aInfo.nFlags |= SFX_CHILDWIN_TASK;
if ( nFlags & SFX_CHILDWIN_CANTGETFOCUS )
@@ -2613,7 +2613,7 @@ void SfxWorkWindow::InitializeChild_Impl(SfxChildWin_Impl *pCW)
if ( pFactories )
{
SfxChildWinFactArr_Impl &rFactories = *pFactories;
- for ( USHORT nFactory = 0; nFactory < rFactories.Count(); ++nFactory )
+ for ( sal_uInt16 nFactory = 0; nFactory < rFactories.Count(); ++nFactory )
{
pFact = rFactories[nFactory];
if ( pFact->nId == pCW->nSaveId )
@@ -2622,7 +2622,7 @@ void SfxWorkWindow::InitializeChild_Impl(SfxChildWin_Impl *pCW)
SfxChildWindow::InitializeChildWinFactory_Impl(
pCW->nSaveId, pCW->aInfo);
pCW->bCreate = pCW->aInfo.bVisible;
- USHORT nFlags = pFact->aInfo.nFlags;
+ sal_uInt16 nFlags = pFact->aInfo.nFlags;
if ( nFlags & SFX_CHILDWIN_TASK )
pCW->aInfo.nFlags |= SFX_CHILDWIN_TASK;
if ( nFlags & SFX_CHILDWIN_CANTGETFOCUS )
@@ -2660,7 +2660,7 @@ SfxSplitWindow* SfxWorkWindow::GetSplitWindow_Impl( SfxChildAlignment eAlign )
}
}
-void SfxWorkWindow::MakeChildsVisible_Impl( BOOL bVis )
+void SfxWorkWindow::MakeChildsVisible_Impl( sal_Bool bVis )
{
if ( pParent )
pParent->MakeChildsVisible_Impl( bVis );
@@ -2670,7 +2670,7 @@ void SfxWorkWindow::MakeChildsVisible_Impl( BOOL bVis )
{
if ( !bSorted )
Sort_Impl();
- for ( USHORT n=0; n<aSortedList.Count(); ++n )
+ for ( sal_uInt16 n=0; n<aSortedList.Count(); ++n )
{
SfxChild_Impl* pCli = (*pChilds)[aSortedList[n]];
if ( (pCli->eAlign == SFX_ALIGN_NOALIGNMENT) || (IsDockingAllowed() && bInternalDockingAllowed) )
@@ -2681,7 +2681,7 @@ void SfxWorkWindow::MakeChildsVisible_Impl( BOOL bVis )
{
if ( !bSorted )
Sort_Impl();
- for ( USHORT n=0; n<aSortedList.Count(); ++n )
+ for ( sal_uInt16 n=0; n<aSortedList.Count(); ++n )
{
SfxChild_Impl* pCli = (*pChilds)[aSortedList[n]];
pCli->nVisible &= ~CHILD_ACTIVE;
@@ -2689,14 +2689,14 @@ void SfxWorkWindow::MakeChildsVisible_Impl( BOOL bVis )
}
}
-BOOL SfxWorkWindow::IsAutoHideMode( const SfxSplitWindow *pSplitWin )
+sal_Bool SfxWorkWindow::IsAutoHideMode( const SfxSplitWindow *pSplitWin )
{
- for ( USHORT n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
+ for ( sal_uInt16 n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
{
- if ( pSplit[n] != pSplitWin && pSplit[n]->IsAutoHide( TRUE ) )
- return TRUE;
+ if ( pSplit[n] != pSplitWin && pSplit[n]->IsAutoHide( sal_True ) )
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
@@ -2705,7 +2705,7 @@ void SfxWorkWindow::EndAutoShow_Impl( Point aPos )
if ( pParent )
pParent->EndAutoShow_Impl( aPos );
- for ( USHORT n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
+ for ( sal_uInt16 n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
{
SfxSplitWindow *p = pSplit[n];
if ( p && p->IsAutoHide() )
@@ -2728,14 +2728,14 @@ void SfxWorkWindow::ArrangeAutoHideWindows( SfxSplitWindow *pActSplitWin )
pParent->ArrangeAutoHideWindows( pActSplitWin );
Rectangle aArea( aUpperClientArea );
- for ( USHORT n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
+ for ( sal_uInt16 n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
{
// Either dummy window or window in the auto-show-mode are processed
// (not pinned, FadeIn).
// Only the abandoned window may be invisible, because perhaps its
// size is just beeing calculated before it is displayed.
SfxSplitWindow* pSplitWin = pSplit[n];
- BOOL bDummyWindow = !pSplitWin->IsFadeIn();
+ sal_Bool bDummyWindow = !pSplitWin->IsFadeIn();
Window *pDummy = pSplitWin->GetSplitWindow();
Window *pWin = bDummyWindow ? pDummy : pSplitWin;
if ( (pSplitWin->IsPinned() && !bDummyWindow) || (!pWin->IsVisible() && pActSplitWin != pSplitWin) )
@@ -2847,12 +2847,12 @@ void SfxWorkWindow::ArrangeAutoHideWindows( SfxSplitWindow *pActSplitWin )
}
}
-Rectangle SfxWorkWindow::GetFreeArea( BOOL bAutoHide ) const
+Rectangle SfxWorkWindow::GetFreeArea( sal_Bool bAutoHide ) const
{
if ( bAutoHide )
{
Rectangle aArea( aClientArea );
- for ( USHORT n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
+ for ( sal_uInt16 n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
{
if ( pSplit[n]->IsPinned() || !pSplit[n]->IsVisible() )
continue;
@@ -2881,7 +2881,7 @@ Rectangle SfxWorkWindow::GetFreeArea( BOOL bAutoHide ) const
return aClientArea;
}
-SfxChildWinController_Impl::SfxChildWinController_Impl( USHORT nID, SfxWorkWindow *pWork )
+SfxChildWinController_Impl::SfxChildWinController_Impl( sal_uInt16 nID, SfxWorkWindow *pWork )
: SfxControllerItem( nID, pWork->GetBindings() )
, pWorkwin( pWork )
{}
@@ -2892,15 +2892,15 @@ SfxChildWinController_Impl::SfxChildWinController_Impl( USHORT nID, SfxWorkWindo
}
void SfxChildWinController_Impl::StateChanged(
- USHORT nSID, SfxItemState eState, const SfxPoolItem* )
+ sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* )
{
pWorkwin->DisableChildWindow_Impl( nSID, eState == SFX_ITEM_DISABLED );
}
-void SfxWorkWindow::DisableChildWindow_Impl( USHORT nId, BOOL bDisable )
+void SfxWorkWindow::DisableChildWindow_Impl( sal_uInt16 nId, sal_Bool bDisable )
{
- USHORT nCount = pChildWins->Count();
- USHORT n;
+ sal_uInt16 nCount = pChildWins->Count();
+ sal_uInt16 n;
for (n=0; n<nCount; n++)
if ((*pChildWins)[n]->nSaveId == nId)
break;
@@ -2923,16 +2923,16 @@ Window* SfxWorkWindow::GetActiveChild_Impl()
return pActiveChild;
}
-BOOL SfxWorkWindow::ActivateNextChild_Impl( BOOL bForward )
+sal_Bool SfxWorkWindow::ActivateNextChild_Impl( sal_Bool bForward )
{
// Sort all children under list
SvUShorts aList;
- for ( USHORT i=SFX_OBJECTBAR_MAX; i<pChilds->Count(); i++)
+ for ( sal_uInt16 i=SFX_OBJECTBAR_MAX; i<pChilds->Count(); i++)
{
SfxChild_Impl *pCli = (*pChilds)[i];
if ( pCli && pCli->bCanGetFocus && pCli->pWin )
{
- USHORT k;
+ sal_uInt16 k;
for (k=0; k<aList.Count(); k++)
if ( ChildTravelValue((*pChilds)[aList[k]]->eAlign) > ChildTravelValue(pCli->eAlign) )
break;
@@ -2941,17 +2941,17 @@ BOOL SfxWorkWindow::ActivateNextChild_Impl( BOOL bForward )
}
if ( aList.Count() == 0 )
- return FALSE;
+ return sal_False;
- USHORT nTopValue = ChildTravelValue( SFX_ALIGN_LOWESTTOP );
- for ( USHORT i=0; i<aList.Count(); i++ )
+ sal_uInt16 nTopValue = ChildTravelValue( SFX_ALIGN_LOWESTTOP );
+ for ( sal_uInt16 i=0; i<aList.Count(); i++ )
{
SfxChild_Impl* pCli = (*pChilds)[aList[i]];
if ( pCli->pWin && ChildTravelValue( pCli->eAlign ) > nTopValue )
break;
}
- USHORT n = bForward ? 0 : aList.Count()-1;
+ sal_uInt16 n = bForward ? 0 : aList.Count()-1;
SfxChild_Impl *pAct=NULL;
if ( pActiveChild )
{
@@ -2973,14 +2973,14 @@ BOOL SfxWorkWindow::ActivateNextChild_Impl( BOOL bForward )
n = n + 1;
if ( pAct )
{
- for ( USHORT i=0; i<SFX_SPLITWINDOWS_MAX; i++ )
+ for ( sal_uInt16 i=0; i<SFX_SPLITWINDOWS_MAX; i++ )
{
// Maybe the pNext is a Splitwindow
SfxSplitWindow *p = pSplit[i];
if ( pAct->pWin == p )
{
if( p->ActivateNextChild_Impl( bForward ) )
- return TRUE;
+ return sal_True;
break;
}
}
@@ -2993,7 +2993,7 @@ BOOL SfxWorkWindow::ActivateNextChild_Impl( BOOL bForward )
n = n-1;
if ( n == 0 || n == aList.Count()-1 )
- return FALSE;
+ return sal_False;
}
for( ;; )
@@ -3002,7 +3002,7 @@ BOOL SfxWorkWindow::ActivateNextChild_Impl( BOOL bForward )
if ( pCli->pWin )
{
SfxChild_Impl* pNext = pCli;
- for ( USHORT i=0; n<SFX_SPLITWINDOWS_MAX; n++ )
+ for ( sal_uInt16 i=0; n<SFX_SPLITWINDOWS_MAX; n++ )
{
// Maybe the pNext is a Splitwindow
SfxSplitWindow *p = pSplit[i];
@@ -3012,7 +3012,7 @@ BOOL SfxWorkWindow::ActivateNextChild_Impl( BOOL bForward )
p->SetActiveWindow_Impl( NULL );
pNext = NULL;
if( p->ActivateNextChild_Impl( bForward ) )
- return TRUE;
+ return sal_True;
break;
}
}
@@ -3021,7 +3021,7 @@ BOOL SfxWorkWindow::ActivateNextChild_Impl( BOOL bForward )
{
pNext->pWin->GrabFocus();
pActiveChild = pNext->pWin;
- return TRUE;
+ return sal_True;
}
}
@@ -3034,17 +3034,17 @@ BOOL SfxWorkWindow::ActivateNextChild_Impl( BOOL bForward )
break;
}
- return FALSE;
+ return sal_False;
}
-void SfxWorkWindow::SetObjectBarCustomizeMode_Impl( BOOL )
+void SfxWorkWindow::SetObjectBarCustomizeMode_Impl( sal_Bool )
{
}
void SfxWorkWindow::DataChanged_Impl( const DataChangedEvent& )
{
- USHORT n;
- USHORT nCount = pChildWins->Count();
+ sal_uInt16 n;
+ sal_uInt16 nCount = pChildWins->Count();
for (n=0; n<nCount; n++)
{
SfxChildWin_Impl*pCW = (*pChildWins)[n];
diff --git a/sfx2/source/appl/xpackcreator.cxx b/sfx2/source/appl/xpackcreator.cxx
index 17a27c6c8ce9..17a27c6c8ce9 100644..100755
--- a/sfx2/source/appl/xpackcreator.cxx
+++ b/sfx2/source/appl/xpackcreator.cxx
diff --git a/sfx2/source/appl/xpackcreator.hxx b/sfx2/source/appl/xpackcreator.hxx
index 03ef58e27e03..03ef58e27e03 100644..100755
--- a/sfx2/source/appl/xpackcreator.hxx
+++ b/sfx2/source/appl/xpackcreator.hxx
diff --git a/sfx2/source/bastyp/bastyp.hrc b/sfx2/source/bastyp/bastyp.hrc
index fd53e2577212..fd53e2577212 100644..100755
--- a/sfx2/source/bastyp/bastyp.hrc
+++ b/sfx2/source/bastyp/bastyp.hrc
diff --git a/sfx2/source/bastyp/bastyp.src b/sfx2/source/bastyp/bastyp.src
index 5ef74f5874b3..5ef74f5874b3 100644..100755
--- a/sfx2/source/bastyp/bastyp.src
+++ b/sfx2/source/bastyp/bastyp.src
diff --git a/sfx2/source/bastyp/bitset.cxx b/sfx2/source/bastyp/bitset.cxx
index 9799afd9fa4e..1a462c8133e2 100644..100755
--- a/sfx2/source/bastyp/bitset.cxx
+++ b/sfx2/source/bastyp/bitset.cxx
@@ -38,7 +38,7 @@
//====================================================================
// add nOffset to each bit-value in the set
-BitSet BitSet::operator<<( USHORT nOffset ) const
+BitSet BitSet::operator<<( sal_uInt16 nOffset ) const
{
DBG_MEMTEST();
// create a work-copy, return it if nothing to shift
@@ -47,17 +47,17 @@ BitSet BitSet::operator<<( USHORT nOffset ) const
return aSet;
// compute the shiftment in long-words and bits
- USHORT nBlockDiff = nOffset / 32;
- ULONG nBitValDiff = nOffset % 32;
+ sal_uInt16 nBlockDiff = nOffset / 32;
+ sal_uIntPtr nBitValDiff = nOffset % 32;
// compute the new number of bits
- for ( USHORT nBlock = 0; nBlock < nBlockDiff; ++nBlock )
+ for ( sal_uInt16 nBlock = 0; nBlock < nBlockDiff; ++nBlock )
aSet.nCount = aSet.nCount - CountBits( *(aSet.pBitmap+nBlock) );
aSet.nCount = aSet.nCount -
CountBits( *(aSet.pBitmap+nBlockDiff) >> (32-nBitValDiff) );
// shift complete long-words
- USHORT nTarget, nSource;
+ sal_uInt16 nTarget, nSource;
for ( nTarget = 0, nSource = nBlockDiff;
(nSource+1) < aSet.nBlocks;
++nTarget, ++nSource )
@@ -75,7 +75,7 @@ BitSet BitSet::operator<<( USHORT nOffset ) const
// shorten the block-array
if ( nTarget < aSet.nBlocks )
{
- ULONG* pNewMap = new ULONG[nTarget];
+ sal_uIntPtr* pNewMap = new sal_uIntPtr[nTarget];
memcpy( pNewMap, aSet.pBitmap, 4 * nTarget );
delete [] aSet.pBitmap;
aSet.pBitmap = pNewMap;
@@ -89,7 +89,7 @@ BitSet BitSet::operator<<( USHORT nOffset ) const
// substracts nOffset from each bit-value in the set
-BitSet BitSet::operator>>( USHORT ) const
+BitSet BitSet::operator>>( sal_uInt16 ) const
{
DBG_MEMTEST();
return BitSet();
@@ -107,7 +107,7 @@ void BitSet::CopyFrom( const BitSet& rSet )
if ( rSet.nBlocks )
{
DBG_MEMTEST();
- pBitmap = new ULONG[nBlocks];
+ pBitmap = new sal_uIntPtr[nBlocks];
memcpy( pBitmap, rSet.pBitmap, 4 * nBlocks );
}
else
@@ -140,13 +140,13 @@ BitSet::BitSet( const BitSet& rOrig )
// creates a bitset from an array
-BitSet::BitSet( USHORT* pArray, USHORT nSize ):
+BitSet::BitSet( sal_uInt16* pArray, sal_uInt16 nSize ):
nCount(nSize)
{
DBG_MEMTEST();
// find the highest bit to set
- USHORT nMax = 0;
- for ( USHORT n = 0; n < nCount; ++n )
+ sal_uInt16 nMax = 0;
+ for ( sal_uInt16 n = 0; n < nCount; ++n )
if ( pArray[n] > nMax )
nMax = pArray[n];
@@ -155,15 +155,15 @@ BitSet::BitSet( USHORT* pArray, USHORT nSize ):
{
// allocate memory for all blocks needed
nBlocks = nMax / 32 + 1;
- pBitmap = new ULONG[nBlocks];
+ pBitmap = new sal_uIntPtr[nBlocks];
memset( pBitmap, 0, 4 * nBlocks );
// set all the bits
- for ( USHORT n = 0; n < nCount; ++n )
+ for ( sal_uInt16 n = 0; n < nCount; ++n )
{
// compute the block no. and bitvalue
- USHORT nBlock = n / 32;
- ULONG nBitVal = 1L << (n % 32);
+ sal_uInt16 nBlock = n / 32;
+ sal_uIntPtr nBitVal = 1L << (n % 32);
// set a single bit
if ( ( *(pBitmap+nBlock) & nBitVal ) == 0 )
@@ -219,16 +219,16 @@ BitSet& BitSet::operator=( const BitSet& rOrig )
// assignment from a single bit
-BitSet& BitSet::operator=( USHORT nBit )
+BitSet& BitSet::operator=( sal_uInt16 nBit )
{
DBG_MEMTEST();
delete [] pBitmap;
nBlocks = nBit / 32;
- ULONG nBitVal = 1L << (nBit % 32);
+ sal_uIntPtr nBitVal = 1L << (nBit % 32);
nCount = 1;
- pBitmap = new ULONG[nBlocks];
+ pBitmap = new sal_uIntPtr[nBlocks];
memset( pBitmap + nBlocks, 0, 4 * nBlocks );
*(pBitmap+nBlocks) = nBitVal;
@@ -240,11 +240,11 @@ BitSet& BitSet::operator=( USHORT nBit )
// creates the asymetric difference with another bitset
-BitSet& BitSet::operator-=(USHORT nBit)
+BitSet& BitSet::operator-=(sal_uInt16 nBit)
{
DBG_MEMTEST();
- USHORT nBlock = nBit / 32;
- ULONG nBitVal = 1L << (nBit % 32);
+ sal_uInt16 nBlock = nBit / 32;
+ sal_uIntPtr nBitVal = 1L << (nBit % 32);
if ( nBlock >= nBlocks )
return *this;
@@ -265,12 +265,12 @@ BitSet& BitSet::operator-=(USHORT nBit)
BitSet& BitSet::operator|=( const BitSet& rSet )
{
DBG_MEMTEST();
- USHORT nMax = Min(nBlocks, rSet.nBlocks);
+ sal_uInt16 nMax = Min(nBlocks, rSet.nBlocks);
// expand the bitmap
if ( nBlocks < rSet.nBlocks )
{
- ULONG *pNewMap = new ULONG[rSet.nBlocks];
+ sal_uIntPtr *pNewMap = new sal_uIntPtr[rSet.nBlocks];
memset( pNewMap + nBlocks, 0, 4 * (rSet.nBlocks - nBlocks) );
if ( pBitmap )
@@ -283,10 +283,10 @@ BitSet& BitSet::operator|=( const BitSet& rSet )
}
// add the bits blocks by block
- for ( USHORT nBlock = 0; nBlock < nMax; ++nBlock )
+ for ( sal_uInt16 nBlock = 0; nBlock < nMax; ++nBlock )
{
// compute numberof additional bits
- ULONG nDiff = ~*(pBitmap+nBlock) & *(rSet.pBitmap+nBlock);
+ sal_uIntPtr nDiff = ~*(pBitmap+nBlock) & *(rSet.pBitmap+nBlock);
nCount = nCount + CountBits(nDiff);
*(pBitmap+nBlock) |= *(rSet.pBitmap+nBlock);
@@ -299,15 +299,15 @@ BitSet& BitSet::operator|=( const BitSet& rSet )
// unites with a single bit
-BitSet& BitSet::operator|=( USHORT nBit )
+BitSet& BitSet::operator|=( sal_uInt16 nBit )
{
DBG_MEMTEST();
- USHORT nBlock = nBit / 32;
- ULONG nBitVal = 1L << (nBit % 32);
+ sal_uInt16 nBlock = nBit / 32;
+ sal_uIntPtr nBitVal = 1L << (nBit % 32);
if ( nBlock >= nBlocks )
{
- ULONG *pNewMap = new ULONG[nBlock+1];
+ sal_uIntPtr *pNewMap = new sal_uIntPtr[nBlock+1];
memset( pNewMap + nBlocks, 0, 4 * (nBlock - nBlocks + 1) );
if ( pBitmap )
@@ -332,14 +332,14 @@ BitSet& BitSet::operator|=( USHORT nBit )
// determines if the bit is set (may be the only one)
-BOOL BitSet::Contains( USHORT nBit ) const
+sal_Bool BitSet::Contains( sal_uInt16 nBit ) const
{
DBG_MEMTEST();
- USHORT nBlock = nBit / 32;
- ULONG nBitVal = 1L << (nBit % 32);
+ sal_uInt16 nBlock = nBit / 32;
+ sal_uIntPtr nBitVal = 1L << (nBit % 32);
if ( nBlock >= nBlocks )
- return FALSE;
+ return sal_False;
return ( nBitVal & *(pBitmap+nBlock) ) == nBitVal;
}
@@ -347,27 +347,27 @@ BOOL BitSet::Contains( USHORT nBit ) const
// determines if the bitsets are equal
-BOOL BitSet::operator==( const BitSet& rSet ) const
+sal_Bool BitSet::operator==( const BitSet& rSet ) const
{
DBG_MEMTEST();
if ( nBlocks != rSet.nBlocks )
- return FALSE;
+ return sal_False;
- USHORT nBlock = nBlocks;
+ sal_uInt16 nBlock = nBlocks;
while ( nBlock-- > 0 )
if ( *(pBitmap+nBlock) != *(rSet.pBitmap+nBlock) )
- return FALSE;
+ return sal_False;
- return TRUE;
+ return sal_True;
}
//--------------------------------------------------------------------
// counts the number of 1-bits in the parameter
-USHORT BitSet::CountBits( ULONG nBits )
+sal_uInt16 BitSet::CountBits( sal_uIntPtr nBits )
{
- USHORT nCount = 0;
+ sal_uInt16 nCount = 0;
int nBit = 32;
while ( nBit-- && nBits )
{ if ( ( (long)nBits ) < 0 )
@@ -379,15 +379,15 @@ USHORT BitSet::CountBits( ULONG nBits )
//--------------------------------------------------------------------
-USHORT IndexBitSet::GetFreeIndex()
+sal_uInt16 IndexBitSet::GetFreeIndex()
{
- for(USHORT i=0;i<USHRT_MAX;i++)
+ for(sal_uInt16 i=0;i<USHRT_MAX;i++)
if(!Contains(i))
{
*this|=i;
return i;
}
- DBG_ASSERT(FALSE, "IndexBitSet enthaelt mehr als USHRT_MAX Eintraege");
+ DBG_ASSERT(sal_False, "IndexBitSet enthaelt mehr als USHRT_MAX Eintraege");
return 0;
}
diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx
index 6563953a1dc7..533320e64acd 100644..100755
--- a/sfx2/source/bastyp/fltfnc.cxx
+++ b/sfx2/source/bastyp/fltfnc.cxx
@@ -101,8 +101,7 @@ using namespace ::com::sun::star::beans;
#include <svtools/sfxecode.hxx>
#include <unotools/syslocale.hxx>
-#include "sfxhelp.hxx"
-#include "sfxbasic.hxx"
+#include "sfx2/sfxhelp.hxx"
#include <sfx2/docfilt.hxx>
#include <sfx2/docfac.hxx>
#include "sfxtypes.hxx"
@@ -111,7 +110,7 @@ using namespace ::com::sun::star::beans;
#include <sfx2/progress.hxx>
#include "openflag.hxx"
#include "bastyp.hrc"
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include <sfx2/doctempl.hxx>
#include <sfx2/frame.hxx>
#include <sfx2/dispatch.hxx>
@@ -124,7 +123,7 @@ using namespace ::com::sun::star::beans;
#include <sfx2/viewfrm.hxx>
static SfxFilterList_Impl* pFilterArr = 0;
-static BOOL bFirstRead = TRUE;
+static sal_Bool bFirstRead = sal_True;
static void CreateFilterArr()
{
@@ -277,7 +276,7 @@ SfxFilterMatcher::SfxFilterMatcher( const String& rName )
String aName = SfxObjectShell::GetServiceNameFromFactory( rName );
DBG_ASSERT(aName.Len(), "Found boes type :-)");
- for ( USHORT n=0; n<pImplArr->Count(); n++ )
+ for ( sal_uInt16 n=0; n<pImplArr->Count(); n++ )
{
// find the impl-Data of any comparable FilterMatcher that was created before
SfxFilterMatcher_Impl* pImp = pImplArr->GetObject(n);
@@ -538,7 +537,7 @@ sal_uInt32 SfxFilterMatcher::DetectFilter( SfxMedium& rMedium, const SfxFilter**
const SfxFilter* pFilter = pOldFilter;
sal_Bool bPreview = rMedium.IsPreview_Impl();
- SFX_ITEMSET_ARG(rMedium.GetItemSet(), pReferer, SfxStringItem, SID_REFERER, FALSE);
+ SFX_ITEMSET_ARG(rMedium.GetItemSet(), pReferer, SfxStringItem, SID_REFERER, sal_False);
if ( bPreview && rMedium.IsRemote() && ( !pReferer || pReferer->GetValue().CompareToAscii("private:searchfolder:",21 ) != COMPARE_EQUAL ) )
return ERRCODE_ABORT;
@@ -583,7 +582,6 @@ sal_uInt32 SfxFilterMatcher::DetectFilter( SfxMedium& rMedium, const SfxFilter**
if( STRING_NOTFOUND != aFlags.Search( 'H' ) )
bHidden = sal_True;
}
-
*ppFilter = pFilter;
if ( bHidden || (bAPI && nErr == ERRCODE_SFX_CONSULTUSER) )
@@ -766,7 +764,7 @@ const SfxFilter* SfxFilterMatcher::GetFilter4UIName( const String& rName, SfxFil
const SfxFilter* SfxFilterMatcher::GetFilter4FilterName( const String& rName, SfxFilterFlags nMust, SfxFilterFlags nDont ) const
{
String aName( rName );
- USHORT nIndex = aName.SearchAscii(": ");
+ sal_uInt16 nIndex = aName.SearchAscii(": ");
if ( nIndex != STRING_NOTFOUND )
{
OSL_FAIL("Old filter name used!");
@@ -799,7 +797,7 @@ const SfxFilter* SfxFilterMatcher::GetFilter4FilterName( const String& rName, Sf
}
}
- SfxFilterContainer::ReadSingleFilter_Impl( rName, xTypeCFG, xFilterCFG, FALSE );
+ SfxFilterContainer::ReadSingleFilter_Impl( rName, xTypeCFG, xFilterCFG, sal_False );
}
}
@@ -901,7 +899,7 @@ void SfxFilterContainer::ReadSingleFilter_Impl(
const ::rtl::OUString& rName,
const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& xTypeCFG,
const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& xFilterCFG,
- BOOL bUpdate
+ sal_Bool bUpdate
)
{
::rtl::OUString sFilterName( rName );
@@ -1042,16 +1040,16 @@ void SfxFilterContainer::ReadSingleFilter_Impl(
}
SfxFilter* pFilter = bUpdate ? (SfxFilter*) SfxFilter::GetFilterByName( sFilterName ) : 0;
- BOOL bNew = FALSE;
+ sal_Bool bNew = sal_False;
if (!pFilter)
{
- bNew = TRUE;
+ bNew = sal_True;
pFilter = new SfxFilter( sFilterName ,
sExtension ,
nFlags ,
nClipboardId ,
sType ,
- (USHORT)nDocumentIconId ,
+ (sal_uInt16)nDocumentIconId ,
sMimeType ,
sUserData ,
sServiceName );
@@ -1063,7 +1061,7 @@ void SfxFilterContainer::ReadSingleFilter_Impl(
pFilter->nFormatType = nFlags;
pFilter->lFormat = nClipboardId;
pFilter->aTypeName = sType;
- pFilter->nDocIcon = (USHORT)nDocumentIconId;
+ pFilter->nDocIcon = (sal_uInt16)nDocumentIconId;
pFilter->aMimeType = sMimeType;
pFilter->aUserData = sUserData;
pFilter->aServiceName = sServiceName;
@@ -1084,13 +1082,13 @@ void SfxFilterContainer::ReadSingleFilter_Impl(
}
}
-void SfxFilterContainer::ReadFilters_Impl( BOOL bUpdate )
+void SfxFilterContainer::ReadFilters_Impl( sal_Bool bUpdate )
{
RTL_LOGFILE_CONTEXT( aMeasure, "sfx2 (as96863) ::SfxFilterContainer::ReadFilters" );
if ( !pFilterArr )
CreateFilterArr();
- bFirstRead = FALSE;
+ bFirstRead = sal_False;
SfxFilterList_Impl& rList = *pFilterArr;
try
@@ -1120,7 +1118,7 @@ void SfxFilterContainer::ReadFilters_Impl( BOOL bUpdate )
// and change it back for all valid filters afterwards.
if( !rList.empty() )
{
- bUpdate = TRUE;
+ bUpdate = sal_True;
SfxFilter* pFilter;
for ( size_t i = 0, n = rList.size(); i < n; ++i )
{
@@ -1151,7 +1149,7 @@ void SfxFilterContainer::ReadFilters_Impl( BOOL bUpdate )
if ( pImplArr && bUpdate )
{
// global filter arry was modified, factory specific ones might need an update too
- for ( USHORT n=0; n<pImplArr->Count(); n++ )
+ for ( sal_uInt16 n=0; n<pImplArr->Count(); n++ )
pImplArr->GetObject(n)->Update();
}
}
diff --git a/sfx2/source/bastyp/fltfnc.src b/sfx2/source/bastyp/fltfnc.src
index 4203163eceeb..4203163eceeb 100644..100755
--- a/sfx2/source/bastyp/fltfnc.src
+++ b/sfx2/source/bastyp/fltfnc.src
diff --git a/sfx2/source/bastyp/fltlst.cxx b/sfx2/source/bastyp/fltlst.cxx
index d921e3496062..3fc966c45d8e 100644..100755
--- a/sfx2/source/bastyp/fltlst.cxx
+++ b/sfx2/source/bastyp/fltlst.cxx
@@ -103,7 +103,7 @@ void SAL_CALL SfxFilterListener::refreshed( const lang::EventObject& aSource ) t
(xContainer==m_xFilterCache)
)
{
- SfxFilterContainer::ReadFilters_Impl( TRUE );
+ SfxFilterContainer::ReadFilters_Impl( sal_True );
}
}
diff --git a/sfx2/source/bastyp/fltlst.hxx b/sfx2/source/bastyp/fltlst.hxx
index 02af4663037c..02af4663037c 100644..100755
--- a/sfx2/source/bastyp/fltlst.hxx
+++ b/sfx2/source/bastyp/fltlst.hxx
diff --git a/sfx2/source/bastyp/frmhtml.cxx b/sfx2/source/bastyp/frmhtml.cxx
index f0f4d7994200..6ebd346e4e5e 100644..100755
--- a/sfx2/source/bastyp/frmhtml.cxx
+++ b/sfx2/source/bastyp/frmhtml.cxx
@@ -75,10 +75,10 @@ void SfxFrameHTMLParser::ParseFrameOptions( SfxFrameDescriptor *pFrame, const HT
// do like that for now. Netscape does however not allow for a direct
// seting to 0, while IE4.0 does
// We will not mimic that bug !
- BOOL bMarginWidth = FALSE, bMarginHeight = FALSE;
+ sal_Bool bMarginWidth = sal_False, bMarginHeight = sal_False;
- USHORT nArrLen = pOptions->Count();
- for ( USHORT i=0; i<nArrLen; i++ )
+ sal_uInt16 nArrLen = pOptions->Count();
+ for ( sal_uInt16 i=0; i<nArrLen; i++ )
{
const HTMLOption *pOption = (*pOptions)[i];
switch( pOption->GetToken() )
@@ -104,14 +104,14 @@ void SfxFrameHTMLParser::ParseFrameOptions( SfxFrameDescriptor *pFrame, const HT
if( !bMarginHeight )
aMargin.Height() = 0;
- bMarginWidth = TRUE;
+ bMarginWidth = sal_True;
break;
case HTML_O_MARGINHEIGHT:
aMargin.Height() = pOption->GetNumber();
if( !bMarginWidth )
aMargin.Width() = 0;
- bMarginHeight = TRUE;
+ bMarginHeight = sal_True;
break;
case HTML_O_SCROLLING:
pFrame->SetScrollingMode(
@@ -121,33 +121,33 @@ void SfxFrameHTMLParser::ParseFrameOptions( SfxFrameDescriptor *pFrame, const HT
case HTML_O_FRAMEBORDER:
{
String aStr = pOption->GetString();
- BOOL bBorder = TRUE;
+ sal_Bool bBorder = sal_True;
if ( aStr.EqualsIgnoreCaseAscii("NO") ||
aStr.EqualsIgnoreCaseAscii("0") )
- bBorder = FALSE;
+ bBorder = sal_False;
pFrame->SetFrameBorder( bBorder );
break;
}
case HTML_O_NORESIZE:
- pFrame->SetResizable( FALSE );
+ pFrame->SetResizable( sal_False );
break;
default:
if ( pOption->GetTokenString().EqualsIgnoreCaseAscii(
HTML_O_READONLY ) )
{
String aStr = pOption->GetString();
- BOOL bReadonly = TRUE;
+ sal_Bool bReadonly = sal_True;
if ( aStr.EqualsIgnoreCaseAscii("FALSE") )
- bReadonly = FALSE;
+ bReadonly = sal_False;
pFrame->SetReadOnly( bReadonly );
}
else if ( pOption->GetTokenString().EqualsIgnoreCaseAscii(
HTML_O_EDIT ) )
{
String aStr = pOption->GetString();
- BOOL bEdit = TRUE;
+ sal_Bool bEdit = sal_True;
if ( aStr.EqualsIgnoreCaseAscii("FALSE") )
- bEdit = FALSE;
+ bEdit = sal_False;
pFrame->SetEditable( bEdit );
}
diff --git a/sfx2/source/bastyp/frmhtmlw.cxx b/sfx2/source/bastyp/frmhtmlw.cxx
index ee2f3458feb7..6d12c0e09e2b 100644..100755
--- a/sfx2/source/bastyp/frmhtmlw.cxx
+++ b/sfx2/source/bastyp/frmhtmlw.cxx
@@ -44,7 +44,7 @@
#include <sfx2/app.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/docfile.hxx>
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include <sfx2/objsh.hxx>
#include <sfx2/sfx.hrc>
#include "bastyp.hrc"
@@ -74,7 +74,7 @@ const sal_Char SfxFrameHTMLWriter::sNewLine[] = "\015\012";
void SfxFrameHTMLWriter::OutMeta( SvStream& rStrm,
const sal_Char *pIndent,
const String& rName,
- const String& rContent, BOOL bHTTPEquiv,
+ const String& rContent, sal_Bool bHTTPEquiv,
rtl_TextEncoding eDestEnc,
String *pNonConvertableChars )
{
@@ -108,7 +108,7 @@ void SfxFrameHTMLWriter::Out_DocInfo( SvStream& rStrm, const String& rBaseURL,
{
String aContentType = String::CreateFromAscii( sHTML_MIME_text_html );
aContentType.AppendAscii( pCharSet );
- OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_content_type, aContentType, TRUE,
+ OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_content_type, aContentType, sal_True,
eDestEnc, pNonConvertableChars );
}
@@ -123,7 +123,7 @@ void SfxFrameHTMLWriter::Out_DocInfo( SvStream& rStrm, const String& rBaseURL,
if( rTitle.Len() )
HTMLOutFuncs::Out_String( rStrm, rTitle, eDestEnc, pNonConvertableChars );
}
- HTMLOutFuncs::Out_AsciiTag( rStrm, OOO_STRING_SVTOOLS_HTML_title, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( rStrm, OOO_STRING_SVTOOLS_HTML_title, sal_False );
// Target-Frame
if( i_xDocProps.is() )
@@ -146,7 +146,7 @@ void SfxFrameHTMLWriter::Out_DocInfo( SvStream& rStrm, const String& rBaseURL,
// Who we are
String sGenerator( SfxResId( STR_HTML_GENERATOR ) );
sGenerator.SearchAndReplaceAscii( "%1", String( DEFINE_CONST_UNICODE( TOOLS_INETDEF_OS ) ) );
- OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_generator, sGenerator, FALSE, eDestEnc, pNonConvertableChars );
+ OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_generator, sGenerator, sal_False, eDestEnc, pNonConvertableChars );
if( i_xDocProps.is() )
{
@@ -166,14 +166,14 @@ void SfxFrameHTMLWriter::Out_DocInfo( SvStream& rStrm, const String& rBaseURL,
rBaseURL, rReloadURL));
}
- OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_refresh, sContent, TRUE,
+ OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_refresh, sContent, sal_True,
eDestEnc, pNonConvertableChars );
}
// Author
const String& rAuthor = i_xDocProps->getAuthor();
if( rAuthor.Len() )
- OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_author, rAuthor, FALSE,
+ OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_author, rAuthor, sal_False,
eDestEnc, pNonConvertableChars );
// created
@@ -183,13 +183,13 @@ void SfxFrameHTMLWriter::Out_DocInfo( SvStream& rStrm, const String& rBaseURL,
String sOut = String::CreateFromInt32(aD.GetDate());
sOut += ';';
sOut += String::CreateFromInt32(aT.GetTime());
- OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_created, sOut, FALSE,
+ OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_created, sOut, sal_False,
eDestEnc, pNonConvertableChars );
// changedby
const String& rChangedBy = i_xDocProps->getModifiedBy();
if( rChangedBy.Len() )
- OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_changedby, rChangedBy, FALSE,
+ OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_changedby, rChangedBy, sal_False,
eDestEnc, pNonConvertableChars );
// changed
@@ -199,26 +199,26 @@ void SfxFrameHTMLWriter::Out_DocInfo( SvStream& rStrm, const String& rBaseURL,
sOut = String::CreateFromInt32(aD2.GetDate());
sOut += ';';
sOut += String::CreateFromInt32(aT2.GetTime());
- OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_changed, sOut, FALSE,
+ OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_changed, sOut, sal_False,
eDestEnc, pNonConvertableChars );
// Subject
const String& rTheme = i_xDocProps->getSubject();
if( rTheme.Len() )
- OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_classification, rTheme, FALSE,
+ OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_classification, rTheme, sal_False,
eDestEnc, pNonConvertableChars );
// Description
const String& rComment = i_xDocProps->getDescription();
if( rComment.Len() )
- OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_description, rComment, FALSE,
+ OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_description, rComment, sal_False,
eDestEnc, pNonConvertableChars);
// Keywords
String Keywords = ::comphelper::string::convertCommaSeparated(
i_xDocProps->getKeywords());
if( Keywords.Len() )
- OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_keywords, Keywords, FALSE,
+ OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_keywords, Keywords, sal_False,
eDestEnc, pNonConvertableChars);
uno::Reference < script::XTypeConverter > xConverter(
@@ -242,7 +242,7 @@ void SfxFrameHTMLWriter::Out_DocInfo( SvStream& rStrm, const String& rBaseURL,
aStr >>= str;
String valstr(str);
valstr.EraseTrailingChars();
- OutMeta( rStrm, pIndent, name, valstr, FALSE,
+ OutMeta( rStrm, pIndent, name, valstr, sal_False,
eDestEnc, pNonConvertableChars );
} catch (uno::Exception &) {
// may happen with concurrent modification...
diff --git a/sfx2/source/bastyp/helper.cxx b/sfx2/source/bastyp/helper.cxx
index cee73183ddba..123951f1bcff 100644..100755
--- a/sfx2/source/bastyp/helper.cxx
+++ b/sfx2/source/bastyp/helper.cxx
@@ -814,9 +814,9 @@ ErrCode SfxContentHelper::QueryDiskSpace( const String& rPath, sal_Int64& rFreeB
// -----------------------------------------------------------------------
-ULONG SfxContentHelper::GetSize( const String& rContent )
+sal_uIntPtr SfxContentHelper::GetSize( const String& rContent )
{
- ULONG nSize = 0;
+ sal_uIntPtr nSize = 0;
sal_Int64 nTemp = 0;
INetURLObject aObj( rContent );
DBG_ASSERT( aObj.GetProtocol() != INET_PROT_NOT_VALID, "Invalid URL!" );
@@ -833,7 +833,7 @@ ULONG SfxContentHelper::GetSize( const String& rContent )
{
DBG_ERRORFILE( "Any other exception" );
}
- nSize = (UINT32)nTemp;
+ nSize = (sal_uInt32)nTemp;
return nSize;
}
diff --git a/sfx2/source/bastyp/mieclip.cxx b/sfx2/source/bastyp/mieclip.cxx
index c5208cebb96e..db1899e23b71 100644..100755
--- a/sfx2/source/bastyp/mieclip.cxx
+++ b/sfx2/source/bastyp/mieclip.cxx
@@ -34,7 +34,7 @@
#include <sot/storage.hxx>
#include <sot/formats.hxx>
-#include <mieclip.hxx>
+#include <sfx2/mieclip.hxx>
#include <sfx2/sfxuno.hxx>
MSE40HTMLClipFormatObj::~MSE40HTMLClipFormatObj()
@@ -44,13 +44,13 @@ MSE40HTMLClipFormatObj::~MSE40HTMLClipFormatObj()
SvStream* MSE40HTMLClipFormatObj::IsValid( SvStream& rStream )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pStrm )
delete pStrm, pStrm = 0;
ByteString sLine, sVersion;
- ULONG nStt = 0, nEnd = 0;
- USHORT nIndex = 0;
+ sal_uIntPtr nStt = 0, nEnd = 0;
+ sal_uInt16 nIndex = 0;
rStream.Seek(STREAM_SEEK_TO_BEGIN);
rStream.ResetError();
@@ -64,16 +64,16 @@ SvStream* MSE40HTMLClipFormatObj::IsValid( SvStream& rStream )
nIndex = 0;
ByteString sTmp( sLine.GetToken( 0, ':', nIndex ) );
if( sTmp == "StartHTML" )
- nStt = (ULONG)(sLine.Erase( 0, nIndex ).ToInt32());
+ nStt = (sal_uIntPtr)(sLine.Erase( 0, nIndex ).ToInt32());
else if( sTmp == "EndHTML" )
- nEnd = (ULONG)(sLine.Erase( 0, nIndex ).ToInt32());
+ nEnd = (sal_uIntPtr)(sLine.Erase( 0, nIndex ).ToInt32());
else if( sTmp == "SourceURL" )
sBaseURL = String(S2U(sLine.Erase( 0, nIndex )));
if( nEnd && nStt &&
( sBaseURL.Len() || rStream.Tell() >= nStt ))
{
- bRet = TRUE;
+ bRet = sal_True;
break;
}
}
diff --git a/sfx2/source/bastyp/minarray.cxx b/sfx2/source/bastyp/minarray.cxx
index 1ed27d01c74e..4deae2555f0a 100644..100755
--- a/sfx2/source/bastyp/minarray.cxx
+++ b/sfx2/source/bastyp/minarray.cxx
@@ -33,13 +33,13 @@
// -----------------------------------------------------------------------
-SfxPtrArr::SfxPtrArr( BYTE nInitSize, BYTE nGrowSize ):
+SfxPtrArr::SfxPtrArr( sal_uInt8 nInitSize, sal_uInt8 nGrowSize ):
nUsed( 0 ),
nGrow( nGrowSize ? nGrowSize : 1 ),
nUnused( nInitSize )
{
DBG_MEMTEST();
- USHORT nMSCBug = nInitSize;
+ sal_uInt16 nMSCBug = nInitSize;
if ( nMSCBug > 0 )
pData = new void*[nMSCBug];
@@ -104,7 +104,7 @@ void SfxPtrArr::Append( void* aElem )
// Does the Array need to be copied?
if ( nUnused == 0 )
{
- USHORT nNewSize = (nUsed == 1) ? (nGrow==1 ? 2 : nGrow) : nUsed+nGrow;
+ sal_uInt16 nNewSize = (nUsed == 1) ? (nGrow==1 ? 2 : nGrow) : nUsed+nGrow;
void** pNewData = new void*[nNewSize];
if ( pData )
{
@@ -112,7 +112,7 @@ void SfxPtrArr::Append( void* aElem )
memmove( pNewData, pData, sizeof(void*)*nUsed );
delete [] pData;
}
- nUnused = sal::static_int_cast< BYTE >(nNewSize-nUsed);
+ nUnused = sal::static_int_cast< sal_uInt8 >(nNewSize-nUsed);
pData = pNewData;
}
@@ -124,11 +124,11 @@ void SfxPtrArr::Append( void* aElem )
// -----------------------------------------------------------------------
-USHORT SfxPtrArr::Remove( USHORT nPos, USHORT nLen )
+sal_uInt16 SfxPtrArr::Remove( sal_uInt16 nPos, sal_uInt16 nLen )
{
DBG_MEMTEST();
// Adjust nLen, thus to avoid deleting beyond the end
- nLen = Min( (USHORT)(nUsed-nPos), nLen );
+ nLen = Min( (sal_uInt16)(nUsed-nPos), nLen );
// simple problems require simple solutions!
if ( nLen == 0 )
@@ -148,8 +148,8 @@ USHORT SfxPtrArr::Remove( USHORT nPos, USHORT nLen )
if ( (nUnused+nLen) >= nGrow )
{
// reduce (rounded up) to the next Grow-border
- USHORT nNewUsed = nUsed-nLen;
- USHORT nNewSize = ((nNewUsed+nGrow-1)/nGrow) * nGrow;
+ sal_uInt16 nNewUsed = nUsed-nLen;
+ sal_uInt16 nNewSize = ((nNewUsed+nGrow-1)/nGrow) * nGrow;
DBG_ASSERT( nNewUsed <= nNewSize && nNewUsed+nGrow > nNewSize,
"shrink size computation failed" );
void** pNewData = new void*[nNewSize];
@@ -164,7 +164,7 @@ USHORT SfxPtrArr::Remove( USHORT nPos, USHORT nLen )
delete [] pData;
pData = pNewData;
nUsed = nNewUsed;
- nUnused = sal::static_int_cast< BYTE >(nNewSize - nNewUsed);
+ nUnused = sal::static_int_cast< sal_uInt8 >(nNewSize - nNewUsed);
return nLen;
}
@@ -172,71 +172,71 @@ USHORT SfxPtrArr::Remove( USHORT nPos, USHORT nLen )
if ( nUsed-nPos-nLen > 0 )
memmove( pData+nPos, pData+nPos+nLen, (nUsed-nPos-nLen)*sizeof(void*) );
nUsed = nUsed - nLen;
- nUnused = sal::static_int_cast< BYTE >(nUnused + nLen);
+ nUnused = sal::static_int_cast< sal_uInt8 >(nUnused + nLen);
return nLen;
}
// -----------------------------------------------------------------------
-BOOL SfxPtrArr::Remove( void* aElem )
+sal_Bool SfxPtrArr::Remove( void* aElem )
{
DBG_MEMTEST();
// simple tasks ...
if ( nUsed == 0 )
- return FALSE;
+ return sal_False;
// backwards, since most of the last is first removed
void* *pIter = pData + nUsed - 1;
- for ( USHORT n = 0; n < nUsed; ++n, --pIter )
+ for ( sal_uInt16 n = 0; n < nUsed; ++n, --pIter )
if ( *pIter == aElem )
{
Remove(nUsed-n-1, 1);
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL SfxPtrArr::Replace( void* aOldElem, void* aNewElem )
+sal_Bool SfxPtrArr::Replace( void* aOldElem, void* aNewElem )
{
DBG_MEMTEST();
// simple tasks ...
if ( nUsed == 0 )
- return FALSE;
+ return sal_False;
// backwards, since most of the last is first removed
void* *pIter = pData + nUsed - 1;
- for ( USHORT n = 0; n < nUsed; ++n, --pIter )
+ for ( sal_uInt16 n = 0; n < nUsed; ++n, --pIter )
if ( *pIter == aOldElem )
{
pData[nUsed-n-1] = aNewElem;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL SfxPtrArr::Contains( const void* rItem ) const
+sal_Bool SfxPtrArr::Contains( const void* rItem ) const
{
DBG_MEMTEST();
if ( !nUsed )
- return FALSE;
+ return sal_False;
- for ( USHORT n = 0; n < nUsed; ++n )
+ for ( sal_uInt16 n = 0; n < nUsed; ++n )
{
void* p = GetObject(n);
if ( p == rItem )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-void SfxPtrArr::Insert( USHORT nPos, void* rElem )
+void SfxPtrArr::Insert( sal_uInt16 nPos, void* rElem )
{
DBG_MEMTEST();
DBG_ASSERT( sal::static_int_cast< unsigned >(nUsed+1) < ( USHRT_MAX / sizeof(void*) ), "array too large" );
@@ -244,7 +244,7 @@ void SfxPtrArr::Insert( USHORT nPos, void* rElem )
if ( nUnused == 0 )
{
// increase (rounded up ) to the next Grow-border
- USHORT nNewSize = nUsed+nGrow;
+ sal_uInt16 nNewSize = nUsed+nGrow;
void** pNewData = new void*[nNewSize];
if ( pData )
@@ -253,7 +253,7 @@ void SfxPtrArr::Insert( USHORT nPos, void* rElem )
memmove( pNewData, pData, sizeof(void*)*nUsed );
delete [] pData;
}
- nUnused = sal::static_int_cast< BYTE >(nNewSize-nUsed);
+ nUnused = sal::static_int_cast< sal_uInt8 >(nNewSize-nUsed);
pData = pNewData;
}
@@ -269,13 +269,13 @@ void SfxPtrArr::Insert( USHORT nPos, void* rElem )
// class ByteArr ---------------------------------------------------------
-ByteArr::ByteArr( BYTE nInitSize, BYTE nGrowSize ):
+ByteArr::ByteArr( sal_uInt8 nInitSize, sal_uInt8 nGrowSize ):
nUsed( 0 ),
nGrow( nGrowSize ? nGrowSize : 1 ),
nUnused( nInitSize )
{
DBG_MEMTEST();
- USHORT nMSCBug = nInitSize;
+ sal_uInt16 nMSCBug = nInitSize;
if ( nInitSize > 0 )
pData = new char[nMSCBug];
@@ -339,7 +339,7 @@ void ByteArr::Append( char aElem )
// Does the Array have o be copied?
if ( nUnused == 0 )
{
- USHORT nNewSize = (nUsed == 1) ? (nGrow==1 ? 2 : nGrow) : nUsed+nGrow;
+ sal_uInt16 nNewSize = (nUsed == 1) ? (nGrow==1 ? 2 : nGrow) : nUsed+nGrow;
char* pNewData = new char[nNewSize];
if ( pData )
{
@@ -347,7 +347,7 @@ void ByteArr::Append( char aElem )
memmove( pNewData, pData, sizeof(char)*nUsed );
delete [] pData;
}
- nUnused = sal::static_int_cast< BYTE >(nNewSize-nUsed);
+ nUnused = sal::static_int_cast< sal_uInt8 >(nNewSize-nUsed);
pData = pNewData;
}
@@ -359,11 +359,11 @@ void ByteArr::Append( char aElem )
// -----------------------------------------------------------------------
-USHORT ByteArr::Remove( USHORT nPos, USHORT nLen )
+sal_uInt16 ByteArr::Remove( sal_uInt16 nPos, sal_uInt16 nLen )
{
DBG_MEMTEST();
// Adjust nLen, thus to avoid deleting beyond the end
- nLen = Min( (USHORT)(nUsed-nPos), nLen );
+ nLen = Min( (sal_uInt16)(nUsed-nPos), nLen );
// simple problems require simple solutions!
if ( nLen == 0 )
@@ -383,8 +383,8 @@ USHORT ByteArr::Remove( USHORT nPos, USHORT nLen )
if ( (nUnused+nLen) >= nGrow )
{
// reduce (rounded up) to the next Grow-border
- USHORT nNewUsed = nUsed-nLen;
- USHORT nNewSize = ((nNewUsed+nGrow-1)/nGrow) * nGrow;
+ sal_uInt16 nNewUsed = nUsed-nLen;
+ sal_uInt16 nNewSize = ((nNewUsed+nGrow-1)/nGrow) * nGrow;
DBG_ASSERT( nNewUsed <= nNewSize && nNewUsed+nGrow > nNewSize,
"shrink size computation failed" );
char* pNewData = new char[nNewSize];
@@ -399,7 +399,7 @@ USHORT ByteArr::Remove( USHORT nPos, USHORT nLen )
delete [] pData;
pData = pNewData;
nUsed = nNewUsed;
- nUnused = sal::static_int_cast< BYTE >(nNewSize - nNewUsed);
+ nUnused = sal::static_int_cast< sal_uInt8 >(nNewSize - nNewUsed);
return nLen;
}
@@ -407,58 +407,58 @@ USHORT ByteArr::Remove( USHORT nPos, USHORT nLen )
if ( nUsed-nPos-nLen > 0 )
memmove( pData+nPos, pData+nPos+nLen, (nUsed-nPos-nLen)*sizeof(char) );
nUsed = nUsed - nLen;
- nUnused = sal::static_int_cast< BYTE >(nUnused + nLen);
+ nUnused = sal::static_int_cast< sal_uInt8 >(nUnused + nLen);
return nLen;
}
// -----------------------------------------------------------------------
-BOOL ByteArr::Remove( char aElem )
+sal_Bool ByteArr::Remove( char aElem )
{
DBG_MEMTEST();
// simple tasks ...
if ( nUsed == 0 )
- return FALSE;
+ return sal_False;
// backwards, since most of the last is first removed
char *pIter = pData + nUsed - 1;
- for ( USHORT n = 0; n < nUsed; ++n, --pIter )
+ for ( sal_uInt16 n = 0; n < nUsed; ++n, --pIter )
if ( *pIter == aElem )
{
Remove(nUsed-n-1, 1);
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL ByteArr::Contains( const char rItem ) const
+sal_Bool ByteArr::Contains( const char rItem ) const
{
DBG_MEMTEST();
if ( !nUsed )
- return FALSE;
+ return sal_False;
- for ( USHORT n = 0; n < nUsed; ++n )
+ for ( sal_uInt16 n = 0; n < nUsed; ++n )
{
char p = GetObject(n);
if ( p == rItem )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-void ByteArr::Insert( USHORT nPos, char rElem )
+void ByteArr::Insert( sal_uInt16 nPos, char rElem )
{
DBG_MEMTEST();
// Does the Array need to be copied?
if ( nUnused == 0 )
{
// increase (rounded up) to the next Grow-border
- USHORT nNewSize = nUsed+nGrow;
+ sal_uInt16 nNewSize = nUsed+nGrow;
char* pNewData = new char[nNewSize];
if ( pData )
@@ -467,7 +467,7 @@ void ByteArr::Insert( USHORT nPos, char rElem )
memmove( pNewData, pData, sizeof(char)*nUsed );
delete [] pData;
}
- nUnused = sal::static_int_cast< BYTE >(nNewSize-nUsed);
+ nUnused = sal::static_int_cast< sal_uInt8 >(nNewSize-nUsed);
pData = pNewData;
}
@@ -483,7 +483,7 @@ void ByteArr::Insert( USHORT nPos, char rElem )
// -----------------------------------------------------------------------
-char ByteArr::operator[]( USHORT nPos ) const
+char ByteArr::operator[]( sal_uInt16 nPos ) const
{
DBG_MEMTEST();
DBG_ASSERT( nPos < nUsed, "" );
@@ -492,7 +492,7 @@ char ByteArr::operator[]( USHORT nPos ) const
// -----------------------------------------------------------------------
-char& ByteArr::operator [] (USHORT nPos)
+char& ByteArr::operator [] (sal_uInt16 nPos)
{
DBG_MEMTEST();
DBG_ASSERT( nPos < nUsed, "" );
@@ -501,13 +501,13 @@ char& ByteArr::operator [] (USHORT nPos)
// class WordArr ---------------------------------------------------------
-WordArr::WordArr( BYTE nInitSize, BYTE nGrowSize ):
+WordArr::WordArr( sal_uInt8 nInitSize, sal_uInt8 nGrowSize ):
nUsed( 0 ),
nGrow( nGrowSize ? nGrowSize : 1 ),
nUnused( nInitSize )
{
DBG_MEMTEST();
- USHORT nMSCBug = nInitSize;
+ sal_uInt16 nMSCBug = nInitSize;
if ( nInitSize > 0 )
pData = new short[nMSCBug];
@@ -571,7 +571,7 @@ void WordArr::Append( short aElem )
// Does the Array need to be copied?
if ( nUnused == 0 )
{
- USHORT nNewSize = (nUsed == 1) ? (nGrow==1 ? 2 : nGrow) : nUsed+nGrow;
+ sal_uInt16 nNewSize = (nUsed == 1) ? (nGrow==1 ? 2 : nGrow) : nUsed+nGrow;
short* pNewData = new short[nNewSize];
if ( pData )
{
@@ -579,7 +579,7 @@ void WordArr::Append( short aElem )
memmove( pNewData, pData, sizeof(short)*nUsed );
delete [] pData;
}
- nUnused = sal::static_int_cast< BYTE >(nNewSize-nUsed);
+ nUnused = sal::static_int_cast< sal_uInt8 >(nNewSize-nUsed);
pData = pNewData;
}
@@ -591,11 +591,11 @@ void WordArr::Append( short aElem )
// -----------------------------------------------------------------------
-USHORT WordArr::Remove( USHORT nPos, USHORT nLen )
+sal_uInt16 WordArr::Remove( sal_uInt16 nPos, sal_uInt16 nLen )
{
DBG_MEMTEST();
// Adjust nLen, thus to avoid deleting beyond the end
- nLen = Min( (USHORT)(nUsed-nPos), nLen );
+ nLen = Min( (sal_uInt16)(nUsed-nPos), nLen );
// simple problems require simple solutions!
if ( nLen == 0 )
@@ -615,8 +615,8 @@ USHORT WordArr::Remove( USHORT nPos, USHORT nLen )
if ( (nUnused+nLen) >= nGrow )
{
// reduce (rounded up) to the next Grow-border
- USHORT nNewUsed = nUsed-nLen;
- USHORT nNewSize = ((nNewUsed+nGrow-1)/nGrow) * nGrow;
+ sal_uInt16 nNewUsed = nUsed-nLen;
+ sal_uInt16 nNewSize = ((nNewUsed+nGrow-1)/nGrow) * nGrow;
DBG_ASSERT( nNewUsed <= nNewSize && nNewUsed+nGrow > nNewSize,
"shrink size computation failed" );
short* pNewData = new short[nNewSize];
@@ -631,7 +631,7 @@ USHORT WordArr::Remove( USHORT nPos, USHORT nLen )
delete [] pData;
pData = pNewData;
nUsed = nNewUsed;
- nUnused = sal::static_int_cast< BYTE >(nNewSize - nNewUsed);
+ nUnused = sal::static_int_cast< sal_uInt8 >(nNewSize - nNewUsed);
return nLen;
}
@@ -639,58 +639,58 @@ USHORT WordArr::Remove( USHORT nPos, USHORT nLen )
if ( nUsed-nPos-nLen > 0 )
memmove( pData+nPos, pData+nPos+nLen, (nUsed-nPos-nLen)*sizeof(short) );
nUsed = nUsed - nLen;
- nUnused = sal::static_int_cast< BYTE >(nUnused + nLen);
+ nUnused = sal::static_int_cast< sal_uInt8 >(nUnused + nLen);
return nLen;
}
// -----------------------------------------------------------------------
-BOOL WordArr::Remove( short aElem )
+sal_Bool WordArr::Remove( short aElem )
{
DBG_MEMTEST();
// simple tasks ...
if ( nUsed == 0 )
- return FALSE;
+ return sal_False;
// backwards, since most of the last is first removed
short *pIter = pData + nUsed - 1;
- for ( USHORT n = 0; n < nUsed; ++n, --pIter )
+ for ( sal_uInt16 n = 0; n < nUsed; ++n, --pIter )
if ( *pIter == aElem )
{
Remove(nUsed-n-1, 1);
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL WordArr::Contains( const short rItem ) const
+sal_Bool WordArr::Contains( const short rItem ) const
{
DBG_MEMTEST();
if ( !nUsed )
- return FALSE;
+ return sal_False;
- for ( USHORT n = 0; n < nUsed; ++n )
+ for ( sal_uInt16 n = 0; n < nUsed; ++n )
{
short p = GetObject(n);
if ( p == rItem )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-void WordArr::Insert( USHORT nPos, short rElem )
+void WordArr::Insert( sal_uInt16 nPos, short rElem )
{
DBG_MEMTEST();
// Does the Array need to be copied?
if ( nUnused == 0 )
{
// increase (rounded up) to the next Grow-border
- USHORT nNewSize = nUsed+nGrow;
+ sal_uInt16 nNewSize = nUsed+nGrow;
short* pNewData = new short[nNewSize];
if ( pData )
@@ -699,7 +699,7 @@ void WordArr::Insert( USHORT nPos, short rElem )
memmove( pNewData, pData, sizeof(short)*nUsed );
delete [] pData;
}
- nUnused = sal::static_int_cast< BYTE >(nNewSize-nUsed);
+ nUnused = sal::static_int_cast< sal_uInt8 >(nNewSize-nUsed);
pData = pNewData;
}
@@ -715,7 +715,7 @@ void WordArr::Insert( USHORT nPos, short rElem )
// -----------------------------------------------------------------------
-short WordArr::operator[]( USHORT nPos ) const
+short WordArr::operator[]( sal_uInt16 nPos ) const
{
DBG_MEMTEST();
DBG_ASSERT( nPos < nUsed, "" );
@@ -724,7 +724,7 @@ short WordArr::operator[]( USHORT nPos ) const
// -----------------------------------------------------------------------
-short& WordArr::operator [] (USHORT nPos)
+short& WordArr::operator [] (sal_uInt16 nPos)
{
DBG_MEMTEST();
DBG_ASSERT( nPos < nUsed, "" );
diff --git a/sfx2/source/bastyp/misc.cxx b/sfx2/source/bastyp/misc.cxx
index d96009497282..80991dcc492b 100644..100755
--- a/sfx2/source/bastyp/misc.cxx
+++ b/sfx2/source/bastyp/misc.cxx
@@ -44,7 +44,7 @@ String SearchAndReplace( const String &rSource,
const String &rReplacement )
{
String aTarget( rSource );
- USHORT nPos = rSource.Search( rToReplace );
+ sal_uInt16 nPos = rSource.Search( rToReplace );
if ( nPos != STRING_NOTFOUND )
{
aTarget.Erase( nPos, rToReplace.Len() );
diff --git a/sfx2/source/bastyp/progress.cxx b/sfx2/source/bastyp/progress.cxx
index c5735ea251b6..0ad5de1fea52 100644..100755
--- a/sfx2/source/bastyp/progress.cxx
+++ b/sfx2/source/bastyp/progress.cxx
@@ -49,7 +49,7 @@
#include "sfxtypes.hxx"
#include <sfx2/docfile.hxx>
#include "workwin.hxx"
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include "bastyp.hrc"
#include <sfx2/msg.hxx>
@@ -79,14 +79,14 @@ struct SfxProgress_Impl
{
Reference < XStatusIndicator > xStatusInd;
String aText, aStateText;
- ULONG nMax;
+ sal_uIntPtr nMax;
clock_t nCreate;
clock_t nNextReschedule;
- BOOL bLocked, bAllDocs;
- BOOL bWaitMode;
- BOOL bAllowRescheduling;
- BOOL bRunning;
- BOOL bIsStatusText;
+ sal_Bool bLocked, bAllDocs;
+ sal_Bool bWaitMode;
+ sal_Bool bAllowRescheduling;
+ sal_Bool bRunning;
+ sal_Bool bIsStatusText;
SfxProgress* pActiveProgress;
SfxObjectShellRef xObjSh;
@@ -94,7 +94,7 @@ struct SfxProgress_Impl
SfxViewFrame* pView;
SfxProgress_Impl( const String& );
- void Enable_Impl( BOOL );
+ void Enable_Impl( sal_Bool );
};
@@ -116,7 +116,7 @@ extern sal_uInt32 Get10ThSec();
// -----------------------------------------------------------------------
-void SfxProgress_Impl::Enable_Impl( BOOL bEnable )
+void SfxProgress_Impl::Enable_Impl( sal_Bool bEnable )
{
SfxObjectShell* pDoc = bAllDocs ? NULL : (SfxObjectShell*) xObjSh;
SfxViewFrame *pFrame= SfxViewFrame::GetFirst(pDoc);
@@ -156,10 +156,10 @@ SfxProgress::SfxProgress
const String& rText, /* Text, which appears before the Statusmonitor
in the status line */
- ULONG nRange, /* Max value for range */
+ sal_uIntPtr nRange, /* Max value for range */
- BOOL bAll /* Disable all documents or only the document of the ViewFram */
- ,BOOL bWait /* Aktivate the wait-Pointer initially (TRUE) */
+ sal_Bool bAll, /* Disable all documents or only the document of the ViewFram */
+ sal_Bool bWait /* Activate the wait-Pointer initially (TRUE) */
)
/* [Description]
@@ -173,17 +173,17 @@ SfxProgress::SfxProgress
: pImp( new SfxProgress_Impl( rText ) ),
nVal(0),
- bSuspended(TRUE)
+ bSuspended(sal_True)
{
- pImp->bRunning = TRUE;
+ pImp->bRunning = sal_True;
pImp->bAllowRescheduling = Application::IsInExecute();;
pImp->xObjSh = pObjSh;
pImp->aText = rText;
pImp->nMax = nRange;
- pImp->bLocked = FALSE;
+ pImp->bLocked = sal_False;
pImp->bWaitMode = bWait;
- pImp->bIsStatusText = FALSE;
+ pImp->bIsStatusText = sal_False;
pImp->nCreate = Get10ThSec();
pImp->nNextReschedule = pImp->nCreate;
DBG( DbgOutf( "SfxProgress: created for '%s' at %luds",
@@ -215,7 +215,7 @@ SfxProgress::~SfxProgress()
if ( pImp->xStatusInd.is() )
pImp->xStatusInd->end();
- if( pImp->bIsStatusText == TRUE )
+ if( pImp->bIsStatusText == sal_True )
GetpApp()->HideStatusText( );
delete pImp;
}
@@ -239,7 +239,7 @@ void SfxProgress::Stop()
if ( !pImp->bRunning )
return;
- pImp->bRunning = FALSE;
+ pImp->bRunning = sal_False;
DBG( DbgOutf( "SfxProgress: destroyed at %luds", Get10ThSec() ) );
Suspend();
@@ -248,7 +248,7 @@ void SfxProgress::Stop()
else
SFX_APP()->SetProgress_Impl(0);
if ( pImp->bLocked )
- pImp->Enable_Impl(TRUE);
+ pImp->Enable_Impl(sal_True);
}
// -----------------------------------------------------------------------
@@ -282,7 +282,7 @@ const String& SfxProgress::GetStateText_Impl() const
// -----------------------------------------------------------------------
// Required in App data
-static ULONG nLastTime = 0;
+static sal_uIntPtr nLastTime = 0;
long TimeOut_Impl( void*, void* pArgV )
{
@@ -299,11 +299,11 @@ long TimeOut_Impl( void*, void* pArgV )
// -----------------------------------------------------------------------
-BOOL SfxProgress::SetStateText
+sal_Bool SfxProgress::SetStateText
(
- ULONG nNewVal, /* New value for the progress-bar */
+ sal_uLong nNewVal, /* New value for the progress-bar */
const String& rNewVal, /* Status as Text */
- ULONG nNewRange /* new maximum value, 0 for retaining the old */
+ sal_uLong nNewRange /* new maximum value, 0 for retaining the old */
)
{
@@ -313,11 +313,11 @@ BOOL SfxProgress::SetStateText
// -----------------------------------------------------------------------
-BOOL SfxProgress::SetState
+sal_Bool SfxProgress::SetState
(
- ULONG nNewVal, /* new value for the progress bar */
+ sal_uLong nNewVal, /* new value for the progress bar */
- ULONG nNewRange /* new maximum value, 0 for retaining the old */
+ sal_uLong nNewRange /* new maximum value, 0 for retaining the old */
)
/* [Description]
@@ -325,7 +325,7 @@ BOOL SfxProgress::SetState
[Return value]
- BOOL TRUE
+ sal_Bool TRUE
Proceed with the action
FALSE
@@ -333,7 +333,7 @@ BOOL SfxProgress::SetState
*/
{
- if( pImp->pActiveProgress ) return TRUE;
+ if( pImp->pActiveProgress ) return sal_True;
nVal = nNewVal;
@@ -362,11 +362,11 @@ BOOL SfxProgress::SetState
{
// don't show status indicator for hidden documents (only valid while loading)
SfxMedium* pMedium = pObjSh->GetMedium();
- SFX_ITEMSET_ARG( pMedium->GetItemSet(), pHiddenItem, SfxBoolItem, SID_HIDDEN, FALSE );
+ SFX_ITEMSET_ARG( pMedium->GetItemSet(), pHiddenItem, SfxBoolItem, SID_HIDDEN, sal_False );
if ( !pHiddenItem || !pHiddenItem->GetValue() )
{
{
- SFX_ITEMSET_ARG( pMedium->GetItemSet(), pIndicatorItem, SfxUnoAnyItem, SID_PROGRESS_STATUSBAR_CONTROL, FALSE );
+ SFX_ITEMSET_ARG( pMedium->GetItemSet(), pIndicatorItem, SfxUnoAnyItem, SID_PROGRESS_STATUSBAR_CONTROL, sal_False );
Reference< XStatusIndicator > xInd;
if ( pIndicatorItem && (pIndicatorItem->GetValue()>>=xInd) )
pImp->xStatusInd = xInd;
@@ -393,7 +393,7 @@ BOOL SfxProgress::SetState
pImp->xStatusInd->setValue( nNewVal );
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -438,7 +438,7 @@ void SfxProgress::Resume()
pFrame->GetBindings().ENTERREGISTRATIONS();
}
- bSuspended = FALSE;
+ bSuspended = sal_False;
}
}
@@ -460,7 +460,7 @@ void SfxProgress::Suspend()
if ( !bSuspended )
{
DBG( DbgOutf( "SfxProgress: suspended" ) );
- bSuspended = TRUE;
+ bSuspended = sal_True;
if ( pImp->xStatusInd.is() )
{
@@ -502,7 +502,7 @@ void SfxProgress::Lock()
( eMode == SFX_CREATE_MODE_PREVIEW ) )
{
DBG( DbgOutf( "SfxProgress: not locked because EMBEDDED/PREVIEW found" ) );
- pImp->bAllowRescheduling = FALSE;
+ pImp->bAllowRescheduling = sal_False;
}
}
}
@@ -513,14 +513,14 @@ void SfxProgress::Lock()
( eMode == SFX_CREATE_MODE_PREVIEW ) )
{
DBG( DbgOutf( "SfxProgress: not locked because ObjectShell is EMBEDDED/PREVIEW" ) );
- pImp->bAllowRescheduling = FALSE;
+ pImp->bAllowRescheduling = sal_False;
}
}
- pImp->Enable_Impl( FALSE );
+ pImp->Enable_Impl( sal_False );
DBG( DbgOutf( "SfxProgress: locked" ) );
- pImp->bLocked = TRUE;
+ pImp->bLocked = sal_True;
}
// -----------------------------------------------------------------------
@@ -532,8 +532,8 @@ void SfxProgress::UnLock()
return;
DBG( DbgOutf( "SfxProgress: unlocked" ) );
- pImp->bLocked = FALSE;
- pImp->Enable_Impl(TRUE);
+ pImp->bLocked = sal_False;
+ pImp->Enable_Impl(sal_True);
}
// -----------------------------------------------------------------------
@@ -566,7 +566,7 @@ void SfxProgress::Reschedule()
void SfxProgress::SetWaitMode
(
- BOOL bWait /* TRUE Wait-cursor is used
+ sal_Bool bWait /* TRUE
FALSE Wait-cursor not used */
)
@@ -609,7 +609,7 @@ void SfxProgress::SetWaitMode
// -----------------------------------------------------------------------
-BOOL SfxProgress::GetWaitMode() const
+sal_Bool SfxProgress::GetWaitMode() const
/* [Description]
@@ -699,7 +699,7 @@ bool SfxProgress::StatusBarManagerGone_Impl
*/
{
- return TRUE;
+ return sal_True;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/bastyp/sfxhtml.cxx b/sfx2/source/bastyp/sfxhtml.cxx
index b301563aa9a6..ce3b19725727 100644..100755
--- a/sfx2/source/bastyp/sfxhtml.cxx
+++ b/sfx2/source/bastyp/sfxhtml.cxx
@@ -74,7 +74,7 @@ static HTMLOptionEnum const aAreaShapeOptEnums[] =
{ 0, 0 }
};
-SfxHTMLParser::SfxHTMLParser( SvStream& rStream, BOOL bIsNewDoc,
+SfxHTMLParser::SfxHTMLParser( SvStream& rStream, sal_Bool bIsNewDoc,
SfxMedium *pMed ) :
HTMLParser( rStream, bIsNewDoc ),
pMedium( pMed ), pDLMedium( 0 ),
@@ -90,7 +90,7 @@ SfxHTMLParser::SfxHTMLParser( SvStream& rStream, BOOL bIsNewDoc,
SetSrcEncoding( GetExtendedCompatibilityTextEncoding( RTL_TEXTENCODING_ISO_8859_1 ) );
// If the file starts with a BOM, switch to UCS2.
- SetSwitchToUCS2( TRUE );
+ SetSwitchToUCS2( sal_True );
}
SfxHTMLParser::~SfxHTMLParser()
@@ -99,7 +99,7 @@ SfxHTMLParser::~SfxHTMLParser()
delete pDLMedium;
}
-BOOL SfxHTMLParser::ParseMapOptions(ImageMap * pImageMap,
+sal_Bool SfxHTMLParser::ParseMapOptions(ImageMap * pImageMap,
const HTMLOptions * pOptions)
{
DBG_ASSERT( pImageMap, "ParseMapOptions: No Image-Map" );
@@ -107,7 +107,7 @@ BOOL SfxHTMLParser::ParseMapOptions(ImageMap * pImageMap,
String aName;
- for( USHORT i=pOptions->Count(); i; )
+ for( sal_uInt16 i=pOptions->Count(); i; )
{
const HTMLOption *pOption = (*pOptions)[--i];
switch( pOption->GetToken() )
@@ -124,23 +124,23 @@ BOOL SfxHTMLParser::ParseMapOptions(ImageMap * pImageMap,
return aName.Len() > 0;
}
-BOOL SfxHTMLParser::ParseAreaOptions(ImageMap * pImageMap, const String& rBaseURL,
+sal_Bool SfxHTMLParser::ParseAreaOptions(ImageMap * pImageMap, const String& rBaseURL,
const HTMLOptions * pOptions,
- USHORT nEventMouseOver,
- USHORT nEventMouseOut )
+ sal_uInt16 nEventMouseOver,
+ sal_uInt16 nEventMouseOut )
{
DBG_ASSERT( pImageMap, "ParseAreaOptions: no Image-Map" );
DBG_ASSERT( pOptions, "ParseAreaOptions: no Options" );
- USHORT nShape = IMAP_OBJ_RECTANGLE;
+ sal_uInt16 nShape = IMAP_OBJ_RECTANGLE;
SvULongs aCoords;
String aName, aHRef, aAlt, aTarget, sEmpty;
- BOOL bNoHRef = FALSE;
+ sal_Bool bNoHRef = sal_False;
SvxMacroTableDtor aMacroTbl;
- for( USHORT i=pOptions->Count(); i; )
+ for( sal_uInt16 i=pOptions->Count(); i; )
{
- USHORT nEvent = 0;
+ sal_uInt16 nEvent = 0;
ScriptType eScrpType = STARBASIC;
const HTMLOption *pOption = (*pOptions)[--i];
switch( pOption->GetToken() )
@@ -152,13 +152,13 @@ BOOL SfxHTMLParser::ParseAreaOptions(ImageMap * pImageMap, const String& rBaseUR
pOption->GetEnum( nShape, aAreaShapeOptEnums );
break;
case HTML_O_COORDS:
- pOption->GetNumbers( aCoords, TRUE );
+ pOption->GetNumbers( aCoords, sal_True );
break;
case HTML_O_HREF:
aHRef = INetURLObject::GetAbsURL( rBaseURL, pOption->GetString() );
break;
case HTML_O_NOHREF:
- bNoHRef = TRUE;
+ bNoHRef = sal_True;
break;
case HTML_O_ALT:
aAlt = pOption->GetString();
@@ -196,7 +196,7 @@ IMAPOBJ_SETEVENT:
if( bNoHRef )
aHRef.Erase();
- BOOL bNewArea = TRUE;
+ sal_Bool bNewArea = sal_True;
switch( nShape )
{
case IMAP_OBJ_RECTANGLE:
@@ -225,9 +225,9 @@ IMAPOBJ_SETEVENT:
case IMAP_OBJ_POLYGON:
if( aCoords.Count() >=6 )
{
- USHORT nCount = aCoords.Count() / 2;
+ sal_uInt16 nCount = aCoords.Count() / 2;
Polygon aPoly( nCount );
- for( USHORT i=0; i<nCount; i++ )
+ for( sal_uInt16 i=0; i<nCount; i++ )
aPoly[i] = Point( aCoords[2*i], aCoords[2*i+1] );
IMapPolygonObject aMapPObj( aPoly, aHRef, aAlt, String(), aTarget, aName,
!bNoHRef );
@@ -237,7 +237,7 @@ IMAPOBJ_SETEVENT:
}
break;
default:
- bNewArea = FALSE;
+ bNewArea = sal_False;
}
return bNewArea;
@@ -251,7 +251,7 @@ void SfxHTMLParser::StartFileDownload( const String& rURL, int nToken,
if( pDLMedium )
return;
- pDLMedium = new SfxMedium( rURL, SFX_STREAM_READONLY, FALSE );
+ pDLMedium = new SfxMedium( rURL, SFX_STREAM_READONLY, sal_False );
if( pSh )
{
// Register the medium, so that it can be stopped.
@@ -259,13 +259,13 @@ void SfxHTMLParser::StartFileDownload( const String& rURL, int nToken,
}
// Push Download (Note: Can also be synchronous).
- if ( TRUE /*pMedium->GetDoneLink() == Link()*/ )
+ if ( sal_True /*pMedium->GetDoneLink() == Link()*/ )
pDLMedium->DownLoad();
else
{
// Set Downloading-Flag to TRUE. When we get into the Pending-status
// we will then also have Data-Available-Links.
- SetDownloadingFile( TRUE );
+ SetDownloadingFile( sal_True );
pDLMedium->DownLoad( STATIC_LINK( this, SfxHTMLParser, FileDownloadDone ) );
// If the Downloading-Flag is still set downloading will be done
@@ -283,11 +283,11 @@ void SfxHTMLParser::StartFileDownload( const String& rURL, int nToken,
}
}
-BOOL SfxHTMLParser::FinishFileDownload( String& rStr )
+sal_Bool SfxHTMLParser::FinishFileDownload( String& rStr )
{
String aStr;
- BOOL bOK = pDLMedium && pDLMedium->GetErrorCode()==0;
+ sal_Bool bOK = pDLMedium && pDLMedium->GetErrorCode()==0;
if( bOK )
{
SvStream* pStream = pDLMedium->GetInStream();
@@ -321,7 +321,7 @@ IMPL_STATIC_LINK( SfxHTMLParser, FileDownloadDone, void*, EMPTYARG )
{
// The Download is now completed. also the Data-Available-Link
// must or are allowed to be passed through.
- pThis->SetDownloadingFile( FALSE );
+ pThis->SetDownloadingFile( sal_False );
// ... and call once, thus will continue reading.
pThis->CallAsyncCallLink();
@@ -336,7 +336,7 @@ void SfxHTMLParser::GetScriptType_Impl( SvKeyValueIterator *pHTTPHeader )
if( pHTTPHeader )
{
SvKeyValue aKV;
- for( BOOL bCont = pHTTPHeader->GetFirst( aKV ); bCont;
+ for( sal_Bool bCont = pHTTPHeader->GetFirst( aKV ); bCont;
bCont = pHTTPHeader->GetNext( aKV ) )
{
if( aKV.GetKey().EqualsIgnoreCaseAscii(
diff --git a/sfx2/source/bastyp/sfxresid.cxx b/sfx2/source/bastyp/sfxresid.cxx
index 7ad918cd04fb..219e41c5cd53 100644..100755
--- a/sfx2/source/bastyp/sfxresid.cxx
+++ b/sfx2/source/bastyp/sfxresid.cxx
@@ -31,14 +31,14 @@
#include <tools/simplerm.hxx>
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include <sfx2/app.hxx>
// -----------------------------------------------------------------------
static ResMgr* pMgr=NULL;
-SfxResId::SfxResId( USHORT nId ) :
+SfxResId::SfxResId( sal_uInt16 nId ) :
ResId( nId, *GetResMgr() )
{
@@ -50,7 +50,7 @@ SfxResId::SfxResId( USHORT nId ) :
//
//============================================================================
-SfxSimpleResId::SfxSimpleResId(USHORT nID):
+SfxSimpleResId::SfxSimpleResId(sal_uInt16 nID):
m_sText( SFX_APP()->GetSimpleResManager()->ReadString(nID) )
{}
diff --git a/sfx2/source/config/evntconf.cxx b/sfx2/source/config/evntconf.cxx
index 8d2294cd0805..eb13788aba94 100644..100755
--- a/sfx2/source/config/evntconf.cxx
+++ b/sfx2/source/config/evntconf.cxx
@@ -35,27 +35,20 @@
#include <basic/sbmod.hxx>
#include <tools/urlobj.hxx>
#include <basic/sbx.hxx>
-
#include <sot/storage.hxx>
#include <unotools/securityoptions.hxx>
-#ifndef _RTL_USTRING_
#include <rtl/ustring.h>
-#endif
-
#include <com/sun/star/uno/Any.hxx>
#include <framework/eventsconfiguration.hxx>
#include <comphelper/processfactory.hxx>
-
#include <sfx2/evntconf.hxx>
-#include <sfx2/macrconf.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/app.hxx>
#include <sfx2/objsh.hxx>
#include <sfx2/dispatch.hxx>
-#include "config.hrc"
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include "eventsupplier.hxx"
#include <com/sun/star/beans/PropertyValue.hpp>
@@ -67,6 +60,7 @@
// -----------------------------------------------------------------------
TYPEINIT1(SfxEventHint, SfxHint);
TYPEINIT1(SfxEventNamesItem, SfxPoolItem);
+TYPEINIT1(SfxViewEventHint, SfxHint);
using namespace com::sun::star;
@@ -97,7 +91,7 @@ int SfxEventNamesItem::operator==( const SfxPoolItem& rAttr ) const
const SfxEventNamesList& rOther = ( (SfxEventNamesItem&) rAttr ).aEventsList;
if ( rOwn.size() != rOther.size() )
- return FALSE;
+ return sal_False;
for ( size_t nNo = 0, nCnt = rOwn.size(); nNo < nCnt; ++nNo )
{
@@ -106,10 +100,10 @@ int SfxEventNamesItem::operator==( const SfxPoolItem& rAttr ) const
if ( pOwn->mnId != pOther->mnId ||
pOwn->maEventName != pOther->maEventName ||
pOwn->maUIName != pOther->maUIName )
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
@@ -128,25 +122,25 @@ SfxPoolItem* SfxEventNamesItem::Clone( SfxItemPool *) const
return new SfxEventNamesItem(*this);
}
-SfxPoolItem* SfxEventNamesItem::Create(SvStream &, USHORT) const
+SfxPoolItem* SfxEventNamesItem::Create(SvStream &, sal_uInt16) const
{
OSL_FAIL("not streamable!");
return new SfxEventNamesItem(Which());
}
-SvStream& SfxEventNamesItem::Store(SvStream &rStream, USHORT ) const
+SvStream& SfxEventNamesItem::Store(SvStream &rStream, sal_uInt16 ) const
{
OSL_FAIL("not streamable!");
return rStream;
}
-USHORT SfxEventNamesItem::GetVersion( USHORT ) const
+sal_uInt16 SfxEventNamesItem::GetVersion( sal_uInt16 ) const
{
OSL_FAIL("not streamable!");
return 0;
}
-void SfxEventNamesItem::AddEvent( const String& rName, const String& rUIName, USHORT nID )
+void SfxEventNamesItem::AddEvent( const String& rName, const String& rUIName, sal_uInt16 nID )
{
aEventsList.push_back( new SfxEventName( nID, rName, rUIName.Len() ? rUIName : rName ) );
}
@@ -290,7 +284,7 @@ void SfxEventConfiguration::ConfigureEvent( rtl::OUString aName, const SvxMacro&
}
// -------------------------------------------------------------------------------------------------------
-SvxMacro* SfxEventConfiguration::ConvertToMacro( const com::sun::star::uno::Any& rElement, SfxObjectShell* pDoc, BOOL bBlowUp )
+SvxMacro* SfxEventConfiguration::ConvertToMacro( const com::sun::star::uno::Any& rElement, SfxObjectShell* pDoc, sal_Bool bBlowUp )
{
return SfxEvents_Impl::ConvertToMacro( rElement, pDoc, bBlowUp );
}
diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx
index 43e8f9fc4fd2..9d7c805e6fa9 100644..100755
--- a/sfx2/source/control/bindings.cxx
+++ b/sfx2/source/control/bindings.cxx
@@ -62,7 +62,6 @@
#include <sfx2/objface.hxx>
#include "sfxtypes.hxx"
#include "workwin.hxx"
-#include <sfx2/macrconf.hxx>
#include <sfx2/unoctitm.hxx>
#include <sfx2/sfx.hrc>
#include <sfx2/sfxuno.hxx>
@@ -90,7 +89,7 @@ DBG_NAME(SfxBindingsInvalidateAll)
//====================================================================
-static USHORT nTimeOut = 300;
+static sal_uInt16 nTimeOut = 300;
#define TIMEOUT_FIRST nTimeOut
#define TIMEOUT_UPDATING 20
@@ -99,7 +98,7 @@ static USHORT nTimeOut = 300;
static sal_uInt32 nCache1 = 0;
static sal_uInt32 nCache2 = 0;
-typedef boost::unordered_map< USHORT, bool > InvalidateSlotMap;
+typedef boost::unordered_map< sal_uInt16, bool > InvalidateSlotMap;
//====================================================================
@@ -397,7 +396,7 @@ void SfxBindings::Update_Impl
{
if( pCache->GetDispatch().is() && pCache->GetItemLink() )
{
- pCache->SetCachedState(TRUE);
+ pCache->SetCachedState(sal_True);
if ( !pCache->GetInternalController() )
return;
}
@@ -466,7 +465,7 @@ void SfxBindings::InvalidateSlotsInMap_Impl()
//--------------------------------------------------------------------
-void SfxBindings::AddSlotToInvalidateSlotsMap_Impl( USHORT nId )
+void SfxBindings::AddSlotToInvalidateSlotsMap_Impl( sal_uInt16 nId )
{
pImp->m_aInvalidateSlots[nId] = sal_True;
}
@@ -499,10 +498,10 @@ void SfxBindings::Update
if (pCache)
{
- BOOL bInternalUpdate = TRUE;
+ sal_Bool bInternalUpdate = sal_True;
if( pCache->GetDispatch().is() && pCache->GetItemLink() )
{
- pCache->SetCachedState(TRUE);
+ pCache->SetCachedState(sal_True);
bInternalUpdate = ( pCache->GetInternalController() != 0 );
}
@@ -1002,16 +1001,16 @@ sal_uInt16 SfxBindings::GetSlotPos( sal_uInt16 nId, sal_uInt16 nStartSearchAt )
//--------------------------------------------------------------------
void SfxBindings::RegisterInternal_Impl( SfxControllerItem& rItem )
{
- Register_Impl( rItem, TRUE );
+ Register_Impl( rItem, sal_True );
}
void SfxBindings::Register( SfxControllerItem& rItem )
{
- Register_Impl( rItem, FALSE );
+ Register_Impl( rItem, sal_False );
}
-void SfxBindings::Register_Impl( SfxControllerItem& rItem, BOOL bInternal )
+void SfxBindings::Register_Impl( SfxControllerItem& rItem, sal_Bool bInternal )
{
DBG_MEMTEST();
DBG_ASSERT( nRegLevel > 0, "registration without EnterRegistrations" );
@@ -1086,13 +1085,7 @@ void SfxBindings::Release( SfxControllerItem& rItem )
// was this the last controller?
if ( pCache->GetItemLink() == 0 && !pCache->GetInternalController() )
{
- if ( SfxMacroConfig::IsMacroSlot( nId ) )
- {
- delete (*pImp->pCaches)[nPos];
- pImp->pCaches->Remove(nPos, 1);
- }
- else
- pImp->bCtrlReleased = sal_True;
+ pImp->bCtrlReleased = sal_True;
}
}
@@ -1125,14 +1118,14 @@ sal_Bool SfxBindings::Execute( sal_uInt16 nId, const SfxPoolItem** ppItems, sal_
return ( pRet != 0 );
}
-void SfxBindings::ExecuteGlobal_Impl( USHORT nId )
+void SfxBindings::ExecuteGlobal_Impl( sal_uInt16 nId )
{
if( nId && pDispatcher )
- Execute_Impl( nId, NULL, 0, SFX_CALLMODE_ASYNCHRON, NULL, TRUE );
+ Execute_Impl( nId, NULL, 0, SFX_CALLMODE_ASYNCHRON, NULL, sal_True );
}
const SfxPoolItem* SfxBindings::Execute_Impl( sal_uInt16 nId, const SfxPoolItem** ppItems, sal_uInt16 nModi, SfxCallMode nCallMode,
- const SfxPoolItem **ppInternalArgs, BOOL bGlobalOnly )
+ const SfxPoolItem **ppInternalArgs, sal_Bool bGlobalOnly )
{
SfxStateCache *pCache = GetStateCache( nId );
if ( !pCache )
@@ -1350,10 +1343,10 @@ void SfxBindings::UpdateSlotServer_Impl()
{
::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame > xFrame
( pDispatcher->GetFrame()->GetFrame().GetFrameInterface(), UNO_QUERY );
- pImp->bContextChanged = FALSE;
+ pImp->bContextChanged = sal_False;
}
else
- pImp->bContextChanged = TRUE;
+ pImp->bContextChanged = sal_True;
}
const sal_uInt16 nCount = pImp->pCaches->Count();
@@ -1438,8 +1431,8 @@ SfxItemSet* SfxBindings::CreateSet_Impl
pRealSlot->GetSlotId(), pRealSlot->GetWhich(rPool), pRealSlot, pCache );
rFound.Insert( pFound );
- USHORT nSlot = pRealSlot->GetSlotId();
- if ( !SfxMacroConfig::IsMacroSlot( nSlot ) && !(nSlot >= SID_VERB_START && nSlot <= SID_VERB_END) )
+ sal_uInt16 nSlot = pRealSlot->GetSlotId();
+ if ( !(nSlot >= SID_VERB_START && nSlot <= SID_VERB_END) )
{
pInterface = pInterface->GetRealInterfaceForSlot( pRealSlot );
DBG_ASSERT (pInterface,"Slot in the given shell is not found");
@@ -1514,7 +1507,7 @@ SfxItemSet* SfxBindings::CreateSet_Impl
// Create a Set from the ranges
sal_uInt16 *pRanges = new sal_uInt16[rFound.Count() * 2 + 1];
int j = 0;
- USHORT i = 0;
+ sal_uInt16 i = 0;
while ( i < rFound.Count() )
{
pRanges[j++] = rFound[i]->nWhichId;
@@ -1706,7 +1699,7 @@ IMPL_LINK( SfxBindings, NextJob_Impl, Timer *, pTimer )
// iterate through the bound functions
sal_Bool bJobDone = sal_False;
while ( !bJobDone )
- {
+ {
SfxStateCache* pCache = (*pImp->pCaches)[pImp->nMsgPos];
DBG_ASSERT( pCache, "invalid SfxStateCache-position in job queue" );
sal_Bool bWasDirty = pCache->IsControllerDirty();
@@ -1862,7 +1855,7 @@ void SfxBindings::LeaveRegistrations( sal_uInt16 nLevel, const char *pFile, int
{
if ( pImp->bContextChanged )
{
- pImp->bContextChanged = FALSE;
+ pImp->bContextChanged = sal_False;
}
SfxViewFrame* pFrame = pDispatcher->GetFrame();
@@ -2059,12 +2052,12 @@ SfxItemState SfxBindings::QueryState( sal_uInt16 nSlot, SfxPoolItem* &rpState )
if ( !pDisp )
{
- BOOL bDeleteCache = FALSE;
+ sal_Bool bDeleteCache = sal_False;
if ( !pCache )
{
pCache = new SfxStateCache( nSlot );
pCache->GetSlotServer( *GetDispatcher_Impl(), pImp->xProv );
- bDeleteCache = TRUE;
+ bDeleteCache = sal_True;
}
SfxItemState eState = SFX_ITEM_SET;
@@ -2280,7 +2273,7 @@ SystemWindow* SfxBindings::GetSystemWindow() const
return pTop->GetFrame().GetTopWindow_Impl();
}
-BOOL SfxBindings::ExecuteCommand_Impl( const String& rCommand )
+sal_Bool SfxBindings::ExecuteCommand_Impl( const String& rCommand )
{
::com::sun::star::util::URL aURL;
aURL.Complete = rCommand;
@@ -2309,10 +2302,10 @@ BOOL SfxBindings::ExecuteCommand_Impl( const String& rCommand )
::comphelper::UiEventsLogger::logDispatch(aURL, source);
}
new SfxAsyncExec_Impl( aURL, xDisp );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
com::sun::star::uno::Reference< com::sun::star::frame::XDispatchRecorder > SfxBindings::GetRecorder() const
@@ -2329,7 +2322,7 @@ void SfxBindings::ContextChanged_Impl()
{
if ( !pImp->bInUpdate && ( !pImp->bContextChanged || !pImp->bAllMsgDirty ) )
{
- InvalidateAll( TRUE );
+ InvalidateAll( sal_True );
}
}
diff --git a/sfx2/source/control/ctrlitem.cxx b/sfx2/source/control/ctrlitem.cxx
index 57a93442bc64..331baf83480f 100644..100755
--- a/sfx2/source/control/ctrlitem.cxx
+++ b/sfx2/source/control/ctrlitem.cxx
@@ -44,7 +44,7 @@ DBG_NAME(SfxControllerItem);
//--------------------------------------------------------------------
#ifdef DBG_UTIL
-void SfxControllerItem::CheckConfigure_Impl( ULONG nType )
+void SfxControllerItem::CheckConfigure_Impl( sal_uIntPtr nType )
{
// Real Slot? (i.e. no Separator etc.)
if ( !nId )
@@ -74,9 +74,9 @@ SfxControllerItem* SfxControllerItem::GetItemLink()
}
//--------------------------------------------------------------------
-// returns TRUE if this binding is really bound to a function
+// returns sal_True if this binding is really bound to a function
-BOOL SfxControllerItem::IsBound() const
+sal_Bool SfxControllerItem::IsBound() const
{
DBG_MEMTEST();
DBG_CHKTHIS(SfxControllerItem, 0);
@@ -86,12 +86,12 @@ BOOL SfxControllerItem::IsBound() const
//--------------------------------------------------------------------
// returns the associated function-id or 0 if none
-// USHORT SfxControllerItem::GetId() const;
+// sal_uInt16 SfxControllerItem::GetId() const;
//====================================================================
// registeres with the id at the bindings
-void SfxControllerItem::Bind( USHORT nNewId, SfxBindings *pBindinx )
+void SfxControllerItem::Bind( sal_uInt16 nNewId, SfxBindings *pBindinx )
{
DBG_MEMTEST();
DBG_CHKTHIS(SfxControllerItem, 0);
@@ -110,7 +110,7 @@ void SfxControllerItem::Bind( USHORT nNewId, SfxBindings *pBindinx )
pBindings->Register(*this);
}
-void SfxControllerItem::BindInternal_Impl( USHORT nNewId, SfxBindings *pBindinx )
+void SfxControllerItem::BindInternal_Impl( sal_uInt16 nNewId, SfxBindings *pBindinx )
{
DBG_MEMTEST();
DBG_CHKTHIS(SfxControllerItem, 0);
@@ -249,7 +249,7 @@ SfxControllerItem* SfxControllerItem::ChangeItemLink( SfxControllerItem* pNewLin
//--------------------------------------------------------------------
// changes the id of unbound functions (e.g. for sub-menu-ids)
-void SfxControllerItem::SetId( USHORT nItemId )
+void SfxControllerItem::SetId( sal_uInt16 nItemId )
{
DBG_MEMTEST();
DBG_CHKTHIS(SfxControllerItem, 0);
@@ -273,7 +273,7 @@ SfxControllerItem::SfxControllerItem():
//--------------------------------------------------------------------
// creates a representation of the function nId and registeres it
-SfxControllerItem::SfxControllerItem( USHORT nID, SfxBindings &rBindings ):
+SfxControllerItem::SfxControllerItem( sal_uInt16 nID, SfxBindings &rBindings ):
nId(nID),
pNext(this),
pBindings(&rBindings)
@@ -298,7 +298,7 @@ SfxControllerItem::~SfxControllerItem()
void SfxControllerItem::StateChanged
(
- USHORT, // <SID> of the triggering slot
+ sal_uInt16, // <SID> of the triggering slot
SfxItemState, // <SfxItemState> of 'pState'
const SfxPoolItem* // Slot-Status, NULL or IsInvalidItem()
)
@@ -340,7 +340,7 @@ void SfxControllerItem::DeleteFloatingWindow()
void SfxStatusForwarder::StateChanged
(
- USHORT nSID, // <SID> of the triggering slot
+ sal_uInt16 nSID, // <SID> of the triggering slot
SfxItemState eState, // <SfxItemState> of 'pState'
const SfxPoolItem* pState // Slot-Status, NULL or IsInvalidItem()
)
@@ -352,7 +352,7 @@ void SfxStatusForwarder::StateChanged
//--------------------------------------------------------------------
SfxStatusForwarder::SfxStatusForwarder(
- USHORT nSlotId,
+ sal_uInt16 nSlotId,
SfxControllerItem& rMaster ):
SfxControllerItem( nSlotId, rMaster.GetBindings() ),
pMaster( &rMaster )
@@ -434,7 +434,7 @@ SfxMapUnit SfxControllerItem::GetCoreMetric() const
{
SfxShell *pSh = pDispat->GetShell( pServer->GetShellLevel() );
SfxItemPool &rPool = pSh->GetPool();
- USHORT nWhich = rPool.GetWhich( nId );
+ sal_uInt16 nWhich = rPool.GetWhich( nId );
return rPool.GetMetric( nWhich );
}
}
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index b301039f35d1..64aac4862c52 100644..100755
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -51,7 +51,7 @@
// due to nAutoPageID
#include "appdata.hxx"
-#include "sfxhelp.hxx"
+#include "sfx2/sfxhelp.hxx"
#include <sfx2/dispatch.hxx>
#include <sfx2/minstack.hxx>
#include <sfx2/msg.hxx>
@@ -63,7 +63,6 @@
#include "slotserv.hxx"
#include <sfx2/ipclient.hxx>
#include "sfxtypes.hxx"
-#include <sfx2/macrconf.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/viewsh.hxx>
#include <sfx2/childwin.hxx>
@@ -270,7 +269,11 @@ int SfxDispatcher::Call_Impl( SfxShell& rShell, const SfxSlot &rSlot, SfxRequest
if ( !pView )
pView = SfxViewFrame::Current();
if ( pView )
- SfxHelp::OpenHelpAgent( &pView->GetFrame(), rReq.GetSlot() );
+ {
+ rtl::OString aCmd(".uno:");
+ aCmd += rSlot.GetUnoName();
+ SfxHelp::OpenHelpAgent( &pView->GetFrame(), aCmd );
+ }
SfxExecFunc pFunc = rSlot.GetExecFnc();
rShell.CallExec( pFunc, rReq );
@@ -352,7 +355,6 @@ void SfxDispatcher::Construct_Impl( SfxDispatcher* pParent )
pImp->pParent = pParent;
pImp->bInvalidateOnUnlock = sal_False;
- pImp->nActionLevel = 0;
for (sal_uInt16 n=0; n<SFX_OBJECTBAR_MAX; n++)
pImp->aObjBars[n].nResId = 0;
@@ -468,7 +470,6 @@ void SfxDispatcher::Pop
DBG_MEMTEST();
DBG_ASSERT( rShell.GetInterface(),
"pushing SfxShell without previous RegisterInterface()" );
- DBG_ASSERT( pImp->nActionLevel == 0, "Push or Pop within Action" );
bool bDelete = (nMode & SFX_SHELL_POP_DELETE) == SFX_SHELL_POP_DELETE;
bool bUntil = (nMode & SFX_SHELL_POP_UNTIL) == SFX_SHELL_POP_UNTIL;
@@ -776,11 +777,11 @@ void SfxDispatcher::DoActivate_Impl( sal_Bool bMDI, SfxViewFrame* /* pOld */ )
SfxBindings *pBind = GetBindings();
while ( pBind )
{
- pBind->HidePopupCtrls_Impl( FALSE );
+ pBind->HidePopupCtrls_Impl( sal_False );
pBind = pBind->GetSubBindings_Impl();
}
- pImp->pFrame->GetFrame().GetWorkWindow_Impl()->HidePopups_Impl( FALSE, FALSE, 1 );
+ pImp->pFrame->GetFrame().GetWorkWindow_Impl()->HidePopups_Impl( sal_False, sal_False, 1 );
}
if ( pImp->aToDoStack.Count() )
@@ -862,7 +863,7 @@ void SfxDispatcher::DoDeactivate_Impl( sal_Bool bMDI, SfxViewFrame* pNew )
for ( sal_uInt16 i = 0; i < pImp->aStack.Count(); ++i )
pImp->aStack.Top(i)->DoDeactivate_Impl(pImp->pFrame, bMDI);
- BOOL bHidePopups = bMDI && pImp->pFrame;
+ sal_Bool bHidePopups = bMDI && pImp->pFrame;
if ( pNew && pImp->pFrame )
{
com::sun::star::uno::Reference< com::sun::star::frame::XFrame > xOldFrame(
@@ -872,7 +873,7 @@ void SfxDispatcher::DoDeactivate_Impl( sal_Bool bMDI, SfxViewFrame* pNew )
GetFrame()->GetFrame().GetFrameInterface(), com::sun::star::uno::UNO_QUERY );
if ( xOldFrame == xMyFrame )
- bHidePopups = FALSE;
+ bHidePopups = sal_False;
}
if ( bHidePopups )
@@ -880,11 +881,11 @@ void SfxDispatcher::DoDeactivate_Impl( sal_Bool bMDI, SfxViewFrame* pNew )
SfxBindings *pBind = GetBindings();
while ( pBind )
{
- pBind->HidePopupCtrls_Impl( TRUE );
+ pBind->HidePopupCtrls_Impl( sal_True );
pBind = pBind->GetSubBindings_Impl();
}
- pImp->pFrame->GetFrame().GetWorkWindow_Impl()->HidePopups_Impl( TRUE, FALSE, 1 );
+ pImp->pFrame->GetFrame().GetWorkWindow_Impl()->HidePopups_Impl( sal_True, sal_False, 1 );
}
Flush();
@@ -971,10 +972,6 @@ void SfxDispatcher::_Execute
if ( IsLocked( rSlot.GetSlotId() ) )
return;
- sal_uInt16 nSlot = rSlot.GetSlotId();
- if ( SfxMacroConfig::IsMacroSlot( nSlot ) )
- SFX_APP()->GetMacroConfig()->RegisterSlotId( nSlot );
-
if ( (eCallMode & SFX_CALLMODE_ASYNCHRON) ||
( !(eCallMode & SFX_CALLMODE_SYNCHRON) &&
rSlot.IsMode(SFX_SLOT_ASYNCHRON) ) )
@@ -988,7 +985,7 @@ void SfxDispatcher::_Execute
if ( &rShell == pDispat->pImp->aStack.Top(n) )
{
if ( eCallMode & SFX_CALLMODE_RECORD )
- rReq.AllowRecording( TRUE );
+ rReq.AllowRecording( sal_True );
pDispat->pImp->xPoster->Post(new SfxRequest(rReq));
return;
}
@@ -1219,11 +1216,11 @@ const SfxPoolItem* SfxDispatcher::Execute( const SfxExecuteItem& rItem )
//--------------------------------------------------------------------
const SfxPoolItem* SfxDispatcher::Execute(
- USHORT nSlot,
+ sal_uInt16 nSlot,
SfxCallMode nCall,
SfxItemSet* pArgs,
SfxItemSet* pInternalArgs,
- USHORT nModi)
+ sal_uInt16 nModi)
{
if ( IsLocked(nSlot) )
return 0;
@@ -1341,9 +1338,9 @@ const SfxPoolItem* SfxDispatcher::Execute
//--------------------------------------------------------------------
const SfxPoolItem* SfxDispatcher::Execute
(
- USHORT nSlot,
+ sal_uInt16 nSlot,
SfxCallMode eCall,
- USHORT nModi,
+ sal_uInt16 nModi,
const SfxItemSet &rArgs
)
{
@@ -1528,38 +1525,6 @@ IMPL_LINK( SfxDispatcher, PostMsgHandler, SfxRequest*, pReq )
return 0;
}
//--------------------------------------------------------------------
-void SfxDispatcher::EnterAction( const String& rName )
-
-// marks the beginning of a block of actions
-
-{
- DBG_MEMTEST();
- Flush();
- DBG_ASSERT( pImp->aStack.Count() > 0, "EnterAction on empty dispatcher stack" );
- if ( ++pImp->nActionLevel == 1 )
- {
- SfxUndoManager *pUndoMgr = GetShell(0)->GetUndoManager();
- if ( pUndoMgr )
- pUndoMgr->EnterListAction( rName, rName HACK(RepeatComment), 0 HACK(ID) );
- }
-}
-//--------------------------------------------------------------------
-void SfxDispatcher::LeaveAction()
-
-// marks the end of a block of actions
-
-{
- DBG_MEMTEST();
- DBG_ASSERT( pImp->nActionLevel > 0, "EnterAction without LeaveAction" );
- if ( --pImp->nActionLevel == 0 )
- {
- SfxUndoManager *pUndoMgr = GetShell(0)->GetUndoManager();
- if ( pUndoMgr )
- pUndoMgr->LeaveListAction();
- }
-}
-
-//--------------------------------------------------------------------
void SfxDispatcher::SetMenu_Impl()
{
if ( pImp->pFrame )
@@ -1589,14 +1554,14 @@ void SfxDispatcher::SetMenu_Impl()
}
//--------------------------------------------------------------------
-long SfxDispatcher::Update_Impl( sal_Bool bForce )
+void SfxDispatcher::Update_Impl( sal_Bool bForce )
{
SFX_STACK(SfxDispatcher::Update_Impl);
Flush();
if ( !pImp->pFrame || pImp->bUILocked )
- return 0;
+ return;
SFX_APP(); // -Wall is this required???
SfxDispatcher *pDisp = this;
@@ -1618,7 +1583,7 @@ long SfxDispatcher::Update_Impl( sal_Bool bForce )
}
if ( !bUpdate || pImp->pFrame->GetFrame().IsClosing_Impl() )
- return 0;
+ return;
SfxViewFrame* pTop = pImp->pFrame ? pImp->pFrame->GetTopViewFrame() : NULL;
sal_Bool bUIActive = pTop && pTop->GetBindings().GetDispatcher() == this;
@@ -1692,12 +1657,11 @@ long SfxDispatcher::Update_Impl( sal_Bool bForce )
if ( xLayoutManager.is() )
xLayoutManager->unlock();
- return 1;
+ return;
}
-sal_uInt32 SfxDispatcher::_Update_Impl( sal_Bool bUIActive, sal_Bool bIsMDIApp, sal_Bool bIsIPOwner, SfxWorkWindow *pTaskWin )
+void SfxDispatcher::_Update_Impl( sal_Bool bUIActive, sal_Bool bIsMDIApp, sal_Bool bIsIPOwner, SfxWorkWindow *pTaskWin )
{
- sal_uInt32 nHelpId = 0;
SFX_APP();
SfxWorkWindow *pWorkWin = pImp->pFrame->GetFrame().GetWorkWindow_Impl();
sal_Bool bIsActive = sal_False;
@@ -1712,7 +1676,7 @@ sal_uInt32 SfxDispatcher::_Update_Impl( sal_Bool bUIActive, sal_Bool bIsMDIApp,
}
if ( pImp->pParent && !pImp->bQuiet /* && bUIActive */ )
- nHelpId = pImp->pParent->_Update_Impl( bUIActive, bIsMDIApp, bIsIPOwner, pTaskWin );
+ pImp->pParent->_Update_Impl( bUIActive, bIsMDIApp, bIsIPOwner, pTaskWin );
for (sal_uInt16 n=0; n<SFX_OBJECTBAR_MAX; n++)
pImp->aObjBars[n].nResId = 0;
@@ -1721,7 +1685,7 @@ sal_uInt32 SfxDispatcher::_Update_Impl( sal_Bool bUIActive, sal_Bool bIsMDIApp,
// bQuiet : own shells aren't considered for UI and SlotServer
// bNoUI: own Shells aren't considered fors UI
if ( pImp->bQuiet || pImp->bNoUI || (pImp->pFrame && pImp->pFrame->GetObjectShell()->IsPreview()) )
- return nHelpId;
+ return;
sal_uInt32 nStatBarId=0;
SfxShell *pStatusBarShell = NULL;
@@ -1732,8 +1696,6 @@ sal_uInt32 SfxDispatcher::_Update_Impl( sal_Bool bUIActive, sal_Bool bIsMDIApp,
{
SfxShell *pShell = GetShell( nShell-1 );
SfxInterface *pIFace = pShell->GetInterface();
- if (pShell->GetHelpId())
- nHelpId = pShell->GetHelpId();
// don't consider shells if "Hidden" oder "Quiet"
sal_Bool bReadOnlyShell = IsReadOnlyShell_Impl( nShell-1 );
@@ -1752,10 +1714,10 @@ sal_uInt32 SfxDispatcher::_Update_Impl( sal_Bool bUIActive, sal_Bool bIsMDIApp,
// check for toolboxes that are exclusively for a viewer
if ( pImp->pFrame)
{
- BOOL bViewerTbx = SFX_VISIBILITY_VIEWER == ( nPos & SFX_VISIBILITY_VIEWER );
+ sal_Bool bViewerTbx = SFX_VISIBILITY_VIEWER == ( nPos & SFX_VISIBILITY_VIEWER );
SfxObjectShell* pSh = pImp->pFrame->GetObjectShell();
SFX_ITEMSET_ARG( pSh->GetMedium()->GetItemSet(), pItem, SfxBoolItem, SID_VIEWONLY, sal_False );
- BOOL bIsViewer = pItem && pItem->GetValue();
+ sal_Bool bIsViewer = pItem && pItem->GetValue();
if ( bIsViewer != bViewerTbx )
continue;
}
@@ -1864,8 +1826,6 @@ sal_uInt32 SfxDispatcher::_Update_Impl( sal_Bool bUIActive, sal_Bool bIsMDIApp,
pImp->pFrame->GetFrame().GetWorkWindow_Impl()->SetStatusBar_Impl( nStatBarId, pStatusBarShell, rBindings );
}
}
-
- return nHelpId;
}
//--------------------------------------------------------------------
@@ -2198,7 +2158,6 @@ sal_Bool SfxDispatcher::_FindServer
SFX_STACK(SfxDispatcher::_FindServer);
// Dispatcher locked? (nevertheless let SID_HELP_PI through)
- SfxApplication *pSfxApp = SFX_APP();
if ( IsLocked(nSlot) )
{
pImp->bInvalidateOnUnlock = sal_True;
@@ -2218,25 +2177,8 @@ sal_Bool SfxDispatcher::_FindServer
}
}
- // Macro-Slot?
- if ( SfxMacroConfig::IsMacroSlot( nSlot ) )
- {
- const SfxMacroInfo* pInfo = pSfxApp->GetMacroConfig()->GetMacroInfo(nSlot);
- if ( pInfo )
- {
- const SfxSlot* pSlot = pInfo->GetSlot();
- if ( pSlot )
- {
- rServer.SetShellLevel(nTotCount-1);
- rServer.SetSlot( pSlot );
- return sal_True;
- }
- }
-
- return sal_False;
- }
// Verb-Slot?
- else if (nSlot >= SID_VERB_START && nSlot <= SID_VERB_END)
+ if (nSlot >= SID_VERB_START && nSlot <= SID_VERB_END)
{
for ( sal_uInt16 nShell = 0;; ++nShell )
{
@@ -2350,10 +2292,7 @@ sal_Bool SfxDispatcher::HasSlot_Impl( sal_uInt16 nSlot )
nTotCount = nTotCount + pImp->aStack.Count();
}
- if ( SfxMacroConfig::IsMacroSlot( nSlot ) )
- // Macro-Slot?
- return sal_True;
- else if (nSlot >= SID_VERB_START && nSlot <= SID_VERB_END)
+ if (nSlot >= SID_VERB_START && nSlot <= SID_VERB_END)
{
// Verb-Slot?
for ( sal_uInt16 nShell = 0;; ++nShell )
@@ -2464,7 +2403,7 @@ sal_Bool SfxDispatcher::_FillState
{
DBG_ASSERT(bFlushed, "Dispatcher not flushed after retrieving slot servers!");
if ( !bFlushed )
- return FALSE;
+ return sal_False;
// Flush();
// Determine the object and call the Message of this object
@@ -2529,10 +2468,6 @@ const SfxPoolItem* SfxDispatcher::_Execute( const SfxSlotServer &rSvr )
{
Flush();
- sal_uInt16 nSlot = pSlot->GetSlotId();
- if ( SfxMacroConfig::IsMacroSlot( nSlot ) )
- SFX_APP()->GetMacroConfig()->RegisterSlotId( nSlot );
-
if ( pSlot->IsMode(SFX_SLOT_ASYNCHRON) )
//! ignore rSvr
{
@@ -2653,8 +2588,8 @@ void SfxDispatcher::Lock( sal_Bool bLock )
pImp->bLocked = bLock;
if ( !bLock )
{
- USHORT nCount = pImp->aReqArr.Count();
- for ( USHORT i=0; i<nCount; i++ )
+ sal_uInt16 nCount = pImp->aReqArr.Count();
+ for ( sal_uInt16 i=0; i<nCount; i++ )
pImp->xPoster->Post( pImp->aReqArr[i] );
pImp->aReqArr.Remove( 0, nCount );
}
@@ -2805,7 +2740,7 @@ SfxItemState SfxDispatcher::QueryState( sal_uInt16 nSlot, const SfxPoolItem* &rp
return SFX_ITEM_DISABLED;
}
-SfxItemState SfxDispatcher::QueryState( USHORT nSID, ::com::sun::star::uno::Any& rAny )
+SfxItemState SfxDispatcher::QueryState( sal_uInt16 nSID, ::com::sun::star::uno::Any& rAny )
{
SfxShell *pShell = 0;
const SfxSlot *pSlot = 0;
@@ -2821,12 +2756,12 @@ SfxItemState SfxDispatcher::QueryState( USHORT nSID, ::com::sun::star::uno::Any&
::com::sun::star::uno::Any aState;
if ( !pItem->ISA(SfxVoidItem) )
{
- USHORT nSubId( 0 );
+ sal_uInt16 nSubId( 0 );
SfxItemPool& rPool = pShell->GetPool();
- USHORT nWhich = rPool.GetWhich( nSID );
+ sal_uInt16 nWhich = rPool.GetWhich( nSID );
if ( rPool.GetMetric( nWhich ) == SFX_MAPUNIT_TWIP )
nSubId |= CONVERT_TWIPS;
- pItem->QueryValue( aState, (BYTE)nSubId );
+ pItem->QueryValue( aState, (sal_uInt8)nSubId );
}
rAny = aState;
diff --git a/sfx2/source/control/macrconf.cxx b/sfx2/source/control/macrconf.cxx
index 1464ffe0abed..1464ffe0abed 100644..100755
--- a/sfx2/source/control/macrconf.cxx
+++ b/sfx2/source/control/macrconf.cxx
diff --git a/sfx2/source/control/macro.cxx b/sfx2/source/control/macro.cxx
index 1e4a6b427097..d14ac4b7790f 100644..100755
--- a/sfx2/source/control/macro.cxx
+++ b/sfx2/source/control/macro.cxx
@@ -64,10 +64,10 @@ SfxMacroStatement::SfxMacroStatement
const SfxShell& /*rShell*/, // <SfxShell> which excexutes the Request
const String& /*rTarget*/, // Name of the target object for the
// excecution
- BOOL /*bAbsolute*/, // obsolete
+ sal_Bool /*bAbsolute*/, // obsolete
const SfxSlot& rSlot, // the <SfxSlot>, which can read the
// statement
- BOOL bRequestDone, // Was the Request really excecuted
+ sal_Bool bRequestDone, // Was the Request really excecuted
::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >& rArgs
)
@@ -93,7 +93,7 @@ SfxMacroStatement::SfxMacroStatement
could be addressed as descriptive as in 'cell selection ("A5-D8")'), to do this
the application programmer must however use the constructor
<SfxMacroStatement::SfxMacroStatement(const String&,
- const SfxSlot&,BOOL,SfxArguments*)>.
+ const SfxSlot&,sal_Bool,SfxArguments*)>.
For the so-called object is then, depending on the type of slots,
expressed as an assignment to one of its properties or calling its methods.
@@ -111,7 +111,7 @@ SfxMacroStatement::SfxMacroStatement
[Cross-reference]
- <SfxMacroStatement::SfxMacroStatement(const String&,const SfxSlot&,BOOL,SfxArguments*)>
+ <SfxMacroStatement::SfxMacroStatement(const String&,const SfxSlot&,sal_Bool,SfxArguments*)>
<SfxMacroStatement::SfxMacroStatement(const String&)>
*/
@@ -136,7 +136,7 @@ SfxMacroStatement::SfxMacroStatement
(
const String& rTarget, // The Object which is addressed while playing
const SfxSlot& rSlot, // The <SfxSlot>, which can playback the statement
- BOOL bRequestDone, // was the Request actually performed
+ sal_Bool bRequestDone, // was the Request actually performed
::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >& rArgs
)
@@ -146,7 +146,7 @@ SfxMacroStatement::SfxMacroStatement
[Cross-reference]
<SfxMacroStatement::SfxMacroStatement(const String&)>
- <SfxMacroStatement::SfxMacroStatement(const SfxShell&,BOOL,const SfxSlot&,BOOL,SfxArguments*)>
+ <SfxMacroStatement::SfxMacroStatement(const SfxShell&,sal_Bool,const SfxSlot&,sal_Bool,SfxArguments*)>
*/
: nSlotId( rSlot.GetSlotId() ),
@@ -176,13 +176,13 @@ SfxMacroStatement::SfxMacroStatement
[Cross-reference]
- <SfxMacroStatement::SfxMacroStatement(const String&,const SfxSlot&,BOOL,SfxArguments*)>
- <SfxMacroStatement::SfxMacroStatement(const SfxShell&,BOOL,const SfxSlot&,BOOL,SfxArguments*)>
+ <SfxMacroStatement::SfxMacroStatement(const String&,const SfxSlot&,sal_Bool,SfxArguments*)>
+ <SfxMacroStatement::SfxMacroStatement(const SfxShell&,sal_Bool,const SfxSlot&,sal_Bool,SfxArguments*)>
*/
: nSlotId( 0 ),
aStatement( rStatement ),
- bDone( TRUE ),
+ bDone( sal_True ),
pDummy( 0 )
{
}
@@ -226,7 +226,7 @@ void SfxMacroStatement::GenerateNameAndArgs_Impl
(
SfxMacro* /*pMacro*/, // in this is recorded
const SfxSlot& rSlot, // the slot, which can playback the statement
- BOOL bRequestDone, // TRUE=was executed, FALSE=cancelled
+ sal_Bool bRequestDone, // TRUE=was executed, FALSE=cancelled
::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >& /*rArgs*/
)
@@ -251,7 +251,7 @@ void SfxMacroStatement::GenerateNameAndArgs_Impl
// Print all required Parameters
if ( aArgs.getLength() )
- for ( USHORT nArg = 0; nArg < aArgs.getLength(); ++nArg )
+ for ( sal_uInt16 nArg = 0; nArg < aArgs.getLength(); ++nArg )
{
// represent the parameters textually
String aArg;
@@ -282,8 +282,8 @@ void SfxMacroStatement::GenerateNameAndArgs_Impl
// Quotation marks are doubled
XubString aRecordable( sTemp );
- USHORT nPos = 0;
- while ( TRUE )
+ sal_uInt16 nPos = 0;
+ while ( sal_True )
{
nPos = aRecordable.SearchAndReplace( String('"'), DEFINE_CONST_UNICODE("\"\""), nPos );
if ( STRING_NOTFOUND == nPos )
@@ -293,7 +293,7 @@ void SfxMacroStatement::GenerateNameAndArgs_Impl
// non-printable characters are written as chr $(...)
bool bPrevReplaced = false;
- for ( USHORT n = 0; n < aRecordable.Len(); ++n )
+ for ( sal_uInt16 n = 0; n < aRecordable.Len(); ++n )
{
sal_Unicode cChar = aRecordable.GetChar(n);
if ( !( cChar>=32 && cChar!=127 ) ) // As replacement for String::IsPrintable()!
@@ -575,7 +575,7 @@ String SfxMacro::GenerateSource() const
{
DBG_ASSERT( pImp->eMode != SFX_MACRO_EXISTING, "invalid call to non-recording SfxMacro" );
String aSource;
- for ( USHORT n = 0; n < pImp->aList.Count(); ++n )
+ for ( sal_uInt16 n = 0; n < pImp->aList.Count(); ++n )
{
aSource += pImp->aList.GetObject(n)->GetStatement();
if ( (n+1) < pImp->aList.Count() )
diff --git a/sfx2/source/control/makefile.mk b/sfx2/source/control/makefile.mk
deleted file mode 100644
index 4dc271cadd06..000000000000
--- a/sfx2/source/control/makefile.mk
+++ /dev/null
@@ -1,73 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..
-
-PRJNAME=sfx2
-TARGET=control
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# due to compilerbugs
-.IF "$(GUI)"=="WNT"
-.IF "$(COM)"!="GCC"
-CFLAGS+=-Od
-.ENDIF
-.ENDIF
-
-.IF "$(COM)"=="GCC"
-CFLAGS+=-O0
-.ENDIF
-
-# --- Files --------------------------------------------------------
-
-SLOFILES = \
- $(SLO)$/bindings.obj \
- $(SLO)$/ctrlitem.obj \
- $(SLO)$/dispatch.obj \
- $(SLO)$/macrconf.obj \
- $(SLO)$/macro.obj \
- $(SLO)$/minfitem.obj \
- $(SLO)$/msg.obj \
- $(SLO)$/msgpool.obj \
- $(SLO)$/objface.obj \
- $(SLO)$/querystatus.obj \
- $(SLO)$/request.obj \
- $(SLO)$/sfxstatuslistener.obj \
- $(SLO)$/shell.obj \
- $(SLO)$/sorgitm.obj \
- $(SLO)$/statcach.obj \
- $(SLO)$/unoctitm.obj
-
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sfx2/source/control/minfitem.cxx b/sfx2/source/control/minfitem.cxx
index 90281e1d8a71..55c56c184b24 100644..100755
--- a/sfx2/source/control/minfitem.cxx
+++ b/sfx2/source/control/minfitem.cxx
@@ -31,7 +31,7 @@
// INCLUDE ---------------------------------------------------------------
-#include "minfitem.hxx"
+#include "sfx2/minfitem.hxx"
// STATIC DATA -----------------------------------------------------------
@@ -40,7 +40,7 @@ TYPEINIT1(SfxMacroInfoItem, SfxPoolItem);
// -----------------------------------------------------------------------
SfxMacroInfoItem::SfxMacroInfoItem(
- USHORT nWhichId, // Slot-ID
+ sal_uInt16 nWhichId, // Slot-ID
const BasicManager* pMgr,
const String &rLibName,
const String &rModuleName,
diff --git a/sfx2/source/control/msg.cxx b/sfx2/source/control/msg.cxx
index fde39d4d3996..119b186f112b 100644..100755
--- a/sfx2/source/control/msg.cxx
+++ b/sfx2/source/control/msg.cxx
@@ -30,7 +30,6 @@
#include "precompiled_sfx2.hxx"
#include <svl/itempool.hxx>
#include <svl/eitem.hxx>
-
#include <sfx2/msg.hxx>
//====================================================================
@@ -55,12 +54,24 @@ SfxSlotKind SfxSlot::GetKind() const
//--------------------------------------------------------------------
-USHORT SfxSlot::GetWhich( const SfxItemPool &rPool ) const
+sal_uInt16 SfxSlot::GetWhich( const SfxItemPool &rPool ) const
{
if ( !nMasterSlotId || nMasterSlotId == USHRT_MAX )
((SfxSlot*) this) -> nMasterSlotId = rPool.GetWhich(nSlotId);
return nMasterSlotId;
}
+::rtl::OString SfxSlot::GetCommand() const
+{
+ rtl::OString sRet(".uno:");
+ sRet += pUnoName;
+ return sRet;
+}
+
+::rtl::OUString SfxSlot::GetCommandString() const
+{
+ rtl::OString aCmd(GetCommand());
+ return rtl::OUString( aCmd, aCmd.getLength(), RTL_TEXTENCODING_UTF8 );
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/control/msgpool.cxx b/sfx2/source/control/msgpool.cxx
index 227f7c91c7d5..b2afa3dc1e22 100644..100755
--- a/sfx2/source/control/msgpool.cxx
+++ b/sfx2/source/control/msgpool.cxx
@@ -39,8 +39,7 @@
#include <sfx2/app.hxx>
#include <sfx2/objface.hxx>
#include "sfxtypes.hxx"
-#include <sfx2/macrconf.hxx>
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include "arrdecl.hxx"
#include <sfx2/module.hxx>
@@ -50,15 +49,15 @@
struct SfxSlotType_Impl
{
- USHORT nId;
+ sal_uInt16 nId;
TypeId nType;
- SfxSlotType_Impl( USHORT nTheId, TypeId nTheType ):
+ SfxSlotType_Impl( sal_uInt16 nTheId, TypeId nTheType ):
nId(nTheId), nType(nTheType)
{}
};
-DECL_2BYTEARRAY(SfxSlotGroupArr_Impl, USHORT, 6, 4)
+DECL_2BYTEARRAY(SfxSlotGroupArr_Impl, sal_uInt16, 6, 4)
DECL_PTRARRAY(SfxInterfaceArr_Impl, SfxInterface*, 6, 3)
DECL_PTRARRAY(SfxSlotTypeArr_Impl, SfxSlotType_Impl*, 8, 8)
@@ -91,7 +90,7 @@ SfxSlotPool::~SfxSlotPool()
delete _pGroups;
if ( _pTypes )
{
- for ( USHORT n =_pTypes->Count(); n--; )
+ for ( sal_uInt16 n =_pTypes->Count(); n--; )
delete _pTypes->GetObject(n);
delete _pTypes;
}
@@ -123,14 +122,14 @@ void SfxSlotPool::RegisterInterface( SfxInterface& rInterface )
{
// The Groups in parent Slotpool are also known here
SfxSlotGroupArr_Impl& rGroups = *_pParentPool->_pGroups;
- for ( USHORT n=0; n<rGroups.Count(); n++ )
+ for ( sal_uInt16 n=0; n<rGroups.Count(); n++ )
_pGroups->Append( rGroups[n] );
}
}
if ( !_pTypes )
_pTypes = new SfxSlotTypeArr_Impl;
- for ( USHORT nFunc = 0; nFunc < rInterface.Count(); ++nFunc )
+ for ( sal_uInt16 nFunc = 0; nFunc < rInterface.Count(); ++nFunc )
{
SfxSlot *pDef = rInterface[nFunc];
if ( pDef->GetGroupId() && /* pDef->GetGroupId() != GID_INTERN && */
@@ -146,7 +145,7 @@ void SfxSlotPool::RegisterInterface( SfxInterface& rInterface )
//====================================================================
-TypeId SfxSlotPool::GetSlotType( USHORT nId ) const
+TypeId SfxSlotPool::GetSlotType( sal_uInt16 nId ) const
{
const SfxSlot* pSlot = (const_cast <SfxSlotPool*> (this))->GetSlot( nId );
return pSlot ? pSlot->GetType()->Type() : 0;
@@ -167,13 +166,13 @@ void SfxSlotPool::ReleaseInterface( SfxInterface& rInterface )
// get the first SfxMessage for a special Id (e.g. for getting check-mode)
-const SfxSlot* SfxSlotPool::GetSlot( USHORT nId )
+const SfxSlot* SfxSlotPool::GetSlot( sal_uInt16 nId )
{
DBG_MEMTEST();
DBG_ASSERT( _pInterfaces != 0, "no Interfaces registered" );
// First, search their own interfaces
- for ( USHORT nInterf = 0; nInterf < _pInterfaces->Count(); ++nInterf )
+ for ( sal_uInt16 nInterf = 0; nInterf < _pInterfaces->Count(); ++nInterf )
{
const SfxSlot *pDef = _pInterfaces->GetObject(nInterf)->GetSlot(nId);
if ( pDef )
@@ -188,7 +187,7 @@ const SfxSlot* SfxSlotPool::GetSlot( USHORT nId )
// skips to the next group
-String SfxSlotPool::SeekGroup( USHORT nNo )
+String SfxSlotPool::SeekGroup( sal_uInt16 nNo )
{
DBG_MEMTEST();
DBG_ASSERT( _pInterfaces != 0, "no Interfaces registered" );
@@ -200,14 +199,14 @@ String SfxSlotPool::SeekGroup( USHORT nNo )
if ( _pParentPool )
{
// In most cases, the order of the IDs agree
- USHORT nParentCount = _pParentPool->_pGroups->Count();
+ sal_uInt16 nParentCount = _pParentPool->_pGroups->Count();
if ( nNo < nParentCount && (*_pGroups)[nNo] == (*_pParentPool->_pGroups)[nNo] )
_pParentPool->_nCurGroup = nNo;
else
{
// Otherwise search. If the group is not found in the parent
// pool, _nCurGroup is set outside the valid range
- USHORT i;
+ sal_uInt16 i;
for ( i=1; i<nParentCount; i++ )
if ( (*_pGroups)[nNo] == (*_pParentPool->_pGroups)[i] )
break;
@@ -232,7 +231,7 @@ String SfxSlotPool::SeekGroup( USHORT nNo )
//--------------------------------------------------------------------
-USHORT SfxSlotPool::GetGroupCount()
+sal_uInt16 SfxSlotPool::GetGroupCount()
{
return _pGroups->Count();
}
@@ -242,13 +241,13 @@ USHORT SfxSlotPool::GetGroupCount()
// internal search loop
-const SfxSlot* SfxSlotPool::SeekSlot( USHORT nStartInterface )
+const SfxSlot* SfxSlotPool::SeekSlot( sal_uInt16 nStartInterface )
{
DBG_MEMTEST();
DBG_ASSERT( _pInterfaces != 0, "no Interfaces registered" );
// The numbering starts at the interfaces of the parent pool
- USHORT nFirstInterface = _pParentPool ? _pParentPool->_pInterfaces->Count() : 0;
+ sal_uInt16 nFirstInterface = _pParentPool ? _pParentPool->_pInterfaces->Count() : 0;
// have reached the end of the Parent-Pools?
if ( nStartInterface < nFirstInterface &&
@@ -264,7 +263,7 @@ const SfxSlot* SfxSlotPool::SeekSlot( USHORT nStartInterface )
}
// find the first func-def with the current group id
- USHORT nCount = _pInterfaces->Count() + nFirstInterface;
+ sal_uInt16 nCount = _pInterfaces->Count() + nFirstInterface;
for ( _nCurInterface = nStartInterface;
_nCurInterface < nCount;
++_nCurInterface )
@@ -292,7 +291,7 @@ const SfxSlot* SfxSlotPool::NextSlot()
DBG_ASSERT( _pInterfaces != 0, "no Interfaces registered" );
// The numbering starts at the interfaces of the parent pool
- USHORT nFirstInterface = _pParentPool ? _pParentPool->_pInterfaces->Count() : 0;
+ sal_uInt16 nFirstInterface = _pParentPool ? _pParentPool->_pInterfaces->Count() : 0;
if ( _nCurInterface < nFirstInterface && _nCurGroup >= _pParentPool->_pGroups->Count() )
_nCurInterface = nFirstInterface;
@@ -309,7 +308,7 @@ const SfxSlot* SfxSlotPool::NextSlot()
return SeekSlot( nFirstInterface );
}
- USHORT nInterface = _nCurInterface - nFirstInterface;
+ sal_uInt16 nInterface = _nCurInterface - nFirstInterface;
// possibly we are already at the end
if ( nInterface >= _pInterfaces->Count() )
return 0;
@@ -345,17 +344,17 @@ SfxInterface* SfxSlotPool::FirstInterface()
SfxInterface* SfxSlotPool::NextInterface()
{
_nCurInterface++;
- USHORT nFirstInterface = _pParentPool ? _pParentPool->_pInterfaces->Count() : 0;
+ sal_uInt16 nFirstInterface = _pParentPool ? _pParentPool->_pInterfaces->Count() : 0;
if ( _nCurInterface < nFirstInterface )
return (*_pParentPool->_pInterfaces)[_nCurInterface];
- USHORT nInterface = _nCurInterface - nFirstInterface;
+ sal_uInt16 nInterface = _nCurInterface - nFirstInterface;
return nInterface < _pInterfaces->Count() ? (*_pInterfaces)[nInterface] : 0;
}
const SfxSlot* SfxSlotPool::GetUnoSlot( const String& rName )
{
const SfxSlot *pSlot = NULL;
- for ( USHORT nInterface=0; nInterface<_pInterfaces->Count(); nInterface++ )
+ for ( sal_uInt16 nInterface=0; nInterface<_pInterfaces->Count(); nInterface++ )
{
pSlot = (*_pInterfaces)[nInterface]->GetSlot( rName );
if ( pSlot )
diff --git a/sfx2/source/control/objface.cxx b/sfx2/source/control/objface.cxx
index ade3a8cabe63..f942b17e4dc0 100644..100755
--- a/sfx2/source/control/objface.cxx
+++ b/sfx2/source/control/objface.cxx
@@ -38,7 +38,7 @@
#include <sfx2/msg.hxx>
#include <sfx2/app.hxx>
#include <sfx2/msgpool.hxx>
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include <sfx2/minarray.hxx>
#include <sfx2/objsh.hxx>
@@ -68,18 +68,18 @@ SfxCompareSlots_Impl( const void* pSmaller, const void* pBigger )
struct SfxObjectUI_Impl
{
- USHORT nPos;
+ sal_uInt16 nPos;
ResId aResId;
- BOOL bVisible;
- BOOL bContext;
+ sal_Bool bVisible;
+ sal_Bool bContext;
String* pName;
sal_uInt32 nFeature;
- SfxObjectUI_Impl(USHORT n, const ResId& rResId, BOOL bVis, sal_uInt32 nFeat) :
+ SfxObjectUI_Impl(sal_uInt16 n, const ResId& rResId, sal_Bool bVis, sal_uInt32 nFeat) :
nPos(n),
aResId(rResId.GetId(), *rResId.GetResMgr()),
bVisible(bVis),
- bContext(FALSE),
+ bContext(sal_False),
pName(0),
nFeature(nFeat)
{
@@ -101,12 +101,12 @@ struct SfxInterface_Impl
ResId aPopupRes; // registered PopupMenu
ResId aStatBarRes; // registered StatusBar
SfxModule* pModule;
- BOOL bRegistered;
+ sal_Bool bRegistered;
SfxInterface_Impl() :
aPopupRes(0,*SfxApplication::GetOrCreate()->GetSfxResManager()),
aStatBarRes(0,*SfxApplication::GetOrCreate()->GetSfxResManager())
- , bRegistered(FALSE)
+ , bRegistered(sal_False)
{
pObjectBars = new SfxObjectUIArr_Impl;
pChildWindows = new SfxObjectUIArr_Impl;
@@ -114,7 +114,7 @@ struct SfxInterface_Impl
~SfxInterface_Impl()
{
- USHORT n;
+ sal_uInt16 n;
for (n=0; n<pObjectBars->Count(); n++)
delete (*pObjectBars)[n];
delete pObjectBars;
@@ -125,7 +125,7 @@ struct SfxInterface_Impl
}
};
-static SfxObjectUI_Impl* CreateObjectBarUI_Impl( USHORT nPos, const ResId& rResId, sal_uInt32 nFeature, const String *pStr );
+static SfxObjectUI_Impl* CreateObjectBarUI_Impl( sal_uInt16 nPos, const ResId& rResId, sal_uInt32 nFeature, const String *pStr );
//====================================================================
@@ -136,7 +136,7 @@ SfxInterface::SfxInterface( const char *pClassName,
const ResId& rNameResId,
SfxInterfaceId nId,
const SfxInterface* pParent,
- SfxSlot &rSlotMap, USHORT nSlotCount ):
+ SfxSlot &rSlotMap, sal_uInt16 nSlotCount ):
pName(pClassName),
pGenoType(pParent),
nClassId(nId),
@@ -149,7 +149,7 @@ SfxInterface::SfxInterface( const char *pClassName,
void SfxInterface::Register( SfxModule* pMod )
{
- pImpData->bRegistered = TRUE;
+ pImpData->bRegistered = sal_True;
pImpData->pModule = pMod;
if ( pMod )
pMod->GetSlotPool()->RegisterInterface(*this);
@@ -157,7 +157,7 @@ void SfxInterface::Register( SfxModule* pMod )
SFX_APP()->GetAppSlotPool_Impl().RegisterInterface(*this);
}
-void SfxInterface::SetSlotMap( SfxSlot& rSlotMap, USHORT nSlotCount )
+void SfxInterface::SetSlotMap( SfxSlot& rSlotMap, sal_uInt16 nSlotCount )
{
pSlots = &rSlotMap;
nCount = nSlotCount;
@@ -171,7 +171,7 @@ void SfxInterface::SetSlotMap( SfxSlot& rSlotMap, USHORT nSlotCount )
qsort( pSlots, nCount, sizeof(SfxSlot), SfxCompareSlots_Impl );
// link masters and slaves
- USHORT nIter = 1;
+ sal_uInt16 nIter = 1;
for ( pIter = pSlots; nIter <= nCount; ++pIter, ++nIter )
{
@@ -192,7 +192,7 @@ void SfxInterface::SetSlotMap( SfxSlot& rSlotMap, USHORT nSlotCount )
if ( 0 == pIter->GetNextSlot() )
{
SfxSlot *pLastSlot = pIter;
- for ( USHORT n = nIter; n < Count(); ++n )
+ for ( sal_uInt16 n = nIter; n < Count(); ++n )
{
SfxSlot *pCurSlot = (pSlots+n);
if ( pCurSlot->nMasterSlotId == pIter->nMasterSlotId )
@@ -209,7 +209,7 @@ void SfxInterface::SetSlotMap( SfxSlot& rSlotMap, USHORT nSlotCount )
// Slots refering in circle to the next with the same
// Status method.
SfxSlot *pLastSlot = pIter;
- for ( USHORT n = nIter; n < Count(); ++n )
+ for ( sal_uInt16 n = nIter; n < Count(); ++n )
{
SfxSlot *pCurSlot = (pSlots+n);
if ( pCurSlot->GetStateFnc() == pIter->GetStateFnc() )
@@ -225,7 +225,7 @@ void SfxInterface::SetSlotMap( SfxSlot& rSlotMap, USHORT nSlotCount )
#ifdef DBG_UTIL
else
{
- USHORT nIter = 1;
+ sal_uInt16 nIter = 1;
for ( SfxSlot *pNext = pIter+1; nIter < nCount; ++pNext, ++nIter )
{
@@ -302,7 +302,7 @@ void SfxInterface::SetSlotMap( SfxSlot& rSlotMap, USHORT nSlotCount )
SfxInterface::~SfxInterface()
{
SfxModule *pMod = pImpData->pModule;
- BOOL bRegistered = pImpData->bRegistered;
+ sal_Bool bRegistered = pImpData->bRegistered;
delete pImpData;
DBG_ASSERT( bRegistered, "Interface not registered!" );
if ( bRegistered )
@@ -318,7 +318,7 @@ SfxInterface::~SfxInterface()
// searches for the specified func
-const SfxSlot* SfxInterface::GetSlot( USHORT nFuncId ) const
+const SfxSlot* SfxInterface::GetSlot( sal_uInt16 nFuncId ) const
{
DBG_MEMTEST();
DBG_CHKTHIS(SfxInterface, 0);
@@ -341,7 +341,7 @@ const SfxSlot* SfxInterface::GetSlot( const String& rCommand ) const
if ( aCommand.SearchAscii( UNO_COMMAND ) == 0 )
aCommand.Erase( 0, sizeof( UNO_COMMAND )-1 );
- for ( USHORT n=0; n<nCount; n++ )
+ for ( sal_uInt16 n=0; n<nCount; n++ )
{
if ( (pSlots+n)->pUnoName &&
aCommand.CompareIgnoreCaseToAscii( (pSlots+n)->GetUnoName() ) == COMPARE_EQUAL )
@@ -372,7 +372,7 @@ const SfxSlot* SfxInterface::GetRealSlot( const SfxSlot *pSlot ) const
//--------------------------------------------------------------------
-const SfxSlot* SfxInterface::GetRealSlot( USHORT nSlotId ) const
+const SfxSlot* SfxInterface::GetRealSlot( sal_uInt16 nSlotId ) const
{
DBG_MEMTEST();
DBG_CHKTHIS(SfxInterface, 0);
@@ -400,26 +400,26 @@ void SfxInterface::RegisterPopupMenu( const ResId& rResId )
//--------------------------------------------------------------------
-void SfxInterface::RegisterObjectBar( USHORT nPos, const ResId& rResId,
+void SfxInterface::RegisterObjectBar( sal_uInt16 nPos, const ResId& rResId,
const String *pStr )
{
RegisterObjectBar( nPos, rResId, 0UL, pStr );
}
-void SfxInterface::RegisterObjectBar( USHORT nPos, const ResId& rResId, sal_uInt32 nFeature, const String *pStr )
+void SfxInterface::RegisterObjectBar( sal_uInt16 nPos, const ResId& rResId, sal_uInt32 nFeature, const String *pStr )
{
SfxObjectUI_Impl* pUI = CreateObjectBarUI_Impl( nPos, rResId, nFeature, pStr );
if ( pUI )
pImpData->pObjectBars->Append(pUI);
}
-SfxObjectUI_Impl* CreateObjectBarUI_Impl( USHORT nPos, const ResId& rResId, sal_uInt32 nFeature, const String *pStr )
+SfxObjectUI_Impl* CreateObjectBarUI_Impl( sal_uInt16 nPos, const ResId& rResId, sal_uInt32 nFeature, const String *pStr )
{
if ((nPos & SFX_VISIBILITY_MASK) == 0)
nPos |= SFX_VISIBILITY_STANDARD;
- SfxObjectUI_Impl* pUI = new SfxObjectUI_Impl(nPos, rResId, TRUE, nFeature);
+ SfxObjectUI_Impl* pUI = new SfxObjectUI_Impl(nPos, rResId, sal_True, nFeature);
if (pStr == 0)
{
@@ -439,13 +439,13 @@ SfxObjectUI_Impl* CreateObjectBarUI_Impl( USHORT nPos, const ResId& rResId, sal_
return pUI;
}
-const ResId& SfxInterface::GetObjectBarResId( USHORT nNo ) const
+const ResId& SfxInterface::GetObjectBarResId( sal_uInt16 nNo ) const
{
- BOOL bGenoType = (pGenoType != 0 && !pGenoType->HasName());
+ sal_Bool bGenoType = (pGenoType != 0 && !pGenoType->HasName());
if ( bGenoType )
{
// Are there toolbars in the super class?
- USHORT nBaseCount = pGenoType->GetObjectBarCount();
+ sal_uInt16 nBaseCount = pGenoType->GetObjectBarCount();
if ( nNo < nBaseCount )
// The Super class comes first
return pGenoType->GetObjectBarResId( nNo );
@@ -454,7 +454,7 @@ const ResId& SfxInterface::GetObjectBarResId( USHORT nNo ) const
}
#ifdef DBG_UTIL
- USHORT nObjBarCount = pImpData->pObjectBars->Count();
+ sal_uInt16 nObjBarCount = pImpData->pObjectBars->Count();
DBG_ASSERT( nNo<nObjBarCount,"Objectbar is unknown!" );
#endif
return (*pImpData->pObjectBars)[nNo]->aResId;
@@ -463,13 +463,13 @@ const ResId& SfxInterface::GetObjectBarResId( USHORT nNo ) const
//--------------------------------------------------------------------
-USHORT SfxInterface::GetObjectBarPos( USHORT nNo ) const
+sal_uInt16 SfxInterface::GetObjectBarPos( sal_uInt16 nNo ) const
{
- BOOL bGenoType = (pGenoType != 0 && !pGenoType->HasName());
+ sal_Bool bGenoType = (pGenoType != 0 && !pGenoType->HasName());
if ( bGenoType )
{
// Are there toolbars in the super class?
- USHORT nBaseCount = pGenoType->GetObjectBarCount();
+ sal_uInt16 nBaseCount = pGenoType->GetObjectBarCount();
if ( nNo < nBaseCount )
// The Super class comes first
return pGenoType->GetObjectBarPos( nNo );
@@ -478,7 +478,7 @@ USHORT SfxInterface::GetObjectBarPos( USHORT nNo ) const
}
#ifdef DBG_UTIL
- USHORT nObjBarCount = pImpData->pObjectBars->Count();
+ sal_uInt16 nObjBarCount = pImpData->pObjectBars->Count();
DBG_ASSERT( nNo<nObjBarCount,"Objectbar is unknown!" );
#endif
return (*pImpData->pObjectBars)[nNo]->nPos;
@@ -487,7 +487,7 @@ USHORT SfxInterface::GetObjectBarPos( USHORT nNo ) const
//--------------------------------------------------------------------
-USHORT SfxInterface::GetObjectBarCount() const
+sal_uInt16 SfxInterface::GetObjectBarCount() const
{
if (pGenoType && ! pGenoType->HasName())
return pImpData->pObjectBars->Count() + pGenoType->GetObjectBarCount();
@@ -496,14 +496,14 @@ USHORT SfxInterface::GetObjectBarCount() const
}
//--------------------------------------------------------------------
-void SfxInterface::RegisterChildWindow(USHORT nId, BOOL bContext, const String* pChildWinName)
+void SfxInterface::RegisterChildWindow(sal_uInt16 nId, sal_Bool bContext, const String* pChildWinName)
{
RegisterChildWindow( nId, bContext, 0UL, pChildWinName );
}
-void SfxInterface::RegisterChildWindow(USHORT nId, BOOL bContext, sal_uInt32 nFeature, const String*)
+void SfxInterface::RegisterChildWindow(sal_uInt16 nId, sal_Bool bContext, sal_uInt32 nFeature, const String*)
{
- SfxObjectUI_Impl* pUI = new SfxObjectUI_Impl(0, ResId(nId, *SfxApplication::GetOrCreate()->GetOffResManager_Impl()), TRUE, nFeature);
+ SfxObjectUI_Impl* pUI = new SfxObjectUI_Impl(0, ResId(nId, *SfxApplication::GetOrCreate()->GetOffResManager_Impl()), sal_True, nFeature);
pUI->bContext = bContext;
pImpData->pChildWindows->Append(pUI);
}
@@ -514,12 +514,12 @@ void SfxInterface::RegisterStatusBar(const ResId& rResId)
}
-sal_uInt32 SfxInterface::GetChildWindowId (USHORT nNo) const
+sal_uInt32 SfxInterface::GetChildWindowId (sal_uInt16 nNo) const
{
if ( pGenoType )
{
// Are there ChildWindows in der Superklasse?
- USHORT nBaseCount = pGenoType->GetChildWindowCount();
+ sal_uInt16 nBaseCount = pGenoType->GetChildWindowCount();
if ( nNo < nBaseCount )
// The Super class comes first
return pGenoType->GetChildWindowId( nNo );
@@ -528,7 +528,7 @@ sal_uInt32 SfxInterface::GetChildWindowId (USHORT nNo) const
}
#ifdef DBG_UTIL
- USHORT nCWCount = pImpData->pChildWindows->Count();
+ sal_uInt16 nCWCount = pImpData->pChildWindows->Count();
DBG_ASSERT( nNo<nCWCount,"ChildWindow is unknown!" );
#endif
sal_uInt32 nRet = (*pImpData->pChildWindows)[nNo]->aResId.GetId();
@@ -537,12 +537,12 @@ sal_uInt32 SfxInterface::GetChildWindowId (USHORT nNo) const
return nRet;
}
-sal_uInt32 SfxInterface::GetChildWindowFeature (USHORT nNo) const
+sal_uInt32 SfxInterface::GetChildWindowFeature (sal_uInt16 nNo) const
{
if ( pGenoType )
{
// Are there ChildWindows in der Superklasse?
- USHORT nBaseCount = pGenoType->GetChildWindowCount();
+ sal_uInt16 nBaseCount = pGenoType->GetChildWindowCount();
if ( nNo < nBaseCount )
// The Super class comes first
return pGenoType->GetChildWindowFeature( nNo );
@@ -551,7 +551,7 @@ sal_uInt32 SfxInterface::GetChildWindowFeature (USHORT nNo) const
}
#ifdef DBG_UTIL
- USHORT nCWCount = pImpData->pChildWindows->Count();
+ sal_uInt16 nCWCount = pImpData->pChildWindows->Count();
DBG_ASSERT( nNo<nCWCount,"ChildWindow is unknown!" );
#endif
return (*pImpData->pChildWindows)[nNo]->nFeature;
@@ -560,7 +560,7 @@ sal_uInt32 SfxInterface::GetChildWindowFeature (USHORT nNo) const
//--------------------------------------------------------------------
-USHORT SfxInterface::GetChildWindowCount() const
+sal_uInt16 SfxInterface::GetChildWindowCount() const
{
if (pGenoType)
return pImpData->pChildWindows->Count() + pGenoType->GetChildWindowCount();
@@ -585,13 +585,13 @@ const ResId& SfxInterface::GetStatusBarResId() const
-const String* SfxInterface::GetObjectBarName ( USHORT nNo ) const
+const String* SfxInterface::GetObjectBarName ( sal_uInt16 nNo ) const
{
- BOOL bGenoType = (pGenoType != 0 && !pGenoType->HasName());
+ sal_Bool bGenoType = (pGenoType != 0 && !pGenoType->HasName());
if ( bGenoType )
{
// Are there toolbars in the super class?
- USHORT nBaseCount = pGenoType->GetObjectBarCount();
+ sal_uInt16 nBaseCount = pGenoType->GetObjectBarCount();
if ( nNo < nBaseCount )
// The Super class comes first
return pGenoType->GetObjectBarName( nNo );
@@ -600,19 +600,19 @@ const String* SfxInterface::GetObjectBarName ( USHORT nNo ) const
}
#ifdef DBG_UTIL
- USHORT nObjBarCount = pImpData->pObjectBars->Count();
+ sal_uInt16 nObjBarCount = pImpData->pObjectBars->Count();
DBG_ASSERT( nNo<nObjBarCount,"Objectbar is unknown!" );
#endif
return (*pImpData->pObjectBars)[nNo]->pName;
}
-sal_uInt32 SfxInterface::GetObjectBarFeature ( USHORT nNo ) const
+sal_uInt32 SfxInterface::GetObjectBarFeature ( sal_uInt16 nNo ) const
{
- BOOL bGenoType = (pGenoType != 0 && !pGenoType->HasName());
+ sal_Bool bGenoType = (pGenoType != 0 && !pGenoType->HasName());
if ( bGenoType )
{
// Are there toolbars in the super class?
- USHORT nBaseCount = pGenoType->GetObjectBarCount();
+ sal_uInt16 nBaseCount = pGenoType->GetObjectBarCount();
if ( nNo < nBaseCount )
// The Super class comes first
return pGenoType->GetObjectBarFeature( nNo );
@@ -621,19 +621,19 @@ sal_uInt32 SfxInterface::GetObjectBarFeature ( USHORT nNo ) const
}
#ifdef DBG_UTIL
- USHORT nObjBarCount = pImpData->pObjectBars->Count();
+ sal_uInt16 nObjBarCount = pImpData->pObjectBars->Count();
DBG_ASSERT( nNo<nObjBarCount,"Objectbar is unknown!" );
#endif
return (*pImpData->pObjectBars)[nNo]->nFeature;
}
-BOOL SfxInterface::IsObjectBarVisible(USHORT nNo) const
+sal_Bool SfxInterface::IsObjectBarVisible(sal_uInt16 nNo) const
{
- BOOL bGenoType = (pGenoType != 0 && !pGenoType->HasName());
+ sal_Bool bGenoType = (pGenoType != 0 && !pGenoType->HasName());
if ( bGenoType )
{
// Are there toolbars in the super class?
- USHORT nBaseCount = pGenoType->GetObjectBarCount();
+ sal_uInt16 nBaseCount = pGenoType->GetObjectBarCount();
if ( nNo < nBaseCount )
// The Super class comes first
return pGenoType->IsObjectBarVisible( nNo );
@@ -642,7 +642,7 @@ BOOL SfxInterface::IsObjectBarVisible(USHORT nNo) const
}
#ifdef DBG_UTIL
- USHORT nObjBarCount = pImpData->pObjectBars->Count();
+ sal_uInt16 nObjBarCount = pImpData->pObjectBars->Count();
DBG_ASSERT( nNo<nObjBarCount,"Objectbar is unknown!" );
#endif
return (*pImpData->pObjectBars)[nNo]->bVisible;
diff --git a/sfx2/source/control/querystatus.cxx b/sfx2/source/control/querystatus.cxx
index 4a07098ed23e..5632858d2b6b 100644..100755
--- a/sfx2/source/control/querystatus.cxx
+++ b/sfx2/source/control/querystatus.cxx
@@ -45,7 +45,7 @@
#include <com/sun/star/frame/status/ItemState.hpp>
#include <com/sun/star/frame/status/Visibility.hpp>
-using namespace ::rtl;
+using ::rtl::OUString;
using namespace ::cppu;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::frame;
@@ -60,7 +60,7 @@ class SfxQueryStatus_Impl : public ::com::sun::star::frame::XStatusListener ,
public:
SFX_DECL_XINTERFACE_XTYPEPROVIDER
- SfxQueryStatus_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider >& rDispatchProvider, USHORT nSlotId, const rtl::OUString& aCommand );
+ SfxQueryStatus_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider >& rDispatchProvider, sal_uInt16 nSlotId, const rtl::OUString& aCommand );
virtual ~SfxQueryStatus_Impl();
// Query method
@@ -80,7 +80,7 @@ class SfxQueryStatus_Impl : public ::com::sun::star::frame::XStatusListener ,
sal_Bool m_bQueryInProgress;
SfxItemState m_eState;
SfxPoolItem* m_pItem;
- USHORT m_nSlotID;
+ sal_uInt16 m_nSlotID;
osl::Condition m_aCondition;
::com::sun::star::util::URL m_aCommand;
com::sun::star::uno::Reference< com::sun::star::frame::XDispatch > m_xDispatch;
@@ -89,7 +89,7 @@ class SfxQueryStatus_Impl : public ::com::sun::star::frame::XStatusListener ,
SFX_IMPL_XINTERFACE_2( SfxQueryStatus_Impl, OWeakObject, ::com::sun::star::frame::XStatusListener, ::com::sun::star::lang::XEventListener )
SFX_IMPL_XTYPEPROVIDER_2( SfxQueryStatus_Impl, ::com::sun::star::frame::XStatusListener, ::com::sun::star::lang::XEventListener )
-SfxQueryStatus_Impl::SfxQueryStatus_Impl( const Reference< XDispatchProvider >& rDispatchProvider, USHORT nSlotId, const OUString& rCommand ) :
+SfxQueryStatus_Impl::SfxQueryStatus_Impl( const Reference< XDispatchProvider >& rDispatchProvider, sal_uInt16 nSlotId, const OUString& rCommand ) :
cppu::OWeakObject(),
m_bQueryInProgress( sal_False ),
m_eState( SFX_ITEM_DISABLED ),
@@ -223,7 +223,7 @@ SfxItemState SfxQueryStatus_Impl::QueryState( SfxPoolItem*& rpPoolItem )
//*************************************************************************
-SfxQueryStatus::SfxQueryStatus( const Reference< XDispatchProvider >& rDispatchProvider, USHORT nSlotId, const OUString& rCommand )
+SfxQueryStatus::SfxQueryStatus( const Reference< XDispatchProvider >& rDispatchProvider, sal_uInt16 nSlotId, const OUString& rCommand )
{
m_pSfxQueryStatusImpl = new SfxQueryStatus_Impl( rDispatchProvider, nSlotId, rCommand );
m_xStatusListener = Reference< XStatusListener >(
diff --git a/sfx2/source/control/request.cxx b/sfx2/source/control/request.cxx
index e0d3b56a0793..c99badd04d46 100644..100755
--- a/sfx2/source/control/request.cxx
+++ b/sfx2/source/control/request.cxx
@@ -72,13 +72,13 @@ struct SfxRequest_Impl: public SfxListener
SfxPoolItem* pRetVal; // Return value belongs to itself
SfxShell* pShell; // run from this shell
const SfxSlot* pSlot; // executed Slot
- USHORT nModifier; // which Modifier was pressed?
- BOOL bDone; // at all executed
- BOOL bIgnored; // Cancelled by the User
- BOOL bCancelled; // no longer notify
- BOOL bUseTarget; // aTarget was set by Application
- USHORT nCallMode; // Synch/Asynch/API/Record
- BOOL bAllowRecording;
+ sal_uInt16 nModifier; // which Modifier was pressed?
+ sal_Bool bDone; // at all executed
+ sal_Bool bIgnored; // Cancelled by the User
+ sal_Bool bCancelled; // no longer notify
+ sal_Bool bUseTarget; // aTarget was set by Application
+ sal_uInt16 nCallMode; // Synch/Asynch/API/Record
+ sal_Bool bAllowRecording;
SfxAllItemSet* pInternalArgs;
SfxViewFrame* pViewFrame;
@@ -88,9 +88,9 @@ struct SfxRequest_Impl: public SfxListener
: pAnti( pOwner)
, pPool(0)
, nModifier(0)
- , bCancelled(FALSE)
+ , bCancelled(sal_False)
, nCallMode( SFX_CALLMODE_SYNCHRON )
- , bAllowRecording( FALSE )
+ , bAllowRecording( sal_False )
, pInternalArgs( 0 )
, pViewFrame(0)
{}
@@ -158,8 +158,8 @@ SfxRequest::SfxRequest
DBG_MEMTEST();
pImp->bAllowRecording = rOrig.pImp->bAllowRecording;
- pImp->bDone = FALSE;
- pImp->bIgnored = FALSE;
+ pImp->bDone = sal_False;
+ pImp->bIgnored = sal_False;
pImp->pRetVal = 0;
pImp->pShell = 0;
pImp->pSlot = 0;
@@ -182,7 +182,7 @@ SfxRequest::SfxRequest
SfxRequest::SfxRequest
(
SfxViewFrame* pViewFrame,
- USHORT nSlotId
+ sal_uInt16 nSlotId
)
@@ -201,16 +201,16 @@ SfxRequest::SfxRequest
{
DBG_MEMTEST();
- pImp->bDone = FALSE;
- pImp->bIgnored = FALSE;
+ pImp->bDone = sal_False;
+ pImp->bIgnored = sal_False;
pImp->SetPool( &pViewFrame->GetPool() );
pImp->pRetVal = 0;
pImp->pShell = 0;
pImp->pSlot = 0;
pImp->nCallMode = SFX_CALLMODE_SYNCHRON;
- pImp->bUseTarget = FALSE;
+ pImp->bUseTarget = sal_False;
pImp->pViewFrame = pViewFrame;
- if( pImp->pViewFrame->GetDispatcher()->GetShellAndSlot_Impl( nSlotId, &pImp->pShell, &pImp->pSlot, TRUE, TRUE ) )
+ if( pImp->pViewFrame->GetDispatcher()->GetShellAndSlot_Impl( nSlotId, &pImp->pShell, &pImp->pSlot, sal_True, sal_True ) )
{
pImp->SetPool( &pImp->pShell->GetPool() );
pImp->xRecorder = SfxRequest::GetMacroRecorder( pViewFrame );
@@ -231,7 +231,7 @@ SfxRequest::SfxRequest
SfxRequest::SfxRequest
(
- USHORT nSlotId, // executed <Slot-Id>
+ sal_uInt16 nSlotId, // executed <Slot-Id>
SfxCallMode nMode, // Synch/API/...
SfxItemPool& rPool // necessary for the SfxItemSet for parameters
)
@@ -244,14 +244,14 @@ SfxRequest::SfxRequest
{
DBG_MEMTEST();
- pImp->bDone = FALSE;
- pImp->bIgnored = FALSE;
+ pImp->bDone = sal_False;
+ pImp->bIgnored = sal_False;
pImp->SetPool( &rPool );
pImp->pRetVal = 0;
pImp->pShell = 0;
pImp->pSlot = 0;
pImp->nCallMode = nMode;
- pImp->bUseTarget = FALSE;
+ pImp->bUseTarget = sal_False;
}
SfxRequest::SfxRequest
@@ -267,14 +267,14 @@ SfxRequest::SfxRequest
{
DBG_MEMTEST();
- pImp->bDone = FALSE;
- pImp->bIgnored = FALSE;
+ pImp->bDone = sal_False;
+ pImp->bIgnored = sal_False;
pImp->SetPool( &rPool );
pImp->pRetVal = 0;
pImp->pShell = 0;
pImp->pSlot = 0;
pImp->nCallMode = nMode;
- pImp->bUseTarget = FALSE;
+ pImp->bUseTarget = sal_False;
TransformParameters( nSlot, rArgs, *pArgs, pSlot );
}
@@ -282,8 +282,8 @@ SfxRequest::SfxRequest
SfxRequest::SfxRequest
(
- USHORT nSlotId,
- USHORT nMode,
+ sal_uInt16 nSlotId,
+ sal_uInt16 nMode,
const SfxAllItemSet& rSfxArgs
)
@@ -295,37 +295,37 @@ SfxRequest::SfxRequest
{
DBG_MEMTEST();
- pImp->bDone = FALSE;
- pImp->bIgnored = FALSE;
+ pImp->bDone = sal_False;
+ pImp->bIgnored = sal_False;
pImp->SetPool( rSfxArgs.GetPool() );
pImp->pRetVal = 0;
pImp->pShell = 0;
pImp->pSlot = 0;
pImp->nCallMode = nMode;
- pImp->bUseTarget = FALSE;
+ pImp->bUseTarget = sal_False;
}
//--------------------------------------------------------------------
-USHORT SfxRequest::GetCallMode() const
+sal_uInt16 SfxRequest::GetCallMode() const
{
return pImp->nCallMode;
}
//--------------------------------------------------------------------
-BOOL SfxRequest::IsSynchronCall() const
+sal_Bool SfxRequest::IsSynchronCall() const
{
return SFX_CALLMODE_SYNCHRON == ( SFX_CALLMODE_SYNCHRON & pImp->nCallMode );
}
//--------------------------------------------------------------------
-void SfxRequest::SetSynchronCall( BOOL bSynchron )
+void SfxRequest::SetSynchronCall( sal_Bool bSynchron )
{
if ( bSynchron )
pImp->nCallMode |= SFX_CALLMODE_SYNCHRON;
else
- pImp->nCallMode &= ~(USHORT) SFX_CALLMODE_SYNCHRON;
+ pImp->nCallMode &= ~(sal_uInt16) SFX_CALLMODE_SYNCHRON;
}
void SfxRequest::SetInternalArgs_Impl( const SfxAllItemSet& rArgs )
@@ -449,7 +449,7 @@ void SfxRequest::AppendItem(const SfxPoolItem &rItem)
//--------------------------------------------------------------------
-void SfxRequest::RemoveItem( USHORT nID )
+void SfxRequest::RemoveItem( sal_uInt16 nID )
{
if (pArgs)
{
@@ -463,8 +463,8 @@ void SfxRequest::RemoveItem( USHORT nID )
const SfxPoolItem* SfxRequest::GetArg
(
- USHORT nSlotId, // Slot-Id or Which-Id of the parameters
- bool bDeep, // FALSE: do not seach in the Parent-ItemSets
+ sal_uInt16 nSlotId, // Slot-Id or Which-Id of the parameters
+ bool bDeep, // sal_False: do not seach in the Parent-ItemSets
TypeId aType // != 0: RTTI check with Assertion
) const
{
@@ -476,8 +476,8 @@ const SfxPoolItem* SfxRequest::GetArg
const SfxPoolItem* SfxRequest::GetItem
(
const SfxItemSet* pArgs,
- USHORT nSlotId, // Slot-Id or Which-Id of the parameters
- bool bDeep, // FALSE: do not seach in the Parent-ItemSets
+ sal_uInt16 nSlotId, // Slot-Id or Which-Id of the parameters
+ bool bDeep, // sal_False: do not seach in the Parent-ItemSets
TypeId aType // != 0: RTTI check with Assertion
)
@@ -499,12 +499,12 @@ const SfxPoolItem* SfxRequest::GetItem
...
// An Example on not using the macros
const SfxInt32Item *pPosItem = (const SfxUInt32Item*)
- rReq.GetArg( SID_POS, FALSE, TYPE(SfxInt32Item) );
- USHORT nPos = pPosItem ? pPosItem->GetValue() : 0;
+ rReq.GetArg( SID_POS, sal_False, TYPE(SfxInt32Item) );
+ sal_uInt16 nPos = pPosItem ? pPosItem->GetValue() : 0;
// An Example on using the macros
- SFX_REQUEST_ARG(rReq, pSizeItem, SfxInt32Item, SID_SIZE, FALSE);
- USHORT nSize = pSizeItem ? pPosItem->GetValue() : 0;
+ SFX_REQUEST_ARG(rReq, pSizeItem, SfxInt32Item, SID_SIZE, sal_False);
+ sal_uInt16 nSize = pSizeItem ? pPosItem->GetValue() : 0;
...
}
@@ -518,9 +518,9 @@ const SfxPoolItem* SfxRequest::GetItem
if ( pArgs )
{
// Which may be converted to ID
- USHORT nWhich = pArgs->GetPool()->GetWhich(nSlotId);
+ sal_uInt16 nWhich = pArgs->GetPool()->GetWhich(nSlotId);
- // Is the item set or available at bDeep == TRUE?
+ // Is the item set or available at bDeep == sal_True?
const SfxPoolItem *pItem = 0;
if ( ( bDeep ? SFX_ITEM_AVAILABLE : SFX_ITEM_SET )
<= pArgs->GetItemState( nWhich, bDeep, &pItem ) )
@@ -564,10 +564,10 @@ void SfxRequest::Done
in a dialogue, 0 if no parameters have been
set */
- bool bKeep /* TRUE (default)
+ bool bKeep /* true (default)
'rSet' is saved and GetArgs() queriable.
- FALSE
+ false
'rSet' is not copied (faster) */
)
@@ -619,7 +619,7 @@ void SfxRequest::Done
//--------------------------------------------------------------------
-void SfxRequest::Done( BOOL bRelease )
+void SfxRequest::Done( sal_Bool bRelease )
// [<SfxRequest::Done(SfxItemSet&)>]
{
Done_Impl( pArgs );
@@ -637,7 +637,7 @@ void SfxRequest::ForgetAllArgs()
//--------------------------------------------------------------------
-BOOL SfxRequest::IsCancelled() const
+sal_Bool SfxRequest::IsCancelled() const
{
return pImp->bCancelled;
}
@@ -653,7 +653,7 @@ void SfxRequest::Cancel()
*/
{
- pImp->bCancelled = TRUE;
+ pImp->bCancelled = sal_True;
pImp->SetPool( 0 );
DELETEZ( pArgs );
}
@@ -677,7 +677,7 @@ void SfxRequest::Ignore()
{
// Mark as actually executed
- pImp->bIgnored = TRUE;
+ pImp->bIgnored = sal_True;
}
//--------------------------------------------------------------------
@@ -699,7 +699,7 @@ void SfxRequest::Done_Impl
{
// Mark as actually executed
- pImp->bDone = TRUE;
+ pImp->bDone = sal_True;
// not Recording
if ( !pImp->xRecorder.is() )
@@ -735,8 +735,8 @@ void SfxRequest::Done_Impl
{
// get the property as SfxPoolItem
const SfxPoolItem *pItem;
- USHORT nWhich = rPool.GetWhich(pImp->pSlot->GetSlotId());
- SfxItemState eState = pSet ? pSet->GetItemState( nWhich, FALSE, &pItem ) : SFX_ITEM_UNKNOWN;
+ sal_uInt16 nWhich = rPool.GetWhich(pImp->pSlot->GetSlotId());
+ SfxItemState eState = pSet ? pSet->GetItemState( nWhich, sal_False, &pItem ) : SFX_ITEM_UNKNOWN;
#ifdef DBG_UTIL
if ( SFX_ITEM_SET != eState )
{
@@ -770,13 +770,13 @@ void SfxRequest::Done_Impl
for ( const SfxPoolItem* pItem = aIter.FirstItem(); pItem; pItem = aIter.NextItem() )
{
// to determine the slot ID for the individual item
- USHORT nSlotId = rPool.GetSlotId( pItem->Which() );
+ sal_uInt16 nSlotId = rPool.GetSlotId( pItem->Which() );
if ( nSlotId == nSlot )
{
// play it safe; repair the wrong flags
OSL_FAIL( "recursion RecordPerItem - use RecordPerSet!" );
SfxSlot *pSlot = (SfxSlot*) pImp->pSlot;
- pSlot->nFlags &= ~((ULONG)SFX_SLOT_RECORDPERITEM);
+ pSlot->nFlags &= ~((sal_uIntPtr)SFX_SLOT_RECORDPERITEM);
pSlot->nFlags &= SFX_SLOT_RECORDPERSET;
}
@@ -797,7 +797,7 @@ void SfxRequest::Done_Impl
//--------------------------------------------------------------------
-BOOL SfxRequest::IsDone() const
+sal_Bool SfxRequest::IsDone() const
/* [Description]
@@ -806,7 +806,7 @@ BOOL SfxRequest::IsDone() const
because it was canceled by the user or the context for this request was
wrong, this was not implemented on a separate <SfxShell>.
- SfxRequest instances that return FALSE will not be recorded.
+ SfxRequest instances that return sal_False will not be recorded.
[Cross-reference]
@@ -864,7 +864,7 @@ com::sun::star::uno::Reference< com::sun::star::frame::XDispatchRecorder > SfxRe
return xRecorder;
}
-BOOL SfxRequest::HasMacroRecorder( SfxViewFrame* pView )
+sal_Bool SfxRequest::HasMacroRecorder( SfxViewFrame* pView )
{
return GetMacroRecorder( pView ).is();
}
@@ -872,12 +872,12 @@ BOOL SfxRequest::HasMacroRecorder( SfxViewFrame* pView )
//--------------------------------------------------------------------
-BOOL SfxRequest::IsAPI() const
+sal_Bool SfxRequest::IsAPI() const
/* [Description]
- Returns TRUE if this SfxRequest was generated by an API (for example BASIC),
- otherwise FALSE.
+ Returns sal_True if this SfxRequest was generated by an API (for example BASIC),
+ otherwise sal_False.
*/
{
@@ -891,11 +891,11 @@ bool SfxRequest::IsRecording() const
/* [Description]
- Returns TRUE if this SfxRequest is to be recorded ie
+ Returns sal_True if this SfxRequest is to be recorded ie
1. Currently a macro is beeing recorded
2. This request is even recorded
3. the request did not originate from a pure API (for example BASIC),
- otherwise FALSE.
+ otherwise sal_False.
*/
{
@@ -903,13 +903,13 @@ bool SfxRequest::IsRecording() const
}
//--------------------------------------------------------------------
-void SfxRequest::SetModifier( USHORT nModi )
+void SfxRequest::SetModifier( sal_uInt16 nModi )
{
pImp->nModifier = nModi;
}
//--------------------------------------------------------------------
-USHORT SfxRequest::GetModifier() const
+sal_uInt16 SfxRequest::GetModifier() const
{
return pImp->nModifier;
}
@@ -936,17 +936,17 @@ void SfxRequest::SetTarget( const String &rTarget )
{
pImp->aTarget = rTarget;
- pImp->bUseTarget = TRUE;
+ pImp->bUseTarget = sal_True;
}
-void SfxRequest::AllowRecording( BOOL bSet )
+void SfxRequest::AllowRecording( sal_Bool bSet )
{
pImp->bAllowRecording = bSet;
}
-BOOL SfxRequest::AllowsRecording() const
+sal_Bool SfxRequest::AllowsRecording() const
{
- BOOL bAllow = pImp->bAllowRecording;
+ sal_Bool bAllow = pImp->bAllowRecording;
if( !bAllow )
bAllow = ( SFX_CALLMODE_API != ( SFX_CALLMODE_API & pImp->nCallMode ) ) &&
( SFX_CALLMODE_RECORD == ( SFX_CALLMODE_RECORD & pImp->nCallMode ) );
diff --git a/sfx2/source/control/sfxstatuslistener.cxx b/sfx2/source/control/sfxstatuslistener.cxx
index 9b86d6c911bf..c40263f18cac 100644..100755
--- a/sfx2/source/control/sfxstatuslistener.cxx
+++ b/sfx2/source/control/sfxstatuslistener.cxx
@@ -51,7 +51,7 @@
#include <sfx2/unoctitm.hxx>
#include <sfx2/msgpool.hxx>
-using namespace ::rtl;
+using ::rtl::OUString;
using namespace ::cppu;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::frame;
@@ -62,7 +62,7 @@ using namespace ::com::sun::star::util;
SFX_IMPL_XINTERFACE_3( SfxStatusListener, OWeakObject, ::com::sun::star::lang::XComponent, ::com::sun::star::frame::XStatusListener, ::com::sun::star::lang::XEventListener )
SFX_IMPL_XTYPEPROVIDER_3( SfxStatusListener, ::com::sun::star::lang::XComponent, ::com::sun::star::frame::XStatusListener, ::com::sun::star::lang::XEventListener )
-SfxStatusListener::SfxStatusListener( const Reference< XDispatchProvider >& rDispatchProvider, USHORT nSlotId, const OUString& rCommand ) :
+SfxStatusListener::SfxStatusListener( const Reference< XDispatchProvider >& rDispatchProvider, sal_uInt16 nSlotId, const OUString& rCommand ) :
cppu::OWeakObject(),
m_nSlotID( nSlotId ),
m_xDispatchProvider( rDispatchProvider )
@@ -80,7 +80,7 @@ SfxStatusListener::~SfxStatusListener()
}
// old sfx controller item C++ API
-void SfxStatusListener::StateChanged( USHORT, SfxItemState, const SfxPoolItem* )
+void SfxStatusListener::StateChanged( sal_uInt16, SfxItemState, const SfxPoolItem* )
{
// must be implemented by sub class
}
@@ -101,7 +101,7 @@ void SfxStatusListener::Bind()
}
}
-void SfxStatusListener::Bind( USHORT nSlotId, const rtl::OUString& rNewCommand )
+void SfxStatusListener::Bind( sal_uInt16 nSlotId, const rtl::OUString& rNewCommand )
{
// first remove old listener, if we have a dispatch object
Reference< XStatusListener > aStatusListener( static_cast< OWeakObject* >( this ), UNO_QUERY );
diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx
index 6df570af3936..ecebb51c40b2 100644..100755
--- a/sfx2/source/control/shell.cxx
+++ b/sfx2/source/control/shell.cxx
@@ -44,7 +44,6 @@
#include <sfx2/bindings.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/viewfrm.hxx>
-#include "sfxbasic.hxx"
#include <sfx2/objface.hxx>
#include <sfx2/objsh.hxx>
#include <sfx2/viewsh.hxx>
@@ -53,7 +52,6 @@
#include <sfx2/request.hxx>
#include <sfx2/mnumgr.hxx>
#include "statcach.hxx"
-#include <sfx2/macrconf.hxx>
#include <sfx2/msgpool.hxx>
//====================================================================
@@ -82,10 +80,10 @@ struct SfxShell_Impl: public SfxBroadcaster
// ViewFrame/ViewShell/SubShell list
SfxViewFrame* pFrame; // Frame, if <UI-active>
SfxRepeatTarget* pRepeatTarget; // SbxObjectRef xParent;
- BOOL bInAppBASIC;
- BOOL bActive;
- ULONG nDisableFlags;
- ULONG nHelpId;
+ sal_Bool bInAppBASIC;
+ sal_Bool bActive;
+ sal_uIntPtr nDisableFlags;
+ sal_uIntPtr nHelpId;
svtools::AsynchronLink* pExecuter;
svtools::AsynchronLink* pUpdater;
SfxVerbSlotArr_Impl aSlotArr;
@@ -150,9 +148,9 @@ SfxShell::SfxShell()
pImp->pViewSh = 0;
pImp->pFrame = 0;
pImp->pRepeatTarget = 0;
- pImp->bInAppBASIC = FALSE;
+ pImp->bInAppBASIC = sal_False;
pImp->nHelpId = 0L;
- pImp->bActive = FALSE;
+ pImp->bActive = sal_False;
pImp->nDisableFlags = 0;
}
@@ -176,9 +174,9 @@ SfxShell::SfxShell( SfxViewShell *pViewSh )
pImp->pViewSh = pViewSh;
pImp->pFrame = 0;
pImp->pRepeatTarget = 0;
- pImp->bInAppBASIC = FALSE;
+ pImp->bInAppBASIC = sal_False;
pImp->nHelpId = 0L;
- pImp->bActive = FALSE;
+ pImp->bActive = sal_False;
}
//--------------------------------------------------------------------
@@ -309,7 +307,7 @@ SfxViewFrame* SfxShell::GetFrame() const
const SfxPoolItem* SfxShell::GetItem
(
- USHORT nSlotId // Slot-Id of the querying <SfxPoolItem>s
+ sal_uInt16 nSlotId // Slot-Id of the querying <SfxPoolItem>s
) const
/* [Description]
@@ -324,11 +322,11 @@ const SfxPoolItem* SfxShell::GetItem
[Cross-reference]
<SfxShell::PutItem(const SfxPoolItem&)>
- <SfxShell::RemoveItem(USHORT)>
+ <SfxShell::RemoveItem(sal_uInt16)>
*/
{
- for ( USHORT nPos = 0; nPos < pImp->aItems.Count(); ++nPos )
+ for ( sal_uInt16 nPos = 0; nPos < pImp->aItems.Count(); ++nPos )
if ( pImp->aItems.GetObject(nPos)->Which() == nSlotId )
return pImp->aItems.GetObject(nPos);
return 0;
@@ -338,7 +336,7 @@ const SfxPoolItem* SfxShell::GetItem
void SfxShell::RemoveItem
(
- USHORT nSlotId // Slot-Id of the deleting <SfxPoolItem>s
+ sal_uInt16 nSlotId // Slot-Id of the deleting <SfxPoolItem>s
)
/* [Description]
@@ -351,11 +349,11 @@ void SfxShell::RemoveItem
[Cross-reference]
<SfxShell::PutItem(const SfxPoolItem&)>
- <SfxShell::GetItem(USHORT)>
+ <SfxShell::GetItem(sal_uInt16)>
*/
{
- for ( USHORT nPos = 0; nPos < pImp->aItems.Count(); ++nPos )
+ for ( sal_uInt16 nPos = 0; nPos < pImp->aItems.Count(); ++nPos )
if ( pImp->aItems.GetObject(nPos)->Which() == nSlotId )
{
// Remove and delete Item
@@ -392,8 +390,8 @@ void SfxShell::PutItem
[Cross-reference]
- <SfxShell::RemoveItem(USHORT)>
- <SfxShell::GetItem(USHORT)>
+ <SfxShell::RemoveItem(sal_uInt16)>
+ <SfxShell::GetItem(sal_uInt16)>
*/
{
@@ -404,9 +402,9 @@ void SfxShell::PutItem
// MSC made a mess here of WNT/W95, beware of changes
const SfxPoolItem *pItem = rItem.Clone();
SfxPoolItemHint aItemHint( (SfxPoolItem*) pItem );
- const USHORT nWhich = rItem.Which();
+ const sal_uInt16 nWhich = rItem.Which();
SfxPoolItem **ppLoopItem = (SfxPoolItem**) pImp->aItems.GetData();
- USHORT nPos;
+ sal_uInt16 nPos;
for ( nPos = 0; nPos < pImp->aItems.Count(); ++nPos, ++ppLoopItem )
{
if ( (*ppLoopItem)->Which() == nWhich )
@@ -422,12 +420,12 @@ void SfxShell::PutItem
{
SfxBindings* pBindings = pDispat->GetBindings();
pBindings->Broadcast( aItemHint );
- USHORT nSlotId = nWhich; //pItem->GetSlotId();
+ sal_uInt16 nSlotId = nWhich; //pItem->GetSlotId();
SfxStateCache* pCache = pBindings->GetStateCache( nSlotId );
if ( pCache )
{
- pCache->SetState( SFX_ITEM_AVAILABLE, pItem->Clone(), TRUE );
- pCache->SetCachedState( TRUE );
+ pCache->SetState( SFX_ITEM_AVAILABLE, pItem->Clone(), sal_True );
+ pCache->SetCachedState( sal_True );
}
}
return;
@@ -472,7 +470,7 @@ SfxBroadcaster* SfxShell::GetBroadcaster()
//--------------------------------------------------------------------
-SfxUndoManager* SfxShell::GetUndoManager()
+::svl::IUndoManager* SfxShell::GetUndoManager()
/* [Description]
@@ -489,7 +487,7 @@ SfxUndoManager* SfxShell::GetUndoManager()
//--------------------------------------------------------------------
-void SfxShell::SetUndoManager( SfxUndoManager *pNewUndoMgr )
+void SfxShell::SetUndoManager( ::svl::IUndoManager *pNewUndoMgr )
/* [Description]
@@ -505,9 +503,15 @@ void SfxShell::SetUndoManager( SfxUndoManager *pNewUndoMgr )
*/
{
+ OSL_ENSURE( ( pUndoMgr == NULL ) || ( pNewUndoMgr == NULL ) || ( pUndoMgr == pNewUndoMgr ),
+ "SfxShell::SetUndoManager: exchanging one non-NULL manager with another non-NULL manager? Suspicious!" );
+ // there's at least one client of our UndoManager - the DocumentUndoManager at the SfxBaseModel - which
+ // caches the UndoManager, and registers itself as listener. If exchanging non-NULL UndoManagers is really
+ // a supported scenario (/me thinks it is not), then we would need to notify all such clients instances.
+
pUndoMgr = pNewUndoMgr;
if ( pUndoMgr )
- pUndoMgr->SetMaxUndoActionCount( (USHORT) SvtUndoOptions().GetUndoCount() );
+ pUndoMgr->SetMaxUndoActionCount( (sal_uInt16) SvtUndoOptions().GetUndoCount() );
}
//--------------------------------------------------------------------
@@ -557,7 +561,7 @@ void SfxShell::SetRepeatTarget( SfxRepeatTarget *pTarget )
void SfxShell::Invalidate
(
- USHORT nId /* Invalidated Slot-Id or Which-Id.
+ sal_uInt16 nId /* Invalidated Slot-Id or Which-Id.
If these are 0 (default), then all
by this Shell currently handled Slot-Ids are
invalidated. */
@@ -571,8 +575,8 @@ void SfxShell::Invalidate
[Cross-reference]
- <SfxBindings::Invalidate(USHORT)>
- <SfxBindings::InvalidateAll(BOOL)>
+ <SfxBindings::Invalidate(sal_uInt16)>
+ <SfxBindings::InvalidateAll(sal_Bool)>
*/
{
@@ -585,11 +589,11 @@ void SfxShell::Invalidate
Invalidate_Impl( GetViewShell()->GetViewFrame()->GetBindings(), nId );
}
-void SfxShell::Invalidate_Impl( SfxBindings& rBindings, USHORT nId )
+void SfxShell::Invalidate_Impl( SfxBindings& rBindings, sal_uInt16 nId )
{
if ( nId == 0 )
{
- rBindings.InvalidateShell( *this, FALSE );
+ rBindings.InvalidateShell( *this, sal_False );
}
else
{
@@ -625,12 +629,12 @@ void SfxShell::Invalidate_Impl( SfxBindings& rBindings, USHORT nId )
//--------------------------------------------------------------------
-void SfxShell::DoActivate_Impl( SfxViewFrame *pFrame, BOOL bMDI )
+void SfxShell::DoActivate_Impl( SfxViewFrame *pFrame, sal_Bool bMDI )
/* [Description]
This method controls the activation of SfxShell instance. First, by calling
- the virtual method <SfxShell::Activate(BOOL)> which gives the subclass the
+ the virtual method <SfxShell::Activate(sal_Bool)> which gives the subclass the
opportunity to respond to the event.
When bMDI == TRUE, the associated SbxObject is being 'armed', so that
@@ -658,7 +662,7 @@ void SfxShell::DoActivate_Impl( SfxViewFrame *pFrame, BOOL bMDI )
{
// Remember Frame, in which it was activated
pImp->pFrame = pFrame;
- pImp->bActive = TRUE;
+ pImp->bActive = sal_True;
}
// Notify Subclass
@@ -667,7 +671,7 @@ void SfxShell::DoActivate_Impl( SfxViewFrame *pFrame, BOOL bMDI )
//--------------------------------------------------------------------
-void SfxShell::DoDeactivate_Impl( SfxViewFrame *pFrame, BOOL bMDI )
+void SfxShell::DoDeactivate_Impl( SfxViewFrame *pFrame, sal_Bool bMDI )
/* [Description]
@@ -676,7 +680,7 @@ void SfxShell::DoDeactivate_Impl( SfxViewFrame *pFrame, BOOL bMDI )
BASIC methods can be called.
Then the subclass gets the opportunity in every case to respond to the
- event by calling the virtual method <SfxShell::Deactivate(BOOL)>.
+ event by calling the virtual method <SfxShell::Deactivate(sal_Bool)>.
*/
{
@@ -701,7 +705,7 @@ void SfxShell::DoDeactivate_Impl( SfxViewFrame *pFrame, BOOL bMDI )
{
// deliver
pImp->pFrame = 0;
- pImp->bActive = FALSE;
+ pImp->bActive = sal_False;
}
// Notify Subclass
@@ -710,7 +714,7 @@ void SfxShell::DoDeactivate_Impl( SfxViewFrame *pFrame, BOOL bMDI )
//--------------------------------------------------------------------
-BOOL SfxShell::IsActive() const
+sal_Bool SfxShell::IsActive() const
{
return pImp->bActive;
}
@@ -719,7 +723,7 @@ BOOL SfxShell::IsActive() const
void SfxShell::Activate
(
- BOOL /*bMDI*/ /* TRUE
+ sal_Bool /*bMDI*/ /* TRUE
the <SfxDispatcher>, on which the SfxShell is
located, is activated or the SfxShell instance
was pushed on an active SfxDispatcher.
@@ -741,7 +745,7 @@ void SfxShell::Activate
[Cross-reference]
- StarView SystemWindow::Activate(BOOL)
+ StarView SystemWindow::Activate(sal_Bool)
*/
{
@@ -751,7 +755,7 @@ void SfxShell::Activate
void SfxShell::Deactivate
(
- BOOL /*bMDI*/ /* TRUE
+ sal_Bool /*bMDI*/ /* TRUE
the <SfxDispatcher>, on which the SfxShell is
located, is inactivated or the SfxShell instance
was popped on an active SfxDispatcher.
@@ -773,7 +777,7 @@ void SfxShell::Deactivate
[Cross-reference]
- StarView SystemWindow::Dectivate(BOOL)
+ StarView SystemWindow::Dectivate(sal_Bool)
*/
{
@@ -845,7 +849,7 @@ bool SfxShell::CanExecuteSlot_Impl( const SfxSlot &rSlot )
{
// Get Slot status
SfxItemPool &rPool = GetPool();
- const USHORT nId = rSlot.GetWhich( rPool );
+ const sal_uInt16 nId = rSlot.GetWhich( rPool );
SfxItemSet aSet(rPool, nId, nId);
SfxStateFunc pFunc = rSlot.GetStateFnc();
CallState( pFunc, aSet );
@@ -866,7 +870,7 @@ long ShellCall_Impl( void* pObj, void* pArg )
*/
//--------------------------------------------------------------------
-const SfxPoolItem* SfxShell::ExecuteSlot( SfxRequest& rReq, BOOL bAsync )
+const SfxPoolItem* SfxShell::ExecuteSlot( SfxRequest& rReq, sal_Bool bAsync )
{
if( !bAsync )
return ExecuteSlot( rReq, (SfxInterface*)0L );
@@ -915,26 +919,19 @@ const SfxPoolItem* SfxShell::ExecuteSlot
[Cross-reference]
- <SfxShell::GetSlotState(USHORT,const SfxInterface*,SfxItemSet*)>
+ <SfxShell::GetSlotState(sal_uInt16,const SfxInterface*,SfxItemSet*)>
*/
{
if ( !pIF )
pIF = GetInterface();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
const SfxSlot* pSlot = NULL;
if ( nSlot >= SID_VERB_START && nSlot <= SID_VERB_END )
pSlot = GetVerbSlot_Impl(nSlot);
if ( !pSlot )
pSlot = pIF->GetSlot(nSlot);
- if ( !pSlot && SfxMacroConfig::IsMacroSlot( nSlot ) )
- {
- SfxMacroInfo* pInfo = SFX_APP()->GetMacroConfig()->GetMacroInfo(nSlot);
- if ( pInfo )
- pSlot = pInfo->GetSlot();
- }
-
DBG_ASSERT( pSlot, "slot not supported" );
SfxExecFunc pFunc = pSlot->GetExecFnc();
@@ -948,7 +945,7 @@ const SfxPoolItem* SfxShell::ExecuteSlot
const SfxPoolItem* SfxShell::GetSlotState
(
- USHORT nSlotId, // Slot-Id to the Slots in question
+ sal_uInt16 nSlotId, // Slot-Id to the Slots in question
const SfxInterface* pIF, // default = 0 means get virtually
SfxItemSet* pStateSet // SfxItemSet of the Slot-State method
)
@@ -1001,13 +998,6 @@ const SfxPoolItem* SfxShell::GetSlotState
pSlot = GetVerbSlot_Impl(nSlotId);
if ( !pSlot )
pSlot = pIF->GetSlot(nSlotId);
- if ( !pSlot && SfxMacroConfig::IsMacroSlot( nSlotId ) )
- {
- SfxMacroInfo* pInfo = SFX_APP()->GetMacroConfig()->GetMacroInfo(nSlotId);
- if ( pInfo )
- pSlot = pInfo->GetSlot();
- }
-
if ( pSlot )
// Map on Which-Id if possible
nSlotId = pSlot->GetWhich( rPool );
@@ -1021,7 +1011,7 @@ const SfxPoolItem* SfxShell::GetSlotState
SfxStateFunc pFunc = pSlot->GetStateFnc();
if ( pFunc )
CallState( pFunc, aSet );
- eState = aSet.GetItemState( nSlotId, TRUE, &pItem );
+ eState = aSet.GetItemState( nSlotId, sal_True, &pItem );
// get default Item if possible
if ( eState == SFX_ITEM_DEFAULT )
@@ -1078,18 +1068,18 @@ void SfxShell::SetVerbs(const com::sun::star::uno::Sequence < com::sun::star::em
{
SfxBindings *pBindings =
pViewSh->GetViewFrame()->GetDispatcher()->GetBindings();
- USHORT nCount = pImp->aSlotArr.Count();
- for (USHORT n1=0; n1<nCount ; n1++)
+ sal_uInt16 nCount = pImp->aSlotArr.Count();
+ for (sal_uInt16 n1=0; n1<nCount ; n1++)
{
- USHORT nId = SID_VERB_START + n1;
- pBindings->Invalidate(nId, FALSE, TRUE);
+ sal_uInt16 nId = SID_VERB_START + n1;
+ pBindings->Invalidate(nId, sal_False, sal_True);
}
}
- USHORT nr=0;
+ sal_uInt16 nr=0;
for (sal_Int32 n=0; n<aVerbs.getLength(); n++)
{
- USHORT nSlotId = SID_VERB_START + nr++;
+ sal_uInt16 nSlotId = SID_VERB_START + nr++;
DBG_ASSERT(nSlotId <= SID_VERB_END, "To many Verbs!");
if (nSlotId > SID_VERB_END)
break;
@@ -1121,7 +1111,7 @@ void SfxShell::SetVerbs(const com::sun::star::uno::Sequence < com::sun::star::em
else
pNewSlot->pNextSlot = pNewSlot;
- pImp->aSlotArr.Insert(pNewSlot, (USHORT) n);
+ pImp->aSlotArr.Insert(pNewSlot, (sal_uInt16) n);
}
pImp->aVerbList = aVerbs;
@@ -1132,7 +1122,7 @@ void SfxShell::SetVerbs(const com::sun::star::uno::Sequence < com::sun::star::em
// the Shell, it is thus enough to encourage a new status update
SfxBindings *pBindings = pViewSh->GetViewFrame()->GetDispatcher()->
GetBindings();
- pBindings->Invalidate( SID_OBJECT, TRUE, TRUE );
+ pBindings->Invalidate( SID_OBJECT, sal_True, sal_True );
}
}
@@ -1147,11 +1137,11 @@ const com::sun::star::uno::Sequence < com::sun::star::embed::VerbDescriptor >& S
void SfxShell::VerbExec(SfxRequest& rReq)
{
- USHORT nId = rReq.GetSlot();
+ sal_uInt16 nId = rReq.GetSlot();
SfxViewShell *pViewShell = GetViewShell();
if ( pViewShell )
{
- BOOL bReadOnly = pViewShell->GetObjectShell()->IsReadOnly();
+ sal_Bool bReadOnly = pViewShell->GetObjectShell()->IsReadOnly();
com::sun::star::uno::Sequence < com::sun::star::embed::VerbDescriptor > aList = pViewShell->GetVerbs();
for (sal_Int32 n=0, nVerb=0; n<aList.getLength(); n++)
{
@@ -1181,12 +1171,12 @@ void SfxShell::VerbState(SfxItemSet& )
//--------------------------------------------------------------------
-const SfxSlot* SfxShell::GetVerbSlot_Impl(USHORT nId) const
+const SfxSlot* SfxShell::GetVerbSlot_Impl(sal_uInt16 nId) const
{
com::sun::star::uno::Sequence < com::sun::star::embed::VerbDescriptor > rList = pImp->aVerbList;
DBG_ASSERT(nId >= SID_VERB_START && nId <= SID_VERB_END,"Wrong VerbId!");
- USHORT nIndex = nId - SID_VERB_START;
+ sal_uInt16 nIndex = nId - SID_VERB_START;
DBG_ASSERT(nIndex < rList.getLength(),"Wrong VerbId!");
if (nIndex < rList.getLength())
@@ -1197,14 +1187,14 @@ const SfxSlot* SfxShell::GetVerbSlot_Impl(USHORT nId) const
//--------------------------------------------------------------------
-void SfxShell::SetHelpId(ULONG nId)
+void SfxShell::SetHelpId(sal_uIntPtr nId)
{
pImp->nHelpId = nId;
}
//--------------------------------------------------------------------
-ULONG SfxShell::GetHelpId() const
+sal_uIntPtr SfxShell::GetHelpId() const
{
return pImp->nHelpId;
}
@@ -1228,8 +1218,8 @@ sal_Bool SfxShell::HasUIFeature( sal_uInt32 )
long DispatcherUpdate_Impl( void*, void* pArg )
{
- ((SfxDispatcher*) pArg)->Update_Impl( TRUE );
- ((SfxDispatcher*) pArg)->GetBindings()->InvalidateAll(FALSE);
+ ((SfxDispatcher*) pArg)->Update_Impl( sal_True );
+ ((SfxDispatcher*) pArg)->GetBindings()->InvalidateAll(sal_False);
return 0;
}
@@ -1245,26 +1235,26 @@ void SfxShell::UIFeatureChanged()
pImp->pUpdater = new svtools::AsynchronLink( Link( this, DispatcherUpdate_Impl ) );
// Multiple views allowed
- pImp->pUpdater->Call( pFrame->GetDispatcher(), TRUE );
+ pImp->pUpdater->Call( pFrame->GetDispatcher(), sal_True );
}
}
-void SfxShell::SetDisableFlags( ULONG nFlags )
+void SfxShell::SetDisableFlags( sal_uIntPtr nFlags )
{
pImp->nDisableFlags = nFlags;
}
-ULONG SfxShell::GetDisableFlags() const
+sal_uIntPtr SfxShell::GetDisableFlags() const
{
return pImp->nDisableFlags;
}
-SfxItemSet* SfxShell::CreateItemSet( USHORT )
+SfxItemSet* SfxShell::CreateItemSet( sal_uInt16 )
{
return NULL;
}
-void SfxShell::ApplyItemSet( USHORT, const SfxItemSet& )
+void SfxShell::ApplyItemSet( sal_uInt16, const SfxItemSet& )
{
}
diff --git a/sfx2/source/control/sorgitm.cxx b/sfx2/source/control/sorgitm.cxx
index 9a20d9b83463..4bf146527839 100644..100755
--- a/sfx2/source/control/sorgitm.cxx
+++ b/sfx2/source/control/sorgitm.cxx
@@ -89,17 +89,17 @@ int SfxScriptOrganizerItem::operator==( const SfxPoolItem& rItem) const
}
-bool SfxScriptOrganizerItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId ) const
+bool SfxScriptOrganizerItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) const
{
String aValue;
- BOOL bIsString = FALSE;
+ sal_Bool bIsString = sal_False;
sal_Bool bValue = sal_False;
nMemberId &= ~CONVERT_TWIPS;
switch ( nMemberId )
{
case 0:
case MID_SCRIPT_ORGANIZER_LANGUAGE:
- bIsString = TRUE;
+ bIsString = sal_True;
aValue = aLanguage;
break;
default:
@@ -114,7 +114,7 @@ bool SfxScriptOrganizerItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nM
return true;
}
-bool SfxScriptOrganizerItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId )
+bool SfxScriptOrganizerItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId )
{
::rtl::OUString aValue;
sal_Bool bRet = false;
diff --git a/sfx2/source/control/statcach.cxx b/sfx2/source/control/statcach.cxx
index 71d6e9e40aa0..5db7ffd1f1e9 100644..100755
--- a/sfx2/source/control/statcach.cxx
+++ b/sfx2/source/control/statcach.cxx
@@ -355,7 +355,7 @@ void SfxStateCache::SetState
(
SfxItemState eState, // <SfxItemState> from 'pState'
const SfxPoolItem* pState, // Slot Status, 0 or -1
- BOOL bMaybeDirty
+ sal_Bool bMaybeDirty
)
/* [Description]
@@ -371,7 +371,7 @@ void SfxStateCache::SetState
//--------------------------------------------------------------------
-void SfxStateCache::SetVisibleState( BOOL bShow )
+void SfxStateCache::SetVisibleState( sal_Bool bShow )
{
SfxItemState eState( SFX_ITEM_AVAILABLE );
const SfxPoolItem* pState( NULL );
@@ -394,7 +394,7 @@ void SfxStateCache::SetVisibleState( BOOL bShow )
}
else
{
- pState = new SfxVisibilityItem( nId, FALSE );
+ pState = new SfxVisibilityItem( nId, sal_False );
bDeleteItem = sal_True;
}
@@ -421,7 +421,7 @@ void SfxStateCache::SetState_Impl
(
SfxItemState eState, // <SfxItemState> from 'pState'
const SfxPoolItem* pState, // Slot Status, 0 or -1
- BOOL bMaybeDirty
+ sal_Bool bMaybeDirty
)
{
(void)bMaybeDirty; //unused
@@ -486,7 +486,7 @@ void SfxStateCache::SetState_Impl
//--------------------------------------------------------------------
// Set old status again in all the controllers
-void SfxStateCache::SetCachedState( BOOL bAlways )
+void SfxStateCache::SetCachedState( sal_Bool bAlways )
{
DBG_MEMTEST();
DBG_CHKTHIS(SfxStateCache, 0);
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 202c91db2b8a..ebb1635afae4 100644..100755
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -434,7 +434,7 @@ void SfxOfficeDispatch::SetMasterUnoCommand( sal_Bool bSet )
sal_Bool SfxOfficeDispatch::IsMasterUnoCommand() const
{
if ( pControllerItem )
- pControllerItem->isMasterSlaveCommand();
+ return pControllerItem->isMasterSlaveCommand();
return sal_False;
}
@@ -576,12 +576,12 @@ void SfxDispatchController_Impl::addParametersToArgs( const com::sun::star::util
}
else if ( aParamType.equalsAsciiL( URLTypeNames[URLType_BOOL], 4 ))
{
- // BOOL support
+ // sal_Bool support
rArgs[nLen].Value <<= aValue.toBoolean();
}
else if ( aParamType.equalsAsciiL( URLTypeNames[URLType_BYTE], 4 ))
{
- // BYTE support
+ // sal_uInt8 support
rArgs[nLen].Value <<= sal_Int8( aValue.toInt32() );
}
else if ( aParamType.equalsAsciiL( URLTypeNames[URLType_LONG], 4 ))
@@ -621,7 +621,7 @@ void SfxDispatchController_Impl::addParametersToArgs( const com::sun::star::util
SfxMapUnit SfxDispatchController_Impl::GetCoreMetric( SfxItemPool& rPool, sal_uInt16 nSlotId )
{
- USHORT nWhich = rPool.GetWhich( nSlotId );
+ sal_uInt16 nWhich = rPool.GetWhich( nSlotId );
return rPool.GetMetric( nWhich );
}
@@ -737,7 +737,7 @@ void SAL_CALL SfxDispatchController_Impl::dispatch( const ::com::sun::star::util
{
const SfxSlot *pSlot = 0;
if ( pDispatcher->GetShellAndSlot_Impl( GetId(), &pShell, &pSlot, sal_False,
- SFX_CALLMODE_MODAL==(nCall&SFX_CALLMODE_MODAL), FALSE ) )
+ SFX_CALLMODE_MODAL==(nCall&SFX_CALLMODE_MODAL), sal_False ) )
{
if ( bMasterSlave )
{
@@ -769,7 +769,7 @@ void SAL_CALL SfxDispatchController_Impl::dispatch( const ::com::sun::star::util
bSuccess = aReq.IsDone() || pItem != NULL;
if ( bVBARequest )
{
- SFX_REQUEST_ARG( aReq, pDlgRet, SfxBoolItem, SID_DIALOG_RETURN, FALSE );
+ SFX_REQUEST_ARG( aReq, pDlgRet, SfxBoolItem, SID_DIALOG_RETURN, sal_False );
if ( pDlgRet )
{
bSuccess = pDlgRet->GetValue();
@@ -822,10 +822,10 @@ void SAL_CALL SfxDispatchController_Impl::dispatch( const ::com::sun::star::util
aEvent.Source = (::com::sun::star::frame::XDispatch*) pDispatch;
if ( bSuccess && pItem && !pItem->ISA(SfxVoidItem) )
{
- USHORT nSubId( 0 );
+ sal_uInt16 nSubId( 0 );
if ( eMapUnit == SFX_MAPUNIT_TWIP )
nSubId |= CONVERT_TWIPS;
- pItem->QueryValue( aEvent.Result, (BYTE)nSubId );
+ pItem->QueryValue( aEvent.Result, (sal_uInt8)nSubId );
}
rListener->dispatchFinished( aEvent );
@@ -921,7 +921,7 @@ void SfxDispatchController_Impl::StateChanged( sal_uInt16 nSID, SfxItemState eSt
if ( ( eState >= SFX_ITEM_AVAILABLE ) && pState && !IsInvalidItem( pState ) && !pState->ISA(SfxVoidItem) )
{
// Retrieve metric from pool to have correct sub ID when calling QueryValue
- USHORT nSubId( 0 );
+ sal_uInt16 nSubId( 0 );
SfxMapUnit eMapUnit( SFX_MAPUNIT_100TH_MM );
// retrieve the core metric
@@ -939,7 +939,7 @@ void SfxDispatchController_Impl::StateChanged( sal_uInt16 nSID, SfxItemState eSt
if ( eMapUnit == SFX_MAPUNIT_TWIP )
nSubId |= CONVERT_TWIPS;
- pState->QueryValue( aState, (BYTE)nSubId );
+ pState->QueryValue( aState, (sal_uInt8)nSubId );
}
else if ( eState == SFX_ITEM_DONTCARE )
{
diff --git a/sfx2/source/dialog/about.cxx b/sfx2/source/dialog/about.cxx
index c5622fa99c73..c5622fa99c73 100644..100755
--- a/sfx2/source/dialog/about.cxx
+++ b/sfx2/source/dialog/about.cxx
diff --git a/sfx2/source/dialog/alienwarn.cxx b/sfx2/source/dialog/alienwarn.cxx
index 18b915e49c2f..6e2dd844b095 100644..100755
--- a/sfx2/source/dialog/alienwarn.cxx
+++ b/sfx2/source/dialog/alienwarn.cxx
@@ -31,7 +31,7 @@
#include <sal/macros.h>
#include "alienwarn.hxx"
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include <sfx2/sfxuno.hxx>
#include "alienwarn.hrc"
diff --git a/sfx2/source/dialog/alienwarn.hrc b/sfx2/source/dialog/alienwarn.hrc
index e3a23dc57836..e3a23dc57836 100644..100755
--- a/sfx2/source/dialog/alienwarn.hrc
+++ b/sfx2/source/dialog/alienwarn.hrc
diff --git a/sfx2/source/dialog/alienwarn.src b/sfx2/source/dialog/alienwarn.src
index 7aa6f3230778..ae07b28a4f4d 100644..100755
--- a/sfx2/source/dialog/alienwarn.src
+++ b/sfx2/source/dialog/alienwarn.src
@@ -81,6 +81,7 @@ ModalDialog RID_DLG_ALIEN_WARNING
};
CheckBox CB_WARNING_OFF
{
+ HelpID = "sfx2:CheckBox:RID_DLG_ALIEN_WARNING:CB_WARNING_OFF";
Pos = MAP_APPFONT( AW_COL_2, AW_ROW_4 );
Size = MAP_APPFONT( DIALOG_WIDTH-AW_COL_2-RSC_SP_DLG_INNERBORDER_RIGHT, RSC_CD_CHECKBOX_HEIGHT );
WordBreak = TRUE ;
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index 7733e6345951..03e7ef58ea03 100644..100755
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -48,9 +48,9 @@
#include <sfx2/dispatch.hxx>
#include <sfx2/childwin.hxx>
#include <sfx2/viewsh.hxx>
-#include "sfxhelp.hxx"
+#include "sfx2/sfxhelp.hxx"
#include "workwin.hxx"
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include "dialog.hrc"
using namespace ::com::sun::star::uno;
@@ -63,7 +63,7 @@ class SfxModelessDialog_Impl : public SfxListener
public:
ByteString aWinState;
SfxChildWindow* pMgr;
- BOOL bConstructed;
+ sal_Bool bConstructed;
void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
Timer aMoveTimer;
@@ -87,7 +87,7 @@ class SfxFloatingWindow_Impl : public SfxListener
public:
ByteString aWinState;
SfxChildWindow* pMgr;
- BOOL bConstructed;
+ sal_Bool bConstructed;
Timer aMoveTimer;
void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
@@ -161,9 +161,6 @@ void SfxModalDialog::GetDialogData_Impl()
void SfxModalDialog::init()
{
GetDialogData_Impl();
- aTimer.SetTimeout( 100 );
- aTimer.SetTimeoutHdl( LINK( this, SfxModalDialog, TimerHdl_Impl ) );
- aTimer.Start();
}
// -----------------------------------------------------------------------
@@ -215,7 +212,6 @@ SfxModalDialog::~SfxModalDialog()
{
SetDialogData_Impl();
- aTimer.Stop();
delete pOutputSet;
}
@@ -228,11 +224,6 @@ void SfxModalDialog::CreateOutputItemSet( SfxItemPool& rPool )
// -----------------------------------------------------------------------
-IMPL_LINK( SfxModalDialog, TimerHdl_Impl, Timer*, EMPTYARG )
-{
- return 0L;
-}
-
void SfxModalDialog::CreateOutputItemSet( const SfxItemSet& rSet )
{
DBG_ASSERT( !pOutputSet, "Double creation of OutputSet!" );
@@ -283,7 +274,7 @@ void SfxModelessDialog::StateChanged( StateChangedType nStateChange )
}
}
- pImp->bConstructed = TRUE;
+ pImp->bConstructed = sal_True;
}
ModelessDialog::StateChanged( nStateChange );
@@ -342,7 +333,7 @@ IMPL_LINK( SfxModelessDialog, TimerHdl, Timer*, EMPTYARG)
{
if ( !IsRollUp() )
aSize = GetSizePixel();
- ULONG nMask = WINDOWSTATE_MASK_POS | WINDOWSTATE_MASK_STATE;
+ sal_uIntPtr nMask = WINDOWSTATE_MASK_POS | WINDOWSTATE_MASK_STATE;
if ( GetStyle() & WB_SIZEABLE )
nMask |= ( WINDOWSTATE_MASK_WIDTH | WINDOWSTATE_MASK_HEIGHT );
pImp->aWinState = GetWindowState( nMask );
@@ -361,10 +352,9 @@ SfxModelessDialog::SfxModelessDialog( SfxBindings *pBindinx,
pImp( new SfxModelessDialog_Impl )
{
pImp->pMgr = pCW;
- pImp->bConstructed = FALSE;
- sal_uInt32 nId = GetHelpId();
- SetHelpId(0);
- SetUniqueId( nId );
+ pImp->bConstructed = sal_False;
+ SetUniqueId( GetHelpId() );
+ SetHelpId("");
if ( pBindinx )
pImp->StartListening( *pBindinx );
pImp->aMoveTimer.SetTimeout(50);
@@ -381,10 +371,9 @@ SfxModelessDialog::SfxModelessDialog( SfxBindings *pBindinx,
pImp( new SfxModelessDialog_Impl )
{
pImp->pMgr = pCW;
- pImp->bConstructed = FALSE;
- sal_uInt32 nId = GetHelpId();
- SetHelpId(0);
- SetUniqueId( nId );
+ pImp->bConstructed = sal_False;
+ SetUniqueId( GetHelpId() );
+ SetHelpId("");
if ( pBindinx )
pImp->StartListening( *pBindinx );
pImp->aMoveTimer.SetTimeout(50);
@@ -407,15 +396,15 @@ long SfxModelessDialog::Notify( NotifyEvent& rEvt )
pBindings->SetActiveFrame( pImp->pMgr->GetFrame() );
pImp->pMgr->Activate_Impl();
Window* pWindow = rEvt.GetWindow();
- ULONG nHelpId = 0;
- while ( !nHelpId && pWindow )
+ rtl::OString sHelpId;
+ while ( !sHelpId.getLength() && pWindow )
{
- nHelpId = pWindow->GetHelpId();
+ sHelpId = pWindow->GetHelpId();
pWindow = pWindow->GetParent();
}
- if ( nHelpId )
- SfxHelp::OpenHelpAgent( &pBindings->GetDispatcher_Impl()->GetFrame()->GetFrame(), nHelpId );
+ if ( sHelpId.getLength() )
+ SfxHelp::OpenHelpAgent( &pBindings->GetDispatcher_Impl()->GetFrame()->GetFrame(), sHelpId );
}
else if ( rEvt.GetType() == EVENT_LOSEFOCUS && !HasChildPathFocus() )
{
@@ -505,15 +494,15 @@ long SfxFloatingWindow::Notify( NotifyEvent& rEvt )
pBindings->SetActiveFrame( pImp->pMgr->GetFrame() );
pImp->pMgr->Activate_Impl();
Window* pWindow = rEvt.GetWindow();
- ULONG nHelpId = 0;
- while ( !nHelpId && pWindow )
+ rtl::OString sHelpId;
+ while ( !sHelpId.getLength() && pWindow )
{
- nHelpId = pWindow->GetHelpId();
+ sHelpId = pWindow->GetHelpId();
pWindow = pWindow->GetParent();
}
- if ( nHelpId )
- SfxHelp::OpenHelpAgent( &pBindings->GetDispatcher_Impl()->GetFrame()->GetFrame(), nHelpId );
+ if ( sHelpId.getLength() )
+ SfxHelp::OpenHelpAgent( &pBindings->GetDispatcher_Impl()->GetFrame()->GetFrame(), sHelpId );
}
else if ( rEvt.GetType() == EVENT_LOSEFOCUS )
{
@@ -545,10 +534,9 @@ SfxFloatingWindow::SfxFloatingWindow( SfxBindings *pBindinx,
pImp( new SfxFloatingWindow_Impl )
{
pImp->pMgr = pCW;
- pImp->bConstructed = FALSE;
- sal_uInt32 nId = GetHelpId();
- SetHelpId(0);
- SetUniqueId( nId );
+ pImp->bConstructed = sal_False;
+ SetUniqueId( GetHelpId() );
+ SetHelpId("");
if ( pBindinx )
pImp->StartListening( *pBindinx );
pImp->aMoveTimer.SetTimeout(50);
@@ -566,10 +554,9 @@ SfxFloatingWindow::SfxFloatingWindow( SfxBindings *pBindinx,
pImp( new SfxFloatingWindow_Impl )
{
pImp->pMgr = pCW;
- pImp->bConstructed = FALSE;
- sal_uInt32 nId = GetHelpId();
- SetHelpId(0);
- SetUniqueId( nId );
+ pImp->bConstructed = sal_False;
+ SetUniqueId( GetHelpId() );
+ SetHelpId("");
if ( pBindinx )
pImp->StartListening( *pBindinx );
pImp->aMoveTimer.SetTimeout(50);
@@ -653,7 +640,7 @@ IMPL_LINK( SfxFloatingWindow, TimerHdl, Timer*, EMPTYARG)
{
if ( !IsRollUp() )
aSize = GetSizePixel();
- ULONG nMask = WINDOWSTATE_MASK_POS | WINDOWSTATE_MASK_STATE;
+ sal_uIntPtr nMask = WINDOWSTATE_MASK_POS | WINDOWSTATE_MASK_STATE;
if ( GetStyle() & WB_SIZEABLE )
nMask |= ( WINDOWSTATE_MASK_WIDTH | WINDOWSTATE_MASK_HEIGHT );
pImp->aWinState = GetWindowState( nMask );
@@ -670,7 +657,7 @@ void SfxFloatingWindow::StateChanged( StateChangedType nStateChange )
// FloatingWindows are not centered by default
if ( pImp->aWinState.Len() )
SetWindowState( pImp->aWinState );
- pImp->bConstructed = TRUE;
+ pImp->bConstructed = sal_True;
}
FloatingWindow::StateChanged( nStateChange );
diff --git a/sfx2/source/dialog/dialog.hrc b/sfx2/source/dialog/dialog.hrc
index 08940391ac87..08940391ac87 100644..100755
--- a/sfx2/source/dialog/dialog.hrc
+++ b/sfx2/source/dialog/dialog.hrc
diff --git a/sfx2/source/dialog/dialog.src b/sfx2/source/dialog/dialog.src
index c39425510ae2..c39425510ae2 100644..100755
--- a/sfx2/source/dialog/dialog.src
+++ b/sfx2/source/dialog/dialog.src
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 17eafeebbc74..086fcc226537 100644..100755
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -117,26 +117,26 @@ bool operator==(const util::DateTime &i_rLeft, const util::DateTime &i_rRight)
TYPEINIT1_AUTOFACTORY(SfxDocumentInfoItem, SfxStringItem);
-const USHORT HI_NAME = 1;
-const USHORT HI_TYPE = 2;
-const USHORT HI_VALUE = 3;
-const USHORT HI_ACTION = 4;
+const sal_uInt16 HI_NAME = 1;
+const sal_uInt16 HI_TYPE = 2;
+const sal_uInt16 HI_VALUE = 3;
+const sal_uInt16 HI_ACTION = 4;
static const char DOCUMENT_SIGNATURE_MENU_CMD[] = "Signature";
//------------------------------------------------------------------------
-String CreateSizeText( ULONG nSize, BOOL bExtraBytes = TRUE, BOOL bSmartExtraBytes = FALSE );
-String CreateSizeText( ULONG nSize, BOOL bExtraBytes, BOOL bSmartExtraBytes )
+String CreateSizeText( sal_uIntPtr nSize, sal_Bool bExtraBytes = sal_True, sal_Bool bSmartExtraBytes = sal_False );
+String CreateSizeText( sal_uIntPtr nSize, sal_Bool bExtraBytes, sal_Bool bSmartExtraBytes )
{
String aUnitStr = ' ';
aUnitStr += String( SfxResId(STR_BYTES) );
- ULONG nSize1 = nSize;
- ULONG nSize2 = nSize1;
- ULONG nMega = 1024 * 1024;
- ULONG nGiga = nMega * 1024;
+ sal_uIntPtr nSize1 = nSize;
+ sal_uIntPtr nSize2 = nSize1;
+ sal_uIntPtr nMega = 1024 * 1024;
+ sal_uIntPtr nGiga = nMega * 1024;
double fSize = nSize;
int nDec = 0;
- BOOL bGB = FALSE;
+ sal_Bool bGB = sal_False;
if ( nSize1 >= 10000 && nSize1 < nMega )
{
@@ -159,7 +159,7 @@ String CreateSizeText( ULONG nSize, BOOL bExtraBytes, BOOL bSmartExtraBytes )
nSize1 /= nGiga;
aUnitStr = ' ';
aUnitStr += String( SfxResId(STR_GB) );
- bGB = TRUE;
+ bGB = sal_True;
fSize /= nGiga;
nDec = 3;
}
@@ -199,7 +199,7 @@ String ConvertDateTime_Impl( const String& rName,
const String pDelim ( DEFINE_CONST_UNICODE( ", "));
String aStr( rWrapper.getDate( aD ) );
aStr += pDelim;
- aStr += rWrapper.getTime( aT, TRUE, FALSE );
+ aStr += rWrapper.getTime( aT, sal_True, sal_False );
String aAuthor = rName;
aAuthor.EraseLeadingChars();
if ( aAuthor.Len() )
@@ -510,13 +510,13 @@ void SfxDocumentInfoItem::AddCustomProperty( const ::rtl::OUString& sName, const
m_aCustomProperties.push_back( pProp );
}
-bool SfxDocumentInfoItem::QueryValue( Any& rVal, BYTE nMemberId ) const
+bool SfxDocumentInfoItem::QueryValue( Any& rVal, sal_uInt8 nMemberId ) const
{
String aValue;
sal_Int32 nValue = 0;
sal_Bool bValue = sal_False;
- BOOL bIsInt = FALSE;
- BOOL bIsString = FALSE;
+ sal_Bool bIsInt = sal_False;
+ sal_Bool bIsString = sal_False;
nMemberId &= ~CONVERT_TWIPS;
switch ( nMemberId )
{
@@ -530,31 +530,31 @@ bool SfxDocumentInfoItem::QueryValue( Any& rVal, BYTE nMemberId ) const
bValue = isAutoloadEnabled();
break;
case MID_DOCINFO_AUTOLOADSECS:
- bIsInt = TRUE;
+ bIsInt = sal_True;
nValue = getAutoloadDelay();
break;
case MID_DOCINFO_AUTOLOADURL:
- bIsString = TRUE;
+ bIsString = sal_True;
aValue = getAutoloadURL();
break;
case MID_DOCINFO_DEFAULTTARGET:
- bIsString = TRUE;
+ bIsString = sal_True;
aValue = getDefaultTarget();
break;
case MID_DOCINFO_DESCRIPTION:
- bIsString = TRUE;
+ bIsString = sal_True;
aValue = getDescription();
break;
case MID_DOCINFO_KEYWORDS:
- bIsString = TRUE;
+ bIsString = sal_True;
aValue = getKeywords();
break;
case MID_DOCINFO_SUBJECT:
- bIsString = TRUE;
+ bIsString = sal_True;
aValue = getSubject();
break;
case MID_DOCINFO_TITLE:
- bIsString = TRUE;
+ bIsString = sal_True;
aValue = getTitle();
break;
default:
@@ -571,7 +571,7 @@ bool SfxDocumentInfoItem::QueryValue( Any& rVal, BYTE nMemberId ) const
return true;
}
-bool SfxDocumentInfoItem::PutValue( const Any& rVal, BYTE nMemberId )
+bool SfxDocumentInfoItem::PutValue( const Any& rVal, sal_uInt8 nMemberId )
{
::rtl::OUString aValue;
sal_Int32 nValue=0;
@@ -669,16 +669,16 @@ SfxTabPage *SfxDocumentDescPage::Create(Window *pParent, const SfxItemSet &rItem
//------------------------------------------------------------------------
-BOOL SfxDocumentDescPage::FillItemSet(SfxItemSet &rSet)
+sal_Bool SfxDocumentDescPage::FillItemSet(SfxItemSet &rSet)
{
// Test whether a change is present
- const BOOL bTitleMod = aTitleEd.IsModified();
- const BOOL bThemeMod = aThemaEd.IsModified();
- const BOOL bKeywordsMod = aKeywordsEd.IsModified();
- const BOOL bCommentMod = aCommentEd.IsModified();
+ const sal_Bool bTitleMod = aTitleEd.IsModified();
+ const sal_Bool bThemeMod = aThemaEd.IsModified();
+ const sal_Bool bKeywordsMod = aKeywordsEd.IsModified();
+ const sal_Bool bCommentMod = aCommentEd.IsModified();
if( !( bTitleMod || bThemeMod || bKeywordsMod || bCommentMod ) )
{
- return FALSE;
+ return sal_False;
}
// Generating the output data
@@ -690,7 +690,7 @@ BOOL SfxDocumentDescPage::FillItemSet(SfxItemSet &rSet)
if ( pDlg )
pExSet = pDlg->GetExampleSet();
- if ( pExSet && SFX_ITEM_SET != pExSet->GetItemState( SID_DOCINFO, TRUE, &pItem ) )
+ if ( pExSet && SFX_ITEM_SET != pExSet->GetItemState( SID_DOCINFO, sal_True, &pItem ) )
pInfo = pInfoItem;
else if ( pItem )
pInfo = new SfxDocumentInfoItem( *(const SfxDocumentInfoItem *)pItem );
@@ -698,7 +698,7 @@ BOOL SfxDocumentDescPage::FillItemSet(SfxItemSet &rSet)
if ( !pInfo )
{
DBG_ERRORFILE( "SfxDocumentDescPage::FillItemSet(): no item found" );
- return FALSE;
+ return sal_False;
}
if( bTitleMod )
@@ -723,7 +723,7 @@ BOOL SfxDocumentDescPage::FillItemSet(SfxItemSet &rSet)
delete pInfo;
}
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
@@ -737,13 +737,13 @@ void SfxDocumentDescPage::Reset(const SfxItemSet &rSet)
aKeywordsEd.SetText( pInfoItem->getKeywords() );
aCommentEd.SetText( pInfoItem->getDescription() );
- SFX_ITEMSET_ARG( &rSet, pROItem, SfxBoolItem, SID_DOC_READONLY, FALSE );
+ SFX_ITEMSET_ARG( &rSet, pROItem, SfxBoolItem, SID_DOC_READONLY, sal_False );
if ( pROItem && pROItem->GetValue() )
{
- aTitleEd.SetReadOnly( TRUE );
- aThemaEd.SetReadOnly( TRUE );
- aKeywordsEd.SetReadOnly( TRUE );
- aCommentEd.SetReadOnly( TRUE );
+ aTitleEd.SetReadOnly( sal_True );
+ aThemaEd.SetReadOnly( sal_True );
+ aKeywordsEd.SetReadOnly( sal_True );
+ aCommentEd.SetReadOnly( sal_True );
}
}
@@ -824,10 +824,11 @@ SfxDocumentPage::SfxDocumentPage( Window* pParent, const SfxItemSet& rItemSet )
aUnknownSize ( SfxResId( STR_UNKNOWNSIZE ) ),
aMultiSignedStr ( SfxResId( STR_MULTSIGNED ) ),
- bEnableUseUserData ( FALSE ),
- bHandleDelete ( FALSE )
+ bEnableUseUserData ( sal_False ),
+ bHandleDelete ( sal_False )
{
+ aNameED.SetAccessibleName(String(SfxResId(EDIT_FILE_NAME)));
FreeResource();
ImplUpdateSignatures();
@@ -891,7 +892,7 @@ IMPL_LINK( SfxDocumentPage, DeleteHdl, PushButton*, EMPTYARG )
const Time aTime( 0 );
aTimeLogValFt.SetText( aLocaleWrapper.getDuration( aTime ) );
aDocNoValFt.SetText( '1' );
- bHandleDelete = TRUE;
+ bHandleDelete = sal_True;
return 0;
}
@@ -954,16 +955,16 @@ SfxTabPage* SfxDocumentPage::Create( Window* pParent, const SfxItemSet& rItemSet
void SfxDocumentPage::EnableUseUserData()
{
- bEnableUseUserData = TRUE;
+ bEnableUseUserData = sal_True;
aUseUserDataCB.Show();
aDeleteBtn.Show();
}
//------------------------------------------------------------------------
-BOOL SfxDocumentPage::FillItemSet( SfxItemSet& rSet )
+sal_Bool SfxDocumentPage::FillItemSet( SfxItemSet& rSet )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( !bHandleDelete && bEnableUseUserData &&
aUseUserDataCB.GetState() != aUseUserDataCB.GetSavedValue() &&
@@ -972,13 +973,13 @@ BOOL SfxDocumentPage::FillItemSet( SfxItemSet& rSet )
const SfxItemSet* pExpSet = GetTabDialog()->GetExampleSet();
const SfxPoolItem* pItem;
- if ( pExpSet && SFX_ITEM_SET == pExpSet->GetItemState( SID_DOCINFO, TRUE, &pItem ) )
+ if ( pExpSet && SFX_ITEM_SET == pExpSet->GetItemState( SID_DOCINFO, sal_True, &pItem ) )
{
SfxDocumentInfoItem* pInfoItem = (SfxDocumentInfoItem*)pItem;
- BOOL bUseData = ( STATE_CHECK == aUseUserDataCB.GetState() );
+ sal_Bool bUseData = ( STATE_CHECK == aUseUserDataCB.GetState() );
pInfoItem->SetUseUserData( bUseData );
rSet.Put( SfxDocumentInfoItem( *pInfoItem ) );
- bRet = TRUE;
+ bRet = sal_True;
}
}
@@ -986,10 +987,10 @@ BOOL SfxDocumentPage::FillItemSet( SfxItemSet& rSet )
{
const SfxItemSet* pExpSet = GetTabDialog()->GetExampleSet();
const SfxPoolItem* pItem;
- if ( pExpSet && SFX_ITEM_SET == pExpSet->GetItemState( SID_DOCINFO, TRUE, &pItem ) )
+ if ( pExpSet && SFX_ITEM_SET == pExpSet->GetItemState( SID_DOCINFO, sal_True, &pItem ) )
{
SfxDocumentInfoItem* pInfoItem = (SfxDocumentInfoItem*)pItem;
- BOOL bUseAuthor = bEnableUseUserData && aUseUserDataCB.IsChecked();
+ sal_Bool bUseAuthor = bEnableUseUserData && aUseUserDataCB.IsChecked();
SfxDocumentInfoItem newItem( *pInfoItem );
newItem.resetUserData( bUseAuthor
? SvtUserOptions().GetFullName()
@@ -997,22 +998,22 @@ BOOL SfxDocumentPage::FillItemSet( SfxItemSet& rSet )
pInfoItem->SetUseUserData( STATE_CHECK == aUseUserDataCB.GetState() );
newItem.SetUseUserData( STATE_CHECK == aUseUserDataCB.GetState() );
- newItem.SetDeleteUserData( TRUE );
+ newItem.SetDeleteUserData( sal_True );
rSet.Put( newItem );
- bRet = TRUE;
+ bRet = sal_True;
}
}
if ( aNameED.IsModified() && aNameED.GetText().Len() )
{
rSet.Put( SfxStringItem( ID_FILETP_TITLE, aNameED.GetText() ) );
- bRet = TRUE;
+ bRet = sal_True;
}
- if ( /* aReadOnlyCB.IsModified() */ TRUE )
+ if ( /* aReadOnlyCB.IsModified() */ sal_True )
{
rSet.Put( SfxBoolItem( ID_FILETP_READONLY, aReadOnlyCB.IsChecked() ) );
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -1042,7 +1043,7 @@ void SfxDocumentPage::Reset( const SfxItemSet& rSet )
String aFactory( aFile );
if ( aFile.Len() > 2 && aFile.GetChar(0) == '[' )
{
- USHORT nPos = aFile.Search( ']' );
+ sal_uInt16 nPos = aFile.Search( ']' );
aFactory = aFile.Copy( 1, nPos-1 );
aFile = aFile.Copy( nPos+1 );
}
@@ -1050,13 +1051,13 @@ void SfxDocumentPage::Reset( const SfxItemSet& rSet )
// determine name
String aName;
const SfxPoolItem* pItem = 0;
- if ( SFX_ITEM_SET != rSet.GetItemState( ID_FILETP_TITLE, FALSE, &pItem ) )
+ if ( SFX_ITEM_SET != rSet.GetItemState( ID_FILETP_TITLE, sal_False, &pItem ) )
{
INetURLObject aURL(aFile);
aName = aURL.GetName( INetURLObject::DECODE_WITH_CHARSET );
if ( !aName.Len() || aURL.GetProtocol() == INET_PROT_PRIVATE )
aName = String( SfxResId( STR_NONAME ) );
- aNameED.SetReadOnly( TRUE );
+ aNameED.SetReadOnly( sal_True );
}
else
{
@@ -1067,7 +1068,7 @@ void SfxDocumentPage::Reset( const SfxItemSet& rSet )
aNameED.ClearModifyFlag();
// determine RO-Flag
- if ( SFX_ITEM_UNKNOWN == rSet.GetItemState( ID_FILETP_READONLY, FALSE, &pItem )
+ if ( SFX_ITEM_UNKNOWN == rSet.GetItemState( ID_FILETP_READONLY, sal_False, &pItem )
|| !pItem )
aReadOnlyCB.Hide();
else
@@ -1078,7 +1079,7 @@ void SfxDocumentPage::Reset( const SfxItemSet& rSet )
aURL.SetSmartProtocol( INET_PROT_FILE );
aURL.SetSmartURL( aFactory);
const String& rMainURL = aURL.GetMainURL( INetURLObject::NO_DECODE );
- aBmp1.SetImage( SvFileInformationManager::GetImage( aURL, TRUE ) );
+ aBmp1.SetImage( SvFileInformationManager::GetImage( aURL, sal_True ) );
// determine size and type
String aSizeText( aUnknownSize );
@@ -1131,12 +1132,12 @@ void SfxDocumentPage::Reset( const SfxItemSet& rSet )
TriState eState = (TriState)m_bUseUserData;
if ( STATE_DONTKNOW == eState )
- aUseUserDataCB.EnableTriState( TRUE );
+ aUseUserDataCB.EnableTriState( sal_True );
aUseUserDataCB.SetState( eState );
aUseUserDataCB.SaveValue();
aUseUserDataCB.Enable( bEnableUseUserData );
- bHandleDelete = FALSE;
+ bHandleDelete = sal_False;
aDeleteBtn.Enable( bEnableUseUserData );
}
@@ -1219,30 +1220,30 @@ void SfxInternetPage::ChangeState( STATE eNewState )
switch( eState )
{
case S_Init:
- EnableNoUpdate( TRUE );
- EnableReload( FALSE );
- EnableForward( FALSE );
+ EnableNoUpdate( sal_True );
+ EnableReload( sal_False );
+ EnableForward( sal_False );
break;
case S_NoUpdate:
- EnableNoUpdate( FALSE );
+ EnableNoUpdate( sal_False );
if( eNewState == S_Reload )
- EnableReload( TRUE );
+ EnableReload( sal_True );
else
- EnableForward( TRUE );
+ EnableForward( sal_True );
break;
case S_Reload:
- EnableReload( FALSE );
+ EnableReload( sal_False );
if( eNewState == S_NoUpdate )
- EnableNoUpdate( TRUE );
+ EnableNoUpdate( sal_True );
else
- EnableForward( TRUE );
+ EnableForward( sal_True );
break;
case S_Forward:
- EnableForward( FALSE );
+ EnableForward( sal_False );
if( eNewState == S_NoUpdate )
- EnableNoUpdate( TRUE );
+ EnableNoUpdate( sal_True );
else
- EnableReload( TRUE );
+ EnableReload( sal_True );
break;
default:
OSL_FAIL( "*SfxInternetPage::SetState(): unhandled state!" );
@@ -1253,7 +1254,7 @@ void SfxInternetPage::ChangeState( STATE eNewState )
//------------------------------------------------------------------------
-void SfxInternetPage::EnableNoUpdate( BOOL bEnable )
+void SfxInternetPage::EnableNoUpdate( sal_Bool bEnable )
{
if( bEnable )
aRBNoAutoUpdate.Check();
@@ -1261,7 +1262,7 @@ void SfxInternetPage::EnableNoUpdate( BOOL bEnable )
//------------------------------------------------------------------------
-void SfxInternetPage::EnableReload( BOOL bEnable )
+void SfxInternetPage::EnableReload( sal_Bool bEnable )
{
aFTEvery.Enable( bEnable );
aNFReload.Enable( bEnable );
@@ -1273,7 +1274,7 @@ void SfxInternetPage::EnableReload( BOOL bEnable )
//------------------------------------------------------------------------
-void SfxInternetPage::EnableForward( BOOL bEnable )
+void SfxInternetPage::EnableForward( sal_Bool bEnable )
{
aFTAfter.Enable( bEnable );
aNFAfter.Enable( bEnable );
@@ -1341,7 +1342,7 @@ IMPL_LINK( SfxInternetPage, DialogClosedHdl, sfx2::FileDialogHelper*, EMPTYARG )
//------------------------------------------------------------------------
-BOOL SfxInternetPage::FillItemSet( SfxItemSet& rSet )
+sal_Bool SfxInternetPage::FillItemSet( SfxItemSet& rSet )
{
const SfxPoolItem* pItem = NULL;
SfxDocumentInfoItem* pInfo = NULL;
@@ -1351,7 +1352,7 @@ BOOL SfxInternetPage::FillItemSet( SfxItemSet& rSet )
if( pDlg )
pExSet = pDlg->GetExampleSet();
- if( pExSet && SFX_ITEM_SET != pExSet->GetItemState( SID_DOCINFO, TRUE, &pItem ) )
+ if( pExSet && SFX_ITEM_SET != pExSet->GetItemState( SID_DOCINFO, sal_True, &pItem ) )
pInfo = pInfoItem;
else if ( pItem )
pInfo = new SfxDocumentInfoItem( *(const SfxDocumentInfoItem*)pItem );
@@ -1359,33 +1360,33 @@ BOOL SfxInternetPage::FillItemSet( SfxItemSet& rSet )
if ( !pInfo )
{
DBG_ERRORFILE( "SfxInternetPage::FillItemSet(): no item found" );
- return FALSE;
+ return sal_False;
}
DBG_ASSERT( eState != S_Init, "*SfxInternetPage::FillItemSet(): state init is not acceptable at this point!" );
- BOOL bEnableReload = FALSE;
+ sal_Bool bEnableReload = sal_False;
::std::auto_ptr< String > aURL( NULL );
::std::auto_ptr< String > aFrame( NULL );
- ULONG nDelay = 0;
+ sal_uIntPtr nDelay = 0;
switch( eState )
{
case S_NoUpdate:
break;
case S_Reload:
- bEnableReload = TRUE;
+ bEnableReload = sal_True;
aURL = ::std::auto_ptr< String >( new String() );
aFrame = ::std::auto_ptr< String >( new String() );
- nDelay = static_cast<ULONG>(aNFReload.GetValue());
+ nDelay = static_cast<sal_uIntPtr>(aNFReload.GetValue());
break;
case S_Forward:
DBG_ASSERT( aEDForwardURL.GetText().Len(), "+SfxInternetPage::FillItemSet(): empty URL should be not possible for forward option!" );
- bEnableReload = TRUE;
+ bEnableReload = sal_True;
aURL = ::std::auto_ptr< String >( new String( URIHelper::SmartRel2Abs( INetURLObject(aBaseURL), aEDForwardURL.GetText(), URIHelper::GetMaybeFileHdl(), true ) ) );
aFrame = ::std::auto_ptr< String >( new String( aCBFrame.GetText() ) );
- nDelay = static_cast<ULONG>(aNFAfter.GetValue());
+ nDelay = static_cast<sal_uIntPtr>(aNFAfter.GetValue());
break;
default:
break;
@@ -1403,7 +1404,7 @@ BOOL SfxInternetPage::FillItemSet( SfxItemSet& rSet )
rSet.Put( *pInfo );
if( pInfo != pInfoItem )
delete pInfo;
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
@@ -1418,7 +1419,7 @@ SfxTabPage *SfxInternetPage::Create( Window* pParent, const SfxItemSet& rItemSet
void SfxInternetPage::Reset( const SfxItemSet& rSet )
{
pInfoItem = &( SfxDocumentInfoItem& ) rSet.Get( SID_DOCINFO );
- SFX_ITEMSET_ARG( &rSet, pURLItem, SfxStringItem, SID_BASEURL, FALSE );
+ SFX_ITEMSET_ARG( &rSet, pURLItem, SfxStringItem, SID_BASEURL, sal_False );
DBG_ASSERT( pURLItem, "No BaseURL provided for InternetTabPage!" );
if ( pURLItem )
aBaseURL = pURLItem->GetValue();
@@ -1445,7 +1446,7 @@ void SfxInternetPage::Reset( const SfxItemSet& rSet )
ChangeState( eNewState );
- SFX_ITEMSET_ARG( &rSet, pROItem, SfxBoolItem, SID_DOC_READONLY, FALSE );
+ SFX_ITEMSET_ARG( &rSet, pROItem, SfxBoolItem, SID_DOC_READONLY, sal_False );
if ( pROItem && pROItem->GetValue() )
{
aRBNoAutoUpdate.Disable();
@@ -1496,7 +1497,7 @@ SfxDocumentInfoDialog::SfxDocumentInfoDialog( Window* pParent,
&(const SfxDocumentInfoItem &)rItemSet.Get( SID_DOCINFO );
#ifdef DBG_UTIL
- SFX_ITEMSET_ARG( &rItemSet, pURLItem, SfxStringItem, SID_BASEURL, FALSE );
+ SFX_ITEMSET_ARG( &rItemSet, pURLItem, SfxStringItem, SID_BASEURL, sal_False );
DBG_ASSERT( pURLItem, "No BaseURL provided for InternetTabPage!" );
#endif
@@ -1504,23 +1505,10 @@ SfxDocumentInfoDialog::SfxDocumentInfoDialog( Window* pParent,
const SfxPoolItem* pItem = 0;
String aTitle( GetText() );
if ( SFX_ITEM_SET !=
- rItemSet.GetItemState( SID_EXPLORER_PROPS_START, FALSE, &pItem ) )
+ rItemSet.GetItemState( SID_EXPLORER_PROPS_START, sal_False, &pItem ) )
{
// File name
String aFile( pInfoItem->GetValue() );
-#ifdef WIN
- if ( aFile.Len() <= 8 )
- {
- String sTmp( SfxResId( STR_NONAME ) );
- USHORT nLen = Min( (USHORT)8, sTmp.Len() );
-
- if ( sTmp.Copy( 0, nLen ).Lower() ==
- aFile.Copy( 0, nLen ).Lower() )
- {
- aFile = pInfoItem->GetValue();
- }
- }
-#endif
INetURLObject aURL;
aURL.SetSmartProtocol( INET_PROT_FILE );
@@ -1554,7 +1542,7 @@ SfxDocumentInfoDialog::SfxDocumentInfoDialog( Window* pParent,
// -----------------------------------------------------------------------
-void SfxDocumentInfoDialog::PageCreated( USHORT nId, SfxTabPage &rPage )
+void SfxDocumentInfoDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
{
if ( TP_DOCINFODOC == nId )
( (SfxDocumentPage&)rPage ).EnableUseUserData();
@@ -1792,6 +1780,11 @@ CustomPropertiesWindow::CustomPropertiesWindow( Window* pParent, const ResId& rR
m_aEditLoseFocusTimer.SetTimeoutHdl( LINK( this, CustomPropertiesWindow, EditTimeoutHdl ) );
m_aBoxLoseFocusTimer.SetTimeout( 300 );
m_aBoxLoseFocusTimer.SetTimeoutHdl( LINK( this, CustomPropertiesWindow, BoxTimeoutHdl ) );
+
+ ResMgr* pResMgr = rResId.GetResMgr();
+ m_aNameBox.SetAccessibleName( String( ResId( STR_HEADER_NAME, *pResMgr ) ) );
+ m_aTypeBox.SetAccessibleName( String( ResId( STR_HEADER_TYPE, *pResMgr ) ) );
+ m_aValueEdit.SetAccessibleName( String( ResId( STR_HEADER_VALUE, *pResMgr ) ) );
}
CustomPropertiesWindow::~CustomPropertiesWindow()
@@ -1923,7 +1916,7 @@ bool CustomPropertiesWindow::IsLineValid( CustomPropertyLine* pLine ) const
{
sal_uInt32 nTemp = nIndex;
bIsValid = const_cast< SvNumberFormatter& >(
- m_aNumberFormatter ).IsNumberFormat( sValue, nIndex, fDummy ) != FALSE;
+ m_aNumberFormatter ).IsNumberFormat( sValue, nIndex, fDummy ) != sal_False;
if ( bIsValid && nTemp != nIndex )
// sValue is a number but the format doesn't match the index
bIsValid = false;
@@ -1974,7 +1967,7 @@ void CustomPropertiesWindow::InitControls( HeaderBar* pHeaderBar, const ScrollBa
Window* pWindows[] = { &m_aNameBox, &m_aTypeBox, &m_aValueEdit, &m_aRemoveButton, NULL };
Window** pCurrent = pWindows;
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
while ( *pCurrent )
{
Rectangle aRect = pHeaderBar->GetItemRect( pHeaderBar->GetItemId( nPos++ ) );
@@ -2015,9 +2008,9 @@ void CustomPropertiesWindow::InitControls( HeaderBar* pHeaderBar, const ScrollBa
( m_aRemoveButton.GetPosPixel().Y() * 2 ) + m_aRemoveButton.GetSizePixel().Height();
}
-USHORT CustomPropertiesWindow::GetVisibleLineCount() const
+sal_uInt16 CustomPropertiesWindow::GetVisibleLineCount() const
{
- USHORT nCount = 0;
+ sal_uInt16 nCount = 0;
std::vector< CustomPropertyLine* >::const_iterator pIter;
for ( pIter = m_aCustomPropertiesLines.begin();
pIter != m_aCustomPropertiesLines.end(); ++pIter )
@@ -2038,6 +2031,11 @@ void CustomPropertiesWindow::AddLine( const ::rtl::OUString& sName, Any& rAny )
//add lose focus handlers of date/time fields
pNewLine->m_aTypeBox.SetLoseFocusHdl( LINK( this, CustomPropertiesWindow, BoxLoseFocusHdl ) );
+
+ pNewLine->m_aNameBox.SetAccessibleName(m_aNameBox.GetAccessibleName());
+ pNewLine->m_aTypeBox.SetAccessibleName(m_aTypeBox.GetAccessibleName());
+ pNewLine->m_aValueEdit.SetAccessibleName(m_aValueEdit.GetAccessibleName());
+
long nPos = GetVisibleLineCount() * GetLineHeight();
m_aCustomPropertiesLines.push_back( pNewLine );
Window* pWindows[] = { &m_aNameBox, &m_aTypeBox, &m_aValueEdit,
@@ -2228,7 +2226,7 @@ Sequence< beans::PropertyValue > CustomPropertiesWindow::GetCustomProperties() c
double nValue = 0;
sal_uInt32 nIndex = const_cast< SvNumberFormatter& >(
m_aNumberFormatter ).GetFormatIndex( NF_NUMBER_SYSTEM );
- BOOL bIsNum = const_cast< SvNumberFormatter& >( m_aNumberFormatter ).
+ sal_Bool bIsNum = const_cast< SvNumberFormatter& >( m_aNumberFormatter ).
IsNumberFormat( pLine->m_aValueEdit.GetText(), nIndex, nValue );
if ( bIsNum )
aPropertiesSeq[i].Value <<= makeAny( nValue );
@@ -2357,9 +2355,9 @@ void CustomPropertiesControl::AddLine( const ::rtl::OUString& sName, Any& rAny,
SfxCustomPropertiesPage::SfxCustomPropertiesPage( Window* pParent, const SfxItemSet& rItemSet ) :
SfxTabPage( pParent, SfxResId( TP_CUSTOMPROPERTIES ), rItemSet ),
- m_aPropertiesFT ( this, SfxResId( FT_PROPERTIES ) ),
m_aPropertiesCtrl ( this, SfxResId( CTRL_PROPERTIES ) ),
- m_aAddBtn ( this, SfxResId( BTN_ADD ) )
+ m_aAddBtn ( this, SfxResId( BTN_ADD ) ),
+ m_aPropertiesFT ( this, SfxResId( FT_PROPERTIES ) )
{
FreeResource();
@@ -2374,9 +2372,9 @@ IMPL_LINK( SfxCustomPropertiesPage, AddHdl, PushButton*, EMPTYARG )
return 0;
}
-BOOL SfxCustomPropertiesPage::FillItemSet( SfxItemSet& rSet )
+sal_Bool SfxCustomPropertiesPage::FillItemSet( SfxItemSet& rSet )
{
- BOOL bModified = FALSE;
+ sal_Bool bModified = sal_False;
const SfxPoolItem* pItem = NULL;
SfxDocumentInfoItem* pInfo = NULL;
bool bMustDelete = false;
@@ -2384,7 +2382,7 @@ BOOL SfxCustomPropertiesPage::FillItemSet( SfxItemSet& rSet )
if ( GetTabDialog() && GetTabDialog()->GetExampleSet() )
{
if( SFX_ITEM_SET !=
- GetTabDialog()->GetExampleSet()->GetItemState( SID_DOCINFO, TRUE, &pItem ) )
+ GetTabDialog()->GetExampleSet()->GetItemState( SID_DOCINFO, sal_True, &pItem ) )
pInfo = &( SfxDocumentInfoItem& )rSet.Get( SID_DOCINFO );
else
{
@@ -2405,7 +2403,7 @@ BOOL SfxCustomPropertiesPage::FillItemSet( SfxItemSet& rSet )
}
}
- bModified = TRUE; //!!!
+ bModified = sal_True; //!!!
if ( bModified )
rSet.Put( *pInfo );
if ( bMustDelete )
diff --git a/sfx2/source/dialog/dinfdlg.hrc b/sfx2/source/dialog/dinfdlg.hrc
index 5453e3606026..43bd848844a0 100644..100755
--- a/sfx2/source/dialog/dinfdlg.hrc
+++ b/sfx2/source/dialog/dinfdlg.hrc
@@ -153,6 +153,10 @@
#define STR_HEADER_VALUE 92
#define STR_HEADER_ACTION 93
+//IAccessibility2 Implementation 2009-----
+#define EDIT_FILE_NAME 94
+//-----IAccessibility2 Implementation 2009
+
#define PB_OK 100
#define PB_CANCEL 101
#define PB_HELP 102
diff --git a/sfx2/source/dialog/dinfdlg.src b/sfx2/source/dialog/dinfdlg.src
index ddc76d54ce19..fdaa47543a2a 100755
--- a/sfx2/source/dialog/dinfdlg.src
+++ b/sfx2/source/dialog/dinfdlg.src
@@ -53,6 +53,7 @@ TabPage TP_DOCINFODESC
};
Edit ED_TITLE
{
+ HelpID = "sfx2:Edit:TP_DOCINFODESC:ED_TITLE";
Border = TRUE ;
Pos = MAP_APPFONT ( 70 , 6 ) ;
Size = MAP_APPFONT ( 184 , RSC_CD_TEXTBOX_HEIGHT ) ;
@@ -68,6 +69,7 @@ TabPage TP_DOCINFODESC
};
Edit ED_THEMA
{
+ HelpID = "sfx2:Edit:TP_DOCINFODESC:ED_THEMA";
Border = TRUE ;
Pos = MAP_APPFONT ( 70 , 21 ) ;
Size = MAP_APPFONT ( 184 , RSC_CD_TEXTBOX_HEIGHT ) ;
@@ -83,6 +85,7 @@ TabPage TP_DOCINFODESC
};
Edit ED_KEYWORDS
{
+ HelpID = "sfx2:Edit:TP_DOCINFODESC:ED_KEYWORDS";
Border = TRUE ;
Pos = MAP_APPFONT ( 70 , 36 ) ;
Size = MAP_APPFONT ( 184 , RSC_CD_TEXTBOX_HEIGHT ) ;
@@ -98,6 +101,7 @@ TabPage TP_DOCINFODESC
};
MultiLineEdit ED_COMMENT
{
+ HelpID = "sfx2:MultiLineEdit:TP_DOCINFODESC:ED_COMMENT";
Border = TRUE ;
Pos = MAP_APPFONT ( 70 , 51 ) ;
Size = MAP_APPFONT ( 184 , 128 ) ;
@@ -121,6 +125,7 @@ TabPage TP_DOCINFODOC
};
Edit ED_FILE_NAME
{
+ HelpID = "sfx2:Edit:TP_DOCINFODOC:ED_FILE_NAME";
Pos = MAP_APPFONT ( 54 , 12 ) ;
Size = MAP_APPFONT ( 200 , RSC_CD_TEXTBOX_HEIGHT ) ;
Border = TRUE ;
@@ -138,11 +143,13 @@ TabPage TP_DOCINFODOC
};
Edit FT_FILE_SHOW_TYP
{
+ HelpID = "sfx2:Edit:TP_DOCINFODOC:FT_FILE_SHOW_TYP";
Pos = MAP_APPFONT ( 78 , 37 ) ;
Size = MAP_APPFONT ( 106 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
};
CheckBox CB_FILE_READONLY
{
+ HelpID = "sfx2:CheckBox:TP_DOCINFODOC:CB_FILE_READONLY";
Pos = MAP_APPFONT ( 163 , 37 ) ;
Size = MAP_APPFONT ( 91 , RSC_CD_CHECKBOX_HEIGHT ) ;
Text [ en-US ] = "~Read-only" ;
@@ -155,6 +162,7 @@ TabPage TP_DOCINFODOC
};
Edit FT_FILE_VAL
{
+ HelpID = "sfx2:Edit:TP_DOCINFODOC:FT_FILE_VAL";
Pos = MAP_APPFONT ( 78 , 49 ) ;
Size = MAP_APPFONT ( 176 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
};
@@ -166,6 +174,7 @@ TabPage TP_DOCINFODOC
};
Edit FT_FILE_SHOW_SIZE
{
+ HelpID = "sfx2:Edit:TP_DOCINFODOC:FT_FILE_SHOW_SIZE";
Pos = MAP_APPFONT ( 78 , 61 ) ;
Size = MAP_APPFONT ( 176 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
};
@@ -182,6 +191,7 @@ TabPage TP_DOCINFODOC
};
Edit FT_CREATE_VAL
{
+ HelpID = "sfx2:Edit:TP_DOCINFODOC:FT_CREATE_VAL";
Pos = MAP_APPFONT ( 78 , 80 ) ;
Size = MAP_APPFONT ( 176 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
};
@@ -193,6 +203,7 @@ TabPage TP_DOCINFODOC
};
Edit FT_CHANGE_VAL
{
+ HelpID = "sfx2:Edit:TP_DOCINFODOC:FT_CHANGE_VAL";
Pos = MAP_APPFONT ( 78 , 92 ) ;
Size = MAP_APPFONT ( 176 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
};
@@ -204,11 +215,13 @@ TabPage TP_DOCINFODOC
};
Edit FT_SIGNED_VAL
{
+ HelpID = "sfx2:Edit:TP_DOCINFODOC:FT_SIGNED_VAL";
Pos = MAP_APPFONT ( 78 , 104 ) ;
Size = MAP_APPFONT ( 123 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
};
PushButton BTN_SIGNATURE
{
+ HelpID = "sfx2:PushButton:TP_DOCINFODOC:BTN_SIGNATURE";
Pos = MAP_APPFONT ( 204 , 101 ) ;
Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ;
Text [ en-US ] = "Digital Signature...";
@@ -225,6 +238,7 @@ TabPage TP_DOCINFODOC
};
Edit FT_PRINT_VAL
{
+ HelpID = "sfx2:Edit:TP_DOCINFODOC:FT_PRINT_VAL";
Pos = MAP_APPFONT ( 78 , 116 ) ;
Size = MAP_APPFONT ( 176 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
};
@@ -236,6 +250,7 @@ TabPage TP_DOCINFODOC
};
Edit FT_TIMELOG_VAL
{
+ HelpID = "sfx2:Edit:TP_DOCINFODOC:FT_TIMELOG_VAL";
Pos = MAP_APPFONT ( 78 , 128 ) ;
Size = MAP_APPFONT ( 30 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
};
@@ -247,11 +262,13 @@ TabPage TP_DOCINFODOC
};
Edit FT_DOCNO_VAL
{
+ HelpID = "sfx2:Edit:TP_DOCINFODOC:FT_DOCNO_VAL";
Pos = MAP_APPFONT ( 78 , 140 ) ;
Size = MAP_APPFONT ( 30 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
};
PushButton BTN_DELETE
{
+ HelpID = "sfx2:PushButton:TP_DOCINFODOC:BTN_DELETE";
Pos = MAP_APPFONT ( 204 , 150 ) ;
Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ;
Hide = TRUE;
@@ -259,6 +276,7 @@ TabPage TP_DOCINFODOC
};
CheckBox CB_USE_USERDATA
{
+ HelpID = "sfx2:CheckBox:TP_DOCINFODOC:CB_USE_USERDATA";
Pos = MAP_APPFONT ( 6 , 152 ) ;
Size = MAP_APPFONT ( 192 , RSC_CD_CHECKBOX_HEIGHT ) ;
Hide = TRUE;
@@ -277,6 +295,7 @@ TabPage TP_DOCINFODOC
};
Edit FT_TEMPL_VAL
{
+ HelpID = "sfx2:Edit:TP_DOCINFODOC:FT_TEMPL_VAL";
Pos = MAP_APPFONT ( 78 , 172 ) ;
Size = MAP_APPFONT ( 180 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
};
@@ -284,6 +303,10 @@ TabPage TP_DOCINFODOC
{
Text [ en-US ] = "unknown" ;
};
+ String EDIT_FILE_NAME
+ {
+ Text [ en-US ] = "File Name" ;
+ };
};
// TP_DOCINFOUSER --------------------------------------------------------
@@ -301,6 +324,7 @@ TabPage TP_DOCINFOUSER
};
Edit ED_INFO1
{
+ HelpID = "sfx2:Edit:TP_DOCINFOUSER:ED_INFO1";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 17 ) ;
Size = MAP_APPFONT ( 248 , RSC_CD_TEXTBOX_HEIGHT ) ;
@@ -314,6 +338,7 @@ TabPage TP_DOCINFOUSER
};
Edit ED_INFO2
{
+ HelpID = "sfx2:Edit:TP_DOCINFOUSER:ED_INFO2";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 43 ) ;
Size = MAP_APPFONT ( 248 , RSC_CD_TEXTBOX_HEIGHT ) ;
@@ -327,6 +352,7 @@ TabPage TP_DOCINFOUSER
};
Edit ED_INFO3
{
+ HelpID = "sfx2:Edit:TP_DOCINFOUSER:ED_INFO3";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 69 ) ;
Size = MAP_APPFONT ( 248 , RSC_CD_TEXTBOX_HEIGHT ) ;
@@ -340,6 +366,7 @@ TabPage TP_DOCINFOUSER
};
Edit ED_INFO4
{
+ HelpID = "sfx2:Edit:TP_DOCINFOUSER:ED_INFO4";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 95 ) ;
Size = MAP_APPFONT ( 248 , RSC_CD_TEXTBOX_HEIGHT ) ;
@@ -347,6 +374,7 @@ TabPage TP_DOCINFOUSER
};
PushButton BTN_EDITLABEL
{
+ HelpID = "sfx2:PushButton:TP_DOCINFOUSER:BTN_EDITLABEL";
Pos = MAP_APPFONT ( 194 , 165 ) ;
Size = MAP_APPFONT ( 60 , RSC_CD_PUSHBUTTON_HEIGHT ) ;
Text [ en-US ] = "~Info fields..." ;
@@ -362,6 +390,7 @@ TabPage TP_DOCINFORELOAD
Size = MAP_APPFONT ( 260 , 185 ) ;
RadioButton RB_NOAUTOUPDATE
{
+ HelpID = "sfx2:RadioButton:TP_DOCINFORELOAD:RB_NOAUTOUPDATE";
TabStop = TRUE ;
Pos = MAP_APPFONT( COL_0 , ROW_0 ) ;
Size = MAP_APPFONT( COL_7 - COL_1 , RSC_CD_RADIOBUTTON_HEIGHT ) ;
@@ -370,6 +399,7 @@ TabPage TP_DOCINFORELOAD
RadioButton RB_RELOADUPDATE
{
+ HelpID = "sfx2:RadioButton:TP_DOCINFORELOAD:RB_RELOADUPDATE";
TabStop = TRUE ;
Pos = MAP_APPFONT( COL_0, ROW_1 ) ;
Size = MAP_APPFONT( COL_7 - COL_1, RSC_CD_RADIOBUTTON_HEIGHT ) ;
@@ -383,6 +413,7 @@ TabPage TP_DOCINFORELOAD
};
NumericField ED_RELOAD
{
+ HelpID = "sfx2:NumericField:TP_DOCINFORELOAD:ED_RELOAD";
Border = TRUE ;
Pos = MAP_APPFONT ( COL_2 , ROW_2 - ROWDIFF_FT_EDTFLD ) ;
Size = MAP_APPFONT ( WIDTH_2 , RSC_CD_TEXTBOX_HEIGHT ) ;
@@ -403,6 +434,7 @@ TabPage TP_DOCINFORELOAD
RadioButton RB_FORWARDUPDATE
{
+ HelpID = "sfx2:RadioButton:TP_DOCINFORELOAD:RB_FORWARDUPDATE";
TabStop = TRUE ;
Pos = MAP_APPFONT( COL_0, ROW_3 ) ;
Size = MAP_APPFONT( COL_7 - COL_1, RSC_CD_RADIOBUTTON_HEIGHT ) ;
@@ -416,6 +448,7 @@ TabPage TP_DOCINFORELOAD
};
NumericField ED_FORWARD
{
+ HelpID = "sfx2:NumericField:TP_DOCINFORELOAD:ED_FORWARD";
Border = TRUE ;
Pos = MAP_APPFONT ( COL_2 , ROW_4 - ROWDIFF_FT_EDTFLD ) ;
Size = MAP_APPFONT ( WIDTH_2 , RSC_CD_TEXTBOX_HEIGHT ) ;
@@ -441,12 +474,14 @@ TabPage TP_DOCINFORELOAD
};
Edit ED_URL
{
+ HelpID = "sfx2:Edit:TP_DOCINFORELOAD:ED_URL";
Border = TRUE ;
Pos = MAP_APPFONT ( COL_2 , ROW_5 - ROWDIFF_FT_EDTFLD ) ;
Size = MAP_APPFONT ( COL_5 - COL_2 , RSC_CD_TEXTBOX_HEIGHT ) ;
};
PushButton PB_BROWSEURL
{
+ HelpID = "sfx2:PushButton:TP_DOCINFORELOAD:PB_BROWSEURL";
Pos = MAP_APPFONT ( COL_6 , ROW_5 - ROWDIFF_FT_EDTFLD ) ;
Size = MAP_APPFONT ( COL_7 - COL_6 , RSC_CD_PUSHBUTTON_HEIGHT ) ;
Text = "..." ;
@@ -459,6 +494,7 @@ TabPage TP_DOCINFORELOAD
};
ComboBox CB_FRAME
{
+ HelpID = "sfx2:ComboBox:TP_DOCINFORELOAD:CB_FRAME";
Pos = MAP_APPFONT ( COL_2 , ROW_6 - ROWDIFF_FT_EDTFLD ) ;
Size = MAP_APPFONT ( COL_7 - COL_2 , RSC_CD_DROPDOWN_HEIGHT * 10 ) ;
DropDown = TRUE ;
@@ -524,6 +560,7 @@ TabPage TP_CUSTOMPROPERTIES
};
PushButton BTN_ADD
{
+ HelpID = "sfx2:PushButton:TP_CUSTOMPROPERTIES:BTN_ADD";
Pos = MAP_APPFONT( 204 , 165 );
Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
Text [ en-US ] = "~Add";
@@ -751,6 +788,7 @@ ModalDialog RID_EDIT_DURATIONS
};
CheckBox CB_NEGATIVE
{
+ HelpID = "sfx2:CheckBox:RID_EDIT_DURATIONS:CB_NEGATIVE";
Pos = MAP_APPFONT ( 6 , 21 ) ;
Size = MAP_APPFONT ( 60 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
Text [ en-US ] = "~Negative" ;
@@ -764,6 +802,7 @@ ModalDialog RID_EDIT_DURATIONS
};
NumericField ED_YEAR
{
+ HelpID = "sfx2:NumericField:RID_EDIT_DURATIONS:ED_YEAR";
Border = TRUE ;
Pos = MAP_APPFONT ( 70 , 36 ) ;
Size = MAP_APPFONT ( 40, RSC_CD_TEXTBOX_HEIGHT ) ;
@@ -784,6 +823,7 @@ ModalDialog RID_EDIT_DURATIONS
};
NumericField ED_MONTH
{
+ HelpID = "sfx2:NumericField:RID_EDIT_DURATIONS:ED_MONTH";
Border = TRUE ;
Pos = MAP_APPFONT ( 70 , 50 ) ;
Size = MAP_APPFONT ( 40, RSC_CD_TEXTBOX_HEIGHT ) ;
@@ -804,6 +844,7 @@ ModalDialog RID_EDIT_DURATIONS
};
NumericField ED_DAY
{
+ HelpID = "sfx2:NumericField:RID_EDIT_DURATIONS:ED_DAY";
Border = TRUE ;
Pos = MAP_APPFONT ( 70 , 64 ) ;
Size = MAP_APPFONT ( 40, RSC_CD_TEXTBOX_HEIGHT ) ;
@@ -824,6 +865,7 @@ ModalDialog RID_EDIT_DURATIONS
};
NumericField ED_HOUR
{
+ HelpID = "sfx2:NumericField:RID_EDIT_DURATIONS:ED_HOUR";
Border = TRUE ;
Pos = MAP_APPFONT ( 70 , 78 ) ;
Size = MAP_APPFONT ( 40, RSC_CD_TEXTBOX_HEIGHT ) ;
@@ -844,6 +886,7 @@ ModalDialog RID_EDIT_DURATIONS
};
NumericField ED_MINUTE
{
+ HelpID = "sfx2:NumericField:RID_EDIT_DURATIONS:ED_MINUTE";
Border = TRUE ;
Pos = MAP_APPFONT ( 70, 92) ;
Size = MAP_APPFONT ( 40, RSC_CD_TEXTBOX_HEIGHT ) ;
@@ -864,6 +907,7 @@ ModalDialog RID_EDIT_DURATIONS
};
NumericField ED_SECOND
{
+ HelpID = "sfx2:NumericField:RID_EDIT_DURATIONS:ED_SECOND";
Border = TRUE ;
Pos = MAP_APPFONT ( 70 , 106 ) ;
Size = MAP_APPFONT ( 40, RSC_CD_TEXTBOX_HEIGHT ) ;
@@ -884,6 +928,7 @@ ModalDialog RID_EDIT_DURATIONS
};
NumericField ED_MSECOND
{
+ HelpID = "sfx2:NumericField:RID_EDIT_DURATIONS:ED_MSECOND";
Border = TRUE ;
Pos = MAP_APPFONT ( 70 , 120 ) ;
Size = MAP_APPFONT ( 40, RSC_CD_TEXTBOX_HEIGHT ) ;
diff --git a/sfx2/source/dialog/dinfedt.cxx b/sfx2/source/dialog/dinfedt.cxx
index 7496b7929485..93ee933d48bf 100644..100755
--- a/sfx2/source/dialog/dinfedt.cxx
+++ b/sfx2/source/dialog/dinfedt.cxx
@@ -29,8 +29,8 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sfx2.hxx"
-#include "dinfedt.hxx"
-#include "sfxresid.hxx"
+#include "sfx2/dinfedt.hxx"
+#include "sfx2/sfxresid.hxx"
#include <sfx2/sfx.hrc>
#include "dinfedt.hrc"
diff --git a/sfx2/source/dialog/dinfedt.hrc b/sfx2/source/dialog/dinfedt.hrc
index ef52362af2cb..ef52362af2cb 100644..100755
--- a/sfx2/source/dialog/dinfedt.hrc
+++ b/sfx2/source/dialog/dinfedt.hrc
diff --git a/sfx2/source/dialog/dinfedt.src b/sfx2/source/dialog/dinfedt.src
index 7f4875487536..110dccf11c40 100644..100755
--- a/sfx2/source/dialog/dinfedt.src
+++ b/sfx2/source/dialog/dinfedt.src
@@ -45,24 +45,28 @@ ModalDialog DLG_DOCINFO_EDT
};
Edit ED_INFO1
{
+ HelpID = "sfx2:Edit:DLG_DOCINFO_EDT:ED_INFO1";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 86 , 12 ) ;
};
Edit ED_INFO2
{
+ HelpID = "sfx2:Edit:DLG_DOCINFO_EDT:ED_INFO2";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 29 ) ;
Size = MAP_APPFONT ( 86 , 12 ) ;
};
Edit ED_INFO3
{
+ HelpID = "sfx2:Edit:DLG_DOCINFO_EDT:ED_INFO3";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 44 ) ;
Size = MAP_APPFONT ( 86 , 12 ) ;
};
Edit ED_INFO4
{
+ HelpID = "sfx2:Edit:DLG_DOCINFO_EDT:ED_INFO4";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 59 ) ;
Size = MAP_APPFONT ( 86 , 12 ) ;
diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx
index 9260acc946e9..a2afa03773c6 100644..100755
--- a/sfx2/source/dialog/dockwin.cxx
+++ b/sfx2/source/dialog/dockwin.cxx
@@ -45,8 +45,9 @@
#include "workwin.hxx"
#include "splitwin.hxx"
#include <sfx2/viewsh.hxx>
-#include "sfxhelp.hxx"
+#include "sfx2/sfxhelp.hxx"
#include <sfx2/objsh.hxx>
+#include <sfx2/msgpool.hxx>
#include <com/sun/star/frame/XController.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
@@ -75,7 +76,7 @@ class SfxTitleDockingWindow;
class SfxTitleDockingWindow : public SfxDockingWindow
{
Window* m_pWrappedWindow;
- USHORT m_nID;
+ sal_uInt16 m_nID;
public:
SfxTitleDockingWindow(
@@ -83,7 +84,7 @@ public:
SfxChildWindow* pChildWin ,
Window* pParent ,
WinBits nBits,
- USHORT nID);
+ sal_uInt16 nID);
virtual ~SfxTitleDockingWindow();
Window* GetWrappedWindow() const { return m_pWrappedWindow; }
@@ -93,7 +94,7 @@ public:
virtual long Notify( NotifyEvent& rNEvt );
virtual void Resize();
virtual void Resizing( Size& rSize );
- virtual BOOL Close();
+ virtual sal_Bool Close();
};
namespace
@@ -135,7 +136,7 @@ static bool lcl_getWindowState( const uno::Reference< container::XNameAccess >&
}
SfxDockingWrapper::SfxDockingWrapper( Window* pParentWnd ,
- USHORT nId ,
+ sal_uInt16 nId ,
SfxBindings* pBindings ,
SfxChildWinInfo* pInfo )
: SfxChildWindow( pParentWnd , nId )
@@ -243,7 +244,7 @@ SfxDockingWrapper::SfxDockingWrapper( Window* pParentWnd ,
pWindow->SetOutputSizePixel( Size( 270, 240 ) );
( ( SfxDockingWindow* ) pWindow )->Initialize( pInfo );
- SetHideNotDelete( TRUE );
+ SetHideNotDelete( sal_True );
}
SfxChildWindow* SfxDockingWrapper::CreateImpl(
@@ -264,7 +265,7 @@ void SfxDockingWrapper::RegisterChildWindow (sal_Bool bVis, SfxModule *pMod, sal
// pre-register a couple of docking windows
for (int i=0; i < NUM_OF_DOCKINGWINDOWS; i++ )
{
- USHORT nID = USHORT(SID_DOCKWIN_START+i);
+ sal_uInt16 nID = sal_uInt16(SID_DOCKWIN_START+i);
SfxChildWinFactory *pFact = new SfxChildWinFactory( SfxDockingWrapper::CreateImpl, nID, 0xffff );
pFact->aInfo.nFlags |= nFlags;
pFact->aInfo.bVisible = bVis;
@@ -283,7 +284,7 @@ SfxTitleDockingWindow::SfxTitleDockingWindow( SfxBindings* pBind ,
SfxChildWindow* pChildWin ,
Window* pParent ,
WinBits nBits,
- USHORT nID ) :
+ sal_uInt16 nID ) :
SfxDockingWindow( pBind ,
pChildWin ,
pParent ,
@@ -343,7 +344,7 @@ void SfxTitleDockingWindow::Resizing( Size &rSize )
m_pWrappedWindow->SetSizePixel( GetOutputSizePixel() );
}
-BOOL SfxTitleDockingWindow::Close()
+sal_Bool SfxTitleDockingWindow::Close()
{
return SfxDockingWindow::Close();
}
@@ -353,9 +354,9 @@ namespace
struct ChildrenRegisteredMap : public rtl::Static< bool, ChildrenRegisteredMap > {};
}
-static bool lcl_checkDockingWindowID( USHORT nID )
+static bool lcl_checkDockingWindowID( sal_uInt16 nID )
{
- if (nID < SID_DOCKWIN_START || nID >= USHORT(SID_DOCKWIN_START+NUM_OF_DOCKINGWINDOWS))
+ if (nID < SID_DOCKWIN_START || nID >= sal_uInt16(SID_DOCKWIN_START+NUM_OF_DOCKINGWINDOWS))
return false;
else
return true;
@@ -393,7 +394,7 @@ static SfxWorkWindow* lcl_getWorkWindowFromXFrame( const uno::Reference< frame::
void SAL_CALL SfxDockingWindowFactory( const uno::Reference< frame::XFrame >& rFrame, const rtl::OUString& rDockingWindowName )
{
SolarMutexGuard aGuard;
- USHORT nID = USHORT(rDockingWindowName.toInt32());
+ sal_uInt16 nID = sal_uInt16(rDockingWindowName.toInt32());
// Check the range of the provided ID otherwise nothing will happen
if ( lcl_checkDockingWindowID( nID ))
@@ -420,7 +421,7 @@ bool SAL_CALL IsDockingWindowVisible( const uno::Reference< frame::XFrame >& rFr
{
SolarMutexGuard aGuard;
- USHORT nID = USHORT(rDockingWindowName.toInt32());
+ sal_uInt16 nID = sal_uInt16(rDockingWindowName.toInt32());
// Check the range of the provided ID otherwise nothing will happen
if ( lcl_checkDockingWindowID( nID ))
@@ -443,24 +444,24 @@ friend class SfxDockingWindow;
SfxChildAlignment eLastAlignment;
SfxChildAlignment eDockAlignment;
- BOOL bConstructed;
+ sal_Bool bConstructed;
Size aMinSize;
SfxSplitWindow* pSplitWin;
- BOOL bSplitable;
+ sal_Bool bSplitable;
Timer aMoveTimer;
// The following members are only valid in the time from startDocking to
// EndDocking:
- BOOL bEndDocked;
+ sal_Bool bEndDocked;
Size aSplitSize;
long nHorizontalSize;
long nVerticalSize;
- USHORT nLine;
- USHORT nPos;
- USHORT nDockLine;
- USHORT nDockPos;
- BOOL bNewLine;
- BOOL bDockingPrevented;
+ sal_uInt16 nLine;
+ sal_uInt16 nPos;
+ sal_uInt16 nDockLine;
+ sal_uInt16 nDockPos;
+ sal_Bool bNewLine;
+ sal_Bool bDockingPrevented;
ByteString aWinState;
SfxChildAlignment GetLastAlignment() const
@@ -525,7 +526,7 @@ void SfxDockingWindow::Resize()
//-------------------------------------------------------------------------
-BOOL SfxDockingWindow::PrepareToggleFloatingMode()
+sal_Bool SfxDockingWindow::PrepareToggleFloatingMode()
/* [Description]
@@ -538,24 +539,24 @@ BOOL SfxDockingWindow::PrepareToggleFloatingMode()
{
if (!pImp->bConstructed)
- return TRUE;
+ return sal_True;
if ( (Application::IsInModalMode() && IsFloatingMode()) || !pMgr )
- return FALSE;
+ return sal_False;
if ( pImp->bDockingPrevented )
- return FALSE;
+ return sal_False;
if (!IsFloatingMode())
{
// Test, if FloatingMode is permitted.
if ( CheckAlignment(GetAlignment(),SFX_ALIGN_NOALIGNMENT) != SFX_ALIGN_NOALIGNMENT )
- return FALSE;
+ return sal_False;
if ( pImp->pSplitWin )
{
// The DockingWindow is inside a SplitWindow and will be teared of.
- pImp->pSplitWin->RemoveWindow(this/*, FALSE*/);
+ pImp->pSplitWin->RemoveWindow(this/*, sal_False*/);
pImp->pSplitWin = 0;
}
}
@@ -565,15 +566,15 @@ BOOL SfxDockingWindow::PrepareToggleFloatingMode()
// Test if it is allowed to dock,
if (CheckAlignment(GetAlignment(),pImp->GetLastAlignment()) == SFX_ALIGN_NOALIGNMENT)
- return FALSE;
+ return sal_False;
// Test, if the Workwindow allows for docking at the moment.
SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl();
if ( !pWorkWin->IsDockingAllowed() || !pWorkWin->IsInternalDockingAllowed() )
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
//-------------------------------------------------------------------------
@@ -690,13 +691,13 @@ void SfxDockingWindow::StartDocking()
pImp->pSplitWin->GetWindowPos(this, pImp->nLine, pImp->nPos);
pImp->nDockLine = pImp->nLine;
pImp->nDockPos = pImp->nPos;
- pImp->bNewLine = FALSE;
+ pImp->bNewLine = sal_False;
}
}
//-------------------------------------------------------------------------
-BOOL SfxDockingWindow::Docking( const Point& rPos, Rectangle& rRect )
+sal_Bool SfxDockingWindow::Docking( const Point& rPos, Rectangle& rRect )
/* [Description]
@@ -707,7 +708,7 @@ BOOL SfxDockingWindow::Docking( const Point& rPos, Rectangle& rRect )
*/
{
if ( Application::IsInModalMode() )
- return TRUE;
+ return sal_True;
if ( !pImp->bConstructed || !pMgr )
{
@@ -717,16 +718,16 @@ BOOL SfxDockingWindow::Docking( const Point& rPos, Rectangle& rRect )
SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl();
if ( pImp->bDockingPrevented || !pWorkWin->IsInternalDockingAllowed() )
- return FALSE;
+ return sal_False;
- BOOL bFloatMode = FALSE;
+ sal_Bool bFloatMode = sal_False;
if ( GetOuterRect().IsInside( rPos ) && !IsDockingPrevented() )
{
// Mouse within OuterRect: calculate Alignment and Rectangle
SfxChildAlignment eAlign = CalcAlignment(rPos, rRect);
if (eAlign == SFX_ALIGN_NOALIGNMENT)
- bFloatMode = TRUE;
+ bFloatMode = sal_True;
pImp->SetDockAlignment(eAlign);
}
else
@@ -734,8 +735,8 @@ BOOL SfxDockingWindow::Docking( const Point& rPos, Rectangle& rRect )
// Mouse is not within OuterRect: must be FloatingWindow
// Is this allowed?
if (CheckAlignment(pImp->GetDockAlignment(),SFX_ALIGN_NOALIGNMENT) != SFX_ALIGN_NOALIGNMENT)
- return FALSE;
- bFloatMode = TRUE;
+ return sal_False;
+ bFloatMode = sal_True;
if ( SFX_ALIGN_NOALIGNMENT != pImp->GetDockAlignment() )
{
// Due to a bug the rRect may only be changed when the
@@ -799,7 +800,7 @@ BOOL SfxDockingWindow::Docking( const Point& rPos, Rectangle& rRect )
//-------------------------------------------------------------------------
-void SfxDockingWindow::EndDocking( const Rectangle& rRect, BOOL bFloatMode )
+void SfxDockingWindow::EndDocking( const Rectangle& rRect, sal_Bool bFloatMode )
/* [Description]
@@ -812,7 +813,7 @@ void SfxDockingWindow::EndDocking( const Rectangle& rRect, BOOL bFloatMode )
return;
SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl();
- BOOL bReArrange = FALSE;
+ sal_Bool bReArrange = sal_False;
if ( pImp->bSplitable )
{
// If the alignment changes and the window is in a docked state in a
@@ -820,7 +821,7 @@ void SfxDockingWindow::EndDocking( const Rectangle& rRect, BOOL bFloatMode )
// PrepareToggleFloatingMode() and ToggleFloatingMode() preform the
// re-registered
if ( !bFloatMode )
- bReArrange = TRUE;
+ bReArrange = sal_True;
}
if ( bReArrange )
@@ -830,7 +831,7 @@ void SfxDockingWindow::EndDocking( const Rectangle& rRect, BOOL bFloatMode )
// before Show() is called must the reassignment have been made,
// therefore the base class can not be called
if ( IsFloatingMode() || !pImp->bSplitable )
- Show( FALSE, SHOW_NOFOCUSCHANGE );
+ Show( sal_False, SHOW_NOFOCUSCHANGE );
// Set the size for toggling.
pImp->aSplitSize = rRect.GetSize();
@@ -838,11 +839,11 @@ void SfxDockingWindow::EndDocking( const Rectangle& rRect, BOOL bFloatMode )
{
SetFloatingMode( bFloatMode );
if ( IsFloatingMode() || !pImp->bSplitable )
- Show( TRUE, SHOW_NOFOCUSCHANGE );
+ Show( sal_True, SHOW_NOFOCUSCHANGE );
}
else
{
- pImp->pSplitWin->RemoveWindow(this,FALSE);
+ pImp->pSplitWin->RemoveWindow(this,sal_False);
pImp->nLine = pImp->nDockLine;
pImp->nPos = pImp->nDockPos;
pImp->pSplitWin->ReleaseWindow_Impl(this);
@@ -862,9 +863,9 @@ void SfxDockingWindow::EndDocking( const Rectangle& rRect, BOOL bFloatMode )
}
else
{
- pImp->bEndDocked = TRUE;
+ pImp->bEndDocked = sal_True;
DockingWindow::EndDocking(rRect, bFloatMode);
- pImp->bEndDocked = FALSE;
+ pImp->bEndDocked = sal_False;
}
SetAlignment( IsFloatingMode() ? SFX_ALIGN_NOALIGNMENT : pImp->GetDockAlignment() );
@@ -902,24 +903,36 @@ SfxDockingWindow::SfxDockingWindow( SfxBindings *pBindinx, SfxChildWindow *pCW,
*/
{
- ULONG nId = GetHelpId();
- if ( !nId && pCW )
- nId = pCW->GetType();
- SetHelpId( 0 );
- SetUniqueId( nId );
+ if ( GetHelpId().getLength() )
+ {
+ SetUniqueId( GetHelpId() );
+ SetHelpId("");
+ }
+ else
+ {
+ SfxViewFrame* pViewFrame = pBindings->GetDispatcher()->GetFrame();
+ SfxSlotPool* pSlotPool = pViewFrame->GetObjectShell()->GetModule()->GetSlotPool();
+ const SfxSlot* pSlot = pSlotPool->GetSlot( pCW->GetType() );
+ if ( pSlot )
+ {
+ rtl::OString aCmd("SFXDOCKINGWINDOW_");
+ aCmd += pSlot->GetUnoName();
+ SetUniqueId( aCmd );
+ }
+ }
pImp = new SfxDockingWindow_Impl;
- pImp->bConstructed = FALSE;
+ pImp->bConstructed = sal_False;
pImp->pSplitWin = 0;
- pImp->bEndDocked = FALSE;
- pImp->bDockingPrevented = FALSE;
+ pImp->bEndDocked = sal_False;
+ pImp->bDockingPrevented = sal_False;
- pImp->bSplitable = TRUE;
+ pImp->bSplitable = sal_True;
// Initially set to default, the alignment is set in the subclass
pImp->nLine = pImp->nDockLine = 0;
pImp->nPos = pImp->nDockPos = 0;
- pImp->bNewLine = FALSE;
+ pImp->bNewLine = sal_False;
pImp->SetLastAlignment(SFX_ALIGN_NOALIGNMENT);
pImp->aMoveTimer.SetTimeout(50);
pImp->aMoveTimer.SetTimeoutHdl(LINK(this,SfxDockingWindow,TimerHdl));
@@ -941,22 +954,36 @@ SfxDockingWindow::SfxDockingWindow( SfxBindings *pBindinx, SfxChildWindow *pCW,
*/
{
- ULONG nId = GetHelpId();
- SetHelpId(0);
- SetUniqueId( nId );
+ if ( GetHelpId().getLength() )
+ {
+ SetUniqueId( GetHelpId() );
+ SetHelpId("");
+ }
+ else
+ {
+ SfxViewFrame* pViewFrame = pBindings->GetDispatcher()->GetFrame();
+ SfxSlotPool* pSlotPool = pViewFrame->GetObjectShell()->GetModule()->GetSlotPool();
+ const SfxSlot* pSlot = pSlotPool->GetSlot( pCW->GetType() );
+ if ( pSlot )
+ {
+ rtl::OString aCmd("SFXDOCKINGWINDOW_");
+ aCmd += pSlot->GetUnoName();
+ SetUniqueId( aCmd );
+ }
+ }
pImp = new SfxDockingWindow_Impl;
- pImp->bConstructed = FALSE;
+ pImp->bConstructed = sal_False;
pImp->pSplitWin = 0;
- pImp->bEndDocked = FALSE;
- pImp->bDockingPrevented = FALSE;
+ pImp->bEndDocked = sal_False;
+ pImp->bDockingPrevented = sal_False;
- pImp->bSplitable = TRUE;
+ pImp->bSplitable = sal_True;
// Initially set to default, the alignment is set in the subclass
pImp->nLine = pImp->nDockLine = 0;
pImp->nPos = pImp->nDockPos = 0;
- pImp->bNewLine = FALSE;
+ pImp->bNewLine = sal_False;
pImp->SetLastAlignment(SFX_ALIGN_NOALIGNMENT);
pImp->aMoveTimer.SetTimeout(50);
pImp->aMoveTimer.SetTimeoutHdl(LINK(this,SfxDockingWindow,TimerHdl));
@@ -976,12 +1003,12 @@ void SfxDockingWindow::Initialize(SfxChildWinInfo *pInfo)
if ( !pMgr )
{
pImp->SetDockAlignment( SFX_ALIGN_NOALIGNMENT );
- pImp->bConstructed = TRUE;
+ pImp->bConstructed = sal_True;
return;
}
if ( pInfo->nFlags & SFX_CHILDWIN_FORCEDOCK )
- pImp->bDockingPrevented = TRUE;
+ pImp->bDockingPrevented = sal_True;
pImp->aSplitSize = GetOutputSizePixel();
if ( !GetFloatingSize().Width() )
@@ -999,14 +1026,14 @@ void SfxDockingWindow::Initialize(SfxChildWinInfo *pInfo)
{
// get information about alignment, split size and position in SplitWindow
String aStr;
- USHORT nPos = pInfo->aExtraString.SearchAscii("AL:");
+ sal_uInt16 nPos = pInfo->aExtraString.SearchAscii("AL:");
if ( nPos != STRING_NOTFOUND )
{
// alignment information
- USHORT n1 = pInfo->aExtraString.Search('(', nPos);
+ sal_uInt16 n1 = pInfo->aExtraString.Search('(', nPos);
if ( n1 != STRING_NOTFOUND )
{
- USHORT n2 = pInfo->aExtraString.Search(')', n1);
+ sal_uInt16 n2 = pInfo->aExtraString.Search(')', n1);
if ( n2 != STRING_NOTFOUND )
{
// extract alignment information from extrastring
@@ -1023,7 +1050,7 @@ void SfxDockingWindow::Initialize(SfxChildWinInfo *pInfo)
pImp->aWinState = pInfo->aWinState;
// check for valid alignment
- SfxChildAlignment eLocalAlignment = (SfxChildAlignment) (USHORT) aStr.ToInt32();
+ SfxChildAlignment eLocalAlignment = (SfxChildAlignment) (sal_uInt16) aStr.ToInt32();
if ( pImp->bDockingPrevented )
// docking prevented, ignore old configuration and take alignment from default
aStr.Erase();
@@ -1043,7 +1070,7 @@ void SfxDockingWindow::Initialize(SfxChildWinInfo *pInfo)
if ( nPos != STRING_NOTFOUND )
{
aStr.Erase(0, nPos+1);
- pImp->SetLastAlignment( (SfxChildAlignment) (USHORT) aStr.ToInt32() );
+ pImp->SetLastAlignment( (SfxChildAlignment) (sal_uInt16) aStr.ToInt32() );
}
nPos = aStr.Search(',');
@@ -1054,8 +1081,8 @@ void SfxDockingWindow::Initialize(SfxChildWinInfo *pInfo)
aStr.Erase(0, nPos+1);
if ( GetPosSizeFromString( aStr, aPos, pImp->aSplitSize ) )
{
- pImp->nLine = pImp->nDockLine = (USHORT) aPos.X();
- pImp->nPos = pImp->nDockPos = (USHORT) aPos.Y();
+ pImp->nLine = pImp->nDockLine = (sal_uInt16) aPos.X();
+ pImp->nPos = pImp->nDockPos = (sal_uInt16) aPos.Y();
pImp->nVerticalSize = pImp->aSplitSize.Height();
pImp->nHorizontalSize = pImp->aSplitSize.Width();
if ( GetSplitSizeFromString( aStr, pImp->aSplitSize ))
@@ -1089,7 +1116,7 @@ void SfxDockingWindow::Initialize(SfxChildWinInfo *pInfo)
// detect floating mode
// toggeling mode will not execute code in handlers, because pImp->bConstructed is not set yet
- BOOL bFloatMode = IsFloatingMode();
+ sal_Bool bFloatMode = IsFloatingMode();
if ( bFloatMode != ((GetAlignment() == SFX_ALIGN_NOALIGNMENT)) )
{
bFloatMode = !bFloatMode;
@@ -1146,12 +1173,12 @@ void SfxDockingWindow::Initialize_Impl()
{
if ( !pMgr )
{
- pImp->bConstructed = TRUE;
+ pImp->bConstructed = sal_True;
return;
}
FloatingWindow* pFloatWin = GetFloatingWindow();
- BOOL bSet = FALSE;
+ sal_Bool bSet = sal_False;
if ( pFloatWin )
{
bSet = !pFloatWin->IsDefaultPos();
@@ -1160,7 +1187,7 @@ void SfxDockingWindow::Initialize_Impl()
{
Point aPos = GetFloatingPos();
if ( aPos != Point() )
- bSet = TRUE;
+ bSet = sal_True;
}
if ( !bSet)
@@ -1190,7 +1217,7 @@ void SfxDockingWindow::Initialize_Impl()
}
// allow calling of docking handlers
- pImp->bConstructed = TRUE;
+ pImp->bConstructed = sal_True;
}
//-------------------------------------------------------------------------
@@ -1215,9 +1242,9 @@ void SfxDockingWindow::FillInfo(SfxChildWinInfo& rInfo) const
rInfo.aWinState = pImp->aWinState;
rInfo.aExtraString = DEFINE_CONST_UNICODE("AL:(");
- rInfo.aExtraString += String::CreateFromInt32((USHORT) GetAlignment());
+ rInfo.aExtraString += String::CreateFromInt32((sal_uInt16) GetAlignment());
rInfo.aExtraString += ',';
- rInfo.aExtraString += String::CreateFromInt32 ((USHORT) pImp->GetLastAlignment());
+ rInfo.aExtraString += String::CreateFromInt32 ((sal_uInt16) pImp->GetLastAlignment());
if ( pImp->bSplitable )
{
Point aPos(pImp->nLine, pImp->nPos);
@@ -1327,7 +1354,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle&
aInRect.Bottom() -= nTBBorder/2;
// calculate alignment resulting from docking rectangle
- BOOL bBecomesFloating = FALSE;
+ sal_Bool bBecomesFloating = sal_False;
SfxChildAlignment eDockAlign = pImp->GetDockAlignment();
Rectangle aDockingRect( rRect );
if ( !IsFloatingMode() )
@@ -1346,7 +1373,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle&
Rectangle aIntersect = GetOuterRect().GetIntersection( aDockingRect );
if ( aIntersect.IsEmpty() )
// docking rectangle completely outside docking area -> floating mode
- bBecomesFloating = TRUE;
+ bBecomesFloating = sal_True;
else
{
// create a small test rect around the mouse position and use this one
@@ -1360,7 +1387,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle&
Rectangle aIntersectRect = aInRect.GetIntersection( aSmallDockingRect );
if ( aIntersectRect == aSmallDockingRect )
// docking rectangle completely inside (shrinked) inner area -> floating mode
- bBecomesFloating = TRUE;
+ bBecomesFloating = sal_True;
}
if ( bBecomesFloating )
@@ -1373,7 +1400,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle&
Point aInPosTL( aPos.X()-aInRect.Left(), aPos.Y()-aInRect.Top() );
Point aInPosBR( aPos.X()-aInRect.Left() + aDockingRect.GetWidth(), aPos.Y()-aInRect.Top() + aDockingRect.GetHeight() );
Size aInSize = aInRect.GetSize();
- BOOL bNoChange = FALSE;
+ sal_Bool bNoChange = sal_False;
// check if alignment is still unchanged
switch ( GetAlignment() )
@@ -1384,7 +1411,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle&
if (aInPosTL.X() <= 0)
{
eDockAlign = GetAlignment();
- bNoChange = TRUE;
+ bNoChange = sal_True;
}
break;
case SFX_ALIGN_TOP:
@@ -1393,7 +1420,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle&
if ( aInPosTL.Y() <= 0)
{
eDockAlign = GetAlignment();
- bNoChange = TRUE;
+ bNoChange = sal_True;
}
break;
case SFX_ALIGN_RIGHT:
@@ -1402,7 +1429,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle&
if ( aInPosBR.X() >= aInSize.Width())
{
eDockAlign = GetAlignment();
- bNoChange = TRUE;
+ bNoChange = sal_True;
}
break;
case SFX_ALIGN_BOTTOM:
@@ -1411,7 +1438,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle&
if ( aInPosBR.Y() >= aInSize.Height())
{
eDockAlign = GetAlignment();
- bNoChange = TRUE;
+ bNoChange = sal_True;
}
break;
default:
@@ -1421,7 +1448,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle&
if ( !bNoChange )
{
// alignment will change, test alignment according to distance of the docking rectangles edges
- BOOL bForbidden = TRUE;
+ sal_Bool bForbidden = sal_True;
if ( aInPosTL.X() <= 0)
{
eDockAlign = CheckAlignment(pImp->GetDockAlignment(),SFX_ALIGN_LEFT);
@@ -1470,7 +1497,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle&
}
else if ( pImp->bSplitable )
{
- USHORT nLine, nPos;
+ sal_uInt16 nLine, nPos;
SfxSplitWindow *pSplitWin = pWorkWin->GetSplitWindow_Impl(eDockAlign);
aPos = pSplitWin->ScreenToOutputPixel( aPos );
if ( pSplitWin->GetWindowPos( aPos, nLine, nPos ) )
@@ -1478,7 +1505,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle&
// mouse over splitwindow, get line and position
pImp->nDockLine = nLine;
pImp->nDockPos = nPos;
- pImp->bNewLine = FALSE;
+ pImp->bNewLine = sal_False;
}
else
{
@@ -1498,18 +1525,18 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle&
// if this window is the only one in the last line, it can't be docked as new line in the same splitwindow
pImp->nDockLine = pImp->nLine;
pImp->nDockPos = pImp->nPos;
- pImp->bNewLine = FALSE;
+ pImp->bNewLine = sal_False;
}
else
{
// create new line
pImp->nDockLine = pSplitWin->GetLineCount();
pImp->nDockPos = 0;
- pImp->bNewLine = TRUE;
+ pImp->bNewLine = sal_True;
}
}
- BOOL bChanged = pImp->nLine != pImp->nDockLine || pImp->nPos != pImp->nDockPos || eDockAlign != GetAlignment();
+ sal_Bool bChanged = pImp->nLine != pImp->nDockLine || pImp->nPos != pImp->nDockPos || eDockAlign != GetAlignment();
if ( !bChanged && !IsFloatingMode() )
{
// window only sightly moved, no change of any property
@@ -1692,7 +1719,7 @@ SfxChildAlignment SfxDockingWindow::CheckAlignment(SfxChildAlignment,
//-------------------------------------------------------------------------
-BOOL SfxDockingWindow::Close()
+sal_Bool SfxDockingWindow::Close()
/* [Description]
@@ -1704,12 +1731,12 @@ BOOL SfxDockingWindow::Close()
{
// Execute with Parameters, since Toggle is ignored by some ChildWindows.
if ( !pMgr )
- return TRUE;
+ return sal_True;
- SfxBoolItem aValue( pMgr->GetType(), FALSE);
+ SfxBoolItem aValue( pMgr->GetType(), sal_False);
pBindings->GetDispatcher_Impl()->Execute(
pMgr->GetType(), SFX_CALLMODE_RECORD | SFX_CALLMODE_ASYNCHRON, &aValue, 0L );
- return TRUE;
+ return sal_True;
}
//-------------------------------------------------------------------------
@@ -1807,21 +1834,21 @@ long SfxDockingWindow::Notify( NotifyEvent& rEvt )
pMgr->Activate_Impl();
Window* pWindow = rEvt.GetWindow();
- ULONG nHelpId = 0;
- while ( !nHelpId && pWindow )
+ rtl::OString sHelpId;
+ while ( !sHelpId.getLength() && pWindow )
{
- nHelpId = pWindow->GetHelpId();
+ sHelpId = pWindow->GetHelpId();
pWindow = pWindow->GetParent();
}
- if ( nHelpId )
- SfxHelp::OpenHelpAgent( &pBindings->GetDispatcher_Impl()->GetFrame()->GetFrame(), nHelpId );
+ if ( sHelpId.getLength() )
+ SfxHelp::OpenHelpAgent( &pBindings->GetDispatcher_Impl()->GetFrame()->GetFrame(), sHelpId );
// In VCL Notify goes first to the window itself, also call the
// base class, otherwise the parent learns nothing
// if ( rEvt.GetWindow() == this ) PB: #i74693# not necessary any longer
DockingWindow::Notify( rEvt );
- return TRUE;
+ return sal_True;
}
else if( rEvt.GetType() == EVENT_KEYINPUT )
{
@@ -1829,7 +1856,7 @@ long SfxDockingWindow::Notify( NotifyEvent& rEvt )
if ( !DockingWindow::Notify( rEvt ) && SfxViewShell::Current() )
// then also for valid global accelerators.
return SfxViewShell::Current()->GlobalKeyInput_Impl( *rEvt.GetKeyEvent() );
- return TRUE;
+ return sal_True;
}
else if ( rEvt.GetType() == EVENT_LOSEFOCUS && !HasChildPathFocus() )
{
@@ -1841,9 +1868,9 @@ long SfxDockingWindow::Notify( NotifyEvent& rEvt )
}
-USHORT SfxDockingWindow::GetWinBits_Impl() const
+sal_uInt16 SfxDockingWindow::GetWinBits_Impl() const
{
- USHORT nBits = 0;
+ sal_uInt16 nBits = 0;
return nBits;
}
@@ -1874,27 +1901,27 @@ void SfxDockingWindow::Reappear_Impl()
}
}
-BOOL SfxDockingWindow::IsAutoHide_Impl() const
+sal_Bool SfxDockingWindow::IsAutoHide_Impl() const
{
if ( pImp->pSplitWin )
return !pImp->pSplitWin->IsFadeIn();
else
- return FALSE;
+ return sal_False;
}
-BOOL SfxDockingWindow::IsPinned_Impl() const
+sal_Bool SfxDockingWindow::IsPinned_Impl() const
{
if ( pImp->pSplitWin )
return pImp->pSplitWin->IsPinned();
else
- return TRUE;
+ return sal_True;
}
-void SfxDockingWindow::AutoShow( BOOL bShow )
+void SfxDockingWindow::AutoShow( sal_Bool bShow )
{
AutoShow_Impl(bShow);
}
-void SfxDockingWindow::AutoShow_Impl( BOOL bShow )
+void SfxDockingWindow::AutoShow_Impl( sal_Bool bShow )
{
if ( pImp->pSplitWin )
{
@@ -1910,7 +1937,7 @@ SfxSplitWindow* SfxDockingWindow::GetSplitWindow_Impl() const
return pImp->pSplitWin;
}
-void SfxDockingWindow::FadeIn( BOOL /*bFadeIn*/ )
+void SfxDockingWindow::FadeIn( sal_Bool /*bFadeIn*/ )
{
}
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index 2abe18442b8c..f90cb9116fe6 100644..100755
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -80,7 +80,6 @@
#include <unotools/viewoptions.hxx>
#include <unotools/moduleoptions.hxx>
#include <svtools/helpid.hrc>
-#include <svl/pickerhelper.hxx>
#include <comphelper/docpasswordrequest.hxx>
#include <comphelper/docpasswordhelper.hxx>
#include <ucbhelper/content.hxx>
@@ -93,13 +92,13 @@
#include <sfx2/docfac.hxx>
#include "openflag.hxx"
#include <sfx2/passwd.hxx>
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include <sfx2/sfxsids.hrc>
#include "filedlghelper.hrc"
#include "filtergrouping.hxx"
#include <sfx2/request.hxx>
#include "filedlgimpl.hxx"
-
+#include <helpid.hrc>
#include <sfxlocal.hrc>
//-----------------------------------------------------------------------------
@@ -222,55 +221,55 @@ OUString FileDialogHelper_Impl::handleHelpRequested( const FilePickerEvent& aEve
{
//!!! todo: cache the help strings (here or TRA)
- ULONG nHelpId = 0;
+ rtl::OString sHelpId;
// mapping from element id -> help id
switch ( aEvent.ElementId )
{
case ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION :
- nHelpId = HID_FILESAVE_AUTOEXTENSION;
+ sHelpId = HID_FILESAVE_AUTOEXTENSION;
break;
case ExtendedFilePickerElementIds::CHECKBOX_PASSWORD :
- nHelpId = HID_FILESAVE_SAVEWITHPASSWORD;
+ sHelpId = HID_FILESAVE_SAVEWITHPASSWORD;
break;
case ExtendedFilePickerElementIds::CHECKBOX_FILTEROPTIONS :
- nHelpId = HID_FILESAVE_CUSTOMIZEFILTER;
+ sHelpId = HID_FILESAVE_CUSTOMIZEFILTER;
break;
case ExtendedFilePickerElementIds::CHECKBOX_READONLY :
- nHelpId = HID_FILEOPEN_READONLY;
+ sHelpId = HID_FILEOPEN_READONLY;
break;
case ExtendedFilePickerElementIds::CHECKBOX_LINK :
- nHelpId = HID_FILEDLG_LINK_CB;
+ sHelpId = HID_FILEDLG_LINK_CB;
break;
case ExtendedFilePickerElementIds::CHECKBOX_PREVIEW :
- nHelpId = HID_FILEDLG_PREVIEW_CB;
+ sHelpId = HID_FILEDLG_PREVIEW_CB;
break;
case ExtendedFilePickerElementIds::PUSHBUTTON_PLAY :
- nHelpId = HID_FILESAVE_DOPLAY;
+ sHelpId = HID_FILESAVE_DOPLAY;
break;
case ExtendedFilePickerElementIds::LISTBOX_VERSION_LABEL :
case ExtendedFilePickerElementIds::LISTBOX_VERSION :
- nHelpId = HID_FILEOPEN_VERSION;
+ sHelpId = HID_FILEOPEN_VERSION;
break;
case ExtendedFilePickerElementIds::LISTBOX_TEMPLATE_LABEL :
case ExtendedFilePickerElementIds::LISTBOX_TEMPLATE :
- nHelpId = HID_FILESAVE_TEMPLATE;
+ sHelpId = HID_FILESAVE_TEMPLATE;
break;
case ExtendedFilePickerElementIds::LISTBOX_IMAGE_TEMPLATE_LABEL :
case ExtendedFilePickerElementIds::LISTBOX_IMAGE_TEMPLATE :
- nHelpId = HID_FILEOPEN_IMAGE_TEMPLATE;
+ sHelpId = HID_FILEOPEN_IMAGE_TEMPLATE;
break;
case ExtendedFilePickerElementIds::CHECKBOX_SELECTION :
- nHelpId = HID_FILESAVE_SELECTION;
+ sHelpId = HID_FILESAVE_SELECTION;
break;
default:
@@ -280,7 +279,7 @@ OUString FileDialogHelper_Impl::handleHelpRequested( const FilePickerEvent& aEve
OUString aHelpText;
Help* pHelp = Application::GetHelp();
if ( pHelp )
- aHelpText = String( pHelp->GetHelpText( nHelpId, NULL ) );
+ aHelpText = String( pHelp->GetHelpText( String( ByteString(sHelpId), RTL_TEXTENCODING_UTF8), NULL ) );
return aHelpText;
}
@@ -1169,7 +1168,7 @@ void SAL_CALL PickerThread_Impl::run()
}
// ------------------------------------------------------------------------
-void FileDialogHelper_Impl::setControlHelpIds( const sal_Int16* _pControlId, const sal_Int32* _pHelpId )
+void FileDialogHelper_Impl::setControlHelpIds( const sal_Int16* _pControlId, const char** _pHelpId )
{
DBG_ASSERT( _pControlId && _pHelpId, "FileDialogHelper_Impl::setControlHelpIds: invalid array pointers!" );
if ( !_pControlId || !_pHelpId )
@@ -1178,17 +1177,16 @@ void FileDialogHelper_Impl::setControlHelpIds( const sal_Int16* _pControlId, con
// forward these ids to the file picker
try
{
- const ::rtl::OUString sHelpIdPrefix( RTL_CONSTASCII_USTRINGPARAM( "HID:" ) );
+ const ::rtl::OUString sHelpIdPrefix( RTL_CONSTASCII_USTRINGPARAM( INET_HID_SCHEME ) );
// the ids for the single controls
uno::Reference< XFilePickerControlAccess > xControlAccess( mxFileDlg, UNO_QUERY );
if ( xControlAccess.is() )
{
while ( *_pControlId )
{
- // calc the help id of the element
+ DBG_ASSERT( INetURLObject( rtl::OStringToOUString( *_pHelpId, RTL_TEXTENCODING_UTF8 ) ).GetProtocol() == INET_PROT_NOT_VALID, "Wrong HelpId!" );
::rtl::OUString sId( sHelpIdPrefix );
- sId += ::rtl::OUString::valueOf( *_pHelpId );
- // set the help id
+ sId += ::rtl::OUString( *_pHelpId, strlen( *_pHelpId ), RTL_TEXTENCODING_UTF8 );
xControlAccess->setValue( *_pControlId, ControlActions::SET_HELP_URL, makeAny( sId ) );
++_pControlId; ++_pHelpId;
@@ -1202,12 +1200,6 @@ void FileDialogHelper_Impl::setControlHelpIds( const sal_Int16* _pControlId, con
}
// ------------------------------------------------------------------------
-void FileDialogHelper_Impl::setDialogHelpId( const sal_Int32 _nHelpId )
-{
- svt::SetDialogHelpId( mxFileDlg, _nHelpId );
-}
-
-// ------------------------------------------------------------------------
IMPL_LINK( FileDialogHelper_Impl, InitControls, void*, NOTINTERESTEDIN )
{
(void)NOTINTERESTEDIN;
@@ -1362,8 +1354,8 @@ void lcl_saveLastURLs(SvStringsDtor*& rpURLLi
::comphelper::SequenceAsVector< ::rtl::OUString >& lLastURLs )
{
lLastURLs.clear();
- USHORT c = rpURLList->Count();
- USHORT i = 0;
+ sal_uInt16 c = rpURLList->Count();
+ sal_uInt16 i = 0;
for (i=0; i<c; ++i)
lLastURLs.push_back(*(rpURLList->GetObject(i)));
}
@@ -1451,22 +1443,24 @@ ErrCode FileDialogHelper_Impl::execute( SvStringsDtor*& rpURLList,
// check password checkbox if the document had password before
if( mbHasPassword )
{
- SFX_ITEMSET_ARG( rpSet, pPassItem, SfxStringItem, SID_PASSWORD, FALSE );
- mbPwdCheckBoxState = ( pPassItem != NULL );
+ SFX_ITEMSET_ARG( rpSet, pPassItem, SfxBoolItem, SID_PASSWORDINTERACTION, sal_False );
+ mbPwdCheckBoxState = ( pPassItem != NULL && pPassItem->GetValue() );
// in case the document has password to modify, the dialog should be shown
- SFX_ITEMSET_ARG( rpSet, pPassToModifyItem, SfxUnoAnyItem, SID_MODIFYPASSWORDINFO, FALSE );
+ SFX_ITEMSET_ARG( rpSet, pPassToModifyItem, SfxUnoAnyItem, SID_MODIFYPASSWORDINFO, sal_False );
mbPwdCheckBoxState |= ( pPassToModifyItem && pPassToModifyItem->GetValue().hasValue() );
}
- SFX_ITEMSET_ARG( rpSet, pSelectItem, SfxBoolItem, SID_SELECTION, FALSE );
+ SFX_ITEMSET_ARG( rpSet, pSelectItem, SfxBoolItem, SID_SELECTION, sal_False );
if ( pSelectItem )
mbSelection = pSelectItem->GetValue();
else
mbSelectionEnabled = sal_False;
// the password will be set in case user decide so
+ rpSet->ClearItem( SID_PASSWORDINTERACTION );
rpSet->ClearItem( SID_PASSWORD );
+ rpSet->ClearItem( SID_ENCRYPTIONDATA );
rpSet->ClearItem( SID_RECOMMENDREADONLY );
rpSet->ClearItem( SID_MODIFYPASSWORDINFO );
@@ -1581,7 +1575,30 @@ ErrCode FileDialogHelper_Impl::execute( SvStringsDtor*& rpURLList,
if ( pPasswordRequest->isPassword() )
{
if ( pPasswordRequest->getPassword().getLength() )
- rpSet->Put( SfxStringItem( SID_PASSWORD, pPasswordRequest->getPassword() ) );
+ {
+ // TODO/LATER: The filters should show the password dialog themself in future
+ if ( bMSType )
+ {
+ // all the current MS-filters use MSCodec_Std97 implementation
+ uno::Sequence< sal_Int8 > aUniqueID = ::comphelper::DocPasswordHelper::GenerateRandomByteSequence( 16 );
+ uno::Sequence< sal_Int8 > aEncryptionKey = ::comphelper::DocPasswordHelper::GenerateStd97Key( pPasswordRequest->getPassword(), aUniqueID );
+
+ if ( aEncryptionKey.getLength() )
+ {
+ ::comphelper::SequenceAsHashMap aHashData;
+ aHashData[ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "STD97EncryptionKey" ) ) ] <<= aEncryptionKey;
+ aHashData[ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "STD97UniqueID" ) ) ] <<= aUniqueID;
+
+ rpSet->Put( SfxUnoAnyItem( SID_ENCRYPTIONDATA, uno::makeAny( aHashData.getAsConstNamedValueList() ) ) );
+ }
+ else
+ return ERRCODE_IO_NOTSUPPORTED;
+ }
+ else
+ {
+ rpSet->Put( SfxUnoAnyItem( SID_ENCRYPTIONDATA, uno::makeAny( ::comphelper::OStorageHelper::CreatePackageEncryptionData( pPasswordRequest->getPassword() ) ) ) );
+ }
+ }
if ( pPasswordRequest->getRecommendReadOnly() )
rpSet->Put( SfxBoolItem( SID_RECOMMENDREADONLY, sal_True ) );
@@ -1790,7 +1807,16 @@ void FileDialogHelper_Impl::addFilters( sal_Int64 nFlags,
sQuery.appendAscii(":eflags=" );
sQuery.append (::rtl::OUString::valueOf((sal_Int32)m_nDontFlags));
- uno::Reference< XEnumeration > xResult = xFilterCont->createSubSetEnumerationByQuery(sQuery.makeStringAndClear());
+ uno::Reference< XEnumeration > xResult;
+ try
+ {
+ xResult = xFilterCont->createSubSetEnumerationByQuery(sQuery.makeStringAndClear());
+ }
+ catch( uno::Exception& )
+ {
+ DBG_ERRORFILE( "Could not get filters from the configuration!" );
+ }
+
TSortedFilterList aIter (xResult);
// no matcher any longer used ...
@@ -1846,7 +1872,7 @@ void FileDialogHelper_Impl::addGraphicFilter()
// create the list of filters
mpGraphicFilter = new GraphicFilter;
- USHORT i, j, nCount = mpGraphicFilter->GetImportFormatCount();
+ sal_uInt16 i, j, nCount = mpGraphicFilter->GetImportFormatCount();
// compute the extension string for all known import filters
String aExtensions;
@@ -1855,7 +1881,7 @@ void FileDialogHelper_Impl::addGraphicFilter()
{
j = 0;
String sWildcard;
- while( TRUE )
+ while( sal_True )
{
sWildcard = mpGraphicFilter->GetImportWildcard( i, j++ );
if ( !sWildcard.Len() )
@@ -1869,7 +1895,7 @@ void FileDialogHelper_Impl::addGraphicFilter()
}
}
-#if defined(WIN) || defined(WNT)
+#if defined(WNT)
if ( aExtensions.Len() > 240 )
aExtensions = DEFINE_CONST_UNICODE( FILEDIALOG_FILTER_ALL );
#endif
@@ -1895,7 +1921,7 @@ void FileDialogHelper_Impl::addGraphicFilter()
String aExt;
j = 0;
String sWildcard;
- while( TRUE )
+ while( sal_True )
{
sWildcard = mpGraphicFilter->GetImportWildcard( i, j++ );
if ( !sWildcard.Len() )
@@ -2373,17 +2399,11 @@ void FileDialogHelper::CreateMatcher( const String& rFactory )
}
// ------------------------------------------------------------------------
-void FileDialogHelper::SetControlHelpIds( const sal_Int16* _pControlId, const sal_Int32* _pHelpId )
+void FileDialogHelper::SetControlHelpIds( const sal_Int16* _pControlId, const char** _pHelpId )
{
mpImp->setControlHelpIds( _pControlId, _pHelpId );
}
-// ------------------------------------------------------------------------
-void FileDialogHelper::SetDialogHelpId( const sal_Int32 _nHelpId )
-{
- mpImp->setDialogHelpId( _nHelpId );
-}
-
void FileDialogHelper::SetContext( Context _eNewContext )
{
mpImp->SetContext( _eNewContext );
diff --git a/sfx2/source/dialog/filedlghelper.src b/sfx2/source/dialog/filedlghelper.src
index eeee5d36aab7..eeee5d36aab7 100644..100755
--- a/sfx2/source/dialog/filedlghelper.src
+++ b/sfx2/source/dialog/filedlghelper.src
diff --git a/sfx2/source/dialog/filedlgimpl.hxx b/sfx2/source/dialog/filedlgimpl.hxx
index 45f3277371f3..0a76cb1eca67 100644..100755
--- a/sfx2/source/dialog/filedlgimpl.hxx
+++ b/sfx2/source/dialog/filedlgimpl.hxx
@@ -85,7 +85,7 @@ namespace sfx2
SfxFilterFlags m_nMustFlags;
SfxFilterFlags m_nDontFlags;
- ULONG mnPostUserEventId;
+ sal_uIntPtr mnPostUserEventId;
ErrCode mnError;
@@ -143,8 +143,7 @@ namespace sfx2
void correctVirtualDialogType();
- void setControlHelpIds( const sal_Int16* _pControlId, const sal_Int32* _pHelpId );
- void setDialogHelpId( const sal_Int32 _nHelpId );
+ void setControlHelpIds( const sal_Int16* _pControlId, const char** _pHelpId );
sal_Bool CheckFilterOptionsCapability( const SfxFilter* _pFilter );
diff --git a/sfx2/source/dialog/filtergrouping.cxx b/sfx2/source/dialog/filtergrouping.cxx
index 8fbd9b406ea6..c4a3a7622d07 100644..100755
--- a/sfx2/source/dialog/filtergrouping.cxx
+++ b/sfx2/source/dialog/filtergrouping.cxx
@@ -33,7 +33,7 @@
#include <sfx2/filedlghelper.hxx>
#include <sfx2/sfx.hrc>
#include <sfx2/docfac.hxx>
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include <osl/thread.h>
#include <com/sun/star/ui/dialogs/XFilterGroupManager.hpp>
#include <com/sun/star/beans/StringPair.hpp>
diff --git a/sfx2/source/dialog/filtergrouping.hxx b/sfx2/source/dialog/filtergrouping.hxx
index 5702362298fd..5702362298fd 100644..100755
--- a/sfx2/source/dialog/filtergrouping.hxx
+++ b/sfx2/source/dialog/filtergrouping.hxx
diff --git a/sfx2/source/dialog/intro.cxx b/sfx2/source/dialog/intro.cxx
index 8bfed93e4cba..8bfed93e4cba 100644..100755
--- a/sfx2/source/dialog/intro.cxx
+++ b/sfx2/source/dialog/intro.cxx
diff --git a/sfx2/source/dialog/itemconnect.cxx b/sfx2/source/dialog/itemconnect.cxx
index b0d860df71c1..0cffdf5217ab 100644..100755
--- a/sfx2/source/dialog/itemconnect.cxx
+++ b/sfx2/source/dialog/itemconnect.cxx
@@ -53,31 +53,31 @@ TriState lclConvertToTriState( bool bKnown, bool bIsKnownFlag, bool bIsUnknownFl
// ----------------------------------------------------------------------------
-USHORT ItemWrapperHelper::GetWhichId( const SfxItemSet& rItemSet, USHORT nSlot )
+sal_uInt16 ItemWrapperHelper::GetWhichId( const SfxItemSet& rItemSet, sal_uInt16 nSlot )
{
return rItemSet.GetPool()->GetWhich( nSlot );
}
-bool ItemWrapperHelper::IsKnownItem( const SfxItemSet& rItemSet, USHORT nSlot )
+bool ItemWrapperHelper::IsKnownItem( const SfxItemSet& rItemSet, sal_uInt16 nSlot )
{
- return rItemSet.GetItemState( GetWhichId( rItemSet, nSlot ), TRUE ) != SFX_ITEM_UNKNOWN;
+ return rItemSet.GetItemState( GetWhichId( rItemSet, nSlot ), sal_True ) != SFX_ITEM_UNKNOWN;
}
-const SfxPoolItem* ItemWrapperHelper::GetUniqueItem( const SfxItemSet& rItemSet, USHORT nSlot )
+const SfxPoolItem* ItemWrapperHelper::GetUniqueItem( const SfxItemSet& rItemSet, sal_uInt16 nSlot )
{
- USHORT nWhich = GetWhichId( rItemSet, nSlot );
- return (rItemSet.GetItemState( nWhich, TRUE ) >= SFX_ITEM_DEFAULT) ? rItemSet.GetItem( nWhich, TRUE ) : 0;
+ sal_uInt16 nWhich = GetWhichId( rItemSet, nSlot );
+ return (rItemSet.GetItemState( nWhich, sal_True ) >= SFX_ITEM_DEFAULT) ? rItemSet.GetItem( nWhich, sal_True ) : 0;
}
-const SfxPoolItem& ItemWrapperHelper::GetDefaultItem( const SfxItemSet& rItemSet, USHORT nSlot )
+const SfxPoolItem& ItemWrapperHelper::GetDefaultItem( const SfxItemSet& rItemSet, sal_uInt16 nSlot )
{
return rItemSet.GetPool()->GetDefaultItem( GetWhichId( rItemSet, nSlot ) );
}
-void ItemWrapperHelper::RemoveDefaultItem( SfxItemSet& rDestSet, const SfxItemSet& rOldSet, USHORT nSlot )
+void ItemWrapperHelper::RemoveDefaultItem( SfxItemSet& rDestSet, const SfxItemSet& rOldSet, sal_uInt16 nSlot )
{
- USHORT nWhich = GetWhichId( rDestSet, nSlot );
- if( rOldSet.GetItemState( nWhich, FALSE ) == SFX_ITEM_DEFAULT )
+ sal_uInt16 nWhich = GetWhichId( rDestSet, nSlot );
+ if( rOldSet.GetItemState( nWhich, sal_False ) == SFX_ITEM_DEFAULT )
rDestSet.ClearItem( nWhich );
}
@@ -134,12 +134,12 @@ void CheckBoxWrapper::SetControlDontKnow( bool bSet )
GetControl().SetState( bSet ? STATE_DONTKNOW : STATE_NOCHECK );
}
-BOOL CheckBoxWrapper::GetControlValue() const
+sal_Bool CheckBoxWrapper::GetControlValue() const
{
return GetControl().IsChecked();
}
-void CheckBoxWrapper::SetControlValue( BOOL bValue )
+void CheckBoxWrapper::SetControlValue( sal_Bool bValue )
{
GetControl().Check( bValue );
}
@@ -303,7 +303,7 @@ TriState ItemConnectionBase::GetShowState( bool bKnown ) const
// Standard connections
// ============================================================================
-DummyItemConnection::DummyItemConnection( USHORT nSlot, Window& rWindow, ItemConnFlags nFlags ) :
+DummyItemConnection::DummyItemConnection( sal_uInt16 nSlot, Window& rWindow, ItemConnFlags nFlags ) :
ItemConnectionBase( nFlags ),
DummyWindowWrapper( rWindow ),
mnSlot( nSlot )
diff --git a/sfx2/source/dialog/mailmodel.cxx b/sfx2/source/dialog/mailmodel.cxx
index 1a1f345436fc..4db7f7c8e078 100644..100755
--- a/sfx2/source/dialog/mailmodel.cxx
+++ b/sfx2/source/dialog/mailmodel.cxx
@@ -52,19 +52,19 @@
#include <com/sun/star/security/XDocumentDigitalSignatures.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
#include <com/sun/star/frame/XDispatch.hpp>
+#include <com/sun/star/frame/XStatusListener.hpp>
#include <com/sun/star/ucb/InsertCommandArgument.hpp>
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
#include <com/sun/star/document/XExporter.hpp>
-
#include <rtl/textenc.h>
#include <rtl/uri.h>
#include <rtl/uri.hxx>
#include <rtl/ustrbuf.hxx>
#include <vcl/msgbox.hxx>
-#include <mailmodelapi.hxx>
+#include <sfx2/mailmodelapi.hxx>
#include "sfxtypes.hxx"
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include <sfx2/sfxsids.hrc>
#include "dialog.hrc"
@@ -81,6 +81,7 @@
#include <comphelper/mediadescriptor.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <vcl/svapp.hxx>
+#include <cppuhelper/implbase1.hxx>
// --------------------------------------------------------------
using namespace ::com::sun::star;
@@ -95,6 +96,54 @@ using namespace ::com::sun::star::system;
using namespace ::rtl;
namespace css = ::com::sun::star;
+// - class PrepareListener_Impl ------------------------------------------
+class PrepareListener_Impl : public ::cppu::WeakImplHelper1< css::frame::XStatusListener >
+{
+ bool m_bState;
+public:
+ PrepareListener_Impl();
+ virtual ~PrepareListener_Impl();
+
+ // css.frame.XStatusListener
+ virtual void SAL_CALL statusChanged(const css::frame::FeatureStateEvent& aEvent)
+ throw(css::uno::RuntimeException);
+
+ // css.lang.XEventListener
+ virtual void SAL_CALL disposing(const css::lang::EventObject& aEvent)
+ throw(css::uno::RuntimeException);
+
+ bool IsSet() const {return m_bState;}
+};
+
+/*-- 25.08.2010 14:32:49---------------------------------------------------
+
+ -----------------------------------------------------------------------*/
+PrepareListener_Impl::PrepareListener_Impl() :
+ m_bState( false )
+{
+}
+/*-- 25.08.2010 14:32:51---------------------------------------------------
+
+ -----------------------------------------------------------------------*/
+PrepareListener_Impl::~PrepareListener_Impl()
+{
+}
+/*-- 25.08.2010 14:32:51---------------------------------------------------
+
+ -----------------------------------------------------------------------*/
+void PrepareListener_Impl::statusChanged(const css::frame::FeatureStateEvent& rEvent) throw(css::uno::RuntimeException)
+{
+ if( rEvent.IsEnabled )
+ rEvent.State >>= m_bState;
+ else
+ m_bState = sal_False;
+}
+/*-- 25.08.2010 14:32:52---------------------------------------------------
+
+ -----------------------------------------------------------------------*/
+void PrepareListener_Impl::disposing(const css::lang::EventObject& /*rEvent*/) throw(css::uno::RuntimeException)
+{
+}
// class SfxMailModel -----------------------------------------------
@@ -537,46 +586,68 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
aArgs[nNumArgs-1].Value = css::uno::makeAny( aPassword );
}
- if ( bModified || !bHasLocation || bStoreTo )
+ bool bNeedsPreparation = false;
+ css::util::URL aPrepareURL;
+ css::uno::Reference< css::frame::XDispatch > xPrepareDispatch;
+ css::uno::Reference< css::frame::XDispatchProvider > xDispatchProvider( xFrame, css::uno::UNO_QUERY );
+ css::uno::Reference< css::util::XURLTransformer > xURLTransformer(
+ xSMGR->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.URLTransformer" ))),
+ css::uno::UNO_QUERY );
+ if( !bSendAsPDF )
{
- // Document is modified, is newly created or should be stored in a special format
try
{
- css::uno::Reference< css::util::XURLTransformer > xURLTransformer(
- xSMGR->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.URLTransformer" ))),
- css::uno::UNO_QUERY );
-
- css::uno::Reference< css::frame::XDispatchProvider > xDispatchProvider( xFrame, css::uno::UNO_QUERY );
- css::uno::Reference< css::frame::XDispatch > xDispatch;
+ // check if the document needs to be prepared for sending as mail (embedding of links, removal of invisible content)
- css::util::URL aURL;
- css::uno::Sequence< css::beans::PropertyValue > aDispatchArgs;
+ if ( xURLTransformer.is() )
+ {
+ aPrepareURL.Complete = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:PrepareMailExport" ));
+ xURLTransformer->parseStrict( aPrepareURL );
+ }
- if( !bSendAsPDF )
+ if ( xDispatchProvider.is() )
{
- if ( xURLTransformer.is() )
+ xPrepareDispatch = css::uno::Reference< css::frame::XDispatch >(
+ xDispatchProvider->queryDispatch( aPrepareURL, ::rtl::OUString(), 0 ));
+ if ( xPrepareDispatch.is() )
{
- aURL.Complete = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:PrepareMailExport" ));
- xURLTransformer->parseStrict( aURL );
+ PrepareListener_Impl* pPrepareListener;
+ uno::Reference< css::frame::XStatusListener > xStatusListener = pPrepareListener = new PrepareListener_Impl;
+ xPrepareDispatch->addStatusListener( xStatusListener, aPrepareURL );
+ bNeedsPreparation = pPrepareListener->IsSet();
+ xPrepareDispatch->removeStatusListener( xStatusListener, aPrepareURL );
}
+ }
+ }
+ catch ( css::uno::RuntimeException& )
+ {
+ throw;
+ }
+ catch ( css::uno::Exception& )
+ {
+ }
+ }
- if ( xDispatchProvider.is() )
+ if ( bModified || !bHasLocation || bStoreTo || bNeedsPreparation )
+ {
+ // Document is modified, is newly created or should be stored in a special format
+ try
+ {
+ if( bNeedsPreparation && xPrepareDispatch.is() )
+ {
+ if ( xPrepareDispatch.is() )
{
- xDispatch = css::uno::Reference< css::frame::XDispatch >(
- xDispatchProvider->queryDispatch( aURL, ::rtl::OUString(), 0 ));
- if ( xDispatch.is() )
+ try
+ {
+ css::uno::Sequence< css::beans::PropertyValue > aDispatchArgs;
+ xPrepareDispatch->dispatch( aPrepareURL, aDispatchArgs );
+ }
+ catch ( css::uno::RuntimeException& )
+ {
+ throw;
+ }
+ catch ( css::uno::Exception& )
{
- try
- {
- xDispatch->dispatch( aURL, aDispatchArgs );
- }
- catch ( css::uno::RuntimeException& )
- {
- throw;
- }
- catch ( css::uno::Exception& )
- {
- }
}
}
}
@@ -598,6 +669,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
if( !bSendAsPDF )
{
+ css::util::URL aURL;
// #i30432# notify that export is finished - the Writer may want to restore removed content
if ( xURLTransformer.is() )
{
@@ -607,12 +679,13 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
if ( xDispatchProvider.is() )
{
- xDispatch = css::uno::Reference< css::frame::XDispatch >(
+ css::uno::Reference< css::frame::XDispatch > xDispatch = css::uno::Reference< css::frame::XDispatch >(
xDispatchProvider->queryDispatch( aURL, ::rtl::OUString(), 0 ));
if ( xDispatch.is() )
{
try
{
+ css::uno::Sequence< css::beans::PropertyValue > aDispatchArgs;
xDispatch->dispatch( aURL, aDispatchArgs );
}
catch ( css::uno::RuntimeException& )
@@ -904,7 +977,7 @@ SfxMailModel::SendMailResult SfxMailModel::SaveAndSend( const css::uno::Referenc
// functions -------------------------------------------------------------
-BOOL CreateFromAddress_Impl( String& rFrom )
+sal_Bool CreateFromAddress_Impl( String& rFrom )
/* [Description]
@@ -914,8 +987,8 @@ BOOL CreateFromAddress_Impl( String& rFrom )
[Return value]
- TRUE: Address could be created.
- FALSE: Address could not be created.
+ sal_True: Address could be created.
+ sal_False: Address could not be created.
*/
{
diff --git a/sfx2/source/dialog/mailmodelapi.cxx b/sfx2/source/dialog/mailmodelapi.cxx
deleted file mode 100644
index 1dbd06987707..000000000000
--- a/sfx2/source/dialog/mailmodelapi.cxx
+++ /dev/null
@@ -1,673 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sfx2.hxx"
-// includes --------------------------------------------------------------
-#include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star/frame/XFrame.hpp>
-#include <com/sun/star/io/XActiveDataSink.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/mozilla/XPluginInstance.hpp>
-#include <com/sun/star/ucb/XDataContainer.hpp>
-#include <com/sun/star/ucb/CommandAbortedException.hpp>
-#include <com/sun/star/uno/Reference.h>
-#include <com/sun/star/util/XURLTransformer.hpp>
-#include <com/sun/star/frame/XStorable.hpp>
-#include <com/sun/star/frame/XDispatchProvider.hpp>
-#include <com/sun/star/frame/XDispatch.hpp>
-#include <com/sun/star/util/XModifiable.hpp>
-#include <com/sun/star/system/XSimpleMailClientSupplier.hpp>
-#include <com/sun/star/system/SimpleMailClientFlags.hpp>
-#include <com/sun/star/frame/XModuleManager.hpp>
-#include <rtl/textench.h>
-#include <osl/mutex.hxx>
-#include <rtl/uri.h>
-#include <rtl/uri.hxx>
-#include <rtl/ustrbuf.hxx>
-#include <unotools/streamhelper.hxx>
-#include <unotools/configitem.hxx>
-#include <comphelper/mediadescriptor.hxx>
-#include <osl/thread.hxx>
-#include <vcl/msgbox.hxx>
-
-#include "mailmodelapi.hxx"
-#include <sfx2/docfilt.hxx>
-#include <sfx2/docfac.hxx>
-#include "sfxtypes.hxx"
-
-#include "dialog.hrc"
-#include "sfxresid.hxx"
-#include <sfx2/sfxuno.hxx>
-#include <sfx2/fcontnr.hxx>
-#include "guisaveas.hxx"
-
-#include <unotools/tempfile.hxx>
-#include <vcl/svapp.hxx>
-#include <svl/stritem.hxx>
-#include <svl/eitem.hxx>
-#include <unotools/useroptions.hxx>
-#include <comphelper/processfactory.hxx>
-#include <comphelper/extract.hxx>
-#include <ucbhelper/content.hxx>
-#include <toolkit/helper/vclunohelper.hxx>
-#include <tools/urlobj.hxx>
-
-extern sal_Bool GetPasswd_Impl( const SfxItemSet* pSet, String& rPasswd );
-
-// --------------------------------------------------------------
-using namespace ::com::sun::star::beans;
-using namespace ::com::sun::star::frame;
-using namespace ::com::sun::star::frame;
-using namespace ::com::sun::star::io;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::mozilla;
-using namespace ::com::sun::star::ucb;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::util;
-using namespace ::com::sun::star::system;
-using namespace ::rtl;
-
-namespace
-{
- // functions -------------------------------------------------------------
-
- BOOL CreateFromAddress_Impl( String& rFrom )
-
- /* [Description]
-
- This function tries to create a From-address with the help of
- IniManagers. For this the fields 'first name', 'Name' and 'Email' are
- read from the application-ini-data. If these fields are not set,
- FALSE is returned.
-
- [Return value]
-
- TRUE: Address could be created.
- FALSE: Address could not be created.
- */
-
- {
- SvtUserOptions aUserCFG;
- String aName = aUserCFG.GetLastName ();
- String aFirstName = aUserCFG.GetFirstName ();
- if ( aFirstName.Len() || aName.Len() )
- {
- if ( aFirstName.Len() )
- {
- rFrom = TRIM( aFirstName );
-
- if ( aName.Len() )
- rFrom += ' ';
- }
- rFrom += TRIM( aName );
- // remove illegal characters
- rFrom.EraseAllChars( '<' );
- rFrom.EraseAllChars( '>' );
- rFrom.EraseAllChars( '@' );
- }
- String aEmailName = aUserCFG.GetEmail();
- // remove illegal characters
- aEmailName.EraseAllChars( '<' );
- aEmailName.EraseAllChars( '>' );
-
- if ( aEmailName.Len() )
- {
- if ( rFrom.Len() )
- rFrom += ' ';
- ( ( rFrom += '<' ) += TRIM( aEmailName ) ) += '>';
- }
- else
- rFrom.Erase();
- return ( rFrom.Len() > 0 );
- }
-
-}
-
-// class osl::Thread
-class OMailSendThreadImpl : public ::osl::Thread
-{
- public:
- OMailSendThreadImpl(
- Reference< XSimpleMailClient > xSimpleMailClient,
- Reference< XSimpleMailMessage > xSimpleMailMessage,
- const Reference< XFrame >& _xCurrentFrame,
- long nSendFlags ) :
- m_nSendFlags( nSendFlags ),
- m_bSend( sal_False ),
- m_xSimpleMailClient( xSimpleMailClient ),
- m_xSimpleMailMessage( xSimpleMailMessage ),
- m_xCurrentFrame(_xCurrentFrame) {}
-
- virtual ~OMailSendThreadImpl();
-
- virtual void SAL_CALL run();
- virtual void SAL_CALL onTerminated();
-
- private:
- long m_nSendFlags;
- sal_Bool m_bSend;
- Reference< XSimpleMailClient > m_xSimpleMailClient;
- Reference< XSimpleMailMessage > m_xSimpleMailMessage;
- Reference< XFrame > m_xCurrentFrame;
-};
-
-OMailSendThreadImpl::~OMailSendThreadImpl()
-{
-}
-
-void SAL_CALL OMailSendThreadImpl::run()
-{
- try
- {
- m_xSimpleMailClient->sendSimpleMailMessage( m_xSimpleMailMessage, m_nSendFlags );
- m_bSend = sal_True;
- }
- catch ( IllegalArgumentException& )
- {
- m_bSend = sal_False;
- }
- catch ( Exception& )
- {
- m_bSend = sal_False;
- }
-
- if ( m_bSend == sal_False )
- {
- SolarMutexGuard aGuard;
- Reference< ::com::sun::star::awt::XWindow > xParentWindow = m_xCurrentFrame->getContainerWindow();
- Window* pParentWindow = VCLUnoHelper::GetWindow( xParentWindow );
-
- ErrorBox aBox( pParentWindow, SfxResId( RID_ERRBOX_MAIL_CONFIG ));
- aBox.Execute();
- }
-}
-
-void SAL_CALL OMailSendThreadImpl::onTerminated()
-{
- delete this;
-}
-
-// class SfxMailModel -----------------------------------------------
-
-void SfxMailModel::ClearList( AddressList_Impl* pList )
-{
- if ( pList )
- {
- for ( size_t i = 0, nCount = pList->size(); i < nCount; ++i )
- delete pList->at(i);
- pList->clear();
- }
-}
-
-void SfxMailModel::MakeValueList( AddressList_Impl* pList, String& rValueList )
-{
- rValueList.Erase();
- if ( pList )
- {
- for ( size_t i = 0, nCount = pList->size(); i < nCount; ++i )
- {
- if ( rValueList.Len() > 0 )
- rValueList += ',';
- rValueList += *pList->at(i);
- }
- }
-}
-namespace
-{
- String lcl_getFactoryName(const Reference<XInterface>& _xModel)
- {
- rtl::OUString sModuleIdentifier;
- rtl::OUString sFactoryShortName;
- Reference < XModuleManager > xModuleManager( ::comphelper::getProcessServiceFactory()->createInstance(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.ModuleManager")) ), UNO_QUERY );
-
- if ( _xModel.is() )
- {
- try
- {
- sModuleIdentifier = xModuleManager->identify( _xModel );
- }
- catch ( ::com::sun::star::frame::UnknownModuleException& )
- {
- DBG_WARNING( "SfxHelp::GetHelpModuleName_Impl(): unknown module (help in help?)" );
- }
- catch ( Exception& )
- {
- DBG_ERRORFILE( "SfxHelp::GetHelpModuleName_Impl(): exception of XModuleManager::identify()" );
- }
- }
-
- return sModuleIdentifier;
- }
-
- String lcl_createTempFileName(const Reference < XModel >& _xModel,const ::rtl::OUString& _sAttachmentTitle)
- {
- // create temp file name with leading chars and extension
- Reference < XStorable > xStor( _xModel, UNO_QUERY );
- String aLeadingStr;
- if ( xStor.is() )
- {
- sal_Bool bHasName = xStor->hasLocation();
-
- if ( !bHasName )
- {
- if ( _sAttachmentTitle.getLength() )
- aLeadingStr = _sAttachmentTitle;
- else
- aLeadingStr = String( DEFINE_CONST_UNICODE("noname") );
- }
- else
- {
- INetURLObject aFileObj(_xModel->getURL());
- if ( aFileObj.hasExtension() )
- {
- aFileObj.removeExtension();
- if ( _sAttachmentTitle.getLength() )
- aLeadingStr = _sAttachmentTitle;
- else
- aLeadingStr = aFileObj.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET );
- aLeadingStr += String::CreateFromAscii( "_" );
- }
- else
- {
- if ( _sAttachmentTitle.getLength() )
- aLeadingStr = _sAttachmentTitle;
- else
- aLeadingStr = aFileObj.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET );
- aLeadingStr += String::CreateFromAscii( "_" );
- }
- }
- }
- return aLeadingStr;
- }
-
-}
-SfxMailModel::SaveResult SfxMailModel::SaveDocument( const ::rtl::OUString& _sAttachmentTitle
- , const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& _xModel
- , String& rFileName)
-{
- SaveResult eRet = SAVE_CANCELLED;
- try
- {
- Reference<XModifiable> xMod(_xModel,UNO_QUERY);
-
- // save the document
- if ( xMod.is() )
- {
- // detect filter
- const SfxFilter* pFilter = SfxFilter::GetDefaultFilter(lcl_getFactoryName(_xModel));
-
- sal_Bool bRet = sal_False;
- // create temp file name with leading chars and extension
- Reference < XStorable > xStor( _xModel, UNO_QUERY );
- if ( xStor.is() )
- {
- String* pExt = NULL;
- INetURLObject aFileObj(_xModel->getURL());
- if ( aFileObj.hasExtension() )
- pExt = new String( String::CreateFromAscii( "." ) + (OUString) aFileObj.getExtension() );
-
- String aLeadingStr = lcl_createTempFileName(_xModel,_sAttachmentTitle);
-
- if ( pFilter && !pExt )
- {
- pExt = new String( pFilter->GetWildcard()().GetToken(0) );
- // erase the '*' from the extension (e.g. "*.sdw")
- pExt->Erase( 0, 1 );
- }
-
- {
- ::utl::TempFile aTempFile( aLeadingStr, pExt );
- rFileName = aTempFile.GetURL();
- }
- delete pExt;
- // save document to temp file
-
- // save document to temp file
- Sequence < PropertyValue > aArgs( _xModel->getArgs() );
- ::comphelper::MediaDescriptor aMedia(aArgs);
-
- if ( pFilter )
- {
- ::rtl::OUString sFilter(pFilter->GetFilterName());
- ::rtl::OUString sFilterName(RTL_CONSTASCII_USTRINGPARAM("FilterName"));
- if ( !aMedia.createItemIfMissing(sFilterName,sFilter) )
- aMedia[sFilterName] <<= sFilter;
- }
-
- ::rtl::OUString sURL(RTL_CONSTASCII_USTRINGPARAM("URL"));
- if ( !aMedia.createItemIfMissing(sURL,::rtl::OUString(rFileName)) )
- aMedia[sURL] <<= ::rtl::OUString(rFileName);
-
- ::rtl::OUString sSaveTo(RTL_CONSTASCII_USTRINGPARAM("SaveTo"));
- if ( !aMedia.createItemIfMissing(sSaveTo,sal_True) )
- aMedia[sSaveTo] <<= sal_True;
-
- ::rtl::OUString sReadOnly(RTL_CONSTASCII_USTRINGPARAM("ReadOnly"));
- if ( !aMedia.createItemIfMissing(sReadOnly,sal_False) )
- aMedia[sReadOnly] <<= sal_False;
-
- aMedia >> aArgs;
-
- try
- {
- Reference < XMultiServiceFactory > xMgr = ::comphelper::getProcessServiceFactory();
- SfxStoringHelper aHelper(xMgr);
- aHelper.GUIStoreModel(_xModel,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SaveAs")),aArgs, sal_False, ::rtl::OUString() );
- bRet = sal_True;
- }
- catch(Exception&)
- {
- }
- }
-
- eRet = bRet ? SAVE_SUCCESSFULL : SAVE_ERROR;
- }
- }
- catch(Exception&)
- {
- OSL_FAIL("Exception catched!");
- }
-
- return eRet;
-}
-SfxMailModel::SaveResult SfxMailModel::SaveDocAsPDF( const ::rtl::OUString& _sAttachmentTitle
- , const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& _xModel
- , String& rFileName)
-{
- SaveResult eRet = SAVE_CANCELLED;
- try
- {
- Reference<XModifiable> xMod(_xModel,UNO_QUERY);
-
- // save the document
- if ( xMod.is() )
- {
- // Get PDF Filter from document
- ::rtl::OUString sPDFMediaType(RTL_CONSTASCII_USTRINGPARAM("application/pdf"));
-
- sal_Bool bRet = sal_False;
- // create temp file name with leading chars and extension
- Reference < XStorable > xStor( _xModel, UNO_QUERY );
- if ( xStor.is() )
- {
- String aLeadingStr = lcl_createTempFileName(_xModel,_sAttachmentTitle);
- String aPDFExtension = String::CreateFromAscii( ".pdf" );
- ::utl::TempFile aTempFile( aLeadingStr, &aPDFExtension );
-
- rFileName = aTempFile.GetURL();
-
- // save document to temp file
- Sequence < PropertyValue > aArgs( _xModel->getArgs() );
- ::comphelper::MediaDescriptor aMedia(aArgs);
-
- ::rtl::OUString sMediaType(RTL_CONSTASCII_USTRINGPARAM("MediaType"));
- if ( !aMedia.createItemIfMissing(sMediaType,sPDFMediaType) )
- aMedia[sMediaType] <<= sPDFMediaType;
-
- ::rtl::OUString sURL(RTL_CONSTASCII_USTRINGPARAM("URL"));
- if ( !aMedia.createItemIfMissing(sURL,::rtl::OUString(rFileName)) )
- aMedia[sURL] <<= ::rtl::OUString(rFileName);
- aMedia >> aArgs;
-
- try
- {
- Reference < XMultiServiceFactory > xMgr = ::comphelper::getProcessServiceFactory();
- SfxStoringHelper aHelper(xMgr);
- aHelper.GUIStoreModel(_xModel,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ExportToPDF")),aArgs, sal_False, ::rtl::OUString);
- bRet = sal_True;
- }
- catch(Exception&)
- {
- }
-
- eRet = bRet ? SAVE_SUCCESSFULL : SAVE_CANCELLED;
- }
- }
- }
- catch(Exception&)
- {
- OSL_FAIL("Exception catched!");
- }
-
- return eRet;
-}
-// -----------------------------------------------------------------------------
-SfxMailModel::SendMailResult SfxMailModel::AttachDocument( MailDocType _eMailDocType
- , const Reference< XModel >& _xModel
- , const ::rtl::OUString& _sAttachmentTitle)
-{
- SaveResult eSaveResult;
- String aFileName;
-
- if ( _eMailDocType == TYPE_SELF )
- eSaveResult = SaveDocument( _sAttachmentTitle,_xModel,aFileName);
- else
- eSaveResult = SaveDocAsPDF( _sAttachmentTitle,_xModel,aFileName);
-
- if ( eSaveResult == SAVE_SUCCESSFULL && aFileName.Len() )
- maAttachedDocuments.push_back(aFileName);
- return eSaveResult == SAVE_SUCCESSFULL ? SEND_MAIL_OK : SEND_MAIL_ERROR;
-}
-// -----------------------------------------------------------------------------
-
-IMPL_LINK_INLINE_START( SfxMailModel, DoneHdl, void*, EMPTYARG )
-{
- mbLoadDone = sal_True;
- return 0;
-}
-// -----------------------------------------------------------------------------
-IMPL_LINK_INLINE_END( SfxMailModel, DoneHdl, void*, EMPTYARG )
-
-SfxMailModel::SfxMailModel( const Reference< XFrame >& _xFrame) :
-
- mpToList ( NULL ),
- mpCcList ( NULL ),
- mpBccList ( NULL ),
- m_xCurrentFrame ( _xFrame ),
- mePriority ( PRIO_NORMAL ),
- mbLoadDone ( sal_True )
-
-{
-}
-
-SfxMailModel::~SfxMailModel()
-{
- ClearList( mpToList );
- delete mpToList;
- ClearList( mpCcList );
- delete mpCcList;
- ClearList( mpBccList );
- delete mpBccList;
-}
-
-void SfxMailModel::AddAddress( const String& rAddress, AddressRole eRole )
-{
- // don't add a empty address
- if ( rAddress.Len() > 0 )
- {
- AddressList_Impl* pList = NULL;
- if ( ROLE_TO == eRole )
- {
- if ( !mpToList )
- // create the list
- mpToList = new AddressList_Impl();
- pList = mpToList;
- }
- else if ( ROLE_CC == eRole )
- {
- if ( !mpCcList )
- // create the list
- mpCcList = new AddressList_Impl();
- pList = mpCcList;
- }
- else if ( ROLE_BCC == eRole )
- {
- if ( !mpBccList )
- // create the list
- mpBccList = new AddressList_Impl();
- pList = mpBccList;
- }
- else
- {
- DBG_ERRORFILE( "invalid address role" );
- }
-
- if ( pList )
- {
- // add address to list
- AddressItemPtr_Impl pAddress = new String( rAddress );
- pList->push_back( pAddress );
- }
- }
-}
-
-SfxMailModel::SendMailResult SfxMailModel::Send( )
-{
- OSL_ENSURE(!maAttachedDocuments.empty(),"No document added!");
- SendMailResult eResult = SEND_MAIL_ERROR;
- if ( !maAttachedDocuments.empty() )
- {
-
- Reference < XMultiServiceFactory > xMgr = ::comphelper::getProcessServiceFactory();
- if ( xMgr.is() )
- {
- Reference< XSimpleMailClientSupplier > xSimpleMailClientSupplier;
-
- // Prefer the SimpleSystemMail service if available
- xSimpleMailClientSupplier = Reference< XSimpleMailClientSupplier >(
- xMgr->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.system.SimpleSystemMail" ))),
- UNO_QUERY );
-
- if ( ! xSimpleMailClientSupplier.is() )
- {
- xSimpleMailClientSupplier = Reference< XSimpleMailClientSupplier >(
- xMgr->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.system.SimpleCommandMail" ))),
- UNO_QUERY );
- }
-
- if ( xSimpleMailClientSupplier.is() )
- {
- Reference< XSimpleMailClient > xSimpleMailClient = xSimpleMailClientSupplier->querySimpleMailClient();
-
- if ( !xSimpleMailClient.is() )
- {
- // no mail client support => message box!
- return SEND_MAIL_ERROR;
- }
-
- // we have a simple mail client
- Reference< XSimpleMailMessage > xSimpleMailMessage = xSimpleMailClient->createSimpleMailMessage();
- if ( xSimpleMailMessage.is() )
- {
- sal_Int32 nSendFlags = SimpleMailClientFlags::DEFAULTS;
- if ( maFromAddress.Len() == 0 )
- {
- // from address not set, try figure out users e-mail address
- CreateFromAddress_Impl( maFromAddress );
- }
- xSimpleMailMessage->setOriginator( maFromAddress );
-
- sal_Int32 nToCount = mpToList ? mpToList->Count() : 0;
- sal_Int32 nCcCount = mpCcList ? mpCcList->Count() : 0;
- sal_Int32 nCcSeqCount = nCcCount;
-
- // set recipient (only one) for this simple mail server!!
- if ( nToCount > 1 )
- {
- nCcSeqCount = nToCount - 1 + nCcCount;
- xSimpleMailMessage->setRecipient( *mpToList->GetObject( 0 ));
- nSendFlags = SimpleMailClientFlags::NO_USER_INTERFACE;
- }
- else if ( nToCount == 1 )
- {
- xSimpleMailMessage->setRecipient( *mpToList->GetObject( 0 ));
- nSendFlags = SimpleMailClientFlags::NO_USER_INTERFACE;
- }
-
- // all other recipient must be handled with CC recipients!
- if ( nCcSeqCount > 0 )
- {
- sal_Int32 nIndex = 0;
- Sequence< OUString > aCcRecipientSeq;
-
- aCcRecipientSeq.realloc( nCcSeqCount );
- if ( nCcSeqCount > nCcCount )
- {
- for ( sal_Int32 i = 1; i < nToCount; ++i )
- {
- aCcRecipientSeq[nIndex++] = *mpToList->GetObject(i);
- }
- }
-
- for ( sal_Int32 i = 0; i < nCcCount; i++ )
- {
- aCcRecipientSeq[nIndex++] = *mpCcList->GetObject(i);
- }
- xSimpleMailMessage->setCcRecipient( aCcRecipientSeq );
- }
-
- sal_Int32 nBccCount = mpBccList ? mpBccList->Count() : 0;
- if ( nBccCount > 0 )
- {
- Sequence< OUString > aBccRecipientSeq( nBccCount );
- for ( sal_Int32 i = 0; i < nBccCount; ++i )
- {
- aBccRecipientSeq[i] = *mpBccList->GetObject(i);
- }
- xSimpleMailMessage->setBccRecipient( aBccRecipientSeq );
- }
-
- Sequence< OUString > aAttachmentSeq(&(maAttachedDocuments[0]),maAttachedDocuments.size());
-
- xSimpleMailMessage->setSubject( maSubject );
- xSimpleMailMessage->setAttachement( aAttachmentSeq );
-
- // Due to the current clipboard implementation we cannot stop the main thread
- // because the clipboard implementation calls the main thread from another thread
- // and this would result in a deadlock!
- // Currently we create a thread to send a message and process all remaining error
- // handling in this thread!!
-
- OMailSendThreadImpl* pMailSendThread = new OMailSendThreadImpl( xSimpleMailClient, xSimpleMailMessage, m_xCurrentFrame,nSendFlags );
- pMailSendThread->create();
-
- // Return always true as the real error handling occurss in the OMailSendThreadImpl-implementation!
- eResult = SEND_MAIL_OK;
- }
- }
- }
- }
- else
- eResult = SEND_MAIL_CANCELLED;
-
- return eResult;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/dialog/mailwindow.src b/sfx2/source/dialog/mailwindow.src
index e5648e7f414f..e5648e7f414f 100644..100755
--- a/sfx2/source/dialog/mailwindow.src
+++ b/sfx2/source/dialog/mailwindow.src
diff --git a/sfx2/source/dialog/makefile.mk b/sfx2/source/dialog/makefile.mk
deleted file mode 100755
index d223d5845cf2..000000000000
--- a/sfx2/source/dialog/makefile.mk
+++ /dev/null
@@ -1,115 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-PRJ=..$/..
-
-PRJNAME=sfx2
-TARGET=dialog
-
-# --- Settings -----------------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Files --------------------------------------------------------------
-
-EXCEPTIONSFILES=\
- $(SLO)$/about.obj \
- $(SLO)$/alienwarn.obj \
- $(SLO)$/basedlgs.obj \
- $(SLO)$/dinfdlg.obj \
- $(SLO)$/dinfedt.obj \
- $(SLO)$/dockwin.obj \
- $(SLO)$/filedlghelper.obj \
- $(SLO)$/filtergrouping.obj \
- $(SLO)$/intro.obj \
- $(SLO)$/itemconnect.obj \
- $(SLO)$/mailmodel.obj \
- $(SLO)$/mgetempl.obj \
- $(SLO)$/navigat.obj \
- $(SLO)$/newstyle.obj \
- $(SLO)$/partwnd.obj \
- $(SLO)$/passwd.obj \
- $(SLO)$/printopt.obj \
- $(SLO)$/recfloat.obj \
- $(SLO)$/securitypage.obj \
- $(SLO)$/sfxdlg.obj \
- $(SLO)$/splitwin.obj \
- $(SLO)$/srchdlg.obj \
- $(SLO)$/styledlg.obj \
- $(SLO)$/tabdlg.obj \
- $(SLO)$/taskpane.obj \
- $(SLO)$/templdlg.obj \
- $(SLO)$/titledockwin.obj \
- $(SLO)$/tplcitem.obj \
- $(SLO)$/versdlg.obj
-
-SLOFILES =\
- $(EXCEPTIONSFILES) \
- $(SLO)$/styfitem.obj \
- $(SLO)$/tplpitem.obj
-
-SRS1NAME=$(TARGET)
-SRC1FILES =\
- recfloat.src \
- alienwarn.src \
- dialog.src \
- dinfdlg.src \
- dinfedt.src \
- filedlghelper.src \
- mailwindow.src \
- mgetempl.src \
- newstyle.src \
- passwd.src \
- templdlg.src \
- versdlg.src \
- printopt.src \
- srchdlg.src \
- securitypage.src \
- titledockwin.src \
- taskpane.src
-
-.IF "$(BUILD_VER_STRING)"!=""
-.IF "$(GUI)"=="UNX"
-CFLAGS+=-DBUILD_VER_STRING='"$(BUILD_VER_STRING)"'
-.ELSE # "$(GUI)"=="UNX"
-CFLAGS+=-DBUILD_VER_STRING="$(subst,",\" "$(BUILD_VER_STRING)")"
-.ENDIF # "$(GUI)"=="UNX"
-.ENDIF
-
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
-$(INCCOM)$/cuilib.hxx: makefile.mk
-.IF "$(GUI)"=="UNX"
- $(RM) $@
- @echo \#define DLL_NAME \"libcui$(DLLPOSTFIX)$(DLLPOST)\" >$@
-.ELSE
- @echo $(EMQ)#define DLL_NAME $(EMQ)"cui$(DLLPOSTFIX)$(DLLPOST)$(EMQ)" >$@
-.ENDIF
-
-$(SLO)$/sfxdlg.obj : $(INCCOM)$/cuilib.hxx
diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx
index 838514be142f..de0240b2b43a 100644..100755
--- a/sfx2/source/dialog/mgetempl.cxx
+++ b/sfx2/source/dialog/mgetempl.cxx
@@ -42,7 +42,7 @@
#include <sfx2/mgetempl.hxx>
#include <sfx2/objsh.hxx>
#include "sfxtypes.hxx"
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include <sfx2/module.hxx>
#include <sfx2/sfx.hrc>
@@ -59,6 +59,7 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage( Window* pParent, const SfxItem
aNameFt ( this, SfxResId( FT_NAME ) ),
aNameEd ( this, SfxResId( ED_NAME ) ),
+ aNameMLE ( this, SfxResId( MLE_NAME ) ),
aAutoCB ( this, SfxResId( CB_AUTO ) ),
aFollowFt ( this, SfxResId( FT_NEXT ) ),
@@ -70,14 +71,14 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage( Window* pParent, const SfxItem
aFilterFt ( this, SfxResId( FT_REGION ) ),
aFilterLb ( this, SfxResId( LB_REGION ) ),
+ aDescGb ( this, SfxResId( GB_DESC ) ),
aDescFt ( this, SfxResId( FT_DESC ) ),
aDescED ( this, SfxResId( ED_DESC ) ),
- aDescGb ( this, SfxResId( GB_DESC ) ),
pStyle( &( (SfxStyleDialog*)pParent->GetParent() )->GetStyleSheet() ),
pItem ( 0 ),
- bModified ( FALSE ),
+ bModified ( sal_False ),
aName ( pStyle->GetName() ),
aFollow ( pStyle->GetFollow() ),
aParent ( pStyle->GetParent() ),
@@ -124,7 +125,7 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage( Window* pParent, const SfxItem
{
// NullString as Name -> generate Name
String aNoName( SfxResId( STR_NONAME ) );
- USHORT nNo = 1;
+ sal_uInt16 nNo = 1;
String aNo( aNoName );
aNoName += String::CreateFromInt32( nNo );
while ( pPool->Find( aNoName ) )
@@ -140,8 +141,17 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage( Window* pParent, const SfxItem
}
aNameEd.SetText(pStyle->GetName());
- if ( !pStyle->IsUserDefined() )
+ // Set the field read-only if it is NOT an user-defined style
+ // but allow selecting and copying
+ if ( !pStyle->IsUserDefined() ) {
aNameEd.SetReadOnly();
+ aNameEd.Hide();
+
+ aNameMLE.SetControlBackground( GetSettings().GetStyleSettings().GetDialogColor() );
+ aNameMLE.SetText( pStyle->GetName() );
+ aNameMLE.EnableCursor( sal_False );
+ aNameMLE.Show();
+ }
if ( pStyle->HasFollowSupport() && pPool )
{
@@ -204,12 +214,12 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage( Window* pParent, const SfxItem
if ( i < nCount )
{
- USHORT nStyleFilterIdx = 0xffff;
+ sal_uInt16 nStyleFilterIdx = 0xffff;
// Filter flags
const SfxStyleFilter& rList = pItem->GetFilterList();
nCount = rList.size();
- USHORT nIdx = 0;
- USHORT nMask = pStyle->GetMask() & ~SFXSTYLEBIT_USERDEF;
+ sal_uInt16 nIdx = 0;
+ sal_uInt16 nMask = pStyle->GetMask() & ~SFXSTYLEBIT_USERDEF;
if ( !nMask ) // User Template?
nMask = pStyle->GetMask();
@@ -299,7 +309,7 @@ void SfxManageStyleSheetPage::UpdateName_Impl( ListBox* pBox,
if ( pBox->IsEnabled() )
{
// it is the current entry, which name was modified
- const BOOL bSelect = pBox->GetSelectEntry() == aBuf;
+ const sal_Bool bSelect = pBox->GetSelectEntry() == aBuf;
pBox->RemoveEntry( aBuf );
pBox->InsertEntry( rNew );
@@ -384,7 +394,7 @@ IMPL_LINK_INLINE_END( SfxManageStyleSheetPage, LoseFocusHdl, Edit *, pEdit )
//-------------------------------------------------------------------------
-BOOL SfxManageStyleSheetPage::FillItemSet( SfxItemSet& rSet )
+sal_Bool SfxManageStyleSheetPage::FillItemSet( SfxItemSet& rSet )
/* [Description]
@@ -397,8 +407,8 @@ BOOL SfxManageStyleSheetPage::FillItemSet( SfxItemSet& rSet )
[Return value]
- BOOL TRUE: The data had been changed
- FALSE: The data had not been changed
+ sal_Bool sal_True: The data had been changed
+ sal_False: The data had not been changed
[Cross-reference]
@@ -406,7 +416,7 @@ BOOL SfxManageStyleSheetPage::FillItemSet( SfxItemSet& rSet )
*/
{
- const USHORT nFilterIdx = aFilterLb.GetSelectEntryPos();
+ const sal_uInt16 nFilterIdx = aFilterLb.GetSelectEntryPos();
// Set Filter
@@ -414,14 +424,14 @@ BOOL SfxManageStyleSheetPage::FillItemSet( SfxItemSet& rSet )
nFilterIdx != aFilterLb.GetSavedValue() &&
aFilterLb.IsEnabled() )
{
- bModified = TRUE;
+ bModified = sal_True;
DBG_ASSERT( pItem, "No Item" );
// is only possibly for user templates
#if OSL_DEBUG_LEVEL > 1
- USHORT nIdx = (USHORT)(long)aFilterLb.GetEntryData( nFilterIdx );
+ sal_uInt16 nIdx = (sal_uInt16)(long)aFilterLb.GetEntryData( nFilterIdx );
SfxFilterTupel* p = pItem->GetFilterList()[ nIdx ];
#endif
- USHORT nMask = pItem->GetFilterList()[ (size_t)aFilterLb.GetEntryData( nFilterIdx ) ]->nFlags | SFXSTYLEBIT_USERDEF;
+ sal_uInt16 nMask = pItem->GetFilterList()[ (size_t)aFilterLb.GetEntryData( nFilterIdx ) ]->nFlags | SFXSTYLEBIT_USERDEF;
pStyle->SetMask( nMask );
}
if(aAutoCB.IsVisible() &&
@@ -451,7 +461,7 @@ void SfxManageStyleSheetPage::Reset( const SfxItemSet& /*rAttrSet*/ )
*/
{
- bModified = FALSE;
+ bModified = sal_False;
String sCmp( pStyle->GetName() );
if ( sCmp != aName )
@@ -493,7 +503,7 @@ void SfxManageStyleSheetPage::Reset( const SfxItemSet& /*rAttrSet*/ )
if ( aFilterLb.IsEnabled() )
{
- USHORT nCmp = pStyle->GetMask();
+ sal_uInt16 nCmp = pStyle->GetMask();
if ( nCmp != nFlags )
pStyle->SetMask( nFlags );
@@ -545,7 +555,7 @@ void SfxManageStyleSheetPage::ActivatePage( const SfxItemSet& rSet)
const SfxPoolItem* pPoolItem;
if ( SFX_ITEM_SET ==
- rSet.GetItemState( SID_ATTR_AUTO_STYLE_UPDATE, FALSE, &pPoolItem ) )
+ rSet.GetItemState( SID_ATTR_AUTO_STYLE_UPDATE, sal_False, &pPoolItem ) )
aAutoCB.Check( ( (const SfxBoolItem*)pPoolItem )->GetValue() );
aAutoCB.SaveValue();
}
@@ -585,7 +595,7 @@ int SfxManageStyleSheetPage::DeactivatePage( SfxItemSet* pItemSet )
aNameEd.SetSelection( Selection( SELECTION_MIN, SELECTION_MAX ) );
return SfxTabPage::KEEP_PAGE;
}
- bModified = TRUE;
+ bModified = sal_True;
}
if ( pStyle->HasFollowSupport() && aFollowLb.IsEnabled() )
@@ -601,7 +611,7 @@ int SfxManageStyleSheetPage::DeactivatePage( SfxItemSet* pItemSet )
aFollowLb.GrabFocus();
return SfxTabPage::KEEP_PAGE;
}
- bModified = TRUE;
+ bModified = sal_True;
}
}
@@ -621,7 +631,7 @@ int SfxManageStyleSheetPage::DeactivatePage( SfxItemSet* pItemSet )
aBaseLb.GrabFocus();
return SfxTabPage::KEEP_PAGE;
}
- bModified = TRUE;
+ bModified = sal_True;
nRet |= (int)SfxTabPage::REFRESH_SET;
}
}
diff --git a/sfx2/source/dialog/mgetempl.hrc b/sfx2/source/dialog/mgetempl.hrc
index e998baba939d..a34700846f9c 100644..100755
--- a/sfx2/source/dialog/mgetempl.hrc
+++ b/sfx2/source/dialog/mgetempl.hrc
@@ -25,6 +25,7 @@
*
************************************************************************/
#define ED_NAME 2
+#define MLE_NAME 13
#define LB_NEXT 4
#define FT_BASE 5
#define LB_BASE 6
diff --git a/sfx2/source/dialog/mgetempl.src b/sfx2/source/dialog/mgetempl.src
index 5da3d69b1d7e..9d359813b82a 100644..100755
--- a/sfx2/source/dialog/mgetempl.src
+++ b/sfx2/source/dialog/mgetempl.src
@@ -44,12 +44,22 @@ TabPage TP_MANAGE_STYLES
};
Edit ED_NAME
{
+ HelpID = "sfx2:Edit:TP_MANAGE_STYLES:ED_NAME";
Border = TRUE ;
Pos = MAP_APPFONT ( 70 , 6 ) ;
Size = MAP_APPFONT ( 184 , 12 ) ;
};
+ MultiLineEdit MLE_NAME
+ {
+ Pos = MAP_APPFONT ( 70 , 8 ) ;
+ Size = MAP_APPFONT ( 80 , 12 ) ;
+ Border = FALSE;
+ ReadOnly = TRUE;
+ Hide = TRUE;
+ };
CheckBox CB_AUTO
{
+ HelpID = "sfx2:CheckBox:TP_MANAGE_STYLES:CB_AUTO";
Pos = MAP_APPFONT ( 164 , 8 ) ;
Size = MAP_APPFONT ( 90 , 10 ) ;
Hide = TRUE ;
@@ -63,6 +73,7 @@ TabPage TP_MANAGE_STYLES
};
ListBox LB_NEXT
{
+ HelpID = "sfx2:ListBox:TP_MANAGE_STYLES:LB_NEXT";
Border = TRUE ;
Pos = MAP_APPFONT ( 70 , 24 ) ;
Size = MAP_APPFONT ( 184 , 65 ) ;
@@ -77,6 +88,7 @@ TabPage TP_MANAGE_STYLES
};
ListBox LB_BASE
{
+ HelpID = "sfx2:ListBox:TP_MANAGE_STYLES:LB_BASE";
Border = TRUE ;
Pos = MAP_APPFONT ( 70 , 42 ) ;
Size = MAP_APPFONT ( 184 , 65 ) ;
@@ -91,6 +103,7 @@ TabPage TP_MANAGE_STYLES
};
ListBox LB_REGION
{
+ HelpID = "sfx2:ListBox:TP_MANAGE_STYLES:LB_REGION";
Border = TRUE ;
Pos = MAP_APPFONT ( 70 , 60 ) ;
Size = MAP_APPFONT ( 184 , 64 ) ;
@@ -105,6 +118,7 @@ TabPage TP_MANAGE_STYLES
};
MultiLineEdit ED_DESC
{
+ HelpID = "sfx2:MultiLineEdit:TP_MANAGE_STYLES:ED_DESC";
Pos = MAP_APPFONT ( 12 , 88 ) ;
Size = MAP_APPFONT ( 236 , 85 ) ;
ReadOnly = TRUE ;
diff --git a/sfx2/source/dialog/navigat.cxx b/sfx2/source/dialog/navigat.cxx
index fa8bba0ed858..de6c5a624f15 100644..100755
--- a/sfx2/source/dialog/navigat.cxx
+++ b/sfx2/source/dialog/navigat.cxx
@@ -34,13 +34,13 @@
#include <sfx2/navigat.hxx>
#include <sfx2/sfx.hrc>
#include <sfx2/app.hxx>
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include "helpid.hrc"
SFX_IMPL_DOCKINGWINDOW( SfxNavigatorWrapper , SID_NAVIGATOR );
SfxNavigatorWrapper::SfxNavigatorWrapper( Window* pParentWnd ,
- USHORT nId ,
+ sal_uInt16 nId ,
SfxBindings* pBindings ,
SfxChildWinInfo* pInfo )
: SfxChildWindow( pParentWnd , nId )
@@ -53,7 +53,7 @@ SfxNavigatorWrapper::SfxNavigatorWrapper( Window* pParentWnd ,
pWindow->SetOutputSizePixel( Size( 270, 240 ) );
( ( SfxDockingWindow* ) pWindow )->Initialize( pInfo );
- SetHideNotDelete( TRUE );
+ SetHideNotDelete( sal_True );
}
SfxNavigator::SfxNavigator( SfxBindings* pBind ,
@@ -86,14 +86,14 @@ void SfxNavigator::Resizing( Size &rSize )
pCon->Resizing( rSize );
}
-BOOL SfxNavigator::Close()
+sal_Bool SfxNavigator::Close()
{
SfxChildWindowContext *pCon = GetChildWindow_Impl()->GetContext_Impl();
DBG_ASSERT( pCon, "No Context!" );
if ( !pCon || pCon->Close() )
return SfxDockingWindow::Close();
else
- return FALSE;
+ return sal_False;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/dialog/newstyle.cxx b/sfx2/source/dialog/newstyle.cxx
index 136c6232c6d6..0984e8c62010 100644..100755
--- a/sfx2/source/dialog/newstyle.cxx
+++ b/sfx2/source/dialog/newstyle.cxx
@@ -35,7 +35,7 @@
#include <sfx2/newstyle.hxx>
#include "dialog.hrc"
#include "newstyle.hrc"
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
// PRIVATE METHODES ------------------------------------------------------
@@ -90,6 +90,7 @@ SfxNewStyleDlg::SfxNewStyleDlg( Window* pParent, SfxStyleSheetBasePool& rInPool
aOKBtn.SetClickHdl(LINK(this, SfxNewStyleDlg, OKHdl));
aColBox.SetModifyHdl(LINK(this, SfxNewStyleDlg, ModifyHdl));
aColBox.SetDoubleClickHdl(LINK(this, SfxNewStyleDlg, OKHdl));
+ aColBox.SetAccessibleName(SfxResId(FL_COL));
SfxStyleSheetBase *pStyle = rPool.First();
while ( pStyle )
diff --git a/sfx2/source/dialog/newstyle.hrc b/sfx2/source/dialog/newstyle.hrc
index 0efc04869ba9..0efc04869ba9 100644..100755
--- a/sfx2/source/dialog/newstyle.hrc
+++ b/sfx2/source/dialog/newstyle.hrc
diff --git a/sfx2/source/dialog/newstyle.src b/sfx2/source/dialog/newstyle.src
index fa5fa62a2ee4..b5954028779b 100644..100755
--- a/sfx2/source/dialog/newstyle.src
+++ b/sfx2/source/dialog/newstyle.src
@@ -28,10 +28,11 @@
#include <sfx2/sfx.hrc>
#include "dialog.hrc"
#include "newstyle.hrc"
+#include "sfx2/sfxcommands.h"
ModalDialog DLG_NEW_STYLE_BY_EXAMPLE
{
- HelpId = SID_STYLE_NEW_BY_EXAMPLE ;
+ HelpId = CMD_SID_STYLE_NEW_BY_EXAMPLE ;
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 177 , 112 ) ;
@@ -45,6 +46,7 @@ ModalDialog DLG_NEW_STYLE_BY_EXAMPLE
};
ComboBox LB_COL
{
+ HelpID = "sfx2:ComboBox:DLG_NEW_STYLE_BY_EXAMPLE:LB_COL";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 94 , 92 ) ;
TabStop = TRUE ;
diff --git a/sfx2/source/dialog/partwnd.cxx b/sfx2/source/dialog/partwnd.cxx
index 908ac4d91dbb..0b40f7c69b67 100644..100755
--- a/sfx2/source/dialog/partwnd.cxx
+++ b/sfx2/source/dialog/partwnd.cxx
@@ -81,7 +81,7 @@ SfxPartChildWnd_Impl::SfxPartChildWnd_Impl
pWindow->SetSizePixel( Size( 175, 175 ) );
( ( SfxDockingWindow* ) pWindow )->Initialize( pInfo );
- SetHideNotDelete( TRUE );
+ SetHideNotDelete( sal_True );
}
SfxPartChildWnd_Impl::~SfxPartChildWnd_Impl()
diff --git a/sfx2/source/dialog/passwd.cxx b/sfx2/source/dialog/passwd.cxx
index 76875a4a69ed..345576e61567 100644..100755
--- a/sfx2/source/dialog/passwd.cxx
+++ b/sfx2/source/dialog/passwd.cxx
@@ -34,20 +34,21 @@
#include <sfx2/passwd.hxx>
#include "sfxtypes.hxx"
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include "dialog.hrc"
#include "passwd.hrc"
#include "vcl/sound.hxx"
+#include "vcl/arrange.hxx"
// -----------------------------------------------------------------------
-IMPL_LINK_INLINE_START( SfxPasswordDialog, EditModifyHdl, Edit *, EMPTYARG )
+IMPL_LINK_INLINE_START( SfxPasswordDialog, EditModifyHdl, Edit *, pEdit )
{
- if( mbAsciiOnly )
+ if( mbAsciiOnly && (pEdit == &maPasswordED || pEdit == &maPassword2ED) )
{
- rtl::OUString aTest( maPasswordED.GetText() );
+ rtl::OUString aTest( pEdit->GetText() );
const sal_Unicode* pTest = aTest.getStr();
sal_Int32 nLen = aTest.getLength();
rtl::OUStringBuffer aFilter( nLen );
@@ -63,12 +64,15 @@ IMPL_LINK_INLINE_START( SfxPasswordDialog, EditModifyHdl, Edit *, EMPTYARG )
if( bReset )
{
Sound::Beep( SOUND_ERROR );
- maPasswordED.SetSelection( Selection( 0, nLen ) );
- maPasswordED.ReplaceSelected( aFilter.makeStringAndClear() );
+ pEdit->SetSelection( Selection( 0, nLen ) );
+ pEdit->ReplaceSelected( aFilter.makeStringAndClear() );
}
}
- maOKBtn.Enable( maPasswordED.GetText().Len() >= mnMinLen );
+ bool bEnable = maPasswordED.GetText().Len() >= mnMinLen;
+ if( maPassword2ED.IsVisible() )
+ bEnable = (bEnable && (maPassword2ED.GetText().Len() >= mnMinLen));
+ maOKBtn.Enable( bEnable );
return 0;
}
IMPL_LINK_INLINE_END( SfxPasswordDialog, EditModifyHdl, Edit *, EMPTYARG )
@@ -77,8 +81,11 @@ IMPL_LINK_INLINE_END( SfxPasswordDialog, EditModifyHdl, Edit *, EMPTYARG )
IMPL_LINK( SfxPasswordDialog, OKHdl, OKButton *, EMPTYARG )
{
- if ( ( ( mnExtras & SHOWEXTRAS_CONFIRM ) == SHOWEXTRAS_CONFIRM ) &&
- ( GetConfirm() != GetPassword() ) )
+ bool bConfirmFailed = ( ( mnExtras & SHOWEXTRAS_CONFIRM ) == SHOWEXTRAS_CONFIRM ) &&
+ ( GetConfirm() != GetPassword() );
+ if( ( mnExtras & SHOWEXTRAS_CONFIRM2 ) == SHOWEXTRAS_CONFIRM2 && ( GetConfirm2() != GetPassword2() ) )
+ bConfirmFailed = true;
+ if ( bConfirmFailed )
{
ErrorBox aBox( this, SfxResId( MSG_ERROR_WRONG_CONFIRM ) );
aBox.Execute();
@@ -96,20 +103,24 @@ SfxPasswordDialog::SfxPasswordDialog( Window* pParent, const String* pGroupText
ModalDialog( pParent, SfxResId ( DLG_PASSWD ) ),
+ maPasswordBox ( this, SfxResId( GB_PASSWD_PASSWORD ) ),
maUserFT ( this, SfxResId( FT_PASSWD_USER ) ),
maUserED ( this, SfxResId( ED_PASSWD_USER ) ),
maPasswordFT ( this, SfxResId( FT_PASSWD_PASSWORD ) ),
maPasswordED ( this, SfxResId( ED_PASSWD_PASSWORD ) ),
maConfirmFT ( this, SfxResId( FT_PASSWD_CONFIRM ) ),
maConfirmED ( this, SfxResId( ED_PASSWD_CONFIRM ) ),
+
maMinLengthFT ( this, SfxResId( FT_PASSWD_MINLEN ) ),
- maPasswordBox ( this, SfxResId( GB_PASSWD_PASSWORD ) ),
+ maPassword2Box ( this, 0 ),
+ maPassword2FT ( this, SfxResId( FT_PASSWD_PASSWORD2 ) ),
+ maPassword2ED ( this, SfxResId( ED_PASSWD_PASSWORD2 ) ),
+ maConfirm2FT ( this, SfxResId( FT_PASSWD_CONFIRM2 ) ),
+ maConfirm2ED ( this, SfxResId( ED_PASSWD_CONFIRM2 ) ),
maOKBtn ( this, SfxResId( BTN_PASSWD_OK ) ),
maCancelBtn ( this, SfxResId( BTN_PASSWD_CANCEL ) ),
maHelpBtn ( this, SfxResId( BTN_PASSWD_HELP ) ),
- maConfirmStr ( SfxResId( STR_PASSWD_CONFIRM ) ),
- mnMinLen ( 5 ),
maMinLenPwdStr ( SfxResId( STR_PASSWD_MIN_LEN ) ),
maEmptyPwdStr ( SfxResId( STR_PASSWD_EMPTY ) ),
maMainPwdStr ( ),
@@ -117,10 +128,63 @@ SfxPasswordDialog::SfxPasswordDialog( Window* pParent, const String* pGroupText
mbAsciiOnly ( false )
{
+ maPasswordED.SetAccessibleName(String(SfxResId(TEXT_PASSWD)));
FreeResource();
+ // setup layout
+ boost::shared_ptr<vcl::RowOrColumn> xLayout =
+ boost::dynamic_pointer_cast<vcl::RowOrColumn>( getLayout() );
+ xLayout->setOuterBorder( 0 );
+
+ // get edit size, should be used as minimum
+ Size aEditSize( maUserED.GetSizePixel() );
+
+ // add labelcolumn for the labeled edit fields
+ boost::shared_ptr<vcl::LabelColumn> xEdits( new vcl::LabelColumn( xLayout.get() ) );
+ size_t nChildIndex = xLayout->addChild( xEdits );
+ xLayout->setBorders( nChildIndex, -2, -2, -2, 0 );
+
+ // add group box
+ xEdits->addWindow( &maPasswordBox );
+
+ // add user line
+ xEdits->addRow( &maUserFT, &maUserED, -2, aEditSize );
+
+ // add password line
+ xEdits->addRow( &maPasswordFT, &maPasswordED, -2, aEditSize );
+
+ // add confirm line
+ xEdits->addRow( &maConfirmFT, &maConfirmED, -2, aEditSize );
+
+ // add second group box
+ xEdits->addWindow( &maPassword2Box );
+
+ // add second password line
+ xEdits->addRow( &maPassword2FT, &maPassword2ED, -2, aEditSize );
+
+ // add second confirm line
+ xEdits->addRow( &maConfirm2FT, &maConfirm2ED, -2, aEditSize );
+
+ // add a FixedLine
+ FixedLine* pLine = new FixedLine( this, 0 );
+ pLine->Show();
+ addWindow( pLine, true );
+ xLayout->addWindow( pLine );
+
+ // add button column
+ Size aBtnSize( maCancelBtn.GetSizePixel() );
+ boost::shared_ptr<vcl::RowOrColumn> xButtons( new vcl::RowOrColumn( xLayout.get(), false ) );
+ nChildIndex = xLayout->addChild( xButtons );
+ xLayout->setBorders( nChildIndex, -2, 0, -2, -2 );
+
+ size_t nBtnIndex = xButtons->addWindow( &maHelpBtn, 0, aBtnSize );
+ xButtons->addChild( new vcl::Spacer( xButtons.get() ) );
+ nBtnIndex = xButtons->addWindow( &maOKBtn, 0, aBtnSize );
+ nBtnIndex = xButtons->addWindow( &maCancelBtn, 0, aBtnSize );
+
Link aLink = LINK( this, SfxPasswordDialog, EditModifyHdl );
maPasswordED.SetModifyHdl( aLink );
+ maPassword2ED.SetModifyHdl( aLink );
aLink = LINK( this, SfxPasswordDialog, OKHdl );
maOKBtn.SetClickHdl( aLink );
@@ -149,7 +213,7 @@ void SfxPasswordDialog::SetPasswdText( )
// -----------------------------------------------------------------------
-void SfxPasswordDialog::SetMinLen( USHORT nLen )
+void SfxPasswordDialog::SetMinLen( sal_uInt16 nLen )
{
mnMinLen = nLen;
SetPasswdText();
@@ -158,7 +222,7 @@ void SfxPasswordDialog::SetMinLen( USHORT nLen )
// -----------------------------------------------------------------------
-void SfxPasswordDialog::SetMaxLen( USHORT nLen )
+void SfxPasswordDialog::SetMaxLen( sal_uInt16 nLen )
{
maPasswordED.SetMaxTextLen( nLen );
maConfirmED.SetMaxTextLen( nLen );
@@ -169,13 +233,30 @@ void SfxPasswordDialog::SetMaxLen( USHORT nLen )
short SfxPasswordDialog::Execute()
{
- if ( mnExtras < SHOWEXTRAS_ALL )
+ maUserFT.Hide();
+ maUserED.Hide();
+ maConfirmFT.Hide();
+ maConfirmED.Hide();
+ maPasswordFT.Hide();
+ maPassword2Box.Hide();
+ maPassword2FT.Hide();
+ maPassword2ED.Hide();
+ maPassword2FT.Hide();
+ maConfirm2FT.Hide();
+ maConfirm2ED.Hide();
+
+ if( mnExtras != SHOWEXTRAS_NONE )
+ maPasswordFT.Show();
+ if( (mnExtras & SHOWEXTRAS_USER ) )
{
+#ifndef _MSC_VER
+#warning Inevitably this layout logic will be wrong post merge until we can see the dialog to test it.
+#endif
Size a3Size = LogicToPixel( Size( 3, 3 ), MAP_APPFONT );
Size a6Size = LogicToPixel( Size( 6, 6 ), MAP_APPFONT );
long nMinHeight = maHelpBtn.GetPosPixel().Y() +
maHelpBtn.GetSizePixel().Height() + a6Size.Height();
- USHORT nRowHided = 1;
+ sal_uInt16 nRowHided = 1;
if ( SHOWEXTRAS_NONE == mnExtras )
{
@@ -229,7 +310,30 @@ short SfxPasswordDialog::Execute()
Size aDlgSize = GetOutputSizePixel();
aDlgSize.Height() = nDlgHeight;
SetOutputSizePixel( aDlgSize );
+
+ maUserFT.Show();
+ maUserED.Show();
+ }
+ if( (mnExtras & SHOWEXTRAS_CONFIRM ) )
+ {
+ maConfirmFT.Show();
+ maConfirmED.Show();
+ }
+ if( (mnExtras & SHOWEXTRAS_PASSWORD2) )
+ {
+ maPassword2Box.Show();
+ maPassword2FT.Show();
+ maPassword2ED.Show();
}
+ if( (mnExtras & SHOWEXTRAS_CONFIRM2 ) )
+ {
+ maConfirm2FT.Show();
+ maConfirm2ED.Show();
+ }
+
+ boost::shared_ptr<vcl::RowOrColumn> xLayout =
+ boost::dynamic_pointer_cast<vcl::RowOrColumn>( getLayout() );
+ SetSizePixel( xLayout->getOptimalSize( WINDOWSIZE_PREFERRED ) );
return ModalDialog::Execute();
}
diff --git a/sfx2/source/dialog/passwd.hrc b/sfx2/source/dialog/passwd.hrc
index b29af8bae9ee..8a82c853320e 100644..100755
--- a/sfx2/source/dialog/passwd.hrc
+++ b/sfx2/source/dialog/passwd.hrc
@@ -42,11 +42,16 @@
#define BTN_PASSWD_CANCEL 21
#define BTN_PASSWD_HELP 22
-#define STR_PASSWD_CONFIRM 30
-#define STR_PASSWD_MIN_LEN 31
-#define STR_PASSWD_EMPTY 32
+#define FT_PASSWD_PASSWORD2 25
+#define ED_PASSWD_PASSWORD2 26
+#define FT_PASSWD_CONFIRM2 27
+#define ED_PASSWD_CONFIRM2 28
-#endif
+#define STR_PASSWD_CONFIRM 29
+#define STR_PASSWD_MIN_LEN 30
+#define STR_PASSWD_EMPTY 31
+
+#define TEXT_PASSWD 32
-// ******************************************************************* EOF
+#endif
diff --git a/sfx2/source/dialog/passwd.src b/sfx2/source/dialog/passwd.src
index bba03b7e8fe9..cca8814d1526 100644..100755
--- a/sfx2/source/dialog/passwd.src
+++ b/sfx2/source/dialog/passwd.src
@@ -47,6 +47,7 @@ ModalDialog DLG_PASSWD
};
Edit ED_PASSWD_USER
{
+ HelpID = "sfx2:Edit:DLG_PASSWD:ED_PASSWD_USER";
Border = TRUE;
Pos = MAP_APPFONT( 57, 14 );
Size = MAP_APPFONT( 75, 12 );
@@ -59,6 +60,7 @@ ModalDialog DLG_PASSWD
};
Edit ED_PASSWD_PASSWORD
{
+ HelpID = "sfx2:Edit:DLG_PASSWD:ED_PASSWD_PASSWORD";
Border = TRUE;
PassWord = TRUE;
Pos = MAP_APPFONT( 57, 29 );
@@ -72,6 +74,7 @@ ModalDialog DLG_PASSWD
};
Edit ED_PASSWD_CONFIRM
{
+ HelpID = "sfx2:Edit:DLG_PASSWD:ED_PASSWD_CONFIRM";
Border = TRUE;
PassWord = TRUE;
Pos = MAP_APPFONT( 57, 44 );
@@ -99,6 +102,32 @@ ModalDialog DLG_PASSWD
Size = MAP_APPFONT( 132, 8 );
Text [ en-US ] = "Password" ;
};
+ FixedText FT_PASSWD_PASSWORD2
+ {
+ Pos = MAP_APPFONT( 12, 30 );
+ Size = MAP_APPFONT( 42, 10 );
+ Text [ en-US ] = "P~assword";
+ };
+ Edit ED_PASSWD_PASSWORD2
+ {
+ Border = TRUE;
+ PassWord = TRUE;
+ Pos = MAP_APPFONT( 57, 29 );
+ Size = MAP_APPFONT( 75, 12 );
+ };
+ FixedText FT_PASSWD_CONFIRM2
+ {
+ Pos = MAP_APPFONT( 12, 45 );
+ Size = MAP_APPFONT( 42, 10 );
+ Text [ en-US ] = "Confir~m";
+ };
+ Edit ED_PASSWD_CONFIRM2
+ {
+ Border = TRUE;
+ PassWord = TRUE;
+ Pos = MAP_APPFONT( 57, 44 );
+ Size = MAP_APPFONT( 75, 12 );
+ };
OKButton BTN_PASSWD_OK
{
Disable = TRUE;
@@ -116,41 +145,10 @@ ModalDialog DLG_PASSWD
Pos = MAP_APPFONT( 144, 43 );
Size = MAP_APPFONT( 50, 14 );
};
- String STR_PASSWD_CONFIRM
+ String TEXT_PASSWD
{
- Text [ en-US ] = "Confirm password" ;
+ Text [ en-US ] = "Password" ;
};
-};
-
-// ********************************************************************** EOF
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+};
diff --git a/sfx2/source/dialog/printopt.cxx b/sfx2/source/dialog/printopt.cxx
index 01cb085b0f1d..bec9a5760c5c 100644..100755
--- a/sfx2/source/dialog/printopt.cxx
+++ b/sfx2/source/dialog/printopt.cxx
@@ -38,12 +38,12 @@
#include "printopt.hrc"
#include "dialog.hrc"
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include <sfx2/viewsh.hxx>
#include <sfx2/printopt.hxx>
-static USHORT aDPIArray[] = { 72, 96, 150, 200, 300, 600 };
-static BOOL bOutputForPrinter = TRUE;
+static sal_uInt16 aDPIArray[] = { 72, 96, 150, 200, 300, 600 };
+static sal_Bool bOutputForPrinter = sal_True;
SfxCommonPrintOptionsTabPage::SfxCommonPrintOptionsTabPage( Window* pParent, const SfxItemSet& rSet ) :
SfxTabPage( pParent, SfxResId( TP_COMMONPRINTOPTIONS ), rSet ),
@@ -78,12 +78,12 @@ SfxCommonPrintOptionsTabPage::SfxCommonPrintOptionsTabPage( Window* pParent, con
if( bOutputForPrinter )
{
- aPrinterOutputRB.Check( TRUE );
+ aPrinterOutputRB.Check( sal_True );
aOutputGB.SetText( OutputDevice::GetNonMnemonicString( aPrinterOutputRB.GetText() ) );
}
else
{
- aPrintFileOutputRB.Check( TRUE );
+ aPrintFileOutputRB.Check( sal_True );
aOutputGB.SetText( OutputDevice::GetNonMnemonicString( aPrintFileOutputRB.GetText() ) );
}
@@ -143,12 +143,12 @@ Window* SfxCommonPrintOptionsTabPage::GetParentLabelFor( const Window* pWindow )
return SfxTabPage::GetParentLabelFor( pWindow );
}
-BOOL SfxCommonPrintOptionsTabPage::FillItemSet( SfxItemSet& /*rSet*/ )
+sal_Bool SfxCommonPrintOptionsTabPage::FillItemSet( SfxItemSet& /*rSet*/ )
{
SvtPrintWarningOptions aWarnOptions;
SvtPrinterOptions aPrinterOptions;
SvtPrintFileOptions aPrintFileOptions;
- BOOL bModified = FALSE;
+ sal_Bool bModified = sal_False;
if( aPaperSizeCB.IsChecked() != aPaperSizeCB.GetSavedValue())
@@ -204,29 +204,29 @@ void SfxCommonPrintOptionsTabPage::ImplUpdateControls( const PrinterOptions* pCu
aReduceTransparencyCB.Check( pCurrentOptions->IsReduceTransparency() );
if( pCurrentOptions->GetReducedTransparencyMode() == PRINTER_TRANSPARENCY_AUTO )
- aReduceTransparencyAutoRB.Check( TRUE );
+ aReduceTransparencyAutoRB.Check( sal_True );
else
- aReduceTransparencyNoneRB.Check( TRUE );
+ aReduceTransparencyNoneRB.Check( sal_True );
aReduceGradientsCB.Check( pCurrentOptions->IsReduceGradients() );
if( pCurrentOptions->GetReducedGradientMode() == PRINTER_GRADIENT_STRIPES )
- aReduceGradientsStripesRB.Check( TRUE );
+ aReduceGradientsStripesRB.Check( sal_True );
else
- aReduceGradientsColorRB.Check( TRUE );
+ aReduceGradientsColorRB.Check( sal_True );
aReduceGradientsStepCountNF.SetValue( pCurrentOptions->GetReducedGradientStepCount() );
aReduceBitmapsCB.Check( pCurrentOptions->IsReduceBitmaps() );
if( pCurrentOptions->GetReducedBitmapMode() == PRINTER_BITMAP_OPTIMAL )
- aReduceBitmapsOptimalRB.Check( TRUE );
+ aReduceBitmapsOptimalRB.Check( sal_True );
else if( pCurrentOptions->GetReducedBitmapMode() == PRINTER_BITMAP_NORMAL )
- aReduceBitmapsNormalRB.Check( TRUE );
+ aReduceBitmapsNormalRB.Check( sal_True );
else
- aReduceBitmapsResolutionRB.Check( TRUE );
+ aReduceBitmapsResolutionRB.Check( sal_True );
- const USHORT nDPI = pCurrentOptions->GetReducedBitmapResolution();
+ const sal_uInt16 nDPI = pCurrentOptions->GetReducedBitmapResolution();
if( nDPI < aDPIArray[ 0 ] )
aReduceBitmapsResolutionLB.SelectEntryPos( 0 );
@@ -236,7 +236,7 @@ void SfxCommonPrintOptionsTabPage::ImplUpdateControls( const PrinterOptions* pCu
{
if( nDPI >= aDPIArray[ i ] )
{
- aReduceBitmapsResolutionLB.SelectEntryPos( (USHORT) i );
+ aReduceBitmapsResolutionLB.SelectEntryPos( (sal_uInt16) i );
i = -1;
}
}
@@ -356,12 +356,12 @@ void SfxCommonPrintOptionsTabPage::ImplSaveControls( PrinterOptions* pCurrentOpt
pCurrentOptions->SetReducedTransparencyMode( aReduceTransparencyAutoRB.IsChecked() ? PRINTER_TRANSPARENCY_AUTO : PRINTER_TRANSPARENCY_NONE );
pCurrentOptions->SetReduceGradients( aReduceGradientsCB.IsChecked() );
pCurrentOptions->SetReducedGradientMode( aReduceGradientsStripesRB.IsChecked() ? PRINTER_GRADIENT_STRIPES : PRINTER_GRADIENT_COLOR );
- pCurrentOptions->SetReducedGradientStepCount( (USHORT) aReduceGradientsStepCountNF.GetValue() );
+ pCurrentOptions->SetReducedGradientStepCount( (sal_uInt16) aReduceGradientsStepCountNF.GetValue() );
pCurrentOptions->SetReduceBitmaps( aReduceBitmapsCB.IsChecked() );
pCurrentOptions->SetReducedBitmapMode( aReduceBitmapsOptimalRB.IsChecked() ? PRINTER_BITMAP_OPTIMAL :
( aReduceBitmapsNormalRB.IsChecked() ? PRINTER_BITMAP_NORMAL : PRINTER_BITMAP_RESOLUTION ) );
- pCurrentOptions->SetReducedBitmapResolution( aDPIArray[ Min( (USHORT) aReduceBitmapsResolutionLB.GetSelectEntryPos(),
- (USHORT)( SAL_N_ELEMENTS( aDPIArray ) - 1 ) ) ] );
+ pCurrentOptions->SetReducedBitmapResolution( aDPIArray[ Min( (sal_uInt16) aReduceBitmapsResolutionLB.GetSelectEntryPos(),
+ (sal_uInt16)( SAL_N_ELEMENTS( aDPIArray ) - 1 ) ) ] );
pCurrentOptions->SetReducedBitmapIncludesTransparency( aReduceBitmapsTransparencyCB.IsChecked() );
pCurrentOptions->SetConvertToGreyscales( aConvertToGreyscalesCB.IsChecked() );
}
@@ -369,7 +369,7 @@ void SfxCommonPrintOptionsTabPage::ImplSaveControls( PrinterOptions* pCurrentOpt
IMPL_LINK( SfxCommonPrintOptionsTabPage, ClickReduceTransparencyCBHdl, CheckBox*, pBox )
{
(void)pBox; //unused
- const BOOL bReduceTransparency = aReduceTransparencyCB.IsChecked();
+ const sal_Bool bReduceTransparency = aReduceTransparencyCB.IsChecked();
aReduceTransparencyAutoRB.Enable( bReduceTransparency );
aReduceTransparencyNoneRB.Enable( bReduceTransparency );
@@ -382,7 +382,7 @@ IMPL_LINK( SfxCommonPrintOptionsTabPage, ClickReduceTransparencyCBHdl, CheckBox*
IMPL_LINK( SfxCommonPrintOptionsTabPage, ClickReduceGradientsCBHdl, CheckBox*, pBox )
{
(void)pBox; //unused
- const BOOL bEnable = aReduceGradientsCB.IsChecked();
+ const sal_Bool bEnable = aReduceGradientsCB.IsChecked();
aReduceGradientsStripesRB.Enable( bEnable );
aReduceGradientsColorRB.Enable( bEnable );
@@ -396,7 +396,7 @@ IMPL_LINK( SfxCommonPrintOptionsTabPage, ClickReduceGradientsCBHdl, CheckBox*, p
IMPL_LINK( SfxCommonPrintOptionsTabPage, ClickReduceBitmapsCBHdl, CheckBox*, pBox )
{
(void)pBox; //unused
- const BOOL bEnable = aReduceBitmapsCB.IsChecked();
+ const sal_Bool bEnable = aReduceBitmapsCB.IsChecked();
aReduceBitmapsOptimalRB.Enable( bEnable );
aReduceBitmapsNormalRB.Enable( bEnable );
@@ -412,7 +412,7 @@ IMPL_LINK( SfxCommonPrintOptionsTabPage, ClickReduceBitmapsCBHdl, CheckBox*, pBo
IMPL_LINK( SfxCommonPrintOptionsTabPage, ToggleReduceGradientsStripesRBHdl, RadioButton*, pButton )
{
(void)pButton; //unused
- const BOOL bEnable = aReduceGradientsCB.IsChecked() && aReduceGradientsStripesRB.IsChecked();
+ const sal_Bool bEnable = aReduceGradientsCB.IsChecked() && aReduceGradientsStripesRB.IsChecked();
aReduceGradientsStepCountNF.Enable( bEnable );
@@ -422,7 +422,7 @@ IMPL_LINK( SfxCommonPrintOptionsTabPage, ToggleReduceGradientsStripesRBHdl, Radi
IMPL_LINK( SfxCommonPrintOptionsTabPage, ToggleReduceBitmapsResolutionRBHdl, RadioButton*, pButton )
{
(void)pButton; //unused
- const BOOL bEnable = aReduceBitmapsCB.IsChecked() && aReduceBitmapsResolutionRB.IsChecked();
+ const sal_Bool bEnable = aReduceBitmapsCB.IsChecked() && aReduceBitmapsResolutionRB.IsChecked();
aReduceBitmapsResolutionLB.Enable( bEnable );
@@ -435,7 +435,7 @@ IMPL_LINK( SfxCommonPrintOptionsTabPage, ToggleOutputPrinterRBHdl, RadioButton*,
{
aOutputGB.SetText( OutputDevice::GetNonMnemonicString( pButton->GetText() ) );
ImplUpdateControls( &maPrinterOptions );
- bOutputForPrinter = TRUE;
+ bOutputForPrinter = sal_True;
// #i63982#
ImplSetAccessibleNames();
}
@@ -451,7 +451,7 @@ IMPL_LINK( SfxCommonPrintOptionsTabPage, ToggleOutputPrintFileRBHdl, RadioButton
{
aOutputGB.SetText( OutputDevice::GetNonMnemonicString( pButton->GetText() ) );
ImplUpdateControls( &maPrintFileOptions );
- bOutputForPrinter = FALSE;
+ bOutputForPrinter = sal_False;
// #i63982#
ImplSetAccessibleNames();
}
diff --git a/sfx2/source/dialog/printopt.hrc b/sfx2/source/dialog/printopt.hrc
index 38c766c9f56a..38c766c9f56a 100644..100755
--- a/sfx2/source/dialog/printopt.hrc
+++ b/sfx2/source/dialog/printopt.hrc
diff --git a/sfx2/source/dialog/printopt.src b/sfx2/source/dialog/printopt.src
index 4217539a3af8..01650f3e9275 100644..100755
--- a/sfx2/source/dialog/printopt.src
+++ b/sfx2/source/dialog/printopt.src
@@ -60,6 +60,7 @@ TabPage TP_COMMONPRINTOPTIONS
};
RadioButton RB_PRINTEROUTPUT
{
+ HelpID = "sfx2:RadioButton:TP_COMMONPRINTOPTIONS:RB_PRINTEROUTPUT";
TabStop = TRUE;
Pos = MAP_APPFONT ( 81, 14 ) ;
Size = MAP_APPFONT ( 60, 10 ) ;
@@ -67,6 +68,7 @@ TabPage TP_COMMONPRINTOPTIONS
};
RadioButton RB_PRINTFILEOUTPUT
{
+ HelpID = "sfx2:RadioButton:TP_COMMONPRINTOPTIONS:RB_PRINTFILEOUTPUT";
TabStop = TRUE;
Pos = MAP_APPFONT ( 142, 14 ) ;
Size = MAP_APPFONT ( 100, 10 ) ;
@@ -83,6 +85,7 @@ TabPage TP_COMMONPRINTOPTIONS
CheckBox CB_REDUCETRANSPARENCY
{
+ HelpID = "sfx2:CheckBox:TP_COMMONPRINTOPTIONS:CB_REDUCETRANSPARENCY";
TabStop = TRUE;
Pos = MAP_APPFONT ( 18, 38 ) ;
Size = MAP_APPFONT ( 115, 10 ) ;
@@ -90,6 +93,7 @@ TabPage TP_COMMONPRINTOPTIONS
};
RadioButton RB_REDUCETRANSPARENCY_AUTO
{
+ HelpID = "sfx2:RadioButton:TP_COMMONPRINTOPTIONS:RB_REDUCETRANSPARENCY_AUTO";
TabStop = TRUE;
Pos = MAP_APPFONT ( 28, 51 ) ;
Size = MAP_APPFONT ( 105, 10 ) ;
@@ -97,6 +101,7 @@ TabPage TP_COMMONPRINTOPTIONS
};
RadioButton RB_REDUCETRANSPARENCY_NONE
{
+ HelpID = "sfx2:RadioButton:TP_COMMONPRINTOPTIONS:RB_REDUCETRANSPARENCY_NONE";
TabStop = TRUE;
Pos = MAP_APPFONT ( 28, 64 ) ;
Size = MAP_APPFONT ( 105, 10 ) ;
@@ -107,6 +112,7 @@ TabPage TP_COMMONPRINTOPTIONS
CheckBox CB_REDUCEGRADIENTS
{
+ HelpID = "sfx2:CheckBox:TP_COMMONPRINTOPTIONS:CB_REDUCEGRADIENTS";
TabStop = TRUE;
Pos = MAP_APPFONT ( 136, 38 ) ;
Size = MAP_APPFONT ( 121, 10 ) ;
@@ -114,6 +120,7 @@ TabPage TP_COMMONPRINTOPTIONS
};
RadioButton RB_REDUCEGRADIENTS_STRIPES
{
+ HelpID = "sfx2:RadioButton:TP_COMMONPRINTOPTIONS:RB_REDUCEGRADIENTS_STRIPES";
TabStop = TRUE;
Pos = MAP_APPFONT ( 146, 51 ) ;
Size = MAP_APPFONT ( 77, 10 ) ;
@@ -121,6 +128,7 @@ TabPage TP_COMMONPRINTOPTIONS
};
NumericField NF_REDUCEGRADIENTS_STEPCOUNT
{
+ HelpID = "sfx2:NumericField:TP_COMMONPRINTOPTIONS:NF_REDUCEGRADIENTS_STEPCOUNT";
TabStop = TRUE;
Border = TRUE ;
Pos = MAP_APPFONT ( 224, 49 ) ;
@@ -132,6 +140,7 @@ TabPage TP_COMMONPRINTOPTIONS
};
RadioButton RB_REDUCEGRADIENTS_COLOR
{
+ HelpID = "sfx2:RadioButton:TP_COMMONPRINTOPTIONS:RB_REDUCEGRADIENTS_COLOR";
TabStop = TRUE;
Pos = MAP_APPFONT ( 146, 64 ) ;
Size = MAP_APPFONT ( 108, 10 ) ;
@@ -142,6 +151,7 @@ TabPage TP_COMMONPRINTOPTIONS
CheckBox CB_REDUCEBITMAPS
{
+ HelpID = "sfx2:CheckBox:TP_COMMONPRINTOPTIONS:CB_REDUCEBITMAPS";
TabStop = TRUE;
Pos = MAP_APPFONT ( 18, 80 ) ;
Size = MAP_APPFONT ( 115, 10 ) ;
@@ -149,6 +159,7 @@ TabPage TP_COMMONPRINTOPTIONS
};
RadioButton RB_REDUCEBITMAPS_OPTIMAL
{
+ HelpID = "sfx2:RadioButton:TP_COMMONPRINTOPTIONS:RB_REDUCEBITMAPS_OPTIMAL";
TabStop = TRUE;
Pos = MAP_APPFONT ( 28, 93 ) ;
Size = MAP_APPFONT ( 226, 10 ) ;
@@ -156,6 +167,7 @@ TabPage TP_COMMONPRINTOPTIONS
};
RadioButton RB_REDUCEBITMAPS_NORMAL
{
+ HelpID = "sfx2:RadioButton:TP_COMMONPRINTOPTIONS:RB_REDUCEBITMAPS_NORMAL";
TabStop = TRUE;
Pos = MAP_APPFONT ( 28, 106 ) ;
Size = MAP_APPFONT ( 226, 10 ) ;
@@ -163,6 +175,7 @@ TabPage TP_COMMONPRINTOPTIONS
};
RadioButton RB_REDUCEBITMAPS_RESOLUTION
{
+ HelpID = "sfx2:RadioButton:TP_COMMONPRINTOPTIONS:RB_REDUCEBITMAPS_RESOLUTION";
TabStop = TRUE;
Pos = MAP_APPFONT ( 28, 119 ) ;
Size = MAP_APPFONT ( 52, 10 ) ;
@@ -170,6 +183,7 @@ TabPage TP_COMMONPRINTOPTIONS
};
ListBox LB_REDUCEBITMAPS_RESOLUTION
{
+ HelpID = "sfx2:ListBox:TP_COMMONPRINTOPTIONS:LB_REDUCEBITMAPS_RESOLUTION";
TabStop = TRUE;
Border = TRUE ;
Pos = MAP_APPFONT ( 81, 117 ) ;
@@ -188,6 +202,7 @@ TabPage TP_COMMONPRINTOPTIONS
};
CheckBox CB_REDUCEBITMAPS_TRANSPARENCY
{
+ HelpID = "sfx2:CheckBox:TP_COMMONPRINTOPTIONS:CB_REDUCEBITMAPS_TRANSPARENCY";
TabStop = TRUE;
Pos = MAP_APPFONT ( 28, 132 ) ;
Size = MAP_APPFONT ( 226, 10 ) ;
@@ -198,6 +213,7 @@ TabPage TP_COMMONPRINTOPTIONS
CheckBox CB_CONVERTTOGREYSCALES
{
+ HelpID = "sfx2:CheckBox:TP_COMMONPRINTOPTIONS:CB_CONVERTTOGREYSCALES";
TabStop = TRUE;
Pos = MAP_APPFONT ( 136, 80 ) ;
Size = MAP_APPFONT ( 123, 10 ) ;
@@ -214,6 +230,7 @@ TabPage TP_COMMONPRINTOPTIONS
};
CheckBox CB_PAPERSIZE
{
+ HelpID = "sfx2:CheckBox:TP_COMMONPRINTOPTIONS:CB_PAPERSIZE";
TabStop = TRUE;
Pos = MAP_APPFONT ( 12, 159 ) ;
Size = MAP_APPFONT ( 123, 10 ) ;
@@ -221,6 +238,7 @@ TabPage TP_COMMONPRINTOPTIONS
};
CheckBox CB_PAPERORIENTATION
{
+ HelpID = "sfx2:CheckBox:TP_COMMONPRINTOPTIONS:CB_PAPERORIENTATION";
TabStop = TRUE;
Pos = MAP_APPFONT ( 12, 172 ) ;
Size = MAP_APPFONT ( 123 , 10 ) ;
@@ -228,6 +246,7 @@ TabPage TP_COMMONPRINTOPTIONS
};
CheckBox CB_TRANSPARENCY
{
+ HelpID = "sfx2:CheckBox:TP_COMMONPRINTOPTIONS:CB_TRANSPARENCY";
TabStop = TRUE;
Pos = MAP_APPFONT ( 136, 159 ) ;
Size = MAP_APPFONT ( 123, 10 ) ;
@@ -241,6 +260,7 @@ TabPage TP_COMMONPRINTOPTIONS
ModalDialog RID_WARN_PRINTTRANSPARENCY
{
+ HelpID = "sfx2:ModalDialog:RID_WARN_PRINTTRANSPARENCY";
OutputSize = TRUE ;
Size = MAP_APPFONT ( 195 , 85 ) ;
Text [ en-US ] = "Warning" ;
@@ -266,6 +286,7 @@ ModalDialog RID_WARN_PRINTTRANSPARENCY
};
PushButton BTN_PRINTTRANS_NO
{
+ HelpID = "sfx2:PushButton:RID_WARN_PRINTTRANSPARENCY:BTN_PRINTTRANS_NO";
Pos = MAP_APPFONT ( 68 , 48 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~No" ;
@@ -278,6 +299,7 @@ ModalDialog RID_WARN_PRINTTRANSPARENCY
};
CheckBox CBX_NOPRINTTRANSWARN
{
+ HelpID = "sfx2:CheckBox:RID_WARN_PRINTTRANSPARENCY:CBX_NOPRINTTRANSWARN";
Pos = MAP_APPFONT ( 6 , 68 ) ;
Size = MAP_APPFONT ( 183 , 10 ) ;
Text [ en-US ] = "~Do not show warning again" ;
diff --git a/sfx2/source/dialog/recfloat.cxx b/sfx2/source/dialog/recfloat.cxx
index 766654e676d1..2fac778744d7 100644..100755
--- a/sfx2/source/dialog/recfloat.cxx
+++ b/sfx2/source/dialog/recfloat.cxx
@@ -43,13 +43,13 @@
#include "recfloat.hxx"
#include "dialog.hrc"
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include <sfx2/app.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/viewsh.hxx>
-#include "imagemgr.hxx"
+#include "sfx2/imagemgr.hxx"
using namespace ::com::sun::star;
@@ -149,21 +149,21 @@ static rtl::OUString GetLabelFromCommandURL( const rtl::OUString& rCommandURL, c
SFX_IMPL_FLOATINGWINDOW( SfxRecordingFloatWrapper_Impl, SID_RECORDING_FLOATWINDOW );
SfxRecordingFloatWrapper_Impl::SfxRecordingFloatWrapper_Impl( Window* pParentWnd ,
- USHORT nId ,
+ sal_uInt16 nId ,
SfxBindings* pBind ,
SfxChildWinInfo* pInfo )
: SfxChildWindow( pParentWnd, nId )
, pBindings( pBind )
{
pWindow = new SfxRecordingFloat_Impl( pBindings, this, pParentWnd );
- SetWantsFocus( FALSE );
+ SetWantsFocus( sal_False );
eChildAlignment = SFX_ALIGN_NOALIGNMENT;
( ( SfxFloatingWindow* ) pWindow )->Initialize( pInfo );
}
SfxRecordingFloatWrapper_Impl::~SfxRecordingFloatWrapper_Impl()
{
- SfxBoolItem aItem( FN_PARAM_1, TRUE );
+ SfxBoolItem aItem( FN_PARAM_1, sal_True );
com::sun::star::uno::Reference< com::sun::star::frame::XDispatchRecorder > xRecorder = pBindings->GetRecorder();
if ( xRecorder.is() )
pBindings->GetDispatcher()->Execute( SID_STOP_RECORDING, SFX_CALLMODE_SYNCHRON, &aItem, 0L );
@@ -172,7 +172,7 @@ SfxRecordingFloatWrapper_Impl::~SfxRecordingFloatWrapper_Impl()
sal_Bool SfxRecordingFloatWrapper_Impl::QueryClose()
{
// asking for recorded macro should be replaced if index access is available!
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
com::sun::star::uno::Reference< com::sun::star::frame::XDispatchRecorder > xRecorder = pBindings->GetRecorder();
if ( xRecorder.is() && xRecorder->getRecordedMacro().getLength() )
{
@@ -222,7 +222,7 @@ SfxRecordingFloat_Impl::SfxRecordingFloat_Impl(
aTbx.SetSelectHdl( LINK( this, SfxRecordingFloat_Impl, Select ) );
// start recording
- SfxBoolItem aItem( SID_RECORDMACRO, TRUE );
+ SfxBoolItem aItem( SID_RECORDMACRO, sal_True );
GetBindings().GetDispatcher()->Execute( SID_RECORDMACRO, SFX_CALLMODE_SYNCHRON, &aItem, 0L );
}
@@ -241,9 +241,9 @@ SfxRecordingFloat_Impl::~SfxRecordingFloat_Impl()
}
}
-BOOL SfxRecordingFloat_Impl::Close()
+sal_Bool SfxRecordingFloat_Impl::Close()
{
- BOOL bRet = SfxFloatingWindow::Close();
+ sal_Bool bRet = SfxFloatingWindow::Close();
return bRet;
}
diff --git a/sfx2/source/dialog/recfloat.src b/sfx2/source/dialog/recfloat.src
index 7c35f2106cee..47e4803c1b5b 100644..100755
--- a/sfx2/source/dialog/recfloat.src
+++ b/sfx2/source/dialog/recfloat.src
@@ -33,6 +33,7 @@
FloatingWindow SID_RECORDING_FLOATWINDOW
{
+ HelpID = "sfx2:FloatingWindow:SID_RECORDING_FLOATWINDOW";
Moveable = TRUE ;
Closeable = TRUE ;
Hide = TRUE ;
diff --git a/sfx2/source/dialog/securitypage.cxx b/sfx2/source/dialog/securitypage.cxx
index 148c8dee03c1..535a74625fc3 100644..100755
--- a/sfx2/source/dialog/securitypage.cxx
+++ b/sfx2/source/dialog/securitypage.cxx
@@ -62,7 +62,7 @@ namespace
enum RedliningMode { RL_NONE, RL_WRITER, RL_CALC };
enum RedlineFunc { RF_ON, RF_PROTECT };
- bool QueryState( USHORT _nSlot, bool& _rValue )
+ bool QueryState( sal_uInt16 _nSlot, bool& _rValue )
{
bool bRet = false;
SfxViewShell* pViewSh = SfxViewShell::Current();
@@ -84,7 +84,7 @@ namespace
bool bRet = false;
if (_eMode != RL_NONE)
{
- USHORT nSlot = _eMode == RL_WRITER ? FN_REDLINE_PROTECT : SID_CHG_PROTECT;
+ sal_uInt16 nSlot = _eMode == RL_WRITER ? FN_REDLINE_PROTECT : SID_CHG_PROTECT;
bRet = QueryState( nSlot, _rValue );
}
return bRet;
@@ -96,7 +96,7 @@ namespace
bool bRet = false;
if (_eMode != RL_NONE)
{
- USHORT nSlot = _eMode == RL_WRITER ? FN_REDLINE_ON : FID_CHG_RECORD;
+ sal_uInt16 nSlot = _eMode == RL_WRITER ? FN_REDLINE_ON : FID_CHG_RECORD;
bRet = QueryState( nSlot, _rValue );
}
return bRet;
@@ -183,7 +183,7 @@ struct SfxSecurityPage_Impl
SfxSecurityPage_Impl( SfxSecurityPage &rDlg, const SfxItemSet &rItemSet );
~SfxSecurityPage_Impl();
- BOOL FillItemSet_Impl( SfxItemSet & );
+ sal_Bool FillItemSet_Impl( SfxItemSet & );
void Reset_Impl( const SfxItemSet & );
};
@@ -262,7 +262,7 @@ SfxSecurityPage_Impl::~SfxSecurityPage_Impl()
}
-BOOL SfxSecurityPage_Impl::FillItemSet_Impl( SfxItemSet & )
+sal_Bool SfxSecurityPage_Impl::FillItemSet_Impl( SfxItemSet & )
{
bool bModified = false;
@@ -334,7 +334,7 @@ void SfxSecurityPage_Impl::Reset_Impl( const SfxItemSet & )
SfxDispatcher* pDisp = pViewSh->GetDispatcher();
if (SFX_ITEM_AVAILABLE <= pDisp->QueryState( SID_HTML_MODE, pItem ))
{
- USHORT nMode = static_cast< const SfxUInt16Item* >( pItem )->GetValue();
+ sal_uInt16 nMode = static_cast< const SfxUInt16Item* >( pItem )->GetValue();
bIsHTMLDoc = ( ( nMode & HTMLMODE_ON ) != 0 );
}
}
@@ -381,9 +381,9 @@ void SfxSecurityPage_Impl::Reset_Impl( const SfxItemSet & )
// A Calc document that is shared will have 'm_eRedlingMode == RL_NONE'
// In shared documents change recording and protection must be disabled,
// similar to documents that do not support change recording at all.
- m_aRecordChangesCB.Check( FALSE );
+ m_aRecordChangesCB.Check( sal_False );
m_aRecordChangesCB.Disable();
- m_aChangeProtectionPB.Check( FALSE );
+ m_aChangeProtectionPB.Check( sal_False );
m_aChangeProtectionPB.Disable();
}
}
@@ -505,7 +505,7 @@ SfxSecurityPage::~SfxSecurityPage()
}
-BOOL SfxSecurityPage::FillItemSet( SfxItemSet & rItemSet )
+sal_Bool SfxSecurityPage::FillItemSet( SfxItemSet & rItemSet )
{
bool bModified = false;
DBG_ASSERT( m_pImpl.get(), "implementation pointer is 0. Still in c-tor?" );
diff --git a/sfx2/source/dialog/securitypage.src b/sfx2/source/dialog/securitypage.src
index 87cc2e1af8d8..87cc2e1af8d8 100644..100755
--- a/sfx2/source/dialog/securitypage.src
+++ b/sfx2/source/dialog/securitypage.src
diff --git a/sfx2/source/dialog/sfxdlg.cxx b/sfx2/source/dialog/sfxdlg.cxx
index 8940e073240a..76010410b898 100644..100755
--- a/sfx2/source/dialog/sfxdlg.cxx
+++ b/sfx2/source/dialog/sfxdlg.cxx
@@ -30,7 +30,7 @@
#include "precompiled_sfx2.hxx"
#include <sfx2/sfxdlg.hxx>
-#include "cuilib.hxx"
+//#include "cuilib.hxx"
#include <osl/module.hxx>
#include <tools/string.hxx>
diff --git a/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx
index b2c4d3d07346..56951f9d6bc0 100644..100755
--- a/sfx2/source/dialog/splitwin.cxx
+++ b/sfx2/source/dialog/splitwin.cxx
@@ -45,7 +45,7 @@
#include <sfx2/dockwin.hxx>
#include <sfx2/app.hxx>
#include "dialog.hrc"
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include <sfx2/mnumgr.hxx>
#include "virtmenu.hxx"
#include <sfx2/msgpool.hxx>
@@ -60,10 +60,10 @@ using namespace ::rtl;
struct SfxDock_Impl
{
- USHORT nType;
+ sal_uInt16 nType;
SfxDockingWindow* pWin; // SplitWindow has this window
- BOOL bNewLine;
- BOOL bHide; // SplitWindow had this window
+ sal_Bool bNewLine;
+ sal_Bool bHide; // SplitWindow had this window
long nSize;
};
@@ -82,21 +82,21 @@ class SfxEmptySplitWin_Impl : public SplitWindow
friend class SfxSplitWindow;
SfxSplitWindow* pOwner;
- BOOL bFadeIn;
- BOOL bAutoHide;
- BOOL bSplit;
- BOOL bEndAutoHide;
+ sal_Bool bFadeIn;
+ sal_Bool bAutoHide;
+ sal_Bool bSplit;
+ sal_Bool bEndAutoHide;
Timer aTimer;
Point aLastPos;
- USHORT nState;
+ sal_uInt16 nState;
SfxEmptySplitWin_Impl( SfxSplitWindow *pParent )
: SplitWindow( pParent->GetParent(), WinBits( WB_BORDER | WB_3DLOOK ) )
, pOwner( pParent )
- , bFadeIn( FALSE )
- , bAutoHide( FALSE )
- , bSplit( FALSE )
- , bEndAutoHide( FALSE )
+ , bFadeIn( sal_False )
+ , bAutoHide( sal_False )
+ , bSplit( sal_False )
+ , bEndAutoHide( sal_False )
, nState( 1 )
{
aTimer.SetTimeoutHdl(
@@ -105,7 +105,7 @@ friend class SfxSplitWindow;
SetAlign( pOwner->GetAlign() );
Actualize();
ShowAutoHideButton( pOwner->IsAutoHideButtonVisible() );
- ShowFadeInHideButton( TRUE );
+ ShowFadeInHideButton( sal_True );
}
~SfxEmptySplitWin_Impl()
@@ -141,7 +141,7 @@ void SfxEmptySplitWin_Impl::AutoHide()
{
pOwner->SetPinned_Impl( !pOwner->bPinned );
pOwner->SaveConfig_Impl();
- bAutoHide = TRUE;
+ bAutoHide = sal_True;
FadeIn();
}
@@ -149,7 +149,7 @@ void SfxEmptySplitWin_Impl::FadeIn()
{
if (!bAutoHide )
bAutoHide = IsFadeNoButtonMode();
- pOwner->SetFadeIn_Impl( TRUE );
+ pOwner->SetFadeIn_Impl( sal_True );
pOwner->Show_Impl();
if ( bAutoHide )
{
@@ -179,7 +179,7 @@ void SfxEmptySplitWin_Impl::MouseMove( const MouseEvent& rMEvt )
//-------------------------------------------------------------------------
SfxSplitWindow::SfxSplitWindow( Window* pParent, SfxChildAlignment eAl,
- SfxWorkWindow *pW, BOOL bWithButtons, WinBits nBits )
+ SfxWorkWindow *pW, sal_Bool bWithButtons, WinBits nBits )
/* [Description]
@@ -193,15 +193,15 @@ SfxSplitWindow::SfxSplitWindow( Window* pParent, SfxChildAlignment eAl,
eAlign(eAl),
pWorkWin(pW),
pDockArr( new SfxDockArr_Impl ),
- bLocked(FALSE),
- bPinned(TRUE),
+ bLocked(sal_False),
+ bPinned(sal_True),
pEmptyWin(NULL),
pActive(NULL)
{
if ( bWithButtons )
{
- ShowAutoHideButton( FALSE ); // no autohide button (pin) anymore
- ShowFadeOutButton( TRUE );
+ ShowAutoHideButton( sal_False ); // no autohide button (pin) anymore
+ ShowFadeOutButton( sal_True );
}
// Set SV-Alignment
@@ -219,7 +219,7 @@ SfxSplitWindow::SfxSplitWindow( Window* pParent, SfxChildAlignment eAl,
break;
case SFX_ALIGN_BOTTOM:
eTbxAlign = WINDOWALIGN_BOTTOM;
- bPinned = TRUE;
+ bPinned = sal_True;
break;
default:
eTbxAlign = WINDOWALIGN_TOP; // some sort of default...
@@ -230,7 +230,7 @@ SfxSplitWindow::SfxSplitWindow( Window* pParent, SfxChildAlignment eAl,
pEmptyWin = new SfxEmptySplitWin_Impl( this );
if ( bPinned )
{
- pEmptyWin->bFadeIn = TRUE;
+ pEmptyWin->bFadeIn = sal_True;
pEmptyWin->nState = 2;
}
@@ -245,26 +245,26 @@ SfxSplitWindow::SfxSplitWindow( Window* pParent, SfxChildAlignment eAl,
OUString aTemp;
if ( aUserItem >>= aTemp )
aWinData = String( aTemp );
- if ( aWinData.Len() && aWinData.GetChar( (USHORT) 0 ) == 'V' )
+ if ( aWinData.Len() && aWinData.GetChar( (sal_uInt16) 0 ) == 'V' )
{
- pEmptyWin->nState = (USHORT) aWinData.GetToken( 1, ',' ).ToInt32();
+ pEmptyWin->nState = (sal_uInt16) aWinData.GetToken( 1, ',' ).ToInt32();
if ( pEmptyWin->nState & 2 )
- pEmptyWin->bFadeIn = TRUE;
- bPinned = TRUE; // always assume pinned - floating mode not used anymore
+ pEmptyWin->bFadeIn = sal_True;
+ bPinned = sal_True; // always assume pinned - floating mode not used anymore
- USHORT i=2;
- USHORT nCount = (USHORT) aWinData.GetToken(i++, ',').ToInt32();
- for ( USHORT n=0; n<nCount; n++ )
+ sal_uInt16 i=2;
+ sal_uInt16 nCount = (sal_uInt16) aWinData.GetToken(i++, ',').ToInt32();
+ for ( sal_uInt16 n=0; n<nCount; n++ )
{
SfxDock_Impl *pDock = new SfxDock_Impl;
pDock->pWin = 0;
- pDock->bNewLine = FALSE;
- pDock->bHide = TRUE;
- pDock->nType = (USHORT) aWinData.GetToken(i++, ',').ToInt32();
+ pDock->bNewLine = sal_False;
+ pDock->bHide = sal_True;
+ pDock->nType = (sal_uInt16) aWinData.GetToken(i++, ',').ToInt32();
if ( !pDock->nType )
{
- // could mean NewLine
- pDock->nType = (USHORT) aWinData.GetToken(i++, ',').ToInt32();
+ // could mean NewLine
+ pDock->nType = (sal_uInt16) aWinData.GetToken(i++, ',').ToInt32();
if ( !pDock->nType )
{
// Read error
@@ -272,7 +272,7 @@ SfxSplitWindow::SfxSplitWindow( Window* pParent, SfxChildAlignment eAl,
break;
}
else
- pDock->bNewLine = TRUE;
+ pDock->bNewLine = sal_True;
}
pDockArr->Insert(pDock,n);
@@ -281,8 +281,8 @@ SfxSplitWindow::SfxSplitWindow( Window* pParent, SfxChildAlignment eAl,
}
else
{
- bPinned = TRUE;
- pEmptyWin->bFadeIn = TRUE;
+ bPinned = sal_True;
+ pEmptyWin->bFadeIn = sal_True;
pEmptyWin->nState = 2;
}
@@ -317,8 +317,8 @@ void SfxSplitWindow::SaveConfig_Impl()
aWinData += String::CreateFromInt32( pEmptyWin->nState );
aWinData += ',';
- USHORT nCount = 0;
- USHORT n;
+ sal_uInt16 nCount = 0;
+ sal_uInt16 n;
for ( n=0; n<pDockArr->Count(); n++ )
{
SfxDock_Impl *pDock = (*pDockArr)[n];
@@ -354,8 +354,8 @@ void SfxSplitWindow::StartSplit()
if ( pEmptyWin )
{
- pEmptyWin->bFadeIn = TRUE;
- pEmptyWin->bSplit = TRUE;
+ pEmptyWin->bFadeIn = sal_True;
+ pEmptyWin->bSplit = sal_True;
}
Rectangle aRect = pWorkWin->GetFreeArea( !bPinned );
@@ -392,17 +392,17 @@ void SfxSplitWindow::SplitResize()
void SfxSplitWindow::Split()
{
if ( pEmptyWin )
- pEmptyWin->bSplit = FALSE;
+ pEmptyWin->bSplit = sal_False;
SplitWindow::Split();
- USHORT nCount = pDockArr->Count();
- for ( USHORT n=0; n<nCount; n++ )
+ sal_uInt16 nCount = pDockArr->Count();
+ for ( sal_uInt16 n=0; n<nCount; n++ )
{
SfxDock_Impl *pD = (*pDockArr)[n];
if ( pD->pWin )
{
- USHORT nId = pD->nType;
+ sal_uInt16 nId = pD->nType;
long nSize = GetItemSize( nId, SWIB_FIXED );
long nSetSize = GetItemSize( GetSet( nId ) );
Size aSize;
@@ -437,13 +437,13 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize
*/
{
short nLine = -1; // so that the first window cab set nline to 0
- USHORT nL;
- USHORT nPos = 0;
- BOOL bNewLine = TRUE;
- BOOL bSaveConfig = FALSE;
+ sal_uInt16 nL;
+ sal_uInt16 nPos = 0;
+ sal_Bool bNewLine = sal_True;
+ sal_Bool bSaveConfig = sal_False;
SfxDock_Impl *pFoundDock=0;
- USHORT nCount = pDockArr->Count();
- for ( USHORT n=0; n<nCount; n++ )
+ sal_uInt16 nCount = pDockArr->Count();
+ for ( sal_uInt16 n=0; n<nCount; n++ )
{
SfxDock_Impl *pDock = (*pDockArr)[n];
if ( pDock->bNewLine )
@@ -455,7 +455,7 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize
// New line
nPos = 0;
- bNewLine = TRUE;
+ bNewLine = sal_True;
}
if ( pDock->pWin )
@@ -475,7 +475,7 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize
}
// Line is opened
- bNewLine = FALSE;
+ bNewLine = sal_False;
if ( pFoundDock )
break;
}
@@ -501,18 +501,18 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize
{
// Not found, insert at end
pFoundDock = new SfxDock_Impl;
- pFoundDock->bHide = TRUE;
+ pFoundDock->bHide = sal_True;
pDockArr->Insert( pFoundDock, nCount );
pFoundDock->nType = pDockWin->GetType();
nLine++;
nPos = 0;
- bNewLine = TRUE;
+ bNewLine = sal_True;
pFoundDock->bNewLine = bNewLine;
- bSaveConfig = TRUE;
+ bSaveConfig = sal_True;
}
pFoundDock->pWin = pDockWin;
- pFoundDock->bHide = FALSE;
+ pFoundDock->bHide = sal_False;
InsertWindow_Impl( pFoundDock, rSize, nLine, nPos, bNewLine );
if ( bSaveConfig )
SaveConfig_Impl();
@@ -520,7 +520,7 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize
//-------------------------------------------------------------------------
-void SfxSplitWindow::ReleaseWindow_Impl(SfxDockingWindow *pDockWin, BOOL bSave)
+void SfxSplitWindow::ReleaseWindow_Impl(SfxDockingWindow *pDockWin, sal_Bool bSave)
/* [Description]
@@ -529,18 +529,18 @@ void SfxSplitWindow::ReleaseWindow_Impl(SfxDockingWindow *pDockWin, BOOL bSave)
{
SfxDock_Impl *pDock=0;
- USHORT nCount = pDockArr->Count();
- BOOL bFound = FALSE;
- for ( USHORT n=0; n<nCount; n++ )
+ sal_uInt16 nCount = pDockArr->Count();
+ sal_Bool bFound = sal_False;
+ for ( sal_uInt16 n=0; n<nCount; n++ )
{
pDock = (*pDockArr)[n];
if ( pDock->nType == pDockWin->GetType() )
{
if ( pDock->bNewLine && n<nCount-1 )
- (*pDockArr)[n+1]->bNewLine = TRUE;
+ (*pDockArr)[n+1]->bNewLine = sal_True;
// Window has a position, this we forget
- bFound = TRUE;
+ bFound = sal_True;
pDockArr->Remove(n);
break;
}
@@ -556,7 +556,7 @@ void SfxSplitWindow::ReleaseWindow_Impl(SfxDockingWindow *pDockWin, BOOL bSave)
//-------------------------------------------------------------------------
void SfxSplitWindow::MoveWindow( SfxDockingWindow* pDockWin, const Size& rSize,
- USHORT nLine, USHORT nPos, BOOL bNewLine)
+ sal_uInt16 nLine, sal_uInt16 nPos, sal_Bool bNewLine)
/* [Description]
@@ -564,7 +564,7 @@ void SfxSplitWindow::MoveWindow( SfxDockingWindow* pDockWin, const Size& rSize,
*/
{
- USHORT nL, nP;
+ sal_uInt16 nL, nP;
GetWindowPos( pDockWin, nL, nP );
if ( nLine > nL && GetItemCount( GetItemId( nL, 0 ) ) == 1 )
@@ -580,7 +580,7 @@ void SfxSplitWindow::MoveWindow( SfxDockingWindow* pDockWin, const Size& rSize,
//-------------------------------------------------------------------------
void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize,
- USHORT nLine, USHORT nPos, BOOL bNewLine)
+ sal_uInt16 nLine, sal_uInt16 nPos, sal_Bool bNewLine)
/* [Description]
@@ -588,9 +588,9 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize
given position and size.
*/
{
- ReleaseWindow_Impl( pDockWin, FALSE );
+ ReleaseWindow_Impl( pDockWin, sal_False );
SfxDock_Impl *pDock = new SfxDock_Impl;
- pDock->bHide = FALSE;
+ pDock->bHide = sal_False;
pDock->nType = pDockWin->GetType();
pDock->bNewLine = bNewLine;
pDock->pWin = pDockWin;
@@ -601,12 +601,12 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize
// The window must be inserted before the first window so that it has the
// same or a greater position than pDockWin.
- USHORT nCount = pDockArr->Count();
- USHORT nLastWindowIdx(0);
+ sal_uInt16 nCount = pDockArr->Count();
+ sal_uInt16 nLastWindowIdx(0);
// If no window is found, a first window is inserted
- USHORT nInsertPos = 0;
- for ( USHORT n=0; n<nCount; n++ )
+ sal_uInt16 nInsertPos = 0;
+ for ( sal_uInt16 n=0; n<nCount; n++ )
{
SfxDock_Impl *pD = (*pDockArr)[n];
@@ -617,7 +617,7 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize
// the end.
nInsertPos = nCount;
nLastWindowIdx = n;
- USHORT nL=0, nP=0;
+ sal_uInt16 nL=0, nP=0;
GetWindowPos( pD->pWin, nL, nP );
if ( (nL == nLine && nP == nPos) || nL > nLine )
@@ -628,8 +628,8 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize
DBG_ASSERT(pD->bNewLine, "No new line?");
// The posption is pushed to nPos==0
- pD->bNewLine = FALSE;
- pDock->bNewLine = TRUE;
+ pD->bNewLine = sal_False;
+ pDock->bNewLine = sal_True;
}
nInsertPos = n != 0 ? nLastWindowIdx + 1 : 0; // ignore all non-windows after the last window
@@ -651,7 +651,7 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize
void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl* pDock,
const Size& rSize,
- USHORT nLine, USHORT nPos, BOOL bNewLine)
+ sal_uInt16 nLine, sal_uInt16 nPos, sal_Bool bNewLine)
/* [Description]
@@ -662,7 +662,7 @@ void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl* pDock,
{
SfxDockingWindow* pDockWin = pDock->pWin;
- USHORT nItemBits = pDockWin->GetWinBits_Impl();
+ sal_uInt16 nItemBits = pDockWin->GetWinBits_Impl();
long nWinSize, nSetSize;
if ( IsHorizontal() )
@@ -678,24 +678,24 @@ void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl* pDock,
pDock->nSize = nWinSize;
- BOOL bUpdateMode = IsUpdateMode();
+ sal_Bool bUpdateMode = IsUpdateMode();
if ( bUpdateMode )
- SetUpdateMode( FALSE );
+ SetUpdateMode( sal_False );
if ( bNewLine || nLine == GetItemCount( 0 ) )
{
// An existing row should not be inserted, instead a new one
// will be created
- USHORT nId = 1;
- for ( USHORT n=0; n<GetItemCount(0); n++ )
+ sal_uInt16 nId = 1;
+ for ( sal_uInt16 n=0; n<GetItemCount(0); n++ )
{
if ( GetItemId(n) >= nId )
nId = GetItemId(n)+1;
}
// Create a new nLine:th line
- USHORT nBits = nItemBits;
+ sal_uInt16 nBits = nItemBits;
if ( GetAlign() == WINDOWALIGN_TOP || GetAlign() == WINDOWALIGN_BOTTOM )
nBits |= SWIB_COLSET;
InsertItem( nId, nSetSize, nLine, 0, nBits );
@@ -706,8 +706,8 @@ void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl* pDock,
// "pixel" actually only makes sense if also items with percentage or
// relative sizes are present.
nItemBits |= SWIB_PERCENTSIZE;
- bLocked = TRUE;
- USHORT nSet = GetItemId( nLine );
+ bLocked = sal_True;
+ sal_uInt16 nSet = GetItemId( nLine );
InsertItem( pDockWin->GetType(), pDockWin, nWinSize, nPos, nSet, nItemBits );
// SplitWindows are once created in SFX and when inserting the first
@@ -718,21 +718,21 @@ void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl* pDock,
// caues by SfxDockingwindow (->SfxWorkWindow::ConfigChild_Impl)
if ( !bPinned && !IsFloatingMode() )
{
- bPinned = TRUE;
- BOOL bFadeIn = ( pEmptyWin->nState & 2 ) != 0;
- pEmptyWin->bFadeIn = FALSE;
- SetPinned_Impl( FALSE );
+ bPinned = sal_True;
+ sal_Bool bFadeIn = ( pEmptyWin->nState & 2 ) != 0;
+ pEmptyWin->bFadeIn = sal_False;
+ SetPinned_Impl( sal_False );
pEmptyWin->Actualize();
OSL_TRACE( "SfxSplitWindow::InsertWindow_Impl - registering empty Splitwindow" );
- pWorkWin->RegisterChild_Impl( *GetSplitWindow(), eAlign, TRUE )->nVisible = CHILD_VISIBLE;
+ pWorkWin->RegisterChild_Impl( *GetSplitWindow(), eAlign, sal_True )->nVisible = CHILD_VISIBLE;
pWorkWin->ArrangeChilds_Impl();
if ( bFadeIn )
FadeIn();
}
else
{
- BOOL bFadeIn = ( pEmptyWin->nState & 2 ) != 0;
- pEmptyWin->bFadeIn = FALSE;
+ sal_Bool bFadeIn = ( pEmptyWin->nState & 2 ) != 0;
+ pEmptyWin->bFadeIn = sal_False;
pEmptyWin->Actualize();
#ifdef DBG_UTIL
if ( !bPinned || !pEmptyWin->bFadeIn )
@@ -744,7 +744,7 @@ void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl* pDock,
OSL_TRACE( "SfxSplitWindow::InsertWindow_Impl - registering real Splitwindow" );
}
#endif
- pWorkWin->RegisterChild_Impl( *GetSplitWindow(), eAlign, TRUE )->nVisible = CHILD_VISIBLE;
+ pWorkWin->RegisterChild_Impl( *GetSplitWindow(), eAlign, sal_True )->nVisible = CHILD_VISIBLE;
pWorkWin->ArrangeChilds_Impl();
if ( bFadeIn )
FadeIn();
@@ -754,13 +754,13 @@ void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl* pDock,
}
if ( bUpdateMode )
- SetUpdateMode( TRUE );
- bLocked = FALSE;
+ SetUpdateMode( sal_True );
+ bLocked = sal_False;
}
//-------------------------------------------------------------------------
-void SfxSplitWindow::RemoveWindow( SfxDockingWindow* pDockWin, BOOL bHide )
+void SfxSplitWindow::RemoveWindow( SfxDockingWindow* pDockWin, sal_Bool bHide )
/* [Description]
@@ -768,7 +768,7 @@ void SfxSplitWindow::RemoveWindow( SfxDockingWindow* pDockWin, BOOL bHide )
beeing hidden.
*/
{
- USHORT nSet = GetSet( pDockWin->GetType() );
+ sal_uInt16 nSet = GetSet( pDockWin->GetType() );
// SplitWindows are once created in SFX and is made invisible after
// removing the last DockingWindows.
@@ -777,7 +777,7 @@ void SfxSplitWindow::RemoveWindow( SfxDockingWindow* pDockWin, BOOL bHide )
// The Rearranging in WorkWindow is caues by SfxDockingwindow
Hide();
pEmptyWin->aTimer.Stop();
- USHORT nRealState = pEmptyWin->nState;
+ sal_uInt16 nRealState = pEmptyWin->nState;
FadeOut_Impl();
pEmptyWin->Hide();
#ifdef DBG_UTIL
@@ -796,8 +796,8 @@ void SfxSplitWindow::RemoveWindow( SfxDockingWindow* pDockWin, BOOL bHide )
}
SfxDock_Impl *pDock=0;
- USHORT nCount = pDockArr->Count();
- for ( USHORT n=0; n<nCount; n++ )
+ sal_uInt16 nCount = pDockArr->Count();
+ for ( sal_uInt16 n=0; n<nCount; n++ )
{
pDock = (*pDockArr)[n];
if ( pDock->nType == pDockWin->GetType() )
@@ -810,10 +810,10 @@ void SfxSplitWindow::RemoveWindow( SfxDockingWindow* pDockWin, BOOL bHide )
// Remove Windows, and if it was the last of the line, then also remove
// the line (line = itemset)
- BOOL bUpdateMode = IsUpdateMode();
+ sal_Bool bUpdateMode = IsUpdateMode();
if ( bUpdateMode )
- SetUpdateMode( FALSE );
- bLocked = TRUE;
+ SetUpdateMode( sal_False );
+ bLocked = sal_True;
RemoveItem( pDockWin->GetType() );
@@ -821,14 +821,14 @@ void SfxSplitWindow::RemoveWindow( SfxDockingWindow* pDockWin, BOOL bHide )
RemoveItem( nSet );
if ( bUpdateMode )
- SetUpdateMode( TRUE );
- bLocked = FALSE;
+ SetUpdateMode( sal_True );
+ bLocked = sal_False;
};
//-------------------------------------------------------------------------
-BOOL SfxSplitWindow::GetWindowPos( const SfxDockingWindow* pWindow,
- USHORT& rLine, USHORT& rPos ) const
+sal_Bool SfxSplitWindow::GetWindowPos( const SfxDockingWindow* pWindow,
+ sal_uInt16& rLine, sal_uInt16& rPos ) const
/* [Description]
Returns the ID of the item sets and items for the DockingWindow in
@@ -836,19 +836,19 @@ BOOL SfxSplitWindow::GetWindowPos( const SfxDockingWindow* pWindow,
*/
{
- USHORT nSet = GetSet ( pWindow->GetType() );
+ sal_uInt16 nSet = GetSet ( pWindow->GetType() );
if ( nSet == SPLITWINDOW_ITEM_NOTFOUND )
- return FALSE;
+ return sal_False;
rPos = GetItemPos( pWindow->GetType(), nSet );
rLine = GetItemPos( nSet );
- return TRUE;
+ return sal_True;
}
//-------------------------------------------------------------------------
-BOOL SfxSplitWindow::GetWindowPos( const Point& rTestPos,
- USHORT& rLine, USHORT& rPos ) const
+sal_Bool SfxSplitWindow::GetWindowPos( const Point& rTestPos,
+ sal_uInt16& rLine, sal_uInt16& rPos ) const
/* [Description]
Returns the ID of the item sets and items for the DockingWindow in
@@ -856,19 +856,19 @@ BOOL SfxSplitWindow::GetWindowPos( const Point& rTestPos,
*/
{
- USHORT nId = GetItemId( rTestPos );
+ sal_uInt16 nId = GetItemId( rTestPos );
if ( nId == 0 )
- return FALSE;
+ return sal_False;
- USHORT nSet = GetSet ( nId );
+ sal_uInt16 nSet = GetSet ( nId );
rPos = GetItemPos( nId, nSet );
rLine = GetItemPos( nSet );
- return TRUE;
+ return sal_True;
}
//-------------------------------------------------------------------------
-USHORT SfxSplitWindow::GetLineCount() const
+sal_uInt16 SfxSplitWindow::GetLineCount() const
/* [Description]
@@ -880,33 +880,33 @@ USHORT SfxSplitWindow::GetLineCount() const
//-------------------------------------------------------------------------
-long SfxSplitWindow::GetLineSize( USHORT nLine ) const
+long SfxSplitWindow::GetLineSize( sal_uInt16 nLine ) const
/* [Description]
Returns the Row Height of nline itemset.
*/
{
- USHORT nId = GetItemId( nLine );
+ sal_uInt16 nId = GetItemId( nLine );
return GetItemSize( nId );
}
//-------------------------------------------------------------------------
-USHORT SfxSplitWindow::GetWindowCount( USHORT nLine ) const
+sal_uInt16 SfxSplitWindow::GetWindowCount( sal_uInt16 nLine ) const
/* [Description]
Returns the total number of windows
*/
{
- USHORT nId = GetItemId( nLine );
+ sal_uInt16 nId = GetItemId( nLine );
return GetItemCount( nId );
}
//-------------------------------------------------------------------------
-USHORT SfxSplitWindow::GetWindowCount() const
+sal_uInt16 SfxSplitWindow::GetWindowCount() const
/* [Description]
@@ -930,11 +930,11 @@ IMPL_LINK( SfxSplitWindow, TimerHdl, Timer*, pTimer)
if ( pTimer )
pTimer->Stop();
- if ( CursorIsOverRect( FALSE ) || !pTimer )
+ if ( CursorIsOverRect( sal_False ) || !pTimer )
{
// If the cursor is within the window, display the SplitWindow and set
// up the timer for close
- pEmptyWin->bAutoHide = TRUE;
+ pEmptyWin->bAutoHide = sal_True;
if ( !IsVisible() )
pEmptyWin->FadeIn();
@@ -957,16 +957,16 @@ IMPL_LINK( SfxSplitWindow, TimerHdl, Timer*, pTimer)
// (user has simply moved the mouse over pEmptyWin)
if ( IsVisible() )
{
- pEmptyWin->bEndAutoHide = FALSE;
+ pEmptyWin->bEndAutoHide = sal_False;
if ( !Application::IsInModalMode() &&
!PopupMenu::IsInExecute() &&
- !pEmptyWin->bSplit && !HasChildPathFocus( TRUE ) )
+ !pEmptyWin->bSplit && !HasChildPathFocus( sal_True ) )
{
// While a modal dialog or a popup menu is open or while the
// Splitting is done, in any case, do not close. Even as long
// as one of the Children has the focus, the window remains
// open.
- pEmptyWin->bEndAutoHide = TRUE;
+ pEmptyWin->bEndAutoHide = sal_True;
}
if ( pEmptyWin->bEndAutoHide )
@@ -998,9 +998,9 @@ IMPL_LINK( SfxSplitWindow, TimerHdl, Timer*, pTimer)
//-------------------------------------------------------------------------
-BOOL SfxSplitWindow::CursorIsOverRect( BOOL bForceAdding ) const
+sal_Bool SfxSplitWindow::CursorIsOverRect( sal_Bool bForceAdding ) const
{
- BOOL bVisible = IsVisible();
+ sal_Bool bVisible = IsVisible();
// Also, take the collapsed SplitWindow into account
Point aPos = pEmptyWin->GetParent()->OutputToScreenPixel( pEmptyWin->GetPosPixel() );
@@ -1033,8 +1033,8 @@ BOOL SfxSplitWindow::CursorIsOverRect( BOOL bForceAdding ) const
}
if ( aRect.IsInside( OutputToScreenPixel( ((Window*)this)->GetPointerPosPixel() ) ) )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
//-------------------------------------------------------------------------
@@ -1047,19 +1047,19 @@ SplitWindow* SfxSplitWindow::GetSplitWindow()
}
//-------------------------------------------------------------------------
-BOOL SfxSplitWindow::IsFadeIn() const
+sal_Bool SfxSplitWindow::IsFadeIn() const
{
return pEmptyWin->bFadeIn;
}
-BOOL SfxSplitWindow::IsAutoHide( BOOL bSelf ) const
+sal_Bool SfxSplitWindow::IsAutoHide( sal_Bool bSelf ) const
{
return bSelf ? pEmptyWin->bAutoHide && !pEmptyWin->bEndAutoHide : pEmptyWin->bAutoHide;
}
//-------------------------------------------------------------------------
-void SfxSplitWindow::SetPinned_Impl( BOOL bOn )
+void SfxSplitWindow::SetPinned_Impl( sal_Bool bOn )
{
if ( bPinned == bOn )
return;
@@ -1079,13 +1079,13 @@ void SfxSplitWindow::SetPinned_Impl( BOOL bOn )
Hide();
pEmptyWin->Actualize();
OSL_TRACE( "SfxSplitWindow::SetPinned_Impl - registering empty Splitwindow" );
- pWorkWin->RegisterChild_Impl( *pEmptyWin, eAlign, TRUE )->nVisible = CHILD_VISIBLE;
+ pWorkWin->RegisterChild_Impl( *pEmptyWin, eAlign, sal_True )->nVisible = CHILD_VISIBLE;
}
Point aPos( GetPosPixel() );
aPos = GetParent()->OutputToScreenPixel( aPos );
SetFloatingPos( aPos );
- SetFloatingMode( TRUE );
+ SetFloatingMode( sal_True );
GetFloatingWindow()->SetOutputSizePixel( GetOutputSizePixel() );
if ( pEmptyWin->bFadeIn )
@@ -1095,7 +1095,7 @@ void SfxSplitWindow::SetPinned_Impl( BOOL bOn )
{
pEmptyWin->nState &= ~1;
SetOutputSizePixel( GetFloatingWindow()->GetOutputSizePixel() );
- SetFloatingMode( FALSE );
+ SetFloatingMode( sal_False );
if ( pEmptyWin->bFadeIn )
{
@@ -1104,7 +1104,7 @@ void SfxSplitWindow::SetPinned_Impl( BOOL bOn )
pWorkWin->ReleaseChild_Impl( *pEmptyWin );
pEmptyWin->Hide();
OSL_TRACE( "SfxSplitWindow::SetPinned_Impl - registering real Splitwindow" );
- pWorkWin->RegisterChild_Impl( *this, eAlign, TRUE )->nVisible = CHILD_VISIBLE;
+ pWorkWin->RegisterChild_Impl( *this, eAlign, sal_True )->nVisible = CHILD_VISIBLE;
}
}
@@ -1114,7 +1114,7 @@ void SfxSplitWindow::SetPinned_Impl( BOOL bOn )
//-------------------------------------------------------------------------
-void SfxSplitWindow::SetFadeIn_Impl( BOOL bOn )
+void SfxSplitWindow::SetFadeIn_Impl( sal_Bool bOn )
{
if ( bOn == pEmptyWin->bFadeIn )
return;
@@ -1138,14 +1138,14 @@ void SfxSplitWindow::SetFadeIn_Impl( BOOL bOn )
pWorkWin->ReleaseChild_Impl( *pEmptyWin );
pEmptyWin->Hide();
OSL_TRACE( "SfxSplitWindow::SetFadeIn_Impl - registering real Splitwindow" );
- pWorkWin->RegisterChild_Impl( *this, eAlign, TRUE )->nVisible = CHILD_VISIBLE;
+ pWorkWin->RegisterChild_Impl( *this, eAlign, sal_True )->nVisible = CHILD_VISIBLE;
pWorkWin->ArrangeChilds_Impl();
pWorkWin->ShowChilds_Impl();
}
}
else
{
- pEmptyWin->bAutoHide = FALSE;
+ pEmptyWin->bAutoHide = sal_False;
pEmptyWin->nState &= ~2;
if ( !IsFloatingMode() )
{
@@ -1155,7 +1155,7 @@ void SfxSplitWindow::SetFadeIn_Impl( BOOL bOn )
Hide();
pEmptyWin->Actualize();
OSL_TRACE( "SfxSplitWindow::SetFadeIn_Impl - registering empty Splitwindow" );
- pWorkWin->RegisterChild_Impl( *pEmptyWin, eAlign, TRUE )->nVisible = CHILD_VISIBLE;
+ pWorkWin->RegisterChild_Impl( *pEmptyWin, eAlign, sal_True )->nVisible = CHILD_VISIBLE;
pWorkWin->ArrangeChilds_Impl();
pWorkWin->ShowChilds_Impl();
pWorkWin->ArrangeAutoHideWindows( this );
@@ -1175,13 +1175,13 @@ void SfxSplitWindow::AutoHide()
if ( !bPinned )
{
// It "floats", thus dock it again
- SetPinned_Impl( TRUE );
+ SetPinned_Impl( sal_True );
pWorkWin->ArrangeChilds_Impl();
}
else
{
// In "limbo"
- SetPinned_Impl( FALSE );
+ SetPinned_Impl( sal_False );
pWorkWin->ArrangeChilds_Impl();
pWorkWin->ArrangeAutoHideWindows( this );
}
@@ -1194,11 +1194,11 @@ void SfxSplitWindow::FadeOut_Impl()
{
if ( pEmptyWin->aTimer.IsActive() )
{
- pEmptyWin->bAutoHide = FALSE;
+ pEmptyWin->bAutoHide = sal_False;
pEmptyWin->aTimer.Stop();
}
- SetFadeIn_Impl( FALSE );
+ SetFadeIn_Impl( sal_False );
Show_Impl();
}
@@ -1210,14 +1210,14 @@ void SfxSplitWindow::FadeOut()
void SfxSplitWindow::FadeIn()
{
- SetFadeIn_Impl( TRUE );
+ SetFadeIn_Impl( sal_True );
Show_Impl();
}
void SfxSplitWindow::Show_Impl()
{
- USHORT nCount = pDockArr->Count();
- for ( USHORT n=0; n<nCount; n++ )
+ sal_uInt16 nCount = pDockArr->Count();
+ for ( sal_uInt16 n=0; n<nCount; n++ )
{
SfxDock_Impl *pDock = (*pDockArr)[n];
if ( pDock->pWin )
@@ -1225,12 +1225,12 @@ void SfxSplitWindow::Show_Impl()
}
}
-BOOL SfxSplitWindow::ActivateNextChild_Impl( BOOL bForward )
+sal_Bool SfxSplitWindow::ActivateNextChild_Impl( sal_Bool bForward )
{
// If no pActive, go to first and last window (!bForward is first
// decremented in the loop)
- USHORT nCount = pDockArr->Count();
- USHORT n = bForward ? 0 : nCount;
+ sal_uInt16 nCount = pDockArr->Count();
+ sal_uInt16 n = bForward ? 0 : nCount;
// if Focus is within, then move to a window forward or backwards
// if possible
@@ -1253,31 +1253,31 @@ BOOL SfxSplitWindow::ActivateNextChild_Impl( BOOL bForward )
if ( bForward )
{
// Search for next window
- for ( USHORT nNext=n; nNext<nCount; nNext++ )
+ for ( sal_uInt16 nNext=n; nNext<nCount; nNext++ )
{
SfxDock_Impl *pD = (*pDockArr)[nNext];
if ( pD->pWin )
{
pD->pWin->GrabFocus();
- return TRUE;
+ return sal_True;
}
}
}
else
{
// Search for previous window
- for ( USHORT nNext=n; nNext--; )
+ for ( sal_uInt16 nNext=n; nNext--; )
{
SfxDock_Impl *pD = (*pDockArr)[nNext];
if ( pD->pWin )
{
pD->pWin->GrabFocus();
- return TRUE;
+ return sal_True;
}
}
}
- return FALSE;
+ return sal_False;
}
void SfxSplitWindow::SetActiveWindow_Impl( SfxDockingWindow* pWin )
diff --git a/sfx2/source/dialog/srchdlg.cxx b/sfx2/source/dialog/srchdlg.cxx
index fbfdcd823e81..c385bad34df3 100644..100755
--- a/sfx2/source/dialog/srchdlg.cxx
+++ b/sfx2/source/dialog/srchdlg.cxx
@@ -30,7 +30,7 @@
#include "precompiled_sfx2.hxx"
#include "srchdlg.hxx"
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include <sfx2/sfxuno.hxx>
#include "srchdlg.hrc"
@@ -45,7 +45,7 @@ using namespace ::com::sun::star::uno;
namespace sfx2 {
#define USERITEM_NAME DEFINE_CONST_OUSTRING("UserItem")
-#define MAX_SAVE_COUNT (USHORT)10
+#define MAX_SAVE_COUNT (sal_uInt16)10
// ============================================================================
// SearchDialog
@@ -114,7 +114,7 @@ void SearchDialog::LoadConfig()
}
}
else
- m_aWrapAroundBox.Check( TRUE );
+ m_aWrapAroundBox.Check( sal_True );
}
void SearchDialog::SaveConfig()
@@ -122,7 +122,7 @@ void SearchDialog::SaveConfig()
SvtViewOptions aViewOpt( E_DIALOG, m_sConfigName );
aViewOpt.SetWindowState( rtl::OUString::createFromAscii( m_sWinState.GetBuffer() ) );
String sUserData;
- USHORT i = 0, nCount = Min( m_aSearchEdit.GetEntryCount(), MAX_SAVE_COUNT );
+ sal_uInt16 i = 0, nCount = Min( m_aSearchEdit.GetEntryCount(), MAX_SAVE_COUNT );
for ( ; i < nCount; ++i )
{
sUserData += m_aSearchEdit.GetEntry(i);
@@ -145,7 +145,7 @@ void SearchDialog::SaveConfig()
IMPL_LINK( SearchDialog, FindHdl, PushButton*, EMPTYARG )
{
String sSrchTxt = m_aSearchEdit.GetText();
- USHORT nPos = m_aSearchEdit.GetEntryPos( sSrchTxt );
+ sal_uInt16 nPos = m_aSearchEdit.GetEntryPos( sSrchTxt );
if ( nPos > 0 && nPos != COMBOBOX_ENTRY_NOTFOUND )
m_aSearchEdit.RemoveEntry( nPos );
if ( nPos > 0 )
@@ -169,9 +169,9 @@ void SearchDialog::SetFocusOnEdit()
m_aSearchEdit.GrabFocus();
}
-BOOL SearchDialog::Close()
+sal_Bool SearchDialog::Close()
{
- BOOL bRet = ModelessDialog::Close();
+ sal_Bool bRet = ModelessDialog::Close();
m_aCloseHdl.Call( this );
return bRet;
}
@@ -182,7 +182,7 @@ void SearchDialog::StateChanged( StateChangedType nStateChange )
{
if ( m_sWinState.Len() )
SetWindowState( m_sWinState );
- m_bIsConstructed = TRUE;
+ m_bIsConstructed = sal_True;
}
ModelessDialog::StateChanged( nStateChange );
diff --git a/sfx2/source/dialog/srchdlg.hrc b/sfx2/source/dialog/srchdlg.hrc
index 55fe9ce47d26..55fe9ce47d26 100644..100755
--- a/sfx2/source/dialog/srchdlg.hrc
+++ b/sfx2/source/dialog/srchdlg.hrc
diff --git a/sfx2/source/dialog/srchdlg.src b/sfx2/source/dialog/srchdlg.src
index 0947f3932981..d1cee69e9157 100644..100755
--- a/sfx2/source/dialog/srchdlg.src
+++ b/sfx2/source/dialog/srchdlg.src
@@ -52,6 +52,7 @@ ModelessDialog RID_DLG_SEARCH
};
ComboBox ED_SEARCH
{
+ HelpID = "sfx2:ComboBox:RID_DLG_SEARCH:ED_SEARCH";
Border = TRUE;
Pos = MAP_APPFONT( 6, 14 );
Size = MAP_APPFONT( 150, 50 );
@@ -60,6 +61,7 @@ ModelessDialog RID_DLG_SEARCH
};
CheckBox CB_WHOLEWORDS
{
+ HelpID = "sfx2:CheckBox:RID_DLG_SEARCH:CB_WHOLEWORDS";
Pos = MAP_APPFONT( 6, 29 );
Size = MAP_APPFONT( 150, 10 );
Text [ en-US ] = "~Whole words only" ;
@@ -67,6 +69,7 @@ ModelessDialog RID_DLG_SEARCH
};
CheckBox CB_MATCHCASE
{
+ HelpID = "sfx2:CheckBox:RID_DLG_SEARCH:CB_MATCHCASE";
Pos = MAP_APPFONT( 6, 42 );
Size = MAP_APPFONT( 150, 10 );
Text[ en-US ] = "~Match case";
@@ -74,6 +77,7 @@ ModelessDialog RID_DLG_SEARCH
};
CheckBox CB_WRAPAROUND
{
+ HelpID = "sfx2:CheckBox:RID_DLG_SEARCH:CB_WRAPAROUND";
Pos = MAP_APPFONT( 6, 55 );
Size = MAP_APPFONT( 150, 10 );
Text [ en-US ] = "Wrap ~around" ;
@@ -81,6 +85,7 @@ ModelessDialog RID_DLG_SEARCH
};
CheckBox CB_BACKWARDS
{
+ HelpID = "sfx2:CheckBox:RID_DLG_SEARCH:CB_BACKWARDS";
Pos = MAP_APPFONT( 6, 68 );
Size = MAP_APPFONT( 150, 10 );
Text [ en-US ] = "~Backwards" ;
@@ -88,6 +93,7 @@ ModelessDialog RID_DLG_SEARCH
};
PushButton PB_FIND
{
+ HelpID = "sfx2:PushButton:RID_DLG_SEARCH:PB_FIND";
Pos = MAP_APPFONT( 162, 6 );
Size = MAP_APPFONT( 50, 14 );
Text [ en-US ] = "~Find" ;
diff --git a/sfx2/source/dialog/styfitem.cxx b/sfx2/source/dialog/styfitem.cxx
index a244ddb07b45..9f7304d6df2d 100644..100755
--- a/sfx2/source/dialog/styfitem.cxx
+++ b/sfx2/source/dialog/styfitem.cxx
@@ -52,17 +52,17 @@ SfxStyleFamilyItem::SfxStyleFamilyItem( const ResId &rResId ) :
Resource( rResId.SetRT( RSC_SFX_STYLE_FAMILY_ITEM ) )
{
- ULONG nMask = ReadLongRes();
+ sal_uIntPtr nMask = ReadLongRes();
if(nMask & RSC_SFX_STYLE_ITEM_LIST)
{
- ULONG nCount = ReadLongRes();
- for( ULONG i = 0; i < nCount; i++ )
+ sal_uIntPtr nCount = ReadLongRes();
+ for( sal_uIntPtr i = 0; i < nCount; i++ )
{
SfxFilterTupel *pTupel = new SfxFilterTupel;
pTupel->aName = ReadStringRes();
long lFlags = ReadLongRes();
- pTupel->nFlags = (USHORT)lFlags;
+ pTupel->nFlags = (sal_uInt16)lFlags;
aFilterList.push_back( pTupel );
}
}
@@ -81,7 +81,7 @@ SfxStyleFamilyItem::SfxStyleFamilyItem( const ResId &rResId ) :
}
if(nMask & RSC_SFX_STYLE_ITEM_STYLEFAMILY)
{
- nFamily = (USHORT)ReadLongRes();
+ nFamily = (sal_uInt16)ReadLongRes();
}
else
nFamily = SFX_STYLE_FAMILY_PARA;
@@ -110,10 +110,10 @@ SfxStyleFamilyItem::~SfxStyleFamilyItem()
// Implementation of the resource constructor
SfxStyleFamilies::SfxStyleFamilies( const ResId& rResId ) :
- Resource( rResId.SetRT( RSC_SFX_STYLE_FAMILIES ).SetAutoRelease( FALSE ) )
+ Resource( rResId.SetRT( RSC_SFX_STYLE_FAMILIES ).SetAutoRelease( false ) )
{
- ULONG nCount = ReadLongRes();
- for( ULONG i = 0; i < nCount; i++ )
+ sal_uIntPtr nCount = ReadLongRes();
+ for( sal_uIntPtr i = 0; i < nCount; i++ )
{
const ResId aResId((RSHEADER_TYPE *)GetClassRes(), *rResId.GetResMgr());
SfxStyleFamilyItem *pItem = new SfxStyleFamilyItem(aResId);
diff --git a/sfx2/source/dialog/styledlg.cxx b/sfx2/source/dialog/styledlg.cxx
index 9802504cc52f..16e2881ec77a 100644..100755
--- a/sfx2/source/dialog/styledlg.cxx
+++ b/sfx2/source/dialog/styledlg.cxx
@@ -36,7 +36,7 @@
#include <sfx2/styledlg.hxx>
#include <sfx2/mgetempl.hxx>
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include <sfx2/sfxuno.hxx>
#include "dialog.hrc"
@@ -48,7 +48,7 @@ SfxStyleDialog::SfxStyleDialog
Window* pParent, // Parent
const ResId& rResId, // ResId
SfxStyleSheetBase& rStyle, // stylesheet to be processed
- BOOL bFreeRes, // Flag release resources
+ sal_Bool bFreeRes, // Flag release resources
const String* pUserBtnTxt
) :
@@ -59,9 +59,9 @@ SfxStyleDialog::SfxStyleDialog
SfxTabDialog( pParent, rResId,
rStyle.GetItemSet().Clone(),
- // return TRUE also without ParentSupport , but extended
- // to suppress the standardButton
- rStyle.HasParentSupport() ? TRUE : 2,
+ // auch ohne ParentSupport TRUE "ubergeben, aber erweitert
+ // um den StandardButton zu unterdr"ucken
+ rStyle.HasParentSupport() ? sal_True : 2,
pUserBtnTxt ),
pStyle( &rStyle )
@@ -69,7 +69,7 @@ SfxStyleDialog::SfxStyleDialog
{
AddTabPage( ID_TABPAGE_MANAGESTYLES,
String( SfxResId( STR_TABPAGE_MANAGESTYLES ) ),
- SfxManageStyleSheetPage::Create, 0, FALSE, 0 );
+ SfxManageStyleSheetPage::Create, 0, sal_False, 0 );
// With new template always set the management page as the current page
@@ -150,11 +150,11 @@ IMPL_LINK( SfxStyleDialog, CancelHdl, Button *, pButton )
const SfxItemSet* pInSet = GetInputSetImpl();
SfxWhichIter aIter( *pInSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
- SfxItemState eState = pInSet->GetItemState( nWhich, FALSE );
+ SfxItemState eState = pInSet->GetItemState( nWhich, sal_False );
if ( SFX_ITEM_DEFAULT == eState )
pExampleSet->ClearItem( nWhich );
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index d61ed24f3929..86362938acab 100644..100755
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -34,7 +34,7 @@
#include <vcl/msgbox.hxx>
#include <unotools/viewoptions.hxx>
-#define _SVSTDARR_USHORTS
+#define _SVSTDARR_sal_uInt16S
#include <svl/svstdarr.hxx>
#include "appdata.hxx"
@@ -43,8 +43,8 @@
#include <sfx2/tabdlg.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/app.hxx>
-#include "sfxresid.hxx"
-#include "sfxhelp.hxx"
+#include "sfx2/sfxresid.hxx"
+#include "sfx2/sfxhelp.hxx"
#include <sfx2/ctrlitem.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/sfxdlg.hxx>
@@ -69,34 +69,34 @@ TYPEINIT1(LAYOUT_NS_SFX_TABDIALOG SfxTabDialogItem,SfxSetItem);
struct TabPageImpl
{
- BOOL mbStandard;
+ sal_Bool mbStandard;
sfx::ItemConnectionArray maItemConn;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame;
- TabPageImpl() : mbStandard( FALSE ) {}
+ TabPageImpl() : mbStandard( sal_False ) {}
};
NAMESPACE_LAYOUT_SFX_TABDIALOG
struct Data_Impl
{
- USHORT nId; // The ID
+ sal_uInt16 nId; // The ID
CreateTabPage fnCreatePage; // Pointer to Factory
GetTabPageRanges fnGetRanges; // Pointer to Ranges-Function
SfxTabPage* pTabPage; // The TabPage itself
- BOOL bOnDemand; // Flag: ItemSet onDemand
- BOOL bRefresh; // Flag: Page must be re-initialized
+ sal_Bool bOnDemand; // Flag: ItemSet onDemand
+ sal_Bool bRefresh; // Flag: Page must be re-initialized
// Constructor
- Data_Impl( USHORT Id, CreateTabPage fnPage,
- GetTabPageRanges fnRanges, BOOL bDemand ) :
+ Data_Impl( sal_uInt16 Id, CreateTabPage fnPage,
+ GetTabPageRanges fnRanges, sal_Bool bDemand ) :
nId ( Id ),
fnCreatePage( fnPage ),
fnGetRanges ( fnRanges ),
pTabPage ( 0 ),
bOnDemand ( bDemand ),
- bRefresh ( FALSE )
+ bRefresh ( sal_False )
{
if ( !fnCreatePage )
{
@@ -115,7 +115,7 @@ SfxTabDialogItem::SfxTabDialogItem( const SfxTabDialogItem& rAttr, SfxItemPool*
{
}
-SfxTabDialogItem::SfxTabDialogItem( USHORT nId, const SfxItemSet& rItemSet )
+SfxTabDialogItem::SfxTabDialogItem( sal_uInt16 nId, const SfxItemSet& rItemSet )
: SfxSetItem( nId, rItemSet )
{
}
@@ -125,7 +125,7 @@ SfxPoolItem* SfxTabDialogItem::Clone(SfxItemPool* pToPool) const
return new SfxTabDialogItem( *this, pToPool );
}
-SfxPoolItem* SfxTabDialogItem::Create(SvStream& /*rStream*/, USHORT /*nVersion*/) const
+SfxPoolItem* SfxTabDialogItem::Create(SvStream& /*rStream*/, sal_uInt16 /*nVersion*/) const
{
OSL_FAIL( "Use it only in UI!" );
return NULL;
@@ -136,7 +136,7 @@ class SfxTabDialogController : public SfxControllerItem
SfxTabDialog* pDialog;
const SfxItemSet* pSet;
public:
- SfxTabDialogController( USHORT nSlotId, SfxBindings& rBindings, SfxTabDialog* pDlg )
+ SfxTabDialogController( sal_uInt16 nSlotId, SfxBindings& rBindings, SfxTabDialog* pDlg )
: SfxControllerItem( nSlotId, rBindings )
, pDialog( pDlg )
, pSet( NULL )
@@ -145,7 +145,7 @@ public:
~SfxTabDialogController();
DECL_LINK( Execute_Impl, void* );
- virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState );
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState );
};
SfxTabDialogController::~SfxTabDialogController()
@@ -168,21 +168,21 @@ IMPL_LINK( SfxTabDialogController, Execute_Impl, void*, pVoid )
return 0;
}
-void SfxTabDialogController::StateChanged( USHORT /*nSID*/, SfxItemState /*eState*/, const SfxPoolItem* pState )
+void SfxTabDialogController::StateChanged( sal_uInt16 /*nSID*/, SfxItemState /*eState*/, const SfxPoolItem* pState )
{
const SfxSetItem* pSetItem = PTR_CAST( SfxSetItem, pState );
if ( pSetItem )
{
pSet = pDialog->pSet = pSetItem->GetItemSet().Clone();
- BOOL bDialogStarted = FALSE;
- for ( USHORT n=0; n<pDialog->aTabCtrl.GetPageCount(); n++ )
+ sal_Bool bDialogStarted = sal_False;
+ for ( sal_uInt16 n=0; n<pDialog->aTabCtrl.GetPageCount(); n++ )
{
- USHORT nPageId = pDialog->aTabCtrl.GetPageId( n );
+ sal_uInt16 nPageId = pDialog->aTabCtrl.GetPageId( n );
SfxTabPage* pTabPage = dynamic_cast<SfxTabPage*> (pDialog->aTabCtrl.GetTabPage( nPageId ));
if ( pTabPage )
{
pTabPage->Reset( pSetItem->GetItemSet() );
- bDialogStarted = TRUE;
+ bDialogStarted = sal_True;
}
}
@@ -197,7 +197,7 @@ DECL_PTRARRAY(SfxTabDlgData_Impl, Data_Impl *, 4,4)
struct TabDlg_Impl
{
- BOOL bModified : 1,
+ sal_Bool bModified : 1,
bModal : 1,
bInOK : 1,
bHideResetBtn : 1;
@@ -206,25 +206,25 @@ struct TabDlg_Impl
PushButton* pApplyButton;
SfxTabDialogController* pController;
- TabDlg_Impl( BYTE nCnt ) :
+ TabDlg_Impl( sal_uInt8 nCnt ) :
- bModified ( FALSE ),
- bModal ( TRUE ),
- bInOK ( FALSE ),
- bHideResetBtn ( FALSE ),
+ bModified ( sal_False ),
+ bModal ( sal_True ),
+ bInOK ( sal_False ),
+ bHideResetBtn ( sal_False ),
pData ( new SfxTabDlgData_Impl( nCnt ) ),
pApplyButton ( NULL ),
pController ( NULL )
{}
};
-Data_Impl* Find( SfxTabDlgData_Impl& rArr, USHORT nId, USHORT* pPos = 0 );
+Data_Impl* Find( SfxTabDlgData_Impl& rArr, sal_uInt16 nId, sal_uInt16* pPos = 0 );
-Data_Impl* Find( SfxTabDlgData_Impl& rArr, USHORT nId, USHORT* pPos )
+Data_Impl* Find( SfxTabDlgData_Impl& rArr, sal_uInt16 nId, sal_uInt16* pPos )
{
- const USHORT nCount = rArr.Count();
+ const sal_uInt16 nCount = rArr.Count();
- for ( USHORT i = 0; i < nCount; ++i )
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
Data_Impl* pObj = rArr[i];
@@ -264,7 +264,7 @@ SfxTabPage::SfxTabPage( Window *pParent,
TabPage( pParent, rResId ),
pSet ( &rAttrSet ),
- bHasExchangeSupport ( FALSE ),
+ bHasExchangeSupport ( sal_False ),
pTabDlg ( NULL ),
pImpl ( new TabPageImpl )
@@ -274,7 +274,7 @@ SfxTabPage::SfxTabPage( Window *pParent,
SfxTabPage:: SfxTabPage( Window *pParent, WinBits nStyle, const SfxItemSet &rAttrSet ) :
TabPage(pParent, nStyle),
pSet ( &rAttrSet ),
- bHasExchangeSupport ( FALSE ),
+ bHasExchangeSupport ( sal_False ),
pTabDlg ( NULL ),
pImpl ( new TabPageImpl )
{
@@ -296,7 +296,7 @@ SfxTabPage::~SfxTabPage()
// -----------------------------------------------------------------------
-BOOL SfxTabPage::FillItemSet( SfxItemSet& rSet )
+sal_Bool SfxTabPage::FillItemSet( SfxItemSet& rSet )
{
return pImpl->maItemConn.DoFillItemSet( rSet, GetItemSet() );
}
@@ -362,14 +362,14 @@ void SfxTabPage::FillUserData()
// -----------------------------------------------------------------------
-BOOL SfxTabPage::IsReadOnly() const
+sal_Bool SfxTabPage::IsReadOnly() const
{
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-const SfxPoolItem* SfxTabPage::GetItem( const SfxItemSet& rSet, USHORT nSlot, sal_Bool bDeep )
+const SfxPoolItem* SfxTabPage::GetItem( const SfxItemSet& rSet, sal_uInt16 nSlot, sal_Bool bDeep )
/* [Description]
@@ -379,9 +379,9 @@ const SfxPoolItem* SfxTabPage::GetItem( const SfxItemSet& rSet, USHORT nSlot, sa
{
const SfxItemPool* pPool = rSet.GetPool();
- USHORT nWh = pPool->GetWhich( nSlot, bDeep );
+ sal_uInt16 nWh = pPool->GetWhich( nSlot, bDeep );
const SfxPoolItem* pItem = 0;
- rSet.GetItemState( nWh, TRUE, &pItem );
+ rSet.GetItemState( nWh, sal_True, &pItem );
if ( !pItem && nWh != nSlot )
pItem = &pPool->GetDefaultItem( nWh );
@@ -391,7 +391,7 @@ const SfxPoolItem* SfxTabPage::GetItem( const SfxItemSet& rSet, USHORT nSlot, sa
// -----------------------------------------------------------------------
const SfxPoolItem* SfxTabPage::GetOldItem( const SfxItemSet& rSet,
- USHORT nSlot, sal_Bool bDeep )
+ sal_uInt16 nSlot, sal_Bool bDeep )
/* [Description]
@@ -400,7 +400,7 @@ const SfxPoolItem* SfxTabPage::GetOldItem( const SfxItemSet& rSet,
{
const SfxItemSet& rOldSet = GetItemSet();
- USHORT nWh = GetWhich( nSlot, bDeep );
+ sal_uInt16 nWh = GetWhich( nSlot, bDeep );
const SfxPoolItem* pItem = 0;
if ( pImpl->mbStandard && rOldSet.GetParent() )
@@ -416,7 +416,7 @@ const SfxPoolItem* SfxTabPage::GetOldItem( const SfxItemSet& rSet,
// -----------------------------------------------------------------------
const SfxPoolItem* SfxTabPage::GetExchangeItem( const SfxItemSet& rSet,
- USHORT nSlot )
+ sal_uInt16 nSlot )
/* [Description]
@@ -471,11 +471,11 @@ void SfxTabPage::AddItemConnection( sfx::ItemConnectionBase* pConnection )
aBaseFmtBtn ( this ),\
pSet ( ItemSetPtr ),\
pOutSet ( 0 ),\
- pImpl ( new TabDlg_Impl( (BYTE)aTabCtrl.GetPageCount() ) ), \
+ pImpl ( new TabDlg_Impl( (sal_uInt8)aTabCtrl.GetPageCount() ) ), \
pRanges ( 0 ), \
nResId ( rResId.GetId() ), \
nAppPageId ( USHRT_MAX ), \
- bItemsReset ( FALSE ),\
+ bItemsReset ( sal_False ),\
bFmt ( bEditFmt ),\
pExampleSet ( 0 )
@@ -494,7 +494,7 @@ SfxTabDialog::SfxTabDialog
const ResId& rResId, // ResourceId
const SfxItemSet* pItemSet, // Itemset with the data;
// can be NULL, when Pages are onDemand
- BOOL bEditFmt, // Flag: templates are processed
+ sal_Bool bEditFmt, // Flag: templates are processed
// when yes -> additional Button for standard
const String* pUserButtonText // Text for UserButton;
// if != 0, the UserButton is created
@@ -520,7 +520,7 @@ SfxTabDialog::SfxTabDialog
const ResId& rResId, // ResourceId
const SfxItemSet* pItemSet, // Itemset with the data;
// can be NULL, when Pages are onDemand
- BOOL bEditFmt, // Flag: templates are processed
+ sal_Bool bEditFmt, // Flag: templates are processed
// when yes -> additional Button for standard
const String* pUserButtonText // Text for UserButton;
// if != 0, the UserButton is created
@@ -543,9 +543,9 @@ SfxTabDialog::SfxTabDialog
(
Window* pParent, // Parent Window
const ResId& rResId, // ResourceId
- USHORT nSetId,
+ sal_uInt16 nSetId,
SfxBindings& rBindings,
- BOOL bEditFmt, // Flag: templates are processed
+ sal_Bool bEditFmt, // Flag: templates are processed
// when yes -> additional Button for standard
const String* pUserButtonText // Text for UserButton;
// if != 0, the UserButton is created
@@ -558,7 +558,7 @@ SfxTabDialog::SfxTabDialog
pImpl->pController = new SfxTabDialogController( nSetId, rBindings, this );
rBindings.LEAVEREGISTRATIONS();
- EnableApplyButton( TRUE );
+ EnableApplyButton( sal_True );
SetApplyHandler( LINK( pImpl->pController, SfxTabDialogController, Execute_Impl ) );
rBindings.Invalidate( nSetId );
@@ -590,8 +590,8 @@ SfxTabDialog::~SfxTabDialog()
#endif /* !ENABLE_LAYOUT_SFX_TABDIALOG */
aDlgOpt.SetPageID( aTabCtrl.GetCurPageId() );
- const USHORT nCount = pImpl->pData->Count();
- for ( USHORT i = 0; i < nCount; ++i )
+ const sal_uInt16 nCount = pImpl->pData->Count();
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
Data_Impl* pDataObject = pImpl->pData->GetObject(i);
@@ -626,7 +626,7 @@ SfxTabDialog::~SfxTabDialog()
// -----------------------------------------------------------------------
-void SfxTabDialog::Init_Impl( BOOL bFmtFlag, const String* pUserButtonText )
+void SfxTabDialog::Init_Impl( sal_Bool bFmtFlag, const String* pUserButtonText )
/* [Description]
@@ -665,13 +665,13 @@ void SfxTabDialog::Init_Impl( BOOL bFmtFlag, const String* pUserButtonText )
aBaseFmtBtn.SetHelpId( HID_TABDLG_STANDARD_BTN );
// bFmt = temporary Flag passed on in the Constructor(),
- // if bFmt == 2, then also TRUE,
+ // if bFmt == 2, then also sal_True,
// additional suppression of the standard button,
- // after the Initializing set to TRUE again
+ // after the Initializing set to sal_True again
if ( bFmtFlag != 2 )
aBaseFmtBtn.Show();
else
- bFmtFlag = TRUE;
+ bFmtFlag = sal_True;
}
if ( pSet )
@@ -679,6 +679,11 @@ void SfxTabDialog::Init_Impl( BOOL bFmtFlag, const String* pUserButtonText )
pExampleSet = new SfxItemSet( *pSet );
pOutSet = new SfxItemSet( *pSet->GetPool(), pSet->GetRanges() );
}
+
+ aOKBtn.SetAccessibleRelationMemberOf( &aOKBtn );
+ aCancelBtn.SetAccessibleRelationMemberOf( &aCancelBtn );
+ aHelpBtn.SetAccessibleRelationMemberOf( &aHelpBtn );
+ aResetBtn.SetAccessibleRelationMemberOf( &aResetBtn );
}
// -----------------------------------------------------------------------
@@ -686,7 +691,7 @@ void SfxTabDialog::Init_Impl( BOOL bFmtFlag, const String* pUserButtonText )
void SfxTabDialog::RemoveResetButton()
{
aResetBtn.Hide();
- pImpl->bHideResetBtn = TRUE;
+ pImpl->bHideResetBtn = sal_True;
}
// -----------------------------------------------------------------------
@@ -720,10 +725,10 @@ void SfxTabDialog::StartExecuteModal( const Link& rEndDialogHdl )
// -----------------------------------------------------------------------
-void SfxTabDialog::Start( BOOL bShow )
+void SfxTabDialog::Start( sal_Bool bShow )
{
aCancelBtn.SetClickHdl( LINK( this, SfxTabDialog, CancelHdl ) );
- pImpl->bModal = FALSE;
+ pImpl->bModal = sal_False;
Start_Impl();
if ( bShow )
@@ -752,7 +757,7 @@ Link SfxTabDialog::GetApplyHandler() const
// -----------------------------------------------------------------------
-void SfxTabDialog::EnableApplyButton(BOOL bEnable)
+void SfxTabDialog::EnableApplyButton(sal_Bool bEnable)
{
if ( IsApplyButtonEnabled() == bEnable )
// nothing to do
@@ -786,7 +791,7 @@ void SfxTabDialog::EnableApplyButton(BOOL bEnable)
// -----------------------------------------------------------------------
-BOOL SfxTabDialog::IsApplyButtonEnabled() const
+sal_Bool SfxTabDialog::IsApplyButtonEnabled() const
{
return ( NULL != pImpl->pApplyButton );
}
@@ -810,7 +815,7 @@ PushButton* SfxTabDialog::GetApplyButton()
void SfxTabDialog::Start_Impl()
{
DBG_ASSERT( pImpl->pData->Count() == aTabCtrl.GetPageCount(), "not all pages registered" );
- USHORT nActPage = aTabCtrl.GetPageId( 0 );
+ sal_uInt16 nActPage = aTabCtrl.GetPageId( 0 );
// load old settings, when exists
SvtViewOptions aDlgOpt( E_TABDIALOG, String::CreateFromInt32( nResId ) );
@@ -821,13 +826,13 @@ void SfxTabDialog::Start_Impl()
#endif /* !ENABLE_LAYOUT_SFX_TABDIALOG */
// initial TabPage from Program/Help/config
- nActPage = (USHORT)aDlgOpt.GetPageID();
+ nActPage = (sal_uInt16)aDlgOpt.GetPageID();
if ( USHRT_MAX != nAppPageId )
nActPage = nAppPageId;
else
{
- USHORT nAutoTabPageId = SFX_APP()->Get_Impl()->nAutoTabPageId;
+ sal_uInt16 nAutoTabPageId = SFX_APP()->Get_Impl()->nAutoTabPageId;
if ( nAutoTabPageId )
nActPage = nAutoTabPageId;
}
@@ -842,19 +847,19 @@ void SfxTabDialog::Start_Impl()
ActivatePageHdl( &aTabCtrl );
}
-void SfxTabDialog::AddTabPage( USHORT nId, BOOL bItemsOnDemand )
+void SfxTabDialog::AddTabPage( sal_uInt16 nId, sal_Bool bItemsOnDemand )
{
AddTabPage( nId, 0, 0, bItemsOnDemand );
}
-void SfxTabDialog::AddTabPage( USHORT nId, const String &rRiderText, BOOL bItemsOnDemand, USHORT nPos )
+void SfxTabDialog::AddTabPage( sal_uInt16 nId, const String &rRiderText, sal_Bool bItemsOnDemand, sal_uInt16 nPos )
{
AddTabPage( nId, rRiderText, 0, 0, bItemsOnDemand, nPos );
}
#ifdef SV_HAS_RIDERBITMAPS
-void SfxTabDialog::AddTabPage( USHORT nId, const Bitmap &rRiderBitmap, BOOL bItemsOnDemand, USHORT nPos )
+void SfxTabDialog::AddTabPage( sal_uInt16 nId, const Bitmap &rRiderBitmap, sal_Bool bItemsOnDemand, sal_uInt16 nPos )
{
AddTabPage( nId, rRiderBitmap, 0, 0, bItemsOnDemand, nPos );
}
@@ -872,11 +877,11 @@ void SfxTabDialog::AddTabPage
*/
(
- USHORT nId, // Page ID
+ sal_uInt16 nId, // Page ID
CreateTabPage pCreateFunc, // Pointer to the Factory Method
GetTabPageRanges pRangesFunc, // Pointer to the Method for quering
// Ranges onDemand
- BOOL bItemsOnDemand // indicates whether the set of this page is
+ sal_Bool bItemsOnDemand // indicates whether the set of this page is
// requested when created
)
{
@@ -895,12 +900,12 @@ void SfxTabDialog::AddTabPage
*/
(
- USHORT nId,
+ sal_uInt16 nId,
const String& rRiderText,
CreateTabPage pCreateFunc,
GetTabPageRanges pRangesFunc,
- BOOL bItemsOnDemand,
- USHORT nPos
+ sal_Bool bItemsOnDemand,
+ sal_uInt16 nPos
)
{
DBG_ASSERT( TAB_PAGE_NOTFOUND == aTabCtrl.GetPagePos( nId ),
@@ -922,12 +927,12 @@ void SfxTabDialog::AddTabPage
*/
(
- USHORT nId,
+ sal_uInt16 nId,
const Bitmap &rRiderBitmap,
CreateTabPage pCreateFunc,
GetTabPageRanges pRangesFunc,
- BOOL bItemsOnDemand,
- USHORT nPos
+ sal_Bool bItemsOnDemand,
+ sal_uInt16 nPos
)
{
DBG_ASSERT( TAB_PAGE_NOTFOUND == aTabCtrl.GetPagePos( nId ),
@@ -940,7 +945,7 @@ void SfxTabDialog::AddTabPage
// -----------------------------------------------------------------------
-void SfxTabDialog::RemoveTabPage( USHORT nId )
+void SfxTabDialog::RemoveTabPage( sal_uInt16 nId )
/* [Description]
@@ -948,7 +953,7 @@ void SfxTabDialog::RemoveTabPage( USHORT nId )
*/
{
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
aTabCtrl.RemovePage( nId );
Data_Impl* pDataObject = Find( *pImpl->pData, nId, &nPos );
@@ -991,7 +996,7 @@ void SfxTabDialog::PageCreated
*/
(
- USHORT, // Id of the created page
+ sal_uInt16, // Id of the created page
SfxTabPage& // Reference to the created page
)
{
@@ -1013,7 +1018,7 @@ SfxItemSet* SfxTabDialog::GetInputSetImpl()
// -----------------------------------------------------------------------
-SfxTabPage* SfxTabDialog::GetTabPage( USHORT nPageId ) const
+SfxTabPage* SfxTabDialog::GetTabPage( sal_uInt16 nPageId ) const
/* [Description]
@@ -1021,7 +1026,7 @@ SfxTabPage* SfxTabDialog::GetTabPage( USHORT nPageId ) const
*/
{
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
Data_Impl* pDataObject = Find( *pImpl->pData, nPageId, &nPos );
if ( pDataObject )
@@ -1031,7 +1036,7 @@ SfxTabPage* SfxTabDialog::GetTabPage( USHORT nPageId ) const
// -----------------------------------------------------------------------
-BOOL SfxTabDialog::IsInOK() const
+sal_Bool SfxTabDialog::IsInOK() const
{
return pImpl->bInOK;
}
@@ -1054,20 +1059,20 @@ short SfxTabDialog::Ok()
*/
{
- pImpl->bInOK = TRUE;
+ pImpl->bInOK = sal_True;
if ( !pOutSet )
{
if ( !pExampleSet && pSet )
- pOutSet = pSet->Clone( FALSE ); // without Items
+ pOutSet = pSet->Clone( sal_False ); // without Items
else if ( pExampleSet )
pOutSet = new SfxItemSet( *pExampleSet );
}
- BOOL bModified = FALSE;
+ sal_Bool bModified = sal_False;
- const USHORT nCount = pImpl->pData->Count();
+ const sal_uInt16 nCount = pImpl->pData->Count();
- for ( USHORT i = 0; i < nCount; ++i )
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
Data_Impl* pDataObject = pImpl->pData->GetObject(i);
SfxTabPage* pTabPage = pDataObject->pTabPage;
@@ -1086,7 +1091,7 @@ short SfxTabDialog::Ok()
if ( pTabPage->FillItemSet( aTmp ) )
{
- bModified |= TRUE;
+ bModified |= sal_True;
pExampleSet->Put( aTmp );
pOutSet->Put( aTmp );
}
@@ -1095,10 +1100,10 @@ short SfxTabDialog::Ok()
}
if ( pImpl->bModified || ( pOutSet && pOutSet->Count() > 0 ) )
- bModified |= TRUE;
+ bModified |= sal_True;
if ( bFmt == 2 )
- bModified |= TRUE;
+ bModified |= sal_True;
return bModified ? RET_OK : RET_CANCEL;
}
@@ -1113,7 +1118,7 @@ IMPL_LINK( SfxTabDialog, CancelHdl, Button*, pButton )
// -----------------------------------------------------------------------
-SfxItemSet* SfxTabDialog::CreateInputItemSet( USHORT )
+SfxItemSet* SfxTabDialog::CreateInputItemSet( sal_uInt16 )
/* [Description]
@@ -1155,7 +1160,7 @@ IMPL_LINK( SfxTabDialog, OkHdl, Button *, EMPTYARG )
*/
{
- pImpl->bInOK = TRUE;
+ pImpl->bInOK = sal_True;
if ( OK_Impl() )
{
@@ -1174,7 +1179,7 @@ IMPL_LINK( SfxTabDialog, OkHdl, Button *, EMPTYARG )
bool SfxTabDialog::PrepareLeaveCurrentPage()
{
- USHORT const nId = aTabCtrl.GetCurPageId();
+ sal_uInt16 const nId = aTabCtrl.GetCurPageId();
SfxTabPage* pPage = dynamic_cast<SfxTabPage*> (aTabCtrl.GetTabPage( nId ));
bool bEnd = !pPage;
@@ -1244,7 +1249,7 @@ IMPL_LINK( SfxTabDialog, ResetHdl, Button *, EMPTYARG )
*/
{
- const USHORT nId = aTabCtrl.GetCurPageId();
+ const sal_uInt16 nId = aTabCtrl.GetCurPageId();
Data_Impl* pDataObject = Find( *pImpl->pData, nId );
DBG_ASSERT( pDataObject, "Id not known" );
@@ -1271,7 +1276,7 @@ IMPL_LINK( SfxTabDialog, BaseFmtHdl, Button *, EMPTYARG )
*/
{
- const USHORT nId = aTabCtrl.GetCurPageId();
+ const sal_uInt16 nId = aTabCtrl.GetCurPageId();
Data_Impl* pDataObject = Find( *pImpl->pData, nId );
DBG_ASSERT( pDataObject, "Id not known" );
bFmt = 2;
@@ -1282,17 +1287,17 @@ IMPL_LINK( SfxTabDialog, BaseFmtHdl, Button *, EMPTYARG )
pExampleSet = new SfxItemSet( *pSet );
const SfxItemPool* pPool = pSet->GetPool();
- const USHORT* pTmpRanges = (pDataObject->fnGetRanges)();
+ const sal_uInt16* pTmpRanges = (pDataObject->fnGetRanges)();
SfxItemSet aTmpSet( *pExampleSet );
while ( *pTmpRanges )
{
- const USHORT* pU = pTmpRanges + 1;
+ const sal_uInt16* pU = pTmpRanges + 1;
if ( *pTmpRanges == *pU )
{
// Range which two identical values -> only set one Item
- USHORT nWh = pPool->GetWhich( *pTmpRanges );
+ sal_uInt16 nWh = pPool->GetWhich( *pTmpRanges );
pExampleSet->ClearItem( nWh );
aTmpSet.ClearItem( nWh );
// At the Outset of InvalidateItem,
@@ -1302,13 +1307,13 @@ IMPL_LINK( SfxTabDialog, BaseFmtHdl, Button *, EMPTYARG )
else
{
// Correct Range with multiple values
- USHORT nTmp = *pTmpRanges, nTmpEnd = *pU;
+ sal_uInt16 nTmp = *pTmpRanges, nTmpEnd = *pU;
DBG_ASSERT( nTmp <= nTmpEnd, "Range is sorted the wrong way" );
if ( nTmp > nTmpEnd )
{
// If really sorted wrongly, then set new
- USHORT nTmp1 = nTmp;
+ sal_uInt16 nTmp1 = nTmp;
nTmp = nTmpEnd;
nTmpEnd = nTmp1;
}
@@ -1316,7 +1321,7 @@ IMPL_LINK( SfxTabDialog, BaseFmtHdl, Button *, EMPTYARG )
while ( nTmp <= nTmpEnd )
{
// Iterate over the Range and set the Items
- USHORT nWh = pPool->GetWhich( nTmp );
+ sal_uInt16 nWh = pPool->GetWhich( nTmp );
pExampleSet->ClearItem( nWh );
aTmpSet.ClearItem( nWh );
// At the Outset of InvalidateItem,
@@ -1331,7 +1336,7 @@ IMPL_LINK( SfxTabDialog, BaseFmtHdl, Button *, EMPTYARG )
// Set all Items as new -> the call the current Page Reset()
DBG_ASSERT( pDataObject->pTabPage, "the Page is gone" );
pDataObject->pTabPage->Reset( aTmpSet );
- pDataObject->pTabPage->pImpl->mbStandard = TRUE;
+ pDataObject->pTabPage->pImpl->mbStandard = sal_True;
}
return 1;
}
@@ -1350,13 +1355,13 @@ IMPL_LINK( SfxTabDialog, ActivatePageHdl, TabControl *, pTabCtrl )
Handler that is called by StarView for switching to a different page.
If the page not exist yet then it is created and the virtual Method
- <SfxTabDialog::PageCreated( USHORT, SfxTabPage &)> is called. If the page
+ <SfxTabDialog::PageCreated( sal_uInt16, SfxTabPage &)> is called. If the page
exist, then the if possible the <SfxTabPage::Reset(const SfxItemSet &)> or
<SfxTabPage::ActivatePage(const SfxItemSet &)> is called.
*/
{
- USHORT const nId = pTabCtrl->GetCurPageId();
+ sal_uInt16 const nId = pTabCtrl->GetCurPageId();
DBG_ASSERT( pImpl->pData->Count(), "no Pages registered" );
SFX_APP();
@@ -1438,7 +1443,7 @@ IMPL_LINK( SfxTabDialog, ActivatePageHdl, TabControl *, pTabCtrl )
}
else if ( pDataObject->bRefresh )
pTabPage->Reset( *pSet );
- pDataObject->bRefresh = FALSE;
+ pDataObject->bRefresh = sal_False;
#if ENABLE_LAYOUT_SFX_TABDIALOG
pTabCtrl->GetPagePos (nId);
@@ -1446,7 +1451,7 @@ IMPL_LINK( SfxTabDialog, ActivatePageHdl, TabControl *, pTabCtrl )
if ( pExampleSet )
pTabPage->ActivatePage( *pExampleSet );
- BOOL bReadOnly = pTabPage->IsReadOnly();
+ sal_Bool bReadOnly = pTabPage->IsReadOnly();
( bReadOnly || pImpl->bHideResetBtn ) ? aResetBtn.Hide() : aResetBtn.Show();
return 0;
}
@@ -1465,7 +1470,7 @@ IMPL_LINK( SfxTabDialog, DeactivatePageHdl, TabControl *, pTabCtrl )
*/
{
- USHORT nId = pTabCtrl->GetCurPageId();
+ sal_uInt16 nId = pTabCtrl->GetCurPageId();
SFX_APP();
SfxTabPage *pPage = dynamic_cast<SfxTabPage*> (pTabCtrl->GetTabPage( nId ));
DBG_ASSERT( pPage, "no active Page" );
@@ -1519,22 +1524,22 @@ IMPL_LINK( SfxTabDialog, DeactivatePageHdl, TabControl *, pTabCtrl )
pSet = GetRefreshedSet();
DBG_ASSERT( pSet, "GetRefreshedSet() returns NULL" );
// Flag all Pages as to be initialized as new
- const USHORT nCount = pImpl->pData->Count();
+ const sal_uInt16 nCount = pImpl->pData->Count();
- for ( USHORT i = 0; i < nCount; ++i )
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
Data_Impl* pObj = (*pImpl->pData)[i];
if ( pObj->pTabPage != pPage ) // Do not refresh own Page anymore
- pObj->bRefresh = TRUE;
+ pObj->bRefresh = sal_True;
else
- pObj->bRefresh = FALSE;
+ pObj->bRefresh = sal_False;
}
}
if ( nRet & SfxTabPage::LEAVE_PAGE )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -1547,13 +1552,13 @@ const SfxItemSet* SfxTabDialog::GetOutputItemSet
[Cross-reference]
- <SfxTabDialog::AddTabPage(USHORT, CreateTabPage, GetTabPageRanges, BOOL)>
- <SfxTabDialog::AddTabPage(USHORT, const String &, CreateTabPage, GetTabPageRanges, BOOL, USHORT)>
- <SfxTabDialog::AddTabPage(USHORT, const Bitmap &, CreateTabPage, GetTabPageRanges, BOOL, USHORT)>
+ <SfxTabDialog::AddTabPage(sal_uInt16, CreateTabPage, GetTabPageRanges, sal_Bool)>
+ <SfxTabDialog::AddTabPage(sal_uInt16, const String &, CreateTabPage, GetTabPageRanges, sal_Bool, sal_uInt16)>
+ <SfxTabDialog::AddTabPage(sal_uInt16, const Bitmap &, CreateTabPage, GetTabPageRanges, sal_Bool, sal_uInt16)>
*/
(
- USHORT nId // the Id, under which the page was added at AddTabPage().
+ sal_uInt16 nId // the Id, under which the page was added at AddTabPage().
// hinzugefügt wurde.
) const
{
@@ -1602,12 +1607,12 @@ extern "C" int TabDlgCmpUS_Impl( const void* p1, const void* p2 )
*/
{
- return *(USHORT*)p1 - *(USHORT*)p2;
+ return *(sal_uInt16*)p1 - *(sal_uInt16*)p2;
}
// -----------------------------------------------------------------------
-void SfxTabDialog::ShowPage( USHORT nId )
+void SfxTabDialog::ShowPage( sal_uInt16 nId )
/* [Description]
@@ -1621,7 +1626,7 @@ void SfxTabDialog::ShowPage( USHORT nId )
// -----------------------------------------------------------------------
-const USHORT* SfxTabDialog::GetInputRanges( const SfxItemPool& rPool )
+const sal_uInt16* SfxTabDialog::GetInputRanges( const SfxItemPool& rPool )
/* [Description]
@@ -1631,14 +1636,14 @@ const USHORT* SfxTabDialog::GetInputRanges( const SfxItemPool& rPool )
[Return value]
- Pointer to a null-terminated array of USHORT. This array belongs to the
+ Pointer to a null-terminated array of sal_uInt16. This array belongs to the
dialog and is deleted when the dialogue is destroy.
[Cross-reference]
- <SfxTabDialog::AddTabPage(USHORT, CreateTabPage, GetTabPageRanges, BOOL)>
- <SfxTabDialog::AddTabPage(USHORT, const String &, CreateTabPage, GetTabPageRanges, BOOL, USHORT)>
- <SfxTabDialog::AddTabPage(USHORT, const Bitmap &, CreateTabPage, GetTabPageRanges, BOOL, USHORT)>
+ <SfxTabDialog::AddTabPage(sal_uInt16, CreateTabPage, GetTabPageRanges, sal_Bool)>
+ <SfxTabDialog::AddTabPage(sal_uInt16, const String &, CreateTabPage, GetTabPageRanges, sal_Bool, sal_uInt16)>
+ <SfxTabDialog::AddTabPage(sal_uInt16, const Bitmap &, CreateTabPage, GetTabPageRanges, sal_Bool, sal_uInt16)>
*/
{
@@ -1651,19 +1656,19 @@ const USHORT* SfxTabDialog::GetInputRanges( const SfxItemPool& rPool )
if ( pRanges )
return pRanges;
SvUShorts aUS( 16, 16 );
- USHORT nCount = pImpl->pData->Count();
+ sal_uInt16 nCount = pImpl->pData->Count();
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < nCount; ++i )
{
Data_Impl* pDataObject = pImpl->pData->GetObject(i);
if ( pDataObject->fnGetRanges )
{
- const USHORT* pTmpRanges = (pDataObject->fnGetRanges)();
- const USHORT* pIter = pTmpRanges;
+ const sal_uInt16* pTmpRanges = (pDataObject->fnGetRanges)();
+ const sal_uInt16* pIter = pTmpRanges;
- USHORT nLen;
+ sal_uInt16 nLen;
for( nLen = 0; *pIter; ++nLen, ++pIter )
;
aUS.Insert( pTmpRanges, nLen, aUS.Count() );
@@ -1684,10 +1689,10 @@ const USHORT* SfxTabDialog::GetInputRanges( const SfxItemPool& rPool )
// sort
if ( aUS.Count() > 1 )
qsort( (void*)aUS.GetData(),
- aUS.Count(), sizeof(USHORT), TabDlgCmpUS_Impl );
+ aUS.Count(), sizeof(sal_uInt16), TabDlgCmpUS_Impl );
- pRanges = new USHORT[aUS.Count() + 1];
- memcpy(pRanges, aUS.GetData(), sizeof(USHORT) * aUS.Count());
+ pRanges = new sal_uInt16[aUS.Count() + 1];
+ memcpy(pRanges, aUS.GetData(), sizeof(sal_uInt16) * aUS.Count());
pRanges[aUS.Count()] = 0;
return pRanges;
}
@@ -1721,15 +1726,15 @@ long SfxTabDialog::Notify( NotifyEvent& rNEvt )
if ( pViewFrame )
{
Window* pWindow = rNEvt.GetWindow();
- ULONG nHelpId = 0;
- while ( !nHelpId && pWindow )
+ rtl::OString sHelpId;
+ while ( !sHelpId.getLength() && pWindow )
{
- nHelpId = pWindow->GetHelpId();
+ sHelpId = pWindow->GetHelpId();
pWindow = pWindow->GetParent();
}
- if ( nHelpId )
- SfxHelp::OpenHelpAgent( &pViewFrame->GetFrame(), nHelpId );
+ if ( sHelpId.getLength() )
+ SfxHelp::OpenHelpAgent( &pViewFrame->GetFrame(), sHelpId );
}
}
diff --git a/sfx2/source/dialog/taskpane.cxx b/sfx2/source/dialog/taskpane.cxx
index 50f168cfd3ea..f32025e74414 100644..100755
--- a/sfx2/source/dialog/taskpane.cxx
+++ b/sfx2/source/dialog/taskpane.cxx
@@ -61,7 +61,7 @@
#include <vcl/menu.hxx>
#include <vcl/svapp.hxx>
#include <toolkit/helper/vclunohelper.hxx>
-
+#include <tools/urlobj.hxx>
#include <boost/noncopyable.hpp>
//......................................................................................................................
@@ -185,7 +185,7 @@ namespace sfx2
aCommandName.append( sImageURL.copy( nCommandImagePrefixLen ) );
const ::rtl::OUString sCommandName( aCommandName.makeStringAndClear() );
- const Image aPanelImage( GetImage( i_rDocFrame, sCommandName, FALSE ) );
+ const Image aPanelImage( GetImage( i_rDocFrame, sCommandName, sal_False ) );
return aPanelImage.GetXGraphic();
}
@@ -244,7 +244,7 @@ namespace sfx2
SFX_IMPL_DOCKINGWINDOW( TaskPaneWrapper, SID_TASKPANE );
//------------------------------------------------------------------------------------------------------------------
- TaskPaneWrapper::TaskPaneWrapper( Window* i_pParent, USHORT i_nId, SfxBindings* i_pBindings, SfxChildWinInfo* i_pInfo )
+ TaskPaneWrapper::TaskPaneWrapper( Window* i_pParent, sal_uInt16 i_nId, SfxBindings* i_pBindings, SfxChildWinInfo* i_pInfo )
:SfxChildWindow( i_pParent, i_nId )
{
pWindow = new TaskPaneDockingWindow( i_pBindings, *this, i_pParent,
@@ -255,7 +255,7 @@ namespace sfx2
pWindow->SetOutputSizePixel( Size( 300, 450 ) );
dynamic_cast< SfxDockingWindow* >( pWindow )->Initialize( i_pInfo );
- SetHideNotDelete( TRUE );
+ SetHideNotDelete( sal_True );
pWindow->Show();
}
@@ -310,7 +310,7 @@ namespace sfx2
virtual ::rtl::OUString GetDisplayName() const;
virtual Image GetImage() const;
- virtual SmartId GetHelpID() const;
+ virtual rtl::OString GetHelpID() const;
virtual void Activate( Window& i_rParentWindow );
virtual void Deactivate();
virtual void SetSizePixel( const Size& i_rPanelWindowSize );
@@ -409,10 +409,19 @@ namespace sfx2
return m_aPanelImage;
}
+ static rtl::OString lcl_getHelpId( const ::rtl::OUString& _rHelpURL )
+ {
+ INetURLObject aHID( _rHelpURL );
+ if ( aHID.GetProtocol() == INET_PROT_HID )
+ return rtl::OUStringToOString( aHID.GetURLPath(), RTL_TEXTENCODING_UTF8 );
+ else
+ return rtl::OUStringToOString( _rHelpURL, RTL_TEXTENCODING_UTF8 );
+ }
+
//------------------------------------------------------------------------------------------------------------------
- SmartId CustomToolPanel::GetHelpID() const
+ rtl::OString CustomToolPanel::GetHelpID() const
{
- return SmartId( m_aPanelHelpURL );
+ return lcl_getHelpId( m_aPanelHelpURL );
}
//------------------------------------------------------------------------------------------------------------------
@@ -914,7 +923,7 @@ namespace sfx2
ModuleTaskPane& m_rTaskPane;
TitledDockingWindow& m_rDockingWindow;
- USHORT m_nViewMenuID;
+ sal_uInt16 m_nViewMenuID;
PanelSelectorLayout m_eCurrentLayout;
PanelDescriptors m_aPanelRepository;
bool m_bTogglingPanelVisibility;
@@ -1033,11 +1042,11 @@ namespace sfx2
switch ( i_pMenu->GetCurItemId() )
{
case MID_UNLOCK_TASK_PANEL:
- m_rDockingWindow.SetFloatingMode( TRUE );
+ m_rDockingWindow.SetFloatingMode( sal_True );
break;
case MID_LOCK_TASK_PANEL:
- m_rDockingWindow.SetFloatingMode( FALSE );
+ m_rDockingWindow.SetFloatingMode( sal_False );
break;
case MID_LAYOUT_DRAWERS:
@@ -1224,7 +1233,7 @@ namespace sfx2
// Add one entry for every tool panel element to individually make
// them visible or hide them.
- USHORT nIndex = MID_FIRST_PANEL;
+ sal_uInt16 nIndex = MID_FIRST_PANEL;
for ( size_t i=0; i<m_aPanelRepository.size(); ++i, ++nIndex )
{
const PanelDescriptor& rPanelDesc( m_aPanelRepository[i] );
@@ -1254,7 +1263,7 @@ namespace sfx2
String( SfxResId( STR_SFX_UNDOCK ) )
);
- pMenu->RemoveDisabledEntries( FALSE, FALSE );
+ pMenu->RemoveDisabledEntries( sal_False, sal_False );
return pMenu;
}
diff --git a/sfx2/source/dialog/taskpane.src b/sfx2/source/dialog/taskpane.src
index 5a955e8587d1..5a955e8587d1 100644..100755
--- a/sfx2/source/dialog/taskpane.src
+++ b/sfx2/source/dialog/taskpane.src
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 73f799f9a8ec..325b512ce8b7 100644..100755
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -45,7 +45,7 @@
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/frame/XModuleManager.hpp>
-#include "sfxhelp.hxx"
+#include "sfx2/sfxhelp.hxx"
#include <sfx2/app.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/bindings.hxx>
@@ -57,8 +57,8 @@
#include <sfx2/objsh.hxx>
#include <sfx2/viewsh.hxx>
#include <sfx2/newstyle.hxx>
-#include "tplpitem.hxx"
-#include "sfxresid.hxx"
+#include "sfx2/tplpitem.hxx"
+#include "sfx2/sfxresid.hxx"
#include "templdlg.hrc"
#include <sfx2/sfx.hrc>
@@ -70,7 +70,7 @@
#include "docvor.hxx"
#include <sfx2/doctempl.hxx>
#include <sfx2/module.hxx>
-#include "imgmgr.hxx"
+#include "sfx2/imgmgr.hxx"
#include "helpid.hrc"
#include "appdata.hxx"
#include <sfx2/viewfrm.hxx>
@@ -94,7 +94,7 @@ using namespace ::com::sun::star::uno;
#define SFX_TEMPLDLG_MIDVSPACE 3
#define SFX_TEMPLDLG_FILTERHEIGHT 100
-static USHORT nLastItemId = USHRT_MAX;
+static sal_uInt16 nLastItemId = USHRT_MAX;
// filter box has maximum 12 entries visible
#define MAX_FILTER_ENTRIES 12
@@ -235,7 +235,7 @@ void DropListBox_Impl::MouseButtonDown( const MouseEvent& rMEvt )
{
nModifier = rMEvt.GetModifier();
- BOOL bHitEmptySpace = ( NULL == GetEntry( rMEvt.GetPosPixel(), TRUE ) );
+ sal_Bool bHitEmptySpace = ( NULL == GetEntry( rMEvt.GetPosPixel(), sal_True ) );
if( bHitEmptySpace && ( rMEvt.GetClicks() == 2 ) && rMEvt.IsMod1() )
Control::MouseButtonDown( rMEvt );
else
@@ -380,8 +380,8 @@ PopupMenu* SfxActionListBox::CreateContextMenu( void )
if( !( GetSelectionCount() > 0 ) )
{
- pDialog->EnableEdit( FALSE );
- pDialog->EnableDel( FALSE );
+ pDialog->EnableEdit( sal_False );
+ pDialog->EnableDel( sal_False );
}
return pDialog->CreateContextMenu();
}
@@ -389,7 +389,7 @@ PopupMenu* SfxActionListBox::CreateContextMenu( void )
//-------------------------------------------------------------------------
SfxTemplateDialogWrapper::SfxTemplateDialogWrapper(Window *pParentWnd,
- USHORT nId, SfxBindings *p, SfxChildWinInfo *pInfo) :
+ sal_uInt16 nId, SfxBindings *p, SfxChildWinInfo *pInfo) :
SfxChildWindow(pParentWnd, nId)
{
SfxTemplateDialog *pWin = new SfxTemplateDialog(p, this, pParentWnd);
@@ -428,13 +428,13 @@ private:
protected:
virtual void Command( const CommandEvent& rMEvt );
virtual long Notify( NotifyEvent& rNEvt );
- virtual BOOL DoubleClickHdl();
+ virtual sal_Bool DoubleClickHdl();
virtual long ExpandingHdl();
virtual void ExpandedHdl();
- virtual BOOL NotifyMoving(SvLBoxEntry* pTarget,
+ virtual sal_Bool NotifyMoving(SvLBoxEntry* pTarget,
SvLBoxEntry* pEntry,
SvLBoxEntry*& rpNewParent,
- ULONG& rNewChildPos);
+ sal_uIntPtr& rNewChildPos);
public:
StyleTreeListBox_Impl( SfxCommonTemplateDialog_Impl* pParent, WinBits nWinStyle = 0);
@@ -454,7 +454,7 @@ public:
void StyleTreeListBox_Impl::MakeExpanded_Impl(ExpandedEntries& rEntries) const
{
SvLBoxEntry *pEntry;
- USHORT nCount=0;
+ sal_uInt16 nCount=0;
for(pEntry=(SvLBoxEntry*)FirstVisible();pEntry;pEntry=(SvLBoxEntry*)NextVisible(pEntry))
{
if(IsExpanded(pEntry))
@@ -470,7 +470,7 @@ PopupMenu* StyleTreeListBox_Impl::CreateContextMenu()
return pDialog->CreateContextMenu();
}
-BOOL StyleTreeListBox_Impl::DoubleClickHdl()
+sal_Bool StyleTreeListBox_Impl::DoubleClickHdl()
/* [Description]
@@ -479,7 +479,7 @@ BOOL StyleTreeListBox_Impl::DoubleClickHdl()
*/
{
aDoubleClickLink.Call(this);
- return FALSE;
+ return sal_False;
}
//-------------------------------------------------------------------------
@@ -520,10 +520,10 @@ long StyleTreeListBox_Impl::Notify( NotifyEvent& rNEvt )
//-------------------------------------------------------------------------
-BOOL StyleTreeListBox_Impl::NotifyMoving(SvLBoxEntry* pTarget,
+sal_Bool StyleTreeListBox_Impl::NotifyMoving(SvLBoxEntry* pTarget,
SvLBoxEntry* pEntry,
SvLBoxEntry*& rpNewParent,
- ULONG& lPos)
+ sal_uIntPtr& lPos)
/* [Description]
NotifyMoving Handler; This leads via a link on the event to the dialog.
@@ -531,10 +531,10 @@ BOOL StyleTreeListBox_Impl::NotifyMoving(SvLBoxEntry* pTarget,
*/
{
if(!pTarget || !pEntry)
- return FALSE;
+ return sal_False;
aParent = GetEntryText(pTarget);
aStyle = GetEntryText(pEntry);
- const BOOL bRet = (BOOL)aDropLink.Call(this);
+ const sal_Bool bRet = (sal_Bool)aDropLink.Call(this);
rpNewParent = pTarget;
lPos=0;
IntlWrapper aIntlWrapper( ::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLocale() );
@@ -544,7 +544,7 @@ BOOL StyleTreeListBox_Impl::NotifyMoving(SvLBoxEntry* pTarget,
GetEntryText(pTmpEntry),GetEntryText(pEntry));
pTmpEntry=NextSibling(pTmpEntry),lPos++) ;
- return bRet? (BOOL)2: FALSE;
+ return bRet? (sal_Bool)2: sal_False;
}
//-------------------------------------------------------------------------
@@ -561,7 +561,7 @@ long StyleTreeListBox_Impl::ExpandingHdl()
*/
{
pCurEntry = GetCurEntry();
- return TRUE;
+ return sal_True;
}
//-------------------------------------------------------------------------
@@ -580,7 +580,7 @@ void StyleTreeListBox_Impl::ExpandedHdl()
{
SvLBoxEntry *pEntry = GetHdlEntry();
if(!IsExpanded(pEntry) && pCurEntry != GetCurEntry())
- SelectAll( FALSE );
+ SelectAll( sal_False );
pCurEntry = 0;
}
@@ -616,14 +616,14 @@ struct StyleTree_Impl
String aName;
String aParent;
StyleTreeArr_Impl *pChilds;
- BOOL bIsExpanded;
- BOOL HasParent() const { return aParent.Len() != 0; }
+ sal_Bool bIsExpanded;
+ sal_Bool HasParent() const { return aParent.Len() != 0; }
StyleTree_Impl(const String &rName, const String &rParent):
aName(rName), aParent(rParent), pChilds(0), bIsExpanded(0) {}
~StyleTree_Impl();
- void Put(StyleTree_Impl* pIns, ULONG lPos=ULONG_MAX);
- ULONG Count();
+ void Put(StyleTree_Impl* pIns, sal_uIntPtr lPos=ULONG_MAX);
+ sal_uIntPtr Count();
};
typedef StyleTree_Impl* StyleTree_ImplPtr;
@@ -631,7 +631,7 @@ SV_DECL_PTRARR_DEL(StyleTreeArr_Impl, StyleTree_ImplPtr, 16, 8)
SV_IMPL_PTRARR(StyleTreeArr_Impl, StyleTree_ImplPtr)
-ULONG StyleTree_Impl::Count()
+sal_uIntPtr StyleTree_Impl::Count()
{
return pChilds ? pChilds->Count() : 0L;
}
@@ -645,42 +645,43 @@ StyleTree_Impl::~StyleTree_Impl()
//-------------------------------------------------------------------------
-void StyleTree_Impl::Put(StyleTree_Impl* pIns, ULONG lPos)
+void StyleTree_Impl::Put(StyleTree_Impl* pIns, sal_uIntPtr lPos)
{
if ( !pChilds )
pChilds = new StyleTreeArr_Impl;
if ( ULONG_MAX == lPos )
lPos = pChilds->Count();
- pChilds->Insert( pIns, (USHORT)lPos );
+ pChilds->Insert( pIns, (sal_uInt16)lPos );
}
//-------------------------------------------------------------------------
StyleTreeArr_Impl &MakeTree_Impl(StyleTreeArr_Impl &rArr)
{
- const USHORT nCount = rArr.Count();
+ const sal_uInt16 nCount = rArr.Count();
comphelper::string::NaturalStringSorter aSorter(
::comphelper::getProcessComponentContext(),
Application::GetSettings().GetLocale());
// Arrange all under their Parents
- USHORT i;
+ sal_uInt16 i;
for(i = 0; i < nCount; ++i)
{
StyleTree_ImplPtr pEntry = rArr[i];
if(pEntry->HasParent())
{
- for(USHORT j = 0; j < nCount; ++j)
+ for(sal_uInt16 j = 0; j < nCount; ++j)
{
StyleTree_ImplPtr pCmp = rArr[j];
if(pCmp->aName == pEntry->aParent)
{
// Paste initial filter
- USHORT nPos;
+ sal_uInt16 nPos;
for( nPos = 0 ; nPos < pCmp->Count() &&
- aSorter.compare((*pCmp->pChilds)[nPos]->aName, pEntry->aName) < 0 ; nPos++);
+ aSorter.compare((*pCmp->pChilds)[nPos]->aName, pEntry->aName) < 0 ; nPos++)
+ {};
pCmp->Put(pEntry,nPos);
break;
}
@@ -701,14 +702,14 @@ StyleTreeArr_Impl &MakeTree_Impl(StyleTreeArr_Impl &rArr)
//-------------------------------------------------------------------------
-inline BOOL IsExpanded_Impl( const ExpandedEntries& rEntries,
+inline sal_Bool IsExpanded_Impl( const ExpandedEntries& rEntries,
const String &rStr)
{
- USHORT nCount=rEntries.Count();
- for(USHORT n=0;n<nCount;n++)
+ sal_uInt16 nCount=rEntries.Count();
+ for(sal_uInt16 n=0;n<nCount;n++)
if(*rEntries[n]==rStr)
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
@@ -719,8 +720,8 @@ SvLBoxEntry* FillBox_Impl(SvTreeListBox *pBox,
SvLBoxEntry* pParent = 0)
{
SvLBoxEntry* pNewEntry = pBox->InsertEntry(pEntry->aName, pParent);
- const USHORT nCount = pEntry->pChilds? pEntry->pChilds->Count(): 0;
- for(USHORT i = 0; i < nCount; ++i)
+ const sal_uInt16 nCount = pEntry->pChilds? pEntry->pChilds->Count(): 0;
+ for(sal_uInt16 i = 0; i < nCount; ++i)
FillBox_Impl(pBox, (*pEntry->pChilds)[i], rEntries, pNewEntry);
return pNewEntry;
}
@@ -743,31 +744,32 @@ SfxCommonTemplateDialog_Impl::SfxCommonTemplateDialog_Impl( SfxBindings* pB, Sfx
DEFINE_CONST_UNICODE("com.sun.star.frame.ModuleManager") ), UNO_QUERY ),
pbDeleted ( NULL ),
- aFmtLb ( this, WB_BORDER | WB_TABSTOP ),
+ aFmtLb ( this, WB_BORDER | WB_TABSTOP | WB_SORT | WB_QUICK_SEARCH ),
aFilterLb ( pW, WB_BORDER | WB_DROPDOWN | WB_TABSTOP ),
nActFamily ( 0xffff ),
nActFilter ( 0 ),
nAppFilter ( 0 ),
- bDontUpdate ( FALSE ),
- bIsWater ( FALSE ),
- bEnabled ( TRUE ),
- bUpdate ( FALSE ),
- bUpdateFamily ( FALSE ),
- bCanEdit ( FALSE ),
- bCanDel ( FALSE ),
- bCanNew ( TRUE ),
- bWaterDisabled ( FALSE ),
- bNewByExampleDisabled ( FALSE ),
- bUpdateByExampleDisabled( FALSE ),
- bTreeDrag ( TRUE ),
- bHierarchical ( FALSE ),
- bBindingUpdate ( TRUE )
-{
+ bDontUpdate ( sal_False ),
+ bIsWater ( sal_False ),
+ bEnabled ( sal_True ),
+ bUpdate ( sal_False ),
+ bUpdateFamily ( sal_False ),
+ bCanEdit ( sal_False ),
+ bCanDel ( sal_False ),
+ bCanNew ( sal_True ),
+ bWaterDisabled ( sal_False ),
+ bNewByExampleDisabled ( sal_False ),
+ bUpdateByExampleDisabled( sal_False ),
+ bTreeDrag ( sal_True ),
+ bHierarchical ( sal_False ),
+ bBindingUpdate ( sal_True )
+{
+ aFmtLb.SetAccessibleName(SfxResId(STR_STYLE_ELEMTLIST));
aFmtLb.SetHelpId( HID_TEMPLATE_FMT );
aFilterLb.SetHelpId( HID_TEMPLATE_FILTER );
- aFmtLb.SetWindowBits( WB_HIDESELECTION );
+ aFmtLb.SetStyle( aFmtLb.GetStyle() | WB_SORT | WB_HIDESELECTION );
Font aFont = aFmtLb.GetFont();
aFont.SetWeight( WEIGHT_NORMAL );
aFmtLb.SetFont( aFont );
@@ -794,28 +796,28 @@ SfxCommonTemplateDialog_Impl::SfxCommonTemplateDialog_Impl( SfxBindings* pB, Mod
nActFilter ( 0 ),
nAppFilter ( 0 ),
- bDontUpdate ( FALSE ),
- bIsWater ( FALSE ),
- bEnabled ( TRUE ),
- bUpdate ( FALSE ),
- bUpdateFamily ( FALSE ),
- bCanEdit ( FALSE ),
- bCanDel ( FALSE ),
- bCanNew ( TRUE ),
- bWaterDisabled ( FALSE ),
- bNewByExampleDisabled ( FALSE ),
- bUpdateByExampleDisabled( FALSE ),
- bTreeDrag ( TRUE ),
- bHierarchical ( FALSE ),
- bBindingUpdate ( TRUE )
+ bDontUpdate ( sal_False ),
+ bIsWater ( sal_False ),
+ bEnabled ( sal_True ),
+ bUpdate ( sal_False ),
+ bUpdateFamily ( sal_False ),
+ bCanEdit ( sal_False ),
+ bCanDel ( sal_False ),
+ bCanNew ( sal_True ),
+ bWaterDisabled ( sal_False ),
+ bNewByExampleDisabled ( sal_False ),
+ bUpdateByExampleDisabled( sal_False ),
+ bTreeDrag ( sal_True ),
+ bHierarchical ( sal_False ),
+ bBindingUpdate ( sal_True )
{
- aFmtLb.SetWindowBits( WB_SORT );
+ aFmtLb.SetStyle( aFmtLb.GetStyle() | WB_SORT );
}
//-------------------------------------------------------------------------
-USHORT SfxCommonTemplateDialog_Impl::StyleNrToInfoOffset(USHORT nId)
+sal_uInt16 SfxCommonTemplateDialog_Impl::StyleNrToInfoOffset(sal_uInt16 nId)
{
const SfxStyleFamilyItem *pItem = pStyleFamilies->at( nId );
return SfxFamilyIdToNId(pItem->GetFamily())-1;
@@ -823,7 +825,7 @@ USHORT SfxCommonTemplateDialog_Impl::StyleNrToInfoOffset(USHORT nId)
//-------------------------------------------------------------------------
-void SfxTemplateDialog_Impl::EnableEdit(BOOL bEnable)
+void SfxTemplateDialog_Impl::EnableEdit(sal_Bool bEnable)
{
SfxCommonTemplateDialog_Impl::EnableEdit( bEnable );
if( !bEnable || !bUpdateByExampleDisabled )
@@ -833,7 +835,7 @@ void SfxTemplateDialog_Impl::EnableEdit(BOOL bEnable)
//-------------------------------------------------------------------------
-USHORT SfxCommonTemplateDialog_Impl::InfoOffsetToStyleNr(USHORT nId)
+sal_uInt16 SfxCommonTemplateDialog_Impl::InfoOffsetToStyleNr(sal_uInt16 nId)
{
for ( size_t i = 0; i < pStyleFamilies->size(); i++ )
if ( SfxFamilyIdToNId(pStyleFamilies->at( i )->GetFamily()) == nId+1 )
@@ -847,7 +849,7 @@ USHORT SfxCommonTemplateDialog_Impl::InfoOffsetToStyleNr(USHORT nId)
void SfxCommonTemplateDialog_Impl::ReadResource()
{
// Read global user resource
- for(USHORT i = 0; i < MAX_FAMILIES; ++i)
+ for(sal_uInt16 i = 0; i < MAX_FAMILIES; ++i)
pFamilyState[i] = 0;
SfxViewFrame* pViewFrame = pBindings->GetDispatcher_Impl()->GetFrame();
@@ -862,7 +864,7 @@ void SfxCommonTemplateDialog_Impl::ReadResource()
else
pStyleFamilies = new SfxStyleFamilies( aFamId );
- nActFilter = pCurObjShell ? static_cast< USHORT >( LoadFactoryStyleFilter( pCurObjShell ) ) : 0xFFFF;
+ nActFilter = pCurObjShell ? static_cast< sal_uInt16 >( LoadFactoryStyleFilter( pCurObjShell ) ) : 0xFFFF;
if ( pCurObjShell && 0xFFFF == nActFilter )
nActFilter = pCurObjShell->GetAutoStyleFilterIndex();
@@ -875,8 +877,8 @@ void SfxCommonTemplateDialog_Impl::ReadResource()
size_t i;
for(i = 0; i < nCount; ++i)
{
- USHORT nSlot = 0;
- switch( (USHORT)pStyleFamilies->at( i )->GetFamily() )
+ sal_uInt16 nSlot = 0;
+ switch( (sal_uInt16)pStyleFamilies->at( i )->GetFamily() )
{
case SFX_STYLE_FAMILY_CHAR: nSlot = SID_STYLE_FAMILY1; break;
case SFX_STYLE_FAMILY_PARA: nSlot = SID_STYLE_FAMILY2; break;
@@ -927,14 +929,14 @@ void SfxCommonTemplateDialog_Impl::ReadResource()
for( ; nCount--; )
{
const SfxStyleFamilyItem *pItem = pStyleFamilies->at( nCount );
- USHORT nId = SfxFamilyIdToNId( pItem->GetFamily() );
+ sal_uInt16 nId = SfxFamilyIdToNId( pItem->GetFamily() );
InsertFamilyItem( nId, pItem );
}
LoadedFamilies();
- USHORT nStart = SID_STYLE_FAMILY1;
- USHORT nEnd = SID_STYLE_FAMILY4;
+ sal_uInt16 nStart = SID_STYLE_FAMILY1;
+ sal_uInt16 nEnd = SID_STYLE_FAMILY4;
for ( i = nStart; i <= nEnd; i++ )
pBindings->Update(i);
@@ -948,7 +950,7 @@ void SfxCommonTemplateDialog_Impl::ClearResource()
{
ClearFamilyList();
DELETEX(pStyleFamilies);
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < MAX_FAMILIES; ++i )
DELETEX(pFamilyState[i]);
for ( i = 0; i < COUNT_BOUND_FUNC; ++i )
@@ -986,7 +988,7 @@ SfxCommonTemplateDialog_Impl::~SfxCommonTemplateDialog_Impl()
GetWindow()->Hide();
DELETEX(pStyleFamilies);
DELETEZ( m_pStyleFamiliesId );
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < MAX_FAMILIES; ++i )
DELETEX(pFamilyState[i]);
for ( i = 0; i < COUNT_BOUND_FUNC; ++i )
@@ -1005,7 +1007,7 @@ SfxCommonTemplateDialog_Impl::~SfxCommonTemplateDialog_Impl()
//-------------------------------------------------------------------------
-USHORT SfxCommonTemplateDialog_Impl::SfxFamilyIdToNId( SfxStyleFamily nFamily )
+sal_uInt16 SfxCommonTemplateDialog_Impl::SfxFamilyIdToNId( SfxStyleFamily nFamily )
{
switch ( nFamily )
{
@@ -1020,10 +1022,10 @@ USHORT SfxCommonTemplateDialog_Impl::SfxFamilyIdToNId( SfxStyleFamily nFamily )
void SfxCommonTemplateDialog_Impl::SetAutomaticFilter()
{
- USHORT nCount = aFilterLb.GetEntryCount();
- for ( USHORT i = 0; i < nCount; ++i )
+ sal_uInt16 nCount = aFilterLb.GetEntryCount();
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
- ULONG nFlags = (ULONG)aFilterLb.GetEntryData(i);
+ sal_uIntPtr nFlags = (sal_uIntPtr)aFilterLb.GetEntryData(i);
if ( SFXSTYLEBIT_AUTO == nFlags )
{
// automatic entry found -> select it
@@ -1043,7 +1045,7 @@ const SfxStyleFamilyItem *SfxCommonTemplateDialog_Impl::GetFamilyItem_Impl() con
for(size_t i = 0; i < nCount; ++i)
{
const SfxStyleFamilyItem *pItem = pStyleFamilies->at( i );
- USHORT nId = SfxFamilyIdToNId(pItem->GetFamily());
+ sal_uInt16 nId = SfxFamilyIdToNId(pItem->GetFamily());
if(nId == nActFamily)
return pItem;
}
@@ -1062,7 +1064,7 @@ void SfxCommonTemplateDialog_Impl::SelectStyle(const String &rStr)
if( pStyle )
EnableEdit( !(pStyle->GetMask() & SFXSTYLEBIT_READONLY) );
else
- EnableEdit(FALSE);
+ EnableEdit(sal_False);
if ( pTreeBox )
{
@@ -1081,18 +1083,18 @@ void SfxCommonTemplateDialog_Impl::SelectStyle(const String &rStr)
}
}
else
- pTreeBox->SelectAll( FALSE );
+ pTreeBox->SelectAll( sal_False );
}
else
{
- BOOL bSelect = ( rStr.Len() > 0 );
+ sal_Bool bSelect = ( rStr.Len() > 0 );
if ( bSelect )
{
SvLBoxEntry* pEntry = (SvLBoxEntry*)aFmtLb.FirstVisible();
while ( pEntry && aFmtLb.GetEntryText( pEntry ) != rStr )
pEntry = (SvLBoxEntry*)aFmtLb.NextVisible( pEntry );
if ( !pEntry )
- bSelect = FALSE;
+ bSelect = sal_False;
else
{
aFmtLb.MakeVisible( pEntry );
@@ -1104,8 +1106,8 @@ void SfxCommonTemplateDialog_Impl::SelectStyle(const String &rStr)
if ( !bSelect )
{
- aFmtLb.SelectAll( FALSE );
- EnableEdit(FALSE);
+ aFmtLb.SelectAll( sal_False );
+ EnableEdit(sal_False);
}
}
}
@@ -1132,7 +1134,7 @@ String SfxCommonTemplateDialog_Impl::GetSelectedEntry() const
//-------------------------------------------------------------------------
-void SfxCommonTemplateDialog_Impl::EnableTreeDrag( BOOL bEnable )
+void SfxCommonTemplateDialog_Impl::EnableTreeDrag( sal_Bool bEnable )
{
if ( pStyleSheetPool )
{
@@ -1175,13 +1177,13 @@ void SfxCommonTemplateDialog_Impl::FillTreeBox()
if(pTreeBox)
((const StyleTreeListBox_Impl *)pTreeBox)->
MakeExpanded_Impl( aEntries);
- pTreeBox->SetUpdateMode( FALSE );
+ pTreeBox->SetUpdateMode( sal_False );
pTreeBox->Clear();
- const USHORT nCount = aArr.Count();
- for(USHORT i = 0; i < nCount; ++i)
+ const sal_uInt16 nCount = aArr.Count();
+ for(sal_uInt16 i = 0; i < nCount; ++i)
FillBox_Impl(pTreeBox, aArr[i], aEntries);
;
- EnableItem(SID_STYLE_WATERCAN,FALSE);
+ EnableItem(SID_STYLE_WATERCAN,sal_False);
SfxTemplateItem* pState = pFamilyState[nActFamily-1];
@@ -1194,7 +1196,7 @@ void SfxCommonTemplateDialog_Impl::FillTreeBox()
pTreeBox->Expand( pEntry );
}
- pTreeBox->SetUpdateMode( TRUE );
+ pTreeBox->SetUpdateMode( sal_True );
String aStyle;
if(pState) // Select current entry
@@ -1205,7 +1207,7 @@ void SfxCommonTemplateDialog_Impl::FillTreeBox()
}
//-------------------------------------------------------------------------
-BOOL SfxCommonTemplateDialog_Impl::HasSelectedStyle() const
+sal_Bool SfxCommonTemplateDialog_Impl::HasSelectedStyle() const
{
return pTreeBox? pTreeBox->FirstSelected() != 0:
aFmtLb.GetSelectionCount() != 0;
@@ -1216,7 +1218,7 @@ BOOL SfxCommonTemplateDialog_Impl::HasSelectedStyle() const
// internal: Refresh the display
// nFlags: what we should update.
-void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(USHORT nFlags)
+void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(sal_uInt16 nFlags)
{
DBG_ASSERT(nFlags, "nothing to do");
const SfxStyleFamilyItem *pItem = GetFamilyItem_Impl();
@@ -1240,7 +1242,7 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(USHORT nFlags)
const SfxStyleFamily eFam = pItem->GetFamily();
SfxFilterTupel* pT = ( nActFilter < pItem->GetFilterList().size() ? pItem->GetFilterList()[nActFilter] : NULL );
- USHORT nFilter = pT ? pT->nFlags : 0;
+ sal_uInt16 nFilter = pT ? pT->nFlags : 0;
if(!nFilter) // automatic
nFilter = nAppFilter;
@@ -1251,16 +1253,16 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(USHORT nFlags)
pItem = GetFamilyItem_Impl();
if((nFlags & UPDATE_FAMILY) == UPDATE_FAMILY) // Update view type list (Hierarchical, All, etc.
{
- CheckItem(nActFamily, TRUE); // check Button in Toolbox
- aFilterLb.SetUpdateMode(FALSE);
+ CheckItem(nActFamily, sal_True); // check Button in Toolbox
+ aFilterLb.SetUpdateMode(sal_False);
aFilterLb.Clear();
//insert hierarchical at the beginning
- USHORT nPos = aFilterLb.InsertEntry(String(SfxResId(STR_STYLE_FILTER_HIERARCHICAL)), 0);
- aFilterLb.SetEntryData( nPos, (void*)(ULONG)SFXSTYLEBIT_ALL );
+ sal_uInt16 nPos = aFilterLb.InsertEntry(String(SfxResId(STR_STYLE_FILTER_HIERARCHICAL)), 0);
+ aFilterLb.SetEntryData( nPos, (void*)(sal_uIntPtr)SFXSTYLEBIT_ALL );
const SfxStyleFilter& rFilter = pItem->GetFilterList();
for( size_t i = 0; i < rFilter.size(); ++i)
{
- ULONG nFilterFlags = rFilter[ i ]->nFlags;
+ sal_uIntPtr nFilterFlags = rFilter[ i ]->nFlags;
nPos = aFilterLb.InsertEntry( rFilter[ i ]->aName );
aFilterLb.SetEntryData( nPos, (void*)nFilterFlags );
}
@@ -1271,7 +1273,7 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(USHORT nFlags)
nActFilter = 0;
aFilterLb.SelectEntryPos(1);
SfxFilterTupel* pActT = ( nActFilter < rFilter.size() ) ? rFilter[ nActFilter ] : NULL;
- USHORT nFilterFlags = pActT ? pActT->nFlags : 0;
+ sal_uInt16 nFilterFlags = pActT ? pActT->nFlags : 0;
pStyleSheetPool->SetSearchMask(eFam, nFilterFlags);
}
@@ -1281,7 +1283,7 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(USHORT nFlags)
// show maximum 12 entries
aFilterLb.SetDropDownLineCount( MAX_FILTER_ENTRIES );
- aFilterLb.SetUpdateMode(TRUE);
+ aFilterLb.SetUpdateMode(sal_True);
}
else
{
@@ -1296,7 +1298,7 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(USHORT nFlags)
if(nFlags & UPDATE_FAMILY_LIST)
{
- EnableItem(SID_STYLE_WATERCAN,FALSE);
+ EnableItem(SID_STYLE_WATERCAN,sal_False);
SfxStyleSheetBase *pStyle = pStyleSheetPool->First();
SvLBoxEntry* pEntry = aFmtLb.First();
@@ -1309,16 +1311,17 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(USHORT nFlags)
while( pStyle )
{
//Bubblesort
- USHORT nPos;
+ sal_uInt16 nPos;
for( nPos = aStrings.Count() ; nPos &&
- aSorter.compare(*(aStrings[nPos-1]), pStyle->GetName()) > 0 ; nPos--);
+ aSorter.compare(*(aStrings[nPos-1]), pStyle->GetName()) > 0 ; nPos--)
+ {};
aStrings.Insert( new String( pStyle->GetName() ), nPos );
pStyle = pStyleSheetPool->Next();
}
- USHORT nCount = aStrings.Count();
- USHORT nPos = 0;
+ sal_uInt16 nCount = aStrings.Count();
+ sal_uInt16 nPos = 0;
while( nPos < nCount && pEntry &&
*aStrings[ nPos ] == aFmtLb.GetEntryText( pEntry ) )
{
@@ -1329,15 +1332,15 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(USHORT nFlags)
if( nPos < nCount || pEntry )
{
// Fills the display box
- aFmtLb.SetUpdateMode(FALSE);
+ aFmtLb.SetUpdateMode(sal_False);
aFmtLb.Clear();
nPos = 0;
for(nPos = 0 ; nPos < nCount ; ++nPos )
{
- aFmtLb.InsertEntry( *aStrings.GetObject( nPos ), 0, FALSE, nPos);
+ aFmtLb.InsertEntry( *aStrings.GetObject( nPos ), 0, sal_False, nPos);
}
- aFmtLb.SetUpdateMode(TRUE);
+ aFmtLb.SetUpdateMode(true);
}
// Selects the current style if any
SfxTemplateItem *pState = pFamilyState[nActFamily-1];
@@ -1363,13 +1366,13 @@ void SfxCommonTemplateDialog_Impl::SetWaterCanState(const SfxBoolItem *pItem)
if(pItem && !bWaterDisabled)
{
CheckItem(SID_STYLE_WATERCAN, pItem->GetValue());
- EnableItem( SID_STYLE_WATERCAN, TRUE );
+ EnableItem( SID_STYLE_WATERCAN, sal_True );
}
else
if(!bWaterDisabled)
- EnableItem(SID_STYLE_WATERCAN, TRUE);
+ EnableItem(SID_STYLE_WATERCAN, sal_True);
else
- EnableItem(SID_STYLE_WATERCAN, FALSE);
+ EnableItem(SID_STYLE_WATERCAN, sal_False);
// Ignore while in watercan mode statusupdates
@@ -1378,7 +1381,7 @@ void SfxCommonTemplateDialog_Impl::SetWaterCanState(const SfxBoolItem *pItem)
for(size_t n = 0; n < nCount; n++)
{
SfxControllerItem *pCItem=pBoundItems[n];
- BOOL bChecked = pItem && pItem->GetValue();
+ sal_Bool bChecked = pItem && pItem->GetValue();
if( pCItem->IsBound() == bChecked )
{
if( !bChecked )
@@ -1396,16 +1399,16 @@ void SfxCommonTemplateDialog_Impl::SetWaterCanState(const SfxBoolItem *pItem)
// (is updated when all states have also been updated.)
// See also: <SfxBindings::AddDoneHdl(const Link &)>
-void SfxCommonTemplateDialog_Impl::SetFamilyState( USHORT nSlotId, const SfxTemplateItem* pItem )
+void SfxCommonTemplateDialog_Impl::SetFamilyState( sal_uInt16 nSlotId, const SfxTemplateItem* pItem )
{
- USHORT nIdx = nSlotId - SID_STYLE_FAMILY_START;
+ sal_uInt16 nIdx = nSlotId - SID_STYLE_FAMILY_START;
DELETEZ(pFamilyState[nIdx]);
if ( pItem )
pFamilyState[nIdx] = new SfxTemplateItem(*pItem);
- bUpdate = TRUE;
+ bUpdate = sal_True;
// If used templates (how the hell you find this out??)
- bUpdateFamily = TRUE;
+ bUpdateFamily = sal_True;
}
//-------------------------------------------------------------------------
@@ -1414,7 +1417,7 @@ void SfxCommonTemplateDialog_Impl::SetFamilyState( USHORT nSlotId, const SfxTemp
void SfxCommonTemplateDialog_Impl::Update_Impl()
{
- BOOL bDocChanged=FALSE;
+ sal_Bool bDocChanged=sal_False;
SfxStyleSheetBasePool* pNewPool = NULL;
SfxViewFrame* pViewFrame = pBindings->GetDispatcher_Impl()->GetFrame();
SfxObjectShell* pDocShell = pViewFrame->GetObjectShell();
@@ -1439,14 +1442,14 @@ void SfxCommonTemplateDialog_Impl::Update_Impl()
{
StartListening(*pNewPool);
pStyleSheetPool = pNewPool;
- bDocChanged=TRUE;
+ bDocChanged=sal_True;
}
}
if (bUpdateFamily)
UpdateFamily_Impl();
- USHORT i;
+ sal_uInt16 i;
for(i = 0; i < MAX_FAMILIES; ++i)
if(pFamilyState[i])
break;
@@ -1458,7 +1461,7 @@ void SfxCommonTemplateDialog_Impl::Update_Impl()
// current region not within the allowed region or default
if(nActFamily == 0xffff || 0 == (pItem = pFamilyState[nActFamily-1] ) )
{
- CheckItem(nActFamily, FALSE);
+ CheckItem(nActFamily, sal_False);
SfxTemplateItem **ppItem = pFamilyState;
const size_t nFamilyCount = pStyleFamilies->size();
size_t n;
@@ -1474,8 +1477,8 @@ void SfxCommonTemplateDialog_Impl::Update_Impl()
else if( bDocChanged )
{
// other DocShell -> all new
- CheckItem( nActFamily, TRUE );
- nActFilter = static_cast< USHORT >( LoadFactoryStyleFilter( pDocShell ) );
+ CheckItem( nActFamily, sal_True );
+ nActFilter = static_cast< sal_uInt16 >( LoadFactoryStyleFilter( pDocShell ) );
if ( 0xFFFF == nActFilter )
nActFilter = pDocShell->GetAutoStyleFilterIndex();
@@ -1490,7 +1493,7 @@ void SfxCommonTemplateDialog_Impl::Update_Impl()
else
{
// other filters for automatic
- CheckItem( nActFamily, TRUE );
+ CheckItem( nActFamily, sal_True );
const SfxStyleFamilyItem *pStyleItem = GetFamilyItem_Impl();
#if OSL_DEBUG_LEVEL > 1
SfxFilterTupel *pT;
@@ -1521,7 +1524,7 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, TimeOut, Timer *, pTim )
(void)pTim; // unused
if(!bDontUpdate)
{
- bDontUpdate=TRUE;
+ bDontUpdate=sal_True;
if(!pTreeBox)
UpdateStyles_Impl(UPDATE_FAMILY_LIST);
else
@@ -1535,7 +1538,7 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, TimeOut, Timer *, pTim )
EnableDelete();
}
}
- bDontUpdate=FALSE;
+ bDontUpdate=sal_False;
DELETEZ(pTimer);
}
else
@@ -1564,7 +1567,7 @@ void SfxCommonTemplateDialog_Impl::Notify(SfxBroadcaster& /*rBC*/, const SfxHint
)
)
{
- bUpdate = FALSE;
+ bUpdate = sal_False;
Update_Impl();
}
else if ( bUpdateFamily )
@@ -1587,7 +1590,7 @@ void SfxCommonTemplateDialog_Impl::Notify(SfxBroadcaster& /*rBC*/, const SfxHint
EnableEdit(
!(pStyle->GetMask() & SFXSTYLEBIT_READONLY) );
else
- EnableEdit(FALSE);
+ EnableEdit(sal_False);
}
}
break;
@@ -1597,7 +1600,7 @@ void SfxCommonTemplateDialog_Impl::Notify(SfxBroadcaster& /*rBC*/, const SfxHint
// the same template is used. Do not immediately call Update_Impl,
// for the case that one of the documents is an internal InPlaceObjekt!
case SFX_HINT_DOCCHANGED:
- bUpdate = TRUE;
+ bUpdate = sal_True;
break;
case SFX_HINT_DYING:
{
@@ -1612,7 +1615,7 @@ void SfxCommonTemplateDialog_Impl::Notify(SfxBroadcaster& /*rBC*/, const SfxHint
// possible that a new one is registered after the timer is up -
// works bad in UpdateStyles_Impl ()!
- ULONG nId = rHint.ISA(SfxSimpleHint) ? ( (SfxSimpleHint&)rHint ).GetId() : 0;
+ sal_uIntPtr nId = rHint.ISA(SfxSimpleHint) ? ( (SfxSimpleHint&)rHint ).GetId() : 0;
if(!bDontUpdate && nId != SFX_HINT_DYING &&
(rHint.Type() == TYPE(SfxStyleSheetPoolHint)||
@@ -1636,8 +1639,8 @@ void SfxCommonTemplateDialog_Impl::Notify(SfxBroadcaster& /*rBC*/, const SfxHint
// Other filters; can be switched by the users or as a result of new or
// editing, if the current document has been assigned a different filter.
void SfxCommonTemplateDialog_Impl::FilterSelect(
- USHORT nEntry, // Idx of the new Filters
- BOOL bForce ) // Force update, even if the new filter is
+ sal_uInt16 nEntry, // Idx of the new Filters
+ sal_Bool bForce ) // Force update, even if the new filter is
// equal to the current
{
if( nEntry != nActFilter || bForce )
@@ -1668,9 +1671,9 @@ void SfxCommonTemplateDialog_Impl::FilterSelect(
//-------------------------------------------------------------------------
// Internal: Perform functions through the Dispatcher
-BOOL SfxCommonTemplateDialog_Impl::Execute_Impl(
- USHORT nId, const String &rStr, const String& rRefStr, USHORT nFamily,
- USHORT nMask, USHORT *pIdx, const USHORT* pModifier)
+sal_Bool SfxCommonTemplateDialog_Impl::Execute_Impl(
+ sal_uInt16 nId, const String &rStr, const String& rRefStr, sal_uInt16 nFamily,
+ sal_uInt16 nMask, sal_uInt16 *pIdx, const sal_uInt16* pModifier)
{
SfxDispatcher &rDispatcher = *SFX_APP()->GetDispatcher_Impl();
SfxStringItem aItem(nId, rStr);
@@ -1679,7 +1682,7 @@ BOOL SfxCommonTemplateDialog_Impl::Execute_Impl(
SfxStringItem aUpdName(SID_STYLE_UPD_BY_EX_NAME, rStr);
SfxStringItem aRefName( SID_STYLE_REFERENCE, rRefStr );
const SfxPoolItem* pItems[ 6 ];
- USHORT nCount = 0;
+ sal_uInt16 nCount = 0;
if( rStr.Len() )
pItems[ nCount++ ] = &aItem;
pItems[ nCount++ ] = &aFamily;
@@ -1699,20 +1702,20 @@ BOOL SfxCommonTemplateDialog_Impl::Execute_Impl(
Deleted aDeleted;
pbDeleted = &aDeleted;
- USHORT nModi = pModifier ? *pModifier : 0;
+ sal_uInt16 nModi = pModifier ? *pModifier : 0;
const SfxPoolItem* pItem = rDispatcher.Execute(
nId, SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD | SFX_CALLMODE_MODAL,
pItems, nModi );
// FIXME: Dialog can be destroyed while in Execute() check stack variable for dtor flag!
if ( !pItem || aDeleted() )
- return FALSE;
+ return sal_False;
if ( nId == SID_STYLE_NEW || SID_STYLE_EDIT == nId )
{
SfxUInt16Item *pFilterItem = PTR_CAST(SfxUInt16Item, pItem);
DBG_ASSERT(pFilterItem, "SfxUINT16Item expected");
- USHORT nFilterFlags = pFilterItem->GetValue() & ~SFXSTYLEBIT_USERDEF;
+ sal_uInt16 nFilterFlags = pFilterItem->GetValue() & ~SFXSTYLEBIT_USERDEF;
if(!nFilterFlags) // User Template?
nFilterFlags = pFilterItem->GetValue();
const SfxStyleFamilyItem *pFamilyItem = GetFamilyItem_Impl();
@@ -1731,7 +1734,7 @@ BOOL SfxCommonTemplateDialog_Impl::Execute_Impl(
// where the local stack object is already destroyed. This would
// overwrite objects on the stack!! See #i100110
pbDeleted = NULL;
- return TRUE;
+ return sal_True;
}
//-------------------------------------------------------------------------
@@ -1744,14 +1747,14 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, FilterSelectHdl, ListBox *, pBox )
if ( !bHierarchical )
{
// Turn on treeView
- bHierarchical=TRUE;
+ bHierarchical=sal_True;
const String aSelectEntry( GetSelectedEntry());
aFmtLb.Hide();
pTreeBox = new StyleTreeListBox_Impl(
this, WB_HASBUTTONS | WB_HASLINES |
WB_BORDER | WB_TABSTOP | WB_HASLINESATROOT |
- WB_HASBUTTONSATROOT | WB_HIDESELECTION );
+ WB_HASBUTTONSATROOT | WB_HIDESELECTION | WB_QUICK_SEARCH );
pTreeBox->SetFont( aFmtLb.GetFont() );
pTreeBox->SetPosSizePixel(aFmtLb.GetPosPixel(), aFmtLb.GetSizePixel());
@@ -1770,6 +1773,7 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, FilterSelectHdl, ListBox *, pBox )
SaveFactoryStyleFilter( pDocShell, HIERARCHICAL_FILTER_INDEX );
FillTreeBox();
SelectStyle(aSelectEntry);
+ pTreeBox->SetAccessibleName(SfxResId(STR_STYLE_ELEMTLIST));
pTreeBox->Show();
}
}
@@ -1782,7 +1786,7 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, FilterSelectHdl, ListBox *, pBox )
// If bHierarchical, then the family can have changed
// minus one since hierarchical is inserted at the start
FilterSelect(pBox->GetSelectEntryPos() - 1, bHierarchical );
- bHierarchical=FALSE;
+ bHierarchical=sal_False;
}
return 0;
@@ -1791,11 +1795,11 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, FilterSelectHdl, ListBox *, pBox )
//-------------------------------------------------------------------------
// Select-Handler for the Toolbox
-void SfxCommonTemplateDialog_Impl::FamilySelect(USHORT nEntry)
+void SfxCommonTemplateDialog_Impl::FamilySelect(sal_uInt16 nEntry)
{
if( nEntry != nActFamily )
{
- CheckItem( nActFamily, FALSE );
+ CheckItem( nActFamily, sal_False );
nActFamily = nEntry;
SfxDispatcher* pDispat = pBindings->GetDispatcher_Impl();
SfxUInt16Item aItem( SID_STYLE_FAMILY, nEntry );
@@ -1808,15 +1812,15 @@ void SfxCommonTemplateDialog_Impl::FamilySelect(USHORT nEntry)
//-------------------------------------------------------------------------
-void SfxCommonTemplateDialog_Impl::ActionSelect(USHORT nEntry)
+void SfxCommonTemplateDialog_Impl::ActionSelect(sal_uInt16 nEntry)
{
String aEmpty;
switch(nEntry)
{
case SID_STYLE_WATERCAN:
{
- const BOOL bState = IsCheckedItem(nEntry);
- BOOL bCheck;
+ const sal_Bool bState = IsCheckedItem(nEntry);
+ sal_Bool bCheck;
SfxBoolItem aBool;
// when a template is chosen.
if(!bState && aFmtLb.GetSelectionCount())
@@ -1825,13 +1829,13 @@ void SfxCommonTemplateDialog_Impl::ActionSelect(USHORT nEntry)
GetSelectedEntry());
Execute_Impl(
SID_STYLE_WATERCAN, aTemplName, aEmpty,
- (USHORT)GetFamilyItem_Impl()->GetFamily() );
- bCheck = TRUE;
+ (sal_uInt16)GetFamilyItem_Impl()->GetFamily() );
+ bCheck = sal_True;
}
else
{
Execute_Impl(SID_STYLE_WATERCAN, aEmpty, aEmpty, 0);
- bCheck = FALSE;
+ bCheck = sal_False;
}
CheckItem(nEntry, bCheck);
aBool.SetValue(bCheck);
@@ -1844,7 +1848,7 @@ void SfxCommonTemplateDialog_Impl::ActionSelect(USHORT nEntry)
{
const SfxStyleFamily eFam=GetFamilyItem_Impl()->GetFamily();
const SfxStyleFamilyItem *pItem = GetFamilyItem_Impl();
- USHORT nFilter;
+ sal_uInt16 nFilter;
if( pItem && nActFilter != 0xffff )
{
nFilter = pItem->GetFilterList()[ nActFilter ]->nFlags;
@@ -1863,7 +1867,7 @@ void SfxCommonTemplateDialog_Impl::ActionSelect(USHORT nEntry)
const String aTemplName(pDlg->GetName());
Execute_Impl(SID_STYLE_NEW_BY_EXAMPLE,
aTemplName, aEmpty,
- (USHORT)GetFamilyItem_Impl()->GetFamily(),
+ (sal_uInt16)GetFamilyItem_Impl()->GetFamily(),
nFilter);
}
pStyleSheetPool->SetSearchMask( eFam, nFilter );
@@ -1875,7 +1879,7 @@ void SfxCommonTemplateDialog_Impl::ActionSelect(USHORT nEntry)
{
Execute_Impl(SID_STYLE_UPDATE_BY_EXAMPLE,
aEmpty, aEmpty,
- (USHORT)GetFamilyItem_Impl()->GetFamily());
+ (sal_uInt16)GetFamilyItem_Impl()->GetFamily());
break;
}
case SID_TEMPLATE_LOAD:
@@ -1949,11 +1953,11 @@ void SfxCommonTemplateDialog_Impl::SaveFactoryStyleFilter( SfxObjectShell* i_pOb
IMPL_LINK( SfxCommonTemplateDialog_Impl, DropHdl, StyleTreeListBox_Impl *, pBox )
{
- bDontUpdate=TRUE;
+ bDontUpdate=sal_True;
const SfxStyleFamilyItem *pItem = GetFamilyItem_Impl();
const SfxStyleFamily eFam = pItem->GetFamily();
long ret= pStyleSheetPool->SetParent(eFam,pBox->GetStyle(), pBox->GetParent())? 1L: 0L;
- bDontUpdate=FALSE;
+ bDontUpdate=sal_False;
return ret;
}
@@ -1974,7 +1978,7 @@ void SfxCommonTemplateDialog_Impl::NewHdl(void *)
const SfxStyleFamilyItem *pItem = GetFamilyItem_Impl();
const SfxStyleFamily eFam=pItem->GetFamily();
- USHORT nMask;
+ sal_uInt16 nMask;
if( pItem && nActFilter != 0xffff )
{
nMask = pItem->GetFilterList()[ nActFilter ]->nFlags;
@@ -1988,7 +1992,7 @@ void SfxCommonTemplateDialog_Impl::NewHdl(void *)
Execute_Impl(SID_STYLE_NEW,
aEmpty, GetSelectedEntry(),
- ( USHORT )GetFamilyItem_Impl()->GetFamily(),
+ ( sal_uInt16 )GetFamilyItem_Impl()->GetFamily(),
nMask);
Application::SetDefDialogParent( pTmp );
@@ -2002,7 +2006,7 @@ void SfxCommonTemplateDialog_Impl::EditHdl(void *)
{
if(IsInitialized() && HasSelectedStyle())
{
- USHORT nFilter = nActFilter;
+ sal_uInt16 nFilter = nActFilter;
String aTemplName(GetSelectedEntry());
const SfxStyleFamilyItem *pItem = GetFamilyItem_Impl();
const SfxStyleFamily eFam = pItem->GetFamily();
@@ -2015,7 +2019,7 @@ void SfxCommonTemplateDialog_Impl::EditHdl(void *)
else
Application::SetDefDialogParent( pWindow );
if ( Execute_Impl( SID_STYLE_EDIT, aTemplName, String(),
- (USHORT)GetFamilyItem_Impl()->GetFamily(), 0, &nFilter ) )
+ (sal_uInt16)GetFamilyItem_Impl()->GetFamily(), 0, &nFilter ) )
{
}
Application::SetDefDialogParent( pTmp );
@@ -2052,15 +2056,15 @@ void SfxCommonTemplateDialog_Impl::DeleteHdl(void *)
if ( pTreeBox ) // To prevent the Treelistbox to shut down while
// deleting.
{
- bDontUpdate = TRUE;
+ bDontUpdate = sal_True;
}
Execute_Impl( SID_STYLE_DELETE, aTemplName,
- String(), (USHORT)GetFamilyItem_Impl()->GetFamily() );
+ String(), (sal_uInt16)GetFamilyItem_Impl()->GetFamily() );
if ( pTreeBox )
{
pTreeBox->RemoveParentKeepChilds( pTreeBox->FirstSelected() );
- bDontUpdate = FALSE;
+ bDontUpdate = sal_False;
}
}
}
@@ -2077,7 +2081,7 @@ void SfxCommonTemplateDialog_Impl::EnableDelete()
const String aTemplName(GetSelectedEntry());
const SfxStyleFamilyItem *pItem = GetFamilyItem_Impl();
const SfxStyleFamily eFam = pItem->GetFamily();
- USHORT nFilter = 0;
+ sal_uInt16 nFilter = 0;
if(pItem->GetFilterList().size() > nActFilter)
nFilter = pItem->GetFilterList()[ nActFilter ]->nFlags;
if(!nFilter) // automatic
@@ -2088,16 +2092,16 @@ void SfxCommonTemplateDialog_Impl::EnableDelete()
DBG_ASSERT(pStyle, "Style ot found");
if(pStyle && pStyle->IsUserDefined())
{
- EnableDel(TRUE);
+ EnableDel(sal_True);
}
else
{
- EnableDel(FALSE);
+ EnableDel(sal_False);
}
}
else
{
- EnableDel(FALSE);
+ EnableDel(sal_False);
}
}
@@ -2125,10 +2129,10 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, ApplyHdl, Control *, pControl )
if ( IsInitialized() && 0 != pFamilyState[nActFamily-1] &&
GetSelectedEntry().Len() )
{
- USHORT nModifier = aFmtLb.GetModifier();
+ sal_uInt16 nModifier = aFmtLb.GetModifier();
Execute_Impl(SID_STYLE_APPLY,
GetSelectedEntry(), String(),
- ( USHORT )GetFamilyItem_Impl()->GetFamily(),
+ ( sal_uInt16 )GetFamilyItem_Impl()->GetFamily(),
0, 0, &nModifier );
if(ISA(SfxTemplateCatalog_Impl))
((SfxTemplateCatalog_Impl*) this)->pReal->EndDialog(RET_OK);
@@ -2156,7 +2160,7 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, FmtSelectHdl, SvTreeListBox *, pListBox
aEmpty, aEmpty, 0);
Execute_Impl(SID_STYLE_WATERCAN,
GetSelectedEntry(), aEmpty,
- ( USHORT )GetFamilyItem_Impl()->GetFamily());
+ ( sal_uInt16 )GetFamilyItem_Impl()->GetFamily());
}
EnableItem(SID_STYLE_WATERCAN, !bWaterDisabled);
EnableDelete();
@@ -2176,16 +2180,16 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, MenuSelectHdl, Menu *, pMenu )
nLastItemId = pMenu->GetCurItemId();
Application::PostUserEvent(
LINK( this, SfxCommonTemplateDialog_Impl, MenuSelectHdl ), 0 );
- return TRUE;
+ return sal_True;
}
switch(nLastItemId) {
case ID_NEW: NewHdl(0); break;
case ID_EDIT: EditHdl(0); break;
case ID_DELETE: DeleteHdl(0); break;
- default: return FALSE;
+ default: return sal_False;
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -2193,7 +2197,7 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, MenuSelectHdl, Menu *, pMenu )
void SfxCommonTemplateDialog_Impl::ExecuteContextMenu_Impl( const Point& rPos, Window* pWin )
{
// Bug# 94152: This part should never be called, because before this happens, the TreeListBox should captured this!
- DBG_ASSERT( FALSE, "+SfxCommonTemplateDialog_Impl::ExecuteContextMenu_Impl(): How could this happen? Please infirm developer ASAP!" );
+ DBG_ASSERT( sal_False, "+SfxCommonTemplateDialog_Impl::ExecuteContextMenu_Impl(): How could this happen? Please infirm developer ASAP!" );
PopupMenu* pMenu = CreateContextMenu();
pMenu->Execute( pWin, rPos );
@@ -2213,7 +2217,7 @@ SfxStyleFamily SfxCommonTemplateDialog_Impl::GetActualFamily() const
// -----------------------------------------------------------------------
-void SfxCommonTemplateDialog_Impl::EnableExample_Impl(USHORT nId, BOOL bEnable)
+void SfxCommonTemplateDialog_Impl::EnableExample_Impl(sal_uInt16 nId, sal_Bool bEnable)
{
if( nId == SID_STYLE_NEW_BY_EXAMPLE )
bNewByExampleDisabled = !bEnable;
@@ -2232,9 +2236,9 @@ PopupMenu* SfxCommonTemplateDialog_Impl::CreateContextMenu( void )
{
if ( bBindingUpdate )
{
- pBindings->Invalidate( SID_STYLE_NEW, TRUE, FALSE );
+ pBindings->Invalidate( SID_STYLE_NEW, sal_True, sal_False );
pBindings->Update( SID_STYLE_NEW );
- bBindingUpdate = FALSE;
+ bBindingUpdate = sal_False;
}
PopupMenu* pMenu = new PopupMenu( SfxResId( MN_CONTEXT_TEMPLDLG ) );
pMenu->SetSelectHdl( LINK( this, SfxCommonTemplateDialog_Impl, MenuSelectHdl ) );
@@ -2253,7 +2257,7 @@ SfxTemplateDialog_Impl::SfxTemplateDialog_Impl(
SfxCommonTemplateDialog_Impl( pB, pDlgWindow ),
m_pFloat ( pDlgWindow ),
- m_bZoomIn ( FALSE ),
+ m_bZoomIn ( sal_False ),
m_aActionTbL ( pDlgWindow, this ),
m_aActionTbR ( pDlgWindow, SfxResId( TB_ACTION ) )
@@ -2261,7 +2265,7 @@ SfxTemplateDialog_Impl::SfxTemplateDialog_Impl(
pDlgWindow->FreeResource();
SfxViewFrame* pViewFrame = pBindings->GetDispatcher_Impl()->GetFrame();
pCurObjShell = pViewFrame->GetObjectShell();
- USHORT nSavedFilter = static_cast< USHORT >( LoadFactoryStyleFilter( pCurObjShell ) );
+ sal_uInt16 nSavedFilter = static_cast< sal_uInt16 >( LoadFactoryStyleFilter( pCurObjShell ) );
Initialize();
m_aActionTbL.SetSelectHdl(LINK(this, SfxTemplateDialog_Impl, ToolBoxLSelect));
@@ -2275,7 +2279,7 @@ SfxTemplateDialog_Impl::SfxTemplateDialog_Impl(
m_aActionTbL.SetHelpId( HID_TEMPLDLG_TOOLBOX_LEFT );
if( nSavedFilter == HIERARCHICAL_FILTER_INDEX )
{
- bHierarchical = FALSE; // Force content refresh
+ bHierarchical = sal_False; // Force content refresh
aFilterLb.SelectEntry(String(SfxResId(STR_STYLE_FILTER_HIERARCHICAL)));
FilterSelectHdl(&aFilterLb);
}
@@ -2283,7 +2287,7 @@ SfxTemplateDialog_Impl::SfxTemplateDialog_Impl(
// ------------------------------------------------------------------------
-void SfxTemplateDialog_Impl::EnableFamilyItem( USHORT nId, BOOL bEnable )
+void SfxTemplateDialog_Impl::EnableFamilyItem( sal_uInt16 nId, sal_Bool bEnable )
{
m_aActionTbL.EnableItem( nId, bEnable );
}
@@ -2291,20 +2295,20 @@ void SfxTemplateDialog_Impl::EnableFamilyItem( USHORT nId, BOOL bEnable )
//-------------------------------------------------------------------------
// Insert element into dropdown filter "Frame Styles", "List Styles", etc.
-void SfxTemplateDialog_Impl::InsertFamilyItem(USHORT nId,const SfxStyleFamilyItem *pItem)
+void SfxTemplateDialog_Impl::InsertFamilyItem(sal_uInt16 nId,const SfxStyleFamilyItem *pItem)
{
- USHORT nHelpId = 0;
- switch( (USHORT) pItem->GetFamily() )
+ rtl::OString sHelpId;
+ switch( (sal_uInt16) pItem->GetFamily() )
{
- case SFX_STYLE_FAMILY_CHAR: nHelpId = SID_STYLE_FAMILY1; break;
- case SFX_STYLE_FAMILY_PARA: nHelpId = SID_STYLE_FAMILY2; break;
- case SFX_STYLE_FAMILY_FRAME:nHelpId = SID_STYLE_FAMILY3; break;
- case SFX_STYLE_FAMILY_PAGE: nHelpId = SID_STYLE_FAMILY4; break;
- case SFX_STYLE_FAMILY_PSEUDO: nHelpId = SID_STYLE_FAMILY5; break;
+ case SFX_STYLE_FAMILY_CHAR: sHelpId = ".uno:CharStyle"; break;
+ case SFX_STYLE_FAMILY_PARA: sHelpId = ".uno:ParaStyle"; break;
+ case SFX_STYLE_FAMILY_FRAME: sHelpId = ".uno:FrameStyle"; break;
+ case SFX_STYLE_FAMILY_PAGE: sHelpId = ".uno:PageStyle"; break;
+ case SFX_STYLE_FAMILY_PSEUDO: sHelpId = ".uno:ListStyle"; break;
default: OSL_FAIL("unknown StyleFamily"); break;
}
m_aActionTbL.InsertItem( nId, pItem->GetImage(), pItem->GetText(), 0, 0);
- m_aActionTbL.SetHelpId( nId, nHelpId );
+ m_aActionTbL.SetHelpId( nId, sHelpId );
}
// ------------------------------------------------------------------------
@@ -2331,7 +2335,7 @@ void SfxTemplateDialog_Impl::updateFamilyImages()
for( ; nLoop--; )
{
const SfxStyleFamilyItem *pItem = pStyleFamilies->at( nLoop );
- USHORT nId = SfxFamilyIdToNId( pItem->GetFamily() );
+ sal_uInt16 nId = SfxFamilyIdToNId( pItem->GetFamily() );
m_aActionTbL.SetItemImage( nId, pItem->GetImage() );
}
}
@@ -2353,15 +2357,15 @@ void SfxTemplateDialog_Impl::ClearFamilyList()
void SfxCommonTemplateDialog_Impl::InvalidateBindings()
{
- pBindings->Invalidate(SID_STYLE_NEW_BY_EXAMPLE, TRUE, FALSE);
+ pBindings->Invalidate(SID_STYLE_NEW_BY_EXAMPLE, sal_True, sal_False);
pBindings->Update( SID_STYLE_NEW_BY_EXAMPLE );
- pBindings->Invalidate(SID_STYLE_UPDATE_BY_EXAMPLE, TRUE, FALSE);
+ pBindings->Invalidate(SID_STYLE_UPDATE_BY_EXAMPLE, sal_True, sal_False);
pBindings->Update( SID_STYLE_UPDATE_BY_EXAMPLE );
- pBindings->Invalidate( SID_STYLE_WATERCAN, TRUE, FALSE);
+ pBindings->Invalidate( SID_STYLE_WATERCAN, sal_True, sal_False);
pBindings->Update( SID_STYLE_WATERCAN );
- pBindings->Invalidate( SID_STYLE_NEW, TRUE, FALSE );
+ pBindings->Invalidate( SID_STYLE_NEW, sal_True, sal_False );
pBindings->Update( SID_STYLE_NEW );
- pBindings->Invalidate( SID_STYLE_DRAGHIERARCHIE, TRUE, FALSE );
+ pBindings->Invalidate( SID_STYLE_DRAGHIERARCHIE, sal_True, sal_False );
pBindings->Update( SID_STYLE_DRAGHIERARCHIE );
}
@@ -2475,7 +2479,7 @@ void SfxTemplateDialog_Impl::Command( const CommandEvent& rCEvt )
//-------------------------------------------------------------------------
-void SfxTemplateDialog_Impl::EnableItem(USHORT nMesId, BOOL bCheck)
+void SfxTemplateDialog_Impl::EnableItem(sal_uInt16 nMesId, sal_Bool bCheck)
{
String aEmpty;
switch(nMesId)
@@ -2492,7 +2496,7 @@ void SfxTemplateDialog_Impl::EnableItem(USHORT nMesId, BOOL bCheck)
//-------------------------------------------------------------------------
-void SfxTemplateDialog_Impl::CheckItem(USHORT nMesId, BOOL bCheck)
+void SfxTemplateDialog_Impl::CheckItem(sal_uInt16 nMesId, sal_Bool bCheck)
{
switch(nMesId)
{
@@ -2507,7 +2511,7 @@ void SfxTemplateDialog_Impl::CheckItem(USHORT nMesId, BOOL bCheck)
//-------------------------------------------------------------------------
-BOOL SfxTemplateDialog_Impl::IsCheckedItem(USHORT nMesId)
+sal_Bool SfxTemplateDialog_Impl::IsCheckedItem(sal_uInt16 nMesId)
{
switch(nMesId)
{
@@ -2522,7 +2526,7 @@ BOOL SfxTemplateDialog_Impl::IsCheckedItem(USHORT nMesId)
IMPL_LINK_INLINE_START( SfxTemplateDialog_Impl, ToolBoxLSelect, ToolBox *, pBox )
{
- const USHORT nEntry = pBox->GetCurItemId();
+ const sal_uInt16 nEntry = pBox->GetCurItemId();
FamilySelect(nEntry);
return 0;
}
@@ -2550,7 +2554,7 @@ IMPL_LINK_INLINE_END( SfxTemplateDialog_Impl, ToolBoxLSelect, ToolBox *, pBox )
IMPL_LINK( SfxTemplateDialog_Impl, ToolBoxRSelect, ToolBox *, pBox )
{
- const USHORT nEntry = pBox->GetCurItemId();
+ const sal_uInt16 nEntry = pBox->GetCurItemId();
if(nEntry != SID_STYLE_NEW_BY_EXAMPLE ||
TIB_DROPDOWN != (pBox->GetItemBits(nEntry)&TIB_DROPDOWN))
ActionSelect(nEntry);
@@ -2559,7 +2563,7 @@ IMPL_LINK( SfxTemplateDialog_Impl, ToolBoxRSelect, ToolBox *, pBox )
//-------------------------------------------------------------------------
IMPL_LINK( SfxTemplateDialog_Impl, ToolBoxRClick, ToolBox *, pBox )
{
- const USHORT nEntry = pBox->GetCurItemId();
+ const sal_uInt16 nEntry = pBox->GetCurItemId();
if(nEntry == SID_STYLE_NEW_BY_EXAMPLE &&
TIB_DROPDOWN == (pBox->GetItemBits(nEntry)&TIB_DROPDOWN))
{
@@ -2598,7 +2602,7 @@ IMPL_LINK( SfxTemplateDialog_Impl, ToolBoxRClick, ToolBox *, pBox )
aCommand = xUICommands->getByName(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:LoadStyles")));
sLabel = lcl_GetLabel( aCommand );
pMenu->InsertItem( SID_TEMPLATE_LOAD, sLabel );
- pMenu->SetHelpId(SID_TEMPLATE_LOAD, SID_TEMPLATE_LOAD);
+ pMenu->SetHelpId(SID_TEMPLATE_LOAD, ".uno:LoadStyles");
pMenu->SetSelectHdl(LINK(this, SfxTemplateDialog_Impl, MenuSelectHdl));
pMenu->Execute( pBox,
@@ -2617,7 +2621,7 @@ IMPL_LINK( SfxTemplateDialog_Impl, ToolBoxRClick, ToolBox *, pBox )
//-------------------------------------------------------------------------
IMPL_LINK( SfxTemplateDialog_Impl, MenuSelectHdl, Menu*, pMenu)
{
- USHORT nMenuId = pMenu->GetCurItemId();
+ sal_uInt16 nMenuId = pMenu->GetCurItemId();
ActionSelect(nMenuId);
return 0;
}
@@ -2738,7 +2742,7 @@ IMPL_LINK( SfxTemplateCatalog_Impl, OrgHdl, Button *, pButton )
//-------------------------------------------------------------------------
-void SfxTemplateCatalog_Impl::EnableEdit( BOOL bEnable )
+void SfxTemplateCatalog_Impl::EnableEdit( sal_Bool bEnable )
{
SfxCommonTemplateDialog_Impl::EnableEdit( bEnable );
aChangeBtn.Enable( bEnable );
@@ -2746,13 +2750,13 @@ void SfxTemplateCatalog_Impl::EnableEdit( BOOL bEnable )
//-------------------------------------------------------------------------
-void SfxTemplateCatalog_Impl::EnableDel( BOOL bEnable )
+void SfxTemplateCatalog_Impl::EnableDel( sal_Bool bEnable )
{
SfxCommonTemplateDialog_Impl::EnableDel( bEnable );
aDelBtn.Enable( bEnable );
}
-void SfxTemplateCatalog_Impl::EnableNew(BOOL bEnable)
+void SfxTemplateCatalog_Impl::EnableNew(sal_Bool bEnable)
{
SfxCommonTemplateDialog_Impl::EnableNew( bEnable );
aNewBtn.Enable( bEnable );
@@ -2762,7 +2766,7 @@ void SfxTemplateCatalog_Impl::EnableNew(BOOL bEnable)
IMPL_LINK_INLINE_START( SfxTemplateCatalog_Impl, FamListSelect, ListBox *, pList )
{
- const USHORT nEntry = aFamIds[pList->GetSelectEntryPos()];
+ const sal_uInt16 nEntry = aFamIds[pList->GetSelectEntryPos()];
FamilySelect(nEntry);
return 0;
}
@@ -2770,7 +2774,7 @@ IMPL_LINK_INLINE_END( SfxTemplateCatalog_Impl, FamListSelect, ListBox *, pList )
//-------------------------------------------------------------------------
-void SfxTemplateCatalog_Impl::EnableItem( USHORT nMesId, BOOL bCheck )
+void SfxTemplateCatalog_Impl::EnableItem( sal_uInt16 nMesId, sal_Bool bCheck )
{
if ( nMesId == SID_STYLE_WATERCAN )
aOkBtn.Enable( bCheck );
@@ -2780,22 +2784,22 @@ void SfxTemplateCatalog_Impl::EnableItem( USHORT nMesId, BOOL bCheck )
//-------------------------------------------------------------------------
-void SfxTemplateCatalog_Impl::CheckItem(USHORT nMesId, BOOL /*bCheck*/)
+void SfxTemplateCatalog_Impl::CheckItem(sal_uInt16 nMesId, sal_Bool /*bCheck*/)
{
if ( nMesId > SFX_STYLE_FAMILY_PSEUDO || nMesId < SFX_STYLE_FAMILY_CHAR )
return;
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < aFamIds.Count() && aFamIds[i] != nMesId; i++ ) ;
aFamList.SelectEntryPos(i);
}
//-------------------------------------------------------------------------
-BOOL SfxTemplateCatalog_Impl::IsCheckedItem(USHORT nMesId)
+sal_Bool SfxTemplateCatalog_Impl::IsCheckedItem(sal_uInt16 nMesId)
{
if ( nMesId > SFX_STYLE_FAMILY_PSEUDO || nMesId < SFX_STYLE_FAMILY_CHAR )
- return FALSE;
- USHORT i;
+ return sal_False;
+ sal_uInt16 i;
for ( i = 0; i < aFamIds.Count() && aFamIds[i] != nMesId; i++ )
;
return aFamList.IsEntrySelected( String::CreateFromInt32(i) );
@@ -2804,10 +2808,10 @@ BOOL SfxTemplateCatalog_Impl::IsCheckedItem(USHORT nMesId)
//-------------------------------------------------------------------------
// The list has only to master the disabling, since during his life time no
// changes in selection can be made,
-void SfxTemplateCatalog_Impl::EnableFamilyItem( USHORT nId, BOOL bEnable )
+void SfxTemplateCatalog_Impl::EnableFamilyItem( sal_uInt16 nId, sal_Bool bEnable )
{
if ( !bEnable )
- for ( USHORT nPos = aFamIds.Count(); nPos--; )
+ for ( sal_uInt16 nPos = aFamIds.Count(); nPos--; )
if ( aFamIds[ nPos ] == nId )
{
aFamIds.Remove( nPos );
@@ -2815,7 +2819,7 @@ void SfxTemplateCatalog_Impl::EnableFamilyItem( USHORT nId, BOOL bEnable )
}
}
-void SfxTemplateCatalog_Impl::InsertFamilyItem( USHORT nId, const SfxStyleFamilyItem* pItem )
+void SfxTemplateCatalog_Impl::InsertFamilyItem( sal_uInt16 nId, const SfxStyleFamilyItem* pItem )
{
if ( nId > SFX_STYLE_FAMILY_PSEUDO || nId < SFX_STYLE_FAMILY_CHAR )
return;
@@ -2836,21 +2840,21 @@ void SfxTemplateCatalog_Impl::PrepareDeleteAction()
}
-void SfxCommonTemplateDialog_Impl::SetFamily( USHORT nId )
+void SfxCommonTemplateDialog_Impl::SetFamily( sal_uInt16 nId )
{
if ( nId != nActFamily )
{
if ( nActFamily != 0xFFFF )
- CheckItem( nActFamily, FALSE );
+ CheckItem( nActFamily, sal_False );
nActFamily = nId;
if ( nId != 0xFFFF )
- bUpdateFamily = TRUE;
+ bUpdateFamily = sal_True;
}
}
void SfxCommonTemplateDialog_Impl::UpdateFamily_Impl()
{
- bUpdateFamily = FALSE;
+ bUpdateFamily = sal_False;
SfxDispatcher* pDispat = pBindings->GetDispatcher_Impl();
SfxViewFrame *pViewFrame = pDispat->GetFrame();
@@ -2866,10 +2870,10 @@ void SfxCommonTemplateDialog_Impl::UpdateFamily_Impl()
StartListening(*pOldStyleSheetPool);
}
- bWaterDisabled = FALSE;
- bCanNew = TRUE;
- bTreeDrag = TRUE;
- bUpdateByExampleDisabled = FALSE;
+ bWaterDisabled = sal_False;
+ bCanNew = sal_True;
+ bTreeDrag = sal_True;
+ bUpdateByExampleDisabled = sal_False;
if ( pStyleSheetPool )
{
@@ -2888,7 +2892,7 @@ void SfxCommonTemplateDialog_Impl::UpdateFamily_Impl()
// only if that area is allowed
0 != pFamilyState[ nActFamily - 1 ] )
Execute_Impl( SID_STYLE_APPLY, GetSelectedEntry(),
- String(), (USHORT)GetFamilyItem_Impl()->GetFamily() );
+ String(), (sal_uInt16)GetFamilyItem_Impl()->GetFamily() );
}
void SfxCommonTemplateDialog_Impl::ReplaceUpdateButtonByMenu()
{
@@ -2928,7 +2932,7 @@ DropToolBox_Impl::~DropToolBox_Impl()
sal_Int8 DropToolBox_Impl::AcceptDrop( const AcceptDropEvent& rEvt )
{
sal_Int8 nReturn = DND_ACTION_NONE;
- USHORT nItemId = GetItemId( rEvt.maPosPixel );
+ sal_uInt16 nItemId = GetItemId( rEvt.maPosPixel );
if(USHRT_MAX != nItemId && !IsItemChecked( nItemId ))
{
SetCurItemId(nItemId);
diff --git a/sfx2/source/dialog/templdlg.hrc b/sfx2/source/dialog/templdlg.hrc
index 58563fb9c160..e39108ce57a9 100644..100755
--- a/sfx2/source/dialog/templdlg.hrc
+++ b/sfx2/source/dialog/templdlg.hrc
@@ -49,4 +49,7 @@
#define BT_VLIST 9
#define BT_TOOL 10
+//IAccessibility2 Implementation 2009-----
+#define STR_STYLE_ELEMTLIST 18
+//-----IAccessibility2 Implementation 2009
diff --git a/sfx2/source/dialog/templdlg.src b/sfx2/source/dialog/templdlg.src
index fcd6d33e55c6..51b6e9802147 100644..100755
--- a/sfx2/source/dialog/templdlg.src
+++ b/sfx2/source/dialog/templdlg.src
@@ -46,7 +46,7 @@ ImageList DLG_STYLE_DESIGNER
// RID_STYLECATALOG ------------------------------------------------------
ModalDialog RID_STYLECATALOG
{
- HelpId = SID_STYLE_CATALOG ;
+ HelpId = CMD_SID_STYLE_CATALOG ;
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 181 , 134 ) ;
@@ -67,6 +67,7 @@ ModalDialog RID_STYLECATALOG
};
PushButton BT_ORG
{
+ HelpID = "sfx2:PushButton:RID_STYLECATALOG:BT_ORG";
Pos = MAP_APPFONT ( 123 , 97 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Organizer..." ;
@@ -74,6 +75,7 @@ ModalDialog RID_STYLECATALOG
};
PushButton BT_DEL
{
+ HelpID = "sfx2:PushButton:RID_STYLECATALOG:BT_DEL";
Pos = MAP_APPFONT ( 123 , 78 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Delete..." ;
@@ -81,6 +83,7 @@ ModalDialog RID_STYLECATALOG
};
PushButton BT_EDIT
{
+ HelpID = "sfx2:PushButton:RID_STYLECATALOG:BT_EDIT";
Pos = MAP_APPFONT ( 123 , 60 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Modify..." ;
@@ -88,6 +91,7 @@ ModalDialog RID_STYLECATALOG
};
PushButton BT_NEW
{
+ HelpID = "sfx2:PushButton:RID_STYLECATALOG:BT_NEW";
Pos = MAP_APPFONT ( 123 , 43 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~New..." ;
@@ -101,6 +105,7 @@ ModalDialog RID_STYLECATALOG
};
ListBox BT_TOOL
{
+ HelpID = "sfx2:ListBox:RID_STYLECATALOG:BT_TOOL";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 6 ) ;
Size = MAP_APPFONT ( 110 , 55 ) ;
@@ -117,6 +122,7 @@ ModalDialog RID_STYLECATALOG
};
ListBox BT_FLIST
{
+ HelpID = "sfx2:ListBox:RID_STYLECATALOG:BT_FLIST";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 114 ) ;
Size = MAP_APPFONT ( 110 , 77 ) ;
@@ -127,6 +133,10 @@ ModalDialog RID_STYLECATALOG
};
// Strings ---------------------------------------------------------------
+String STR_STYLE_ELEMTLIST
+{
+ Text [ en-US ] = "Style List" ;
+};
String STR_STYLE_FILTER_HIERARCHICAL
{
Text [ en-US ] = "Hierarchical" ;
@@ -137,7 +147,7 @@ DockingWindow DLG_STYLE_DESIGNER
{
Text [ en-US ] = "Styles and Formatting" ;
- HelpId = SID_STYLE_DESIGNER ;
+ HelpId = CMD_SID_STYLE_DESIGNER ;
OutputSize = TRUE ;
Hide = TRUE ;
SVLook = TRUE ;
diff --git a/sfx2/source/dialog/titledockwin.cxx b/sfx2/source/dialog/titledockwin.cxx
index ed5940cace31..f017ad454063 100644..100755
--- a/sfx2/source/dialog/titledockwin.cxx
+++ b/sfx2/source/dialog/titledockwin.cxx
@@ -52,6 +52,7 @@ namespace sfx2
,m_aContentWindow( this, WB_DIALOGCONTROL )
,m_aBorder( 3, 1, 3, 3 )
,m_bLayoutPending( false )
+ ,m_nTitleBarHeight(0)
{
impl_construct();
}
@@ -140,23 +141,23 @@ namespace sfx2
Size aWindowSize( GetOutputSizePixel() );
// position the tool box
- int nTitleBarHeight( GetSettings().GetStyleSettings().GetTitleHeight() );
- if ( aToolBoxSize.Height() > nTitleBarHeight )
- nTitleBarHeight = aToolBoxSize.Height();
+ m_nTitleBarHeight = GetSettings().GetStyleSettings().GetTitleHeight();
+ if ( aToolBoxSize.Height() > m_nTitleBarHeight )
+ m_nTitleBarHeight = aToolBoxSize.Height();
m_aToolbox.SetPosSizePixel(
Point(
aWindowSize.Width() - aToolBoxSize.Width(),
- ( nTitleBarHeight - aToolBoxSize.Height() ) / 2
+ ( m_nTitleBarHeight - aToolBoxSize.Height() ) / 2
),
aToolBoxSize
);
// Place the content window.
- if ( nTitleBarHeight < aToolBoxSize.Height() )
- nTitleBarHeight = aToolBoxSize.Height();
- aWindowSize.Height() -= nTitleBarHeight;
+ if ( m_nTitleBarHeight < aToolBoxSize.Height() )
+ m_nTitleBarHeight = aToolBoxSize.Height();
+ aWindowSize.Height() -= m_nTitleBarHeight;
m_aContentWindow.SetPosSizePixel(
- Point( m_aBorder.Left(), nTitleBarHeight + m_aBorder.Top() ),
+ Point( m_aBorder.Left(), m_nTitleBarHeight + m_aBorder.Top() ),
Size(
aWindowSize.Width() - m_aBorder.Left() - m_aBorder.Right(),
aWindowSize.Height() - m_aBorder.Top() - m_aBorder.Bottom()
@@ -176,11 +177,6 @@ namespace sfx2
Push( PUSH_FONT | PUSH_FILLCOLOR | PUSH_LINECOLOR );
- int nTitleBarHeight( GetSettings().GetStyleSettings().GetTitleHeight() );
- const Size aToolBoxSize = m_aToolbox.CalcWindowSizePixel();
- if ( aToolBoxSize.Height() > nTitleBarHeight )
- nTitleBarHeight = aToolBoxSize.Height();
-
SetFillColor( GetSettings().GetStyleSettings().GetDialogColor() );
SetLineColor();
@@ -195,7 +191,7 @@ namespace sfx2
int nInnerLeft = nOuterLeft + m_aBorder.Left() - 1;
int nOuterRight = aWindowSize.Width() - 1;
int nInnerRight = nOuterRight - m_aBorder.Right() + 1;
- int nInnerTop = nTitleBarHeight + m_aBorder.Top() - 1;
+ int nInnerTop = m_nTitleBarHeight + m_aBorder.Top() - 1;
int nOuterBottom = aWindowSize.Height() - 1;
int nInnerBottom = nOuterBottom - m_aBorder.Bottom() + 1;
@@ -256,11 +252,11 @@ namespace sfx2
}
//------------------------------------------------------------------------------------------------------------------
- USHORT TitledDockingWindow::impl_addDropDownToolBoxItem( const String& i_rItemText, ULONG i_nHelpId, const Link& i_rCallback )
+ sal_uInt16 TitledDockingWindow::impl_addDropDownToolBoxItem( const String& i_rItemText, const rtl::OString& i_nHelpId, const Link& i_rCallback )
{
// Add the menu before the closer button.
- const USHORT nItemCount( m_aToolbox.GetItemCount() );
- const USHORT nItemId( nItemCount + 1 );
+ const sal_uInt16 nItemCount( m_aToolbox.GetItemCount() );
+ const sal_uInt16 nItemId( nItemCount + 1 );
m_aToolbox.InsertItem( nItemId, i_rItemText, TIB_DROPDOWNONLY, nItemCount > 0 ? nItemCount - 1 : TOOLBOX_APPEND );
m_aToolbox.SetHelpId( nItemId, i_nHelpId );
m_aToolbox.SetClickHdl( i_rCallback );
@@ -277,14 +273,14 @@ namespace sfx2
//------------------------------------------------------------------------------------------------------------------
IMPL_LINK( TitledDockingWindow, OnToolboxItemSelected, ToolBox*, pToolBox )
{
- const USHORT nId = pToolBox->GetCurItemId();
+ const sal_uInt16 nId = pToolBox->GetCurItemId();
if ( nId == 1 )
{
// the closer
EndTracking();
const sal_uInt16 nChildWindowId( GetChildWindow_Impl()->GetType() );
- const SfxBoolItem aVisibility( nChildWindowId, FALSE );
+ const SfxBoolItem aVisibility( nChildWindowId, sal_False );
GetBindings().GetDispatcher()->Execute(
nChildWindowId,
SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD,
@@ -309,7 +305,7 @@ namespace sfx2
}
//------------------------------------------------------------------------------------------------------------------
- void TitledDockingWindow::EndDocking( const Rectangle& i_rRect, BOOL i_bFloatMode )
+ void TitledDockingWindow::EndDocking( const Rectangle& i_rRect, sal_Bool i_bFloatMode )
{
SfxDockingWindow::EndDocking( i_rRect, i_bFloatMode );
diff --git a/sfx2/source/dialog/titledockwin.src b/sfx2/source/dialog/titledockwin.src
index ede6c4b8c4d1..ede6c4b8c4d1 100644..100755
--- a/sfx2/source/dialog/titledockwin.src
+++ b/sfx2/source/dialog/titledockwin.src
diff --git a/sfx2/source/dialog/tplcitem.cxx b/sfx2/source/dialog/tplcitem.cxx
index 01f94aecf0db..f4dcbd43470a 100644..100755
--- a/sfx2/source/dialog/tplcitem.cxx
+++ b/sfx2/source/dialog/tplcitem.cxx
@@ -36,7 +36,7 @@
#include <sfx2/templdlg.hxx>
#include <sfx2/bindings.hxx>
-#include "tplpitem.hxx"
+#include "sfx2/tplpitem.hxx"
#include "tplcitem.hxx"
#include "templdgi.hxx"
@@ -48,7 +48,7 @@
// Constructor
SfxTemplateControllerItem::SfxTemplateControllerItem(
- USHORT nSlotId, // ID
+ sal_uInt16 nSlotId, // ID
SfxCommonTemplateDialog_Impl &rDlg, // Controller-Instance,
// which is assigned to this item.
SfxBindings &rBindings):
@@ -69,7 +69,7 @@ SfxTemplateControllerItem::~SfxTemplateControllerItem()
// Notice about change of status, is propagated through the Controller
// passed on by the constructor
-void SfxTemplateControllerItem::StateChanged( USHORT nSID, SfxItemState eState,
+void SfxTemplateControllerItem::StateChanged( sal_uInt16 nSID, SfxItemState eState,
const SfxPoolItem* pItem )
{
switch(nSID)
@@ -89,9 +89,9 @@ void SfxTemplateControllerItem::StateChanged( USHORT nSID, SfxItemState eState,
DBG_ASSERT(pStateItem != 0, "SfxTemplateItem expected");
rTemplateDlg.SetFamilyState( GetId(), pStateItem );
}
- BOOL bDisable = eState == SFX_ITEM_DISABLED;
+ sal_Bool bDisable = eState == SFX_ITEM_DISABLED;
// Disable Familly
- USHORT nFamily = 0;
+ sal_uInt16 nFamily = 0;
switch( GetId())
{
case SID_STYLE_FAMILY1:
@@ -172,7 +172,7 @@ IMPL_STATIC_LINK(SfxTemplateControllerItem, SetWaterCanStateHdl_Impl,
{
case 0 :
case 1 :
- pState = new SfxBoolItem(SID_STYLE_WATERCAN, pThis->nWaterCanState ? TRUE : FALSE);
+ pState = new SfxBoolItem(SID_STYLE_WATERCAN, pThis->nWaterCanState ? sal_True : sal_False);
break;
}
pThis->rTemplateDlg.SetWaterCanState(pState);
diff --git a/sfx2/source/dialog/tplpitem.cxx b/sfx2/source/dialog/tplpitem.cxx
index 49e88c099dca..0329d1a0395d 100644..100755
--- a/sfx2/source/dialog/tplpitem.cxx
+++ b/sfx2/source/dialog/tplpitem.cxx
@@ -31,7 +31,7 @@
// INCLUDE ---------------------------------------------------------------
-#include "tplpitem.hxx"
+#include "sfx2/tplpitem.hxx"
#include <com/sun/star/frame/status/Template.hpp>
@@ -48,9 +48,9 @@ SfxTemplateItem::SfxTemplateItem() :
SfxTemplateItem::SfxTemplateItem
(
- USHORT nWhichId, // Slot-ID
+ sal_uInt16 nWhichId, // Slot-ID
const String& rStyle, // Name of the current Styles
- USHORT nValue // Flags for the filters of the automatic display
+ sal_uInt16 nValue // Flags for the filters of the automatic display
) : SfxFlagItem( nWhichId, nValue ),
aStyle( rStyle )
{
@@ -85,7 +85,7 @@ SfxPoolItem* SfxTemplateItem::Clone( SfxItemPool *) const
}
//-------------------------------------------------------------------------
-bool SfxTemplateItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) const
+bool SfxTemplateItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
{
::com::sun::star::frame::status::Template aTemplate;
@@ -97,13 +97,13 @@ bool SfxTemplateItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /*nMember
}
//-------------------------------------------------------------------------
-bool SfxTemplateItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ )
+bool SfxTemplateItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
{
::com::sun::star::frame::status::Template aTemplate;
if ( rVal >>= aTemplate )
{
- SetValue( sal::static_int_cast< USHORT >( aTemplate.Value ) );
+ SetValue( sal::static_int_cast< sal_uInt16 >( aTemplate.Value ) );
aStyle = aTemplate.StyleName;
return true;
}
@@ -113,9 +113,9 @@ bool SfxTemplateItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE /*nMe
//-------------------------------------------------------------------------
-BYTE SfxTemplateItem::GetFlagCount() const
+sal_uInt8 SfxTemplateItem::GetFlagCount() const
{
- return sizeof(USHORT) * 8;
+ return sizeof(sal_uInt16) * 8;
}
diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx
index e18639ab301b..78b0c24fb6f5 100644..100755
--- a/sfx2/source/dialog/versdlg.cxx
+++ b/sfx2/source/dialog/versdlg.cxx
@@ -45,7 +45,7 @@
#include "versdlg.hrc"
#include "versdlg.hxx"
#include <sfx2/viewfrm.hxx>
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include <sfx2/docfile.hxx>
#include <sfx2/objsh.hxx>
#include <sfx2/sfxsids.hrc>
@@ -153,7 +153,7 @@ static String ConvertDateTime_Impl(const DateTime& rTime, const LocaleDataWrappe
const String pDelim ( DEFINE_CONST_UNICODE( ", "));
String aStr(rWrapper.getDate(rTime));
aStr += pDelim;
- aStr += rWrapper.getTime(rTime, TRUE, FALSE);
+ aStr += rWrapper.getTime(rTime, sal_True, sal_False);
return aStr;
}
@@ -201,7 +201,7 @@ SfxVersionsTabListBox_Impl::SfxVersionsTabListBox_Impl( Window* pParent, const R
{
}
-SfxVersionDialog::SfxVersionDialog ( SfxViewFrame* pVwFrame, BOOL bIsSaveVersionOnClose )
+SfxVersionDialog::SfxVersionDialog ( SfxViewFrame* pVwFrame, sal_Bool bIsSaveVersionOnClose )
: SfxModalDialog( NULL, SfxResId( DLG_VERSIONS ) )
, aNewGroup( this, SfxResId( GB_NEWVERSIONS ) )
, aSaveButton( this, SfxResId( PB_SAVE ) )
@@ -236,7 +236,7 @@ SfxVersionDialog::SfxVersionDialog ( SfxViewFrame* pVwFrame, BOOL bIsSaveVersion
aVersionBox.SetDoubleClickHdl( LINK( this, SfxVersionDialog, DClickHdl_Impl ) );
aVersionBox.GrabFocus();
- aVersionBox.SetWindowBits( WB_HSCROLL | WB_CLIPCHILDREN );
+ aVersionBox.SetStyle( aVersionBox.GetStyle() | WB_HSCROLL | WB_CLIPCHILDREN );
aVersionBox.SetSelectionMode( SINGLE_SELECTION );
aVersionBox.SetTabs( &nTabs_Impl[0], MAP_APPFONT );
aVersionBox.Resize(); // OS: Hack for correct selection
@@ -297,7 +297,7 @@ void SfxVersionDialog::Init_Impl()
aSaveCheckBox.Check( mbIsSaveVersionOnClose );
- BOOL bEnable = !pObjShell->IsReadOnly();
+ sal_Bool bEnable = !pObjShell->IsReadOnly();
aSaveButton.Enable( bEnable );
aSaveCheckBox.Enable( bEnable );
@@ -320,19 +320,19 @@ void SfxVersionDialog::Open_Impl()
SfxObjectShell *pObjShell = pViewFrame->GetObjectShell();
SvLBoxEntry *pEntry = aVersionBox.FirstSelected();
- ULONG nPos = aVersionBox.GetModel()->GetRelPos( pEntry );
+ sal_uIntPtr nPos = aVersionBox.GetModel()->GetRelPos( pEntry );
SfxInt16Item aItem( SID_VERSION, (short)nPos+1 );
SfxStringItem aTarget( SID_TARGETNAME, DEFINE_CONST_UNICODE("_blank") );
SfxStringItem aReferer( SID_REFERER, DEFINE_CONST_UNICODE("private:user") );
SfxStringItem aFile( SID_FILE_NAME, pObjShell->GetMedium()->GetName() );
- ::rtl::OUString aPassString;
- if ( GetPasswd_Impl( pObjShell->GetMedium()->GetItemSet(), aPassString ) )
+ uno::Sequence< beans::NamedValue > aEncryptionData;
+ if ( GetEncryptionData_Impl( pObjShell->GetMedium()->GetItemSet(), aEncryptionData ) )
{
// there is a password, it should be used during the opening
- SfxStringItem aPassItem( SID_PASSWORD, aPassString );
+ SfxUnoAnyItem aEncryptionDataItem( SID_ENCRYPTIONDATA, uno::makeAny( aEncryptionData ) );
pViewFrame->GetDispatcher()->Execute(
- SID_OPENDOC, SFX_CALLMODE_ASYNCHRON, &aFile, &aItem, &aTarget, &aReferer, &aPassItem, 0L );
+ SID_OPENDOC, SFX_CALLMODE_ASYNCHRON, &aFile, &aItem, &aTarget, &aReferer, &aEncryptionDataItem, 0L );
}
else
pViewFrame->GetDispatcher()->Execute(
@@ -407,20 +407,20 @@ IMPL_LINK( SfxVersionDialog, ButtonHdl_Impl, Button*, pButton )
{
SfxVersionInfo aInfo;
aInfo.aAuthor = SvtUserOptions().GetFullName();
- SfxViewVersionDialog_Impl* pDlg = new SfxViewVersionDialog_Impl( this, aInfo, TRUE );
+ SfxViewVersionDialog_Impl* pDlg = new SfxViewVersionDialog_Impl( this, aInfo, sal_True );
short nRet = pDlg->Execute();
if ( nRet == RET_OK )
{
SfxStringItem aComment( SID_DOCINFO_COMMENTS, aInfo.aComment );
- pObjShell->SetModified( TRUE );
+ pObjShell->SetModified( sal_True );
const SfxPoolItem* aItems[2];
aItems[0] = &aComment;
aItems[1] = NULL;
pViewFrame->GetBindings().ExecuteSynchron( SID_SAVEDOC, aItems, 0 );
- aVersionBox.SetUpdateMode( FALSE );
+ aVersionBox.SetUpdateMode( sal_False );
aVersionBox.Clear();
Init_Impl();
- aVersionBox.SetUpdateMode( TRUE );
+ aVersionBox.SetUpdateMode( sal_True );
}
delete pDlg;
@@ -428,11 +428,11 @@ IMPL_LINK( SfxVersionDialog, ButtonHdl_Impl, Button*, pButton )
if ( pButton == &aDeleteButton && pEntry )
{
pObjShell->GetMedium()->RemoveVersion_Impl( ((SfxVersionInfo*) pEntry->GetUserData())->aName );
- pObjShell->SetModified( TRUE );
- aVersionBox.SetUpdateMode( FALSE );
+ pObjShell->SetModified( sal_True );
+ aVersionBox.SetUpdateMode( sal_False );
aVersionBox.Clear();
Init_Impl();
- aVersionBox.SetUpdateMode( TRUE );
+ aVersionBox.SetUpdateMode( sal_True );
}
else if ( pButton == &aOpenButton && pEntry )
{
@@ -441,20 +441,20 @@ IMPL_LINK( SfxVersionDialog, ButtonHdl_Impl, Button*, pButton )
else if ( pButton == &aViewButton && pEntry )
{
SfxVersionInfo* pInfo = (SfxVersionInfo*) pEntry->GetUserData();
- SfxViewVersionDialog_Impl* pDlg = new SfxViewVersionDialog_Impl( this, *pInfo, FALSE );
+ SfxViewVersionDialog_Impl* pDlg = new SfxViewVersionDialog_Impl( this, *pInfo, sal_False );
pDlg->Execute();
delete pDlg;
}
else if ( pEntry && pButton == &aCompareButton )
{
SfxAllItemSet aSet( pObjShell->GetPool() );
- ULONG nPos = aVersionBox.GetModel()->GetRelPos( pEntry );
+ sal_uIntPtr nPos = aVersionBox.GetModel()->GetRelPos( pEntry );
aSet.Put( SfxInt16Item( SID_VERSION, (short)nPos+1 ) );
aSet.Put( SfxStringItem( SID_FILE_NAME, pObjShell->GetMedium()->GetName() ) );
SfxItemSet* pSet = pObjShell->GetMedium()->GetItemSet();
- SFX_ITEMSET_ARG( pSet, pFilterItem, SfxStringItem, SID_FILTER_NAME, FALSE );
- SFX_ITEMSET_ARG( pSet, pFilterOptItem, SfxStringItem, SID_FILE_FILTEROPTIONS, FALSE );
+ SFX_ITEMSET_ARG( pSet, pFilterItem, SfxStringItem, SID_FILTER_NAME, sal_False );
+ SFX_ITEMSET_ARG( pSet, pFilterOptItem, SfxStringItem, SID_FILE_FILTEROPTIONS, sal_False );
if ( pFilterItem )
aSet.Put( *pFilterItem );
if ( pFilterOptItem )
@@ -467,7 +467,7 @@ IMPL_LINK( SfxVersionDialog, ButtonHdl_Impl, Button*, pButton )
return 0L;
}
-SfxViewVersionDialog_Impl::SfxViewVersionDialog_Impl ( Window *pParent, SfxVersionInfo& rInfo, BOOL bEdit )
+SfxViewVersionDialog_Impl::SfxViewVersionDialog_Impl ( Window *pParent, SfxVersionInfo& rInfo, sal_Bool bEdit )
: SfxModalDialog( pParent, SfxResId( DLG_COMMENTS ) )
, aDateTimeText( this, SfxResId( FT_DATETIME ) )
, aSavedByText( this, SfxResId( FT_SAVEDBY ) )
@@ -493,7 +493,7 @@ SfxViewVersionDialog_Impl::SfxViewVersionDialog_Impl ( Window *pParent, SfxVersi
{
aOKButton.Hide();
aCancelButton.Hide();
- aEdit.SetReadOnly( TRUE );
+ aEdit.SetReadOnly( sal_True );
}
else
aCloseButton.Hide();
diff --git a/sfx2/source/dialog/versdlg.hrc b/sfx2/source/dialog/versdlg.hrc
index 2de7596221e1..2de7596221e1 100644..100755
--- a/sfx2/source/dialog/versdlg.hrc
+++ b/sfx2/source/dialog/versdlg.hrc
diff --git a/sfx2/source/dialog/versdlg.src b/sfx2/source/dialog/versdlg.src
index 60aeb2777542..927c940e6506 100644..100755
--- a/sfx2/source/dialog/versdlg.src
+++ b/sfx2/source/dialog/versdlg.src
@@ -28,6 +28,7 @@
#include "versdlg.hrc"
ModalDialog DLG_VERSIONS
{
+ HelpID = "sfx2:ModalDialog:DLG_VERSIONS";
OutputSize = TRUE ;
Size = MAP_APPFONT ( 340 , 184 ) ;
SvLook = TRUE ;
@@ -41,6 +42,7 @@ ModalDialog DLG_VERSIONS
};
PushButton PB_SAVE
{
+ HelpID = "sfx2:PushButton:DLG_VERSIONS:PB_SAVE";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 90 , 14 ) ;
TabStop = TRUE ;
@@ -48,6 +50,7 @@ ModalDialog DLG_VERSIONS
};
CheckBox CB_SAVEONCLOSE
{
+ HelpID = "sfx2:CheckBox:DLG_VERSIONS:CB_SAVEONCLOSE";
Pos = MAP_APPFONT ( 108 , 16 ) ;
Size = MAP_APPFONT ( 164 , 10 ) ;
TabStop = TRUE ;
@@ -93,6 +96,7 @@ ModalDialog DLG_VERSIONS
};
PushButton PB_OPEN
{
+ HelpID = "sfx2:PushButton:DLG_VERSIONS:PB_OPEN";
Pos = MAP_APPFONT ( 284 , 26 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -100,6 +104,7 @@ ModalDialog DLG_VERSIONS
};
PushButton PB_VIEW
{
+ HelpID = "sfx2:PushButton:DLG_VERSIONS:PB_VIEW";
Pos = MAP_APPFONT ( 284 , 43 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -108,6 +113,7 @@ ModalDialog DLG_VERSIONS
};
PushButton PB_DELETE
{
+ HelpID = "sfx2:PushButton:DLG_VERSIONS:PB_DELETE";
Pos = MAP_APPFONT ( 284 , 60 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -115,6 +121,7 @@ ModalDialog DLG_VERSIONS
};
PushButton PB_COMPARE
{
+ HelpID = "sfx2:PushButton:DLG_VERSIONS:PB_COMPARE";
Pos = MAP_APPFONT ( 284 , 77 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -130,6 +137,7 @@ ModalDialog DLG_VERSIONS
};
ModalDialog DLG_COMMENTS
{
+ HelpID = "sfx2:ModalDialog:DLG_COMMENTS";
OutputSize = TRUE ;
Size = MAP_APPFONT ( 180 , 118 ) ;
SvLook = TRUE ;
@@ -148,6 +156,7 @@ ModalDialog DLG_COMMENTS
};
MultiLineEdit ME_VERSIONS
{
+ HelpID = "sfx2:MultiLineEdit:DLG_COMMENTS:ME_VERSIONS";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 32 ) ;
Size = MAP_APPFONT ( 168 , 60 ) ;
@@ -168,6 +177,7 @@ ModalDialog DLG_COMMENTS
};
PushButton PB_CLOSE
{
+ HelpID = "sfx2:PushButton:DLG_COMMENTS:PB_CLOSE";
Pos = MAP_APPFONT ( 68 , 98 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
diff --git a/sfx2/source/doc/DocumentMetadataAccess.cxx b/sfx2/source/doc/DocumentMetadataAccess.cxx
index 3e54717ca6d2..3e54717ca6d2 100644..100755
--- a/sfx2/source/doc/DocumentMetadataAccess.cxx
+++ b/sfx2/source/doc/DocumentMetadataAccess.cxx
diff --git a/sfx2/source/doc/Metadatable.cxx b/sfx2/source/doc/Metadatable.cxx
index e00f5e67fec5..e00f5e67fec5 100644..100755
--- a/sfx2/source/doc/Metadatable.cxx
+++ b/sfx2/source/doc/Metadatable.cxx
diff --git a/sfx2/source/doc/QuerySaveDocument.cxx b/sfx2/source/doc/QuerySaveDocument.cxx
index 06c2567cbe71..ae27713ce1ba 100644..100755
--- a/sfx2/source/doc/QuerySaveDocument.cxx
+++ b/sfx2/source/doc/QuerySaveDocument.cxx
@@ -28,10 +28,10 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sfx2.hxx"
-#include "QuerySaveDocument.hxx"
+#include "sfx2/QuerySaveDocument.hxx"
#include <sfx2/sfx.hrc>
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include <sfx2/sfxuno.hxx>
#include "doc.hrc"
#include <vcl/msgbox.hxx>
diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx b/sfx2/source/doc/SfxDocumentMetaData.cxx
index e4862ae470e7..e4862ae470e7 100644..100755
--- a/sfx2/source/doc/SfxDocumentMetaData.cxx
+++ b/sfx2/source/doc/SfxDocumentMetaData.cxx
diff --git a/sfx2/source/doc/applet.cxx b/sfx2/source/doc/applet.cxx
deleted file mode 100644
index 58ca6c4c3a33..000000000000
--- a/sfx2/source/doc/applet.cxx
+++ /dev/null
@@ -1,377 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sfx2.hxx"
-
-#include "applet.hxx"
-#include <sfx2/sfxdlg.hxx>
-#include <sfx2/sfxsids.hrc>
-
-#include "com/sun/star/uno/XComponentContext.hpp"
-#include "cppuhelper/factory.hxx"
-#include <tools/urlobj.hxx>
-#include <tools/debug.hxx>
-#include <sj2/sjapplet.hxx>
-#include <vcl/syschild.hxx>
-#include <rtl/ustring.hxx>
-#include <toolkit/helper/vclunohelper.hxx>
-#include <unotools/javaoptions.hxx>
-#include <svtools/miscopt.hxx>
-#include <comphelper/TypeGeneration.hxx>
-
-using namespace ::com::sun::star;
-using namespace ::comphelper;
-
-namespace sfx2
-{
-class AppletWindow_Impl : public SystemChildWindow
-{
-public:
- SjApplet2* pApplet;
- AppletWindow_Impl( Window* pParent, SjApplet2* pApp )
- : SystemChildWindow( pParent, WB_CLIPCHILDREN )
- , pApplet(pApp)
- {}
-
- virtual void Resize();
-};
-
-void AppletWindow_Impl::Resize()
-{
- Size aSize( GetOutputSizePixel() );
- if ( pApplet )
- pApplet->setSizePixel( aSize );
-}
-
-class AppletWrapper_Impl : public SjApplet2
-{
- virtual void appletResize( const Size & );
- virtual void showDocument( const INetURLObject &, const XubString & );
- virtual void showStatus( const XubString & );
-};
-
-void AppletWrapper_Impl::appletResize( const Size & ) {}
-void AppletWrapper_Impl::showDocument( const INetURLObject &, const XubString & ) {}
-void AppletWrapper_Impl::showStatus( const XubString & ) {}
-
-#define PROPERTY_UNBOUND 0
-#define PROPERTY_MAYBEVOID ::com::sun::star::beans::PropertyAttribute::MAYBEVOID
-
-#define WID_APPLET_CODE 1
-#define WID_APPLET_CODEBASE 2
-#define WID_APPLET_COMMANDS 3
-#define WID_APPLET_DOCBASE 4
-#define WID_APPLET_ISSCRIPT 5
-#define WID_APPLET_NAME 6
-const SfxItemPropertyMapEntry* lcl_GetAppletPropertyMap_Impl()
-{
- static SfxItemPropertyMapEntry aAppletPropertyMap_Impl[] =
- {
- { MAP_CHAR_LEN("AppletCode") , WID_APPLET_CODE , CPPU_E2T(CPPUTYPE_OUSTRING), PROPERTY_UNBOUND, 0 },
- { MAP_CHAR_LEN("AppletCodeBase"), WID_APPLET_CODEBASE , CPPU_E2T(CPPUTYPE_OUSTRING), PROPERTY_UNBOUND, 0 },
- { MAP_CHAR_LEN("AppletCommands"), WID_APPLET_COMMANDS , CPPU_E2T(CPPUTYPE_PROPERTYVALUE), PROPERTY_UNBOUND, 0 },
- { MAP_CHAR_LEN("AppletDocBase"), WID_APPLET_DOCBASE , CPPU_E2T(CPPUTYPE_OUSTRING), PROPERTY_UNBOUND, 0 },
- { MAP_CHAR_LEN("AppletIsScript"), WID_APPLET_ISSCRIPT , CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_UNBOUND, 0 },
- { MAP_CHAR_LEN("AppletName") , WID_APPLET_NAME , CPPU_E2T(CPPUTYPE_OUSTRING), PROPERTY_UNBOUND, 0 },
- {0,0,0,0,0,0}
- };
-return aAppletPropertyMap_Impl;
-}
-
-::rtl::OUString AppletObject::getImplementationName()
- throw( ::com::sun::star::uno::RuntimeException )
-{
- return impl_getStaticImplementationName();
-}
-
-::sal_Bool AppletObject::supportsService( const ::rtl::OUString& sServiceName )
- throw( ::com::sun::star::uno::RuntimeException )
-{
- ::com::sun::star::uno::Sequence< ::rtl::OUString > seqServiceNames =
- getSupportedServiceNames();
- const ::rtl::OUString* pArray = seqServiceNames.getConstArray();
- for ( ::sal_Int32 nCounter=0; nCounter<seqServiceNames.getLength();
- nCounter++ )
- {
- if ( pArray[nCounter] == sServiceName )
- {
- return sal_True ;
- }
- }
- return sal_False ;
-}
-
-::com::sun::star::uno::Sequence< ::rtl::OUString >
-AppletObject::getSupportedServiceNames()
- throw( ::com::sun::star::uno::RuntimeException )
-{
- return impl_getStaticSupportedServiceNames();
-}
-
-::com::sun::star::uno::Sequence< ::rtl::OUString >
-AppletObject::impl_getStaticSupportedServiceNames()
-{
- ::com::sun::star::uno::Sequence< ::rtl::OUString > seqServiceNames( 1 );
- seqServiceNames.getArray() [0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.embed.SpecialEmbeddedObject" ));
- return seqServiceNames ;
-}
-
-::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
-AppletObject::impl_createInstance(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::uno::XComponentContext >& xContext )
- throw( ::com::sun::star::uno::Exception )
-{
- return static_cast< ::cppu::OWeakObject * >( new AppletObject( xContext ) );
-}
-
-::rtl::OUString AppletObject::impl_getStaticImplementationName()
-{
- return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.comp.sfx2.AppletObject" ));
-}
-
-::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
-AppletObject::impl_createFactory()
-{
- return uno::Reference< uno::XInterface >(
- cppu::createSingleComponentFactory(
- impl_createInstance, impl_getStaticImplementationName(),
- impl_getStaticSupportedServiceNames() ),
- uno::UNO_QUERY_THROW );
-}
-
-AppletObject::AppletObject(
- const uno::Reference < uno::XComponentContext >& rContext )
- : mxContext( rContext )
- , maPropMap( lcl_GetAppletPropertyMap_Impl() )
- , mpApplet( NULL )
- , mbMayScript( FALSE )
-{
-}
-
-AppletObject::~AppletObject()
-{
-}
-
-void SAL_CALL AppletObject::initialize( const uno::Sequence< uno::Any >& aArguments ) throw ( uno::Exception, uno::RuntimeException )
-{
- if ( aArguments.getLength() )
- aArguments[0] >>= mxObj;
-}
-
-sal_Bool SAL_CALL AppletObject::load(
- const uno::Sequence < com::sun::star::beans::PropertyValue >& /*lDescriptor*/,
- const uno::Reference < frame::XFrame >& xFrame )
-throw( uno::RuntimeException )
-{
- if ( SvtJavaOptions().IsExecuteApplets() && SvtMiscOptions().IsPluginsEnabled() )
- {
- mpApplet = new AppletWrapper_Impl;
-
- Window* pParent = VCLUnoHelper::GetWindow( xFrame->getContainerWindow() );
- Window* pWin = new AppletWindow_Impl( pParent, mpApplet );
- pWin->SetBackground();
- pWin->Show();
-
- if( maName.getLength() )
- maCmdList.Append( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "name" ) ), maName );
-
- if( maCodeBase.getLength() )
- {
- for ( sal_uInt32 nParams=0; nParams<maCmdList.Count(); nParams++ )
- {
- if ( maCmdList[nParams].GetCommand().EqualsAscii("codebase") )
- {
- maCmdList.Remove(nParams);
- break;
- }
- }
-
- maCmdList.Append( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "codebase" ) ), maCodeBase );
- }
-
- if( maClass.getLength() )
- maCmdList.Append( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "code" ) ), maClass );
-
- if( mbMayScript )
- maCmdList.Append( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "mayscript" ) ), String() );
-
- INetURLObject aDocBase( maDocBase );
- mpApplet->Init( mxContext, pWin, aDocBase, maCmdList );
- uno::Reference < awt::XWindow > xWindow( pWin->GetComponentInterface(), uno::UNO_QUERY );
-
- // we must destroy the applet before the parent is destroyed
- xWindow->addEventListener( this );
-
- xFrame->setComponent( xWindow, uno::Reference < frame::XController >() );
- return TRUE;
- }
-
- return FALSE;
-}
-
-void SAL_CALL AppletObject::cancel() throw( com::sun::star::uno::RuntimeException )
-{
- if ( mpApplet )
- {
- mpApplet->appletClose(); // reparenting window
- DELETEZ( mpApplet );
- }
-}
-
-void SAL_CALL AppletObject::close( sal_Bool /*bDeliverOwnership*/ ) throw( com::sun::star::util::CloseVetoException, com::sun::star::uno::RuntimeException )
-{
-}
-
-void SAL_CALL AppletObject::addCloseListener( const com::sun::star::uno::Reference < com::sun::star::util::XCloseListener >& ) throw( com::sun::star::uno::RuntimeException )
-{
-}
-
-void SAL_CALL AppletObject::removeCloseListener( const com::sun::star::uno::Reference < com::sun::star::util::XCloseListener >& ) throw( com::sun::star::uno::RuntimeException )
-{
-}
-
-void SAL_CALL AppletObject::disposing( const com::sun::star::lang::EventObject& ) throw (com::sun::star::uno::RuntimeException)
-{
- cancel();
-}
-
-uno::Reference< beans::XPropertySetInfo > SAL_CALL AppletObject::getPropertySetInfo() throw( ::com::sun::star::uno::RuntimeException )
-{
- static uno::Reference< beans::XPropertySetInfo > xInfo = new SfxItemPropertySetInfo( &maPropMap );
- return xInfo;
-}
-
-void SAL_CALL AppletObject::setPropertyValue(const ::rtl::OUString& aPropertyName, const uno::Any& aAny)
- throw ( beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
-{
-
- const SfxItemPropertySimpleEntry* pEntry = maPropMap.getByName( aPropertyName );
- if( !pEntry )
- throw beans::UnknownPropertyException();
- switch( pEntry->nWID )
- {
- case WID_APPLET_CODE :
- aAny >>= maClass;
- break;
- case WID_APPLET_CODEBASE :
- aAny >>= maCodeBase;
- break;
- case WID_APPLET_COMMANDS :
- {
- maCmdList.Clear();
- uno::Sequence < beans::PropertyValue > aCommandSequence;
- if( aAny >>= aCommandSequence )
- maCmdList.FillFromSequence( aCommandSequence );
- }
- break;
- case WID_APPLET_DOCBASE :
- aAny >>= maDocBase;
- break;
- case WID_APPLET_ISSCRIPT :
- aAny >>= mbMayScript;
- break;
- case WID_APPLET_NAME :
- aAny >>= maName;
- break;
- default:;
-
- }
-}
-
-uno::Any SAL_CALL AppletObject::getPropertyValue(const ::rtl::OUString& aPropertyName) throw ( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
-{
- uno::Any aAny;
- const SfxItemPropertySimpleEntry* pEntry = maPropMap.getByName( aPropertyName );
- if( !pEntry )
- throw beans::UnknownPropertyException();
- switch( pEntry->nWID )
- {
- case WID_APPLET_CODE :
- aAny <<= maClass;
- break;
- case WID_APPLET_CODEBASE :
- aAny <<= maCodeBase;
- break;
- case WID_APPLET_COMMANDS :
- {
- uno::Sequence< beans::PropertyValue > aCommandSequence;
- maCmdList.FillSequence( aCommandSequence );
- aAny <<= aCommandSequence;
- }
- break;
- case WID_APPLET_DOCBASE :
- break;
- case WID_APPLET_ISSCRIPT :
- aAny <<= mbMayScript;
- break;
- case WID_APPLET_NAME :
- aAny <<= maName;
- break;
- default:;
-
- }
- return aAny;
-}
-
-void SAL_CALL AppletObject::addPropertyChangeListener(const ::rtl::OUString&, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener > & ) throw( ::com::sun::star::uno::RuntimeException )
-{
-}
-
-void SAL_CALL AppletObject::removePropertyChangeListener(const ::rtl::OUString&, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener > & ) throw( ::com::sun::star::uno::RuntimeException )
-{
-}
-
-void SAL_CALL AppletObject::addVetoableChangeListener(const ::rtl::OUString&, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener > & ) throw( ::com::sun::star::uno::RuntimeException )
-{
-}
-
-void SAL_CALL AppletObject::removeVetoableChangeListener(const ::rtl::OUString&, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener > & ) throw( ::com::sun::star::uno::RuntimeException )
-{
-}
-
-::sal_Int16 SAL_CALL AppletObject::execute() throw (::com::sun::star::uno::RuntimeException)
-{
- SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
- uno::Reference < beans::XPropertySet > xSet( this );
- VclAbstractDialog* pDlg = pFact->CreateEditObjectDialog( NULL, SID_INSERT_APPLET, mxObj );
- if ( pDlg )
- pDlg->Execute();
- return 0;
-}
-
-void SAL_CALL AppletObject::setTitle( const ::rtl::OUString& ) throw (::com::sun::star::uno::RuntimeException)
-{
-}
-
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/doc/doc.hrc b/sfx2/source/doc/doc.hrc
index 76f27b5b4e3e..aca8a3a304fd 100644..100755
--- a/sfx2/source/doc/doc.hrc
+++ b/sfx2/source/doc/doc.hrc
@@ -44,7 +44,6 @@
#define STR_NOSTARTPRINTER (RID_SFX_DOC_START+ 8)
#define MSG_CONFIRM_FILTER (RID_SFX_DOC_START+11)
#define MSG_CONFIRM_OVERWRITE_TEMPLATE (RID_SFX_DOC_START+12)
-#define MSG_QUERY_LOAD_TEMPLATE (RID_SFX_DOC_START+13)
#define STR_DELETE_REGION (RID_SFX_DOC_START+14)
#define STR_DELETE_TEMPLATE (RID_SFX_DOC_START+15)
@@ -137,7 +136,6 @@
#define RID_CNT_STR_WAITING (RID_SFX_DOC_START+ 83)
#define STR_OBJECT (RID_SFX_DOC_START+ 84)
-#define STR_EDITOBJECT (RID_SFX_DOC_START+ 85)
#define DLOAD_URL 1
#define DLOAD_STATUS 2
diff --git a/sfx2/source/doc/doc.src b/sfx2/source/doc/doc.src
index e364d11cb1a6..bb72e07691b6 100644..100755
--- a/sfx2/source/doc/doc.src
+++ b/sfx2/source/doc/doc.src
@@ -43,14 +43,6 @@ QueryBox MSG_CONFIRM_OVERWRITE_TEMPLATE
DefButton = WB_DEF_NO ;
Message [ en-US ] = "Name already in use.\nDo you want to overwrite document template?" ;
};
-QueryBox MSG_QUERY_LOAD_TEMPLATE
-{
- BUTTONS = WB_YES_NO ;
- DEFBUTTON = WB_DEF_NO ;
- HelpId = MSG_QUERY_LOAD_TEMPLATE;
-
- Message [ en-US ] = "The Styles in this document do not match your current Styles. Should your current Styles be applied to this document?";
-};
String STR_DELETE_REGION
{
Text [ en-US ] = "Are you sure you want to delete the region \"$1\"?" ;
@@ -367,11 +359,6 @@ String STR_OBJECT
Text [ en-US ] = "Object" ;
};
-String STR_EDITOBJECT
-{
- Text [ en-US ] = "~Edit";
-};
-
QueryBox DLG_MACROQUERY
{
Buttons = WB_OK_CANCEL;
diff --git a/sfx2/source/doc/docfac.cxx b/sfx2/source/doc/docfac.cxx
index e02e560f47e9..45c03df2a644 100644..100755
--- a/sfx2/source/doc/docfac.cxx
+++ b/sfx2/source/doc/docfac.cxx
@@ -48,13 +48,13 @@
#include <sfx2/sfx.hrc>
#include <sfx2/docfilt.hxx>
#include <sfx2/docfac.hxx>
-#include "viewfac.hxx"
+#include "sfx2/viewfac.hxx"
#include "fltfnc.hxx"
#include "arrdecl.hxx"
#include <sfx2/app.hxx>
#include <sfx2/module.hxx>
#include <sfx2/mnumgr.hxx>
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include <sfx2/sfxuno.hxx>
#include "syspath.hxx"
#include <osl/file.hxx>
@@ -349,7 +349,7 @@ String SfxObjectFactory::GetStandardTemplate( const String& rServiceName )
const SfxFilter* SfxObjectFactory::GetTemplateFilter() const
{
- USHORT nVersion=0;
+ sal_uInt16 nVersion=0;
SfxFilterMatcher aMatcher ( String::CreateFromAscii( pShortName ) );
SfxFilterMatcherIter aIter( &aMatcher );
const SfxFilter *pFilter = 0;
@@ -359,7 +359,7 @@ const SfxFilter* SfxObjectFactory::GetTemplateFilter() const
if( pTemp->IsOwnFormat() && pTemp->IsOwnTemplateFormat() && ( pTemp->GetVersion() > nVersion ) )
{
pFilter = pTemp;
- nVersion = (USHORT) pTemp->GetVersion();
+ nVersion = (sal_uInt16) pTemp->GetVersion();
}
pTemp = aIter.Next();
@@ -444,7 +444,7 @@ sal_uInt16 SfxObjectFactory::GetViewNo_Impl( const sal_uInt16 i_nViewId, const s
SfxViewFactory* SfxObjectFactory::GetViewFactoryByViewName( const String& i_rViewName ) const
{
- for ( USHORT nViewNo = 0;
+ for ( sal_uInt16 nViewNo = 0;
nViewNo < GetViewFactoryCount();
++nViewNo
)
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 8e301ca68e3e..31630d8d825a 100644..100755
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -80,6 +80,7 @@
#include <unotools/tempfile.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/componentcontext.hxx>
+#include <comphelper/interaction.hxx>
#include <framework/interaction.hxx>
#include <unotools/streamhelper.hxx>
#include <unotools/localedatawrapper.hxx>
@@ -141,7 +142,7 @@ using namespace ::com::sun::star::io;
#include <sfx2/docfac.hxx> // GetFilterContainer
#include "doc.hrc"
#include "openflag.hxx" // SFX_STREAM_READONLY etc.
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include <sfx2/appuno.hxx>
#include "sfxacldetect.hxx"
@@ -718,7 +719,7 @@ const String& SfxMedium::GetPhysicalName() const
//------------------------------------------------------------------
void SfxMedium::CreateFileStream()
{
- ForceSynchronStream_Impl( TRUE );
+ ForceSynchronStream_Impl( sal_True );
GetInStream();
if( pInStream )
{
@@ -758,7 +759,7 @@ sal_Bool SfxMedium::Commit()
sal_Bool SfxMedium::IsStorage()
{
if ( pImp->xStorage.is() )
- return TRUE;
+ return sal_True;
if ( bTriedStorage )
return pImp->bIsStorage;
@@ -772,13 +773,13 @@ sal_Bool SfxMedium::IsStorage()
}
pImp->bIsStorage = SotStorage::IsStorageFile( aURL ) && !SotStorage::IsOLEStorage( aURL);
if ( !pImp->bIsStorage )
- bTriedStorage = TRUE;
+ bTriedStorage = sal_True;
}
else if ( GetInStream() )
{
pImp->bIsStorage = SotStorage::IsStorageFile( pInStream ) && !SotStorage::IsOLEStorage( pInStream );
if ( !pInStream->GetError() && !pImp->bIsStorage )
- bTriedStorage = TRUE;
+ bTriedStorage = sal_True;
}
return pImp->bIsStorage;
@@ -873,17 +874,21 @@ uno::Reference < embed::XStorage > SfxMedium::GetOutputStorage()
}
//------------------------------------------------------------------
-void SfxMedium::SetPasswordToStorage_Impl()
+void SfxMedium::SetEncryptionDataToStorage_Impl()
{
// in case media-descriptor contains password it should be used on opening
if ( pImp->xStorage.is() && pSet )
{
- ::rtl::OUString aPasswd;
- if ( GetPasswd_Impl( pSet, aPasswd ) )
+ uno::Sequence< beans::NamedValue > aEncryptionData;
+ if ( GetEncryptionData_Impl( pSet, aEncryptionData ) )
{
+ // replace the password with encryption data
+ pSet->ClearItem( SID_PASSWORD );
+ pSet->Put( SfxUnoAnyItem( SID_ENCRYPTIONDATA, uno::makeAny( aEncryptionData ) ) );
+
try
{
- ::comphelper::OStorageHelper::SetCommonStoragePassword( pImp->xStorage, aPasswd );
+ ::comphelper::OStorageHelper::SetCommonStorageEncryptionData( pImp->xStorage, aEncryptionData );
}
catch( uno::Exception& )
{
@@ -1231,7 +1236,7 @@ sal_Bool SfxMedium::LockOrigFileOnDemand( sal_Bool bLoading, sal_Bool bNoUI )
// the error should be set in case it is storing process
// or the document has been opened for editing explicitly
- SFX_ITEMSET_ARG( pSet, pReadOnlyItem, SfxBoolItem, SID_DOC_READONLY, FALSE );
+ SFX_ITEMSET_ARG( pSet, pReadOnlyItem, SfxBoolItem, SID_DOC_READONLY, sal_False );
if ( !bLoading || (pReadOnlyItem && !pReadOnlyItem->GetValue()) )
SetError( ERRCODE_IO_ACCESSDENIED, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
else
@@ -1341,13 +1346,13 @@ uno::Reference < embed::XStorage > SfxMedium::GetStorage( sal_Bool bCreateTempIf
// TODO/LATER: Get versionlist on demand
if ( pImp->xStorage.is() )
{
- SetPasswordToStorage_Impl();
+ SetEncryptionDataToStorage_Impl();
GetVersionList();
}
SFX_ITEMSET_ARG( pSet, pVersion, SfxInt16Item, SID_VERSION, sal_False);
- BOOL bResetStorage = FALSE;
+ sal_Bool bResetStorage = sal_False;
if ( pVersion && pVersion->GetValue() )
{
// Read all available versions
@@ -1398,11 +1403,11 @@ uno::Reference < embed::XStorage > SfxMedium::GetStorage( sal_Bool bCreateTempIf
pImp->aVersions.realloc(0);
}
else
- bResetStorage = TRUE;
+ bResetStorage = sal_True;
}
}
else
- bResetStorage = TRUE;
+ bResetStorage = sal_True;
}
if ( bResetStorage )
@@ -1653,7 +1658,7 @@ sal_Bool SfxMedium::TransactedTransferForFS_Impl( const INetURLObject& aSource,
sal_Bool bTransactStarted = sal_False;
SFX_ITEMSET_ARG( GetItemSet(), pOverWrite, SfxBoolItem, SID_OVERWRITE, sal_False );
SFX_ITEMSET_ARG( GetItemSet(), pRename, SfxBoolItem, SID_RENAME, sal_False );
- sal_Bool bRename = pRename ? pRename->GetValue() : FALSE;
+ sal_Bool bRename = pRename ? pRename->GetValue() : sal_False;
sal_Bool bOverWrite = pOverWrite ? pOverWrite->GetValue() : !bRename;
try
@@ -2276,7 +2281,7 @@ void SfxMedium::GetMedium_Impl()
{
GetItemSet()->Put( SfxStringItem( SID_FILE_NAME, aFileName ) );
if( !(nStorOpenMode & STREAM_WRITE ) )
- GetItemSet()->Put( SfxBoolItem( SID_DOC_READONLY, TRUE ) );
+ GetItemSet()->Put( SfxBoolItem( SID_DOC_READONLY, sal_True ) );
if (xInteractionHandler.is())
GetItemSet()->Put( SfxUnoAnyItem( SID_INTERACTIONHANDLER, makeAny(xInteractionHandler) ) );
}
@@ -2419,7 +2424,7 @@ void SfxMedium::Init_Impl()
Reference< XOutputStream > rOutStream;
// TODO/LATER: handle lifetime of storages
- pImp->bDisposeStorage = FALSE;
+ pImp->bDisposeStorage = sal_False;
SFX_ITEMSET_ARG( pSet, pSalvageItem, SfxStringItem, SID_DOC_SALVAGE, sal_False);
if ( pSalvageItem && !pSalvageItem->GetValue().Len() )
@@ -2475,7 +2480,7 @@ void SfxMedium::Init_Impl()
if ( aLogicName.Len() )
{
// if the logic name is set it should be set in MediaDescriptor as well
- SFX_ITEMSET_ARG( pSet, pFileNameItem, SfxStringItem, SID_FILE_NAME, FALSE );
+ SFX_ITEMSET_ARG( pSet, pFileNameItem, SfxStringItem, SID_FILE_NAME, sal_False );
if ( !pFileNameItem )
{
// let the ItemSet be created if necessary
@@ -2521,7 +2526,7 @@ SfxMedium::SfxMedium( const SfxMedium& rMedium, sal_Bool bTemporary )
//------------------------------------------------------------------
-void SfxMedium::UseInteractionHandler( BOOL bUse )
+void SfxMedium::UseInteractionHandler( sal_Bool bUse )
{
pImp->bAllowDefaultIntHdl = bUse;
}
@@ -2762,7 +2767,7 @@ void SfxMedium::SetIsRemote_Impl()
case INET_PROT_NEWS:
case INET_PROT_IMAP:
case INET_PROT_VIM:
- bRemote = TRUE; break;
+ bRemote = sal_True; break;
default:
bRemote = ( GetName().CompareToAscii( "private:msgid", 13 ) == COMPARE_EQUAL );
break;
@@ -2839,8 +2844,8 @@ sal_Bool SfxMedium::Exists( sal_Bool /*bForceSession*/ )
void SfxMedium::ReOpen()
{
- BOOL bUseInteractionHandler = pImp->bUseInteractionHandler;
- pImp->bUseInteractionHandler = FALSE;
+ sal_Bool bUseInteractionHandler = pImp->bUseInteractionHandler;
+ pImp->bUseInteractionHandler = sal_False;
GetMedium_Impl();
pImp->bUseInteractionHandler = bUseInteractionHandler;
}
@@ -2850,8 +2855,8 @@ void SfxMedium::ReOpen()
void SfxMedium::CompleteReOpen()
{
// do not use temporary file for reopen and in case of success throw the temporary file away
- BOOL bUseInteractionHandler = pImp->bUseInteractionHandler;
- pImp->bUseInteractionHandler = FALSE;
+ sal_Bool bUseInteractionHandler = pImp->bUseInteractionHandler;
+ pImp->bUseInteractionHandler = sal_False;
::utl::TempFile* pTmpFile = NULL;
if ( pImp->pTempFile )
@@ -2927,7 +2932,7 @@ SfxMedium::SfxMedium( const ::com::sun::star::uno::Sequence< ::com::sun::star::b
// if an URL is provided in SalvageItem that means that the FileName refers to a temporary file
// that must be copied here
- SFX_ITEMSET_ARG( pSet, pFileNameItem, SfxStringItem, SID_FILE_NAME, FALSE );
+ SFX_ITEMSET_ARG( pSet, pFileNameItem, SfxStringItem, SID_FILE_NAME, sal_False );
if (!pFileNameItem) throw uno::RuntimeException();
::rtl::OUString aNewTempFileURL = SfxMedium::CreateTempCopyWithExt( pFileNameItem->GetValue() );
if ( aNewTempFileURL.getLength() )
@@ -2944,16 +2949,16 @@ SfxMedium::SfxMedium( const ::com::sun::star::uno::Sequence< ::com::sun::star::b
}
}
- BOOL bReadOnly = FALSE;
- SFX_ITEMSET_ARG( pSet, pReadOnlyItem, SfxBoolItem, SID_DOC_READONLY, FALSE );
+ sal_Bool bReadOnly = sal_False;
+ SFX_ITEMSET_ARG( pSet, pReadOnlyItem, SfxBoolItem, SID_DOC_READONLY, sal_False );
if ( pReadOnlyItem && pReadOnlyItem->GetValue() )
- bReadOnly = TRUE;
+ bReadOnly = sal_True;
- SFX_ITEMSET_ARG( pSet, pFileNameItem, SfxStringItem, SID_FILE_NAME, FALSE );
+ SFX_ITEMSET_ARG( pSet, pFileNameItem, SfxStringItem, SID_FILE_NAME, sal_False );
if (!pFileNameItem) throw uno::RuntimeException();
aLogicName = pFileNameItem->GetValue();
nStorOpenMode = bReadOnly ? SFX_STREAM_READONLY : SFX_STREAM_READWRITE;
- bDirect = FALSE;
+ bDirect = sal_False;
Init_Impl();
}
@@ -2971,7 +2976,7 @@ SfxMedium::SfxMedium( const uno::Reference < embed::XStorage >& rStor, const Str
Init_Impl();
pImp->xStorage = rStor;
- pImp->bDisposeStorage = FALSE;
+ pImp->bDisposeStorage = sal_False;
// always take BaseURL first, could be overwritten by ItemSet
GetItemSet()->Put( SfxStringItem( SID_DOC_BASEURL, rBaseURL ) );
@@ -3213,7 +3218,7 @@ sal_uInt16 SfxMedium::AddVersion_Impl( util::RevisionTag& rRevision )
sal_uInt16 nKey;
for ( nKey=0; nKey<aLongs.Count(); nKey++ )
- if ( aLongs[nKey] > ( ULONG ) nKey+1 )
+ if ( aLongs[nKey] > ( sal_uIntPtr ) nKey+1 )
break;
String aRevName = DEFINE_CONST_UNICODE( "Version" );
@@ -3504,7 +3509,7 @@ void SfxMedium::SetCharset( ::rtl::OUString aChs )
sal_Bool SfxMedium::SignContents_Impl( sal_Bool bScriptingContent, const ::rtl::OUString& aODFVersion, sal_Bool bHasValidDocumentSignature )
{
- sal_Bool bChanges = FALSE;
+ sal_Bool bChanges = sal_False;
// the medium should be closed to be able to sign, the caller is responsible to close it
if ( !IsOpen() && !GetError() )
@@ -3567,7 +3572,7 @@ sal_Bool SfxMedium::SignContents_Impl( sal_Bool bScriptingContent, const ::rtl::
// the temporary file has been written, commit it to the original file
Commit();
- bChanges = TRUE;
+ bChanges = sal_True;
}
}
else
@@ -3586,7 +3591,7 @@ sal_Bool SfxMedium::SignContents_Impl( sal_Bool bScriptingContent, const ::rtl::
// the temporary file has been written, commit it to the original file
Commit();
- bChanges = TRUE;
+ bChanges = sal_True;
}
}
}
@@ -3631,12 +3636,12 @@ void SfxMedium::SetCachedSignatureState_Impl( sal_uInt16 nState )
pImp->m_nSignatureState = nState;
}
-BOOL SfxMedium::HasStorage_Impl() const
+sal_Bool SfxMedium::HasStorage_Impl() const
{
return pImp->xStorage.is();
}
-BOOL SfxMedium::IsOpen() const
+sal_Bool SfxMedium::IsOpen() const
{
return pInStream || pOutStream || pImp->xStorage.is();
}
@@ -3693,19 +3698,17 @@ sal_Bool SfxMedium::CallApproveHandler( const uno::Reference< task::XInteraction
{
uno::Sequence< uno::Reference< task::XInteractionContinuation > > aContinuations( bAllowAbort ? 2 : 1 );
- ::rtl::Reference< ::framework::ContinuationApprove > pApprove( new ::framework::ContinuationApprove() );
+ ::rtl::Reference< ::comphelper::OInteractionApprove > pApprove( new ::comphelper::OInteractionApprove );
aContinuations[ 0 ] = pApprove.get();
if ( bAllowAbort )
{
- ::rtl::Reference< ::framework::ContinuationAbort > pAbort( new ::framework::ContinuationAbort() );
+ ::rtl::Reference< ::comphelper::OInteractionAbort > pAbort( new ::comphelper::OInteractionAbort );
aContinuations[ 1 ] = pAbort.get();
}
- uno::Reference< task::XInteractionRequest > xRequest( new ::framework::InteractionRequest( aRequest, aContinuations ) );
- xHandler->handle( xRequest );
-
- bResult = pApprove->isSelected();
+ xHandler->handle(::framework::InteractionRequest::CreateRequest (aRequest,aContinuations));
+ bResult = pApprove->wasSelected();
}
catch( const Exception& )
{
@@ -3745,7 +3748,7 @@ sal_Bool SfxMedium::CallApproveHandler( const uno::Reference< task::XInteraction
// remove the readonly state
sal_Bool bWasReadonly = sal_False;
nStorOpenMode = SFX_STREAM_READWRITE;
- SFX_ITEMSET_ARG( pSet, pReadOnlyItem, SfxBoolItem, SID_DOC_READONLY, FALSE );
+ SFX_ITEMSET_ARG( pSet, pReadOnlyItem, SfxBoolItem, SID_DOC_READONLY, sal_False );
if ( pReadOnlyItem && pReadOnlyItem->GetValue() )
bWasReadonly = sal_True;
GetItemSet()->ClearItem( SID_DOC_READONLY );
diff --git a/sfx2/source/doc/docfilt.cxx b/sfx2/source/doc/docfilt.cxx
index 75b323250331..3b82bb5bec59 100644..100755
--- a/sfx2/source/doc/docfilt.cxx
+++ b/sfx2/source/doc/docfilt.cxx
@@ -177,7 +177,7 @@ String SfxFilter::GetTypeFromStorage( const SotStorage& rStg )
return pType ? String::CreateFromAscii(pType) : String();
}
-String SfxFilter::GetTypeFromStorage( const com::sun::star::uno::Reference< com::sun::star::embed::XStorage >& xStorage, BOOL bTemplate,
+String SfxFilter::GetTypeFromStorage( const com::sun::star::uno::Reference< com::sun::star::embed::XStorage >& xStorage, sal_Bool bTemplate,
String* pFilterName )
throw ( beans::UnknownPropertyException,
lang::WrappedTargetException,
diff --git a/sfx2/source/doc/docinf.cxx b/sfx2/source/doc/docinf.cxx
index 1bdb2be835fb..2f5995c4dbde 100644..100755
--- a/sfx2/source/doc/docinf.cxx
+++ b/sfx2/source/doc/docinf.cxx
@@ -313,7 +313,7 @@ uno::Sequence<sal_uInt8> SFX2_DLLPUBLIC convertMetaFile(GDIMetaFile* i_pThumb)
SvMemoryStream aStream;
// magic value 160 taken from GraphicHelper::getThumbnailFormatFromGDI_Impl()
if( i_pThumb->CreateThumbnail( 160, aBitmap ) ) {
- aBitmap.GetBitmap().Write( aStream, FALSE, FALSE );
+ aBitmap.GetBitmap().Write( aStream, sal_False, sal_False );
aStream.Seek(STREAM_SEEK_TO_END);
uno::Sequence<sal_uInt8> aSeq(aStream.Tell());
const sal_uInt8* pBlob(
diff --git a/sfx2/source/doc/docinsert.cxx b/sfx2/source/doc/docinsert.cxx
index f9c057442f01..9b1ebfeb799e 100644..100755
--- a/sfx2/source/doc/docinsert.cxx
+++ b/sfx2/source/doc/docinsert.cxx
@@ -30,7 +30,7 @@
#include "precompiled_sfx2.hxx"
#include <sfx2/app.hxx>
-#include "docinsert.hxx"
+#include "sfx2/docinsert.hxx"
#include <sfx2/docfile.hxx>
#include <sfx2/fcontnr.hxx>
#include <sfx2/filedlghelper.hxx>
@@ -112,9 +112,9 @@ SfxMedium* DocumentInserter::CreateMedium()
DBG_ASSERT( m_pURLList->Count() == 1, "DocumentInserter::CreateMedium(): invalid URL list count" );
String sURL = *( m_pURLList->GetObject(0) );
pMedium = new SfxMedium(
- sURL, SFX_STREAM_READONLY, FALSE,
+ sURL, SFX_STREAM_READONLY, sal_False,
SFX_APP()->GetFilterMatcher().GetFilter4FilterName( m_sFilter ), m_pItemSet );
- pMedium->UseInteractionHandler( TRUE );
+ pMedium->UseInteractionHandler( sal_True );
SfxFilterMatcher* pMatcher = NULL;
if ( m_sDocFactory.Len() )
pMatcher = new SfxFilterMatcher( m_sDocFactory );
@@ -122,7 +122,7 @@ SfxMedium* DocumentInserter::CreateMedium()
pMatcher = new SfxFilterMatcher();
const SfxFilter* pFilter = NULL;
- sal_uInt32 nError = pMatcher->DetectFilter( *pMedium, &pFilter, FALSE );
+ sal_uInt32 nError = pMatcher->DetectFilter( *pMedium, &pFilter, sal_False );
if ( nError == ERRCODE_NONE && pFilter )
pMedium->SetFilter( pFilter );
else
@@ -146,16 +146,16 @@ SfxMediumList* DocumentInserter::CreateMediumList()
sal_Int32 nCount = m_pURLList->Count();
for ( ; i < nCount; ++i )
{
- String sURL = *( m_pURLList->GetObject( static_cast< USHORT >(i) ) );
+ String sURL = *( m_pURLList->GetObject( static_cast< sal_uInt16 >(i) ) );
SfxMedium* pMedium = new SfxMedium(
- sURL, SFX_STREAM_READONLY, FALSE,
+ sURL, SFX_STREAM_READONLY, sal_False,
SFX_APP()->GetFilterMatcher().GetFilter4FilterName( m_sFilter ), m_pItemSet );
- pMedium->UseInteractionHandler( TRUE );
+ pMedium->UseInteractionHandler( sal_True );
SfxFilterMatcher aMatcher( m_sDocFactory );
const SfxFilter* pFilter = NULL;
- sal_uInt32 nError = aMatcher.DetectFilter( *pMedium, &pFilter, FALSE );
+ sal_uInt32 nError = aMatcher.DetectFilter( *pMedium, &pFilter, sal_False );
if ( nError == ERRCODE_NONE && pFilter )
pMedium->SetFilter( pFilter );
else
@@ -181,7 +181,7 @@ void impl_FillURLList( sfx2::FileDialogHelper* _pFileDlg, SvStringsDtor*& _rpURL
{
_rpURLList = new SvStringsDtor;
- for ( USHORT i = 0; i < aPathSeq.getLength(); ++i )
+ for ( sal_uInt16 i = 0; i < aPathSeq.getLength(); ++i )
{
INetURLObject aPathObj( aPathSeq[i] );
String* pURL = new String( aPathObj.GetMainURL( INetURLObject::NO_DECODE ) );
diff --git a/sfx2/source/doc/docmacromode.cxx b/sfx2/source/doc/docmacromode.cxx
index c57b048816ed..c57b048816ed 100644..100755
--- a/sfx2/source/doc/docmacromode.cxx
+++ b/sfx2/source/doc/docmacromode.cxx
diff --git a/sfx2/source/doc/docstoragemodifylistener.cxx b/sfx2/source/doc/docstoragemodifylistener.cxx
index 847cb15c2082..847cb15c2082 100644..100755
--- a/sfx2/source/doc/docstoragemodifylistener.cxx
+++ b/sfx2/source/doc/docstoragemodifylistener.cxx
diff --git a/sfx2/source/doc/doctdlg.cxx b/sfx2/source/doc/doctdlg.cxx
index b59c4f123c39..222cfaf328e7 100644..100755
--- a/sfx2/source/doc/doctdlg.cxx
+++ b/sfx2/source/doc/doctdlg.cxx
@@ -34,7 +34,7 @@
#include <sfx2/doctdlg.hxx>
#include "docvor.hxx"
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include "sfxtypes.hxx"
#include <sfx2/dispatch.hxx>
#include <sfx2/app.hxx>
@@ -109,8 +109,8 @@ void SfxDocumentTemplateDlg::Init()
if(!pTemplates->IsConstructed())
pTemplates->Construct();
- const USHORT nCount = pTemplates->GetRegionCount();
- for(USHORT i = 0; i < nCount; ++i)
+ const sal_uInt16 nCount = pTemplates->GetRegionCount();
+ for(sal_uInt16 i = 0; i < nCount; ++i)
aRegionLb.InsertEntry(pTemplates->GetFullRegionName(i));
if(!nCount)
aRegionLb.InsertEntry(String(SfxResId(STR_STANDARD)));
@@ -141,10 +141,10 @@ IMPL_LINK( SfxDocumentTemplateDlg, OrganizeHdl, Button *, pButton )
if(RET_OK == nRet)
{
// View aktualisieren
- aRegionLb.SetUpdateMode( FALSE );
+ aRegionLb.SetUpdateMode( sal_False );
aRegionLb.Clear();
Init();
- aRegionLb.SetUpdateMode( TRUE );
+ aRegionLb.SetUpdateMode( sal_True );
aRegionLb.Invalidate();
aRegionLb.Update();
aCancelBt.SetText(String(SfxResId(STR_CLOSE)));
@@ -174,14 +174,14 @@ IMPL_LINK( SfxDocumentTemplateDlg, OkHdl, Control *, pControl )
IMPL_LINK( SfxDocumentTemplateDlg, RegionSelect, ListBox *, pBox )
{
- const USHORT nRegion = pBox->GetSelectEntryPos();
- const USHORT nCount = pTemplates->GetCount(nRegion);
- aTemplateLb.SetUpdateMode(FALSE);
+ const sal_uInt16 nRegion = pBox->GetSelectEntryPos();
+ const sal_uInt16 nCount = pTemplates->GetCount(nRegion);
+ aTemplateLb.SetUpdateMode(sal_False);
aTemplateLb.Clear();
- for(USHORT i = 0; i < nCount; ++i)
+ for(sal_uInt16 i = 0; i < nCount; ++i)
aTemplateLb.InsertEntry(pTemplates->GetName(nRegion, i));
aTemplateLb.SelectEntryPos(0);
- aTemplateLb.SetUpdateMode(TRUE);
+ aTemplateLb.SetUpdateMode(sal_True);
aTemplateLb.Invalidate();
aTemplateLb.Update();
return 0;
diff --git a/sfx2/source/doc/doctdlg.hrc b/sfx2/source/doc/doctdlg.hrc
index 8deed4699f3b..8deed4699f3b 100644..100755
--- a/sfx2/source/doc/doctdlg.hrc
+++ b/sfx2/source/doc/doctdlg.hrc
diff --git a/sfx2/source/doc/doctdlg.src b/sfx2/source/doc/doctdlg.src
index 91d966fbd2d5..1b50fd56c55e 100644..100755
--- a/sfx2/source/doc/doctdlg.src
+++ b/sfx2/source/doc/doctdlg.src
@@ -28,10 +28,11 @@
#include <sfx2/sfx.hrc>
#include "doc.hrc"
#include "doctdlg.hrc"
+#include <sfx2/sfxcommands.h>
ModalDialog DLG_DOC_TEMPLATE
{
- HelpId = SID_DOCTEMPLATE ;
+ HelpId = CMD_SID_DOCTEMPLATE ;
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 280 , 128 ) ;
@@ -45,6 +46,7 @@ ModalDialog DLG_DOC_TEMPLATE
};
Edit ED_NAME
{
+ HelpID = "sfx2:Edit:DLG_DOC_TEMPLATE:ED_NAME";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 200 , 12 ) ;
@@ -63,6 +65,7 @@ ModalDialog DLG_DOC_TEMPLATE
};
ListBox LB_SECTION
{
+ HelpID = "sfx2:ListBox:DLG_DOC_TEMPLATE:LB_SECTION";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 56 ) ;
Size = MAP_APPFONT ( 97 , 66 ) ;
@@ -75,6 +78,7 @@ ModalDialog DLG_DOC_TEMPLATE
};
ListBox LB_STYLESHEETS
{
+ HelpID = "sfx2:ListBox:DLG_DOC_TEMPLATE:LB_STYLESHEETS";
Border = TRUE ;
Pos = MAP_APPFONT ( 115 , 56 ) ;
Size = MAP_APPFONT ( 97 , 66 ) ;
@@ -98,12 +102,14 @@ ModalDialog DLG_DOC_TEMPLATE
};
PushButton BT_EDIT
{
+ HelpID = "sfx2:PushButton:DLG_DOC_TEMPLATE:BT_EDIT";
Pos = MAP_APPFONT ( 224 , 62 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Edit" ;
};
PushButton BT_ORGANIZE
{
+ HelpID = "sfx2:PushButton:DLG_DOC_TEMPLATE:BT_ORGANIZE";
Pos = MAP_APPFONT ( 224 , 79 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Organizer..." ;
diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx
index c870b007502d..d28d0e6c5c72 100644..100755
--- a/sfx2/source/doc/doctempl.cxx
+++ b/sfx2/source/doc/doctempl.cxx
@@ -93,7 +93,7 @@ using namespace ::ucbhelper;
#include <sfx2/objsh.hxx>
#include "sfxtypes.hxx"
#include <sfx2/app.hxx>
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include "doc.hrc"
#include <sfx2/fcontnr.hxx>
#include <svtools/templatefoldercache.hxx>
@@ -138,7 +138,11 @@ namespace DocTempl {
class DocTempl_EntryData_Impl
{
RegionData_Impl* mpParent;
+
+ // the following member must be SfxObjectShellLock since it controlls that SfxObjectShell lifetime by design
+ // and users of this class expect it to be so.
SfxObjectShellLock mxObjShell;
+
OUString maTitle;
OUString maOwnURL;
OUString maTargetURL;
@@ -314,7 +318,7 @@ static sal_Bool getTextProperty_Impl( Content& rContent,
String SfxDocumentTemplates::GetFullRegionName
(
- USHORT nIdx // Region Index
+ sal_uInt16 nIdx // Region Index
) const
/* [Description]
@@ -350,7 +354,7 @@ String SfxDocumentTemplates::GetFullRegionName
const String& SfxDocumentTemplates::GetRegionName
(
- USHORT nIdx // Region Index
+ sal_uInt16 nIdx // Region Index
) const
/* [Description]
@@ -385,7 +389,7 @@ const String& SfxDocumentTemplates::GetRegionName
//------------------------------------------------------------------------
-USHORT SfxDocumentTemplates::GetRegionNo
+sal_uInt16 SfxDocumentTemplates::GetRegionNo
(
const String &rRegion // Region Name
) const
@@ -396,7 +400,7 @@ USHORT SfxDocumentTemplates::GetRegionNo
[Return value]
- USHORT Index of 'rRegion' or USHRT_MAX if unknown
+ sal_uInt16 Index of 'rRegion' or USHRT_MAX if unknown
*/
{
@@ -409,7 +413,7 @@ USHORT SfxDocumentTemplates::GetRegionNo
size_t nIndex = pImp->GetRegionPos( rRegion, bFound );
if ( bFound )
- return (USHORT) nIndex;
+ return (sal_uInt16) nIndex;
else
return USHRT_MAX;
}
@@ -417,7 +421,7 @@ USHORT SfxDocumentTemplates::GetRegionNo
//------------------------------------------------------------------------
-USHORT SfxDocumentTemplates::GetRegionCount() const
+sal_uInt16 SfxDocumentTemplates::GetRegionCount() const
/* [Description]
@@ -425,7 +429,7 @@ USHORT SfxDocumentTemplates::GetRegionCount() const
[Return value]
- USHORT Number of Regions
+ sal_uInt16 Number of Regions
*/
{
DocTemplLocker_Impl aLocker( *pImp );
@@ -433,14 +437,14 @@ USHORT SfxDocumentTemplates::GetRegionCount() const
if ( !pImp->Construct() )
return 0;
- ULONG nCount = pImp->GetRegionCount();
+ sal_uIntPtr nCount = pImp->GetRegionCount();
- return (USHORT) nCount;
+ return (sal_uInt16) nCount;
}
//------------------------------------------------------------------------
-sal_Bool SfxDocumentTemplates::IsRegionLoaded( USHORT nIdx ) const
+sal_Bool SfxDocumentTemplates::IsRegionLoaded( sal_uInt16 nIdx ) const
{
DocTemplLocker_Impl aLocker( *pImp );
@@ -457,7 +461,7 @@ sal_Bool SfxDocumentTemplates::IsRegionLoaded( USHORT nIdx ) const
//------------------------------------------------------------------------
-USHORT SfxDocumentTemplates::GetCount
+sal_uInt16 SfxDocumentTemplates::GetCount
(
const String& rName /* Region Name, for which the entries
should be counted */
@@ -470,7 +474,7 @@ USHORT SfxDocumentTemplates::GetCount
[Return value]
- USHORT Number of entries
+ sal_uInt16 Number of entries
*/
{
@@ -480,19 +484,19 @@ USHORT SfxDocumentTemplates::GetCount
return 0;
RegionData_Impl *pData = pImp->GetRegion( rName );
- ULONG nCount = 0;
+ sal_uIntPtr nCount = 0;
if ( pData )
nCount = pData->GetCount();
- return (USHORT) nCount;
+ return (sal_uInt16) nCount;
}
//------------------------------------------------------------------------
-USHORT SfxDocumentTemplates::GetCount
+sal_uInt16 SfxDocumentTemplates::GetCount
(
- USHORT nRegion /* Region index whose number is
+ sal_uInt16 nRegion /* Region index whose number is
to be determined */
) const
@@ -511,20 +515,20 @@ USHORT SfxDocumentTemplates::GetCount
return 0;
RegionData_Impl *pData = pImp->GetRegion( nRegion );
- ULONG nCount = 0;
+ sal_uIntPtr nCount = 0;
if ( pData )
nCount = pData->GetCount();
- return (USHORT) nCount;
+ return (sal_uInt16) nCount;
}
//------------------------------------------------------------------------
const String& SfxDocumentTemplates::GetName
(
- USHORT nRegion, // Region Index, in which the entry lies
- USHORT nIdx // Index of the entry
+ sal_uInt16 nRegion, // Region Index, in which the entry lies
+ sal_uInt16 nIdx // Index of the entry
) const
/* [Description]
@@ -564,8 +568,8 @@ const String& SfxDocumentTemplates::GetName
String SfxDocumentTemplates::GetFileName
(
- USHORT nRegion, // Region Index, in which the entry lies
- USHORT nIdx // Index of the entry
+ sal_uInt16 nRegion, // Region Index, in which the entry lies
+ sal_uInt16 nIdx // Index of the entry
) const
/* [Description]
@@ -600,8 +604,8 @@ String SfxDocumentTemplates::GetFileName
String SfxDocumentTemplates::GetPath
(
- USHORT nRegion, // Region Index, in which the entry lies
- USHORT nIdx // Index of the entry
+ sal_uInt16 nRegion, // Region Index, in which the entry lies
+ sal_uInt16 nIdx // Index of the entry
) const
/* [Description]
@@ -634,7 +638,7 @@ String SfxDocumentTemplates::GetPath
String SfxDocumentTemplates::GetTemplatePath
(
- USHORT nRegion, // Region Index, in which the entry lies
+ sal_uInt16 nRegion, // Region Index, in which the entry lies
const String& rLongName // logical Entry Name
) const
@@ -794,7 +798,7 @@ sal_Bool SfxDocumentTemplates::SaveDir
void SfxDocumentTemplates::NewTemplate
(
- USHORT nRegion, /* Region Index, in which the template
+ sal_uInt16 nRegion, /* Region Index, in which the template
should be applied */
const String& rLongName, // logical name of the new template
@@ -836,10 +840,10 @@ void SfxDocumentTemplates::NewTemplate
sal_Bool SfxDocumentTemplates::CopyOrMove
(
- USHORT nTargetRegion, // Target Region Index
- USHORT nTargetIdx, // Target position Index
- USHORT nSourceRegion, // Source Region Index
- USHORT nSourceIdx, /* Index to be copied / to moved template */
+ sal_uInt16 nTargetRegion, // Target Region Index
+ sal_uInt16 nTargetIdx, // Target position Index
+ sal_uInt16 nSourceRegion, // Source Region Index
+ sal_uInt16 nSourceIdx, /* Index to be copied / to moved template */
sal_Bool bMove // Copy / Move
)
@@ -854,8 +858,8 @@ sal_Bool SfxDocumentTemplates::CopyOrMove
[Cross-references]
- <SfxDocumentTemplates::Move(USHORT,USHORT,USHORT,USHORT)>
- <SfxDocumentTemplates::Copy(USHORT,USHORT,USHORT,USHORT)>
+ <SfxDocumentTemplates::Move(sal_uInt16,sal_uInt16,sal_uInt16,sal_uInt16)>
+ <SfxDocumentTemplates::Copy(sal_uInt16,sal_uInt16,sal_uInt16,sal_uInt16)>
*/
{
@@ -928,7 +932,7 @@ sal_Bool SfxDocumentTemplates::CopyOrMove
}
}
- // todo: fix SfxDocumentTemplates to handle size_t instead of USHORT
+ // todo: fix SfxDocumentTemplates to handle size_t instead of sal_uInt16
size_t temp_nTargetIdx = nTargetIdx;
pTargetRgn->AddEntry( aTitle, aNewTargetURL, &temp_nTargetIdx );
@@ -945,10 +949,10 @@ sal_Bool SfxDocumentTemplates::CopyOrMove
sal_Bool SfxDocumentTemplates::Move
(
- USHORT nTargetRegion, // Target Region Index
- USHORT nTargetIdx, // Target position Index
- USHORT nSourceRegion, // Source Region Index
- USHORT nSourceIdx /* Index to be copied / to moved template */
+ sal_uInt16 nTargetRegion, // Target Region Index
+ sal_uInt16 nTargetIdx, // Target position Index
+ sal_uInt16 nSourceRegion, // Source Region Index
+ sal_uInt16 nSourceIdx /* Index to be copied / to moved template */
)
/* [Description]
@@ -962,7 +966,7 @@ sal_Bool SfxDocumentTemplates::Move
[Cross-references]
- <SfxDocumentTemplates::CopyOrMove(USHORT,USHORT,USHORT,USHORT,sal_Bool)>
+ <SfxDocumentTemplates::CopyOrMove(sal_uInt16,sal_uInt16,sal_uInt16,sal_uInt16,sal_Bool)>
*/
{
DocTemplLocker_Impl aLocker( *pImp );
@@ -975,10 +979,10 @@ sal_Bool SfxDocumentTemplates::Move
sal_Bool SfxDocumentTemplates::Copy
(
- USHORT nTargetRegion, // Target Region Index
- USHORT nTargetIdx, // Target position Index
- USHORT nSourceRegion, // Source Region Index
- USHORT nSourceIdx /* Index to be copied / to moved template */
+ sal_uInt16 nTargetRegion, // Target Region Index
+ sal_uInt16 nTargetIdx, // Target position Index
+ sal_uInt16 nSourceRegion, // Source Region Index
+ sal_uInt16 nSourceIdx /* Index to be copied / to moved template */
)
/* [Description]
@@ -992,7 +996,7 @@ sal_Bool SfxDocumentTemplates::Copy
[Cross-references]
- <SfxDocumentTemplates::CopyOrMove(USHORT,USHORT,USHORT,USHORT,sal_Bool)>
+ <SfxDocumentTemplates::CopyOrMove(sal_uInt16,sal_uInt16,sal_uInt16,sal_uInt16,sal_Bool)>
*/
{
@@ -1006,8 +1010,8 @@ sal_Bool SfxDocumentTemplates::Copy
sal_Bool SfxDocumentTemplates::CopyTo
(
- USHORT nRegion, // Region of the template to be exported
- USHORT nIdx, // Index of the template to be exported
+ sal_uInt16 nRegion, // Region of the template to be exported
+ sal_uInt16 nIdx, // Index of the template to be exported
const String& rName /* File name under which the template is to
be created */
) const
@@ -1023,7 +1027,7 @@ sal_Bool SfxDocumentTemplates::CopyTo
[Cross-references]
- <SfxDocumentTemplates::CopyFrom(USHORT,USHORT,String&)>
+ <SfxDocumentTemplates::CopyFrom(sal_uInt16,sal_uInt16,String&)>
*/
{
@@ -1078,9 +1082,9 @@ sal_Bool SfxDocumentTemplates::CopyTo
sal_Bool SfxDocumentTemplates::CopyFrom
(
- USHORT nRegion, /* Region in which the template is to be
+ sal_uInt16 nRegion, /* Region in which the template is to be
imported */
- USHORT nIdx, // Index of the new template in this Region
+ sal_uInt16 nIdx, // Index of the new template in this Region
String& rName /* File name of the template to be imported
as an out parameter of the (automatically
generated from the file name) logical name
@@ -1098,7 +1102,7 @@ sal_Bool SfxDocumentTemplates::CopyFrom
[Cross-references]
- <SfxDocumentTemplates::CopyTo(USHORT,USHORT,const String&)>
+ <SfxDocumentTemplates::CopyTo(sal_uInt16,sal_uInt16,const String&)>
*/
{
@@ -1201,7 +1205,7 @@ sal_Bool SfxDocumentTemplates::CopyFrom
else
nIdx += 1;
- // todo: fix SfxDocumentTemplates to handle size_t instead of USHORT
+ // todo: fix SfxDocumentTemplates to handle size_t instead of sal_uInt16
size_t temp_nIdx = nIdx;
pTargetRgn->AddEntry( aTitle, aTemplName, &temp_nIdx );
rName = aTitle;
@@ -1225,8 +1229,8 @@ sal_Bool SfxDocumentTemplates::CopyFrom
sal_Bool SfxDocumentTemplates::Delete
(
- USHORT nRegion, // Region Index
- USHORT nIdx /* Index of the entry or USHRT_MAX,
+ sal_uInt16 nRegion, // Region Index
+ sal_uInt16 nIdx /* Index of the entry or USHRT_MAX,
if a directory is meant. */
)
@@ -1241,7 +1245,7 @@ sal_Bool SfxDocumentTemplates::Delete
[Cross-references]
- <SfxDocumentTemplates::InsertDir(const String&,USHORT)>
+ <SfxDocumentTemplates::InsertDir(const String&,sal_uInt16)>
<SfxDocumentTemplates::KillDir(SfxTemplateDir&)>
<SfxDocumentTemplates::SaveDir(SfxTemplateDir&)>
*/
@@ -1291,7 +1295,7 @@ sal_Bool SfxDocumentTemplates::Delete
sal_Bool SfxDocumentTemplates::InsertDir
(
const String& rText, // the logical name of the new Region
- USHORT nRegion // Region Index
+ sal_uInt16 nRegion // Region Index
)
/* [Description]
@@ -1341,8 +1345,8 @@ sal_Bool SfxDocumentTemplates::InsertDir
sal_Bool SfxDocumentTemplates::SetName
(
const String& rName, // Der zu setzende Name
- USHORT nRegion, // Region Index
- USHORT nIdx /* Index of the entry oder USHRT_MAX,
+ sal_uInt16 nRegion, // Region Index
+ sal_uInt16 nIdx /* Index of the entry oder USHRT_MAX,
if a directory is meant. */
)
@@ -1443,8 +1447,8 @@ sal_Bool SfxDocumentTemplates::Rescan()
SfxObjectShellRef SfxDocumentTemplates::CreateObjectShell
(
- USHORT nRegion, // Region Index
- USHORT nIdx // Index of the entry
+ sal_uInt16 nRegion, // Region Index
+ sal_uInt16 nIdx // Index of the entry
)
/* [Description]
@@ -1458,7 +1462,7 @@ SfxObjectShellRef SfxDocumentTemplates::CreateObjectShell
[Cross-references]
<SfxTemplateDirEntry::CreateObjectShell()>
- <SfxDocumentTemplates::DeleteObjectShell(USHORT, USHORT)>
+ <SfxDocumentTemplates::DeleteObjectShell(sal_uInt16, sal_uInt16)>
*/
{
@@ -1483,8 +1487,8 @@ SfxObjectShellRef SfxDocumentTemplates::CreateObjectShell
sal_Bool SfxDocumentTemplates::DeleteObjectShell
(
- USHORT nRegion, // Region Index
- USHORT nIdx // Index of the entry
+ sal_uInt16 nRegion, // Region Index
+ sal_uInt16 nIdx // Index of the entry
)
/* [Description]
@@ -1499,7 +1503,7 @@ sal_Bool SfxDocumentTemplates::DeleteObjectShell
[Cross-references]
<SfxTemplateDirEntry::DeleteObjectShell()>
- <SfxDocumentTemplates::CreateObjectShell(USHORT, USHORT)>
+ <SfxDocumentTemplates::CreateObjectShell(sal_uInt16, sal_uInt16)>
*/
{
@@ -1554,9 +1558,9 @@ sal_Bool SfxDocumentTemplates::GetFull
return sal_False;
DocTempl_EntryData_Impl* pEntry = NULL;
- const USHORT nCount = GetRegionCount();
+ const sal_uInt16 nCount = GetRegionCount();
- for ( USHORT i = 0; i < nCount; ++i )
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
RegionData_Impl *pRegion = pImp->GetRegion( i );
@@ -1615,16 +1619,16 @@ sal_Bool SfxDocumentTemplates::GetLogicNames
DocTempl_EntryData_Impl *pEntry = NULL;
sal_Bool bFound = sal_False;
- ULONG nCount = GetRegionCount();
+ sal_uIntPtr nCount = GetRegionCount();
- for ( ULONG i=0; !bFound && (i<nCount); i++ )
+ for ( sal_uIntPtr i=0; !bFound && (i<nCount); i++ )
{
pData = pImp->GetRegion( i );
if ( pData )
{
- ULONG nChildCount = pData->GetCount();
+ sal_uIntPtr nChildCount = pData->GetCount();
- for ( ULONG j=0; !bFound && (j<nChildCount); j++ )
+ for ( sal_uIntPtr j=0; !bFound && (j<nChildCount); j++ )
{
pEntry = pData->GetEntry( j );
if ( pEntry->GetTargetURL() == aPath )
@@ -1786,7 +1790,7 @@ SfxObjectShellRef DocTempl_EntryData_Impl::CreateObjectShell()
SfxMedium *pMed=new SfxMedium(
aTargetURL,(STREAM_STD_READWRITE | STREAM_SHARE_DENYALL), sal_False, 0 );
const SfxFilter* pFilter = NULL;
- pMed->UseInteractionHandler(TRUE);
+ pMed->UseInteractionHandler(sal_True);
if( pSfxApp->GetFilterMatcher().GuessFilter(
*pMed, &pFilter, SFX_FILTER_TEMPLATE, 0 ) ||
(pFilter && !pFilter->IsOwnFormat()) ||
@@ -1796,7 +1800,7 @@ SfxObjectShellRef DocTempl_EntryData_Impl::CreateObjectShell()
aTargetURL );
delete pMed;
mbDidConvert=sal_True;
- ULONG lErr;
+ sal_uIntPtr lErr;
if ( mxObjShell.Is() ) {
lErr = pSfxApp->LoadTemplate( mxObjShell,aTargetURL);
if( lErr != ERRCODE_NONE )
@@ -1827,7 +1831,7 @@ SfxObjectShellRef DocTempl_EntryData_Impl::CreateObjectShell()
}
//------------------------------------------------------------------------
-BOOL DocTempl_EntryData_Impl::DeleteObjectShell()
+sal_Bool DocTempl_EntryData_Impl::DeleteObjectShell()
{
sal_Bool bRet = sal_True;
diff --git a/sfx2/source/doc/doctempl.src b/sfx2/source/doc/doctempl.src
index 2c91358f845e..2c91358f845e 100644..100755
--- a/sfx2/source/doc/doctempl.src
+++ b/sfx2/source/doc/doctempl.src
diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index 8815bad96cbf..b7dfff9da835 100644..100755
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -32,6 +32,7 @@
#include "doctemplates.hxx"
#include <osl/mutex.hxx>
#include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
#include <tools/urlobj.hxx>
#include <rtl/ustring.hxx>
#include <rtl/ustrbuf.hxx>
@@ -41,6 +42,7 @@
#include <comphelper/sequenceashashmap.hxx>
#include <unotools/pathoptions.hxx>
#include <comphelper/processfactory.hxx>
+#include <comphelper/componentcontext.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XPropertySetInfo.hpp>
@@ -58,13 +60,12 @@
#include <com/sun/star/ucb/XContentAccess.hpp>
#include <com/sun/star/frame/XModuleManager.hpp>
#include <com/sun/star/uno/Exception.hpp>
-#include <com/sun/star/util/XOfficeInstallationDirectories.hpp>
#include <svtools/templatefoldercache.hxx>
#include <unotools/configmgr.hxx>
#include <unotools/ucbhelper.hxx>
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include "sfxurlrelocator.hxx"
#include "doctemplateslocal.hxx"
#include <sfx2/docfac.hxx>
@@ -131,7 +132,7 @@ using ::std::vector;
class WaitWindow_Impl : public WorkWindow
{
Rectangle _aRect;
- USHORT _nTextStyle;
+ sal_uInt16 _nTextStyle;
String _aText;
public:
@@ -545,9 +546,9 @@ void SfxDocTplService_Impl::readFolderList()
NamePair_Impl* pPair;
- USHORT nCount = (USHORT)( Min( aShortNames.Count(), aLongNames.Count() ) );
+ sal_uInt16 nCount = (sal_uInt16)( Min( aShortNames.Count(), aLongNames.Count() ) );
- for ( USHORT i=0; i<nCount; i++ )
+ for ( sal_uInt16 i=0; i<nCount; i++ )
{
pPair = new NamePair_Impl;
pPair->maShortName = aShortNames.GetString( i );
@@ -588,11 +589,11 @@ void SfxDocTplService_Impl::getDirList()
// TODO/LATER: let use service, register listener
INetURLObject aURL;
String aDirs = SvtPathOptions().GetTemplatePath();
- USHORT nCount = aDirs.GetTokenCount( C_DELIM );
+ sal_uInt16 nCount = aDirs.GetTokenCount( C_DELIM );
maTemplateDirs = Sequence< OUString >( nCount );
- for ( USHORT i=0; i<nCount; i++ )
+ for ( sal_uInt16 i=0; i<nCount; i++ )
{
aURL.SetSmartProtocol( INET_PROT_FILE );
aURL.SetURL( aDirs.GetToken( i, C_DELIM ) );
@@ -2453,7 +2454,7 @@ void SfxDocTplService_Impl::addHierGroup( GroupList_Impl& rList,
{
while ( xResultSet->next() )
{
- BOOL bUpdateType = sal_False;
+ sal_Bool bUpdateType = sal_False;
DocTemplates_EntryData_Impl *pData;
OUString aTitle( xRow->getString( 1 ) );
@@ -2723,8 +2724,8 @@ void SfxDocTplService_Impl::addGroupToHierarchy( GroupData_Impl *pGroup )
setProperty( aGroup, aAdditionalProp, makeAny( pGroup->getTargetURL() ) );
pGroup->setHierarchyURL( aNewGroupURL );
- ULONG nCount = pGroup->count();
- for ( ULONG i=0; i<nCount; i++ )
+ sal_uIntPtr nCount = pGroup->count();
+ for ( sal_uIntPtr i=0; i<nCount; i++ )
{
DocTemplates_EntryData_Impl *pData = pGroup->getEntry( i );
addToHierarchy( pGroup, pData ); // add entry to hierarchy
@@ -2873,11 +2874,35 @@ void SfxURLRelocator_Impl::initOfficeInstDirs()
}
// -----------------------------------------------------------------------
+void SfxURLRelocator_Impl::implExpandURL( ::rtl::OUString& io_url )
+{
+ const INetURLObject aParser( io_url );
+ if ( aParser.GetProtocol() != INET_PROT_VND_SUN_STAR_EXPAND )
+ return;
+
+ io_url = aParser.GetURLPath( INetURLObject::DECODE_WITH_CHARSET );
+ try
+ {
+ if ( !mxMacroExpander.is() )
+ {
+ ::comphelper::ComponentContext aContext( mxFactory );
+ mxMacroExpander.set( aContext.getSingleton( "com.sun.star.util.theMacroExpander" ), UNO_QUERY_THROW );
+ }
+ io_url = mxMacroExpander->expandMacros( io_url );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+}
+
+// -----------------------------------------------------------------------
void SfxURLRelocator_Impl::makeRelocatableURL( rtl::OUString & rURL )
{
if ( rURL.getLength() > 0 )
{
initOfficeInstDirs();
+ implExpandURL( rURL );
rURL = mxOfficeInstDirs->makeRelocatableURL( rURL );
}
}
@@ -2888,6 +2913,7 @@ void SfxURLRelocator_Impl::makeAbsoluteURL( rtl::OUString & rURL )
if ( rURL.getLength() > 0 )
{
initOfficeInstDirs();
+ implExpandURL( rURL );
rURL = mxOfficeInstDirs->makeAbsoluteURL( rURL );
}
}
diff --git a/sfx2/source/doc/doctemplateslocal.cxx b/sfx2/source/doc/doctemplateslocal.cxx
index 46c1c639159c..46c1c639159c 100644..100755
--- a/sfx2/source/doc/doctemplateslocal.cxx
+++ b/sfx2/source/doc/doctemplateslocal.cxx
diff --git a/sfx2/source/doc/doctemplateslocal.hxx b/sfx2/source/doc/doctemplateslocal.hxx
index 720cb62b71c0..720cb62b71c0 100644..100755
--- a/sfx2/source/doc/doctemplateslocal.hxx
+++ b/sfx2/source/doc/doctemplateslocal.hxx
diff --git a/sfx2/source/doc/docundomanager.cxx b/sfx2/source/doc/docundomanager.cxx
new file mode 100755
index 000000000000..8fa7dd29ac39
--- /dev/null
+++ b/sfx2/source/doc/docundomanager.cxx
@@ -0,0 +1,457 @@
+/*************************************************************************
+ * 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 "docundomanager.hxx"
+#include "sfx2/sfxbasemodel.hxx"
+#include "sfx2/objsh.hxx"
+#include "sfx2/viewfrm.hxx"
+#include "sfx2/viewsh.hxx"
+#include "sfx2/bindings.hxx"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/lang/XComponent.hpp>
+/** === end UNO includes === **/
+
+#include <comphelper/anytostring.hxx>
+#include <comphelper/flagguard.hxx>
+#include <svl/undo.hxx>
+#include <tools/diagnose_ex.h>
+#include <framework/undomanagerhelper.hxx>
+
+#include <boost/noncopyable.hpp>
+#include <stack>
+
+//......................................................................................................................
+namespace sfx2
+{
+//......................................................................................................................
+
+ /** === begin UNO using === **/
+ using ::com::sun::star::uno::Reference;
+ using ::com::sun::star::uno::XInterface;
+ 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::Exception;
+ using ::com::sun::star::uno::RuntimeException;
+ using ::com::sun::star::uno::Any;
+ using ::com::sun::star::uno::makeAny;
+ using ::com::sun::star::uno::Sequence;
+ using ::com::sun::star::uno::Type;
+ using ::com::sun::star::util::InvalidStateException;
+ using ::com::sun::star::document::EmptyUndoStackException;
+ using ::com::sun::star::util::NotLockedException;
+ using ::com::sun::star::document::UndoContextNotClosedException;
+ using ::com::sun::star::document::XUndoAction;
+ using ::com::sun::star::document::XUndoManagerSupplier;
+ using ::com::sun::star::lang::XComponent;
+ using ::com::sun::star::lang::IllegalArgumentException;
+ using ::com::sun::star::lang::NotInitializedException;
+ using ::com::sun::star::lang::EventObject;
+ using ::com::sun::star::document::UndoManagerEvent;
+ using ::com::sun::star::document::XUndoManagerListener;
+ using ::com::sun::star::document::UndoFailedException;
+ using ::com::sun::star::document::XUndoManager;
+ using ::com::sun::star::lang::NoSupportException;
+ using ::com::sun::star::frame::XModel;
+ /** === end UNO using === **/
+
+ using ::svl::IUndoManager;
+
+ //==================================================================================================================
+ //= DocumentUndoManager_Impl
+ //==================================================================================================================
+ struct DocumentUndoManager_Impl : public ::framework::IUndoManagerImplementation
+ {
+ DocumentUndoManager& rAntiImpl;
+ IUndoManager* pUndoManager;
+ ::framework::UndoManagerHelper aUndoHelper;
+
+ DocumentUndoManager_Impl( DocumentUndoManager& i_antiImpl )
+ :rAntiImpl( i_antiImpl )
+ ,pUndoManager( impl_retrieveUndoManager( i_antiImpl.getBaseModel() ) )
+ // do this *before* the construction of aUndoHelper (which actually means: put pUndoManager before
+ // aUndoHelper in the member list)!
+ ,aUndoHelper( *this )
+ {
+ }
+
+ const SfxObjectShell* getObjectShell() const { return rAntiImpl.getBaseModel().GetObjectShell(); }
+ SfxObjectShell* getObjectShell() { return rAntiImpl.getBaseModel().GetObjectShell(); }
+
+ // IUndoManagerImplementation
+ virtual ::svl::IUndoManager& getImplUndoManager();
+ virtual Reference< XUndoManager > getThis();
+
+ void disposing()
+ {
+ aUndoHelper.disposing();
+ ENSURE_OR_RETURN_VOID( pUndoManager, "DocumentUndoManager_Impl::disposing: already disposed!" );
+ pUndoManager = NULL;
+ }
+
+ void invalidateXDo_nolck();
+
+ private:
+ static IUndoManager* impl_retrieveUndoManager( SfxBaseModel& i_baseModel )
+ {
+ IUndoManager* pUndoManager( NULL );
+ SfxObjectShell* pObjectShell = i_baseModel.GetObjectShell();
+ if ( pObjectShell != NULL )
+ pUndoManager = pObjectShell->GetUndoManager();
+ if ( !pUndoManager )
+ throw NotInitializedException( ::rtl::OUString(), *&i_baseModel );
+ return pUndoManager;
+ }
+ };
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::svl::IUndoManager& DocumentUndoManager_Impl::getImplUndoManager()
+ {
+ ENSURE_OR_THROW( pUndoManager != NULL, "DocumentUndoManager_Impl::getImplUndoManager: no access to the doc's UndoManager implementation!" );
+
+#if OSL_DEBUG_LEVEL > 0
+ // in a non-product build, assert if the current UndoManager at the shell is not the same we obtained
+ // (and cached) at construction time
+ SfxObjectShell* pObjectShell = rAntiImpl.getBaseModel().GetObjectShell();
+ OSL_ENSURE( ( pObjectShell != NULL ) && ( pUndoManager == pObjectShell->GetUndoManager() ),
+ "DocumentUndoManager_Impl::getImplUndoManager: the UndoManager changed meanwhile - what about our listener?" );
+#endif
+
+ return *pUndoManager;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Reference< XUndoManager > DocumentUndoManager_Impl::getThis()
+ {
+ return static_cast< XUndoManager* >( &rAntiImpl );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void DocumentUndoManager_Impl::invalidateXDo_nolck()
+ {
+ SfxModelGuard aGuard( rAntiImpl );
+
+ const SfxObjectShell* pDocShell = getObjectShell();
+ ENSURE_OR_THROW( pDocShell != NULL, "lcl_invalidateUndo: no access to the doc shell!" );
+ SfxViewFrame* pViewFrame = SfxViewFrame::GetFirst( pDocShell );
+ while ( pViewFrame )
+ {
+ pViewFrame->GetBindings().Invalidate( SID_UNDO );
+ pViewFrame->GetBindings().Invalidate( SID_REDO );
+ pViewFrame = SfxViewFrame::GetNext( *pViewFrame, pDocShell );
+ }
+ }
+
+ //==================================================================================================================
+ //= SolarMutexFacade
+ //==================================================================================================================
+ /** a facade for the SolarMutex, implementing ::framework::IMutex (as opposed to ::vos::IMutex)
+ */
+ class SolarMutexFacade : public ::framework::IMutex
+ {
+ public:
+ SolarMutexFacade()
+ {
+ }
+
+ virtual void acquire()
+ {
+ Application::GetSolarMutex().acquire();
+ }
+
+ virtual void release()
+ {
+ Application::GetSolarMutex().release();
+ }
+ };
+
+ //==================================================================================================================
+ //= UndoManagerGuard
+ //==================================================================================================================
+ class UndoManagerGuard :public ::framework::IMutexGuard
+ ,public ::boost::noncopyable
+ {
+ public:
+ UndoManagerGuard( DocumentUndoManager& i_undoManager )
+ :m_guard( i_undoManager )
+ ,m_solarMutexFacade()
+ {
+ }
+
+ ~UndoManagerGuard()
+ {
+ }
+
+ virtual void reset()
+ {
+ m_guard.reset();
+ }
+
+ virtual void clear()
+ {
+ m_guard.clear();
+ }
+
+ virtual ::framework::IMutex& getGuardedMutex()
+ {
+ // note that this means that we *know* that SfxModelGuard also locks the SolarMutex (nothing more, nothing less).
+ // If this ever changes, we need to adjust this code here, too.
+ return m_solarMutexFacade;
+ }
+
+ private:
+ SfxModelGuard m_guard;
+ SolarMutexFacade m_solarMutexFacade;
+ };
+
+ //==================================================================================================================
+ //= DocumentUndoManager
+ //==================================================================================================================
+ //------------------------------------------------------------------------------------------------------------------
+ DocumentUndoManager::DocumentUndoManager( SfxBaseModel& i_document )
+ :SfxModelSubComponent( i_document )
+ ,m_pImpl( new DocumentUndoManager_Impl( *this ) )
+ {
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ DocumentUndoManager::~DocumentUndoManager()
+ {
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void DocumentUndoManager::disposing()
+ {
+ m_pImpl->disposing();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ bool DocumentUndoManager::isInContext() const
+ {
+ // No mutex locking within this method, no disposal check - this is the responsibility of the owner.
+ return m_pImpl->getImplUndoManager().IsInListAction();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL DocumentUndoManager::acquire( ) throw ()
+ {
+ SfxModelSubComponent::acquire();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL DocumentUndoManager::release( ) throw ()
+ {
+ SfxModelSubComponent::release();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL DocumentUndoManager::enterUndoContext( const ::rtl::OUString& i_title ) throw (RuntimeException)
+ {
+ // SYNCHRONIZED --->
+ UndoManagerGuard aGuard( *this );
+ m_pImpl->aUndoHelper.enterUndoContext( i_title, aGuard );
+ // <--- SYNCHRONIZED
+ m_pImpl->invalidateXDo_nolck();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL DocumentUndoManager::enterHiddenUndoContext( ) throw (EmptyUndoStackException, RuntimeException)
+ {
+ // SYNCHRONIZED --->
+ UndoManagerGuard aGuard( *this );
+ m_pImpl->aUndoHelper.enterHiddenUndoContext( aGuard );
+ // <--- SYNCHRONIZED
+ m_pImpl->invalidateXDo_nolck();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL DocumentUndoManager::leaveUndoContext( ) throw (InvalidStateException, RuntimeException)
+ {
+ // SYNCHRONIZED --->
+ UndoManagerGuard aGuard( *this );
+ m_pImpl->aUndoHelper.leaveUndoContext( aGuard );
+ // <--- SYNCHRONIZED
+ m_pImpl->invalidateXDo_nolck();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL DocumentUndoManager::addUndoAction( const Reference< XUndoAction >& i_action ) throw (RuntimeException, IllegalArgumentException)
+ {
+ // SYNCHRONIZED --->
+ UndoManagerGuard aGuard( *this );
+ m_pImpl->aUndoHelper.addUndoAction( i_action, aGuard );
+ // <--- SYNCHRONIZED
+ m_pImpl->invalidateXDo_nolck();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL DocumentUndoManager::undo( ) throw (EmptyUndoStackException, UndoContextNotClosedException, UndoFailedException, RuntimeException)
+ {
+ // SYNCHRONIZED --->
+ UndoManagerGuard aGuard( *this );
+ m_pImpl->aUndoHelper.undo( aGuard );
+ // <--- SYNCHRONIZED
+ m_pImpl->invalidateXDo_nolck();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL DocumentUndoManager::redo( ) throw (EmptyUndoStackException, UndoContextNotClosedException, UndoFailedException, RuntimeException)
+ {
+ // SYNCHRONIZED --->
+ UndoManagerGuard aGuard( *this );
+ m_pImpl->aUndoHelper.redo( aGuard );
+ // <--- SYNCHRONIZED
+ m_pImpl->invalidateXDo_nolck();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Bool SAL_CALL DocumentUndoManager::isUndoPossible( ) throw (RuntimeException)
+ {
+ UndoManagerGuard aGuard( *this );
+ return m_pImpl->aUndoHelper.isUndoPossible();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Bool SAL_CALL DocumentUndoManager::isRedoPossible( ) throw (RuntimeException)
+ {
+ UndoManagerGuard aGuard( *this );
+ return m_pImpl->aUndoHelper.isRedoPossible();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::rtl::OUString SAL_CALL DocumentUndoManager::getCurrentUndoActionTitle( ) throw (EmptyUndoStackException, RuntimeException)
+ {
+ UndoManagerGuard aGuard( *this );
+ return m_pImpl->aUndoHelper.getCurrentUndoActionTitle();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::rtl::OUString SAL_CALL DocumentUndoManager::getCurrentRedoActionTitle( ) throw (EmptyUndoStackException, RuntimeException)
+ {
+ UndoManagerGuard aGuard( *this );
+ return m_pImpl->aUndoHelper.getCurrentRedoActionTitle();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Sequence< ::rtl::OUString > SAL_CALL DocumentUndoManager::getAllUndoActionTitles( ) throw (RuntimeException)
+ {
+ UndoManagerGuard aGuard( *this );
+ return m_pImpl->aUndoHelper.getAllUndoActionTitles();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Sequence< ::rtl::OUString > SAL_CALL DocumentUndoManager::getAllRedoActionTitles( ) throw (RuntimeException)
+ {
+ UndoManagerGuard aGuard( *this );
+ return m_pImpl->aUndoHelper.getAllRedoActionTitles();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL DocumentUndoManager::clear( ) throw (UndoContextNotClosedException, RuntimeException)
+ {
+ // SYNCHRONIZED --->
+ UndoManagerGuard aGuard( *this );
+ m_pImpl->aUndoHelper.clear( aGuard );
+ // <--- SYNCHRONIZED
+ m_pImpl->invalidateXDo_nolck();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL DocumentUndoManager::clearRedo( ) throw (UndoContextNotClosedException, RuntimeException)
+ {
+ // SYNCHRONIZED --->
+ UndoManagerGuard aGuard( *this );
+ m_pImpl->aUndoHelper.clearRedo( aGuard );
+ // <--- SYNCHRONIZED
+ m_pImpl->invalidateXDo_nolck();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL DocumentUndoManager::reset() throw (RuntimeException)
+ {
+ // SYNCHRONIZED --->
+ UndoManagerGuard aGuard( *this );
+ m_pImpl->aUndoHelper.reset( aGuard );
+ // <--- SYNCHRONIZED
+ m_pImpl->invalidateXDo_nolck();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL DocumentUndoManager::lock( ) throw (RuntimeException)
+ {
+ UndoManagerGuard aGuard( *this );
+ m_pImpl->aUndoHelper.lock();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL DocumentUndoManager::unlock( ) throw (RuntimeException, NotLockedException)
+ {
+ UndoManagerGuard aGuard( *this );
+ m_pImpl->aUndoHelper.unlock();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Bool SAL_CALL DocumentUndoManager::isLocked( ) throw (RuntimeException)
+ {
+ UndoManagerGuard aGuard( *this );
+ return m_pImpl->aUndoHelper.isLocked();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL DocumentUndoManager::addUndoManagerListener( const Reference< XUndoManagerListener >& i_listener ) throw (RuntimeException)
+ {
+ UndoManagerGuard aGuard( *this );
+ return m_pImpl->aUndoHelper.addUndoManagerListener( i_listener );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL DocumentUndoManager::removeUndoManagerListener( const Reference< XUndoManagerListener >& i_listener ) throw (RuntimeException)
+ {
+ UndoManagerGuard aGuard( *this );
+ return m_pImpl->aUndoHelper.removeUndoManagerListener( i_listener );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Reference< XInterface > SAL_CALL DocumentUndoManager::getParent( ) throw (RuntimeException)
+ {
+ UndoManagerGuard aGuard( *this );
+ return static_cast< XModel* >( &getBaseModel() );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL DocumentUndoManager::setParent( const Reference< XInterface >& i_parent ) throw (NoSupportException, RuntimeException)
+ {
+ (void)i_parent;
+ throw NoSupportException( ::rtl::OUString(), m_pImpl->getThis() );
+ }
+
+//......................................................................................................................
+} // namespace sfx2
+//......................................................................................................................
diff --git a/sfx2/source/doc/docvor.cxx b/sfx2/source/doc/docvor.cxx
index 5ed19c9ced9e..425470219a2c 100644..100755
--- a/sfx2/source/doc/docvor.cxx
+++ b/sfx2/source/doc/docvor.cxx
@@ -63,7 +63,7 @@
#include "sfxtypes.hxx"
#include <sfx2/app.hxx>
#include <sfx2/dispatch.hxx>
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include "doc.hrc"
#include <sfx2/sfx.hrc>
#include "docvor.hrc"
@@ -78,7 +78,7 @@
#include <svl/svstdarr.hxx>
static const char cDelim = ':';
-BOOL SfxOrganizeListBox_Impl::bDropMoveOk = TRUE;
+sal_Bool SfxOrganizeListBox_Impl::bDropMoveOk = sal_True;
using namespace ::com::sun::star;
@@ -136,8 +136,8 @@ friend class SfxOrganizeListBox_Impl;
bool bExecDropFinished;
// save some variables for the asynchronous file dialog
- USHORT m_nRegion;
- USHORT m_nIndex;
+ sal_uInt16 m_nRegion;
+ sal_uInt16 m_nIndex;
String m_sExtension4Save;
SfxOrganizeListBox_Impl aLeftLb;
@@ -160,8 +160,8 @@ friend class SfxOrganizeListBox_Impl;
SvStringsDtor* GetAllFactoryURLs_Impl() const;
sal_Bool GetServiceName_Impl( String& rFactoryURL, String& rFileURL ) const;
- long Dispatch_Impl( USHORT nId, Menu* _pMenu );
- String GetPath_Impl( BOOL bOpen, const String& rFileName );
+ long Dispatch_Impl( sal_uInt16 nId, Menu* _pMenu );
+ String GetPath_Impl( sal_Bool bOpen, const String& rFileName );
::com::sun::star::uno::Sequence< ::rtl::OUString >
GetPaths_Impl( const String& rFileName );
void InitBitmaps( void );
@@ -179,7 +179,7 @@ friend class SfxOrganizeListBox_Impl;
DECL_LINK( ExportHdl, sfx2::FileDialogHelper* );
DECL_LINK( AddFilesHdl, sfx2::FileDialogHelper* );
- BOOL DontDelete_Impl( SvLBoxEntry* pEntry );
+ sal_Bool DontDelete_Impl( SvLBoxEntry* pEntry );
void OkHdl( Button* );
public:
@@ -298,8 +298,8 @@ SfxOrganizeDlg_Impl::SfxOrganizeDlg_Impl( SfxTemplateOrganizeDlg* pParent,
aLeftLb.Show();
aRightLb.Show();
- aLeftLb.SelectAll( FALSE );
- aRightLb.SelectAll( FALSE );
+ aLeftLb.SelectAll( sal_False );
+ aRightLb.SelectAll( sal_False );
aRightLb.GrabFocus();
}
@@ -325,8 +325,8 @@ void SfxOrganizeDlg_Impl::InitBitmaps( void )
//=========================================================================
-BOOL QueryDelete_Impl(Window *pParent, // Parent to QueryBox
- USHORT nId, // Resource Id
+sal_Bool QueryDelete_Impl(Window *pParent, // Parent to QueryBox
+ sal_uInt16 nId, // Resource Id
const String &rTemplateName) // Name of template to be deleted
/* [Description]
@@ -368,13 +368,13 @@ void ErrorDelete_Impl(Window *pParent, const String &rName, sal_Bool bFolder = s
/* [Description]
- Implementation class, the benchmark for USHORT-Array
+ Implementation class, the benchmark for sal_uInt16-Array
*/
struct ImpPath_Impl
{
SvUShorts aUS;
- USHORT nRef;
+ sal_uInt16 nRef;
ImpPath_Impl();
ImpPath_Impl( const ImpPath_Impl& rCopy );
@@ -390,13 +390,13 @@ ImpPath_Impl::ImpPath_Impl() : aUS(5), nRef(1)
ImpPath_Impl::ImpPath_Impl( const ImpPath_Impl& rCopy ) :
- aUS ( (BYTE)rCopy.aUS.Count() ),
+ aUS ( (sal_uInt8)rCopy.aUS.Count() ),
nRef( 1 )
{
- const USHORT nCount = rCopy.aUS.Count();
+ const sal_uInt16 nCount = rCopy.aUS.Count();
- for ( USHORT i = 0; i < nCount; ++i )
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
aUS.Insert( rCopy.aUS[i], i );
}
@@ -405,7 +405,7 @@ ImpPath_Impl::ImpPath_Impl( const ImpPath_Impl& rCopy ) :
/* [Description]
Implementation class, presentation of a position in the Outline-
- Listbox ass USHORT-Array, this describes the position of each as
+ Listbox ass sal_uInt16-Array, this describes the position of each as
Postions relative to the parent entry
*/
class Path
@@ -434,8 +434,8 @@ public:
if(!--pData->nRef)
delete pData;
}
- USHORT Count() const { return pData->aUS.Count(); }
- USHORT operator[]( USHORT i ) const
+ sal_uInt16 Count() const { return pData->aUS.Count(); }
+ sal_uInt16 operator[]( sal_uInt16 i ) const
{
return i < Count()? pData->aUS[i]: INDEX_IGNORE;
}
@@ -451,7 +451,7 @@ Path::Path(SvLBox *pBox, SvLBoxEntry *pEntry) :
return;
SvLBoxEntry *pParent = pBox->GetParent(pEntry);
do {
- pData->aUS.Insert((USHORT)pBox->GetModel()->GetRelPos(pEntry), 0);
+ pData->aUS.Insert((sal_uInt16)pBox->GetModel()->GetRelPos(pEntry), 0);
if(0 == pParent)
break;
pEntry = pParent;
@@ -463,8 +463,8 @@ Path::Path(SvLBox *pBox, SvLBoxEntry *pEntry) :
SvLBoxEntry *GetIndices_Impl(SvLBox *pBox,
SvLBoxEntry *pEntry,
- USHORT &rRegion,
- USHORT &rOffset)
+ sal_uInt16 &rRegion,
+ sal_uInt16 &rOffset)
/* [Description]
Region and position within a range for a template is determined.
@@ -473,9 +473,9 @@ SvLBoxEntry *GetIndices_Impl(SvLBox *pBox,
SvLBox *pBox Listbox where the event occurred
SvLBoxEntry *pEntry Entry whose position is to be determined
- USHORT &rRegion the region within the region of the
+ sal_uInt16 &rRegion the region within the region of the
document template (Out-Parameter)
- USHORT &rOffset the position within the region of the
+ sal_uInt16 &rOffset the position within the region of the
document template (Out-Parameter)
@@ -493,27 +493,30 @@ SvLBoxEntry *GetIndices_Impl(SvLBox *pBox,
}
if(0 == pBox->GetModel()->GetDepth(pEntry))
{
- rRegion = (USHORT)pBox->GetModel()->GetRelPos(pEntry);
+ rRegion = (sal_uInt16)pBox->GetModel()->GetRelPos(pEntry);
rOffset = USHRT_MAX;
return pEntry;
}
SvLBoxEntry *pParent = pBox->GetParent(pEntry);
- rRegion = (USHORT)pBox->GetModel()->GetRelPos(pParent);
- rOffset = (USHORT)pBox->GetModel()->GetRelPos(pEntry);
+ rRegion = (sal_uInt16)pBox->GetModel()->GetRelPos(pParent);
+ rOffset = (sal_uInt16)pBox->GetModel()->GetRelPos(pEntry);
return pEntry;
}
//-------------------------------------------------------------------------
-BOOL SfxOrganizeListBox_Impl::Select( SvLBoxEntry* pEntry, BOOL bSelect )
+sal_Bool SfxOrganizeListBox_Impl::Select( SvLBoxEntry* pEntry, sal_Bool bSelect )
{
if(!bSelect)
return SvTreeListBox::Select(pEntry,bSelect);
- USHORT nLevel = GetDocLevel();
+ sal_uInt16 nLevel = GetDocLevel();
if(GetModel()->GetDepth(pEntry)+nLevel<3)
return SvTreeListBox::Select(pEntry,bSelect);
Path aPath(this, pEntry);
+
+ // it is ok to use the SfxObjectShellRef here since the object that
+ // provides it ( GetObjectShell() calls CreateObjectShell() ) has a lock on it
GetObjectShell(aPath)->TriggerHelpPI(
aPath[nLevel+1], aPath[nLevel+2]);
return SvTreeListBox::Select(pEntry,bSelect);
@@ -521,12 +524,12 @@ BOOL SfxOrganizeListBox_Impl::Select( SvLBoxEntry* pEntry, BOOL bSelect )
//-------------------------------------------------------------------------
-BOOL SfxOrganizeListBox_Impl::MoveOrCopyTemplates(SvLBox *pSourceBox,
+sal_Bool SfxOrganizeListBox_Impl::MoveOrCopyTemplates(SvLBox *pSourceBox,
SvLBoxEntry *pSource,
SvLBoxEntry* pTarget,
SvLBoxEntry *&pNewParent,
- ULONG &rIdx,
- BOOL bCopy)
+ sal_uIntPtr &rIdx,
+ sal_Bool bCopy)
/* [Description]
Move or copy a document templates
@@ -538,11 +541,11 @@ BOOL SfxOrganizeListBox_Impl::MoveOrCopyTemplates(SvLBox *pSourceBox,
SvLBoxEntry *pSource Source entry, to be copied / moved
SvLBoxEntry *&pNewParent the parent of the target position generated
at entry (out parameter)
- ULONG &rIdx Index of the target entry
- BOOL bCopy Flag for Copy / Move
+ sal_uIntPtr &rIdx Index of the target entry
+ sal_Bool bCopy Flag for Copy / Move
- [Return value] BOOL: Success or failure
+ [Return value] sal_Bool: Success or failure
[Cross-references]
@@ -550,27 +553,27 @@ BOOL SfxOrganizeListBox_Impl::MoveOrCopyTemplates(SvLBox *pSourceBox,
SvLBoxEntry *pSource,
SvLBoxEntry* pTarget,
SvLBoxEntry *&pNewParent,
- ULONG &rIdx,
- BOOL bCopy)>
- <BOOL SfxOrganizeListBox_Impl::NotifyMoving(SvLBoxEntry *pTarget,
+ sal_uIntPtr &rIdx,
+ sal_Bool bCopy)>
+ <sal_Bool SfxOrganizeListBox_Impl::NotifyMoving(SvLBoxEntry *pTarget,
SvLBoxEntry* pSource,
SvLBoxEntry *&pNewParent,
- ULONG &rIdx)>
- <BOOL SfxOrganizeListBox_Impl::NotifyCopying(SvLBoxEntry *pTarget,
+ sal_uIntPtr &rIdx)>
+ <sal_Bool SfxOrganizeListBox_Impl::NotifyCopying(SvLBoxEntry *pTarget,
SvLBoxEntry* pSource,
SvLBoxEntry *&pNewParent,
- ULONG &rIdx)>
+ sal_uIntPtr &rIdx)>
*/
{
- BOOL bOk = FALSE;
+ sal_Bool bOk = sal_False;
if(pSource)
{
- USHORT nTargetRegion = 0, nTargetIndex = 0;
+ sal_uInt16 nTargetRegion = 0, nTargetIndex = 0;
GetIndices_Impl(this, pTarget, nTargetRegion, nTargetIndex);
- USHORT nSourceRegion = 0, nSourceIndex = 0;
+ sal_uInt16 nSourceRegion = 0, nSourceIndex = 0;
GetIndices_Impl(pSourceBox, pSource, nSourceRegion, nSourceIndex);
bOk = bCopy ?
@@ -612,12 +615,12 @@ BOOL SfxOrganizeListBox_Impl::MoveOrCopyTemplates(SvLBox *pSourceBox,
//-------------------------------------------------------------------------
-BOOL SfxOrganizeListBox_Impl::MoveOrCopyContents(SvLBox *pSourceBox,
+sal_Bool SfxOrganizeListBox_Impl::MoveOrCopyContents(SvLBox *pSourceBox,
SvLBoxEntry *pSource,
SvLBoxEntry* pTarget,
SvLBoxEntry *&pNewParent,
- ULONG &rIdx,
- BOOL bCopy)
+ sal_uIntPtr &rIdx,
+ sal_Bool bCopy)
/* [Description]
Move or copy document contents
@@ -629,11 +632,11 @@ BOOL SfxOrganizeListBox_Impl::MoveOrCopyContents(SvLBox *pSourceBox,
SvLBoxEntry *pSource Source entry, to be copied / moved
SvLBoxEntry *&pNewParent the parent of the target position generated
at entry (out parameter)
- ULONG &rIdx Index of the target entry
- BOOL bCopy Flag for Copy / Move
+ sal_uIntPtr &rIdx Index of the target entry
+ sal_Bool bCopy Flag for Copy / Move
- [Return value] BOOL: Success or failure
+ [Return value] sal_Bool: Success or failure
[Cross-references]
@@ -641,31 +644,33 @@ BOOL SfxOrganizeListBox_Impl::MoveOrCopyContents(SvLBox *pSourceBox,
SvLBoxEntry *pSource,
SvLBoxEntry* pTarget,
SvLBoxEntry *&pNewParent,
- ULONG &rIdx,
- BOOL bCopy)>
- <BOOL SfxOrganizeListBox_Impl::NotifyMoving(SvLBoxEntry *pTarget,
+ sal_uIntPtr &rIdx,
+ sal_Bool bCopy)>
+ <sal_Bool SfxOrganizeListBox_Impl::NotifyMoving(SvLBoxEntry *pTarget,
SvLBoxEntry* pSource,
SvLBoxEntry *&pNewParent,
- ULONG &rIdx)>
- <BOOL SfxOrganizeListBox_Impl::NotifyCopying(SvLBoxEntry *pTarget,
+ sal_uIntPtr &rIdx)>
+ <sal_Bool SfxOrganizeListBox_Impl::NotifyCopying(SvLBoxEntry *pTarget,
SvLBoxEntry* pSource,
SvLBoxEntry *&pNewParent,
- ULONG &rIdx)>
+ sal_uIntPtr &rIdx)>
*/
{
SfxErrorContext aEc( ERRCTX_SFX_MOVEORCOPYCONTENTS, this);
- BOOL bOk = FALSE, bKeepExpansion = FALSE;
- BOOL bRemovedFromSource = FALSE;
+ sal_Bool bOk = sal_False, bKeepExpansion = sal_False;
+ sal_Bool bRemovedFromSource = sal_False;
Path aSource(pSourceBox, pSource);
Path aTarget(this, pTarget);
- SfxObjectShellRef aSourceDoc =
- ((SfxOrganizeListBox_Impl *)pSourceBox)->GetObjectShell(aSource);
+ // it is ok to use the SfxObjectShellRef here since the object that
+ // provides it ( GetObjectShell() calls CreateObjectShell() ) has a lock on it
+ SfxObjectShellRef aSourceDoc = ((SfxOrganizeListBox_Impl *)pSourceBox)->GetObjectShell(aSource);
SfxObjectShellRef aTargetDoc = GetObjectShell(aTarget);
- const USHORT nSLevel =
+
+ const sal_uInt16 nSLevel =
((SfxOrganizeListBox_Impl *)pSourceBox)->GetDocLevel();
- const USHORT nTLevel = GetDocLevel();
+ const sal_uInt16 nTLevel = GetDocLevel();
if(aSourceDoc.Is() && aTargetDoc.Is())
{
@@ -676,8 +681,8 @@ BOOL SfxOrganizeListBox_Impl::MoveOrCopyContents(SvLBox *pSourceBox,
if (aTargetDoc->GetStyleSheetPool())
aTargetDoc->GetStyleSheetPool()->SetSearchMask(
SFX_STYLE_FAMILY_ALL, SFXSTYLEBIT_USERDEF | SFXSTYLEBIT_USED);
- USHORT p[3];
- USHORT nIdxDeleted = INDEX_IGNORE;
+ sal_uInt16 p[3];
+ sal_uInt16 nIdxDeleted = INDEX_IGNORE;
p[0]=aTarget[nTLevel+1];
p[1]=aTarget[nTLevel+2];
if(p[1]!=INDEX_IGNORE)p[1]++;
@@ -704,12 +709,12 @@ BOOL SfxOrganizeListBox_Impl::MoveOrCopyContents(SvLBox *pSourceBox,
RequestingChilds(pParentIter);
SvLBoxEntry *pChildIter = 0;
- USHORT i = 0;
+ sal_uInt16 i = 0;
while(i < 2 && p[i+1] != INDEX_IGNORE)
{
pChildIter = FirstChild(pParentIter);
// To the index of the current level
- for(USHORT j = 0; j < p[i]; ++j)
+ for(sal_uInt16 j = 0; j < p[i]; ++j)
pChildIter = NextSibling(pChildIter);
// If possible, fill in Items onDemand
++i;
@@ -725,7 +730,7 @@ BOOL SfxOrganizeListBox_Impl::MoveOrCopyContents(SvLBox *pSourceBox,
pNewParent->HasChildsOnDemand() &&
!GetModel()->HasChilds(pNewParent))
{
- bOk = FALSE;
+ bOk = sal_False;
if(!bCopy)
pSourceBox->GetModel()->Remove(pSource);
}
@@ -734,7 +739,7 @@ BOOL SfxOrganizeListBox_Impl::MoveOrCopyContents(SvLBox *pSourceBox,
if(nIdxDeleted != INDEX_IGNORE)
{
pChildIter = FirstChild(pParentIter);
- for(USHORT j = 0; j < nIdxDeleted; ++j)
+ for(sal_uInt16 j = 0; j < nIdxDeleted; ++j)
pChildIter = NextSibling(pChildIter);
if( pChildIter && pChildIter != pSource )
{
@@ -742,7 +747,7 @@ BOOL SfxOrganizeListBox_Impl::MoveOrCopyContents(SvLBox *pSourceBox,
GetModel()->Remove(pChildIter);
}
else
- bOk = FALSE;
+ bOk = sal_False;
}
if(!bCopy && &aSourceDoc != &aTargetDoc)
{
@@ -756,15 +761,15 @@ BOOL SfxOrganizeListBox_Impl::MoveOrCopyContents(SvLBox *pSourceBox,
}
}
return (((rIdx != INDEX_IGNORE)|| bRemovedFromSource) && bOk )
- ? bKeepExpansion? (BOOL)2: TRUE: FALSE;
+ ? bKeepExpansion? (sal_Bool)2: sal_True: sal_False;
}
//-------------------------------------------------------------------------
-BOOL SfxOrganizeListBox_Impl::NotifyMoving(SvLBoxEntry *pTarget,
+sal_Bool SfxOrganizeListBox_Impl::NotifyMoving(SvLBoxEntry *pTarget,
SvLBoxEntry* pSource,
SvLBoxEntry *&pNewParent,
- ULONG &rIdx)
+ sal_uIntPtr &rIdx)
/* [Description]
@@ -777,10 +782,10 @@ BOOL SfxOrganizeListBox_Impl::NotifyMoving(SvLBoxEntry *pTarget,
SvLBoxEntry *pSource Source entry, to be moved
SvLBoxEntry *&pNewParent the parent of the target position generated
at entry (out parameter)
- ULONG &rIdx Index of the target entry
+ sal_uIntPtr &rIdx Index of the target entry
- [Return value] BOOL: Sucess or failure
+ [Return value] sal_Bool: Sucess or failure
[Cross-references]
@@ -788,22 +793,22 @@ BOOL SfxOrganizeListBox_Impl::NotifyMoving(SvLBoxEntry *pTarget,
SvLBoxEntry *pSource,
SvLBoxEntry* pTarget,
SvLBoxEntry *&pNewParent,
- ULONG &rIdx,
- BOOL bCopy)>
+ sal_uIntPtr &rIdx,
+ sal_Bool bCopy)>
<SfxOrganizeListBox_Impl::MoveOrCopyContents(SvLBox *pSourceBox,
SvLBoxEntry *pSource,
SvLBoxEntry* pTarget,
SvLBoxEntry *&pNewParent,
- ULONG &rIdx,
- BOOL bCopy)>
- <BOOL SfxOrganizeListBox_Impl::NotifyCopying(SvLBoxEntry *pTarget,
+ sal_uIntPtr &rIdx,
+ sal_Bool bCopy)>
+ <sal_Bool SfxOrganizeListBox_Impl::NotifyCopying(SvLBoxEntry *pTarget,
SvLBoxEntry* pSource,
SvLBoxEntry *&pNewParent,
- ULONG &rIdx)>
+ sal_uIntPtr &rIdx)>
*/
{
- BOOL bOk = FALSE;
+ sal_Bool bOk = sal_False;
SvLBox* pSourceBox = GetSourceView();
if ( !pSourceBox )
pSourceBox = pDlg->pSourceView;
@@ -813,19 +818,19 @@ BOOL SfxOrganizeListBox_Impl::NotifyMoving(SvLBoxEntry *pTarget,
if ( pSourceBox->GetModel()->GetDepth( pSource ) <= GetDocLevel() &&
GetModel()->GetDepth( pTarget ) <= GetDocLevel() )
- bOk = MoveOrCopyTemplates( pSourceBox, pSource, pTarget, pNewParent, rIdx, FALSE );
+ bOk = MoveOrCopyTemplates( pSourceBox, pSource, pTarget, pNewParent, rIdx, sal_False );
else
- bOk = MoveOrCopyContents(pSourceBox, pSource, pTarget, pNewParent, rIdx, FALSE );
+ bOk = MoveOrCopyContents(pSourceBox, pSource, pTarget, pNewParent, rIdx, sal_False );
return bOk;
}
//-------------------------------------------------------------------------
-BOOL SfxOrganizeListBox_Impl::NotifyCopying(SvLBoxEntry *pTarget,
+sal_Bool SfxOrganizeListBox_Impl::NotifyCopying(SvLBoxEntry *pTarget,
SvLBoxEntry* pSource,
SvLBoxEntry *&pNewParent,
- ULONG &rIdx)
+ sal_uIntPtr &rIdx)
/* [Description]
Notification that an item will be moved.
@@ -837,9 +842,9 @@ BOOL SfxOrganizeListBox_Impl::NotifyCopying(SvLBoxEntry *pTarget,
SvLBoxEntry *pSource Source entry, to be copied
SvLBoxEntry *&pNewParent the parent of the target position generated
at entry (out parameter)
- ULONG &rIdx Index of the target entry
+ sal_uIntPtr &rIdx Index of the target entry
- [Return value] BOOL: Sucess or failure
+ [Return value] sal_Bool: Sucess or failure
[Cross-references]
@@ -847,21 +852,21 @@ BOOL SfxOrganizeListBox_Impl::NotifyCopying(SvLBoxEntry *pTarget,
SvLBoxEntry *pSource,
SvLBoxEntry* pTarget,
SvLBoxEntry *&pNewParent,
- ULONG &rIdx,
- BOOL bCopy)>
+ sal_uIntPtr &rIdx,
+ sal_Bool bCopy)>
<SfxOrganizeListBox_Impl::MoveOrCopyContents(SvLBox *pSourceBox,
SvLBoxEntry *pSource,
SvLBoxEntry* pTarget,
SvLBoxEntry *&pNewParent,
- ULONG &rIdx,
- BOOL bCopy)>
- <BOOL SfxOrganizeListBox_Impl::NotifyMoving(SvLBoxEntry *pTarget,
+ sal_uIntPtr &rIdx,
+ sal_Bool bCopy)>
+ <sal_Bool SfxOrganizeListBox_Impl::NotifyMoving(SvLBoxEntry *pTarget,
SvLBoxEntry* pSource,
SvLBoxEntry *&pNewParent,
- ULONG &rIdx)>
+ sal_uIntPtr &rIdx)>
*/
{
- BOOL bOk = FALSE;
+ sal_Bool bOk = sal_False;
SvLBox* pSourceBox = GetSourceView();
if ( !pSourceBox )
pSourceBox = pDlg->pSourceView;
@@ -870,16 +875,16 @@ BOOL SfxOrganizeListBox_Impl::NotifyCopying(SvLBoxEntry *pTarget,
pTarget = pDlg->pTargetEntry;
if ( pSourceBox->GetModel()->GetDepth( pSource ) <= GetDocLevel() &&
GetModel()->GetDepth( pTarget ) <= GetDocLevel() )
- bOk = MoveOrCopyTemplates( pSourceBox, pSource, pTarget, pNewParent, rIdx, TRUE );
+ bOk = MoveOrCopyTemplates( pSourceBox, pSource, pTarget, pNewParent, rIdx, sal_True );
else
- bOk = MoveOrCopyContents( pSourceBox, pSource, pTarget, pNewParent, rIdx, TRUE );
+ bOk = MoveOrCopyContents( pSourceBox, pSource, pTarget, pNewParent, rIdx, sal_True );
return bOk;
}
//-------------------------------------------------------------------------
-BOOL SfxOrganizeListBox_Impl::EditingEntry( SvLBoxEntry* pEntry, Selection& )
+sal_Bool SfxOrganizeListBox_Impl::EditingEntry( SvLBoxEntry* pEntry, Selection& )
/* [Description]
@@ -895,14 +900,14 @@ BOOL SfxOrganizeListBox_Impl::EditingEntry( SvLBoxEntry* pEntry, Selection& )
GetModel()->GetDepth(pEntry) < 2 )
{
pDlg->pSuspend = new SuspendAccel( &pDlg->aEditAcc );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
//-------------------------------------------------------------------------
-BOOL SfxOrganizeListBox_Impl::EditedEntry(SvLBoxEntry* pEntry, const String& rText)
+sal_Bool SfxOrganizeListBox_Impl::EditedEntry(SvLBoxEntry* pEntry, const String& rText)
/* [Description]
@@ -912,8 +917,8 @@ BOOL SfxOrganizeListBox_Impl::EditedEntry(SvLBoxEntry* pEntry, const String& rTe
[Return value]
- BOOL TRUE: The name in the display should be changed
- FALSE: The name should not be changed
+ sal_Bool sal_True: The name in the display should be changed
+ sal_False: The name should not be changed
[Cross-references]
<SfxOrganizeListBox_Impl::EditingEntry(SvLBoxEntry* pEntry, const String& rText)>
@@ -929,16 +934,16 @@ BOOL SfxOrganizeListBox_Impl::EditedEntry(SvLBoxEntry* pEntry, const String& rTe
ErrorBox aBox( this, SfxResId( MSG_ERROR_EMPTY_NAME ) );
aBox.GrabFocus();
aBox.Execute();
- return FALSE;
+ return sal_False;
}
if ( !IsUniqName_Impl( rText, pParent, pEntry ) )
{
ErrorBox aBox( this, SfxResId( MSG_ERROR_UNIQ_NAME ) );
aBox.GrabFocus();
aBox.Execute();
- return FALSE;
+ return sal_False;
}
- USHORT nRegion = 0, nIndex = 0;
+ sal_uInt16 nRegion = 0, nIndex = 0;
GetIndices_Impl( this, pEntry, nRegion, nIndex );
String aOldName;
if ( USHRT_MAX != nIndex )
@@ -951,47 +956,47 @@ BOOL SfxOrganizeListBox_Impl::EditedEntry(SvLBoxEntry* pEntry, const String& rTe
SfxResId aResId( USHRT_MAX != nIndex ? MSG_ERROR_RENAME_TEMPLATE
: MSG_ERROR_RENAME_TEMPLATE_REGION );
ErrorBox( this, aResId ).Execute();
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
//-------------------------------------------------------------------------
DragDropMode SfxOrganizeListBox_Impl::NotifyStartDrag( TransferDataContainer&, SvLBoxEntry* pEntry )
{
- USHORT nSourceLevel = GetModel()->GetDepth( pEntry );
+ sal_uInt16 nSourceLevel = GetModel()->GetDepth( pEntry );
if ( VIEW_FILES == GetViewType() )
++nSourceLevel;
if ( nSourceLevel >= 2 )
- bDropMoveOk = FALSE;
+ bDropMoveOk = sal_False;
else
- bDropMoveOk = TRUE;
+ bDropMoveOk = sal_True;
return GetDragDropMode();
}
//-------------------------------------------------------------------------
-BOOL SfxOrganizeListBox_Impl::NotifyAcceptDrop( SvLBoxEntry* pEntry )
+sal_Bool SfxOrganizeListBox_Impl::NotifyAcceptDrop( SvLBoxEntry* pEntry )
{
if(!pEntry)
- return FALSE;
+ return sal_False;
SvLBox *pSource = GetSourceView();
SvLBoxEntry *pSourceEntry = pSource->FirstSelected();
if(pEntry == pSourceEntry)
- return FALSE;
- USHORT nSourceLevel = pSource->GetModel()->GetDepth(pSourceEntry);
+ return sal_False;
+ sal_uInt16 nSourceLevel = pSource->GetModel()->GetDepth(pSourceEntry);
if(VIEW_FILES == ((SfxOrganizeListBox_Impl *)pSource)->GetViewType())
++nSourceLevel;
- USHORT nTargetLevel = GetModel()->GetDepth(pEntry);
+ sal_uInt16 nTargetLevel = GetModel()->GetDepth(pEntry);
if(VIEW_FILES == GetViewType())
++nTargetLevel;
Path aSource(pSource, pSourceEntry);
Path aTarget(this, pEntry);
- const USHORT SL = ((SfxOrganizeListBox_Impl *)pSource)->GetDocLevel();
- const USHORT TL = GetDocLevel();
+ const sal_uInt16 SL = ((SfxOrganizeListBox_Impl *)pSource)->GetDocLevel();
+ const sal_uInt16 TL = GetDocLevel();
return( (nSourceLevel == 1 && nTargetLevel == 0 &&
VIEW_TEMPLATES ==
@@ -1030,7 +1035,7 @@ sal_Int8 SfxOrganizeListBox_Impl::ExecuteDrop( const ExecuteDropEvent& rEvt )
{
TransferableDataHelper aHelper( rEvt.maDropEvent.Transferable );
sal_uInt32 nFormatCount = aHelper.GetFormatCount();
- BOOL bSuccess = FALSE;
+ sal_Bool bSuccess = sal_False;
for ( sal_uInt32 i = 0; i < nFormatCount; ++i )
{
String aFileName;
@@ -1042,7 +1047,7 @@ sal_Int8 SfxOrganizeListBox_Impl::ExecuteDrop( const ExecuteDropEvent& rEvt )
bSuccess |= pMgr->InsertFile( this, aObj.GetMainURL(INetURLObject::DECODE_TO_IURI) );
}
}
- bDropMoveOk = TRUE;
+ bDropMoveOk = sal_True;
sal_Int8 nRet = rEvt.mnAction;
if ( !bSuccess )
{
@@ -1075,7 +1080,7 @@ void SfxOrganizeListBox_Impl::DragFinished( sal_Int8 nDropAction )
//-------------------------------------------------------------------------
-inline USHORT SfxOrganizeListBox_Impl::GetDocLevel() const
+inline sal_uInt16 SfxOrganizeListBox_Impl::GetDocLevel() const
/* [Description]
@@ -1084,7 +1089,7 @@ inline USHORT SfxOrganizeListBox_Impl::GetDocLevel() const
[Return value]
- USHORT Document level
+ sal_uInt16 Document level
*/
@@ -1150,19 +1155,22 @@ void SfxOrganizeListBox_Impl::RequestingChilds( SvLBoxEntry* pEntry )
SfxErrorContext aEc(ERRCTX_SFX_CREATEOBJSH, pDlg->pDialog);
if(VIEW_TEMPLATES == GetViewType() && 0 == GetModel()->GetDepth(pEntry))
{
- USHORT i = (USHORT)GetModel()->GetRelPos(pEntry);
- const USHORT nEntryCount = pMgr->GetTemplates()->GetCount(i);
- for(USHORT j = 0; j < nEntryCount; ++j)
- InsertEntryByBmpType( pMgr->GetTemplates()->GetName( i, j ), BMPTYPE_DOC, pEntry, TRUE );
+ sal_uInt16 i = (sal_uInt16)GetModel()->GetRelPos(pEntry);
+ const sal_uInt16 nEntryCount = pMgr->GetTemplates()->GetCount(i);
+ for(sal_uInt16 j = 0; j < nEntryCount; ++j)
+ InsertEntryByBmpType( pMgr->GetTemplates()->GetName( i, j ), BMPTYPE_DOC, pEntry, sal_True );
}
else
{
- const USHORT nDocLevel = GetDocLevel();
+ const sal_uInt16 nDocLevel = GetDocLevel();
Path aPath(this, pEntry);
+
+ // it is ok to use the SfxObjectShellRef here since the object that
+ // provides it ( GetObjectShell() calls CreateObjectShell() ) has a lock on it
SfxObjectShellRef aRef = GetObjectShell(aPath);
if(aRef.Is())
{
- const USHORT nCount = aRef->GetContentCount(aPath[nDocLevel+1]);
+ const sal_uInt16 nCount = aRef->GetContentCount(aPath[nDocLevel+1]);
String aText;
Bitmap aClosedBmp, aOpenedBmp;
const bool bCanHaveChilds =
@@ -1204,7 +1212,7 @@ long SfxOrganizeListBox_Impl::ExpandingHdl()
if ( !(nImpFlags & SVLBOX_IS_EXPANDING) )
{
SvLBoxEntry* pEntry = GetHdlEntry();
- const USHORT nLevel = GetModel()->GetDepth(pEntry);
+ const sal_uInt16 nLevel = GetModel()->GetDepth(pEntry);
if((eViewType == VIEW_FILES && nLevel == 0) ||
(eViewType == VIEW_TEMPLATES && nLevel == 1))
{
@@ -1223,12 +1231,12 @@ long SfxOrganizeListBox_Impl::ExpandingHdl()
}
}
}
- return TRUE;
+ return sal_True;
}
//-------------------------------------------------------------------------
-BOOL SfxOrganizeListBox_Impl::IsUniqName_Impl(const String &rText,
+sal_Bool SfxOrganizeListBox_Impl::IsUniqName_Impl(const String &rText,
SvLBoxEntry* pParent, SvLBoxEntry *pEntry) const
/* [Description]
@@ -1242,7 +1250,7 @@ BOOL SfxOrganizeListBox_Impl::IsUniqName_Impl(const String &rText,
[Return value]
- BOOL TRUE, if the name is unique, otherwise FALSE
+ sal_Bool sal_True, if the name is unique, otherwise sal_False
*/
{
@@ -1250,18 +1258,18 @@ BOOL SfxOrganizeListBox_Impl::IsUniqName_Impl(const String &rText,
while(pChild) {
const String aEntryText(GetEntryText(pChild));
if(COMPARE_EQUAL == aEntryText.CompareIgnoreCaseToAscii(rText)&&(!pEntry || pEntry!=pChild))
- return FALSE;
+ return sal_False;
pChild = NextSibling(pChild);
}
- return TRUE;
+ return sal_True;
}
//-------------------------------------------------------------------------
-USHORT SfxOrganizeListBox_Impl::GetLevelCount_Impl(SvLBoxEntry* pParent) const
+sal_uInt16 SfxOrganizeListBox_Impl::GetLevelCount_Impl(SvLBoxEntry* pParent) const
{
SvLBoxEntry* pChild = FirstChild(pParent);
- USHORT nCount = 0;
+ sal_uInt16 nCount = 0;
while(pChild) {
pChild = NextSibling(pChild);
++nCount;
@@ -1275,8 +1283,8 @@ SvLBoxEntry* SfxOrganizeListBox_Impl::InsertEntryByBmpType(
const XubString& rText,
BMPTYPE eBmpType,
SvLBoxEntry* pParent,
- BOOL bChildsOnDemand,
- ULONG nPos,
+ sal_Bool bChildsOnDemand,
+ sal_uIntPtr nPos,
void* pUserData
)
{
@@ -1378,30 +1386,30 @@ void SfxOrganizeListBox_Impl::Reset()
{
DBG_ASSERT( pMgr != 0, "No Manager" );
// Delete contents
- SetUpdateMode(FALSE);
+ SetUpdateMode(sal_False);
Clear();
if ( VIEW_TEMPLATES == eViewType )
{
- const USHORT nCount = pMgr->GetTemplates()->GetRegionCount();
- for ( USHORT i = 0; i < nCount; ++i )
- InsertEntryByBmpType( pMgr->GetTemplates()->GetFullRegionName(i), BMPTYPE_FOLDER, 0, TRUE );
+ const sal_uInt16 nCount = pMgr->GetTemplates()->GetRegionCount();
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
+ InsertEntryByBmpType( pMgr->GetTemplates()->GetFullRegionName(i), BMPTYPE_FOLDER, 0, sal_True );
}
else
{
const SfxObjectList& rList = pMgr->GetObjectList();
- const USHORT nCount = rList.Count();
- for ( USHORT i = 0; i < nCount; ++i )
- InsertEntryByBmpType( rList.GetBaseName(i), BMPTYPE_DOC, 0, TRUE );
+ const sal_uInt16 nCount = rList.Count();
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
+ InsertEntryByBmpType( rList.GetBaseName(i), BMPTYPE_DOC, 0, sal_True );
}
- SetUpdateMode(TRUE);
+ SetUpdateMode(sal_True);
Invalidate();
Update();
}
//-------------------------------------------------------------------------
-const Image &SfxOrganizeListBox_Impl::GetClosedBmp(USHORT nLevel) const
+const Image &SfxOrganizeListBox_Impl::GetClosedBmp(sal_uInt16 nLevel) const
/* [Description]
@@ -1409,7 +1417,7 @@ const Image &SfxOrganizeListBox_Impl::GetClosedBmp(USHORT nLevel) const
[Parameter]
- USHORT nLevel Indicator of the level, 2 levels are allowed
+ sal_uInt16 nLevel Indicator of the level, 2 levels are allowed
[Return value]
@@ -1434,7 +1442,7 @@ const Image &SfxOrganizeListBox_Impl::GetClosedBmp(USHORT nLevel) const
//-------------------------------------------------------------------------
-const Image &SfxOrganizeListBox_Impl::GetOpenedBmp(USHORT nLevel) const
+const Image &SfxOrganizeListBox_Impl::GetOpenedBmp(sal_uInt16 nLevel) const
/* [Description]
@@ -1442,7 +1450,7 @@ const Image &SfxOrganizeListBox_Impl::GetOpenedBmp(USHORT nLevel) const
[Parameter]
- USHORT nLevel Indicator of the level, 2 levels are allowed
+ sal_uInt16 nLevel Indicator of the level, 2 levels are allowed
[Return value]
@@ -1475,7 +1483,7 @@ PopupMenu* SfxOrganizeListBox_Impl::CreateContextMenu()
//-------------------------------------------------------------------------
-String SfxOrganizeDlg_Impl::GetPath_Impl( BOOL bOpen, const String& rFileName )
+String SfxOrganizeDlg_Impl::GetPath_Impl( sal_Bool bOpen, const String& rFileName )
/* [Description]
@@ -1483,7 +1491,7 @@ String SfxOrganizeDlg_Impl::GetPath_Impl( BOOL bOpen, const String& rFileName )
[Parameter]
- BOOL bOpen Flag: Open / Save
+ sal_Bool bOpen Flag: Open / Save
const String& rFileName Current file name as default
[Return value] File name with path or empty string if
@@ -1664,9 +1672,9 @@ String SfxOrganizeDlg_Impl::GetPath_Impl( BOOL bOpen, const String& rFileName )
//-------------------------------------------------------------------------
-BOOL SfxOrganizeDlg_Impl::DontDelete_Impl( SvLBoxEntry* pEntry )
+sal_Bool SfxOrganizeDlg_Impl::DontDelete_Impl( SvLBoxEntry* pEntry )
{
- USHORT nDepth = pFocusBox->GetModel()->GetDepth(pEntry);
+ sal_uInt16 nDepth = pFocusBox->GetModel()->GetDepth(pEntry);
if(SfxOrganizeListBox_Impl::VIEW_FILES ==
pFocusBox->GetViewType())
nDepth++;
@@ -1678,16 +1686,16 @@ BOOL SfxOrganizeDlg_Impl::DontDelete_Impl( SvLBoxEntry* pEntry )
(0 == nDepth && pFocusBox->GetLevelCount_Impl(0) < 2))
//At least keep one template
{
- return TRUE;
+ return sal_True;
}
- USHORT nRegion = 0, nIndex = 0;
+ sal_uInt16 nRegion = 0, nIndex = 0;
GetIndices_Impl( pFocusBox, pEntry, nRegion, nIndex );
const SfxDocumentTemplates* pTemplates = aMgr.GetTemplates();
if ( !pTemplates || !pTemplates->HasUserContents( nRegion, nIndex ) )
- return TRUE;
+ return sal_True;
- return FALSE;
+ return sal_False;
}
SvStringsDtor* SfxOrganizeDlg_Impl::GetAllFactoryURLs_Impl( ) const
@@ -1715,7 +1723,7 @@ sal_Bool SfxOrganizeDlg_Impl::GetServiceName_Impl( String& rName, String& rFileU
sal_Bool bRet = sal_False;
const SfxDocumentTemplates* pTemplates = aMgr.GetTemplates();
SvLBoxEntry* pEntry = pFocusBox ? pFocusBox->FirstSelected() : NULL;
- USHORT nRegion = 0, nIndex = 0;
+ sal_uInt16 nRegion = 0, nIndex = 0;
GetIndices_Impl( pFocusBox, pEntry, nRegion, nIndex );
rFileURL = pTemplates->GetPath( nRegion, nIndex );
if ( rFileURL.Len() > 0 )
@@ -1725,13 +1733,13 @@ sal_Bool SfxOrganizeDlg_Impl::GetServiceName_Impl( String& rName, String& rFileU
uno::Reference< embed::XStorage > xStorage = ::comphelper::OStorageHelper::GetStorageFromURL(
rFileURL,
embed::ElementModes::READ );
- ULONG nFormat = SotStorage::GetFormatID( xStorage );
+ sal_uIntPtr nFormat = SotStorage::GetFormatID( xStorage );
const SfxFilter* pFilter =
SFX_APP()->GetFilterMatcher().GetFilter4ClipBoardId( nFormat );
if ( pFilter )
{
rName = pFilter->GetServiceName();
- bRet = TRUE;
+ bRet = sal_True;
}
}
catch( uno::Exception& )
@@ -1741,7 +1749,7 @@ sal_Bool SfxOrganizeDlg_Impl::GetServiceName_Impl( String& rName, String& rFileU
return bRet;
}
-long SfxOrganizeDlg_Impl::Dispatch_Impl( USHORT nId, Menu* _pMenu )
+long SfxOrganizeDlg_Impl::Dispatch_Impl( sal_uInt16 nId, Menu* _pMenu )
/* [Description]
@@ -1749,7 +1757,7 @@ long SfxOrganizeDlg_Impl::Dispatch_Impl( USHORT nId, Menu* _pMenu )
[Parameter]
- USHORT nId Event ID
+ sal_uInt16 nId Event ID
[Return value] 1: Event has been processed,
0: Event has not been processed (SV-Menu)
@@ -1772,14 +1780,14 @@ long SfxOrganizeDlg_Impl::Dispatch_Impl( USHORT nId, Menu* _pMenu )
const String aNoName( SfxResId(STR_NONAME) );
SvLBoxEntry* pParent = pFocusBox->GetParent(pEntry);
String aName(aNoName);
- USHORT n = 1;
+ sal_uInt16 n = 1;
while(!pFocusBox->IsUniqName_Impl(aName, pParent))
{
aName = aNoName;
aName += String::CreateFromInt32( n++ );
}
aMgr.InsertDir( pFocusBox, aName,
- (USHORT)pFocusBox->GetModel()->GetRelPos(pEntry)+1);
+ (sal_uInt16)pFocusBox->GetModel()->GetRelPos(pEntry)+1);
}
}
break;
@@ -1789,13 +1797,13 @@ long SfxOrganizeDlg_Impl::Dispatch_Impl( USHORT nId, Menu* _pMenu )
{
if(!pEntry || DontDelete_Impl(pEntry))
return 1;
- const USHORT nDepth = pFocusBox->GetModel()->GetDepth(pEntry);
+ const sal_uInt16 nDepth = pFocusBox->GetModel()->GetDepth(pEntry);
if(nDepth < 2)
{
if(0 == nDepth && pFocusBox->GetLevelCount_Impl(0) < 2) return 1;
if(SfxOrganizeListBox_Impl::VIEW_TEMPLATES == pFocusBox->GetViewType())
{
- USHORT nResId = nDepth? STR_DELETE_TEMPLATE :
+ sal_uInt16 nResId = nDepth? STR_DELETE_TEMPLATE :
STR_DELETE_REGION;
if( !QueryDelete_Impl(
pDialog, nResId, pFocusBox->GetEntryText(pEntry)))
@@ -1807,10 +1815,10 @@ long SfxOrganizeDlg_Impl::Dispatch_Impl( USHORT nId, Menu* _pMenu )
if(RET_NO == aQBox.Execute())
return 1;
}
- USHORT nRegion = 0, nIndex = 0;
+ sal_uInt16 nRegion = 0, nIndex = 0;
GetIndices_Impl(pFocusBox, pEntry, nRegion, nIndex);
- USHORT nDeleteInd = ( STR_DELETE_REGION == nResId? USHRT_MAX: nIndex );
+ sal_uInt16 nDeleteInd = ( STR_DELETE_REGION == nResId? USHRT_MAX: nIndex );
if ( !aMgr.Delete( pFocusBox, nRegion, nDeleteInd ) )
ErrorDelete_Impl(
pDialog,
@@ -1824,6 +1832,9 @@ long SfxOrganizeDlg_Impl::Dispatch_Impl( USHORT nId, Menu* _pMenu )
if(!QueryDelete_Impl(pDialog, STR_DELETE_TEMPLATE, pFocusBox->GetEntryText(pEntry)))
return 1;
Path aPath(pFocusBox, pEntry);
+
+ // it is ok to use the SfxObjectShellRef here since the object that
+ // provides it ( GetObjectShell() calls CreateObjectShell() ) has a lock on it
SfxObjectShellRef aRef = pFocusBox->GetObjectShell(aPath);
if(aRef.Is() &&
aRef->Remove(aPath[1+pFocusBox->GetDocLevel()],
@@ -1840,7 +1851,7 @@ long SfxOrganizeDlg_Impl::Dispatch_Impl( USHORT nId, Menu* _pMenu )
{
if(!pEntry)
return 1;
- USHORT nRegion = 0, nIndex = 0;
+ sal_uInt16 nRegion = 0, nIndex = 0;
GetIndices_Impl( pFocusBox, pEntry, nRegion, nIndex );
const SfxStringItem aName( SID_FILE_NAME, aMgr.GetTemplates()->GetPath( nRegion, nIndex ) );
const SfxStringItem aLongName( SID_FILE_LONGNAME, pFocusBox->GetEntryText( pEntry ) );
@@ -1872,7 +1883,7 @@ long SfxOrganizeDlg_Impl::Dispatch_Impl( USHORT nId, Menu* _pMenu )
m_nRegion = 0;
m_nIndex = 0;
GetIndices_Impl( pFocusBox, pEntry, m_nRegion, m_nIndex );
- GetPath_Impl( FALSE, aMgr.GetTemplates()->GetFileName( m_nRegion, m_nIndex ) );
+ GetPath_Impl( sal_False, aMgr.GetTemplates()->GetFileName( m_nRegion, m_nIndex ) );
break;
}
@@ -1890,10 +1901,13 @@ long SfxOrganizeDlg_Impl::Dispatch_Impl( USHORT nId, Menu* _pMenu )
if ( !pEntry )
return 1;
Path aPath( pFocusBox, pEntry );
+
+ // it is ok to use the SfxObjectShellRef here since the object that
+ // provides it ( GetObjectShell() calls CreateObjectShell() ) has a lock on it
SfxObjectShellRef aRef = pFocusBox->GetObjectShell( aPath );
if ( aRef.Is() )
{
- const USHORT nDocLevel = pFocusBox->GetDocLevel();
+ const sal_uInt16 nDocLevel = pFocusBox->GetDocLevel();
if ( !pPrt )
pPrt = new Printer;
SvLBoxEntry *pDocEntry = pEntry;
@@ -1992,7 +2006,7 @@ IMPL_LINK( SfxOrganizeDlg_Impl, AccelSelect_Impl, Accelerator *, pAccel )
void SfxOrganizeDlg_Impl::OkHdl(Button *pButton)
{
if(pFocusBox && pFocusBox->IsEditingActive())
- pFocusBox->EndEditing(FALSE);
+ pFocusBox->EndEditing(sal_False);
pButton->Click();
}
@@ -2013,12 +2027,12 @@ IMPL_LINK( SfxOrganizeDlg_Impl, MenuActivate_Impl, Menu *, pMenu )
*/
{
if ( pFocusBox && pFocusBox->IsEditingActive() )
- pFocusBox->EndEditing( FALSE );
- BOOL bEnable = ( pFocusBox && pFocusBox->GetSelectionCount() );
+ pFocusBox->EndEditing( sal_False );
+ sal_Bool bEnable = ( pFocusBox && pFocusBox->GetSelectionCount() );
SvLBoxEntry* pEntry = bEnable ? pFocusBox->FirstSelected() : NULL;
- const USHORT nDepth =
+ const sal_uInt16 nDepth =
( bEnable && pFocusBox->GetSelectionCount() ) ? pFocusBox->GetModel()->GetDepth( pEntry ) : 0;
- const USHORT nDocLevel = bEnable ? pFocusBox->GetDocLevel() : 0;
+ const sal_uInt16 nDocLevel = bEnable ? pFocusBox->GetDocLevel() : 0;
int eVT = pFocusBox ? pFocusBox->GetViewType() : 0;
// Create only Template
pMenu->EnableItem( ID_NEW, bEnable && 0 == nDepth && SfxOrganizeListBox_Impl::VIEW_TEMPLATES == eVT );
@@ -2039,14 +2053,14 @@ IMPL_LINK( SfxOrganizeDlg_Impl, MenuActivate_Impl, Menu *, pMenu )
pMenu->EnableItem( ID_RESCAN,
SfxOrganizeListBox_Impl::VIEW_TEMPLATES == aRightLb.GetViewType() ||
SfxOrganizeListBox_Impl::VIEW_TEMPLATES == aLeftLb.GetViewType() );
- BOOL bPrint = bEnable && nDepth > pFocusBox->GetDocLevel();
+ sal_Bool bPrint = bEnable && nDepth > pFocusBox->GetDocLevel();
if ( bPrint && pPrt )
bPrint = !pPrt->IsPrinting() && !pPrt->IsJobActive();
if ( bPrint && bEnable )
{
// only styles printable
Path aPath( pFocusBox, pFocusBox->FirstSelected() );
- USHORT nIndex = aPath[ nDocLevel + 1 ];
+ sal_uInt16 nIndex = aPath[ nDocLevel + 1 ];
bPrint = ( nIndex == CONTENT_STYLE );
}
pMenu->EnableItem( ID_PRINT, bPrint );
@@ -2057,17 +2071,17 @@ IMPL_LINK( SfxOrganizeDlg_Impl, MenuActivate_Impl, Menu *, pMenu )
bEnable = GetServiceName_Impl( aFactoryURL, aFileURL );
}
else if ( bEnable )
- bEnable = FALSE;
+ bEnable = sal_False;
pMenu->EnableItem( ID_DEFAULT_TEMPLATE, bEnable );
bEnable = sal_True;
SvStringsDtor* pList = GetAllFactoryURLs_Impl();
- USHORT nCount = pList->Count();
+ sal_uInt16 nCount = pList->Count();
if ( nCount > 0 )
{
PopupMenu* pSubMenu = new PopupMenu;
- USHORT nItemId = ID_RESET_DEFAULT_TEMPLATE + 1;
- for ( USHORT i = 0; i < nCount; ++i )
+ sal_uInt16 nItemId = ID_RESET_DEFAULT_TEMPLATE + 1;
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
String aObjFacURL( *pList->GetObject(i) );
String aTitle = SvFileInformationManager::GetDescription(
@@ -2104,7 +2118,7 @@ IMPL_LINK( SfxOrganizeDlg_Impl, GetFocus_Impl, SfxOrganizeListBox_Impl *, pBox )
{
if(pFocusBox && pFocusBox != pBox)
- pFocusBox->SelectAll(FALSE);
+ pFocusBox->SelectAll(sal_False);
pFocusBox = pBox;
aFilesBtn.Enable( SfxOrganizeListBox_Impl::VIEW_FILES ==
pFocusBox->GetViewType() );
@@ -2305,7 +2319,7 @@ IMPL_LINK( SfxOrganizeDlg_Impl, ExportHdl, sfx2::FileDialogHelper *, EMPTYARG )
{
INetURLObject aPathObj( aPaths[0] );
aPathObj.setFinalSlash();
- for ( USHORT i = 1; i < nCount; ++i )
+ for ( sal_uInt16 i = 1; i < nCount; ++i )
{
if ( 1 == i )
aPathObj.Append( aPaths[i] );
diff --git a/sfx2/source/doc/docvor.hrc b/sfx2/source/doc/docvor.hrc
index c17f424a2a90..c17f424a2a90 100644..100755
--- a/sfx2/source/doc/docvor.hrc
+++ b/sfx2/source/doc/docvor.hrc
diff --git a/sfx2/source/doc/docvor.src b/sfx2/source/doc/docvor.src
index d345dc39e5f4..595f349061a2 100644..100755
--- a/sfx2/source/doc/docvor.src
+++ b/sfx2/source/doc/docvor.src
@@ -37,7 +37,7 @@
ModalDialog DLG_ORGANIZE
{
- HelpId = SID_ORGANIZER ;
+ HelpId = CMD_SID_ORGANIZER ;
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 271 , 162 ) ;
@@ -59,6 +59,7 @@ ModalDialog DLG_ORGANIZE
};
PushButton BTN_FILES
{
+ HelpID = "sfx2:PushButton:DLG_ORGANIZE:BTN_FILES";
Pos = MAP_APPFONT ( 205 , 143 ) ;
Size = MAP_APPFONT ( 60 , 14 ) ;
Text [ en-US ] = "~File..." ;
@@ -66,12 +67,14 @@ ModalDialog DLG_ORGANIZE
};
PushButton BTN_ADDRESSTEMPLATE
{
+ HelpID = "sfx2:PushButton:DLG_ORGANIZE:BTN_ADDRESSTEMPLATE";
Pos = MAP_APPFONT ( 205 , 124 ) ;
Size = MAP_APPFONT ( 60 , 14 ) ;
Text [ en-US ] = "~Address Book..." ;
};
ListBox LB_LEFT_TYP
{
+ HelpID = "sfx2:ListBox:DLG_ORGANIZE:LB_LEFT_TYP";
Border = TRUE ;
Pos = MAP_APPFONT ( 3 , 144 ) ;
Size = MAP_APPFONT ( 94 , 55 ) ;
@@ -86,6 +89,7 @@ ModalDialog DLG_ORGANIZE
};
ListBox LB_RIGHT_TYP
{
+ HelpID = "sfx2:ListBox:DLG_ORGANIZE:LB_RIGHT_TYP";
Border = TRUE ;
Pos = MAP_APPFONT ( 103 , 144 ) ;
Size = MAP_APPFONT ( 94 , 55 ) ;
@@ -140,6 +144,7 @@ ModalDialog DLG_ORGANIZE
};
MenuButton BTN_EDIT
{
+ HelpID = "sfx2:MenuButton:DLG_ORGANIZE:BTN_EDIT";
Pos = MAP_APPFONT ( 205 , 23 ) ;
Size = MAP_APPFONT ( 60 , 14 ) ;
Text [ en-US ] = "Commands" ;
diff --git a/sfx2/source/doc/frmdescr.cxx b/sfx2/source/doc/frmdescr.cxx
index a566ba9c688c..f8265e5825a3 100644..100755
--- a/sfx2/source/doc/frmdescr.cxx
+++ b/sfx2/source/doc/frmdescr.cxx
@@ -39,15 +39,15 @@
DBG_NAME(SfxFrameDescriptor);
-#define VERSION (USHORT) 3
+#define VERSION (sal_uInt16) 3
struct SfxFrameDescriptor_Impl
{
Wallpaper* pWallpaper;
SfxItemSet* pArgs;
- BOOL bEditable;
+ sal_Bool bEditable;
- SfxFrameDescriptor_Impl() : pWallpaper( NULL ), pArgs( NULL ), bEditable( TRUE ) {}
+ SfxFrameDescriptor_Impl() : pWallpaper( NULL ), pArgs( NULL ), bEditable( sal_True ) {}
~SfxFrameDescriptor_Impl()
{
delete pWallpaper;
@@ -62,10 +62,10 @@ SfxFrameDescriptor::SfxFrameDescriptor() :
eSizeSelector( SIZE_ABS ),
nHasBorder( BORDER_YES ),
nItemId( 0 ),
- bResizeHorizontal( TRUE ),
- bResizeVertical( TRUE ),
- bHasUI( TRUE ),
- bReadOnly( FALSE )
+ bResizeHorizontal( sal_True ),
+ bResizeVertical( sal_True ),
+ bHasUI( sal_True ),
+ bReadOnly( sal_False )
{
DBG_CTOR(SfxFrameDescriptor, 0);
@@ -109,31 +109,31 @@ void SfxFrameDescriptor::SetActualURL( const INetURLObject& rURL )
SetActualURL(String(rURL.GetMainURL( INetURLObject::DECODE_TO_IURI )));
}
-void SfxFrameDescriptor::SetEditable( BOOL bSet )
+void SfxFrameDescriptor::SetEditable( sal_Bool bSet )
{
pImp->bEditable = bSet;
}
-BOOL SfxFrameDescriptor::IsEditable() const
+sal_Bool SfxFrameDescriptor::IsEditable() const
{
return pImp->bEditable;
}
-BOOL SfxFrameDescriptor::CompareOriginal( SfxFrameDescriptor& rDescr ) const
+sal_Bool SfxFrameDescriptor::CompareOriginal( SfxFrameDescriptor& rDescr ) const
{
if( aURL != rDescr.aURL )
- return FALSE;
+ return sal_False;
else
- return TRUE;
+ return sal_True;
}
-BOOL SfxFrameDescriptor::CheckContent() const
+sal_Bool SfxFrameDescriptor::CheckContent() const
{
- BOOL bRet = !( aURL == aActualURL );
+ sal_Bool bRet = !( aURL == aActualURL );
return bRet;
}
-void SfxFrameDescriptor::UnifyContent( BOOL bTakeActual )
+void SfxFrameDescriptor::UnifyContent( sal_Bool bTakeActual )
{
if ( bTakeActual )
aURL = aActualURL;
@@ -141,7 +141,7 @@ void SfxFrameDescriptor::UnifyContent( BOOL bTakeActual )
aActualURL = aURL;
}
-SfxFrameDescriptor* SfxFrameDescriptor::Clone( BOOL bWithIds ) const
+SfxFrameDescriptor* SfxFrameDescriptor::Clone( sal_Bool bWithIds ) const
{
SfxFrameDescriptor *pFrame = new SfxFrameDescriptor;
@@ -175,9 +175,9 @@ SfxFrameDescriptor* SfxFrameDescriptor::Clone( BOOL bWithIds ) const
return pFrame;
}
-USHORT SfxFrameDescriptor::GetWinBits() const
+sal_uInt16 SfxFrameDescriptor::GetWinBits() const
{
- USHORT nBits = 0;
+ sal_uInt16 nBits = 0;
if ( eSizeSelector == SIZE_REL )
nBits |= SWIB_RELATIVESIZE;
if ( eSizeSelector == SIZE_PERCENT )
@@ -189,7 +189,7 @@ USHORT SfxFrameDescriptor::GetWinBits() const
return nBits;
}
-BOOL SfxFrameDescriptor::HasFrameBorder() const
+sal_Bool SfxFrameDescriptor::HasFrameBorder() const
{
return (nHasBorder & BORDER_YES) != 0;
}
@@ -227,7 +227,7 @@ const Wallpaper* SfxFrameDescriptor::GetWallpaper() const
return pImp->pWallpaper;
}
-USHORT SfxFrameDescriptor::GetItemPos() const
+sal_uInt16 SfxFrameDescriptor::GetItemPos() const
{
return USHRT_MAX;
}
@@ -248,13 +248,13 @@ SfxFrameProperties::SfxFrameProperties( const SfxFrameDescriptor *pD )
, bHasBorder( pD->HasFrameBorder() )
, bBorderSet( pD->IsFrameBorderSet() )
, bResizable( pD->IsResizable() )
- , bSetResizable( FALSE )
- , bIsRootSet( FALSE )
- , bIsInColSet( FALSE )
- , bHasBorderInherited( FALSE )
+ , bSetResizable( sal_False )
+ , bIsRootSet( sal_False )
+ , bIsInColSet( sal_False )
+ , bHasBorderInherited( sal_False )
, pFrame( pD->Clone() )
{
- bBorderSet = TRUE;
+ bBorderSet = sal_True;
}
SfxFrameProperties& SfxFrameProperties::operator =(
diff --git a/sfx2/source/doc/graphhelp.cxx b/sfx2/source/doc/graphhelp.cxx
index e17985eb564b..15b3cd9b65a1 100644..100755
--- a/sfx2/source/doc/graphhelp.cxx
+++ b/sfx2/source/doc/graphhelp.cxx
@@ -79,7 +79,7 @@
#include <comphelper/processfactory.hxx>
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include "graphhelp.hxx"
#include "doc.hrc"
diff --git a/sfx2/source/doc/graphhelp.hxx b/sfx2/source/doc/graphhelp.hxx
index 0fce34e13171..0fce34e13171 100644..100755
--- a/sfx2/source/doc/graphhelp.hxx
+++ b/sfx2/source/doc/graphhelp.hxx
diff --git a/sfx2/source/doc/graphhelp.src b/sfx2/source/doc/graphhelp.src
index 1936a8460d25..1936a8460d25 100644..100755
--- a/sfx2/source/doc/graphhelp.src
+++ b/sfx2/source/doc/graphhelp.src
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index 332f05597b4f..e41712c19038 100644..100755
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -73,13 +73,14 @@
#include <tools/urlobj.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/configurationhelper.hxx>
+#include <comphelper/mimeconfighelper.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/window.hxx>
#include <toolkit/awt/vclxwindow.hxx>
#include <sfx2/sfxsids.hrc>
#include <doc.hrc>
-#include <sfxresid.hxx>
+#include <sfx2/sfxresid.hxx>
#include <sfx2/docfilt.hxx>
#include <sfx2/filedlghelper.hxx>
#include <sfx2/app.hxx>
@@ -509,7 +510,7 @@ uno::Sequence< beans::PropertyValue > ModelData_Impl::GetDocServiceAnyFilter( sa
aSearchRequest[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DocumentService"));
aSearchRequest[0].Value <<= GetDocServiceName();
- return SfxStoringHelper::SearchForFilter( m_pOwner->GetFilterQuery(), aSearchRequest, nMust, nDont );
+ return ::comphelper::MimeConfigurationHelper::SearchForFilter( m_pOwner->GetFilterQuery(), aSearchRequest, nMust, nDont );
}
//-------------------------------------------------------------------------
@@ -529,7 +530,7 @@ uno::Sequence< beans::PropertyValue > ModelData_Impl::GetPreselectedFilter_Impl(
aSearchRequest[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DocumentService"));
aSearchRequest[1].Value <<= GetDocServiceName();
- aFilterProps = SfxStoringHelper::SearchForFilter( m_pOwner->GetFilterQuery(), aSearchRequest, nMust, nDont );
+ aFilterProps = ::comphelper::MimeConfigurationHelper::SearchForFilter( m_pOwner->GetFilterQuery(), aSearchRequest, nMust, nDont );
}
else
{
@@ -753,7 +754,7 @@ sal_Int8 ModelData_Impl::CheckFilter( const ::rtl::OUString& aFilterName )
return STATUS_SAVEAS_STANDARDNAME;
}
else if ( ( !( nFiltFlags & SFX_FILTER_OWN ) || ( nFiltFlags & SFX_FILTER_ALIEN ) )
- && !( nFiltFlags & SFX_FILTER_SILENTEXPORT ) && aDefFiltPropsHM.size()
+ && aDefFiltPropsHM.size()
&& ( nDefFiltFlags & SFX_FILTER_EXPORT ) && !( nDefFiltFlags & SFX_FILTER_INTERNAL ))
{
// the default filter is acceptable and the old filter is alian one
@@ -985,12 +986,11 @@ sal_Bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode,
NULL );
const SfxPoolItem* pItem = NULL;
- if ( bPreselectPassword && aDialogParams.GetItemState( SID_PASSWORD, sal_True, &pItem ) != SFX_ITEM_SET )
+ if ( bPreselectPassword && aDialogParams.GetItemState( SID_ENCRYPTIONDATA, sal_True, &pItem ) != SFX_ITEM_SET )
{
- // the file dialog preselects the password checkbox if the provided mediadescriptor has password entry
- // after dialog execution the password entry will be either removed or replaced with the password
- // entered by the user
- aDialogParams.Put( SfxStringItem( SID_PASSWORD, String() ) );
+ // the file dialog preselects the password checkbox if the provided mediadescriptor has encryption data entry
+ // after dialog execution the password interaction flag will be either removed or not
+ aDialogParams.Put( SfxBoolItem( SID_PASSWORDINTERACTION, sal_True ) );
}
// aStringTypeFN is a pure output parameter, pDialogParams is an in/out parameter
@@ -1597,6 +1597,7 @@ sal_Bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >&
DocumentSettingsGuard aSettingsGuard( aModelData.GetModel(), aModelData.IsRecommendReadOnly(), nStoreMode & EXPORT_REQUESTED );
+ OSL_ENSURE( aModelData.GetMediaDescr().find( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Password" ) ) ) == aModelData.GetMediaDescr().end(), "The Password property of MediaDescriptor should not be used here!" );
if ( aOptions.IsDocInfoSave()
&& ( !aModelData.GetStorable()->hasLocation()
|| INetURLObject( aModelData.GetStorable()->getLocation() ) != aURL ) )
@@ -1657,47 +1658,6 @@ sal_Bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >&
//-------------------------------------------------------------------------
// static
-uno::Sequence< beans::PropertyValue > SfxStoringHelper::SearchForFilter(
- const uno::Reference< container::XContainerQuery >& xFilterQuery,
- const uno::Sequence< beans::NamedValue >& aSearchRequest,
- sal_Int32 nMustFlags,
- sal_Int32 nDontFlags )
-{
- uno::Sequence< beans::PropertyValue > aFilterProps;
- uno::Reference< container::XEnumeration > xFilterEnum =
- xFilterQuery->createSubSetEnumerationByProperties( aSearchRequest );
-
- // the first default filter will be taken,
- // if there is no filter with flag default the first acceptable filter will be taken
- if ( xFilterEnum.is() )
- {
- while ( xFilterEnum->hasMoreElements() )
- {
- uno::Sequence< beans::PropertyValue > aProps;
- if ( xFilterEnum->nextElement() >>= aProps )
- {
- ::comphelper::SequenceAsHashMap aPropsHM( aProps );
- sal_Int32 nFlags = aPropsHM.getUnpackedValueOrDefault( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Flags")),
- (sal_Int32)0 );
- if ( ( ( nFlags & nMustFlags ) == nMustFlags ) && !( nFlags & nDontFlags ) )
- {
- if ( ( nFlags & SFX_FILTER_DEFAULT ) == SFX_FILTER_DEFAULT )
- {
- aFilterProps = aProps;
- break;
- }
- else if ( !aFilterProps.getLength() )
- aFilterProps = aProps;
- }
- }
- }
- }
-
- return aFilterProps;
-}
-
-//-------------------------------------------------------------------------
-// static
sal_Bool SfxStoringHelper::CheckFilterOptionsAppearence(
const uno::Reference< container::XNameAccess >& xFilterCFG,
const ::rtl::OUString& aFilterName )
diff --git a/sfx2/source/doc/iframe.cxx b/sfx2/source/doc/iframe.cxx
index 39002d2d7711..0b37de71657a 100644..100755
--- a/sfx2/source/doc/iframe.cxx
+++ b/sfx2/source/doc/iframe.cxx
@@ -185,10 +185,10 @@ throw( uno::RuntimeException )
if ( xDisp.is() )
xDisp->dispatch( aTargetURL, aProps );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
void SAL_CALL IFrameObject::cancel() throw( com::sun::star::uno::RuntimeException )
@@ -275,7 +275,7 @@ void SAL_CALL IFrameObject::setPropertyValue(const ::rtl::OUString& aPropertyNam
sal_Bool bIsAutoBorder = sal_Bool();
if ( (aAny >>= bIsAutoBorder) )
{
- BOOL bBorder = maFrmDescr.IsFrameBorderOn();
+ sal_Bool bBorder = maFrmDescr.IsFrameBorderOn();
maFrmDescr.ResetBorder();
if ( bIsAutoBorder )
maFrmDescr.SetFrameBorder( bBorder );
@@ -384,7 +384,7 @@ void SAL_CALL IFrameObject::removeVetoableChangeListener(const ::rtl::OUString&,
::sal_Int16 SAL_CALL IFrameObject::execute() throw (::com::sun::star::uno::RuntimeException)
{
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
- VclAbstractDialog* pDlg = pFact->CreateEditObjectDialog( NULL, SID_INSERT_FLOATINGFRAME, mxObj );
+ VclAbstractDialog* pDlg = pFact->CreateEditObjectDialog( NULL, rtl::OUString::createFromAscii(".uno:InsertObjectFloatingFrame"), mxObj );
if ( pDlg )
pDlg->Execute();
return 0;
diff --git a/sfx2/source/doc/makefile.mk b/sfx2/source/doc/makefile.mk
deleted file mode 100644
index d663d34cf5ba..000000000000
--- a/sfx2/source/doc/makefile.mk
+++ /dev/null
@@ -1,103 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..
-
-PRJNAME=sfx2
-TARGET=doc
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-.IF "$(SYSTEM_LIBXML)" == "YES"
-CFLAGS+=-DSYSTEM_LIBXML $(LIBXML_CFLAGS)
-.ENDIF
-
-# --- Files --------------------------------------------------------
-
-SRS1NAME=$(TARGET)
-SRC1FILES = \
- doc.src new.src doctdlg.src docvor.src doctempl.src graphhelp.src
-
-SLOFILES = \
- $(SLO)$/printhelper.obj \
- $(SLO)$/docinf.obj \
- $(SLO)$/oleprops.obj \
- $(SLO)$/iframe.obj \
- $(SLO)$/plugin.obj \
- $(SLO)$/docfile.obj \
- $(SLO)$/objuno.obj \
- $(SLO)$/frmdescr.obj \
- $(SLO)$/objxtor.obj \
- $(SLO)$/objmisc.obj \
- $(SLO)$/objstor.obj \
- $(SLO)$/objcont.obj \
- $(SLO)$/objserv.obj \
- $(SLO)$/objitem.obj \
- $(SLO)$/ownsubfilterservice.obj \
- $(SLO)$/docfac.obj \
- $(SLO)$/docfilt.obj \
- $(SLO)$/doctempl.obj \
- $(SLO)$/doctemplates.obj \
- $(SLO)$/doctemplateslocal.obj \
- $(SLO)$/docvor.obj \
- $(SLO)$/new.obj \
- $(SLO)$/doctdlg.obj \
- $(SLO)$/sfxbasemodel.obj \
- $(SLO)$/guisaveas.obj\
- $(SLO)$/objembed.obj\
- $(SLO)$/graphhelp.obj \
- $(SLO)$/QuerySaveDocument.obj \
- $(SLO)$/docinsert.obj \
- $(SLO)$/docmacromode.obj \
- $(SLO)$/SfxDocumentMetaData.obj \
- $(SLO)$/DocumentMetadataAccess.obj \
- $(SLO)$/Metadatable.obj \
- $(SLO)$/sfxmodelfactory.obj \
- $(SLO)$/sfxacldetect.obj \
- $(SLO)$/docstoragemodifylistener.obj \
- $(SLO)$/querytemplate.obj \
- $(SLO)$/syspath.obj \
- $(SLO)$/syspathw32.obj
-
-.IF "$(GUI)" == "WNT"
-
-#HACK TO DISABLE PCH
-NOOPTFILES= \
- $(SLO)$/sfxacldetect.obj \
- $(SLO)$/syspathw32.obj
-.ENDIF
-
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
-
diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx
index 99a38f4f3cbe..c263b7521bba 100644..100755
--- a/sfx2/source/doc/new.cxx
+++ b/sfx2/source/doc/new.cxx
@@ -51,8 +51,8 @@
#include <sfx2/objsh.hxx>
#include "fltfnc.hxx"
#include <sfx2/viewsh.hxx>
-#include "viewfac.hxx"
-#include "sfxresid.hxx"
+#include "sfx2/viewfac.hxx"
+#include "sfx2/sfxresid.hxx"
#include <sfx2/docfile.hxx>
#include "preview.hxx"
#include <sfx2/printer.hxx>
@@ -135,13 +135,13 @@ void SfxPreviewWin_Impl::ImpPaint(
Point aPoint;
if (dRatio>dRatioPreV)
{
- aSize=Size(nWidth, (USHORT)(nWidth/dRatio));
- aPoint=Point( 0, (USHORT)((nHeight-aSize.Height())/2));
+ aSize=Size(nWidth, (sal_uInt16)(nWidth/dRatio));
+ aPoint=Point( 0, (sal_uInt16)((nHeight-aSize.Height())/2));
}
else
{
- aSize=Size((USHORT)(nHeight*dRatio), nHeight);
- aPoint=Point((USHORT)((nWidth-aSize.Width())/2),0);
+ aSize=Size((sal_uInt16)(nHeight*dRatio), nHeight);
+ aPoint=Point((sal_uInt16)((nWidth-aSize.Width())/2),0);
}
Point bPoint=Point(nWidth,nHeight)-aPoint;
@@ -178,7 +178,7 @@ SfxPreviewWin::SfxPreviewWin(
// This preview window is for document previews. Therefore
// right-to-left mode should be off
- EnableRTL( FALSE );
+ EnableRTL( sal_False );
}
void SfxPreviewWin::Paint( const Rectangle& rRect )
@@ -198,7 +198,7 @@ void SfxPreviewWin::Paint( const Rectangle& rRect )
DBG_ASSERT( aTmpSize.Height() * aTmpSize.Width(), "size of first page is 0, overload GetFirstPageSize or set vis-area!" );
aMtf.SetPrefSize( aTmpSize );
- aDevice.EnableOutput( FALSE );
+ aDevice.EnableOutput( sal_False );
aDevice.SetMapMode( rDocShell->GetMapUnit() );
aDevice.SetDrawMode( GetDrawMode() );
aMtf.Record( &aDevice );
@@ -254,7 +254,7 @@ class SfxNewFileDialog_Impl
String aNone;
String sLoadTemplate;
- USHORT nFlags;
+ sal_uInt16 nFlags;
SfxDocumentTemplates aTemplates;
SfxObjectShellLock xDocShell;
SfxNewFileDialog* pAntiImpl;
@@ -269,23 +269,23 @@ class SfxNewFileDialog_Impl
DECL_LINK( Expand, MoreButton * );
DECL_LINK( PreviewClick, CheckBox * );
DECL_LINK( LoadFile, PushButton* );
- USHORT GetSelectedTemplatePos() const;
+ sal_uInt16 GetSelectedTemplatePos() const;
public:
- SfxNewFileDialog_Impl( SfxNewFileDialog* pAntiImplP, USHORT nFlags );
+ SfxNewFileDialog_Impl( SfxNewFileDialog* pAntiImplP, sal_uInt16 nFlags );
~SfxNewFileDialog_Impl();
- // Returns FALSE if '- No -' is set as a template
+ // Returns sal_False if '- No -' is set as a template
// Template name can only be obtained if IsTemplate() is TRUE
// erfragt werden
- BOOL IsTemplate() const;
+ sal_Bool IsTemplate() const;
String GetTemplateRegion() const;
String GetTemplateName() const;
String GetTemplateFileName() const;
- USHORT GetTemplateFlags()const;
- void SetTemplateFlags(USHORT nSet);
+ sal_uInt16 GetTemplateFlags()const;
+ void SetTemplateFlags(sal_uInt16 nSet);
};
@@ -307,11 +307,11 @@ IMPL_LINK( SfxNewFileDialog_Impl, Update, void *, EMPTYARG )
if ( xDocShell.Is() )
{
if ( xDocShell->GetProgress() )
- return FALSE;
+ return sal_False;
xDocShell.Clear();
}
- const USHORT nEntry = GetSelectedTemplatePos();
+ const sal_uInt16 nEntry = GetSelectedTemplatePos();
if(!nEntry)
{
ClearInfo();
@@ -355,24 +355,24 @@ IMPL_LINK( SfxNewFileDialog_Impl, Update, void *, EMPTYARG )
Application::SetDefDialogParent( pAntiImpl );
SfxErrorContext eEC(ERRCTX_SFX_LOADTEMPLATE,pAntiImpl);
SfxApplication *pSfxApp = SFX_APP();
- ULONG lErr;
+ sal_uIntPtr lErr;
SfxItemSet* pSet = new SfxAllItemSet( pSfxApp->GetPool() );
- pSet->Put( SfxBoolItem( SID_TEMPLATE, TRUE ) );
- pSet->Put( SfxBoolItem( SID_PREVIEW, TRUE ) );
- lErr = pSfxApp->LoadTemplate( xDocShell, aFileName, TRUE, pSet );
+ pSet->Put( SfxBoolItem( SID_TEMPLATE, sal_True ) );
+ pSet->Put( SfxBoolItem( SID_PREVIEW, sal_True ) );
+ lErr = pSfxApp->LoadTemplate( xDocShell, aFileName, sal_True, pSet );
if( lErr )
ErrorHandler::HandleError(lErr);
Application::SetDefDialogParent( pParent );
if ( !xDocShell.Is() )
{
aPreviewWin.SetObjectShell( 0 );
- return FALSE;
+ return sal_False;
}
}
aPreviewWin.SetObjectShell( xDocShell );
}
- return TRUE;
+ return sal_True;
}
//-------------------------------------------------------------------------
@@ -382,20 +382,20 @@ IMPL_LINK( SfxNewFileDialog_Impl, RegionSelect, ListBox *, pBox )
if ( xDocShell.Is() && xDocShell->GetProgress() )
return 0;
- const USHORT nRegion = pBox->GetSelectEntryPos();
- const USHORT nCount = aTemplates.GetRegionCount()? aTemplates.GetCount(nRegion): 0;
- aTemplateLb.SetUpdateMode(FALSE);
+ const sal_uInt16 nRegion = pBox->GetSelectEntryPos();
+ const sal_uInt16 nCount = aTemplates.GetRegionCount()? aTemplates.GetCount(nRegion): 0;
+ aTemplateLb.SetUpdateMode(sal_False);
aTemplateLb.Clear();
String aSel=aRegionLb.GetSelectEntry();
- USHORT nc=aSel.Search('(');
+ sal_uInt16 nc=aSel.Search('(');
if (nc-1&&nc!=STRING_NOTFOUND)
aSel.Erase(nc-1);
if (aSel.CompareIgnoreCaseToAscii( String(SfxResId(STR_STANDARD)) )==COMPARE_EQUAL)
aTemplateLb.InsertEntry(aNone);
- for (USHORT i = 0; i < nCount; ++i)
+ for (sal_uInt16 i = 0; i < nCount; ++i)
aTemplateLb.InsertEntry(aTemplates.GetName(nRegion, i));
aTemplateLb.SelectEntryPos(0);
- aTemplateLb.SetUpdateMode(TRUE);
+ aTemplateLb.SetUpdateMode(sal_True);
aTemplateLb.Invalidate();
aTemplateLb.Update();
return 0;
@@ -417,7 +417,7 @@ IMPL_LINK( SfxNewFileDialog_Impl, PreviewClick, CheckBox *, pBox )
if ( xDocShell.Is() && xDocShell->GetProgress() )
return 0;
- USHORT nEntry = GetSelectedTemplatePos();
+ sal_uInt16 nEntry = GetSelectedTemplatePos();
if ( nEntry && pBox->IsChecked() )
{
if(!Update(0))
@@ -470,11 +470,11 @@ IMPL_LINK_INLINE_START( SfxNewFileDialog_Impl, LoadFile, PushButton *, EMPTYARG
IMPL_LINK_INLINE_END( SfxNewFileDialog_Impl, LoadFile, PushButton *, EMPTYARG )
//-------------------------------------------------------------------------
-USHORT SfxNewFileDialog_Impl::GetSelectedTemplatePos() const
+sal_uInt16 SfxNewFileDialog_Impl::GetSelectedTemplatePos() const
{
- USHORT nEntry=aTemplateLb.GetSelectEntryPos();
+ sal_uInt16 nEntry=aTemplateLb.GetSelectEntryPos();
String aSel=aRegionLb.GetSelectEntry().Copy();
- USHORT nc=aSel.Search('(');
+ sal_uInt16 nc=aSel.Search('(');
if (nc-1&&nc!=STRING_NOTFOUND)
aSel.Erase(nc-1);
if (aSel.CompareIgnoreCaseToAscii(String(SfxResId(STR_STANDARD)))!=COMPARE_EQUAL)
@@ -486,7 +486,7 @@ USHORT SfxNewFileDialog_Impl::GetSelectedTemplatePos() const
//-------------------------------------------------------------------------
-BOOL SfxNewFileDialog_Impl::IsTemplate() const
+sal_Bool SfxNewFileDialog_Impl::IsTemplate() const
{
return GetSelectedTemplatePos()!=0;
@@ -531,9 +531,9 @@ void AdjustPosSize_Impl(Window *pWin, short nMoveOffset, short nSizeOffset)
pWin->SetPosSizePixel(aPos, aSize);
}
//-------------------------------------------------------------------------
-USHORT SfxNewFileDialog_Impl::GetTemplateFlags()const
+sal_uInt16 SfxNewFileDialog_Impl::GetTemplateFlags()const
{
- USHORT nRet = aTextStyleCB.IsChecked() ? SFX_LOAD_TEXT_STYLES : 0;
+ sal_uInt16 nRet = aTextStyleCB.IsChecked() ? SFX_LOAD_TEXT_STYLES : 0;
if(aFrameStyleCB.IsChecked())
nRet |= SFX_LOAD_FRAME_STYLES;
if(aPageStyleCB.IsChecked())
@@ -545,7 +545,7 @@ USHORT SfxNewFileDialog_Impl::GetTemplateFlags()const
return nRet;
}
//-------------------------------------------------------------------------
-void SfxNewFileDialog_Impl::SetTemplateFlags(USHORT nSet)
+void SfxNewFileDialog_Impl::SetTemplateFlags(sal_uInt16 nSet)
{
aTextStyleCB.Check( 0 != (nSet&SFX_LOAD_TEXT_STYLES ));
aFrameStyleCB.Check( 0 != (nSet&SFX_LOAD_FRAME_STYLES));
@@ -557,7 +557,7 @@ void SfxNewFileDialog_Impl::SetTemplateFlags(USHORT nSet)
//-------------------------------------------------------------------------
SfxNewFileDialog_Impl::SfxNewFileDialog_Impl(
- SfxNewFileDialog* pAntiImplP, USHORT nFl)
+ SfxNewFileDialog* pAntiImplP, sal_uInt16 nFl)
: aRegionFt( pAntiImplP, SfxResId( FT_REGION ) ),
aRegionLb( pAntiImplP, SfxResId( LB_REGION ) ),
aTemplateFt( pAntiImplP, SfxResId( FT_TEMPLATE ) ),
@@ -643,7 +643,7 @@ SfxNewFileDialog_Impl::SfxNewFileDialog_Impl(
}
String &rExtra = pAntiImplP->GetExtraData();
- USHORT nTokCount = rExtra.GetTokenCount( '|' );
+ sal_uInt16 nTokCount = rExtra.GetTokenCount( '|' );
if( nTokCount > 0 && nFlags )
MORE_BTN(SetState( rExtra.GetToken( 0, '|' ) == 'Y' ));
if( nTokCount > 1 && nFlags )
@@ -657,10 +657,10 @@ SfxNewFileDialog_Impl::SfxNewFileDialog_Impl(
aTemplates.Update( sal_True /* be smart */ );
}
// fill the list boxes
- const USHORT nCount = aTemplates.GetRegionCount();
+ const sal_uInt16 nCount = aTemplates.GetRegionCount();
if (nCount)
{
- for(USHORT i = 0; i < nCount; ++i)
+ for(sal_uInt16 i = 0; i < nCount; ++i)
aRegionLb.InsertEntry(aTemplates.GetFullRegionName(i));
aRegionLb.SetSelectHdl(LINK(this, SfxNewFileDialog_Impl, RegionSelect));
}
@@ -684,7 +684,7 @@ SfxNewFileDialog_Impl::~SfxNewFileDialog_Impl()
delete pMoreBt;
}
//-------------------------------------------------------------------------
-SfxNewFileDialog::SfxNewFileDialog(Window *pParent, USHORT nFlags)
+SfxNewFileDialog::SfxNewFileDialog(Window *pParent, sal_uInt16 nFlags)
: SfxModalDialog( pParent, SfxResId( DLG_NEW_FILE ) )
{
pImpl = new SfxNewFileDialog_Impl( this, nFlags );
@@ -695,7 +695,7 @@ SfxNewFileDialog::~SfxNewFileDialog()
delete pImpl;
}
//-------------------------------------------------------------------------
-BOOL SfxNewFileDialog::IsTemplate() const
+sal_Bool SfxNewFileDialog::IsTemplate() const
{
return pImpl->IsTemplate();
}
@@ -715,13 +715,13 @@ String SfxNewFileDialog::GetTemplateFileName() const
return pImpl->GetTemplateFileName();
}
//-------------------------------------------------------------------------
-USHORT SfxNewFileDialog::GetTemplateFlags()const
+sal_uInt16 SfxNewFileDialog::GetTemplateFlags()const
{
return pImpl->GetTemplateFlags();
}
//-------------------------------------------------------------------------
-void SfxNewFileDialog::SetTemplateFlags(USHORT nSet)
+void SfxNewFileDialog::SetTemplateFlags(sal_uInt16 nSet)
{
pImpl->SetTemplateFlags(nSet);
}
diff --git a/sfx2/source/doc/new.hrc b/sfx2/source/doc/new.hrc
index dd8878bf0177..dd8878bf0177 100644..100755
--- a/sfx2/source/doc/new.hrc
+++ b/sfx2/source/doc/new.hrc
diff --git a/sfx2/source/doc/new.src b/sfx2/source/doc/new.src
index 146f9f630570..6737128cce43 100644..100755
--- a/sfx2/source/doc/new.src
+++ b/sfx2/source/doc/new.src
@@ -28,12 +28,14 @@
#include <sfx2/sfx.hrc>
#include "doc.hrc"
#include "new.hrc"
+#include <sfx2/sfxcommands.h>
+
// pragma ----------------------------------------------------------------
// DLG_NEW_FILE ----------------------------------------------------------
ModalDialog DLG_NEW_FILE
{
- HelpId = SID_NEWDOC ;
+ HelpId = CMD_SID_NEWDOC ;
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 336 , 96 ) ;
@@ -57,6 +59,7 @@ ModalDialog DLG_NEW_FILE
};
ListBox LB_REGION
{
+ HelpID = "sfx2:ListBox:DLG_NEW_FILE:LB_REGION";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 18 ) ;
Size = MAP_APPFONT ( 127 , 72 ) ;
@@ -78,6 +81,7 @@ ModalDialog DLG_NEW_FILE
};
ListBox LB_TEMPLATE
{
+ HelpID = "sfx2:ListBox:DLG_NEW_FILE:LB_TEMPLATE";
Border = TRUE ;
Pos = MAP_APPFONT ( 139 , 18 ) ;
Size = MAP_APPFONT ( 127 , 72 ) ;
@@ -85,6 +89,7 @@ ModalDialog DLG_NEW_FILE
};
MoreButton BT_MORE
{
+ HelpID = "sfx2:MoreButton:DLG_NEW_FILE:BT_MORE";
Pos = MAP_APPFONT ( 274 , 70 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~More" ;
@@ -101,6 +106,7 @@ ModalDialog DLG_NEW_FILE
};
CheckBox BTN_PREVIEW
{
+ HelpID = "sfx2:CheckBox:DLG_NEW_FILE:BTN_PREVIEW";
Pos = MAP_APPFONT ( 6 , 96 ) ;
Size = MAP_APPFONT ( 97 , 10 ) ;
Text [ en-US ] = "Pre~view" ;
@@ -115,6 +121,7 @@ ModalDialog DLG_NEW_FILE
};
CheckBox CB_TEXT_STYLE
{
+ HelpID = "sfx2:CheckBox:DLG_NEW_FILE:CB_TEXT_STYLE";
Pos = MAP_APPFONT ( 6 , 94 ) ;
Size = MAP_APPFONT ( 50 , 10 ) ;
Hide = TRUE;
@@ -122,6 +129,7 @@ ModalDialog DLG_NEW_FILE
};
CheckBox CB_FRAME_STYLE
{
+ HelpID = "sfx2:CheckBox:DLG_NEW_FILE:CB_FRAME_STYLE";
Pos = MAP_APPFONT ( 60 , 94 ) ;
Size = MAP_APPFONT ( 50 , 10 ) ;
Hide = TRUE;
@@ -129,6 +137,7 @@ ModalDialog DLG_NEW_FILE
};
CheckBox CB_PAGE_STYLE
{
+ HelpID = "sfx2:CheckBox:DLG_NEW_FILE:CB_PAGE_STYLE";
Pos = MAP_APPFONT ( 114 , 94 ) ;
Size = MAP_APPFONT ( 50 , 10 ) ;
Hide = TRUE;
@@ -136,6 +145,7 @@ ModalDialog DLG_NEW_FILE
};
CheckBox CB_NUM_STYLE
{
+ HelpID = "sfx2:CheckBox:DLG_NEW_FILE:CB_NUM_STYLE";
Pos = MAP_APPFONT ( 168 , 94 ) ;
Size = MAP_APPFONT ( 50 , 10 ) ;
Hide = TRUE;
@@ -143,6 +153,7 @@ ModalDialog DLG_NEW_FILE
};
CheckBox CB_MERGE_STYLE
{
+ HelpID = "sfx2:CheckBox:DLG_NEW_FILE:CB_MERGE_STYLE";
Pos = MAP_APPFONT ( 222 , 94 ) ;
Size = MAP_APPFONT ( 50 , 10 ) ;
Hide = TRUE;
@@ -150,6 +161,7 @@ ModalDialog DLG_NEW_FILE
};
PushButton PB_LOAD_FILE
{
+ HelpID = "sfx2:PushButton:DLG_NEW_FILE:PB_LOAD_FILE";
Pos = MAP_APPFONT ( 274 , 92 ) ;
Size = MAP_APPFONT ( 56 , 14 ) ;
Hide = TRUE;
@@ -168,6 +180,7 @@ ModalDialog DLG_NEW_FILE
};
Edit ED_TITLE
{
+ HelpID = "sfx2:Edit:DLG_NEW_FILE:ED_TITLE";
Border = TRUE ;
Pos = MAP_APPFONT ( 145 , 121 ) ;
Size = MAP_APPFONT ( 175 , 12 ) ;
@@ -183,6 +196,7 @@ ModalDialog DLG_NEW_FILE
};
Edit ED_THEMA
{
+ HelpID = "sfx2:Edit:DLG_NEW_FILE:ED_THEMA";
Border = TRUE ;
Pos = MAP_APPFONT ( 145 , 148 ) ;
Size = MAP_APPFONT ( 175 , 12 ) ;
@@ -198,6 +212,7 @@ ModalDialog DLG_NEW_FILE
};
Edit ED_KEYWORDS
{
+ HelpID = "sfx2:Edit:DLG_NEW_FILE:ED_KEYWORDS";
Border = TRUE ;
Pos = MAP_APPFONT ( 145 , 175 ) ;
Size = MAP_APPFONT ( 175 , 12 ) ;
@@ -213,6 +228,7 @@ ModalDialog DLG_NEW_FILE
};
MultiLineEdit ED_DESC
{
+ HelpID = "sfx2:MultiLineEdit:DLG_NEW_FILE:ED_DESC";
Border = TRUE ;
Pos = MAP_APPFONT ( 144 , 202 ) ;
Size = MAP_APPFONT ( 175 , 32 ) ;
diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx
index 6624b163ae5f..cae0fb743e40 100644..100755
--- a/sfx2/source/doc/objcont.cxx
+++ b/sfx2/source/doc/objcont.cxx
@@ -63,7 +63,7 @@
#include <vcl/oldprintadaptor.hxx>
#include <sfx2/app.hxx>
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include "appdata.hxx"
#include <sfx2/dinfdlg.hxx>
#include "fltfnc.hxx"
@@ -72,11 +72,11 @@
#include <sfx2/objsh.hxx>
#include "objshimp.hxx"
#include <sfx2/evntconf.hxx>
-#include "sfxhelp.hxx"
+#include "sfx2/sfxhelp.hxx"
#include <sfx2/dispatch.hxx>
#include <sfx2/printer.hxx>
+#include "sfx2/basmgr.hxx"
#include <sfx2/viewfrm.hxx>
-#include "basmgr.hxx"
#include <sfx2/doctempl.hxx>
#include "doc.hrc"
#include <sfx2/sfxbasemodel.hxx>
@@ -137,7 +137,7 @@ SfxObjectShell::CreatePreviewMetaFile_Impl( sal_Bool bFullContent ) const
::boost::shared_ptr<GDIMetaFile> pFile(new GDIMetaFile);
VirtualDevice aDevice;
- aDevice.EnableOutput( FALSE );
+ aDevice.EnableOutput( sal_False );
MapMode aMode( ((SfxObjectShell*)this)->GetMapUnit() );
aDevice.SetMapMode( aMode );
@@ -245,7 +245,7 @@ void SfxObjectShell::UpdateTime_Impl(
// Initialize some local member! Its neccessary for wollow operations!
DateTime aNow ; // Date and time at current moment
Time n24Time (24,0,0,0) ; // Time-value for 24 hours - see follow calculation
- ULONG nDays = 0 ; // Count of days between now and last editing
+ sal_uIntPtr nDays = 0 ; // Count of days between now and last editing
Time nAddTime (0) ; // Value to add on aOldTime
// Safe impossible cases!
@@ -344,7 +344,7 @@ sal_uInt16 SfxObjectShell::GetContentCount(sal_uInt16 nIdx)
//--------------------------------------------------------------------
//TODO/CLEANUP: remove this method
-void SfxObjectShell::TriggerHelpPI(USHORT nIdx1, USHORT nIdx2)
+void SfxObjectShell::TriggerHelpPI(sal_uInt16 nIdx1, sal_uInt16 nIdx2)
{
if(nIdx1==CONTENT_STYLE && nIdx2 != INDEX_IGNORE) //StyleSheets
{
@@ -383,9 +383,9 @@ void SfxObjectShell::GetContent(String &rText,
{
case INDEX_IGNORE:
{
- USHORT nTextResId = 0;
- USHORT nClosedBitmapResId = 0; // evtl. sp"ater mal unterschiedliche
- USHORT nOpenedBitmapResId = 0; // " " " "
+ sal_uInt16 nTextResId = 0;
+ sal_uInt16 nClosedBitmapResId = 0; // evtl. sp"ater mal unterschiedliche
+ sal_uInt16 nOpenedBitmapResId = 0; // " " " "
switch(i)
{
case CONTENT_STYLE:
@@ -430,7 +430,7 @@ void SfxObjectShell::GetContent(String &rText,
Bitmap SfxObjectShell::GetStyleFamilyBitmap(SfxStyleFamily eFamily)
{
- USHORT nResId = 0;
+ sal_uInt16 nResId = 0;
switch(eFamily)
{
case SFX_STYLE_FAMILY_CHAR:
@@ -459,16 +459,16 @@ Bitmap SfxObjectShell::GetStyleFamilyBitmap(SfxStyleFamily eFamily)
//--------------------------------------------------------------------
-BOOL SfxObjectShell::Insert(SfxObjectShell &rSource,
- USHORT nSourceIdx1,
- USHORT nSourceIdx2,
- USHORT /*nSourceIdx3*/,
- USHORT &nIdx1,
- USHORT &nIdx2,
- USHORT &/*nIdx3*/,
- USHORT &/*nDeleted*/)
+sal_Bool SfxObjectShell::Insert(SfxObjectShell &rSource,
+ sal_uInt16 nSourceIdx1,
+ sal_uInt16 nSourceIdx2,
+ sal_uInt16 /*nSourceIdx3*/,
+ sal_uInt16 &nIdx1,
+ sal_uInt16 &nIdx2,
+ sal_uInt16 &/*nIdx3*/,
+ sal_uInt16 &/*nDeleted*/)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if (INDEX_IGNORE == nIdx1 && CONTENT_STYLE == nSourceIdx1)
nIdx1 = CONTENT_STYLE;
@@ -499,8 +499,8 @@ BOOL SfxObjectShell::Insert(SfxObjectShell &rSource,
SfxStyleFamily eOldFamily = pHisSheet->GetFamily();
SfxStyleSheetBase* pExist = pMyPool->Find(aOldName, eOldFamily);
- // USHORT nOldHelpId = pExist->GetHelpId(???);
- BOOL bUsedOrUserDefined;
+ // sal_uInt16 nOldHelpId = pExist->GetHelpId(???);
+ sal_Bool bUsedOrUserDefined;
if( pExist )
{
bUsedOrUserDefined =
@@ -508,13 +508,13 @@ BOOL SfxObjectShell::Insert(SfxObjectShell &rSource,
if( ErrorHandler::HandleError(
*new MessageInfo( ERRCODE_SFXMSG_STYLEREPLACE, aOldName ) )
!= ERRCODE_BUTTON_OK )
- return FALSE;
+ return sal_False;
else
{
pMyPool->Replace( *pHisSheet, *pExist );
- SetModified( TRUE );
+ SetModified( sal_True );
nIdx2 = nIdx1 = INDEX_IGNORE;
- return TRUE;
+ return sal_True;
}
}
@@ -579,13 +579,13 @@ BOOL SfxObjectShell::Insert(SfxObjectShell &rSource,
}
}
- SetModified( TRUE );
+ SetModified( sal_True );
if( !bUsedOrUserDefined ) nIdx2 = nIdx1 = INDEX_IGNORE;
- bRet = TRUE;
+ bRet = sal_True;
}
else
- bRet = FALSE;
+ bRet = sal_False;
}
return bRet;
@@ -593,14 +593,14 @@ BOOL SfxObjectShell::Insert(SfxObjectShell &rSource,
//--------------------------------------------------------------------
-BOOL SfxObjectShell::Remove
+sal_Bool SfxObjectShell::Remove
(
- USHORT nIdx1,
- USHORT nIdx2,
- USHORT /*nIdx3*/
+ sal_uInt16 nIdx1,
+ sal_uInt16 nIdx2,
+ sal_uInt16 /*nIdx3*/
)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if (CONTENT_STYLE == nIdx1)
{
@@ -613,7 +613,7 @@ BOOL SfxObjectShell::Remove
String aEmpty;
SfxStyleFamily eFamily = pMySheet->GetFamily();
pMyPool->Remove(pMySheet);
- bRet = TRUE;
+ bRet = sal_True;
SfxStyleSheetBase* pTestSheet = pMyPool->First();
while (pTestSheet)
@@ -635,7 +635,7 @@ BOOL SfxObjectShell::Remove
pTestSheet = pMyPool->Next();
}
- SetModified( TRUE );
+ SetModified( sal_True );
}
return bRet;
@@ -643,12 +643,12 @@ BOOL SfxObjectShell::Remove
//--------------------------------------------------------------------
-BOOL SfxObjectShell::Print
+sal_Bool SfxObjectShell::Print
(
Printer& rPrt,
- USHORT nIdx1,
- USHORT /*nIdx2*/,
- USHORT /*nIdx3*/,
+ sal_uInt16 nIdx1,
+ sal_uInt16 /*nIdx2*/,
+ sal_uInt16 /*nIdx3*/,
const String* pObjectName
)
{
@@ -662,7 +662,7 @@ BOOL SfxObjectShell::Print
pStylePool->GetSearchFamily(), pStylePool->GetSearchMask() );
SfxStyleSheetBase *pStyle = pIter->First();
if ( !pStyle )
- return TRUE;
+ return sal_True;
// prepare adaptor for old style StartPage/EndPage printing
boost::shared_ptr< Printer > pPrinter( new Printer( rPrt.GetJobSetup() ) );
@@ -676,8 +676,8 @@ BOOL SfxObjectShell::Print
aFont.SetWeight(WEIGHT_BOLD);
pPrinter->SetFont(aFont);
const Size aPageSize(pPrinter->GetOutputSize());
- const USHORT nXIndent = 200;
- USHORT nYIndent = 200;
+ const sal_uInt16 nXIndent = 200;
+ sal_uInt16 nYIndent = 200;
Point aOutPos(nXIndent, nYIndent);
String aHeader(SfxResId(STR_PRINT_STYLES_HEADER));
if ( pObjectName )
@@ -712,13 +712,13 @@ BOOL SfxObjectShell::Print
pPrinter->SetFont(aFont);
aStr = pStyle->GetDescription();
const char cDelim = ' ';
- USHORT nStart = 0, nIdx = 0;
+ sal_uInt16 nStart = 0, nIdx = 0;
nTextHeight = pPrinter->GetTextHeight();
// break text into lines
while(nIdx < aStr.Len())
{
- USHORT nOld = nIdx;
+ sal_uInt16 nOld = nIdx;
long nTextWidth;
nIdx = aStr.Search(cDelim, nStart);
nTextWidth = pPrinter->GetTextWidth(aStr, nStart, nIdx-nStart);
@@ -739,7 +739,7 @@ BOOL SfxObjectShell::Print
}
else
{
- USHORT nChar = 1;
+ sal_uInt16 nChar = 1;
while(
nStart + nChar < aStr.Len() &&
aOutPos.X() + pPrinter->GetTextWidth(
@@ -770,9 +770,9 @@ BOOL SfxObjectShell::Print
break;
}
default:
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
//--------------------------------------------------------------------
@@ -805,7 +805,7 @@ void SfxObjectShell::LoadStyles
DBG_ASSERT(pMyPool, "Dest-DocumentShell ohne StyleSheetPool");
pSourcePool->SetSearchMask(SFX_STYLE_FAMILY_ALL, 0xffff);
Styles_Impl *pFound = new Styles_Impl[pSourcePool->Count()];
- USHORT nFound = 0;
+ sal_uInt16 nFound = 0;
SfxStyleSheetBase *pSource = pSourcePool->First();
while ( pSource )
@@ -824,7 +824,7 @@ void SfxObjectShell::LoadStyles
pSource = pSourcePool->Next();
}
- for ( USHORT i = 0; i < nFound; ++i )
+ for ( sal_uInt16 i = 0; i < nFound; ++i )
{
pFound[i].pDest->GetItemSet().PutExtended(pFound[i].pSource->GetItemSet(), SFX_ITEM_DONTCARE, SFX_ITEM_DEFAULT);
if(pFound[i].pSource->HasParentSupport())
@@ -897,13 +897,13 @@ void SfxObjectShell::UpdateFromTemplate_Impl( )
{
// check existence of template storage
aTemplURL = aFoundName;
- BOOL bLoad = FALSE;
+ sal_Bool bLoad = sal_False;
// should the document checked against changes in the template ?
if ( IsQueryLoadTemplate() )
{
// load document info of template
- BOOL bOK = FALSE;
+ sal_Bool bOK = sal_False;
util::DateTime aTemplDate;
try
{
@@ -920,7 +920,7 @@ void SfxObjectShell::UpdateFromTemplate_Impl( )
if ( aAny >>= aTemplDate )
{
// get modify date from document info
- bOK = TRUE;
+ bOK = sal_True;
}
}
catch ( Exception& )
@@ -937,21 +937,21 @@ void SfxObjectShell::UpdateFromTemplate_Impl( )
// ask user
if( bCanUpdateFromTemplate == document::UpdateDocMode::QUIET_UPDATE
|| bCanUpdateFromTemplate == document::UpdateDocMode::FULL_UPDATE )
- bLoad = TRUE;
+ bLoad = sal_True;
else if ( bCanUpdateFromTemplate == document::UpdateDocMode::ACCORDING_TO_CONFIG )
{
String sMessage( SfxResId( STR_QRYTEMPL_MESSAGE ) );
sMessage.SearchAndReplace( String::CreateFromAscii("$(ARG1)"), aTemplName );
sfx2::QueryTemplateBox aBox( GetDialogParent(), sMessage );
if ( RET_YES == aBox.Execute() )
- bLoad = TRUE;
+ bLoad = sal_True;
}
if( !bLoad )
{
// user refuses, so don't ask again for this document
- SetQueryLoadTemplate(FALSE);
- SetModified( TRUE );
+ SetQueryLoadTemplate(sal_False);
+ SetModified( sal_True );
}
}
}
@@ -983,38 +983,6 @@ void SfxObjectShell::UpdateFromTemplate_Impl( )
}
}
-SfxObjectShellRef MakeObjectShellForOrganizer_Impl( const String& aTargetURL, BOOL bForWriting )
-{
- // check for own format
- SfxObjectShellRef xDoc;
- StreamMode nMode = bForWriting ? SFX_STREAM_READWRITE : SFX_STREAM_READONLY;
- SfxMedium *pMed = new SfxMedium( aTargetURL, nMode, FALSE, 0 );
- const SfxFilter* pFilter = NULL;
- pMed->UseInteractionHandler(TRUE);
- if( SFX_APP()->GetFilterMatcher().GuessFilter( *pMed, &pFilter ) == ERRCODE_NONE && pFilter && pFilter->IsOwnFormat() )
- {
- // create document
- xDoc = SfxObjectShell::CreateObject( pFilter->GetServiceName(), SFX_CREATE_MODE_ORGANIZER );
- if ( xDoc.Is() )
- {
- // partially load, so don't use DoLoad!
- xDoc->DoInitNew(0);
- // TODO/LATER: make sure that we don't use binary templates!
- if( xDoc->LoadFrom( *pMed ) )
- {
- // connect to storage, abandon temp. storage
- xDoc->DoSaveCompleted( pMed );
- }
- else
- xDoc.Clear();
- }
- }
- else
- delete pMed;
-
- return xDoc;
-}
-
sal_Bool SfxObjectShell::IsHelpDocument() const
{
const SfxFilter* pFilter = GetMedium()->GetFilter();
@@ -1069,14 +1037,14 @@ sal_Bool SfxObjectShell::IsUseUserData() const
void SfxObjectShell::SetQueryLoadTemplate( sal_Bool bNew )
{
if ( pImp->bQueryLoadTemplate != bNew )
- SetModified( TRUE );
+ SetModified( sal_True );
pImp->bQueryLoadTemplate = bNew;
}
void SfxObjectShell::SetUseUserData( sal_Bool bNew )
{
if ( pImp->bUseUserData != bNew )
- SetModified( TRUE );
+ SetModified( sal_True );
pImp->bUseUserData = bNew;
}
@@ -1093,14 +1061,14 @@ sal_Bool SfxObjectShell::IsSaveVersionOnClose() const
void SfxObjectShell::SetLoadReadonly( sal_Bool bNew )
{
if ( pImp->bLoadReadonly != bNew )
- SetModified( TRUE );
+ SetModified( sal_True );
pImp->bLoadReadonly = bNew;
}
void SfxObjectShell::SetSaveVersionOnClose( sal_Bool bNew )
{
if ( pImp->bSaveVersionOnClose != bNew )
- SetModified( TRUE );
+ SetModified( sal_True );
pImp->bSaveVersionOnClose = bNew;
}
diff --git a/sfx2/source/doc/objembed.cxx b/sfx2/source/doc/objembed.cxx
index 5e1a33e6d6b4..4c639717ab70 100644..100755
--- a/sfx2/source/doc/objembed.cxx
+++ b/sfx2/source/doc/objembed.cxx
@@ -102,7 +102,7 @@ void SfxObjectShell::OnDocumentPrinterChanged( Printer* /*pNewPrinter*/ )
}
// -----------------------------------------------------------------------
-Rectangle SfxObjectShell::GetVisArea( USHORT nAspect ) const
+Rectangle SfxObjectShell::GetVisArea( sal_uInt16 nAspect ) const
{
if( nAspect == ASPECT_CONTENT )
return pImp->m_aVisArea;
@@ -132,7 +132,7 @@ void SfxObjectShell::SetVisArea( const Rectangle & rVisArea )
if ( GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
{
if ( IsEnableSetModified() )
- SetModified( TRUE );
+ SetModified( sal_True );
SFX_APP()->NotifyEvent(SfxEventHint( SFX_EVENT_VISAREACHANGED, GlobalEventConfig::GetEventName(STR_EVENT_VISAREACHANGED), this));
}
@@ -146,7 +146,7 @@ void SfxObjectShell::SetVisAreaSize( const Size & rVisSize )
}
// -----------------------------------------------------------------------
-ULONG SfxObjectShell::GetMiscStatus() const
+sal_uIntPtr SfxObjectShell::GetMiscStatus() const
{
return 0;
}
@@ -175,7 +175,7 @@ void SfxObjectShell::FillTransferableObjectDescriptor( TransferableObjectDescrip
rDesc.maSize = OutputDevice::LogicToLogic( GetVisArea().GetSize(), GetMapUnit(), MAP_100TH_MM );
rDesc.maDragStartPos = Point();
rDesc.maDisplayName = String();
- rDesc.mbCanLink = FALSE;
+ rDesc.mbCanLink = sal_False;
}
// -----------------------------------------------------------------------
@@ -183,7 +183,7 @@ void SfxObjectShell::DoDraw( OutputDevice* pDev,
const Point & rObjPos,
const Size & rSize,
const JobSetup & rSetup,
- USHORT nAspect )
+ sal_uInt16 nAspect )
{
MapMode aMod = pDev->GetMapMode();
Size aSize = GetVisArea( nAspect ).GetSize();
@@ -204,7 +204,7 @@ void SfxObjectShell::DoDraw_Impl( OutputDevice* pDev,
const Fraction & rScaleX,
const Fraction & rScaleY,
const JobSetup & rSetup,
- USHORT nAspect )
+ sal_uInt16 nAspect )
{
Rectangle aVisArea = GetVisArea( nAspect );
// MapUnit des Ziels
diff --git a/sfx2/source/doc/objitem.cxx b/sfx2/source/doc/objitem.cxx
index b29a9b6758b9..38517d378aae 100644..100755
--- a/sfx2/source/doc/objitem.cxx
+++ b/sfx2/source/doc/objitem.cxx
@@ -61,7 +61,7 @@ SfxPoolItem* SfxObjectShellItem::Clone( SfxItemPool *) const
//--------------------------------------------------------------------
-bool SfxObjectShellItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) const
+bool SfxObjectShellItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
{
if ( pObjSh )
{
@@ -78,7 +78,7 @@ bool SfxObjectShellItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /*nMem
//--------------------------------------------------------------------
-bool SfxObjectShellItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ )
+bool SfxObjectShellItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
{
// This item MUST have a model. Please don't change this, there are UNO-based
// implementations which need it!!
@@ -111,7 +111,7 @@ bool SfxObjectShellItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE /*
//=========================================================================
-SfxObjectItem::SfxObjectItem( USHORT nWhichId, SfxShell *pSh )
+SfxObjectItem::SfxObjectItem( sal_uInt16 nWhichId, SfxShell *pSh )
: SfxPoolItem( nWhichId ),
_pSh( pSh )
{}
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index fb337fb6e3c6..34a102eb78c3 100644..100755
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -107,6 +107,8 @@ using namespace ::com::sun::star::container;
#include <rtl/bootstrap.hxx>
#include <vcl/svapp.hxx>
#include <framework/interaction.hxx>
+#include <framework/documentundoguard.hxx>
+#include <comphelper/interaction.hxx>
#include <comphelper/storagehelper.hxx>
#include <comphelper/documentconstants.hxx>
@@ -115,7 +117,7 @@ using namespace ::com::sun::star::container;
#include "appdata.hxx"
#include <sfx2/request.hxx>
#include <sfx2/bindings.hxx>
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include <sfx2/docfile.hxx>
#include <sfx2/docfilt.hxx>
#include <sfx2/objsh.hxx>
@@ -129,7 +131,6 @@ using namespace ::com::sun::star::container;
#include <sfx2/ctrlitem.hxx>
#include "arrdecl.hxx"
#include <sfx2/module.hxx>
-#include <sfx2/macrconf.hxx>
#include <sfx2/docfac.hxx>
#include "helper.hxx"
#include "doc.hrc"
@@ -1100,9 +1101,9 @@ void SfxObjectShell::PostActivateEvent_Impl( SfxViewFrame* pFrame )
sal_uInt16 nId = pImp->nEventId;
pImp->nEventId = 0;
if ( nId == SFX_EVENT_OPENDOC )
- pSfxApp->NotifyEvent(SfxEventHint( nId, GlobalEventConfig::GetEventName(STR_EVENT_OPENDOC), this ), sal_False);
+ pSfxApp->NotifyEvent(SfxViewEventHint( nId, GlobalEventConfig::GetEventName(STR_EVENT_OPENDOC), this, pFrame->GetFrame().GetController() ), sal_False);
else if (nId == SFX_EVENT_CREATEDOC )
- pSfxApp->NotifyEvent(SfxEventHint( nId, GlobalEventConfig::GetEventName(STR_EVENT_CREATEDOC), this ), sal_False);
+ pSfxApp->NotifyEvent(SfxViewEventHint( nId, GlobalEventConfig::GetEventName(STR_EVENT_CREATEDOC), this, pFrame->GetFrame().GetController() ), sal_False);
}
}
}
@@ -1589,15 +1590,8 @@ SfxModule* SfxObjectShell::GetModule() const
return GetFactory().GetModule();
}
-sal_Bool SfxObjectShell::IsBasic(
- const String & rCode, SbxObject * pVCtrl )
-{
- if( !rCode.Len() ) return sal_False;
- return SfxMacroConfig::IsBasic( pVCtrl, rCode, GetBasicManager() );
-}
-
ErrCode SfxObjectShell::CallBasic( const String& rMacro,
- const String& rBasic, SbxObject* pVCtrl, SbxArray* pArgs,
+ const String& rBasic, SbxArray* pArgs,
SbxValue* pRet )
{
SfxApplication* pApp = SFX_APP();
@@ -1607,23 +1601,13 @@ ErrCode SfxObjectShell::CallBasic( const String& rMacro,
return ERRCODE_IO_ACCESSDENIED;
}
- pApp->EnterBasicCall();
BasicManager *pMgr = GetBasicManager();
if( pApp->GetName() == rBasic )
pMgr = pApp->GetBasicManager();
- ErrCode nRet = SfxMacroConfig::Call( pVCtrl, rMacro, pMgr, pArgs, pRet );
- pApp->LeaveBasicCall();
+ ErrCode nRet = SfxApplication::CallBasic( rMacro, pMgr, pArgs, pRet );
return nRet;
}
-ErrCode SfxObjectShell::Call( const String & rCode, sal_Bool bIsBasicReturn, SbxObject * pVCtrl )
-{
- ErrCode nErr = ERRCODE_NONE;
- if ( bIsBasicReturn )
- CallBasic( rCode, String(), pVCtrl );
- return nErr;
-}
-
namespace
{
static bool lcl_isScriptAccessAllowed_nothrow( const Reference< XInterface >& _rxScriptContext )
@@ -1677,6 +1661,9 @@ ErrCode SfxObjectShell::CallXScript( const Reference< XInterface >& _rxScriptCon
xScriptProvider.set( xScriptProviderFactory->createScriptProvider( makeAny( _rxScriptContext ) ), UNO_SET_THROW );
}
+ // ry to protect the invocation context's undo manager (if present), just in case the script tampers with it
+ ::framework::DocumentUndoGuard aUndoGuard( _rxScriptContext.get() );
+
// obtain the script, and execute it
Reference< provider::XScript > xScript( xScriptProvider->getScript( _rScriptURL ), UNO_QUERY_THROW );
if ( pCaller && pCaller->hasValue() )
@@ -1694,7 +1681,7 @@ ErrCode SfxObjectShell::CallXScript( const Reference< XInterface >& _rxScriptCon
catch ( const uno::Exception& )
{
aException = ::cppu::getCaughtException();
- bCaughtException = TRUE;
+ bCaughtException = sal_True;
nErr = ERRCODE_BASIC_INTERNAL_ERROR;
}
@@ -1728,118 +1715,6 @@ ErrCode SfxObjectShell::CallXScript( const String& rScriptURL,
}
//-------------------------------------------------------------------------
-namespace {
- using namespace ::com::sun::star::uno;
-
- //.....................................................................
- static SbxArrayRef lcl_translateUno2Basic( const void* _pAnySequence )
- {
- SbxArrayRef xReturn;
- if ( _pAnySequence )
- {
- // in real it's a sequence of Any (by convention)
- const Sequence< Any >* pArguments = static_cast< const Sequence< Any >* >( _pAnySequence );
-
- // do we have arguments ?
- if ( pArguments->getLength() )
- {
- // yep
- xReturn = new SbxArray;
- String sEmptyName;
-
- // loop through the sequence
- const Any* pArg = pArguments->getConstArray();
- const Any* pArgEnd = pArg + pArguments->getLength();
-
- for ( sal_uInt16 nArgPos=1; pArg != pArgEnd; ++pArg, ++nArgPos )
- // and create a Sb object for every Any
- xReturn->Put( GetSbUnoObject( sEmptyName, *pArg ), nArgPos );
- }
- }
- return xReturn;
- }
- //.....................................................................
- void lcl_translateBasic2Uno( const SbxVariableRef& _rBasicValue, void* _pAny )
- {
- if ( _pAny )
- *static_cast< Any* >( _pAny ) = sbxToUnoValue( _rBasicValue );
- }
-}
-//-------------------------------------------------------------------------
-ErrCode SfxObjectShell::CallStarBasicScript( const String& _rMacroName, const String& _rLocation,
- const void* _pArguments, void* _pReturn )
-{
- OSL_TRACE("in CallSBS");
- SolarMutexGuard aSolarGuard;
-
- // the arguments for the call
- SbxArrayRef xMacroArguments = lcl_translateUno2Basic( _pArguments );
-
- // the return value
- SbxVariableRef xReturn = _pReturn ? new SbxVariable : NULL;
-
- // the location (document or application)
- String sMacroLocation;
- if ( _rLocation.EqualsAscii( "application" ) )
- sMacroLocation = SFX_APP()->GetName();
-#ifdef DBG_UTIL
- else
- DBG_ASSERT( _rLocation.EqualsAscii( "document" ),
- "SfxObjectShell::CallStarBasicScript: invalid (unknown) location!" );
-#endif
-
- // call the script
- ErrCode eError = CallBasic( _rMacroName, sMacroLocation, NULL, xMacroArguments, xReturn );
-
- // translate the return value
- lcl_translateBasic2Uno( xReturn, _pReturn );
-
- // outta here
- return eError;
-}
-
-//-------------------------------------------------------------------------
-ErrCode SfxObjectShell::CallScript(
- const String & rScriptType,
- const String & rCode,
- const void *pArgs,
- void *pRet
-)
-{
- SolarMutexGuard aSolarGuard;
- ErrCode nErr = ERRCODE_NONE;
- if( rScriptType.EqualsAscii( "StarBasic" ) )
- {
- // the arguments for the call
- SbxArrayRef xMacroArguments = lcl_translateUno2Basic( pArgs );
-
- // the return value
- SbxVariableRef xReturn = pRet ? new SbxVariable : NULL;
-
- // call the script
- nErr = CallBasic( rCode, String(), NULL, xMacroArguments, xReturn );
-
- // translate the return value
- lcl_translateBasic2Uno( xReturn, pRet );
-
- // did this fail because the method was not found?
- if ( nErr == ERRCODE_BASIC_PROC_UNDEFINED )
- { // yep-> look in the application BASIC module
- nErr = CallBasic( rCode, SFX_APP()->GetName(), NULL, xMacroArguments, xReturn );
- }
- }
- else if( rScriptType.EqualsAscii( "JavaScript" ) )
- {
- OSL_FAIL( "JavaScript not allowed" );
- return 0;
- }
- else
- {
- OSL_FAIL( "StarScript not allowed" );
- }
- return nErr;
-}
-
SfxFrame* SfxObjectShell::GetSmartSelf( SfxFrame* pSelf, SfxMedium& /*rMedium*/ )
{
return pSelf;
@@ -1857,25 +1732,6 @@ void SfxObjectShell::SetFlags( SfxObjectShellFlags eFlags )
pImp->eFlags = eFlags;
}
-String SfxObjectShell::QueryTitle( SfxTitleQuery eType ) const
-{
- String aRet;
-
- switch( eType )
- {
- case SFX_TITLE_QUERY_SAVE_NAME_PROPOSAL:
- {
- SfxMedium* pMed = GetMedium();
- const INetURLObject aObj( pMed->GetName() );
- aRet = aObj.GetMainURL( INetURLObject::DECODE_TO_IURI );
- if ( !aRet.Len() )
- aRet = GetTitle( SFX_TITLE_CAPTION );
- break;
- }
- }
- return aRet;
-}
-
void SfxHeaderAttributes_Impl::SetAttributes()
{
bAlert = sal_True;
@@ -2024,7 +1880,7 @@ sal_Bool SfxObjectShell::IsSecure()
if ( GetMedium()->GetContent().is() )
{
Any aAny( ::utl::UCBContentHelper::GetProperty( aURL.GetMainURL( INetURLObject::NO_DECODE ), String( RTL_CONSTASCII_USTRINGPARAM("IsProtected")) ) );
- sal_Bool bIsProtected = FALSE;
+ sal_Bool bIsProtected = sal_False;
if ( ( aAny >>= bIsProtected ) && bIsProtected )
return sal_False;
else
@@ -2037,7 +1893,7 @@ sal_Bool SfxObjectShell::IsSecure()
return sal_False;
}
-void SfxObjectShell::SetWaitCursor( BOOL bSet ) const
+void SfxObjectShell::SetWaitCursor( sal_Bool bSet ) const
{
for( SfxViewFrame* pFrame = SfxViewFrame::GetFirst( this ); pFrame; pFrame = SfxViewFrame::GetNext( *pFrame, this ) )
{
@@ -2059,7 +1915,7 @@ String SfxObjectShell::GetAPIName() const
return aName;
}
-void SfxObjectShell::Invalidate( USHORT nId )
+void SfxObjectShell::Invalidate( sal_uInt16 nId )
{
for( SfxViewFrame* pFrame = SfxViewFrame::GetFirst( this ); pFrame; pFrame = SfxViewFrame::GetNext( *pFrame, this ) )
Invalidate_Impl( pFrame->GetBindings(), nId );
@@ -2082,7 +1938,7 @@ Window* SfxObjectShell::GetDialogParent( SfxMedium* pLoadingMedium )
{
Window* pWindow = 0;
SfxItemSet* pSet = pLoadingMedium ? pLoadingMedium->GetItemSet() : GetMedium()->GetItemSet();
- SFX_ITEMSET_ARG( pSet, pUnoItem, SfxUnoFrameItem, SID_FILLFRAME, FALSE );
+ SFX_ITEMSET_ARG( pSet, pUnoItem, SfxUnoFrameItem, SID_FILLFRAME, sal_False );
if ( pUnoItem )
{
uno::Reference < frame::XFrame > xFrame( pUnoItem->GetFrame() );
@@ -2092,7 +1948,7 @@ Window* SfxObjectShell::GetDialogParent( SfxMedium* pLoadingMedium )
if ( !pWindow )
{
SfxFrame* pFrame = 0;
- SFX_ITEMSET_ARG( pSet, pFrameItem, SfxFrameItem, SID_DOCFRAME, FALSE );
+ SFX_ITEMSET_ARG( pSet, pFrameItem, SfxFrameItem, SID_DOCFRAME, sal_False );
if( pFrameItem && pFrameItem->GetFrame() )
// get target frame from ItemSet
pFrame = pFrameItem->GetFrame();
@@ -2126,7 +1982,7 @@ Window* SfxObjectShell::GetDialogParent( SfxMedium* pLoadingMedium )
return pWindow;
}
-String SfxObjectShell::UpdateTitle( SfxMedium* pMed, USHORT nDocViewNumber )
+String SfxObjectShell::UpdateTitle( SfxMedium* pMed, sal_uInt16 nDocViewNumber )
{
// Title of the windows
String aTitle;
@@ -2167,29 +2023,29 @@ void SfxObjectShell::SetCreateMode_Impl( SfxObjectCreateMode nMode )
eCreateMode = nMode;
}
-BOOL SfxObjectShell::IsInPlaceActive()
+sal_Bool SfxObjectShell::IsInPlaceActive()
{
if ( eCreateMode != SFX_CREATE_MODE_EMBEDDED )
- return FALSE;
+ return sal_False;
SfxViewFrame* pFrame = SfxViewFrame::GetFirst( this );
return pFrame && pFrame->GetFrame().IsInPlace();
}
-BOOL SfxObjectShell::IsUIActive()
+sal_Bool SfxObjectShell::IsUIActive()
{
if ( eCreateMode != SFX_CREATE_MODE_EMBEDDED )
- return FALSE;
+ return sal_False;
SfxViewFrame* pFrame = SfxViewFrame::GetFirst( this );
return pFrame && pFrame->GetFrame().IsInPlace() && pFrame->GetFrame().GetWorkWindow_Impl()->IsVisible_Impl();
}
-void SfxObjectShell::UIActivate( BOOL )
+void SfxObjectShell::UIActivate( sal_Bool )
{
}
-void SfxObjectShell::InPlaceActivate( BOOL )
+void SfxObjectShell::InPlaceActivate( sal_Bool )
{
}
@@ -2205,8 +2061,8 @@ sal_Bool SfxObjectShell::UseInteractionToHandleError(
{
uno::Any aInteraction;
uno::Sequence< uno::Reference< task::XInteractionContinuation > > lContinuations(2);
- ::framework::ContinuationAbort* pAbort = new ::framework::ContinuationAbort();
- ::framework::ContinuationApprove* pApprove = new ::framework::ContinuationApprove();
+ ::comphelper::OInteractionAbort* pAbort = new ::comphelper::OInteractionAbort();
+ ::comphelper::OInteractionApprove* pApprove = new ::comphelper::OInteractionApprove();
lContinuations[0] = uno::Reference< task::XInteractionContinuation >(
static_cast< task::XInteractionContinuation* >( pAbort ), uno::UNO_QUERY );
lContinuations[1] = uno::Reference< task::XInteractionContinuation >(
@@ -2215,14 +2071,8 @@ sal_Bool SfxObjectShell::UseInteractionToHandleError(
task::ErrorCodeRequest aErrorCode;
aErrorCode.ErrCode = nError;
aInteraction <<= aErrorCode;
-
- ::framework::InteractionRequest* pRequest = new ::framework::InteractionRequest(aInteraction,lContinuations);
- uno::Reference< task::XInteractionRequest > xRequest(
- static_cast< task::XInteractionRequest* >( pRequest ),
- uno::UNO_QUERY);
-
- xHandler->handle(xRequest);
- bResult = pAbort->isSelected();
+ xHandler->handle(::framework::InteractionRequest::CreateRequest (aInteraction,lContinuations));
+ bResult = pAbort->wasSelected();
}
catch( uno::Exception& )
{}
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 95de2c6dd52d..24d6309c4d95 100644..100755
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -71,7 +71,7 @@
#include <sfx2/app.hxx>
#include <sfx2/signaturestate.hxx>
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include <sfx2/event.hxx>
#include <sfx2/request.hxx>
#include <sfx2/printer.hxx>
@@ -92,7 +92,7 @@
#include <sfx2/docfac.hxx>
#include <sfx2/fcontnr.hxx>
#include <sfx2/filedlghelper.hxx>
-#include "sfxhelp.hxx"
+#include "sfx2/sfxhelp.hxx"
#include <sfx2/msgpool.hxx>
#include <sfx2/objface.hxx>
@@ -296,7 +296,7 @@ sal_Bool SfxObjectShell::APISaveAs_Impl
SfxItemSet* aParams
)
{
- BOOL bOk = sal_False;
+ sal_Bool bOk = sal_False;
{DBG_CHKTHIS(SfxObjectShell, 0);}
@@ -346,7 +346,7 @@ sal_Bool SfxObjectShell::APISaveAs_Impl
}
// prevent picklist-entry
- GetMedium()->SetUpdatePickList( FALSE );
+ GetMedium()->SetUpdatePickList( sal_False );
}
return bOk;
@@ -358,7 +358,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
{
{DBG_CHKTHIS(SfxObjectShell, 0);}
- USHORT nId = rReq.GetSlot();
+ sal_uInt16 nId = rReq.GetSlot();
if( SID_SIGNATURE == nId || SID_MACRO_SIGNATURE == nId )
{
@@ -407,7 +407,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
case SID_DOCINFO:
{
- SFX_REQUEST_ARG(rReq, pDocInfItem, SfxDocumentInfoItem, SID_DOCINFO, FALSE);
+ SFX_REQUEST_ARG(rReq, pDocInfItem, SfxDocumentInfoItem, SID_DOCINFO, sal_False);
if ( pDocInfItem )
{
// parameter, e.g. from replayed macro
@@ -417,8 +417,8 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
else
{
// no argument containing DocInfo; check optional arguments
- BOOL bReadOnly = IsReadOnly();
- SFX_REQUEST_ARG(rReq, pROItem, SfxBoolItem, SID_DOC_READONLY, FALSE);
+ sal_Bool bReadOnly = IsReadOnly();
+ SFX_REQUEST_ARG(rReq, pROItem, SfxBoolItem, SID_DOC_READONLY, sal_False);
if ( pROItem )
// override readonly attribute of document
// e.g. if a readonly document is saved elsewhere and user asks for editing DocInfo before
@@ -443,7 +443,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
IsUseUserData() );
if ( !GetSlotState( SID_DOCTEMPLATE ) )
// templates not supported
- aDocInfoItem.SetTemplate(FALSE);
+ aDocInfoItem.SetTemplate(sal_False);
SfxItemSet aSet(GetPool(), SID_DOCINFO, SID_DOCINFO, SID_DOC_READONLY, SID_DOC_READONLY,
SID_EXPLORER_PROPS_START, SID_EXPLORER_PROPS_START, SID_BASEURL, SID_BASEURL,
@@ -458,7 +458,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
SfxDocumentInfoDialog *pDlg = CreateDocumentInfoDialog(0, aSet);
if ( RET_OK == pDlg->Execute() )
{
- SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pDocInfoItem, SfxDocumentInfoItem, SID_DOCINFO, FALSE);
+ SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pDocInfoItem, SfxDocumentInfoItem, SID_DOCINFO, sal_False);
if ( pDocInfoItem )
{
// user has done some changes to DocumentInfo
@@ -494,7 +494,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
// derived class may decide to abort this
if( !QuerySlotExecutable( nId ) )
{
- rReq.SetReturnValue( SfxBoolItem( 0, FALSE ) );
+ rReq.SetReturnValue( SfxBoolItem( 0, sal_False ) );
return;
}
@@ -519,7 +519,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
if ( nId == SID_SAVEASDOC )
{
// in case of plugin mode the SaveAs operation means SaveTo
- SFX_ITEMSET_ARG( GetMedium()->GetItemSet(), pViewOnlyItem, SfxBoolItem, SID_VIEWONLY, FALSE );
+ SFX_ITEMSET_ARG( GetMedium()->GetItemSet(), pViewOnlyItem, SfxBoolItem, SID_VIEWONLY, sal_False );
if ( pViewOnlyItem && pViewOnlyItem->GetValue() )
rReq.AppendItem( SfxBoolItem( SID_SAVETO, sal_True ) );
}
@@ -527,7 +527,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
// TODO/LATER: do the following GUI related actions in standalown method
// ========================================================================================================
// Introduce a status indicator for GUI operation
- SFX_REQUEST_ARG( rReq, pStatusIndicatorItem, SfxUnoAnyItem, SID_PROGRESS_STATUSBAR_CONTROL, FALSE );
+ SFX_REQUEST_ARG( rReq, pStatusIndicatorItem, SfxUnoAnyItem, SID_PROGRESS_STATUSBAR_CONTROL, sal_False );
if ( !pStatusIndicatorItem )
{
// get statusindicator
@@ -566,7 +566,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
}
// Introduce an interaction handler for GUI operation
- SFX_REQUEST_ARG( rReq, pInteractionHandlerItem, SfxUnoAnyItem, SID_INTERACTIONHANDLER, FALSE );
+ SFX_REQUEST_ARG( rReq, pInteractionHandlerItem, SfxUnoAnyItem, SID_INTERACTIONHANDLER, sal_False );
if ( !pInteractionHandlerItem )
{
uno::Reference< task::XInteractionHandler > xInteract;
@@ -601,8 +601,9 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
// ========================================================================================================
sal_Bool bPreselectPassword = sal_False;
- SFX_ITEMSET_ARG( GetMedium()->GetItemSet(), pOldPasswordItem, SfxStringItem, SID_PASSWORD, FALSE );
- if ( pOldPasswordItem )
+ SFX_ITEMSET_ARG( GetMedium()->GetItemSet(), pOldEncryptionDataItem, SfxUnoAnyItem, SID_ENCRYPTIONDATA, sal_False );
+ SFX_ITEMSET_ARG( GetMedium()->GetItemSet(), pOldPasswordItem, SfxStringItem, SID_PASSWORD, sal_False );
+ if ( pOldEncryptionDataItem || pOldPasswordItem )
bPreselectPassword = sal_True;
uno::Sequence< beans::PropertyValue > aDispatchArgs;
@@ -644,7 +645,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
NULL );
rReq.SetArgs( aResultParams );
- SFX_REQUEST_ARG( rReq, pFilterNameItem, SfxStringItem, SID_FILTER_NAME, FALSE );
+ SFX_REQUEST_ARG( rReq, pFilterNameItem, SfxStringItem, SID_FILTER_NAME, sal_False );
::rtl::OUString aFilterName = pFilterNameItem ? ::rtl::OUString( pFilterNameItem->GetValue() )
: ::rtl::OUString();
const SfxFilter* pFilt = GetFactory().GetFilterContainer()->GetFilter4FilterName( aFilterName );
@@ -681,14 +682,14 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
// by default versions should be preserved always except in case of an explicit
// SaveAs via GUI, so the flag must be reset to guarantee this
pImp->bPreserveVersions = sal_True;
- ULONG lErr=GetErrorCode();
+ sal_uIntPtr lErr=GetErrorCode();
if ( !lErr && nErrorCode )
lErr = nErrorCode;
if ( lErr && nErrorCode == ERRCODE_NONE )
{
- SFX_REQUEST_ARG( rReq, pWarnItem, SfxBoolItem, SID_FAIL_ON_WARNING, FALSE );
+ SFX_REQUEST_ARG( rReq, pWarnItem, SfxBoolItem, SID_FAIL_ON_WARNING, sal_False );
if ( pWarnItem && pWarnItem->GetValue() )
nErrorCode = lErr;
}
@@ -731,8 +732,8 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
return;
}
- BOOL bInFrameSet = FALSE;
- USHORT nFrames=0;
+ sal_Bool bInFrameSet = sal_False;
+ sal_uInt16 nFrames=0;
pFrame = SfxViewFrame::GetFirst( this );
while ( pFrame )
{
@@ -740,7 +741,8 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
{
// In this document there still exists a view that is
// in a FrameSet , which of course may not be closed
- bInFrameSet = TRUE;
+ // geclosed werden
+ bInFrameSet = sal_True;
}
else
nFrames++;
@@ -761,8 +763,8 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
}
// Evaluate Parameter
- SFX_REQUEST_ARG(rReq, pSaveItem, SfxBoolItem, SID_CLOSEDOC_SAVE, FALSE);
- SFX_REQUEST_ARG(rReq, pNameItem, SfxStringItem, SID_CLOSEDOC_FILENAME, FALSE);
+ SFX_REQUEST_ARG(rReq, pSaveItem, SfxBoolItem, SID_CLOSEDOC_SAVE, sal_False);
+ SFX_REQUEST_ARG(rReq, pNameItem, SfxStringItem, SID_CLOSEDOC_FILENAME, sal_False);
if ( pSaveItem )
{
if ( pSaveItem->GetValue() )
@@ -785,22 +787,22 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
}
}
else
- SetModified(FALSE);
+ SetModified(sal_False);
}
// Cancelled by the user?
if ( !PrepareClose( 2 ) )
{
- rReq.SetReturnValue( SfxBoolItem(0, FALSE) );
+ rReq.SetReturnValue( SfxBoolItem(0, sal_False) );
rReq.Done();
return;
}
- SetModified( FALSE );
- ULONG lErr = GetErrorCode();
+ SetModified( sal_False );
+ sal_uIntPtr lErr = GetErrorCode();
ErrorHandler::HandleError(lErr);
- rReq.SetReturnValue( SfxBoolItem(0, TRUE) );
+ rReq.SetReturnValue( SfxBoolItem(0, sal_True) );
rReq.Done();
rReq.ReleaseArgs(); // because the pool is destroyed in Close
DoClose();
@@ -833,9 +835,9 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
}
}
- SFX_REQUEST_ARG(rReq, pRegionItem, SfxStringItem, SID_TEMPLATE_REGIONNAME, FALSE);
- SFX_REQUEST_ARG(rReq, pNameItem, SfxStringItem, SID_TEMPLATE_NAME, FALSE);
- SFX_REQUEST_ARG(rReq, pRegionNrItem, SfxUInt16Item, SID_TEMPLATE_REGION, FALSE);
+ SFX_REQUEST_ARG(rReq, pRegionItem, SfxStringItem, SID_TEMPLATE_REGIONNAME, sal_False);
+ SFX_REQUEST_ARG(rReq, pNameItem, SfxStringItem, SID_TEMPLATE_NAME, sal_False);
+ SFX_REQUEST_ARG(rReq, pRegionNrItem, SfxUInt16Item, SID_TEMPLATE_REGION, sal_False);
if ( (!pRegionItem && !pRegionNrItem ) || !pNameItem )
{
DBG_ASSERT( rReq.IsAPI(), "non-API call without Arguments" );
@@ -892,10 +894,10 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
// Prevent entry in the Pick-lists
if ( rReq.IsAPI() )
- GetMedium()->SetUpdatePickList( FALSE );
+ GetMedium()->SetUpdatePickList( sal_False );
else if ( rReq.GetArgs() )
{
- SFX_ITEMSET_GET( *rReq.GetArgs(), pPicklistItem, SfxBoolItem, SID_PICKLIST, FALSE );
+ SFX_ITEMSET_GET( *rReq.GetArgs(), pPicklistItem, SfxBoolItem, SID_PICKLIST, sal_False );
if ( pPicklistItem )
GetMedium()->SetUpdatePickList( pPicklistItem->GetValue() );
}
@@ -911,7 +913,7 @@ void SfxObjectShell::GetState_Impl(SfxItemSet &rSet)
DBG_CHKTHIS(SfxObjectShell, 0);
SfxWhichIter aIter( rSet );
- for ( USHORT nWhich = aIter.FirstWhich(); nWhich; nWhich = aIter.NextWhich() )
+ for ( sal_uInt16 nWhich = aIter.FirstWhich(); nWhich; nWhich = aIter.NextWhich() )
{
switch ( nWhich )
{
@@ -1062,13 +1064,6 @@ void SfxObjectShell::ExecProps_Impl(SfxRequest &rReq)
rReq.Done();
break;
- // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- case SID_PLAYMACRO:
- {
- SFX_APP()->PlayMacro_Impl( rReq, GetBasic() );
- break;
- }
-
case SID_DOCINFO_AUTHOR :
{
::rtl::OUString aStr = ( (SfxStringItem&)rReq.GetArgs()->Get(rReq.GetSlot())).GetValue();
@@ -1098,7 +1093,7 @@ void SfxObjectShell::ExecProps_Impl(SfxRequest &rReq)
void SfxObjectShell::StateProps_Impl(SfxItemSet &rSet)
{
SfxWhichIter aIter(rSet);
- for ( USHORT nSID = aIter.FirstWhich(); nSID; nSID = aIter.NextWhich() )
+ for ( sal_uInt16 nSID = aIter.FirstWhich(); nSID; nSID = aIter.NextWhich() )
{
switch ( nSID )
{
@@ -1180,7 +1175,7 @@ void SfxObjectShell::ExecView_Impl(SfxRequest &rReq)
{
case SID_ACTIVATE:
{
- SfxViewFrame *pFrame = SfxViewFrame::GetFirst( this, TRUE );
+ SfxViewFrame *pFrame = SfxViewFrame::GetFirst( this, sal_True );
if ( pFrame )
pFrame->GetFrame().Appear();
rReq.SetReturnValue( SfxObjectItem( 0, pFrame ) );
@@ -1199,7 +1194,7 @@ void SfxObjectShell::ExecView_Impl(SfxRequest &rReq)
if ( aFileName.Len() )
{
SfxStringItem aName( SID_FILE_NAME, aFileName );
- SfxBoolItem aCreateView( SID_OPEN_NEW_VIEW, TRUE );
+ SfxBoolItem aCreateView( SID_OPEN_NEW_VIEW, sal_True );
SFX_APP()->GetAppDispatcher_Impl()->Execute(
SID_OPENDOC, SFX_CALLMODE_ASYNCHRON, &aName,
&aCreateView, 0L);
@@ -1364,7 +1359,7 @@ void SfxObjectShell::ImplSign( sal_Bool bScriptingContent )
if ( (bHasSign && QueryBox( NULL, SfxResId( MSG_XMLSEC_QUERY_SAVESIGNEDBEFORESIGN ) ).Execute() == RET_YES)
|| (!bHasSign && QueryBox( NULL, SfxResId( RID_XMLSEC_QUERY_SAVEBEFORESIGN ) ).Execute() == RET_YES) )
{
- USHORT nId = SID_SAVEDOC;
+ sal_uInt16 nId = SID_SAVEDOC;
if ( !GetMedium() || !GetMedium()->GetName().Len() )
nId = SID_SAVEASDOC;
SfxRequest aSaveRequest( nId, 0, GetPool() );
@@ -1453,22 +1448,22 @@ void SfxObjectShell::ImplSign( sal_Bool bScriptingContent )
sal_uInt16 SfxObjectShell::GetDocumentSignatureState()
{
- return ImplGetSignatureState( FALSE );
+ return ImplGetSignatureState( sal_False );
}
void SfxObjectShell::SignDocumentContent()
{
- ImplSign( FALSE );
+ ImplSign( sal_False );
}
sal_uInt16 SfxObjectShell::GetScriptingSignatureState()
{
- return ImplGetSignatureState( TRUE );
+ return ImplGetSignatureState( sal_True );
}
void SfxObjectShell::SignScriptingContent()
{
- ImplSign( TRUE );
+ ImplSign( sal_True );
}
// static
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index f41afe7c2c57..106455376b6f 100644..100755
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -110,7 +110,7 @@
#include <sfx2/objsh.hxx>
#include <sfx2/childwin.hxx>
#include <sfx2/request.hxx>
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include <sfx2/docfile.hxx>
#include "fltfnc.hxx"
#include <sfx2/docfilt.hxx>
@@ -194,23 +194,37 @@ sal_Bool SfxObjectShell::SaveAs( SfxMedium& rMedium )
//-------------------------------------------------------------------------
-sal_Bool SfxObjectShell::QuerySlotExecutable( USHORT /*nSlotId*/ )
+sal_Bool SfxObjectShell::QuerySlotExecutable( sal_uInt16 /*nSlotId*/ )
{
return sal_True;
}
//-------------------------------------------------------------------------
-sal_Bool GetPasswd_Impl( const SfxItemSet* pSet, ::rtl::OUString& rPasswd )
+bool GetEncryptionData_Impl( const SfxItemSet* pSet, uno::Sequence< beans::NamedValue >& o_rEncryptionData )
{
- const SfxPoolItem* pItem = NULL;
- if ( pSet && SFX_ITEM_SET == pSet->GetItemState( SID_PASSWORD, sal_True, &pItem ) )
+ bool bResult = false;
+ if ( pSet )
{
- DBG_ASSERT( pItem->IsA( TYPE(SfxStringItem) ), "wrong item type" );
- rPasswd = ( (const SfxStringItem*)pItem )->GetValue();
- return sal_True;
+ SFX_ITEMSET_ARG( pSet, pEncryptionDataItem, SfxUnoAnyItem, SID_ENCRYPTIONDATA, sal_False);
+ if ( pEncryptionDataItem )
+ {
+ pEncryptionDataItem->GetValue() >>= o_rEncryptionData;
+ bResult = true;
+ }
+ else
+ {
+ SFX_ITEMSET_ARG( pSet, pPasswordItem, SfxStringItem, SID_PASSWORD, sal_False);
+ if ( pPasswordItem )
+ {
+ ::rtl::OUString aPassword = pPasswordItem->GetValue();
+ o_rEncryptionData = ::comphelper::OStorageHelper::CreatePackageEncryptionData( aPassword );
+ bResult = true;
+ }
+ }
}
- return sal_False;
+
+ return bResult;
}
//-------------------------------------------------------------------------
@@ -599,7 +613,7 @@ sal_Bool SfxObjectShell::DoLoad( SfxMedium *pMed )
SetError( nError, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
if (pMedium->GetFilter()->GetFilterFlags() & SFX_FILTER_STARTPRESENTATION)
- pSet->Put( SfxBoolItem( SID_DOC_STARTPRESENTATION, TRUE) );
+ pSet->Put( SfxBoolItem( SID_DOC_STARTPRESENTATION, sal_True) );
}
EnableSetModified( sal_False );
@@ -830,7 +844,7 @@ sal_uInt32 SfxObjectShell::HandleFilter( SfxMedium* pMedium, SfxObjectShell* pDo
if( xFilterCFG.is() )
{
- BOOL bAbort = FALSE;
+ sal_Bool bAbort = sal_False;
try {
const SfxFilter* pFilter = pMedium->GetFilter();
Sequence < PropertyValue > aProps;
@@ -890,7 +904,7 @@ sal_uInt32 SfxObjectShell::HandleFilter( SfxMedium* pMedium, SfxObjectShell* pDo
pSet->Put( *pFilterData );
}
else
- bAbort = TRUE;
+ bAbort = sal_True;
}
}
@@ -951,15 +965,15 @@ sal_Bool SfxObjectShell::DoSave()
pImp->bIsSaving = sal_True;
- ::rtl::OUString aPasswd;
+ uno::Sequence< beans::NamedValue > aEncryptionData;
if ( IsPackageStorageFormat_Impl( *GetMedium() ) )
{
- if ( GetPasswd_Impl( GetMedium()->GetItemSet(), aPasswd ) )
+ if ( GetEncryptionData_Impl( GetMedium()->GetItemSet(), aEncryptionData ) )
{
try
{
//TODO/MBA: GetOutputStorage?! Special mode, because it's "Save"?!
- ::comphelper::OStorageHelper::SetCommonStoragePassword( GetMedium()->GetStorage(), aPasswd );
+ ::comphelper::OStorageHelper::SetCommonStorageEncryptionData( GetMedium()->GetStorage(), aEncryptionData );
bOk = sal_True;
}
catch( uno::Exception& )
@@ -1019,7 +1033,7 @@ sal_Bool SfxObjectShell::DoSave()
return bOk;
}
-void Lock_Impl( SfxObjectShell* pDoc, BOOL bLock )
+void Lock_Impl( SfxObjectShell* pDoc, sal_Bool bLock )
{
SfxViewFrame *pFrame= SfxViewFrame::GetFirst( pDoc );
while ( pFrame )
@@ -1337,13 +1351,13 @@ sal_Bool SfxObjectShell::SaveTo_Impl
}
// transfer password from the parameters to the storage
- ::rtl::OUString aPasswd;
+ uno::Sequence< beans::NamedValue > aEncryptionData;
sal_Bool bPasswdProvided = sal_False;
- if ( GetPasswd_Impl( rMedium.GetItemSet(), aPasswd ) )
+ if ( GetEncryptionData_Impl( rMedium.GetItemSet(), aEncryptionData ) )
{
bPasswdProvided = sal_True;
try {
- ::comphelper::OStorageHelper::SetCommonStoragePassword( xMedStorage, aPasswd );
+ ::comphelper::OStorageHelper::SetCommonStorageEncryptionData( xMedStorage, aEncryptionData );
bOk = sal_True;
}
catch( uno::Exception& )
@@ -1506,7 +1520,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl
if( bOk && !bCopyTo )
// we also don't touch any graphical replacements here
- bOk = SaveChildren( TRUE );
+ bOk = SaveChildren( sal_True );
}
if ( bOk )
@@ -1706,8 +1720,8 @@ 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 */
+ sal_uInt16 usAttr; /* value: EAT_ASCII */
+ sal_uInt16 usLen; /* length of data */
CHAR szType[_MAX_PATH]; /* ASCII data fits in here ... */
} EA_ASCII_HEADER;
char filePath[_MAX_PATH];
@@ -1749,7 +1763,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl
eaAscii.usLen = strlen( eaAscii.szType);
// fill libc EA data structure
eaType.flags = 0;
- eaType.size = sizeof(USHORT)*2 + eaAscii.usLen;
+ eaType.size = sizeof(sal_uInt16)*2 + eaAscii.usLen;
eaType.value = &eaAscii;
// put EA to file
rc = _ea_put( &eaType, filePath, 0, ".TYPE");
@@ -1900,7 +1914,7 @@ sal_Bool SfxObjectShell::ConnectTmpStorage_Impl(
//-------------------------------------------------------------------------
-sal_Bool SfxObjectShell::DoSaveObjectAs( SfxMedium& rMedium, BOOL bCommit )
+sal_Bool SfxObjectShell::DoSaveObjectAs( SfxMedium& rMedium, sal_Bool bCommit )
{
sal_Bool bOk = sal_False;
{
@@ -2222,7 +2236,7 @@ sal_Bool SfxObjectShell::InsertFrom( SfxMedium& rMedium )
const OUString sInputStream ( RTL_CONSTASCII_USTRINGPARAM ( "InputStream" ) );
sal_Bool bHasInputStream = sal_False;
- BOOL bHasBaseURL = FALSE;
+ sal_Bool bHasBaseURL = sal_False;
sal_Int32 i;
sal_Int32 nEnd = lDescriptor.getLength();
@@ -2317,7 +2331,7 @@ sal_Bool SfxObjectShell::ImportFrom( SfxMedium& rMedium )
const OUString sInputStream ( RTL_CONSTASCII_USTRINGPARAM ( "InputStream" ) );
sal_Bool bHasInputStream = sal_False;
- BOOL bHasBaseURL = FALSE;
+ sal_Bool bHasBaseURL = sal_False;
sal_Int32 i;
sal_Int32 nEnd = lDescriptor.getLength();
@@ -2408,9 +2422,9 @@ sal_Bool SfxObjectShell::ExportTo( SfxMedium& rMedium )
// put in the REAL file name, and copy all PropertyValues
const OUString sOutputStream ( RTL_CONSTASCII_USTRINGPARAM ( "OutputStream" ) );
const OUString sStream ( RTL_CONSTASCII_USTRINGPARAM ( "StreamForOutput" ) );
- BOOL bHasOutputStream = FALSE;
- BOOL bHasStream = FALSE;
- BOOL bHasBaseURL = FALSE;
+ sal_Bool bHasOutputStream = sal_False;
+ sal_Bool bHasStream = sal_False;
+ sal_Bool bHasBaseURL = sal_False;
sal_Int32 i;
sal_Int32 nEnd = aOldArgs.getLength();
@@ -2602,7 +2616,7 @@ sal_Bool SfxObjectShell::Save_Impl( const SfxItemSet* pSet )
DBG_CHKTHIS(SfxObjectShell, 0);
pImp->bIsSaving = sal_True;
- sal_Bool bSaved = FALSE;
+ sal_Bool bSaved = sal_False;
SFX_ITEMSET_ARG( GetMedium()->GetItemSet(), pSalvageItem, SfxStringItem, SID_DOC_SALVAGE, sal_False);
if ( pSalvageItem )
{
@@ -2696,7 +2710,7 @@ sal_Bool SfxObjectShell::CommonSaveAs_Impl
SfxMedium *pActMed = GetMedium();
const INetURLObject aActName(pActMed->GetName());
- BOOL bWasReadonly = IsReadOnly();
+ sal_Bool bWasReadonly = IsReadOnly();
if ( aURL == aActName && aURL != INetURLObject( OUString(RTL_CONSTASCII_USTRINGPARAM("private:stream")) )
&& IsReadOnly() )
@@ -2881,7 +2895,7 @@ sal_Bool SfxObjectShell::PreDoSaveAs_Impl
if ( !bCopyTo )
{
// reconnect to the old medium
- BOOL bRet( FALSE );
+ sal_Bool bRet( sal_False );
bRet = DoSaveCompleted( pMedium );
DBG_ASSERT( bRet, "Error in DoSaveCompleted, can't be handled!");
(void)bRet;
@@ -2939,7 +2953,7 @@ sal_Bool SfxObjectShell::IsInformationLost()
{
const SfxFilter *pFilt = GetMedium()->GetFilter();
DBG_ASSERT( pFilt && aFilterName.equals( pFilt->GetName() ), "MediaDescriptor contains wrong filter!\n" );
- return ( pFilt && pFilt->IsAlienFormat() && !(pFilt->GetFilterFlags() & SFX_FILTER_SILENTEXPORT ) );
+ return ( pFilt && pFilt->IsAlienFormat() );
}
return sal_False;
@@ -2975,7 +2989,7 @@ sal_uInt16 SfxObjectShell::GetHiddenInformationState( sal_uInt16 nStates )
sal_Int16 SfxObjectShell::QueryHiddenInformation( HiddenWarningFact eFact, Window* pParent )
{
sal_Int16 nRet = RET_YES;
- USHORT nResId = 0;
+ sal_uInt16 nResId = 0;
SvtSecurityOptions::EOption eOption = static_cast< SvtSecurityOptions::EOption >( -1 );
switch ( eFact )
@@ -3081,13 +3095,13 @@ sal_Bool SfxObjectShell::LoadOwnFormat( SfxMedium& rMedium )
SFX_ITEMSET_ARG( rMedium.GetItemSet(), pPasswdItem, SfxStringItem, SID_PASSWORD, sal_False );
if ( pPasswdItem || ERRCODE_IO_ABORT != CheckPasswd_Impl( this, SFX_APP()->GetPool(), pMedium ) )
{
- ::rtl::OUString aPasswd;
- if ( GetPasswd_Impl(pMedium->GetItemSet(), aPasswd) )
+ uno::Sequence< beans::NamedValue > aEncryptionData;
+ if ( GetEncryptionData_Impl(pMedium->GetItemSet(), aEncryptionData) )
{
try
{
// the following code must throw an exception in case of failure
- ::comphelper::OStorageHelper::SetCommonStoragePassword( xStorage, aPasswd );
+ ::comphelper::OStorageHelper::SetCommonStorageEncryptionData( xStorage, aEncryptionData );
}
catch( uno::Exception& )
{
@@ -3155,7 +3169,7 @@ uno::Reference< embed::XStorage > SfxObjectShell::GetStorage()
}
-sal_Bool SfxObjectShell::SaveChildren( BOOL bObjectsOnly )
+sal_Bool SfxObjectShell::SaveChildren( sal_Bool bObjectsOnly )
{
RTL_LOGFILE_CONTEXT( aLog, "sfx2 (mv76033) SfxObjectShell::SaveChildren" );
@@ -3261,7 +3275,7 @@ sal_Bool SfxObjectShell::SaveCompleted( const uno::Reference< embed::XStorage >&
#ifdef DBG_UTIL
// check for wrong creation of object container
- BOOL bHasContainer = ( pImp->mpObjectContainer != 0 );
+ sal_Bool bHasContainer = ( pImp->mpObjectContainer != 0 );
#endif
if ( !xStorage.is() || xStorage == GetStorage() )
@@ -3410,7 +3424,7 @@ sal_Bool SfxObjectShell::SwitchPersistance( const uno::Reference< embed::XStorag
sal_Bool bResult = sal_False;
#ifdef DBG_UTIL
// check for wrong creation of object container
- BOOL bHasContainer = ( pImp->mpObjectContainer != 0 );
+ sal_Bool bHasContainer = ( pImp->mpObjectContainer != 0 );
#endif
if ( xStorage.is() )
{
diff --git a/sfx2/source/doc/objuno.cxx b/sfx2/source/doc/objuno.cxx
index 9b297b378adc..639692894267 100644..100755
--- a/sfx2/source/doc/objuno.cxx
+++ b/sfx2/source/doc/objuno.cxx
@@ -70,7 +70,7 @@
#include <vector>
#include <algorithm>
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include "doc.hrc"
using namespace ::com::sun::star;
@@ -133,10 +133,10 @@ const SfxItemPropertyMapEntry* lcl_GetDocInfoPropertyMap()
return aDocInfoPropertyMap_Impl;
}
-static USHORT aDaysInMonth[12] = { 31, 28, 31, 30, 31, 30,
+static sal_uInt16 aDaysInMonth[12] = { 31, 28, 31, 30, 31, 30,
31, 31, 30, 31, 30, 31 };
-inline USHORT DaysInMonth( USHORT nMonth, USHORT nYear )
+inline sal_uInt16 DaysInMonth( sal_uInt16 nMonth, sal_uInt16 nYear )
{
if ( nMonth != 2 )
return aDaysInMonth[nMonth-1];
@@ -713,7 +713,7 @@ void SAL_CALL SfxDocumentInfoObject::removeProperty(const ::rtl::OUString& sName
return xPropSet->removeProperty(sName);
}
-BOOL equalsDateTime( const util::DateTime& D1, const util::DateTime& D2 )
+sal_Bool equalsDateTime( const util::DateTime& D1, const util::DateTime& D2 )
{
return D1.HundredthSeconds == D2.HundredthSeconds &&
D1.Seconds == D2.Seconds &&
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index d09bad7feea3..fc6856fdb083 100644..100755
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -49,7 +49,7 @@
#include <svl/eitem.hxx>
#include <tools/rtti.hxx>
#include <svl/lstner.hxx>
-#include <sfxhelp.hxx>
+#include <sfx2/sfxhelp.hxx>
#include <basic/sbstar.hxx>
#include <svl/stritem.hxx>
#include <basic/sbx.hxx>
@@ -87,7 +87,7 @@
#include <sfx2/dispatch.hxx>
#include <sfx2/viewsh.hxx>
#include <sfx2/viewfrm.hxx>
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include "objshimp.hxx"
#include "appbas.hxx"
#include "sfxtypes.hxx"
@@ -98,8 +98,8 @@
#include "appdata.hxx"
#include <sfx2/appuno.hxx>
#include <sfx2/sfxsids.hrc>
-#include "basmgr.hxx"
-#include "QuerySaveDocument.hxx"
+#include "sfx2/basmgr.hxx"
+#include "sfx2/QuerySaveDocument.hxx"
#include "helpid.hrc"
#include <sfx2/msg.hxx>
#include "appbaslib.hxx"
@@ -197,11 +197,11 @@ void SAL_CALL SfxModelListener_Impl::disposing( const com::sun::star::lang::Even
if ( mpDoc->Get_Impl()->bHiddenLockedByAPI )
{
- mpDoc->Get_Impl()->bHiddenLockedByAPI = FALSE;
- mpDoc->OwnerLock(FALSE);
+ mpDoc->Get_Impl()->bHiddenLockedByAPI = sal_False;
+ mpDoc->OwnerLock(sal_False);
}
else if ( !mpDoc->Get_Impl()->bClosing )
- // GCC crashes when already in the destructor, so first query the Flag
+ // GCC stuerzt ab, wenn schon im dtor, also vorher Flag abfragen
mpDoc->DoClose();
}
@@ -816,11 +816,33 @@ void SfxObjectShell::InitBasicManager_Impl()
*/
{
- DBG_ASSERT( !pImp->bBasicInitialized && !pImp->pBasicManager->isValid(), "Local BasicManager already exists");
- pImp->bBasicInitialized = TRUE;
-
+ /* #163556# (DR) - Handling of recursive calls while creating the Bacic
+ manager.
+
+ It is possible that (while creating the Basic manager) the code that
+ imports the Basic storage wants to access the Basic manager again.
+ Especially in VBA compatibility mode, there is code that wants to
+ access the "VBA Globals" object which is stored as global UNO constant
+ in the Basic manager.
+
+ To achieve correct handling of the recursive calls of this function
+ from lcl_getBasicManagerForDocument(), the implementation of the
+ function BasicManagerRepository::getDocumentBasicManager() has been
+ changed to return the Basic manager currently under construction, when
+ called repeatedly.
+
+ The variable pImp->bBasicInitialized will be set to sal_True after
+ construction now, to ensure that the recursive call of the function
+ lcl_getBasicManagerForDocument() will be routed into this function too.
+
+ Calling BasicManagerHolder::reset() twice is not a big problem, as it
+ does not take ownership but stores only the raw pointer. Owner of all
+ Basic managers is the global BasicManagerRepository instance.
+ */
+ DBG_ASSERT( !pImp->bBasicInitialized && !pImp->pBasicManager->isValid(), "Lokaler BasicManager bereits vorhanden");
pImp->pBasicManager->reset( BasicManagerRepository::getDocumentBasicManager( GetModel() ) );
DBG_ASSERT( pImp->pBasicManager->isValid(), "SfxObjectShell::InitBasicManager_Impl: did not get a BasicManager!" );
+ pImp->bBasicInitialized = sal_True;
}
//--------------------------------------------------------------------
@@ -846,7 +868,7 @@ SfxObjectShell* SfxObjectShell::GetObjectShell()
//--------------------------------------------------------------------
-SEQUENCE< OUSTRING > SfxObjectShell::GetEventNames()
+uno::Sequence< ::rtl::OUString > SfxObjectShell::GetEventNames()
{
static uno::Sequence< ::rtl::OUString >* pEventNameContainer = NULL;
@@ -936,7 +958,7 @@ String SfxObjectShell::GetServiceNameFromFactory( const String& rFact )
String aPrefix = String::CreateFromAscii( "private:factory/" );
if ( aPrefix.Len() == aFact.Match( aPrefix ) )
aFact.Erase( 0, aPrefix.Len() );
- USHORT nPos = aFact.Search( '?' );
+ sal_uInt16 nPos = aFact.Search( '?' );
String aParam;
if ( nPos != STRING_NOTFOUND )
{
@@ -1035,8 +1057,8 @@ Reference<lang::XComponent> SfxObjectShell::CreateAndLoadComponent( const SfxIte
{
uno::Sequence < beans::PropertyValue > aProps;
TransformItems( SID_OPENDOC, rSet, aProps );
- SFX_ITEMSET_ARG(&rSet, pFileNameItem, SfxStringItem, SID_FILE_NAME, FALSE);
- SFX_ITEMSET_ARG(&rSet, pTargetItem, SfxStringItem, SID_TARGETNAME, FALSE);
+ SFX_ITEMSET_ARG(&rSet, pFileNameItem, SfxStringItem, SID_FILE_NAME, sal_False);
+ SFX_ITEMSET_ARG(&rSet, pTargetItem, SfxStringItem, SID_TARGETNAME, sal_False);
::rtl::OUString aURL;
::rtl::OUString aTarget(RTL_CONSTASCII_USTRINGPARAM("_blank"));
if ( pFileNameItem )
diff --git a/sfx2/source/doc/oleprops.cxx b/sfx2/source/doc/oleprops.cxx
index 0f884ab32694..0e6113f94f99 100644..100755
--- a/sfx2/source/doc/oleprops.cxx
+++ b/sfx2/source/doc/oleprops.cxx
@@ -591,14 +591,14 @@ void SfxOleFileTimeProperty::ImplSave( SvStream& rStrm )
{
DateTime aDateTimeUtc(
Date(
- static_cast< USHORT >( maDateTime.Day ),
- static_cast< USHORT >( maDateTime.Month ),
- static_cast< USHORT >( maDateTime.Year ) ),
+ static_cast< sal_uInt16 >( maDateTime.Day ),
+ static_cast< sal_uInt16 >( maDateTime.Month ),
+ static_cast< sal_uInt16 >( maDateTime.Year ) ),
Time(
- static_cast< ULONG >( maDateTime.Hours ),
- static_cast< ULONG >( maDateTime.Minutes ),
- static_cast< ULONG >( maDateTime.Seconds ),
- static_cast< ULONG >( maDateTime.HundredthSeconds ) ) );
+ static_cast< sal_uIntPtr >( maDateTime.Hours ),
+ static_cast< sal_uIntPtr >( maDateTime.Minutes ),
+ static_cast< sal_uIntPtr >( maDateTime.Seconds ),
+ static_cast< sal_uIntPtr >( maDateTime.HundredthSeconds ) ) );
// invalid time stamp is not converted to UTC
// heuristic to detect editing durations (which we assume to be < 1 year):
// check only the year, not the entire date
diff --git a/sfx2/source/doc/oleprops.hxx b/sfx2/source/doc/oleprops.hxx
index d4abac5bac7e..d4abac5bac7e 100644..100755
--- a/sfx2/source/doc/oleprops.hxx
+++ b/sfx2/source/doc/oleprops.hxx
diff --git a/sfx2/source/doc/ownsubfilterservice.cxx b/sfx2/source/doc/ownsubfilterservice.cxx
index de28259e2391..de28259e2391 100644..100755
--- a/sfx2/source/doc/ownsubfilterservice.cxx
+++ b/sfx2/source/doc/ownsubfilterservice.cxx
diff --git a/sfx2/source/doc/plugin.cxx b/sfx2/source/doc/plugin.cxx
index dbbbb706d36d..10ba8dc4ede3 100644..100755
--- a/sfx2/source/doc/plugin.cxx
+++ b/sfx2/source/doc/plugin.cxx
@@ -106,7 +106,7 @@ throw( uno::RuntimeException )
{
uno::Reference< plugin::XPluginManager > xPMgr( mxFact->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.plugin.PluginManager")) ), uno::UNO_QUERY );
if (!xPMgr.is() )
- return FALSE;
+ return sal_False;
if ( SvtMiscOptions().IsPluginsEnabled() )
{
@@ -116,10 +116,10 @@ throw( uno::RuntimeException )
pWin->SetBackground();
pWin->Show();
- ULONG nCount = maCmdList.Count();
+ sal_uIntPtr nCount = maCmdList.Count();
uno::Sequence < ::rtl::OUString > aCmds( nCount ), aArgs( nCount );
::rtl::OUString *pCmds = aCmds.getArray(), *pArgs = aArgs.getArray();
- for( ULONG i = 0; i < nCount; i++ )
+ for( sal_uIntPtr i = 0; i < nCount; i++ )
{
SvCommand & rCmd = maCmdList.GetObject( i );
pCmds[i] = rCmd.GetCommand();
@@ -137,7 +137,7 @@ throw( uno::RuntimeException )
{
pWin->xWindow = xWindow;
pWin->Resize();
- xWindow->setVisible( TRUE );
+ xWindow->setVisible( sal_True );
}
try
@@ -166,10 +166,10 @@ throw( uno::RuntimeException )
// we must destroy the plugin before the parent is destroyed
xWindow->addEventListener( this );
xFrame->setComponent( xWindow, uno::Reference < frame::XController >() );
- return mxPlugin.is() ? TRUE : FALSE;
+ return mxPlugin.is() ? sal_True : sal_False;
}
- return FALSE;
+ return sal_False;
}
void SAL_CALL PluginObject::cancel() throw( com::sun::star::uno::RuntimeException )
diff --git a/sfx2/source/doc/printhelper.cxx b/sfx2/source/doc/printhelper.cxx
index 6952f900e315..abc3b0d38a3b 100644..100755
--- a/sfx2/source/doc/printhelper.cxx
+++ b/sfx2/source/doc/printhelper.cxx
@@ -54,7 +54,6 @@
#include <ucbhelper/content.hxx>
#include <cppuhelper/interfacecontainer.hxx>
#include <osl/mutex.hxx>
-#include <svtools/printdlg.hxx>
#include <cppuhelper/implbase1.hxx>
#include <sfx2/viewfrm.hxx>
@@ -346,7 +345,7 @@ void SfxPrintHelper::impl_setPrinter(const uno::Sequence< beans::PropertyValue >
// Name-Property?
if ( rProp.Name.compareToAscii( "Name" ) == 0 )
{
- OUSTRING sTemp;
+ ::rtl::OUString sTemp;
if ( ( rProp.Value >>= sTemp ) == sal_False )
throw ::com::sun::star::lang::IllegalArgumentException();
@@ -424,8 +423,8 @@ void SfxPrintHelper::impl_setPrinter(const uno::Sequence< beans::PropertyValue >
rtl::OUString aTmp;
if ( ( rProp.Value >>= aTmp ) == sal_False )
throw ::com::sun::star::lang::IllegalArgumentException();
- USHORT nCount = pPrinter->GetPaperBinCount();
- for (USHORT nBin=0; nBin<nCount; nBin++)
+ sal_uInt16 nCount = pPrinter->GetPaperBinCount();
+ for (sal_uInt16 nBin=0; nBin<nCount; nBin++)
{
::rtl::OUString aName( pPrinter->GetPaperBinName(nBin) );
if ( aName == aTmp )
@@ -617,9 +616,9 @@ void SAL_CALL SfxPrintHelper::print(const uno::Sequence< beans::PropertyValue >&
if ( rProp.Name.compareToAscii( "FileName" ) == 0 )
{
// unpack th URL and check for a valid and well known protocol
- OUSTRING sTemp;
+ ::rtl::OUString sTemp;
if (
- ( rProp.Value.getValueType()!=::getCppuType((const OUSTRING*)0)) ||
+ ( rProp.Value.getValueType()!=::getCppuType((const ::rtl::OUString*)0)) ||
(!(rProp.Value>>=sTemp))
)
{
@@ -716,7 +715,7 @@ void SAL_CALL SfxPrintHelper::print(const uno::Sequence< beans::PropertyValue >&
// Pages-Property
else if ( rProp.Name.compareToAscii( "Pages" ) == 0 )
{
- OUSTRING sTemp;
+ ::rtl::OUString sTemp;
if( rProp.Value >>= sTemp )
{
aCheckedArgs[nProps].Name = rProp.Name;
diff --git a/sfx2/source/doc/printhelper.hxx b/sfx2/source/doc/printhelper.hxx
index d5b5ba83dffd..d5b5ba83dffd 100644..100755
--- a/sfx2/source/doc/printhelper.hxx
+++ b/sfx2/source/doc/printhelper.hxx
diff --git a/sfx2/source/doc/querytemplate.cxx b/sfx2/source/doc/querytemplate.cxx
index 88d03f3e4094..076780971e2b 100644..100755
--- a/sfx2/source/doc/querytemplate.cxx
+++ b/sfx2/source/doc/querytemplate.cxx
@@ -30,9 +30,9 @@
#include "precompiled_sfx2.hxx"
#include "querytemplate.hxx"
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include "doc.hrc"
-
+#include "helpid.hrc"
#include <vcl/svapp.hxx>
namespace sfx2
@@ -42,7 +42,7 @@ QueryTemplateBox::QueryTemplateBox( Window* pParent, const String& rMessage ) :
MessBox ( pParent, 0, Application::GetDisplayName(), rMessage )
{
SetImage( QueryBox::GetStandardImage() );
- SetHelpId( MSG_QUERY_LOAD_TEMPLATE );
+ SetHelpId( HID_QUERY_LOAD_TEMPLATE );
AddButton( String( SfxResId( STR_QRYTEMPL_UPDATE_BTN ) ), RET_YES,
BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_OKBUTTON | BUTTONDIALOG_FOCUSBUTTON );
diff --git a/sfx2/source/doc/querytemplate.hxx b/sfx2/source/doc/querytemplate.hxx
index ef27654cc922..ef27654cc922 100644..100755
--- a/sfx2/source/doc/querytemplate.hxx
+++ b/sfx2/source/doc/querytemplate.hxx
diff --git a/sfx2/source/doc/sfxacldetect.cxx b/sfx2/source/doc/sfxacldetect.cxx
index 57680b360293..289a44a44237 100644..100755
--- a/sfx2/source/doc/sfxacldetect.cxx
+++ b/sfx2/source/doc/sfxacldetect.cxx
@@ -29,7 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sfx2.hxx"
-#include "sfxacldetect.hxx"
+
#if EXTRA_ACL_CHECK
diff --git a/sfx2/source/doc/sfxacldetect.hxx b/sfx2/source/doc/sfxacldetect.hxx
index 40112f3b8bad..40112f3b8bad 100644..100755
--- a/sfx2/source/doc/sfxacldetect.hxx
+++ b/sfx2/source/doc/sfxacldetect.hxx
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index b09ee2493ca4..480470c6ba25 100644..100755
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -103,7 +103,7 @@
//________________________________________________________________________________________________________
#include <sfx2/sfxbasecontroller.hxx>
-#include "viewfac.hxx"
+#include "sfx2/viewfac.hxx"
#include "workwin.hxx"
#include <sfx2/signaturestate.hxx>
#include <sfx2/sfxuno.hxx>
@@ -115,7 +115,7 @@
#include <sfx2/request.hxx>
#include <sfx2/objuno.hxx>
#include <sfx2/printer.hxx>
-#include <basmgr.hxx>
+#include <sfx2/basmgr.hxx>
#include <sfx2/event.hxx>
#include <eventsupplier.hxx>
#include <sfx2/evntconf.hxx>
@@ -126,12 +126,13 @@
#include <sfx2/docfac.hxx>
#include <sfx2/fcontnr.hxx>
#include "sfx2/docstoragemodifylistener.hxx"
-#include "brokenpackageint.hxx"
+#include "sfx2/brokenpackageint.hxx"
#include "graphhelp.hxx"
+#include "docundomanager.hxx"
#include <sfx2/msgpool.hxx>
#include <sfx2/DocumentMetadataAccess.hxx>
-#include <sfxresid.hxx>
+#include <sfx2/sfxresid.hxx>
//________________________________________________________________________________________________________
// namespaces
@@ -150,6 +151,10 @@ using ::com::sun::star::lang::WrappedTargetException;
using ::com::sun::star::uno::Type;
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::document::XDocumentRecovery;
+using ::com::sun::star::document::XUndoManager;
+using ::com::sun::star::document::XUndoAction;
+using ::com::sun::star::document::UndoFailedException;
+using ::com::sun::star::frame::XModel;
/** This Listener is used to get notified when the XDocumentProperties of the
XModel change.
@@ -218,15 +223,17 @@ struct IMPL_SfxBaseModel_DataContainer : public ::sfx2::IModifiableDocument
sal_Bool m_bSaving ;
sal_Bool m_bSuicide ;
sal_Bool m_bInitialized ;
+ sal_Bool m_bExternalTitle ;
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;
::rtl::Reference< ::sfx2::DocumentStorageModifyListener > m_pStorageModifyListen;
- ::rtl::OUString m_sModuleIdentifier;
+ ::rtl::OUString m_sModuleIdentifier;
css::uno::Reference< css::frame::XTitle > m_xTitleHelper;
css::uno::Reference< css::frame::XUntitledNumbers > m_xNumberedControllers;
- uno::Reference< rdf::XDocumentMetadataAccess> m_xDocumentMetadata;
+ uno::Reference< rdf::XDocumentMetadataAccess> m_xDocumentMetadata;
+ ::rtl::Reference< ::sfx2::DocumentUndoManager > m_pDocumentUndoManager;
IMPL_SfxBaseModel_DataContainer( ::osl::Mutex& rMutex, SfxObjectShell* pObjectShell )
@@ -238,11 +245,13 @@ struct IMPL_SfxBaseModel_DataContainer : public ::sfx2::IModifiableDocument
, m_bSaving ( sal_False )
, m_bSuicide ( sal_False )
, m_bInitialized ( sal_False )
+ , m_bExternalTitle ( sal_False )
, m_bModifiedSinceLastSave( sal_False )
, m_pStorageModifyListen ( NULL )
, m_xTitleHelper ()
, m_xNumberedControllers ()
, m_xDocumentMetadata () // lazy
+ , m_pDocumentUndoManager ()
{
// increase global instance counter.
++g_nInstanceCounter;
@@ -499,10 +508,10 @@ SfxSaveGuard::~SfxSaveGuard()
m_pData->m_bSaving = sal_False;
// m_bSuicide was set e.g. in case somewhere tried to close a document, while it was used for
- // storing at the same time. Further m_bSuicide was set to TRUE only if close(TRUE) was called.
+ // storing at the same time. Further m_bSuicide was set to sal_True only if close(sal_True) was called.
// So the owner ship was delegated to the place where a veto exception was thrown.
// Now we have to call close() again and delegate the owner ship to the next one, which
- // cant accept that. Close(FALSE) cant work in this case. Because then the document will may be never closed ...
+ // cant accept that. Close(sal_False) cant work in this case. Because then the document will may be never closed ...
if ( m_pData->m_bSuicide )
{
@@ -783,6 +792,12 @@ void SAL_CALL SfxBaseModel::dispose() throw(::com::sun::star::uno::RuntimeExcept
m_pData->m_pStorageModifyListen = NULL;
}
+ if ( m_pData->m_pDocumentUndoManager.is() )
+ {
+ m_pData->m_pDocumentUndoManager->disposing();
+ m_pData->m_pDocumentUndoManager = NULL;
+ }
+
lang::EventObject aEvent( (frame::XModel *)this );
m_pData->m_aInterfaceContainer.disposeAndClear( aEvent );
@@ -982,6 +997,8 @@ sal_Bool SAL_CALL SfxBaseModel::attachResource( const ::rtl::OUString&
aArgs.remove( "InputStream" );
aArgs.remove( "URL" );
aArgs.remove( "Frame" );
+ aArgs.remove( "Password" );
+ aArgs.remove( "EncryptionData" );
// TODO/LATER: all the parameters that are accepted by ItemSet of the DocShell must be removed here
@@ -1183,6 +1200,51 @@ void SAL_CALL SfxBaseModel::disconnectController( const uno::Reference< frame::X
m_pData->m_xCurrent = uno::Reference< frame::XController > ();
}
+namespace
+{
+ typedef ::cppu::WeakImplHelper1< XUndoAction > ControllerLockUndoAction_Base;
+ class ControllerLockUndoAction : public ControllerLockUndoAction_Base
+ {
+ public:
+ ControllerLockUndoAction( const Reference< XModel >& i_model, const bool i_undoIsUnlock )
+ :m_xModel( i_model )
+ ,m_bUndoIsUnlock( i_undoIsUnlock )
+ {
+ }
+
+ // XUndoAction
+ virtual ::rtl::OUString SAL_CALL getTitle() throw (RuntimeException);
+ virtual void SAL_CALL undo( ) throw (UndoFailedException, RuntimeException);
+ virtual void SAL_CALL redo( ) throw (UndoFailedException, RuntimeException);
+
+ private:
+ const Reference< XModel > m_xModel;
+ const bool m_bUndoIsUnlock;
+ };
+
+ ::rtl::OUString SAL_CALL ControllerLockUndoAction::getTitle() throw (RuntimeException)
+ {
+ // this action is intended to be used within an UndoContext only, so nobody will ever see this title ...
+ return ::rtl::OUString();
+ }
+
+ void SAL_CALL ControllerLockUndoAction::undo( ) throw (UndoFailedException, RuntimeException)
+ {
+ if ( m_bUndoIsUnlock )
+ m_xModel->unlockControllers();
+ else
+ m_xModel->lockControllers();
+ }
+
+ void SAL_CALL ControllerLockUndoAction::redo( ) throw (UndoFailedException, RuntimeException)
+ {
+ if ( m_bUndoIsUnlock )
+ m_xModel->lockControllers();
+ else
+ m_xModel->unlockControllers();
+ }
+}
+
//________________________________________________________________________________________________________
// frame::XModel
//________________________________________________________________________________________________________
@@ -1192,6 +1254,14 @@ void SAL_CALL SfxBaseModel::lockControllers() throw(::com::sun::star::uno::Runti
SfxModelGuard aGuard( *this );
++m_pData->m_nControllerLockCount ;
+
+ if ( m_pData->m_pDocumentUndoManager.is()
+ && m_pData->m_pDocumentUndoManager->isInContext()
+ && !m_pData->m_pDocumentUndoManager->isLocked()
+ )
+ {
+ m_pData->m_pDocumentUndoManager->addUndoAction( new ControllerLockUndoAction( this, true ) );
+ }
}
//________________________________________________________________________________________________________
@@ -1203,6 +1273,14 @@ void SAL_CALL SfxBaseModel::unlockControllers() throw(::com::sun::star::uno::Run
SfxModelGuard aGuard( *this );
--m_pData->m_nControllerLockCount ;
+
+ if ( m_pData->m_pDocumentUndoManager.is()
+ && m_pData->m_pDocumentUndoManager->isInContext()
+ && !m_pData->m_pDocumentUndoManager->isLocked()
+ )
+ {
+ m_pData->m_pDocumentUndoManager->addUndoAction( new ControllerLockUndoAction( this, false ) );
+ }
}
//________________________________________________________________________________________________________
@@ -1635,10 +1713,26 @@ void SAL_CALL SfxBaseModel::storeAsURL( const ::rtl::OUString&
uno::Sequence< beans::PropertyValue > aSequence ;
TransformItems( SID_OPENDOC, *m_pData->m_pObjectShell->GetMedium()->GetItemSet(), aSequence );
attachResource( rURL, aSequence );
+
+#if OSL_DEBUG_LEVEL > 0
+ SFX_ITEMSET_ARG( m_pData->m_pObjectShell->GetMedium()->GetItemSet(), pPasswdItem, SfxStringItem, SID_PASSWORD, sal_False);
+ OSL_ENSURE( !pPasswdItem, "There should be no Password property in the document MediaDescriptor!" );
+#endif
}
}
//________________________________________________________________________________________________________
+// XUndoManagerSupplier
+//________________________________________________________________________________________________________
+Reference< XUndoManager > SAL_CALL SfxBaseModel::getUndoManager( ) throw (RuntimeException)
+{
+ SfxModelGuard aGuard( *this );
+ if ( !m_pData->m_pDocumentUndoManager.is() )
+ m_pData->m_pDocumentUndoManager.set( new ::sfx2::DocumentUndoManager( *this ) );
+ return m_pData->m_pDocumentUndoManager.get();
+}
+
+//________________________________________________________________________________________________________
// XStorable
//________________________________________________________________________________________________________
@@ -1783,13 +1877,12 @@ void SAL_CALL SfxBaseModel::load( const uno::Sequence< beans::PropertyValue >&
if ( nError == ERRCODE_IO_BROKENPACKAGE && xHandler.is() )
{
::rtl::OUString aDocName = pMedium->GetURLObject().getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET );
- SFX_ITEMSET_ARG( pMedium->GetItemSet(), pRepairItem, SfxBoolItem, SID_REPAIRPACKAGE, FALSE );
+ SFX_ITEMSET_ARG( pMedium->GetItemSet(), pRepairItem, SfxBoolItem, SID_REPAIRPACKAGE, sal_False );
if ( !pRepairItem || !pRepairItem->GetValue() )
{
- RequestPackageReparation* pRequest = new RequestPackageReparation( aDocName );
- com::sun::star::uno::Reference< com::sun::star::task::XInteractionRequest > xRequest ( pRequest );
- xHandler->handle( xRequest );
- if( pRequest->isApproved() )
+ RequestPackageReparation aRequest( aDocName );
+ xHandler->handle( aRequest.GetRequest() );
+ if( aRequest.isApproved() )
{
// broken package: try second loading and allow repair
pMedium->GetItemSet()->Put( SfxBoolItem( SID_REPAIRPACKAGE, sal_True ) );
@@ -1809,9 +1902,8 @@ void SAL_CALL SfxBaseModel::load( const uno::Sequence< beans::PropertyValue >&
if ( nError == ERRCODE_IO_BROKENPACKAGE )
{
// repair either not allowed or not successful
- NotifyBrokenPackage* pNotifyRequest = new NotifyBrokenPackage( aDocName );
- com::sun::star::uno::Reference< com::sun::star::task::XInteractionRequest > xRequest ( pNotifyRequest );
- xHandler->handle( xRequest );
+ NotifyBrokenPackage aRequest( aDocName );
+ xHandler->handle( aRequest.GetRequest() );
}
}
}
@@ -1844,12 +1936,12 @@ void SAL_CALL SfxBaseModel::load( const uno::Sequence< beans::PropertyValue >&
if ( nError )
{
- BOOL bSilent = FALSE;
+ sal_Bool bSilent = sal_False;
SFX_ITEMSET_ARG( pMedium->GetItemSet(), pSilentItem, SfxBoolItem, SID_SILENT, sal_False);
if( pSilentItem )
bSilent = pSilentItem->GetValue();
- BOOL bWarning = ((nError & ERRCODE_WARNING_MASK) == ERRCODE_WARNING_MASK);
+ sal_Bool bWarning = ((nError & ERRCODE_WARNING_MASK) == ERRCODE_WARNING_MASK);
if ( nError != ERRCODE_IO_BROKENPACKAGE && !bSilent )
{
// broken package was handled already
@@ -1875,10 +1967,15 @@ void SAL_CALL SfxBaseModel::load( const uno::Sequence< beans::PropertyValue >&
}
}
- BOOL bHidden = FALSE;
+ sal_Bool bHidden = sal_False;
SFX_ITEMSET_ARG( pMedium->GetItemSet(), pHidItem, SfxBoolItem, SID_HIDDEN, sal_False);
if ( pHidItem )
bHidden = pHidItem->GetValue();
+
+#if OSL_DEBUG_LEVEL > 0
+ SFX_ITEMSET_ARG( pMedium->GetItemSet(), pPasswdItem, SfxStringItem, SID_PASSWORD, sal_False);
+ OSL_ENSURE( !pPasswdItem, "There should be no Password property in the document MediaDescriptor!" );
+#endif
// !TODO: will be done by Framework!
pMedium->SetUpdatePickList( !bHidden );
}
@@ -1919,7 +2016,7 @@ uno::Any SAL_CALL SfxBaseModel::getTransferData( const DATAFLAVOR& aFlavor )
aDesc.maSize = OutputDevice::LogicToLogic( aSize, aMapUnit, MAP_100TH_MM );
aDesc.maDragStartPos = Point();
aDesc.maDisplayName = String();
- aDesc.mbCanLink = FALSE;
+ aDesc.mbCanLink = sal_False;
SvMemoryStream aMemStm( 1024, 1024 );
aMemStm << aDesc;
@@ -1935,7 +2032,7 @@ uno::Any SAL_CALL SfxBaseModel::getTransferData( const DATAFLAVOR& aFlavor )
try
{
utl::TempFile aTmp;
- aTmp.EnableKillingFile( TRUE );
+ aTmp.EnableKillingFile( sal_True );
storeToURL( aTmp.GetURL(), uno::Sequence < beans::PropertyValue >() );
SvStream* pStream = aTmp.GetStream( STREAM_READ );
const sal_uInt32 nLen = pStream->Seek( STREAM_SEEK_TO_END );
@@ -2361,6 +2458,32 @@ void SAL_CALL SfxBaseModel::removeEventListener( const uno::Reference< XDOCEVENT
m_pData->m_aInterfaceContainer.removeInterface( ::getCppuType((const uno::Reference< XDOCEVENTLISTENER >*)0), aListener );
}
+//--------------------------------------------------------------------------------------------------------
+// XDocumentEventBroadcaster
+//--------------------------------------------------------------------------------------------------------
+// ---------------------------------
+void SAL_CALL SfxBaseModel::addDocumentEventListener( const uno::Reference< document::XDocumentEventListener >& aListener )
+ throw ( uno::RuntimeException )
+{
+ SfxModelGuard aGuard( *this, SfxModelGuard::E_INITIALIZING );
+ m_pData->m_aInterfaceContainer.addInterface( ::getCppuType((const uno::Reference< document::XDocumentEventListener >*)0), aListener );
+}
+
+// ---------------------------------
+void SAL_CALL SfxBaseModel::removeDocumentEventListener( const uno::Reference< document::XDocumentEventListener >& aListener )
+ throw ( uno::RuntimeException )
+{
+ SfxModelGuard aGuard( *this );
+ m_pData->m_aInterfaceContainer.removeInterface( ::getCppuType((const uno::Reference< document::XDocumentEventListener >*)0), aListener );
+}
+
+// ---------------------------------
+void SAL_CALL SfxBaseModel::notifyDocumentEvent( const ::rtl::OUString&, const uno::Reference< frame::XController2 >&, const uno::Any& )
+ throw ( lang::IllegalArgumentException, lang::NoSupportException, uno::RuntimeException )
+{
+ throw lang::NoSupportException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SfxBaseModel controlls all the sent notifications itself!" ) ), uno::Reference< uno::XInterface >() );
+}
+
//________________________________________________________________________________________________________
// SfxListener
//________________________________________________________________________________________________________
@@ -2499,7 +2622,9 @@ void SfxBaseModel::Notify( SfxBroadcaster& rBC ,
break;
}
- postEvent_Impl( pNamedHint->GetEventName() );
+
+ SfxViewEventHint* pViewHint = PTR_CAST( SfxViewEventHint, &rHint );
+ postEvent_Impl( pNamedHint->GetEventName(), pViewHint ? pViewHint->GetController() : uno::Reference< frame::XController2 >() );
}
if ( pSimpleHint )
@@ -2574,11 +2699,6 @@ SfxObjectShell* SfxBaseModel::impl_getObjectShell() const
// public impl.
//________________________________________________________________________________________________________
-sal_Bool SfxBaseModel::IsDisposed() const
-{
- return ( m_pData == NULL ) ;
-}
-
sal_Bool SfxBaseModel::IsInitialized() const
{
if ( !m_pData || !m_pData->m_pObjectShell )
@@ -2590,6 +2710,14 @@ sal_Bool SfxBaseModel::IsInitialized() const
return m_pData->m_pObjectShell->GetMedium() != NULL;
}
+void SfxBaseModel::MethodEntryCheck( const bool i_mustBeInitialized ) const
+{
+ if ( impl_isDisposed() )
+ throw ::com::sun::star::lang::DisposedException( ::rtl::OUString(), *const_cast< SfxBaseModel* >( this ) );
+ if ( i_mustBeInitialized && !IsInitialized() )
+ throw ::com::sun::star::lang::NotInitializedException( ::rtl::OUString(), *const_cast< SfxBaseModel* >( this ) );
+}
+
sal_Bool SfxBaseModel::impl_isDisposed() const
{
return ( m_pData == NULL ) ;
@@ -2640,49 +2768,41 @@ void SfxBaseModel::impl_store( const ::rtl::OUString& sURL
aArgHash.erase( aFilterString );
aArgHash.erase( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "URL" ) ) );
- // if the password is changed SaveAs should be done
- // no password for encrypted document is also a change here
- sal_Bool bPassChanged = sal_False;
-
- ::comphelper::SequenceAsHashMap::iterator aNewPassIter
- = aArgHash.find( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Password" ) ) );
- SFX_ITEMSET_ARG( pMedium->GetItemSet(), pPasswordItem, SfxStringItem, SID_PASSWORD, sal_False );
- if ( pPasswordItem && aNewPassIter != aArgHash.end() )
+ try
{
- ::rtl::OUString aNewPass;
- aNewPassIter->second >>= aNewPass;
- bPassChanged = !aNewPass.equals( pPasswordItem->GetValue() );
+ storeSelf( aArgHash.getAsConstPropertyValueList() );
+ bSaved = sal_True;
}
- else if ( pPasswordItem || aNewPassIter != aArgHash.end() )
- bPassChanged = sal_True;
-
- if ( !bPassChanged )
+ catch( const lang::IllegalArgumentException& )
{
- try
- {
- storeSelf( aArgHash.getAsConstPropertyValueList() );
- bSaved = sal_True;
- }
- catch( const lang::IllegalArgumentException& )
+ // some additional arguments do not allow to use saving, SaveAs should be done
+ // but only for normal documents, the shared documents would be overwritten in this case
+ // that would mean an information loss
+ // TODO/LATER: need a new interaction for this case
+ if ( m_pData->m_pObjectShell->IsDocShared() )
{
- // some additional arguments do not allow to use saving, SaveAs should be done
- // but only for normal documents, the shared documents would be overwritten in this case
- // that would mean an information loss
- // TODO/LATER: need a new interaction for this case
- if ( m_pData->m_pObjectShell->IsDocShared() )
+ m_pData->m_pObjectShell->AddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Can't store shared document!" ) ) );
+ m_pData->m_pObjectShell->StoreLog();
+
+ uno::Sequence< beans::NamedValue > aNewEncryptionData = aArgHash.getUnpackedValueOrDefault( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "EncryptionData" ) ), uno::Sequence< beans::NamedValue >() );
+ if ( !aNewEncryptionData.getLength() )
{
- m_pData->m_pObjectShell->AddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Can't store shared document!" ) ) );
- m_pData->m_pObjectShell->StoreLog();
+ ::rtl::OUString aNewPassword = aArgHash.getUnpackedValueOrDefault( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Password" ) ), ::rtl::OUString() );
+ aNewEncryptionData = ::comphelper::OStorageHelper::CreatePackageEncryptionData( aNewPassword );
+ }
+
+ uno::Sequence< beans::NamedValue > aOldEncryptionData;
+ GetEncryptionData_Impl( pMedium->GetItemSet(), aOldEncryptionData );
+ if ( !aOldEncryptionData.getLength() && !aNewEncryptionData.getLength() )
throw;
+ else
+ {
+ // if the password is changed a special error should be used in case of shared document
+ throw task::ErrorCodeIOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Cant change password for shared document." ) ), uno::Reference< uno::XInterface >(), ERRCODE_SFX_SHARED_NOPASSWORDCHANGE );
}
}
}
- else if ( m_pData->m_pObjectShell->IsDocShared() )
- {
- // if the password is changed a special error should be used in case of shared document
- throw task::ErrorCodeIOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Cant change password for shared document." ) ), uno::Reference< uno::XInterface >(), ERRCODE_SFX_SHARED_NOPASSWORDCHANGE );
- }
}
}
}
@@ -2839,8 +2959,32 @@ void SfxBaseModel::impl_store( const ::rtl::OUString& sURL
}
//********************************************************************************************************
+namespace {
+template< typename ListenerT, typename EventT >
+class NotifySingleListenerIgnoreRE
+{
+private:
+ typedef void ( SAL_CALL ListenerT::*NotificationMethod )( const EventT& );
+ NotificationMethod m_pMethod;
+ const EventT& m_rEvent;
+public:
+ NotifySingleListenerIgnoreRE( NotificationMethod method, const EventT& event ) : m_pMethod( method ), m_rEvent( event ) { }
-void SfxBaseModel::postEvent_Impl( ::rtl::OUString aName )
+ void operator()( const uno::Reference<ListenerT>& listener ) const
+ {
+ try
+ {
+ (listener.get()->*m_pMethod)( m_rEvent );
+ }
+ catch( uno::RuntimeException& )
+ {
+ // this exception is ignored to avoid problems with invalid listeners, the listener should be probably thrown away in future
+ }
+ }
+};
+} // anonymous namespace
+
+void SfxBaseModel::postEvent_Impl( const ::rtl::OUString& aName, const uno::Reference< frame::XController2 >& xController )
{
// object already disposed?
if ( impl_isDisposed() )
@@ -2850,34 +2994,41 @@ void SfxBaseModel::postEvent_Impl( ::rtl::OUString aName )
if (!aName.getLength())
return;
- ::cppu::OInterfaceContainerHelper* pIC = m_pData->m_aInterfaceContainer.getContainer(
- ::getCppuType((const uno::Reference< XDOCEVENTLISTENER >*)0) );
- if( pIC )
+ ::cppu::OInterfaceContainerHelper* pIC =
+ m_pData->m_aInterfaceContainer.getContainer( ::getCppuType( (const uno::Reference< document::XDocumentEventListener >*)0 ) );
+ if ( pIC )
+ {
+#ifdef DBG_UTIL
+ ByteString aTmp( "SfxDocumentEvent: " );
+ aTmp += ByteString( String(aName), RTL_TEXTENCODING_UTF8 );
+ DBG_TRACE( aTmp.GetBuffer() );
+#endif
+ document::DocumentEvent aDocumentEvent( (frame::XModel*)this, aName, xController, uno::Any() );
+
+ pIC->forEach< document::XDocumentEventListener, NotifySingleListenerIgnoreRE< document::XDocumentEventListener, document::DocumentEvent > >(
+ NotifySingleListenerIgnoreRE< document::XDocumentEventListener, document::DocumentEvent >(
+ &document::XDocumentEventListener::documentEventOccured,
+ aDocumentEvent ) );
+ }
+
+ pIC = m_pData->m_aInterfaceContainer.getContainer( ::getCppuType( (const uno::Reference< document::XEventListener >*)0 ) );
+ if ( pIC )
{
#ifdef DBG_UTIL
- ByteString aTmp( "SfxEvent: ");
+ ByteString aTmp( "SfxEvent: " );
aTmp += ByteString( String(aName), RTL_TEXTENCODING_UTF8 );
OSL_TRACE( "%s", aTmp.GetBuffer() );
#endif
- document::EventObject aEvent( (frame::XModel *)this, aName );
- ::cppu::OInterfaceContainerHelper aIC( m_aMutex );
- uno::Sequence < uno::Reference < uno::XInterface > > aElements = pIC->getElements();
- for ( sal_Int32 nElem=0; nElem<aElements.getLength(); nElem++ )
- aIC.addInterface( aElements[nElem] );
- ::cppu::OInterfaceIteratorHelper aIt( aIC );
- while( aIt.hasMoreElements() )
- {
- try
- {
- ((XDOCEVENTLISTENER *)aIt.next())->notifyEvent( aEvent );
- }
- catch( uno::RuntimeException& )
- {
- aIt.remove();
- }
- }
+
+ document::EventObject aEvent( (frame::XModel*)this, aName );
+
+ pIC->forEach< document::XEventListener, NotifySingleListenerIgnoreRE< document::XEventListener, document::EventObject > >(
+ NotifySingleListenerIgnoreRE< document::XEventListener, document::EventObject >(
+ &document::XEventListener::notifyEvent,
+ aEvent ) );
}
+
}
uno::Reference < container::XIndexAccess > SAL_CALL SfxBaseModel::getViewData() throw(::com::sun::star::uno::RuntimeException)
@@ -2912,7 +3063,7 @@ uno::Reference < container::XIndexAccess > SAL_CALL SfxBaseModel::getViewData()
for ( SfxViewFrame *pFrame = SfxViewFrame::GetFirst( m_pData->m_pObjectShell ); pFrame;
pFrame = SfxViewFrame::GetNext( *pFrame, m_pData->m_pObjectShell ) )
{
- BOOL bIsActive = ( pFrame == pActFrame );
+ sal_Bool bIsActive = ( pFrame == pActFrame );
pFrame->GetViewShell()->WriteUserDataSequence( aSeq );
aAny <<= aSeq;
xCont->insertByIndex( bIsActive ? 0 : nCount, aAny );
@@ -3179,7 +3330,7 @@ static void ConvertSlotsToCommands( SfxObjectShell* pDoc, uno::Reference< contai
rtl::OUString aSlot( aCommand.copy( 5 ));
// We have to replace the old "slot-Command" with our new ".uno:-Command"
- const SfxSlot* pSlot = pModule->GetSlotPool()->GetSlot( USHORT( aSlot.toInt32() ));
+ const SfxSlot* pSlot = pModule->GetSlotPool()->GetSlot( sal_uInt16( aSlot.toInt32() ));
if ( pSlot )
{
rtl::OUStringBuffer aStrBuf( aUnoCmd );
@@ -3250,7 +3401,7 @@ uno::Reference< ui::XUIConfigurationManager > SAL_CALL SfxBaseModel::getUIConfig
uno::Reference< lang::XMultiServiceFactory > xServiceMgr( ::comphelper::getProcessServiceFactory() );
uno::Sequence< uno::Reference< container::XIndexContainer > > rToolbars;
- sal_Bool bImported = UIConfigurationImporterOOo1x::ImportCustomToolbars(
+ sal_Bool bImported = framework::UIConfigurationImporterOOo1x::ImportCustomToolbars(
xNewUIConfMan, rToolbars, xServiceMgr, xOOo1ConfigStorage );
if ( bImported )
{
@@ -3414,12 +3565,12 @@ void SAL_CALL SfxBaseModel::loadFromStorage( const uno::Reference< XSTORAGE >& x
pMedium->GetItemSet()->Put( aSet );
// allow to use an interactionhandler (if there is one)
- pMedium->UseInteractionHandler( TRUE );
+ pMedium->UseInteractionHandler( sal_True );
SFX_ITEMSET_ARG( &aSet, pTemplateItem, SfxBoolItem, SID_TEMPLATE, sal_False);
- BOOL bTemplate = pTemplateItem && pTemplateItem->GetValue();
+ sal_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;
+ m_pData->m_pObjectShell->Get_Impl()->bOwnsStorage = sal_False;
// load document
if ( !m_pData->m_pObjectShell->DoLoad(pMedium) )
@@ -3472,11 +3623,11 @@ void SAL_CALL SfxBaseModel::storeToStorage( const uno::Reference< XSTORAGE >& xS
// BaseURL is part of the ItemSet
SfxMedium aMedium( xStorage, String(), &aSet );
- aMedium.CanDisposeStorage_Impl( FALSE );
+ aMedium.CanDisposeStorage_Impl( sal_False );
if ( aMedium.GetFilter() )
{
// storing without a valid filter will often crash
- bSuccess = m_pData->m_pObjectShell->DoSaveObjectAs( aMedium, TRUE );
+ bSuccess = m_pData->m_pObjectShell->DoSaveObjectAs( aMedium, sal_True );
m_pData->m_pObjectShell->DoSaveCompleted( NULL );
}
}
@@ -3523,7 +3674,7 @@ void SAL_CALL SfxBaseModel::switchToStorage( const uno::Reference< XSTORAGE >& x
xUICfgMgrStorage->setStorage( xStorage );
}
}
- m_pData->m_pObjectShell->Get_Impl()->bOwnsStorage = FALSE;
+ m_pData->m_pObjectShell->Get_Impl()->bOwnsStorage = sal_False;
}
uno::Reference< XSTORAGE > SAL_CALL SfxBaseModel::getDocumentStorage()
@@ -3646,7 +3797,7 @@ css::uno::Reference< css::frame::XUntitledNumbers > SfxBaseModel::impl_getUntitl
SfxModelGuard aGuard( *this );
::rtl::OUString aResult = impl_getTitleHelper()->getTitle ();
- if ( m_pData->m_pObjectShell )
+ if ( !m_pData->m_bExternalTitle && m_pData->m_pObjectShell )
{
SfxMedium* pMedium = m_pData->m_pObjectShell->GetMedium();
if ( pMedium )
@@ -3656,7 +3807,7 @@ css::uno::Reference< css::frame::XUntitledNumbers > SfxBaseModel::impl_getUntitl
aResult += String( SfxResId(STR_REPAIREDDOCUMENT) );
}
- if ( m_pData->m_pObjectShell->IsReadOnlyUI() || (m_pData->m_pObjectShell->GetMedium() && m_pData->m_pObjectShell->GetMedium()->IsReadOnly()) )
+ if ( m_pData->m_pObjectShell->IsReadOnlyUI() || (pMedium && pMedium->IsReadOnly()) )
aResult += ::rtl::OUString( String( SfxResId(STR_READONLY) ) );
else if ( m_pData->m_pObjectShell->IsDocShared() )
aResult += ::rtl::OUString( String( SfxResId(STR_SHARED) ) );
@@ -3677,6 +3828,7 @@ void SAL_CALL SfxBaseModel::setTitle( const ::rtl::OUString& sTitle )
SfxModelGuard aGuard( *this );
impl_getTitleHelper()->setTitle (sTitle);
+ m_pData->m_bExternalTitle = sal_True;
}
//=============================================================================
@@ -3848,9 +4000,9 @@ namespace sfx { namespace intern {
SfxViewFrame* SfxBaseModel::FindOrCreateViewFrame_Impl( const Reference< XFrame >& i_rFrame, ::sfx::intern::ViewCreationGuard& i_rGuard ) const
{
SfxViewFrame* pViewFrame = NULL;
- for ( pViewFrame = SfxViewFrame::GetFirst( GetObjectShell(), FALSE );
+ for ( pViewFrame = SfxViewFrame::GetFirst( GetObjectShell(), sal_False );
pViewFrame;
- pViewFrame= SfxViewFrame::GetNext( *pViewFrame, GetObjectShell(), FALSE )
+ pViewFrame= SfxViewFrame::GetNext( *pViewFrame, GetObjectShell(), sal_False )
)
{
if ( pViewFrame->GetFrame().GetFrameInterface() == i_rFrame )
@@ -3957,18 +4109,18 @@ css::uno::Reference< css::frame::XController2 > SAL_CALL SfxBaseModel::createVie
// 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 );
+ pViewFrame->GetFrame().SetMenuBarOn_Impl( sal_False );
const sal_Int16 nPluginMode = aDocumentLoadArgs.getOrDefault( "PluginMode", sal_Int16( 0 ) );
if ( nPluginMode == 1 )
{
- pViewFrame->ForceOuterResize_Impl( FALSE );
- pViewFrame->GetBindings().HidePopups( TRUE );
+ pViewFrame->ForceOuterResize_Impl( sal_False );
+ pViewFrame->GetBindings().HidePopups( sal_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.GetWorkWindow_Impl()->MakeVisible_Impl( sal_False );
+ rFrame.GetWorkWindow_Impl()->Lock_Impl( sal_True );
rFrame.GetWindow().SetBorderStyle( WINDOW_BORDER_NOBORDER );
pViewFrame->GetWindow().SetBorderStyle( WINDOW_BORDER_NOBORDER );
@@ -4270,4 +4422,17 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
return xDMA->storeMetadataToMedium(i_rMedium);
}
+// =====================================================================================================================
+// = SfxModelSubComponent
+// =====================================================================================================================
+
+SfxModelSubComponent::~SfxModelSubComponent()
+{
+}
+
+void SfxModelSubComponent::disposing()
+{
+ // nothing to do here
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/doc/sfxmodelfactory.cxx b/sfx2/source/doc/sfxmodelfactory.cxx
index 93dbfa15c420..93dbfa15c420 100644..100755
--- a/sfx2/source/doc/sfxmodelfactory.cxx
+++ b/sfx2/source/doc/sfxmodelfactory.cxx
diff --git a/sfx2/source/doc/syspath.cxx b/sfx2/source/doc/syspath.cxx
index af77c0b5f93f..af77c0b5f93f 100644..100755
--- a/sfx2/source/doc/syspath.cxx
+++ b/sfx2/source/doc/syspath.cxx
diff --git a/sfx2/source/doc/syspath.hxx b/sfx2/source/doc/syspath.hxx
index 7287032ef74d..7287032ef74d 100644..100755
--- a/sfx2/source/doc/syspath.hxx
+++ b/sfx2/source/doc/syspath.hxx
diff --git a/sfx2/source/doc/syspathw32.cxx b/sfx2/source/doc/syspathw32.cxx
index 9571c167f357..819e59344de8 100644..100755
--- a/sfx2/source/doc/syspathw32.cxx
+++ b/sfx2/source/doc/syspathw32.cxx
@@ -26,6 +26,10 @@
*
************************************************************************/
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sfx2.hxx"
+
+
#ifdef WNT
#ifdef _MSC_VER
#pragma warning(disable:4917)
diff --git a/sfx2/source/explorer/makefile.mk b/sfx2/source/explorer/makefile.mk
deleted file mode 100644
index 75a15ebdb862..000000000000
--- a/sfx2/source/explorer/makefile.mk
+++ /dev/null
@@ -1,47 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..
-
-PRJNAME=sfx2
-TARGET=explorer
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Files --------------------------------------------------------
-
-SLOFILES = \
- $(SLO)$/nochaos.obj
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sfx2/source/explorer/nochaos.cxx b/sfx2/source/explorer/nochaos.cxx
index c029cf692fde..fc2bcd1b59d9 100644..100755
--- a/sfx2/source/explorer/nochaos.cxx
+++ b/sfx2/source/explorer/nochaos.cxx
@@ -73,7 +73,7 @@ public:
class CntItemPool: public SfxItemPool
{
static CntItemPool* _pThePool;
- USHORT _nRefs;
+ sal_uInt16 _nRefs;
protected:
CntItemPool();
@@ -81,7 +81,7 @@ protected:
public:
static CntItemPool* Acquire();
- static USHORT Release();
+ static sal_uInt16 Release();
};
//----------------------------------------------------------------------------
@@ -96,7 +96,7 @@ SfxItemPool* NoChaos::GetItemPool()
//----------------------------------------------------------------------------
// static
-USHORT NoChaos::ReleaseItemPool()
+sal_uInt16 NoChaos::ReleaseItemPool()
{
// Release CHAOS item pool.
return CntItemPool::Release();
diff --git a/sfx2/source/inc/SfxDocumentMetaData.hxx b/sfx2/source/inc/SfxDocumentMetaData.hxx
index d53d85595e8c..d53d85595e8c 100644..100755
--- a/sfx2/source/inc/SfxDocumentMetaData.hxx
+++ b/sfx2/source/inc/SfxDocumentMetaData.hxx
diff --git a/sfx2/source/inc/alienwarn.hxx b/sfx2/source/inc/alienwarn.hxx
index e34a2d2846bf..e34a2d2846bf 100644..100755
--- a/sfx2/source/inc/alienwarn.hxx
+++ b/sfx2/source/inc/alienwarn.hxx
diff --git a/sfx2/source/inc/appbas.hxx b/sfx2/source/inc/appbas.hxx
index 879653440f97..6f3809d5674c 100644..100755
--- a/sfx2/source/inc/appbas.hxx
+++ b/sfx2/source/inc/appbas.hxx
@@ -37,7 +37,7 @@ class SbxObject;
//=========================================================================
SbxVariable* MakeVariable( StarBASIC *pBas, SbxObject *pObject,
- const char *pName, ULONG nSID, SbxDataType eType=SbxOBJECT,
+ const char *pName, sal_uIntPtr nSID, SbxDataType eType=SbxOBJECT,
SbxClassType = SbxCLASS_PROPERTY );
diff --git a/sfx2/source/inc/appbaslib.hxx b/sfx2/source/inc/appbaslib.hxx
index dd47c79273aa..dd47c79273aa 100644..100755
--- a/sfx2/source/inc/appbaslib.hxx
+++ b/sfx2/source/inc/appbaslib.hxx
diff --git a/sfx2/source/inc/appdata.hxx b/sfx2/source/inc/appdata.hxx
index 14684b351b49..a08f8035b03f 100644..100755
--- a/sfx2/source/inc/appdata.hxx
+++ b/sfx2/source/inc/appdata.hxx
@@ -116,7 +116,6 @@ public:
// global pointers
SfxItemPool* pPool;
- SfxEventConfiguration* pEventConfig;
SvUShorts* pDisabledSlotList;
SvStrings* pSecureURLs;
SvtSaveOptions* pSaveOptions;
@@ -127,12 +126,11 @@ public:
SfxProgress* pProgress;
ISfxTemplateCommon* pTemplateCommon;
- USHORT nDocModalMode; // counts documents in modal mode
- USHORT nAutoTabPageId;
- USHORT nBasicCallLevel;
- USHORT nRescheduleLocks;
- USHORT nInReschedule;
- USHORT nAsynchronCalls;
+ sal_uInt16 nDocModalMode; // counts documents in modal mode
+ sal_uInt16 nAutoTabPageId;
+ sal_uInt16 nRescheduleLocks;
+ sal_uInt16 nInReschedule;
+ sal_uInt16 nAsynchronCalls;
rtl::Reference< sfx2::appl::ImeStatusWindow > m_xImeStatusWindow;
@@ -154,19 +152,19 @@ public:
SfxDispatcher* pAppDispat; // Dispatcher if no document
SfxInterface** pInterfaces;
- USHORT nDocNo; // current Doc-Number (AutoName)
- USHORT nInterfaces;
+ sal_uInt16 nDocNo; // current Doc-Number (AutoName)
+ sal_uInt16 nInterfaces;
- BOOL bDispatcherLocked:1; // do nothing
- BOOL bDowning:1; // TRUE on Exit and afterwards
- BOOL bInQuit : 1;
- BOOL bInvalidateOnUnlock : 1;
- BOOL bODFVersionWarningLater : 1;
+ sal_Bool bDispatcherLocked:1; // do nothing
+ sal_Bool bDowning:1; // sal_True on Exit and afterwards
+ sal_Bool bInQuit : 1;
+ sal_Bool bInvalidateOnUnlock : 1;
+ sal_Bool bODFVersionWarningLater : 1;
SfxAppData_Impl( SfxApplication* );
~SfxAppData_Impl();
- void UpdateApplicationSettings( BOOL bDontHide );
+ void UpdateApplicationSettings( sal_Bool bDontHide );
SfxDocumentTemplates* GetDocumentTemplates();
void DeInitDDE();
diff --git a/sfx2/source/inc/applet.hxx b/sfx2/source/inc/applet.hxx
deleted file mode 100644
index 1f22916cadc0..000000000000
--- a/sfx2/source/inc/applet.hxx
+++ /dev/null
@@ -1,125 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _SFX_APPLET_HXX
-#define _SFX_APPLET_HXX
-
-#include <com/sun/star/uno/Reference.hxx>
-#include <com/sun/star/uno/Sequence.hxx>
-#include <com/sun/star/util/XCloseable.hpp>
-#include <com/sun/star/lang/XEventListener.hpp>
-#include <com/sun/star/frame/XSynchronousFrameLoader.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
-#include <com/sun/star/lang/XInitialization.hpp>
-#include <com/sun/star/embed/XEmbeddedObject.hpp>
-#include <cppuhelper/implbase6.hxx>
-
-#include <rtl/ustring.hxx>
-#include <svl/ownlist.hxx>
-#include <svl/itemprop.hxx>
-
-namespace com { namespace sun { namespace star { namespace uno {
- class XComponentContext;
- class XInterface;
-} } } }
-
-class SjApplet2;
-namespace sfx2
-{
-
-class AppletObject : public ::cppu::WeakImplHelper6 <
- com::sun::star::util::XCloseable,
- com::sun::star::lang::XEventListener,
- com::sun::star::frame::XSynchronousFrameLoader,
- com::sun::star::ui::dialogs::XExecutableDialog,
- com::sun::star::lang::XInitialization,
- com::sun::star::beans::XPropertySet >
-{
- com::sun::star::uno::Reference < com::sun::star::uno::XComponentContext >
- mxContext;
- com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > mxObj;
- SfxItemPropertyMap maPropMap;
- SvCommandList maCmdList;
- ::rtl::OUString maClass;
- ::rtl::OUString maName;
- ::rtl::OUString maCodeBase;
- ::rtl::OUString maDocBase;
- SjApplet2* mpApplet;
- sal_Bool mbMayScript;
-
- AppletObject( AppletObject & ); // not defined
- void operator =( AppletObject & ); // not defined
-
- AppletObject( const com::sun::star::uno::Reference < com::sun::star::uno::XComponentContext >& rContext );
- ~AppletObject();
-
- virtual sal_Bool SAL_CALL load( const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >& lDescriptor,
- const com::sun::star::uno::Reference < com::sun::star::frame::XFrame >& xFrame ) throw( com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL cancel() throw( com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL close( sal_Bool bDeliverOwnership ) throw( com::sun::star::util::CloseVetoException, com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL addCloseListener( const com::sun::star::uno::Reference < com::sun::star::util::XCloseListener >& xListener ) throw( com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL removeCloseListener( const com::sun::star::uno::Reference < com::sun::star::util::XCloseListener >& xListener ) throw( com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL disposing( const com::sun::star::lang::EventObject& aEvent ) throw (com::sun::star::uno::RuntimeException) ;
- virtual void SAL_CALL setTitle( const ::rtl::OUString& aTitle ) throw (::com::sun::star::uno::RuntimeException);
- virtual ::sal_Int16 SAL_CALL execute( ) throw (::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL addPropertyChangeListener(const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL removePropertyChangeListener(const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL addVetoableChangeListener(const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL removeVetoableChangeListener(const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
-
- virtual ::rtl::OUString SAL_CALL getImplementationName()
- throw( ::com::sun::star::uno::RuntimeException );
- virtual ::sal_Bool SAL_CALL supportsService(
- const ::rtl::OUString& sServiceName )
- throw( ::com::sun::star::uno::RuntimeException );
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
- getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException );
-
- static ::com::sun::star::uno::Sequence< ::rtl::OUString >
- impl_getStaticSupportedServiceNames();
- static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
- SAL_CALL impl_createInstance(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::uno::XComponentContext >& xContext )
- throw( ::com::sun::star::uno::Exception );
-
-public:
- static ::rtl::OUString impl_getStaticImplementationName();
- static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
- impl_createFactory();
-};
-
-}
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/inc/doctemplates.hxx b/sfx2/source/inc/doctemplates.hxx
index f34f0fde4aeb..f34f0fde4aeb 100644..100755
--- a/sfx2/source/inc/doctemplates.hxx
+++ b/sfx2/source/inc/doctemplates.hxx
diff --git a/sfx2/source/inc/docundomanager.hxx b/sfx2/source/inc/docundomanager.hxx
new file mode 100755
index 000000000000..9b37671662fd
--- /dev/null
+++ b/sfx2/source/inc/docundomanager.hxx
@@ -0,0 +1,116 @@
+/*************************************************************************
+ * 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 DOCUMENT_UNDO_MANAGER_HXX
+#define DOCUMENT_UNDO_MANAGER_HXX
+
+#include "sfx2/sfxbasemodel.hxx"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/document/XUndoManager.hpp>
+/** === end UNO includes === **/
+
+#include <cppuhelper/implbase1.hxx>
+
+#include <boost/scoped_ptr.hpp>
+#include <boost/noncopyable.hpp>
+
+namespace svl
+{
+ class IUndoManager;
+}
+
+//......................................................................................................................
+namespace sfx2
+{
+//......................................................................................................................
+
+ //==================================================================================================================
+ //= DocumentUndoManager
+ //==================================================================================================================
+ typedef ::cppu::ImplHelper1 < ::com::sun::star::document::XUndoManager
+ > DocumentUndoManager_Base;
+ struct DocumentUndoManager_Impl;
+ class DocumentUndoManager :public DocumentUndoManager_Base
+ ,public SfxModelSubComponent
+ ,public ::boost::noncopyable
+ {
+ friend struct DocumentUndoManager_Impl;
+
+ public:
+ DocumentUndoManager( SfxBaseModel& i_document );
+ virtual ~DocumentUndoManager();
+
+ // SfxModelSubComponent overridables
+ virtual void disposing();
+
+ // non-UNO API for our owner
+ /** determines whether we have an open Undo context. No mutex locking within this method, no disposal check - this
+ is the responsibility of the owner.
+ */
+ bool isInContext() const;
+
+ // XInterface
+ virtual void SAL_CALL acquire( ) throw ();
+ virtual void SAL_CALL release( ) throw ();
+
+ // XUndoManager
+ virtual void SAL_CALL enterUndoContext( const ::rtl::OUString& i_title ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL enterHiddenUndoContext( ) throw (::com::sun::star::document::EmptyUndoStackException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL leaveUndoContext( ) throw (::com::sun::star::util::InvalidStateException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addUndoAction( const ::com::sun::star::uno::Reference< ::com::sun::star::document::XUndoAction >& i_action ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL undo( ) throw (::com::sun::star::document::EmptyUndoStackException, ::com::sun::star::document::UndoContextNotClosedException, ::com::sun::star::document::UndoFailedException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL redo( ) throw (::com::sun::star::document::EmptyUndoStackException, ::com::sun::star::document::UndoContextNotClosedException, ::com::sun::star::document::UndoFailedException, ::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL isUndoPossible( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL isRedoPossible( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getCurrentUndoActionTitle( ) throw (::com::sun::star::document::EmptyUndoStackException, ::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getCurrentRedoActionTitle( ) throw (::com::sun::star::document::EmptyUndoStackException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getAllUndoActionTitles( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getAllRedoActionTitles( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL clear( ) throw (::com::sun::star::document::UndoContextNotClosedException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL clearRedo( ) throw (::com::sun::star::document::UndoContextNotClosedException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL reset( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addUndoManagerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::document::XUndoManagerListener >& i_listener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeUndoManagerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::document::XUndoManagerListener >& i_listener ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XLockable, base of XUndoManager
+ virtual void SAL_CALL lock( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL unlock( ) throw (::com::sun::star::util::NotLockedException, ::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL isLocked( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XChild, base of XUndoManager
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getParent( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setParent( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& Parent ) throw (::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException);
+
+ private:
+ ::boost::scoped_ptr< DocumentUndoManager_Impl > m_pImpl;
+ };
+
+//......................................................................................................................
+} // namespace sfx2
+//......................................................................................................................
+
+#endif // DOCUMENT_UNDO_MANAGER_HXX
diff --git a/sfx2/source/inc/eventsupplier.hxx b/sfx2/source/inc/eventsupplier.hxx
index 0ef443ca2b4b..87e1c54a7c1a 100644..100755
--- a/sfx2/source/inc/eventsupplier.hxx
+++ b/sfx2/source/inc/eventsupplier.hxx
@@ -58,6 +58,11 @@
#include <svl/lstner.hxx>
#include <unotools/eventcfg.hxx>
+namespace comphelper
+{
+ class NamedValueCollection;
+}
+
//--------------------------------------------------------------------------------------------------------
#define NOSUCHELEMENTEXCEPTION ::com::sun::star::container::NoSuchElementException
@@ -126,8 +131,12 @@ public:
virtual void SAL_CALL disposing( const EVENTOBJECT& Source )
throw( RUNTIMEEXCEPTION );
- static SvxMacro* ConvertToMacro( const ANY& rElement, SfxObjectShell* pDoc, BOOL bBlowUp );
- static void BlowUpMacro( const ANY& rIn, ANY& rOut, SfxObjectShell* pDoc );
+ static SvxMacro* ConvertToMacro( const ANY& rElement, SfxObjectShell* pDoc, sal_Bool bNormalizeMacro );
+ static void NormalizeMacro( const ANY& rIn, ANY& rOut, SfxObjectShell* pDoc );
+ static void NormalizeMacro(
+ const ::comphelper::NamedValueCollection& i_eventDescriptor,
+ ::comphelper::NamedValueCollection& o_normalizedDescriptor,
+ SfxObjectShell* i_document );
};
//=============================================================================
diff --git a/sfx2/source/inc/fltfnc.hxx b/sfx2/source/inc/fltfnc.hxx
index 95a6cafc72df..d9f10a52882d 100644..100755
--- a/sfx2/source/inc/fltfnc.hxx
+++ b/sfx2/source/inc/fltfnc.hxx
@@ -30,7 +30,7 @@
#include <sfx2/fcontnr.hxx>
-BOOL SfxIsHelpEntryURL( const String &rURL, const String &rExtMask );
+sal_Bool SfxIsHelpEntryURL( const String &rURL, const String &rExtMask );
#endif
diff --git a/sfx2/source/inc/fltoptint.hxx b/sfx2/source/inc/fltoptint.hxx
index afc00a98a941..4c5c570cefa5 100644..100755
--- a/sfx2/source/inc/fltoptint.hxx
+++ b/sfx2/source/inc/fltoptint.hxx
@@ -25,15 +25,17 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
+#ifndef SFX2_FLTOPTINT_HXX
+#define SFX2_FLTOPTINT_HXX
#include <com/sun/star/document/FilterOptionsRequest.hpp>
#include <com/sun/star/document/XInteractionFilterOptions.hpp>
#include <com/sun/star/frame/XModel.hpp>
-#include <framework/interaction.hxx>
+#include <comphelper/interaction.hxx>
-using namespace ::framework;
+//using namespace ::framework;
-class FilterOptionsContinuation : public ContinuationBase< ::com::sun::star::document::XInteractionFilterOptions >
+class FilterOptionsContinuation : public comphelper::OInteraction< ::com::sun::star::document::XInteractionFilterOptions >
{
::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > rProperties;
@@ -50,7 +52,7 @@ class RequestFilterOptions : public ::cppu::WeakImplHelper1< ::com::sun::star::t
::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >
> m_lContinuations;
- ContinuationAbort* m_pAbort;
+ comphelper::OInteractionAbort* m_pAbort;
FilterOptionsContinuation* m_pOptions;
@@ -58,7 +60,7 @@ public:
RequestFilterOptions( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > rModel,
::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > rProperties );
- sal_Bool isAbort() { return m_pAbort->isSelected(); }
+ sal_Bool isAbort() { return m_pAbort->wasSelected(); }
::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > getFilterOptions()
{
@@ -74,4 +76,5 @@ public:
throw( ::com::sun::star::uno::RuntimeException );
};
+#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/inc/helper.hxx b/sfx2/source/inc/helper.hxx
index 535d508e4cfd..ad180e067fa5 100644..100755
--- a/sfx2/source/inc/helper.hxx
+++ b/sfx2/source/inc/helper.hxx
@@ -67,7 +67,7 @@ public:
static sal_Bool MakeFolder( const String& rFolder );
static ErrCode QueryDiskSpace( const String& rPath, sal_Int64& rFreeBytes );
- static ULONG GetSize( const String& rContent );
+ static sal_uIntPtr GetSize( const String& rContent );
// please don't use this!
static sal_Bool Exists( const String& rContent );
diff --git a/sfx2/source/inc/helpid.hrc b/sfx2/source/inc/helpid.hrc
index 1b8614501925..ef5c168c36f0 100755
--- a/sfx2/source/inc/helpid.hrc
+++ b/sfx2/source/inc/helpid.hrc
@@ -29,341 +29,312 @@
// include ------------------------------------------------------------------
-#include <svl/solar.hrc>
+#include <sfx2/sfxcommands.h>
// Help-Ids -----------------------------------------------------------------
-#define HID_GLOBAL_FALLBACK 0xFFFFFFFF
+#define HID_FILTER_SELECT "SFX2_HID_FILTER_SELECT"
+#define HID_USERDEFBMP "SFX2_HID_USERDEFBMP"
+#define HID_DOCINFO_EDT "SFX2_HID_DOCINFO_EDT"
+#define HID_PASSWD "SFX2_HID_PASSWD"
+#define HID_PRINTMONITOR "SFX2_HID_PRINTMONITOR"
+#define HID_CONFIG_OBJECTBAR "SFX2_HID_CONFIG_OBJECTBAR"
+#define HID_MANAGE_STYLES "SFX2_HID_MANAGE_STYLES"
+#define HID_CONFIG_EVENT "SFX2_HID_CONFIG_EVENT"
+#define HID_DOCINFODESC "SFX2_HID_DOCINFODESC"
+#define HID_DOCINFODOC "SFX2_HID_DOCINFODOC"
+#define HID_DOCINFOUSER "SFX2_HID_DOCINFOUSER"
+#define HID_BOOKMARKPROPS "SFX2_HID_BOOKMARKPROPS"
+#define HID_BOOKGROUPPROPS "SFX2_HID_BOOKGROUPPROPS"
+#define HID_BOOKFILEPROPS "SFX2_HID_BOOKFILEPROPS"
+#define HID_NEWS_SERVERPROPS "SFX2_HID_NEWS_SERVERPROPS"
+#define HID_NEWS_RULEPAGE "SFX2_HID_NEWS_RULEPAGE"
+#define HID_MAILINTRAYPROPS "SFX2_HID_MAILINTRAYPROPS"
+#define HID_DOCINFORELOAD "SFX2_HID_DOCINFORELOAD"
+#define HID_NEWS_GROUPPAGE "SFX2_HID_NEWS_GROUPPAGE"
+#define HID_NEWS_SERVERPAGE "SFX2_HID_NEWS_SERVERPAGE"
+#define HID_EXPLORERCONTROL "SFX2_HID_EXPLORERCONTROL"
+#define HID_BROWSERCONTROL "SFX2_HID_BROWSERCONTROL"
+#define HID_CTL_ORGANIZER_LEFT "SFX2_HID_CTL_ORGANIZER_LEFT"
+#define HID_CTL_ORGANIZER_RIGHT "SFX2_HID_CTL_ORGANIZER_RIGHT"
+#define HID_EXPLMAILSRV_GENERAL_PAGE "SFX2_HID_EXPLMAILSRV_GENERAL_PAGE"
+#define HID_EXPLMAILSRV_PROTOCOL_PAGE "SFX2_HID_EXPLMAILSRV_PROTOCOL_PAGE"
+#define HID_EXPLMAILSRV_DATAMATCH_PAGE "SFX2_HID_EXPLMAILSRV_DATAMATCH_PAGE"
+#define HID_EXPLMAILSRV_SENDJOURNAL_PAGE "SFX2_HID_EXPLMAILSRV_SENDJOURNAL_PAGE"
+#define HID_EXPLMAIL_GENERAL_PAGE "SFX2_HID_EXPLMAIL_GENERAL_PAGE"
+#define HID_NEWS_CTL_RULES "SFX2_HID_NEWS_CTL_RULES"
+#define HID_NEWS_CTL_GROUPS "SFX2_HID_NEWS_CTL_GROUPS"
+#define HID_CONFIG_OBJECTBAR_CTL "SFX2_HID_CONFIG_OBJECTBAR_CTL"
+#define HID_NEWS_QUICKSEARCH "SFX2_HID_NEWS_QUICKSEARCH"
+#define HID_NEWS_SERVERVIEWPROPS "SFX2_HID_NEWS_SERVERVIEWPROPS"
+#define HID_NEWS_SHOWARTICLEPROPS "SFX2_HID_NEWS_SHOWARTICLEPROPS"
+#define HID_NEWS_SHOWGROUPPROPS "SFX2_HID_NEWS_SHOWGROUPPROPS"
+#define HID_NEWS_USER "SFX2_HID_NEWS_USER"
+#define HID_MULTISELECTION_GENERAL_PAGE "SFX2_HID_MULTISELECTION_GENERAL_PAGE"
+#define HID_LINK_GENERAL_PAGE "SFX2_HID_LINK_GENERAL_PAGE"
+#define HID_LINK_ADDRESS_PAGE "SFX2_HID_LINK_ADDRESS_PAGE"
+#define HID_FOLDER_GENERAL_PAGE "SFX2_HID_FOLDER_GENERAL_PAGE"
+#define HID_FILE_GENERAL_PAGE "SFX2_HID_FILE_GENERAL_PAGE"
+#define HID_FTP_GENERAL_PAGE "SFX2_HID_FTP_GENERAL_PAGE"
+#define HID_PRINT_OPTIONS "SFX2_HID_PRINT_OPTIONS"
+#define HID_PREVIEW_FRAME "SFX2_HID_PREVIEW_FRAME"
+#define HID_DOCINFO_FRAME "SFX2_HID_DOCINFO_FRAME"
+#define HID_EXPLORER_FRAME "SFX2_HID_EXPLORER_FRAME"
+#define HID_APP_WIN "SFX2_HID_APP_WIN"
+#define HID_TEMPLATE_FMT "SFX2_HID_TEMPLATE_FMT"
+#define HID_TEMPLATE_FILTER "SFX2_HID_TEMPLATE_FILTER"
+#define HID_FTPSERVER_PAGE "SFX2_HID_FTPSERVER_PAGE"
+#define HID_DLG_SFX_EXP_SEARCH "SFX2_HID_DLG_SFX_EXP_SEARCH"
+#define HID_TP_SFX_EXP_SEARCH_CRITERIA "SFX2_HID_TP_SFX_EXP_SEARCH_CRITERIA"
+#define HID_TP_SFX_EXP_SEARCH_PLACE "SFX2_HID_TP_SFX_EXP_SEARCH_PLACE"
+#define HID_SEARCH_DLG_TABLB "SFX2_HID_SEARCH_DLG_TABLB"
+#define HID_TEMPLDLG_NEWBYEXAMPLE "SFX2_HID_TEMPLDLG_NEWBYEXAMPLE"
+#define HID_TEMPLDLG_UPDATEBYEXAMPLE "SFX2_HID_TEMPLDLG_UPDATEBYEXAMPLE"
+#define HID_TEMPLDLG_WATERCAN "SFX2_HID_TEMPLDLG_WATERCAN"
+#define HID_DESKTOP "SFX2_HID_DESKTOP"
+#define HID_EXPLORERTOOLSTOOLBOX "SFX2_HID_EXPLORERTOOLSTOOLBOX"
+#define HID_EXPLOREROBJECTTOOLBOX "SFX2_HID_EXPLOREROBJECTTOOLBOX"
+#define HID_RECORDINGTOOLBOX "SFX2_HID_RECORDINGTOOLBOX"
+#define HID_FULLSCREENTOOLBOX "SFX2_HID_FULLSCREENTOOLBOX"
+#define HID_HELPBAR "SFX2_HID_HELPBAR"
+#define HID_ENVTOOLBOX "SFX2_HID_ENVTOOLBOX"
+#define HID_FRAMESETEDIT_TOOLBOX "SFX2_HID_FRAMESETEDIT_TOOLBOX"
+#define HID_NAVIGATOR_WINDOW "SFX2_HID_NAVIGATOR_WINDOW"
+#define HID_TABDLG_RESET_BTN "SFX2_HID_TABDLG_RESET_BTN"
+#define HID_TABDLG_STANDARD_BTN "SFX2_HID_TABDLG_STANDARD_BTN"
+#define HID_HELPAGENT_TIP_BOX "SFX2_HID_HELPAGENT_TIP_BOX"
+#define HID_TEMPLDLG_TOOLBOX_LEFT "SFX2_HID_TEMPLDLG_TOOLBOX_LEFT"
+#define HID_TEMPLDLG_TOOLBOX_RIGHT "SFX2_HID_TEMPLDLG_TOOLBOX_RIGHT"
+#define HID_EXPLORER_SRCH_COUNT "SFX2_HID_EXPLORER_SRCH_COUNT"
+#define HID_BEAMER_SORT_ASCENDING "SFX2_HID_BEAMER_SORT_ASCENDING"
+#define HID_BEAMER_SORT_DESCENDING "SFX2_HID_BEAMER_SORT_DESCENDING"
+#define HID_EXPLORER_SRCH_LATEST_COUNT "SFX2_HID_EXPLORER_SRCH_LATEST_COUNT"
+#define HID_CONFIG_EVENT_OFFICE_BASED "SFX2_HID_CONFIG_EVENT_OFFICE_BASED"
+#define HID_CONFIG_EVENT_DOCUMENT_BASED "SFX2_HID_CONFIG_EVENT_DOCUMENT_BASED"
+#define HID_ORGANIZE_NEW "SFX2_HID_ORGANIZE_NEW"
+#define HID_ORGANIZE_DELETE "SFX2_HID_ORGANIZE_DELETE"
+#define HID_ORGANIZE_EDIT "SFX2_HID_ORGANIZE_EDIT"
+#define HID_ORGANIZE_COPY_FROM "SFX2_HID_ORGANIZE_COPY_FROM"
+#define HID_ORGANIZE_COPY_TO "SFX2_HID_ORGANIZE_COPY_TO"
+#define HID_ORGANIZE_PRINT "SFX2_HID_ORGANIZE_PRINT"
+#define HID_ORGANIZE_PRINTER_SETUP "SFX2_HID_ORGANIZE_PRINTER_SETUP"
+#define HID_ORGANIZE_RESCAN "SFX2_HID_ORGANIZE_RESCAN"
+#define HID_STYLIST_NEW "SFX2_HID_STYLIST_NEW"
+#define HID_STYLIST_EDIT "SFX2_HID_STYLIST_EDIT"
+#define HID_STYLIST_DELETE "SFX2_HID_STYLIST_DELETE"
+#define HID_EXPLORERMENU_ARRANGEICONS "SFX2_HID_EXPLORERMENU_ARRANGEICONS"
+#define HID_EXPLORERMENU_ARRANGEICONS_ONGRID "SFX2_HID_EXPLORERMENU_ARRANGEICONS_ONGRID"
+#define HID_EXPLORERMENU_FIXEDICONPOS "SFX2_HID_EXPLORERMENU_FIXEDICONPOS"
+#define HID_EXPLORERMENU_OPEN "SFX2_HID_EXPLORERMENU_OPEN"
+#define HID_EXPLORERMENU_PRINT "SFX2_HID_EXPLORERMENU_PRINT"
+#define HID_EXPLORERMENU_SEARCH "SFX2_HID_EXPLORERMENU_SEARCH"
+#define HID_EXPLORERMENU_COPY "SFX2_HID_EXPLORERMENU_COPY"
+#define HID_EXPLORERMENU_DELETE "SFX2_HID_EXPLORERMENU_DELETE"
+#define HID_EXPLORERMENU_CREATELINK "SFX2_HID_EXPLORERMENU_CREATELINK"
+#define HID_EXPLORERMENU_EDITPROPERTIES "SFX2_HID_EXPLORERMENU_EDITPROPERTIES"
+#define HID_EXPLORERMENU_DOWNLOAD "SFX2_HID_EXPLORERMENU_DOWNLOAD"
+#define HID_EXPLORERMENU_STDTEMPLATE "SFX2_HID_EXPLORERMENU_STDTEMPLATE"
+#define HID_EXPLORERDLG_FILELIST "SFX2_HID_EXPLORERDLG_FILELIST"
+#define HID_PDFOLDERS_WORKPLACE "SFX2_HID_PDFOLDERS_WORKPLACE"
+#define HID_PDFOLDERS_EXPLORER "SFX2_HID_PDFOLDERS_EXPLORER"
+#define HID_PDFOLDERS_STANDARD "SFX2_HID_PDFOLDERS_STANDARD"
+#define HID_PDFOLDERS_ROOT "SFX2_HID_PDFOLDERS_ROOT"
+#define HID_PDFOLDERS_DESKTOP "SFX2_HID_PDFOLDERS_DESKTOP"
+#define HID_CNTMENU_REMOVE_GROUP "SFX2_HID_CNTMENU_REMOVE_GROUP"
+#define HID_CNTMENU_CLEAR_CACHE "SFX2_HID_CNTMENU_CLEAR_CACHE"
+#define HID_CNT_SYNC_INFO_DLG "SFX2_HID_CNT_SYNC_INFO_DLG"
+#define HID_CNT_REMOVE_REMOVEDLIST "SFX2_HID_CNT_REMOVE_REMOVEDLIST"
+#define HID_CNT_ABORT_DIALOG "SFX2_HID_CNT_ABORT_DIALOG"
+#define HID_CNT_PAGE_PRJ_DATAEXCHANGE "SFX2_HID_CNT_PAGE_PRJ_DATAEXCHANGE"
+#define HID_CHAOSDOC_OBJECTBAR_FILE "SFX2_HID_CHAOSDOC_OBJECTBAR_FILE"
+#define HID_CHAOSDOC_OBJECTBAR_MESSAGE "SFX2_HID_CHAOSDOC_OBJECTBAR_MESSAGE"
+#define HID_CHAOSDOC_MN_PART_OPEN "SFX2_HID_CHAOSDOC_MN_PART_OPEN"
+#define HID_CHAOSDOC_MN_PART_DELETE "SFX2_HID_CHAOSDOC_MN_PART_DELETE"
+#define HID_CHAOSDOC_MN_PART_RENAME "SFX2_HID_CHAOSDOC_MN_PART_RENAME"
+#define HID_CHAOSDOC_MN_PART_SAVEAS "SFX2_HID_CHAOSDOC_MN_PART_SAVEAS"
+#define HID_EXPLORER_DOCVIEW_ICON "SFX2_HID_EXPLORER_DOCVIEW_ICON"
+#define HID_EXPLORER_DOCVIEW_DETAILS "SFX2_HID_EXPLORER_DOCVIEW_DETAILS"
+#define HID_CHAOSDOC_WIN "SFX2_HID_CHAOSDOC_WIN"
+#define HID_CHAOSDOC_WIN_HEADER "SFX2_HID_CHAOSDOC_WIN_HEADER"
+#define HID_CHAOSDOC_WIN_PARTS "SFX2_HID_CHAOSDOC_WIN_PARTS"
+#define HID_CHAOSDOC_WIN_BODY "SFX2_HID_CHAOSDOC_WIN_BODY"
+#define HID_CNT_INSERT_COLUMN "SFX2_HID_CNT_INSERT_COLUMN"
+#define HID_CNT_REMOVE_COLUMN "SFX2_HID_CNT_REMOVE_COLUMN"
+#define HID_CNT_OPT_WIDTH "SFX2_HID_CNT_OPT_WIDTH"
+#define HID_CNT_SORT_ASC "SFX2_HID_CNT_SORT_ASC"
+#define HID_CNT_SORT_DESC "SFX2_HID_CNT_SORT_DESC"
+#define HID_CNT_RULEPG_OPEN_DIR "SFX2_HID_CNT_RULEPG_OPEN_DIR"
+#define HID_CHAOSDOC_MN_HEADER_ADDRESSBOOK "SFX2_HID_CHAOSDOC_MN_HEADER_ADDRESSBOOK"
+#define HID_CHAOSDOC_MN_HEADER_COPYLINK "SFX2_HID_CHAOSDOC_MN_HEADER_COPYLINK"
+#define HID_CLEAN_CACHE "SFX2_HID_CLEAN_CACHE"
+#define HID_SBOX_LOCATION "SFX2_HID_SBOX_LOCATION"
+#define HID_SBOX_SUBSCRIBTION "SFX2_HID_SBOX_SUBSCRIBTION"
+#define HID_SBOX_CDF_SUBSCRIBTION "SFX2_HID_SBOX_CDF_SUBSCRIBTION"
+#define HID_SBOX_SCHEDULE "SFX2_HID_SBOX_SCHEDULE"
+#define HID_SBOX_NOTIFICATION "SFX2_HID_SBOX_NOTIFICATION"
+#define HID_SBOX_SDC_GENERAL "SFX2_HID_SBOX_SDC_GENERAL"
+#define HID_BRWBOX_HEADERBAR "SFX2_HID_BRWBOX_HEADERBAR"
+#define HID_CANNOT_CREATE_BMK_HERE "SFX2_HID_CANNOT_CREATE_BMK_HERE"
+#define HID_CREATE_BOOKMARK "SFX2_HID_CREATE_BOOKMARK"
+#define HID_TASKBAR "SFX2_HID_TASKBAR"
+#define HID_TASKBUTTONBAR "SFX2_HID_TASKBUTTONBAR"
+#define HID_TASKTOOLBAR "SFX2_HID_TASKTOOLBAR"
+#define HID_CHAOSDOC_SHOW_FSYS_EXTENSION "SFX2_HID_CHAOSDOC_SHOW_FSYS_EXTENSION"
+#define HID_CNT_FILE "SFX2_HID_CNT_FILE"
+#define HID_CHAOSDOC_MN_BODY_OPENLINK "SFX2_HID_CHAOSDOC_MN_BODY_OPENLINK"
+#define HID_CHAOSDOC_MN_BODY_OPENLINK_BLANK "SFX2_HID_CHAOSDOC_MN_BODY_OPENLINK_BLANK"
+#define HID_CHAOSDOC_MN_BODY_DOWNLOAD "SFX2_HID_CHAOSDOC_MN_BODY_DOWNLOAD"
+#define HID_CHAOSDOC_MN_BODY_ADDBOOKMARK "SFX2_HID_CHAOSDOC_MN_BODY_ADDBOOKMARK"
+#define HID_OPEN_MENU_CNT "SFX2_HID_OPEN_MENU_CNT"
+#define HID_CNT_OPEN_AS_TEMPLATE "SFX2_HID_CNT_OPEN_AS_TEMPLATE"
+#define HID_CNT_OPEN_AS_DOC "SFX2_HID_CNT_OPEN_AS_DOC"
+#define HID_PDFOLDERS_TEMPLATE "SFX2_HID_PDFOLDERS_TEMPLATE"
+#define HID_EXPLORER_ROOT "SFX2_HID_EXPLORER_ROOT"
+#define HID_RESET_URL "SFX2_HID_RESET_URL"
+#define HID_PHONE_DIALOG "SFX2_HID_PHONE_DIALOG"
+#define HID_QB_RESOLVE_LINK "SFX2_HID_QB_RESOLVE_LINK"
+#define HID_CHAOSDOC_MN_HEADER_FLAG_BOLD "SFX2_HID_CHAOSDOC_MN_HEADER_FLAG_BOLD"
+#define HID_CHAOSDOC_MN_HEADER_FLAG_ITALIC "SFX2_HID_CHAOSDOC_MN_HEADER_FLAG_ITALIC"
+#define HID_CHAOSDOC_MN_HEADER_BIG_HEADER "SFX2_HID_CHAOSDOC_MN_HEADER_BIG_HEADER"
+#define HID_CHAOSDOC_MN_HEADER_TEMPLATE_HEADER "SFX2_HID_CHAOSDOC_MN_HEADER_TEMPLATE_HEADER"
+#define HID_CNT_MARK_THREAD_MARKED "SFX2_HID_CNT_MARK_THREAD_MARKED"
+#define HID_CNT_MARK_THREAD_UNMARKED "SFX2_HID_CNT_MARK_THREAD_UNMARKED"
+#define HID_CNT_DLG_SEARCH_BT_SHOW "SFX2_HID_CNT_DLG_SEARCH_BT_SHOW"
+#define HID_CNT_DLG_SEARCH_BT_UPDATE "SFX2_HID_CNT_DLG_SEARCH_BT_UPDATE"
+#define HID_CNT_DLG_SEARCH_BT_SYNCHRONIZE "SFX2_HID_CNT_DLG_SEARCH_BT_SYNCHRONIZE"
+#define HID_CNT_DLG_SEARCH_BT_STOP "SFX2_HID_CNT_DLG_SEARCH_BT_STOP"
+#define HID_CNT_PAGE_HEADER "SFX2_HID_CNT_PAGE_HEADER"
+#define HID_CNT_DLG_ADDRESS "SFX2_HID_CNT_DLG_ADDRESS"
+#define HID_EXPLORERMENU_AUTO_ARRANGEICONS "SFX2_HID_EXPLORERMENU_AUTO_ARRANGEICONS"
+#define HID_EXPLORERMENU_AUTO_ADJUSTICONS "SFX2_HID_EXPLORERMENU_AUTO_ADJUSTICONS"
+#define HID_EXPLORERMENU_FREE_POSITIONING "SFX2_HID_EXPLORERMENU_FREE_POSITIONING"
+#define HID_CNT_TARGET_MENU "SFX2_HID_CNT_TARGET_MENU"
+#define HID_CNT_PAGE_DESCRIPTION "SFX2_HID_CNT_PAGE_DESCRIPTION"
+#define HID_CNT_LB_HEADER "SFX2_HID_CNT_LB_HEADER"
+#define HID_CNT_LB_DESCRIPTION "SFX2_HID_CNT_LB_DESCRIPTION"
+#define HID_GROUPVIEW_BIG_SYMBOLS "SFX2_HID_GROUPVIEW_BIG_SYMBOLS"
+#define HID_GROUPVIEW_SMALL_SYMBOLS "SFX2_HID_GROUPVIEW_SMALL_SYMBOLS"
+#define HID_GROUPVIEW_ADD_GROUP "SFX2_HID_GROUPVIEW_ADD_GROUP"
+#define HID_GROUPVIEW_REMOVE_GROUP "SFX2_HID_GROUPVIEW_REMOVE_GROUP"
+#define HID_GROUPVIEW_RENAME_GROUP "SFX2_HID_GROUPVIEW_RENAME_GROUP"
+#define HID_GROUPVIEW_ADD_BOOKMARK "SFX2_HID_GROUPVIEW_ADD_BOOKMARK"
+#define HID_GROUPVIEW_TREE "SFX2_HID_GROUPVIEW_TREE"
+#define HID_GROUPVIEW_ADD_AS_FOLDER "SFX2_HID_GROUPVIEW_ADD_AS_FOLDER"
+#define HID_GROUPVIEW_ADD_AS_BMK "SFX2_HID_GROUPVIEW_ADD_AS_BMK"
+#define HID_GROUPVIEW_REMOVE_BMK "SFX2_HID_GROUPVIEW_REMOVE_BMK"
+#define HID_GROUPVIEW_CONTENT_BIG "SFX2_HID_GROUPVIEW_CONTENT_BIG"
+#define HID_GROUPVIEW_CONTENT_SMALL "SFX2_HID_GROUPVIEW_CONTENT_SMALL"
+#define HID_GROUPVIEW_CONTENT_TREE "SFX2_HID_GROUPVIEW_CONTENT_TREE"
+#define HID_GROUPVIEW_SHOW_DOCS "SFX2_HID_GROUPVIEW_SHOW_DOCS"
+#define HID_EDIT_TEMPLATE "SFX2_HID_EDIT_TEMPLATE"
+#define HID_PDFOLDERS_GRAPHICS "SFX2_HID_PDFOLDERS_GRAPHICS"
+#define HID_PDFOLDERS_GROUPS "SFX2_HID_PDFOLDERS_GROUPS"
+#define HID_OPEN_CHOOSE_FILTER "SFX2_HID_OPEN_CHOOSE_FILTER"
+#define HID_PDFOLDERS_BOOKMARKS "SFX2_HID_PDFOLDERS_BOOKMARKS"
+#define HID_PDFOLDERS_FAVORITES_ADD "SFX2_HID_PDFOLDERS_FAVORITES_ADD"
+#define HID_PDFOLDERS_FAVORITES_REMOVE "SFX2_HID_PDFOLDERS_FAVORITES_REMOVE"
+#define HID_PDFOLDERS_HISTORY "SFX2_HID_PDFOLDERS_HISTORY"
+#define HID_CNT_CB_FORCE_BODY_EXPORT "SFX2_HID_CNT_CB_FORCE_BODY_EXPORT"
+#define HID_CNT_PAGE_REPSTATE_CONTROL "SFX2_HID_CNT_PAGE_REPSTATE_CONTROL"
+#define HID_TASKSTATUSBAR "SFX2_HID_TASKSTATUSBAR"
+#define HID_CNT_PAGE_HEADER_TABBAR "SFX2_HID_CNT_PAGE_HEADER_TABBAR"
+#define HID_CNT_PAGE_SUBSCR_TABBAR "SFX2_HID_CNT_PAGE_SUBSCR_TABBAR"
+#define HID_CHAOSDOC_MN_PART_PRINT "SFX2_HID_CHAOSDOC_MN_PART_PRINT"
+#define HID_STATUSINDICATOR_TEXT "SFX2_HID_STATUSINDICATOR_TEXT"
+#define HID_STATUSINDICATOR_PROGRESS "SFX2_HID_STATUSINDICATOR_PROGRESS"
+#define HID_CNT_VALUE_ADDED_NONE "SFX2_HID_CNT_VALUE_ADDED_NONE"
+#define HID_CNT_VALUE_ADDED_DOCINFO "SFX2_HID_CNT_VALUE_ADDED_DOCINFO"
+#define HID_CNT_VALUE_ADDED_FULL "SFX2_HID_CNT_VALUE_ADDED_FULL"
+#define HID_CNT_MESSAGE_STOREMODE_REMOTE "SFX2_HID_CNT_MESSAGE_STOREMODE_REMOTE"
+#define HID_CNT_MESSAGE_STOREMODE_LOCAL "SFX2_HID_CNT_MESSAGE_STOREMODE_LOCAL"
+#define HID_CNT_VIEW_ALL_ARTICLES "SFX2_HID_CNT_VIEW_ALL_ARTICLES"
+#define HID_CNT_VIEW_UNREAD_ARTICLES "SFX2_HID_CNT_VIEW_UNREAD_ARTICLES"
+#define HID_CNT_VIEW_READ_ARTICLES "SFX2_HID_CNT_VIEW_READ_ARTICLES"
+#define HID_CNT_VIEW_MARKED_ARTICLES "SFX2_HID_CNT_VIEW_MARKED_ARTICLES"
+#define HID_CNT_VIEW_MARKED_AND_UNREAD_ARTICLES "SFX2_HID_CNT_VIEW_MARKED_AND_UNREAD_ARTICLES"
+#define HID_CNT_VIEW_ALL_FOLDERS "SFX2_HID_CNT_VIEW_ALL_FOLDERS"
+#define HID_CNT_VIEW_SUBSCRIBED_FOLDERS "SFX2_HID_CNT_VIEW_SUBSCRIBED_FOLDERS"
+#define HID_CNT_VIEW_ACTIVE_FOLDERS "SFX2_HID_CNT_VIEW_ACTIVE_FOLDERS"
+#define HID_CNT_SENT_VIEW_ALL_ARTICLES "SFX2_HID_CNT_SENT_VIEW_ALL_ARTICLES"
+#define HID_CNT_SENT_VIEW_SENT_ARTICLES "SFX2_HID_CNT_SENT_VIEW_SENT_ARTICLES"
+#define HID_CNT_SENT_VIEW_UNSENT_ARTICLES "SFX2_HID_CNT_SENT_VIEW_UNSENT_ARTICLES"
+#define HID_CNT_SENT_VIEW_MARKED_ARTICLES "SFX2_HID_CNT_SENT_VIEW_MARKED_ARTICLES"
+#define HID_MAILWIN_SEND_BUTTON "SFX2_HID_MAILWIN_SEND_BUTTON"
+#define HID_MAILWIN_CLOSE_BUTTON "SFX2_HID_MAILWIN_CLOSE_BUTTON"
+#define HID_MAILWIN_ROLE_BOX "SFX2_HID_MAILWIN_ROLE_BOX"
+#define HID_MAILWIN_ADDRESS_EDIT "SFX2_HID_MAILWIN_ADDRESS_EDIT"
+#define HID_MAILWIN_ADDRESS_BOX "SFX2_HID_MAILWIN_ADDRESS_BOX"
+#define HID_MAILWIN_SUBJECT_EDIT "SFX2_HID_MAILWIN_SUBJECT_EDIT"
+#define HID_MAILWIN_FROM_EDIT "SFX2_HID_MAILWIN_FROM_EDIT"
+#define HID_MAILWIN_PRIO_BOX "SFX2_HID_MAILWIN_PRIO_BOX"
+#define HID_TABDLG_APPLY_BTN "SFX2_HID_TABDLG_APPLY_BTN"
+#define HID_TP_COMMONPRINTOPTIONS "SFX2_HID_TP_COMMONPRINTOPTIONS"
+#define HID_HELP_WINDOW "SFX2_HID_HELP_WINDOW"
+#define HID_HELP_LISTBOX "SFX2_HID_HELP_LISTBOX"
+#define HID_HELP_TABCONTROL "SFX2_HID_HELP_TABCONTROL"
+#define HID_HELP_TOOLBOX "SFX2_HID_HELP_TOOLBOX"
+#define HID_HELP_TOOLBOXITEM_INDEX "SFX2_HID_HELP_TOOLBOXITEM_INDEX"
+#define HID_HELP_TOOLBOXITEM_START "SFX2_HID_HELP_TOOLBOXITEM_START"
+#define HID_HELP_TOOLBOXITEM_BACKWARD "SFX2_HID_HELP_TOOLBOXITEM_BACKWARD"
+#define HID_HELP_TOOLBOXITEM_FORWARD "SFX2_HID_HELP_TOOLBOXITEM_FORWARD"
+#define HID_HELP_TOOLBOXITEM_PRINT "SFX2_HID_HELP_TOOLBOXITEM_PRINT"
+#define HID_HELP_TOOLBOXITEM_BOOKMARKS "SFX2_HID_HELP_TOOLBOXITEM_BOOKMARKS"
+#define HID_HELP_TABPAGE_CONTENTS "SFX2_HID_HELP_TABPAGE_CONTENTS"
+#define HID_HELP_TABPAGE_INDEX "SFX2_HID_HELP_TABPAGE_INDEX"
+#define HID_HELP_TABPAGE_SEARCH "SFX2_HID_HELP_TABPAGE_SEARCH"
+#define HID_HELP_TABPAGE_BOOKMARKS "SFX2_HID_HELP_TABPAGE_BOOKMARKS"
+#define HID_TBXCONTROL_FILENEW "SFX2_HID_TBXCONTROL_FILENEW"
+#define HID_ORGANIZE_STDTEMPLATE_ADD "SFX2_HID_ORGANIZE_STDTEMPLATE_ADD"
+#define HID_ORGANIZE_STDTEMPLATE_DEL "SFX2_HID_ORGANIZE_STDTEMPLATE_DEL"
+#define HID_HELP_TOOLBOXITEM_SEARCHDIALOG "SFX2_HID_HELP_TOOLBOXITEM_SEARCHDIALOG"
+#define HID_HELP_BOOKMARKS_OPEN "SFX2_HID_HELP_BOOKMARKS_OPEN"
+#define HID_HELP_BOOKMARKS_RENAME "SFX2_HID_HELP_BOOKMARKS_RENAME"
+#define HID_HELP_BOOKMARKS_DELETE "SFX2_HID_HELP_BOOKMARKS_DELETE"
+#define HID_CLOSE_WARNING "SFX2_HID_CLOSE_WARNING"
+#define HID_DID_SAVE_PACKED_XML "SFX2_HID_DID_SAVE_PACKED_XML"
+#define HID_HELP_TREELISTBOX_CONTENTS "SFX2_HID_HELP_TREELISTBOX_CONTENTS"
+#define HID_CUSTOMIZETOOLBOX "SFX2_HID_CUSTOMIZETOOLBOX"
+#define HID_CUSTOMIZETOOLBOX_FUNCTIONS "SFX2_HID_CUSTOMIZETOOLBOX_FUNCTIONS"
+#define HID_CUSTOMIZETOOLBOX_TOOLBOX "SFX2_HID_CUSTOMIZETOOLBOX_TOOLBOX"
+#define HID_HELP_TEXT_SELECTION_MODE "SFX2_HID_HELP_TEXT_SELECTION_MODE"
-#define HID_FILTER_SELECT (HID_SFX_START + 0)
-#define HID_USERDEFBMP (HID_SFX_START + 1)
-#define HID_DOCINFO_EDT (HID_SFX_START + 2)
-#define HID_PASSWD (HID_SFX_START + 3)
-#define HID_PRINTMONITOR (HID_SFX_START + 4)
-#define HID_CONFIG_OBJECTBAR (HID_SFX_START + 5)
-#define HID_MANAGE_STYLES (HID_SFX_START + 6)
-#define HID_CONFIG_EVENT (HID_SFX_START + 7)
-#define HID_DOCINFODESC (HID_SFX_START + 8)
-#define HID_DOCINFODOC (HID_SFX_START + 9)
-#define HID_DOCINFOUSER (HID_SFX_START + 10)
-#define HID_DOCINFOSECURITY (HID_SFX_START + 11)
-#define HID_BOOKMARKPROPS (HID_SFX_START + 14)
-#define HID_BOOKGROUPPROPS (HID_SFX_START + 15)
-#define HID_BOOKFILEPROPS (HID_SFX_START + 16)
-#define HID_NEWS_SERVERPROPS (HID_SFX_START + 20)
-#define HID_NEWS_RULEPAGE (HID_SFX_START + 21)
-#define HID_MAILINTRAYPROPS (HID_SFX_START + 23)
-#define HID_DOCINFORELOAD (HID_SFX_START + 24)
-#define HID_NEWS_GROUPPAGE (HID_SFX_START + 25)
-#define HID_NEWS_SERVERPAGE (HID_SFX_START + 26)
-#define HID_FILEDLG_STANDARD (HID_SFX_START + 27)
-#define HID_FILEDLG_MANAGER (HID_SFX_START + 28)
-#define HID_FILEDLG_URL (HID_SFX_START + 29)
-#define HID_FILEDLG_FILE (HID_SFX_START + 30)
-#define HID_FILEDLG_USE_PASSWD (HID_SFX_START + 31)
-#define HID_FILEDLG_READ_ONLY (HID_SFX_START + 32)
-#define HID_EXPLORERCONTROL (HID_SFX_START + 33)
-#define HID_BROWSERCONTROL (HID_SFX_START + 34)
-#define HID_CTL_ORGANIZER_LEFT (HID_SFX_START + 35)
-#define HID_CTL_ORGANIZER_RIGHT (HID_SFX_START + 36)
-#define HID_EXPLMAILSRV_GENERAL_PAGE (HID_SFX_START + 37)
-#define HID_EXPLMAILSRV_PROTOCOL_PAGE (HID_SFX_START + 38)
-#define HID_EXPLMAILSRV_DATAMATCH_PAGE (HID_SFX_START + 39)
-#define HID_EXPLMAILSRV_SENDJOURNAL_PAGE (HID_SFX_START + 40)
-#define HID_EXPLMAIL_GENERAL_PAGE (HID_SFX_START + 41)
-#define HID_NEWS_CTL_RULES (HID_SFX_START + 42)
-#define HID_NEWS_CTL_GROUPS (HID_SFX_START + 43)
-#define HID_CONFIG_OBJECTBAR_CTL (HID_SFX_START + 44)
-#define HID_NEWS_QUICKSEARCH (HID_SFX_START + 45)
-#define HID_NEWS_SERVERVIEWPROPS (HID_SFX_START + 46)
-#define HID_NEWS_SHOWARTICLEPROPS (HID_SFX_START + 47)
-#define HID_NEWS_SHOWGROUPPROPS (HID_SFX_START + 48)
-#define HID_NEWS_USER (HID_SFX_START + 49)
-#define HID_MULTISELECTION_GENERAL_PAGE (HID_SFX_START + 50)
-#define HID_LINK_GENERAL_PAGE (HID_SFX_START + 51)
-#define HID_LINK_ADDRESS_PAGE (HID_SFX_START + 52)
-#define HID_FOLDER_GENERAL_PAGE (HID_SFX_START + 53)
-#define HID_FILE_GENERAL_PAGE (HID_SFX_START + 54)
-#define HID_FTP_GENERAL_PAGE (HID_SFX_START + 55)
-#define HID_PRINT_OPTIONS (HID_SFX_START + 56)
-#define HID_PREVIEW_FRAME (HID_SFX_START + 57)
-#define HID_DOCINFO_FRAME (HID_SFX_START + 58)
-#define HID_EXPLORER_FRAME (HID_SFX_START + 59)
-#define HID_APP_WIN (HID_SFX_START + 60)
-#define HID_TEMPLATE_FMT (HID_SFX_START + 61)
-#define HID_TEMPLATE_FILTER (HID_SFX_START + 62)
-#define HID_FTPSERVER_PAGE (HID_SFX_START + 63)
-#define HID_DLG_SFX_EXP_SEARCH (HID_SFX_START + 65)
-#define HID_TP_SFX_EXP_SEARCH_CRITERIA (HID_SFX_START + 66)
-#define HID_TP_SFX_EXP_SEARCH_PLACE (HID_SFX_START + 67)
-#define HID_SEARCH_DLG_TABLB (HID_SFX_START + 68)
-#define HID_TEMPLDLG_NEWBYEXAMPLE (HID_SFX_START + 69)
-#define HID_TEMPLDLG_UPDATEBYEXAMPLE (HID_SFX_START + 70)
-#define HID_TEMPLDLG_WATERCAN (HID_SFX_START + 71)
-#define HID_DESKTOP (HID_SFX_START + 78)
-#define HID_EXPLORERTOOLSTOOLBOX (HID_SFX_START + 79)
-#define HID_EXPLOREROBJECTTOOLBOX (HID_SFX_START + 80)
-#define HID_RECORDINGTOOLBOX (HID_SFX_START + 81)
-#define HID_FULLSCREENTOOLBOX (HID_SFX_START + 82)
-#define HID_HELPBAR (HID_SFX_START + 83)
-#define HID_ENVTOOLBOX (HID_SFX_START + 84)
-#define HID_FRAMESETEDIT_TOOLBOX (HID_SFX_START + 85)
-#define HID_NAVIGATOR_WINDOW (HID_SFX_START + 86)
-#define HID_TABDLG_RESET_BTN (HID_SFX_START + 89)
-#define HID_TABDLG_STANDARD_BTN (HID_SFX_START + 90)
-#define HID_HELPAGENT_TIP_BOX (HID_SFX_START + 91)
-#define HID_TEMPLDLG_TOOLBOX_LEFT (HID_SFX_START + 92)
-#define HID_TEMPLDLG_TOOLBOX_RIGHT (HID_SFX_START + 93)
-#define HID_EXPLORER_SRCH_COUNT (HID_SFX_START + 94)
-#define HID_BEAMER_SORT_ASCENDING (HID_SFX_START + 95)
-#define HID_BEAMER_SORT_DESCENDING (HID_SFX_START + 96)
-#define HID_EXPLORER_SRCH_LATEST_COUNT (HID_SFX_START + 97)
-#define HID_CONFIG_EVENT_OFFICE_BASED (HID_SFX_START + 98)
-#define HID_CONFIG_EVENT_DOCUMENT_BASED (HID_SFX_START + 99)
-#define HID_ORGANIZE_NEW (HID_SFX_START + 100)
-#define HID_ORGANIZE_DELETE (HID_SFX_START + 101)
-#define HID_ORGANIZE_EDIT (HID_SFX_START + 102)
-#define HID_ORGANIZE_COPY_FROM (HID_SFX_START + 103)
-#define HID_ORGANIZE_COPY_TO (HID_SFX_START + 104)
-#define HID_ORGANIZE_PRINT (HID_SFX_START + 105)
-#define HID_ORGANIZE_PRINTER_SETUP (HID_SFX_START + 106)
-#define HID_ORGANIZE_RESCAN (HID_SFX_START + 107)
-#define HID_STYLIST_NEW (HID_SFX_START + 108)
-#define HID_STYLIST_EDIT (HID_SFX_START + 109)
-#define HID_STYLIST_DELETE (HID_SFX_START + 110)
-#define HID_EXPLORERMENU_ARRANGEICONS (HID_SFX_START + 111)
-#define HID_EXPLORERMENU_ARRANGEICONS_ONGRID (HID_SFX_START + 112)
-#define HID_EXPLORERMENU_FIXEDICONPOS (HID_SFX_START + 113)
-#define HID_EXPLORERMENU_OPEN (HID_SFX_START + 114)
-#define HID_EXPLORERMENU_PRINT (HID_SFX_START + 115)
-#define HID_EXPLORERMENU_SEARCH (HID_SFX_START + 116)
-#define HID_EXPLORERMENU_COPY (HID_SFX_START + 117)
-#define HID_EXPLORERMENU_DELETE (HID_SFX_START + 118)
-#define HID_EXPLORERMENU_CREATELINK (HID_SFX_START + 119)
-#define HID_EXPLORERMENU_EDITPROPERTIES (HID_SFX_START + 120)
-#define HID_EXPLORERMENU_DOWNLOAD (HID_SFX_START + 121)
-#define HID_EXPLORERMENU_STDTEMPLATE (HID_SFX_START + 122)
-#define HID_EXPLORERDLG_FILELIST (HID_SFX_START + 124)
-#define HID_PDFOLDERS_WORKPLACE (HID_SFX_START + 125)
-#define HID_PDFOLDERS_EXPLORER (HID_SFX_START + 126)
-#define HID_PDFOLDERS_STANDARD (HID_SFX_START + 127)
-#define HID_PDFOLDERS_ROOT (HID_SFX_START + 128)
-#define HID_PDFOLDERS_DESKTOP (HID_SFX_START + 129)
-#define HID_CNTMENU_REMOVE_GROUP (HID_SFX_START + 130)
-#define HID_CNTMENU_CLEAR_CACHE (HID_SFX_START + 131)
-#define HID_CNT_SYNC_INFO_DLG (HID_SFX_START + 132)
-#define HID_CNT_REMOVE_REMOVEDLIST (HID_SFX_START + 133)
-#define HID_CNT_ABORT_DIALOG (HID_SFX_START + 134)
-#define HID_CNT_PAGE_PRJ_DATAEXCHANGE (HID_SFX_START + 135)
-#define HID_CHAOSDOC_OBJECTBAR_FILE (HID_SFX_START + 136)
-#define HID_CHAOSDOC_OBJECTBAR_MESSAGE (HID_SFX_START + 137)
-#define HID_CHAOSDOC_MN_PART_OPEN (HID_SFX_START + 138)
-#define HID_CHAOSDOC_MN_PART_DELETE (HID_SFX_START + 139)
-#define HID_CHAOSDOC_MN_PART_RENAME (HID_SFX_START + 140)
-#define HID_CHAOSDOC_MN_PART_SAVEAS (HID_SFX_START + 141)
-#define HID_EXPLORER_DOCVIEW_ICON (HID_SFX_START + 142)
-#define HID_EXPLORER_DOCVIEW_DETAILS (HID_SFX_START + 143)
-#define HID_CHAOSDOC_WIN (HID_SFX_START + 144)
-#define HID_CHAOSDOC_WIN_HEADER (HID_SFX_START + 145)
-#define HID_CHAOSDOC_WIN_PARTS (HID_SFX_START + 146)
-#define HID_CHAOSDOC_WIN_BODY (HID_SFX_START + 147)
-#define HID_CNT_INSERT_COLUMN (HID_SFX_START + 148)
-#define HID_CNT_REMOVE_COLUMN (HID_SFX_START + 149)
-#define HID_CNT_OPT_WIDTH (HID_SFX_START + 150)
-#define HID_CNT_SORT_ASC (HID_SFX_START + 151)
-#define HID_CNT_SORT_DESC (HID_SFX_START + 152)
-#define HID_CNT_RULEPG_OPEN_DIR (HID_SFX_START + 153)
-#define HID_CHAOSDOC_MN_HEADER_ADDRESSBOOK (HID_SFX_START + 154)
-#define HID_CHAOSDOC_MN_HEADER_COPYLINK (HID_SFX_START + 155)
-#define HID_CLEAN_CACHE (HID_SFX_START + 156)
-#define HID_SBOX_LOCATION (HID_SFX_START + 157)
-#define HID_SBOX_SUBSCRIBTION (HID_SFX_START + 158)
-#define HID_SBOX_CDF_SUBSCRIBTION (HID_SFX_START + 159)
-#define HID_SBOX_SCHEDULE (HID_SFX_START + 160)
-#define HID_SBOX_NOTIFICATION (HID_SFX_START + 161)
-#define HID_SBOX_SDC_GENERAL (HID_SFX_START + 162)
-#define HID_BRWBOX_HEADERBAR (HID_SFX_START + 163)
-#define HID_CANNOT_CREATE_BMK_HERE (HID_SFX_START + 164)
-#define HID_CREATE_BOOKMARK (HID_SFX_START + 165)
-#define HID_TASKBAR (HID_SFX_START + 166)
-#define HID_TASKBUTTONBAR (HID_SFX_START + 167)
-#define HID_TASKTOOLBAR (HID_SFX_START + 168)
-#define HID_CHAOSDOC_SHOW_FSYS_EXTENSION (HID_SFX_START + 169)
-#define HID_CNT_FILE (HID_SFX_START + 170)
-#define HID_CHAOSDOC_MN_BODY_OPENLINK (HID_SFX_START + 171)
-#define HID_CHAOSDOC_MN_BODY_OPENLINK_BLANK (HID_SFX_START + 172)
-#define HID_CHAOSDOC_MN_BODY_DOWNLOAD (HID_SFX_START + 173)
-#define HID_CHAOSDOC_MN_BODY_ADDBOOKMARK (HID_SFX_START + 174)
-#define HID_OPEN_MENU_CNT (HID_SFX_START + 175)
-#define HID_CNT_OPEN_AS_TEMPLATE (HID_SFX_START + 176)
-#define HID_CNT_OPEN_AS_DOC (HID_SFX_START + 177)
-#define HID_PDFOLDERS_TEMPLATE (HID_SFX_START + 178)
-#define HID_EXPLORER_ROOT (HID_SFX_START + 179)
-#define HID_RESET_URL (HID_SFX_START + 180)
-#define HID_PHONE_DIALOG (HID_SFX_START + 181)
-#define HID_QB_RESOLVE_LINK (HID_SFX_START + 182)
-#define HID_CHAOSDOC_MN_HEADER_FLAG_BOLD (HID_SFX_START + 183)
-#define HID_CHAOSDOC_MN_HEADER_FLAG_ITALIC (HID_SFX_START + 184)
-#define HID_CHAOSDOC_MN_HEADER_BIG_HEADER (HID_SFX_START + 185)
-#define HID_CHAOSDOC_MN_HEADER_TEMPLATE_HEADER (HID_SFX_START + 186)
-#define HID_CNT_MARK_THREAD_MARKED (HID_SFX_START + 187)
-#define HID_CNT_MARK_THREAD_UNMARKED (HID_SFX_START + 188)
-#define HID_CNT_DLG_SEARCH_BT_SHOW (HID_SFX_START + 189)
-#define HID_CNT_DLG_SEARCH_BT_UPDATE (HID_SFX_START + 190)
-#define HID_CNT_DLG_SEARCH_BT_SYNCHRONIZE (HID_SFX_START + 191)
-#define HID_CNT_DLG_SEARCH_BT_STOP (HID_SFX_START + 192)
-#define HID_CNT_PAGE_HEADER (HID_SFX_START + 193)
-#define HID_CNT_DLG_ADDRESS (HID_SFX_START + 194)
-#define HID_EXPLORERMENU_AUTO_ARRANGEICONS (HID_SFX_START + 195)
-#define HID_EXPLORERMENU_AUTO_ADJUSTICONS (HID_SFX_START + 196)
-#define HID_EXPLORERMENU_FREE_POSITIONING (HID_SFX_START + 197)
-#define HID_CNT_TARGET_MENU (HID_SFX_START + 198)
-#define HID_CNT_PAGE_DESCRIPTION (HID_SFX_START + 199)
-#define HID_CNT_LB_HEADER (HID_SFX_START + 200)
-#define HID_CNT_LB_DESCRIPTION (HID_SFX_START + 201)
-#define HID_GROUPVIEW_BIG_SYMBOLS (HID_SFX_START + 202)
-#define HID_GROUPVIEW_SMALL_SYMBOLS (HID_SFX_START + 203)
-#define HID_GROUPVIEW_ADD_GROUP (HID_SFX_START + 204)
-#define HID_GROUPVIEW_REMOVE_GROUP (HID_SFX_START + 205)
-#define HID_GROUPVIEW_RENAME_GROUP (HID_SFX_START + 206)
-#define HID_GROUPVIEW_ADD_BOOKMARK (HID_SFX_START + 207)
-#define HID_GROUPVIEW_TREE (HID_SFX_START + 208)
-#define HID_GROUPVIEW_ADD_AS_FOLDER (HID_SFX_START + 209)
-#define HID_GROUPVIEW_ADD_AS_BMK (HID_SFX_START + 210)
-#define HID_GROUPVIEW_REMOVE_BMK (HID_SFX_START + 211)
-#define HID_GROUPVIEW_CONTENT_BIG (HID_SFX_START + 212)
-#define HID_GROUPVIEW_CONTENT_SMALL (HID_SFX_START + 213)
-#define HID_GROUPVIEW_CONTENT_TREE (HID_SFX_START + 214)
-#define HID_GROUPVIEW_SHOW_DOCS (HID_SFX_START + 215)
-#define HID_EDIT_TEMPLATE (HID_SFX_START + 216)
-#define HID_PDFOLDERS_GRAPHICS (HID_SFX_START + 217)
-#define HID_FILEDLG_AUTOCOMPLETEBOX (HID_SFX_START + 218)
-#define HID_FILEDLG_SAVE_BTN (HID_SFX_START + 219)
-#define HID_FILEDLG_SAVE_FILENAME (HID_SFX_START + 220)
-#define HID_FILEDLG_SAVE_FILETYPE (HID_SFX_START + 221)
-#define HID_FILEDLG_INSERT_BTN (HID_SFX_START + 222)
-#define HID_FILEDLG_PATH_BTN (HID_SFX_START + 223)
-#define HID_FILEDLG_PATH_FILENAME (HID_SFX_START + 224)
-#define HID_FILEDLG_FOLDER_BTN (HID_SFX_START + 225)
-#define HID_FILEDLG_FOLDER_FILENAME (HID_SFX_START + 226)
-#define HID_FILEDLG_SRCHFOLDER_BTN (HID_SFX_START + 227)
-#define HID_PDFOLDERS_GROUPS (HID_SFX_START + 228)
-#define HID_OPEN_CHOOSE_FILTER (HID_SFX_START + 229)
-#define HID_PDFOLDERS_BOOKMARKS (HID_SFX_START + 230)
-#define HID_PDFOLDERS_FAVORITES_ADD (HID_SFX_START + 231)
-#define HID_PDFOLDERS_FAVORITES_REMOVE (HID_SFX_START + 232)
-#define HID_PDFOLDERS_HISTORY (HID_SFX_START + 233)
-#define HID_FILEDLG_EDIT_FAVORITES (HID_SFX_START + 234)
-#define HID_FILEDLG_NEW_FAVORITE (HID_SFX_START + 235)
-#define HID_FILEDLG_EDIT_FAVORITES_LISTBOX (HID_SFX_START + 236)
-#define HID_FILEDLG_EDIT_FAVORITES_HEADERBAR (HID_SFX_START + 237)
-#define HID_CNT_CB_FORCE_BODY_EXPORT (HID_SFX_START + 240)
-#define HID_CNT_PAGE_REPSTATE_CONTROL (HID_SFX_START + 241)
-#define HID_TASKSTATUSBAR (HID_SFX_START + 242)
-#define HID_CNT_PAGE_HEADER_TABBAR (HID_SFX_START + 244)
-#define HID_CNT_PAGE_SUBSCR_TABBAR (HID_SFX_START + 245)
-#define HID_CHAOSDOC_MN_PART_PRINT (HID_SFX_START + 246)
-#define HID_STATUSINDICATOR_TEXT (HID_SFX_START + 247)
-#define HID_STATUSINDICATOR_PROGRESS (HID_SFX_START + 248)
-#define HID_CNT_VALUE_ADDED_NONE (HID_SFX_START + 249)
-#define HID_CNT_VALUE_ADDED_DOCINFO (HID_SFX_START + 250)
-#define HID_CNT_VALUE_ADDED_FULL (HID_SFX_START + 251)
-#define HID_CNT_MESSAGE_STOREMODE_REMOTE (HID_SFX_START + 252)
-#define HID_CNT_MESSAGE_STOREMODE_LOCAL (HID_SFX_START + 253)
-#define HID_CNT_VIEW_ALL_ARTICLES (HID_SFX_START + 254)
-#define HID_CNT_VIEW_UNREAD_ARTICLES (HID_SFX_START + 255)
-#define HID_CNT_VIEW_READ_ARTICLES (HID_SFX_START + 256)
-#define HID_CNT_VIEW_MARKED_ARTICLES (HID_SFX_START + 257)
-#define HID_CNT_VIEW_MARKED_AND_UNREAD_ARTICLES (HID_SFX_START + 258)
-#define HID_CNT_VIEW_ALL_FOLDERS (HID_SFX_START + 259)
-#define HID_CNT_VIEW_SUBSCRIBED_FOLDERS (HID_SFX_START + 260)
-#define HID_CNT_VIEW_ACTIVE_FOLDERS (HID_SFX_START + 261)
-#define HID_CNT_SENT_VIEW_ALL_ARTICLES (HID_SFX_START + 262)
-#define HID_CNT_SENT_VIEW_SENT_ARTICLES (HID_SFX_START + 263)
-#define HID_CNT_SENT_VIEW_UNSENT_ARTICLES (HID_SFX_START + 264)
-#define HID_CNT_SENT_VIEW_MARKED_ARTICLES (HID_SFX_START + 265)
-#define HID_MAILWIN_SEND_BUTTON (HID_SFX_START + 266)
-#define HID_MAILWIN_CLOSE_BUTTON (HID_SFX_START + 267)
-#define HID_MAILWIN_ROLE_BOX (HID_SFX_START + 268)
-#define HID_MAILWIN_ADDRESS_EDIT (HID_SFX_START + 269)
-#define HID_MAILWIN_ADDRESS_BOX (HID_SFX_START + 270)
-#define HID_MAILWIN_SUBJECT_EDIT (HID_SFX_START + 271)
-#define HID_MAILWIN_FROM_EDIT (HID_SFX_START + 272)
-#define HID_MAILWIN_PRIO_BOX (HID_SFX_START + 273)
-#define HID_TABDLG_APPLY_BTN (HID_SFX_START + 274)
-#define HID_TP_COMMONPRINTOPTIONS (HID_SFX_START + 275)
-#define HID_FILEDLG_LINK_CB (HID_SFX_START + 276)
-#define HID_FILEDLG_PREVIEW_CB (HID_SFX_START + 277)
-#define HID_HELP_WINDOW (HID_SFX_START + 278)
-#define HID_HELP_LISTBOX (HID_SFX_START + 279)
-#define HID_HELP_TABCONTROL (HID_SFX_START + 280)
-#define HID_HELP_TOOLBOX (HID_SFX_START + 281)
-#define HID_HELP_TOOLBOXITEM_INDEX (HID_SFX_START + 282)
-#define HID_HELP_TOOLBOXITEM_START (HID_SFX_START + 283)
-#define HID_HELP_TOOLBOXITEM_BACKWARD (HID_SFX_START + 284)
-#define HID_HELP_TOOLBOXITEM_FORWARD (HID_SFX_START + 285)
-#define HID_HELP_TOOLBOXITEM_PRINT (HID_SFX_START + 286)
-#define HID_HELP_TOOLBOXITEM_BOOKMARKS (HID_SFX_START + 287)
-#define HID_HELP_TABPAGE_CONTENTS (HID_SFX_START + 288)
-#define HID_HELP_TABPAGE_INDEX (HID_SFX_START + 289)
-#define HID_HELP_TABPAGE_SEARCH (HID_SFX_START + 290)
-#define HID_HELP_TABPAGE_BOOKMARKS (HID_SFX_START + 291)
-#define HID_TBXCONTROL_FILENEW (HID_SFX_START + 292)
-#define HID_ORGANIZE_STDTEMPLATE_ADD (HID_SFX_START + 293)
-#define HID_ORGANIZE_STDTEMPLATE_DEL (HID_SFX_START + 294)
-#define HID_HELP_TOOLBOXITEM_SEARCHDIALOG (HID_SFX_START + 295)
-#define HID_HELP_BOOKMARKS_OPEN (HID_SFX_START + 296)
-#define HID_HELP_BOOKMARKS_RENAME (HID_SFX_START + 297)
-#define HID_HELP_BOOKMARKS_DELETE (HID_SFX_START + 298)
-#define HID_CLOSE_WARNING (HID_SFX_START + 299)
-#define HID_DID_SAVE_PACKED_XML (HID_SFX_START + 300)
-#define HID_HELP_TREELISTBOX_CONTENTS (HID_SFX_START + 301)
-#define HID_CUSTOMIZETOOLBOX (HID_SFX_START + 302)
-#define HID_CUSTOMIZETOOLBOX_FUNCTIONS (HID_SFX_START + 303)
-#define HID_CUSTOMIZETOOLBOX_TOOLBOX (HID_SFX_START + 304)
-#define HID_HELP_TEXT_SELECTION_MODE (HID_SFX_START + 305)
+#define HID_WARNING_SECURITY_HYPERLINK "SFX2_HID_WARNING_SECURITY_HYPERLINK"
+#define HID_USERDEFBMP_TOOLBOX "SFX2_HID_USERDEFBMP_TOOLBOX"
-#define HID_WARNING_SECURITY_HYPERLINK (HID_SFX_START + 306)
-#define HID_FILEDLG_EXPORTASPDF (HID_SFX_START + 307)
-#define HID_USERDEFBMP_TOOLBOX (HID_SFX_START + 308)
+#define HID_CONFIG_LOAD "SFX2_HID_CONFIG_LOAD"
+#define HID_CONFIG_SAVE "SFX2_HID_CONFIG_SAVE"
-#define HID_CONFIG_LOAD (HID_SFX_START + 309)
-#define HID_CONFIG_SAVE (HID_SFX_START + 310)
+#define HID_SEARCHDIALOG "SFX2_HID_SEARCHDIALOG"
-#define HID_SEARCHDIALOG (HID_SFX_START + 311)
-#define HID_TASKPANE_WINDOW (HID_SFX_START + 312)
-#define HID_TASKPANE_VIEW_MENU (HID_SFX_START + 313)
-#define HID_XMLSEC_WARNING_BROKENSIGNATURE (HID_SFX_START + 314)
-#define HID_XMLSEC_QUERY_LOSINGSIGNATURE (HID_SFX_START + 315)
-#define HID_XMLSEC_QUERY_SAVEBEFORESIGN (HID_SFX_START + 316)
-#define HID_XMLSECDLG_MACROWARN (HID_SFX_START + 317)
-#define HID_XMLSEC_INFO_WRONGDOCFORMAT (HID_SFX_START + 318)
-#define HID_WARNING_MACROSDISABLED (HID_SFX_START + 319)
-#define HID_WARNING_ALIENFORMAT (HID_SFX_START + 320)
-#define HID_HELP_ONSTARTUP_BOX (HID_SFX_START + 321)
-#define HID_DLG_CHECKFORONLINEUPDATE (HID_SFX_START + 322)
-#define HID_TP_CUSTOMPROPERTIES (HID_SFX_START + 324)
-#define HID_CTRL_CUSTOMPROPERTIES (HID_SFX_START + 325)
-#define HID_CTRL_CUSTOMPROPS_YES_NO (HID_SFX_START + 326)
-#define HID_DLG_CUSTOMPROPS_DURATION (HID_SFX_START + 327)
+#define HID_XMLSEC_WARNING_BROKENSIGNATURE "SFX2_HID_XMLSEC_WARNING_BROKENSIGNATURE"
+#define HID_XMLSEC_QUERY_LOSINGSIGNATURE "SFX2_HID_XMLSEC_QUERY_LOSINGSIGNATURE"
+#define HID_XMLSEC_QUERY_SAVEBEFORESIGN "SFX2_HID_XMLSEC_QUERY_SAVEBEFORESIGN"
+#define HID_XMLSECDLG_MACROWARN "SFX2_HID_XMLSECDLG_MACROWARN"
+#define HID_XMLSEC_INFO_WRONGDOCFORMAT "SFX2_HID_XMLSEC_INFO_WRONGDOCFORMAT"
+#define HID_WARNING_MACROSDISABLED "SFX2_HID_WARNING_MACROSDISABLED"
+#define HID_WARNING_ALIENFORMAT "SFX2_HID_WARNING_ALIENFORMAT"
+#define HID_HELP_ONSTARTUP_BOX "SFX2_HID_HELP_ONSTARTUP_BOX"
+#define HID_DLG_CHECKFORONLINEUPDATE "SFX2_HID_DLG_CHECKFORONLINEUPDATE"
+#define HID_TP_CUSTOMPROPERTIES "SFX2_HID_TP_CUSTOMPROPERTIES"
+#define HID_CTRL_CUSTOMPROPERTIES "SFX2_HID_CTRL_CUSTOMPROPERTIES"
+#define HID_CTRL_CUSTOMPROPS_YES_NO "SFX2_HID_CTRL_CUSTOMPROPS_YES_NO"
+#define HID_DLG_CUSTOMPROPS_DURATION "SFX2_HID_DLG_CUSTOMPROPS_DURATION"
-#define HID_SECURITYTAB_PASSWORD_TO_OPEN (HID_SFX_START + 328)
-#define HID_SECURITYTAB_CONFIRM_PASSWORD_TO_OPEN (HID_SFX_START + 329)
-#define HID_SECURITYTAB_PASSWORD_TO_MODIFY (HID_SFX_START + 330)
-#define HID_SECURITYTAB_CONFIRM_PASSWORD_TO_MODIFY (HID_SFX_START + 331)
-#define HID_SECURITYTAB_OPEN_FILE_READONLY (HID_SFX_START + 332)
-#define HID_SECURITYTAB_RECORD_CHANGES (HID_SFX_START + 333)
-#define HID_SECURITYTAB_PROTECTION (HID_SFX_START + 334)
+#define HID_HELP_ONHELP "SFX2_HID_HELP_ONHELP"
-#define ACT_SFX_HID_END HID_SECURITYTAB_PROTECTION
+#define HID_QUERY_LOAD_TEMPLATE "SFX2_HID_QUERY_LOAD_TEMPLATE"
-// Overflow test --------------------------------------------------------
+#define HID_SECURITYTAB_PASSWORD_TO_OPEN "SFX2_HID_SECURITYTAB_PASSWORD_TO_OPEN"
+#define HID_SECURITYTAB_CONFIRM_PASSWORD_TO_OPEN "SFX2_HID_SECURITYTAB_CONFIRM_PASSWORD_TO_OPEN"
+#define HID_SECURITYTAB_PASSWORD_TO_MODIFY "SFX2_HID_SECURITYTAB_PASSWORD_TO_MODIFY"
+#define HID_SECURITYTAB_CONFIRM_PASSWORD_TO_MODIFY "SFX2_HID_SECURITYTAB_CONFIRM_PASSWORD_TO_MODIFY"
+#define HID_SECURITYTAB_OPEN_FILE_READONLY "SFX2_HID_SECURITYTAB_OPEN_FILE_READONLY"
+#define HID_SECURITYTAB_RECORD_CHANGES "SFX2_HID_SECURITYTAB_RECORD_CHANGES"
+#define HID_SECURITYTAB_PROTECTION "SFX2_HID_SECURITYTAB_PROTECTION"
-#if ACT_SFX_HID_END > HID_SFX_END
-#error Resource overflow in #line, #file
-#endif
-
-#define HID_HELP_ONHELP 68245
+#define HID_TASKPANE_WINDOW "SFX2_HID_TASKPANE_WINDOW"
+#define HID_TASKPANE_VIEW_MENU "SFX2_HID_TASKPANE_VIEW_MENU"
+#define HID_DOCINFOSECURITY "SFX2_HID_DOCINFOSECURITY"
#endif // #ifndef _SFX_HELPID_HRC
diff --git a/sfx2/source/inc/hexplwnd.hxx b/sfx2/source/inc/hexplwnd.hxx
index 501b2bbef242..501b2bbef242 100644..100755
--- a/sfx2/source/inc/hexplwnd.hxx
+++ b/sfx2/source/inc/hexplwnd.hxx
diff --git a/sfx2/source/inc/iframe.hxx b/sfx2/source/inc/iframe.hxx
index b0a98b740a0b..b0a98b740a0b 100644..100755
--- a/sfx2/source/inc/iframe.hxx
+++ b/sfx2/source/inc/iframe.hxx
diff --git a/sfx2/source/inc/intro.hxx b/sfx2/source/inc/intro.hxx
index 8eb741bc7a97..8eb741bc7a97 100644..100755
--- a/sfx2/source/inc/intro.hxx
+++ b/sfx2/source/inc/intro.hxx
diff --git a/sfx2/source/inc/mailmodel.hxx b/sfx2/source/inc/mailmodel.hxx
index 72713b479801..1a8193111470 100644..100755
--- a/sfx2/source/inc/mailmodel.hxx
+++ b/sfx2/source/inc/mailmodel.hxx
@@ -101,7 +101,7 @@ public:
SendMailResult Send( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame, const rtl::OUString& rType );
};
-BOOL CreateFromAddress_Impl( String& rFrom );
+sal_Bool CreateFromAddress_Impl( String& rFrom );
#endif // INCLUDED_SFX_MAILMODEL_HXX
diff --git a/sfx2/source/inc/mnucfga.hxx b/sfx2/source/inc/mnucfga.hxx
index 5499f02273fa..72884e319bc3 100644..100755
--- a/sfx2/source/inc/mnucfga.hxx
+++ b/sfx2/source/inc/mnucfga.hxx
@@ -37,7 +37,7 @@ class SfxMenuCfgItemArr;
struct SfxMenuCfgItem
{
- USHORT nId; // id of the binding or 0 if none
+ sal_uInt16 nId; // id of the binding or 0 if none
String aTitle; // title of the item
String aHelpText;
String aCommand;
diff --git a/sfx2/source/inc/nfltdlg.hxx b/sfx2/source/inc/nfltdlg.hxx
index d7d5fa26f64d..2a1e6b421bdd 100644..100755
--- a/sfx2/source/inc/nfltdlg.hxx
+++ b/sfx2/source/inc/nfltdlg.hxx
@@ -56,7 +56,7 @@ public:
SfxFilterDialog( Window * pParent,
SfxMedium* pMed,
const SfxFilterMatcher &rMatcher,
- const String *pDefFilter, BOOL bShowConvert = TRUE );
+ const String *pDefFilter, sal_Bool bShowConvert = sal_True );
String GetSelectEntry() const;
};
diff --git a/sfx2/source/inc/nochaos.hxx b/sfx2/source/inc/nochaos.hxx
index a5bb237d7f4a..473980578742 100644..100755
--- a/sfx2/source/inc/nochaos.hxx
+++ b/sfx2/source/inc/nochaos.hxx
@@ -34,7 +34,7 @@ class NoChaos
{
public:
static SfxItemPool* GetItemPool();
- static USHORT ReleaseItemPool();
+ static sal_uInt16 ReleaseItemPool();
};
#endif
diff --git a/sfx2/source/inc/objmnctl.hxx b/sfx2/source/inc/objmnctl.hxx
index 86fd8d97585e..4d744ccd957c 100644..100755
--- a/sfx2/source/inc/objmnctl.hxx
+++ b/sfx2/source/inc/objmnctl.hxx
@@ -43,10 +43,10 @@ class SfxObjectVerbsControl: public SfxMenuControl
private:
void FillMenu();
DECL_LINK( MenuSelect, Menu * );
- virtual void StateChanged( USHORT, SfxItemState, const SfxPoolItem* pState );
+ virtual void StateChanged( sal_uInt16, SfxItemState, const SfxPoolItem* pState );
public:
- SfxObjectVerbsControl(USHORT, Menu&, SfxBindings&);
+ SfxObjectVerbsControl(sal_uInt16, Menu&, SfxBindings&);
~SfxObjectVerbsControl();
virtual PopupMenu* GetPopup() const;
SFX_DECL_MENU_CONTROL();
diff --git a/sfx2/source/inc/objshimp.hxx b/sfx2/source/inc/objshimp.hxx
index 023031334fd3..023031334fd3 100644..100755
--- a/sfx2/source/inc/objshimp.hxx
+++ b/sfx2/source/inc/objshimp.hxx
diff --git a/sfx2/source/inc/openflag.hxx b/sfx2/source/inc/openflag.hxx
index 7d9d881dc709..7d9d881dc709 100644..100755
--- a/sfx2/source/inc/openflag.hxx
+++ b/sfx2/source/inc/openflag.hxx
diff --git a/sfx2/source/inc/ownsubfilterservice.hxx b/sfx2/source/inc/ownsubfilterservice.hxx
index 51bdaf23d35a..51bdaf23d35a 100644..100755
--- a/sfx2/source/inc/ownsubfilterservice.hxx
+++ b/sfx2/source/inc/ownsubfilterservice.hxx
diff --git a/sfx2/source/inc/partwnd.hxx b/sfx2/source/inc/partwnd.hxx
index 269d879e3414..269d879e3414 100644..100755
--- a/sfx2/source/inc/partwnd.hxx
+++ b/sfx2/source/inc/partwnd.hxx
diff --git a/sfx2/source/inc/plugin.hxx b/sfx2/source/inc/plugin.hxx
index 852e32b80449..852e32b80449 100644..100755
--- a/sfx2/source/inc/plugin.hxx
+++ b/sfx2/source/inc/plugin.hxx
diff --git a/sfx2/source/inc/preview.hxx b/sfx2/source/inc/preview.hxx
index 483e651fa604..483e651fa604 100644..100755
--- a/sfx2/source/inc/preview.hxx
+++ b/sfx2/source/inc/preview.hxx
diff --git a/sfx2/source/inc/recfloat.hxx b/sfx2/source/inc/recfloat.hxx
index 127b7396b8f1..c9458310e464 100644..100755
--- a/sfx2/source/inc/recfloat.hxx
+++ b/sfx2/source/inc/recfloat.hxx
@@ -39,7 +39,7 @@ class SfxRecordingFloatWrapper_Impl : public SfxChildWindow
SfxBindings* pBindings;
public:
SfxRecordingFloatWrapper_Impl( Window* pParent ,
- USHORT nId ,
+ sal_uInt16 nId ,
SfxBindings* pBindings ,
SfxChildWinInfo* pInfo );
~SfxRecordingFloatWrapper_Impl();
@@ -58,7 +58,7 @@ public:
SfxChildWindow* pChildWin ,
Window* pParent );
virtual ~SfxRecordingFloat_Impl();
- virtual BOOL Close();
+ virtual sal_Bool Close();
virtual void FillInfo( SfxChildWinInfo& rInfo ) const;
virtual void StateChanged( StateChangedType nStateChange );
diff --git a/sfx2/source/inc/referers.hxx b/sfx2/source/inc/referers.hxx
index cf58771396d1..cf58771396d1 100644..100755
--- a/sfx2/source/inc/referers.hxx
+++ b/sfx2/source/inc/referers.hxx
diff --git a/sfx2/source/inc/sfxlocal.hrc b/sfx2/source/inc/sfxlocal.hrc
index c9da3c41b455..f2afb54b161c 100644..100755
--- a/sfx2/source/inc/sfxlocal.hrc
+++ b/sfx2/source/inc/sfxlocal.hrc
@@ -24,11 +24,9 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-//============================================================================
-// Local Resources
-//
-// (C) 1996 - 2000 Star Division GmbH, Hamburg, Germany
-//----------------------------------------------------------------------------
+
+// local resources
+
#ifndef _SFXLOCAL_HRC
#define _SFXLOCAL_HRC
diff --git a/sfx2/source/inc/sfxpicklist.hxx b/sfx2/source/inc/sfxpicklist.hxx
index cf857f6a99f2..458b5c7a7b71 100644..100755
--- a/sfx2/source/inc/sfxpicklist.hxx
+++ b/sfx2/source/inc/sfxpicklist.hxx
@@ -64,7 +64,7 @@ class SfxPickList : public SfxListener
static osl::Mutex* GetOrCreateMutex();
- void CreatePicklistMenuTitle( Menu* pMenu, USHORT nItemId, const String& aURL, sal_uInt32 nNo );
+ void CreatePicklistMenuTitle( Menu* pMenu, sal_uInt16 nItemId, const String& aURL, sal_uInt32 nNo );
PickListEntry* GetPickListEntry( sal_uInt32 nIndex );
void CreatePickListEntries();
void RemovePickListEntries();
@@ -77,7 +77,7 @@ class SfxPickList : public SfxListener
sal_uInt32 GetAllowedMenuSize() { return m_nAllowedMenuSize; }
sal_uInt32 GetNumOfEntries() const { return m_aPicklistVector.size(); }
void CreateMenuEntries( Menu* pMenu );
- void ExecuteMenuEntry( USHORT nId );
+ void ExecuteMenuEntry( sal_uInt16 nId );
void ExecuteEntry( sal_uInt32 nIndex );
String GetMenuEntryTitle( sal_uInt32 nIndex );
diff --git a/sfx2/source/inc/sfxtypes.hxx b/sfx2/source/inc/sfxtypes.hxx
index 0e059af62c46..94bef6d9a1dd 100644..100755
--- a/sfx2/source/inc/sfxtypes.hxx
+++ b/sfx2/source/inc/sfxtypes.hxx
@@ -53,12 +53,6 @@
class SfxShell;
class Timer;
-#if !defined(_SFX_APPCTOR_CXX) && defined(WNT)
-#ifndef _DLL_
-#error _DLL_ mal wieder nicht defined => GetpApp() == 0
-#endif
-#endif
-
//------------------------------------------------------------------------
// Macro for the Call-Profiler under WinNT
@@ -152,29 +146,29 @@ struct StringList_Impl : private Resource
ResId aResId;
- StringList_Impl( const ResId& rErrIdP, USHORT nId)
+ StringList_Impl( const ResId& rErrIdP, sal_uInt16 nId)
: Resource( rErrIdP ),aResId(nId, *rErrIdP.GetResMgr()){}
~StringList_Impl() { FreeResource(); }
String GetString(){ return String( aResId ); }
- operator BOOL(){return IsAvailableRes(aResId.SetRT(RSC_STRING));}
+ operator sal_Bool(){return IsAvailableRes(aResId.SetRT(RSC_STRING));}
};
#define SFX_DEL_PTRARR(pArr) \
{ \
- for ( USHORT n = (pArr)->Count(); n--; ) \
+ for ( sal_uInt16 n = (pArr)->Count(); n--; ) \
delete (pArr)->GetObject(n); \
DELETEX(pArr); \
}
class SfxBoolResetter
{
- BOOL& _rVar;
- BOOL _bOld;
+ sal_Bool& _rVar;
+ sal_Bool _bOld;
public:
- SfxBoolResetter( BOOL &rVar )
+ SfxBoolResetter( sal_Bool &rVar )
: _rVar( rVar ),
_bOld( rVar )
{}
diff --git a/sfx2/source/inc/sfxurlrelocator.hxx b/sfx2/source/inc/sfxurlrelocator.hxx
index 06b51ae0c444..83ade822a9cb 100644..100755
--- a/sfx2/source/inc/sfxurlrelocator.hxx
+++ b/sfx2/source/inc/sfxurlrelocator.hxx
@@ -31,6 +31,7 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/util/XOfficeInstallationDirectories.hpp>
+#include <com/sun/star/util/XMacroExpander.hpp>
#include <rtl/ustring.hxx>
#include <osl/mutex.hxx>
@@ -40,6 +41,7 @@ class SfxURLRelocator_Impl
::osl::Mutex maMutex;
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxFactory;
::com::sun::star::uno::Reference< ::com::sun::star::util::XOfficeInstallationDirectories > mxOfficeInstDirs;
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XMacroExpander > mxMacroExpander;
public:
static bool propertyCanContainOfficeDir( const rtl::OUString & rPropName );
@@ -49,6 +51,9 @@ public:
SfxURLRelocator_Impl( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xFactory );
~SfxURLRelocator_Impl();
+
+private:
+ void implExpandURL( ::rtl::OUString& io_url );
};
#endif
diff --git a/sfx2/source/inc/slotserv.hxx b/sfx2/source/inc/slotserv.hxx
index 1150e244c8d3..79431630aa9a 100644..100755
--- a/sfx2/source/inc/slotserv.hxx
+++ b/sfx2/source/inc/slotserv.hxx
@@ -36,14 +36,14 @@ class SfxSlotServer
{
private:
const SfxSlot* _pSlot;
- USHORT _nShellLevel;
+ sal_uInt16 _nShellLevel;
public:
- SfxSlotServer( const SfxSlot &rSlot, USHORT nShell );
+ SfxSlotServer( const SfxSlot &rSlot, sal_uInt16 nShell );
SfxSlotServer();
- USHORT GetShellLevel() const;
- void SetShellLevel(USHORT nLevel) { _nShellLevel = nLevel; }
+ sal_uInt16 GetShellLevel() const;
+ void SetShellLevel(sal_uInt16 nLevel) { _nShellLevel = nLevel; }
void SetSlot(const SfxSlot* pSlot) {
_pSlot = pSlot;
}
@@ -53,7 +53,7 @@ public:
//--------------------------------------------------------------------
-inline SfxSlotServer::SfxSlotServer( const SfxSlot &rSlot, USHORT nShell ):
+inline SfxSlotServer::SfxSlotServer( const SfxSlot &rSlot, sal_uInt16 nShell ):
_pSlot( &rSlot),
_nShellLevel( nShell )
{
@@ -69,7 +69,7 @@ inline SfxSlotServer::SfxSlotServer():
//--------------------------------------------------------------------
-inline USHORT SfxSlotServer::GetShellLevel() const
+inline sal_uInt16 SfxSlotServer::GetShellLevel() const
{
return _nShellLevel;
}
diff --git a/sfx2/source/inc/splitwin.hxx b/sfx2/source/inc/splitwin.hxx
index 5fb6650ed075..00794ae944d8 100644..100755
--- a/sfx2/source/inc/splitwin.hxx
+++ b/sfx2/source/inc/splitwin.hxx
@@ -45,21 +45,21 @@ private:
SfxChildAlignment eAlign;
SfxWorkWindow* pWorkWin;
SfxDockArr_Impl* pDockArr;
- BOOL bLocked;
- BOOL bPinned;
+ sal_Bool bLocked;
+ sal_Bool bPinned;
SfxEmptySplitWin_Impl* pEmptyWin;
SfxDockingWindow* pActive;
void InsertWindow_Impl( SfxDock_Impl* pDockWin,
const Size& rSize,
- USHORT nLine,
- USHORT nPos,
- BOOL bNewLine=FALSE );
+ sal_uInt16 nLine,
+ sal_uInt16 nPos,
+ sal_Bool bNewLine=sal_False );
DECL_LINK( TimerHdl, Timer* );
- BOOL CursorIsOverRect( BOOL bForceAdding = FALSE ) const;
- void SetPinned_Impl( BOOL );
- void SetFadeIn_Impl( BOOL );
+ sal_Bool CursorIsOverRect( sal_Bool bForceAdding = sal_False ) const;
+ void SetPinned_Impl( sal_Bool );
+ void SetFadeIn_Impl( sal_Bool );
void SaveConfig_Impl();
void FadeOut_Impl();
@@ -73,57 +73,57 @@ protected:
public:
SfxSplitWindow( Window* pParent, SfxChildAlignment eAl,
- SfxWorkWindow *pW, BOOL bWithButtons,
+ SfxWorkWindow *pW, sal_Bool bWithButtons,
WinBits nBits = WB_BORDER | WB_SIZEABLE | WB_3DLOOK );
~SfxSplitWindow();
- void ReleaseWindow_Impl(SfxDockingWindow *pWin, BOOL bSaveConfig=TRUE);
+ void ReleaseWindow_Impl(SfxDockingWindow *pWin, sal_Bool bSaveConfig=sal_True);
void InsertWindow( SfxDockingWindow* pDockWin,
const Size& rSize);
void InsertWindow( SfxDockingWindow* pDockWin,
const Size& rSize,
- USHORT nLine,
- USHORT nPos,
- BOOL bNewLine=FALSE );
+ sal_uInt16 nLine,
+ sal_uInt16 nPos,
+ sal_Bool bNewLine=sal_False );
void MoveWindow( SfxDockingWindow* pDockWin,
const Size& rSize,
- USHORT nLine,
- USHORT nPos,
- BOOL bNewLine=FALSE );
+ sal_uInt16 nLine,
+ sal_uInt16 nPos,
+ sal_Bool bNewLine=sal_False );
- void RemoveWindow( SfxDockingWindow* pDockWin, BOOL bHide=TRUE);
+ void RemoveWindow( SfxDockingWindow* pDockWin, sal_Bool bHide=sal_True);
- void Lock( BOOL bLock=TRUE )
+ void Lock( sal_Bool bLock=sal_True )
{
bLocked = bLock;
SetUpdateMode( !bLock );
}
using Window::IsLocked;
- BOOL IsLocked() const { return bLocked; }
- BOOL GetWindowPos( const SfxDockingWindow* pWindow,
- USHORT& rLine, USHORT& rPos ) const;
- BOOL GetWindowPos( const Point& rTestPos,
- USHORT& rLine, USHORT& rPos ) const;
- USHORT GetLineCount() const;
- long GetLineSize( USHORT ) const;
- USHORT GetWindowCount(USHORT nLine) const;
- USHORT GetWindowCount() const;
-
- BOOL IsPinned() const { return bPinned; }
- BOOL IsFadeIn() const;
- BOOL IsAutoHide( BOOL bSelf = FALSE ) const;
+ sal_Bool IsLocked() const { return bLocked; }
+ sal_Bool GetWindowPos( const SfxDockingWindow* pWindow,
+ sal_uInt16& rLine, sal_uInt16& rPos ) const;
+ sal_Bool GetWindowPos( const Point& rTestPos,
+ sal_uInt16& rLine, sal_uInt16& rPos ) const;
+ sal_uInt16 GetLineCount() const;
+ long GetLineSize( sal_uInt16 ) const;
+ sal_uInt16 GetWindowCount(sal_uInt16 nLine) const;
+ sal_uInt16 GetWindowCount() const;
+
+ sal_Bool IsPinned() const { return bPinned; }
+ sal_Bool IsFadeIn() const;
+ sal_Bool IsAutoHide( sal_Bool bSelf = sal_False ) const;
SplitWindow* GetSplitWindow();
virtual void AutoHide();
virtual void FadeOut();
virtual void FadeIn();
void Show_Impl();
- void Pin_Impl( BOOL bPinned );
- BOOL ActivateNextChild_Impl( BOOL bForward = TRUE );
+ void Pin_Impl( sal_Bool bPinned );
+ sal_Bool ActivateNextChild_Impl( sal_Bool bForward = sal_True );
void SetActiveWindow_Impl( SfxDockingWindow* pWin );
};
diff --git a/sfx2/source/inc/statcach.hxx b/sfx2/source/inc/statcach.hxx
index 43660e493e9f..3a996b73fa82 100644..100755
--- a/sfx2/source/inc/statcach.hxx
+++ b/sfx2/source/inc/statcach.hxx
@@ -92,7 +92,7 @@ friend class BindDispatch_Impl;
private:
SfxStateCache( const SfxStateCache& rOrig ); // inward
- void SetState_Impl( SfxItemState, const SfxPoolItem*, BOOL bMaybeDirty=FALSE );
+ void SetState_Impl( SfxItemState, const SfxPoolItem*, sal_Bool bMaybeDirty=sal_False );
public:
SfxStateCache( sal_uInt16 nFuncId );
@@ -110,11 +110,11 @@ public:
SfxPoolItem* GetItem() const { return pLastItem; }
void ClearCache();
- void SetState( SfxItemState, const SfxPoolItem*, BOOL bMaybeDirty=FALSE );
- void SetCachedState(BOOL bAlways = FALSE);
+ void SetState( SfxItemState, const SfxPoolItem*, sal_Bool bMaybeDirty=sal_False );
+ void SetCachedState(sal_Bool bAlways = sal_False);
void DeleteFloatingWindows();
void Invalidate( sal_Bool bWithSlot );
- void SetVisibleState( BOOL bShow=TRUE );
+ void SetVisibleState( sal_Bool bShow=sal_True );
SfxControllerItem* ChangeItemLink( SfxControllerItem* pNewBinding );
SfxControllerItem* GetItemLink() const;
diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx
index d6c4cf1bb798..c7d4e94d7f19 100644..100755
--- a/sfx2/source/inc/templdgi.hxx
+++ b/sfx2/source/inc/templdgi.hxx
@@ -70,7 +70,7 @@ private:
protected:
SfxCommonTemplateDialog_Impl* pDialog;
- USHORT nModifier;
+ sal_uInt16 nModifier;
public:
DropListBox_Impl( Window* pParent, const ResId& rId, SfxCommonTemplateDialog_Impl* pD ) :
@@ -83,7 +83,7 @@ public:
using SvLBox::ExecuteDrop;
virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt );
- USHORT GetModifier() const { return nModifier; }
+ sal_uInt16 GetModifier() const { return nModifier; }
virtual long Notify( NotifyEvent& rNEvt );
};
@@ -161,11 +161,11 @@ protected:
ListBox aFilterLb;
Size aSize;
- USHORT nActFamily; // Id in the ToolBox = Position - 1
- USHORT nActFilter; // FilterIdx
- USHORT nAppFilter; // Filter, which has set the application (for automatic)
+ sal_uInt16 nActFamily; // Id in the ToolBox = Position - 1
+ sal_uInt16 nActFilter; // FilterIdx
+ sal_uInt16 nAppFilter; // Filter, which has set the application (for automatic)
- BOOL bDontUpdate :1,
+ sal_Bool bDontUpdate :1,
bIsWater :1,
bEnabled :1,
bUpdate :1,
@@ -187,14 +187,14 @@ protected:
DECL_LINK( TimeOut, Timer * );
- virtual void EnableItem( USHORT /*nMesId*/, BOOL /*bCheck*/ = TRUE ) {}
- virtual void CheckItem( USHORT /*nMesId*/, BOOL /*bCheck*/ = TRUE ) {}
- virtual BOOL IsCheckedItem( USHORT /*nMesId*/ ) { return TRUE; }
+ virtual void EnableItem( sal_uInt16 /*nMesId*/, sal_Bool /*bCheck*/ = sal_True ) {}
+ virtual void CheckItem( sal_uInt16 /*nMesId*/, sal_Bool /*bCheck*/ = sal_True ) {}
+ virtual sal_Bool IsCheckedItem( sal_uInt16 /*nMesId*/ ) { return sal_True; }
virtual void LoadedFamilies() {}
virtual void Update() { UpdateStyles_Impl(UPDATE_FAMILY_LIST); }
virtual void InvalidateBindings();
- virtual void InsertFamilyItem( USHORT nId, const SfxStyleFamilyItem* pIten ) = 0;
- virtual void EnableFamilyItem( USHORT nId, BOOL bEnabled = TRUE ) = 0;
+ virtual void InsertFamilyItem( sal_uInt16 nId, const SfxStyleFamilyItem* pIten ) = 0;
+ virtual void EnableFamilyItem( sal_uInt16 nId, sal_Bool bEnabled = sal_True ) = 0;
virtual void ClearFamilyList() = 0;
virtual void ReplaceUpdateButtonByMenu();
@@ -202,37 +202,37 @@ protected:
void EditHdl( void* );
void DeleteHdl( void* );
- BOOL Execute_Impl( USHORT nId, const String& rStr, const String& rRefStr,
- USHORT nFamily, USHORT nMask = 0,
- USHORT* pIdx = NULL, const USHORT* pModifier = NULL );
+ sal_Bool Execute_Impl( sal_uInt16 nId, const String& rStr, const String& rRefStr,
+ sal_uInt16 nFamily, sal_uInt16 nMask = 0,
+ sal_uInt16* pIdx = NULL, const sal_uInt16* pModifier = NULL );
- void UpdateStyles_Impl(USHORT nFlags);
+ void UpdateStyles_Impl(sal_uInt16 nFlags);
const SfxStyleFamilyItem* GetFamilyItem_Impl() const;
- BOOL IsInitialized() { return nActFamily != 0xffff; }
+ sal_Bool IsInitialized() { return nActFamily != 0xffff; }
void ResetFocus();
void EnableDelete();
void Initialize();
- void FilterSelect( USHORT nFilterIdx, BOOL bForce = FALSE );
- void SetFamilyState( USHORT nSlotId, const SfxTemplateItem* );
+ void FilterSelect( sal_uInt16 nFilterIdx, sal_Bool bForce = sal_False );
+ void SetFamilyState( sal_uInt16 nSlotId, const SfxTemplateItem* );
void SetWaterCanState( const SfxBoolItem* pItem );
void SelectStyle( const String& rStyle );
- BOOL HasSelectedStyle() const;
+ sal_Bool HasSelectedStyle() const;
void FillTreeBox();
void Update_Impl();
void UpdateFamily_Impl();
// In which FamilyState do I have to look , in order to get the
// information of the ith Family in the pStyleFamilies.
- USHORT StyleNrToInfoOffset( USHORT i );
- USHORT InfoOffsetToStyleNr( USHORT i );
+ sal_uInt16 StyleNrToInfoOffset( sal_uInt16 i );
+ sal_uInt16 InfoOffsetToStyleNr( sal_uInt16 i );
void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
- void FamilySelect( USHORT nId );
- void SetFamily( USHORT nId );
- void ActionSelect( USHORT nId );
+ void FamilySelect( sal_uInt16 nId );
+ void SetFamily( sal_uInt16 nId );
+ void ActionSelect( sal_uInt16 nId );
sal_Int32 LoadFactoryStyleFilter( SfxObjectShell* i_pObjSh );
void SaveFactoryStyleFilter( SfxObjectShell* i_pObjSh, sal_Int32 i_nFilter );
@@ -246,31 +246,31 @@ public:
DECL_LINK( MenuSelectHdl, Menu * );
- virtual void EnableEdit( BOOL b = TRUE ) { bCanEdit = b; }
- virtual void EnableDel( BOOL b = TRUE ) { bCanDel = b; }
- virtual void EnableNew( BOOL b = TRUE ) { bCanNew = b; }
+ virtual void EnableEdit( sal_Bool b = sal_True ) { bCanEdit = b; }
+ virtual void EnableDel( sal_Bool b = sal_True ) { bCanDel = b; }
+ virtual void EnableNew( sal_Bool b = sal_True ) { bCanNew = b; }
ISfxTemplateCommon* GetISfxTemplateCommon() { return &aISfxTemplateCommon; }
Window* GetWindow() { return pWindow; }
- void EnableTreeDrag( BOOL b = TRUE );
+ void EnableTreeDrag( sal_Bool b = sal_True );
void ExecuteContextMenu_Impl( const Point& rPos, Window* pWin );
- void EnableExample_Impl( USHORT nId, BOOL bEnable );
+ void EnableExample_Impl( sal_uInt16 nId, sal_Bool bEnable );
SfxStyleFamily GetActualFamily() const;
String GetSelectedEntry() const;
SfxObjectShell* GetObjectShell() const { return pCurObjShell; }
virtual void PrepareDeleteAction(); // disable buttons, change button text, etc. when del is going to happen
- inline BOOL CanEdit( void ) const { return bCanEdit; }
- inline BOOL CanDel( void ) const { return bCanDel; }
- inline BOOL CanNew( void ) const { return bCanNew; }
+ inline sal_Bool CanEdit( void ) const { return bCanEdit; }
+ inline sal_Bool CanDel( void ) const { return bCanDel; }
+ inline sal_Bool CanNew( void ) const { return bCanNew; }
// normaly for derivates from SvTreeListBoxes, but in this case the dialog handles context menus
virtual PopupMenu* CreateContextMenu( void );
// converts from SFX_STYLE_FAMILY Ids to 1-5
- static USHORT SfxFamilyIdToNId( SfxStyleFamily nFamily );
+ static sal_uInt16 SfxFamilyIdToNId( SfxStyleFamily nFamily );
void SetAutomaticFilter();
};
@@ -295,7 +295,7 @@ private:
friend class DropToolBox_Impl;
SfxTemplateDialog* m_pFloat;
- BOOL m_bZoomIn;
+ sal_Bool m_bZoomIn;
DropToolBox_Impl m_aActionTbL;
ToolBox m_aActionTbR;
@@ -306,13 +306,13 @@ private:
protected:
virtual void Command( const CommandEvent& rMEvt );
- virtual void EnableEdit( BOOL = TRUE );
- virtual void EnableItem( USHORT nMesId, BOOL bCheck = TRUE );
- virtual void CheckItem( USHORT nMesId, BOOL bCheck = TRUE );
- virtual BOOL IsCheckedItem( USHORT nMesId );
+ virtual void EnableEdit( sal_Bool = sal_True );
+ virtual void EnableItem( sal_uInt16 nMesId, sal_Bool bCheck = sal_True );
+ virtual void CheckItem( sal_uInt16 nMesId, sal_Bool bCheck = sal_True );
+ virtual sal_Bool IsCheckedItem( sal_uInt16 nMesId );
virtual void LoadedFamilies();
- virtual void InsertFamilyItem( USHORT nId, const SfxStyleFamilyItem* pIten );
- virtual void EnableFamilyItem( USHORT nId, BOOL bEnabled = TRUE );
+ virtual void InsertFamilyItem( sal_uInt16 nId, const SfxStyleFamilyItem* pIten );
+ virtual void EnableFamilyItem( sal_uInt16 nId, sal_Bool bEnabled = sal_True );
virtual void ClearFamilyList();
virtual void ReplaceUpdateButtonByMenu();
@@ -352,15 +352,15 @@ private:
SfxModalDefParentHelper aHelper;
protected:
- virtual void EnableItem( USHORT nMesId, BOOL bCheck = TRUE );
- virtual void CheckItem( USHORT nMesId, BOOL bCheck = TRUE );
- virtual BOOL IsCheckedItem( USHORT nMesId );
- virtual void InsertFamilyItem( USHORT nId, const SfxStyleFamilyItem* pIten );
- virtual void EnableFamilyItem( USHORT nId, BOOL bEnabled = TRUE );
+ virtual void EnableItem( sal_uInt16 nMesId, sal_Bool bCheck = sal_True );
+ virtual void CheckItem( sal_uInt16 nMesId, sal_Bool bCheck = sal_True );
+ virtual sal_Bool IsCheckedItem( sal_uInt16 nMesId );
+ virtual void InsertFamilyItem( sal_uInt16 nId, const SfxStyleFamilyItem* pIten );
+ virtual void EnableFamilyItem( sal_uInt16 nId, sal_Bool bEnabled = sal_True );
virtual void ClearFamilyList();
- virtual void EnableEdit( BOOL = TRUE );
- virtual void EnableDel( BOOL = TRUE );
- virtual void EnableNew( BOOL = TRUE );
+ virtual void EnableEdit( sal_Bool = sal_True );
+ virtual void EnableDel( sal_Bool = sal_True );
+ virtual void EnableNew( sal_Bool = sal_True );
using SfxCommonTemplateDialog_Impl::NewHdl;
DECL_LINK( FamListSelect, ListBox * );
diff --git a/sfx2/source/inc/tplcitem.hxx b/sfx2/source/inc/tplcitem.hxx
index f3d5898d8a75..ee02d409ffc0 100644..100755
--- a/sfx2/source/inc/tplcitem.hxx
+++ b/sfx2/source/inc/tplcitem.hxx
@@ -35,17 +35,17 @@ class SfxCommonTemplateDialog_Impl;
class SfxTemplateControllerItem: public SfxControllerItem {
SfxCommonTemplateDialog_Impl &rTemplateDlg;
- BYTE nWaterCanState;
+ sal_uInt8 nWaterCanState;
long nUserEventId;
DECL_STATIC_LINK(SfxTemplateControllerItem, SetWaterCanStateHdl_Impl,
SfxTemplateControllerItem*);
protected:
- virtual void StateChanged( USHORT, SfxItemState, const SfxPoolItem* pState );
+ virtual void StateChanged( sal_uInt16, SfxItemState, const SfxPoolItem* pState );
public:
- SfxTemplateControllerItem( USHORT nId, SfxCommonTemplateDialog_Impl &rDlg, SfxBindings &);
+ SfxTemplateControllerItem( sal_uInt16 nId, SfxCommonTemplateDialog_Impl &rDlg, SfxBindings &);
~SfxTemplateControllerItem();
};
diff --git a/sfx2/source/inc/tplcomp.hxx b/sfx2/source/inc/tplcomp.hxx
index ba090e87cb67..ba090e87cb67 100644..100755
--- a/sfx2/source/inc/tplcomp.hxx
+++ b/sfx2/source/inc/tplcomp.hxx
diff --git a/sfx2/source/inc/versdlg.hxx b/sfx2/source/inc/versdlg.hxx
index 836e4f51b785..d70e9046f3f4 100644..100755
--- a/sfx2/source/inc/versdlg.hxx
+++ b/sfx2/source/inc/versdlg.hxx
@@ -98,7 +98,7 @@ class SfxViewVersionDialog_Impl : public SfxModalDialog
public:
SfxViewVersionDialog_Impl( Window *pParent,
- SfxVersionInfo& rInfo, BOOL bEdit );
+ SfxVersionInfo& rInfo, sal_Bool bEdit );
};
#endif
diff --git a/sfx2/source/inc/virtmenu.hxx b/sfx2/source/inc/virtmenu.hxx
index d50966a141a0..1eea340f26a9 100644..100755
--- a/sfx2/source/inc/virtmenu.hxx
+++ b/sfx2/source/inc/virtmenu.hxx
@@ -55,16 +55,16 @@ private:
PopupMenu* pPickMenu;
PopupMenu* pAddonsMenu;
Timer* pAutoDeactivate; // Hack for QAP-Bug
- USHORT nVisibleItems;
- USHORT nId;
- USHORT nCount;
- USHORT nLocks;
- BOOL bResCtor : 1; // SV Menu created from resource
- BOOL bOLE : 1; // InPlaceMenu
- BOOL bHelpInitialized : 1;
- BOOL bIsActive : 1;
- BOOL bControllersUnBound : 1;
- BOOL bIsAddonPopupMenu : 1;
+ sal_uInt16 nVisibleItems;
+ sal_uInt16 nId;
+ sal_uInt16 nCount;
+ sal_uInt16 nLocks;
+ sal_Bool bResCtor : 1; // SV Menu created from resource
+ sal_Bool bOLE : 1; // InPlaceMenu
+ sal_Bool bHelpInitialized : 1;
+ sal_Bool bIsActive : 1;
+ sal_Bool bControllersUnBound : 1;
+ sal_Bool bIsAddonPopupMenu : 1;
private:
void Construct_Impl();
@@ -77,8 +77,8 @@ private:
void BindControllers();
protected:
- SfxVirtualMenu( USHORT nOwnId, SfxVirtualMenu* pParent, Menu& rMenu, BOOL bWithHelp,
- SfxBindings &rBind, BOOL bOLEServer=FALSE, BOOL bRes=FALSE, BOOL bIsAddonMenu=FALSE );
+ SfxVirtualMenu( sal_uInt16 nOwnId, SfxVirtualMenu* pParent, Menu& rMenu, sal_Bool bWithHelp,
+ SfxBindings &rBind, sal_Bool bOLEServer=sal_False, sal_Bool bRes=sal_False, sal_Bool bIsAddonMenu=sal_False );
void CreateFromSVMenu();
DECL_LINK( Highlight, Menu * );
@@ -93,21 +93,21 @@ protected:
public:
~SfxVirtualMenu();
- SfxVirtualMenu( Menu *pStarViewMenu, BOOL bWithHelp,
- SfxBindings &rBind, BOOL bOLEServer=FALSE, BOOL bRes=FALSE, BOOL bIsAddonMenu=FALSE );
- void CheckItem( USHORT nItemId, BOOL bCheck );
- void EnableItem( USHORT nItemId, BOOL bEnable );
- void SetItemText( USHORT nItemId, const String& rText );
+ SfxVirtualMenu( Menu *pStarViewMenu, sal_Bool bWithHelp,
+ SfxBindings &rBind, sal_Bool bOLEServer=sal_False, sal_Bool bRes=sal_False, sal_Bool bIsAddonMenu=sal_False );
+ void CheckItem( sal_uInt16 nItemId, sal_Bool bCheck );
+ void EnableItem( sal_uInt16 nItemId, sal_Bool bEnable );
+ void SetItemText( sal_uInt16 nItemId, const String& rText );
- USHORT GetItemPos( USHORT nItemId ) const;
+ sal_uInt16 GetItemPos( sal_uInt16 nItemId ) const;
- USHORT GetItemCount() const;
+ sal_uInt16 GetItemCount() const;
Menu* GetSVMenu() const;
- SfxMenuControl& operator[]( USHORT nPos ) const;
+ SfxMenuControl& operator[]( sal_uInt16 nPos ) const;
- USHORT GetItemId( USHORT nPos ) const;
- SfxVirtualMenu* GetPopupMenu( USHORT nId ) const;
- String GetItemText( USHORT nId ) const;
+ sal_uInt16 GetItemId( sal_uInt16 nPos ) const;
+ SfxVirtualMenu* GetPopupMenu( sal_uInt16 nId ) const;
+ String GetItemText( sal_uInt16 nId ) const;
//void InvalidateKeyCodes();
@@ -115,10 +115,10 @@ public:
void SetParentMenu( SfxVirtualMenu* pNewParent )
{ pParent = pNewParent; }
- void SetPopupMenu( USHORT nId, PopupMenu *pMenu );
- BOOL IsFromResource() const
+ void SetPopupMenu( sal_uInt16 nId, PopupMenu *pMenu );
+ sal_Bool IsFromResource() const
{ return bResCtor; }
- void InitPopup(USHORT nPos, BOOL bOLE = TRUE);
+ void InitPopup(sal_uInt16 nPos, sal_Bool bOLE = sal_True);
void InitializeHelp();
void SetResMgr(ResMgr* pMgr) {pResMgr = pMgr; }
ResMgr* GetResMgr() { return pResMgr; }
@@ -132,7 +132,7 @@ public:
// return the number of virtual items in this menu
-inline USHORT SfxVirtualMenu::GetItemCount() const
+inline sal_uInt16 SfxVirtualMenu::GetItemCount() const
{
return nCount;
}
@@ -140,7 +140,7 @@ inline USHORT SfxVirtualMenu::GetItemCount() const
//
-inline SfxMenuControl& SfxVirtualMenu::operator[]( USHORT nPos ) const
+inline SfxMenuControl& SfxVirtualMenu::operator[]( sal_uInt16 nPos ) const
{
return *(pItems+nPos);
}
@@ -148,7 +148,7 @@ inline SfxMenuControl& SfxVirtualMenu::operator[]( USHORT nPos ) const
// returns the item id at position nPos in the menu (or 0 if sep.)
-inline USHORT SfxVirtualMenu::GetItemId( USHORT nPos ) const
+inline sal_uInt16 SfxVirtualMenu::GetItemId( sal_uInt16 nPos ) const
{
return pItems ? pItems[nPos].GetId() : 0;
}
diff --git a/sfx2/source/inc/workwin.hxx b/sfx2/source/inc/workwin.hxx
index 275640f08592..0acaf892f93b 100644..100755
--- a/sfx2/source/inc/workwin.hxx
+++ b/sfx2/source/inc/workwin.hxx
@@ -29,6 +29,7 @@
#define _SFXWORKWIN_HXX
#include <vector>
+#include <deque>
#include <com/sun/star/frame/XDispatch.hpp>
#include <com/sun/star/frame/XFrame.hpp>
#include <com/sun/star/ui/XUIElement.hpp>
@@ -37,7 +38,7 @@
#include <cppuhelper/weak.hxx>
#include <cppuhelper/propshlp.hxx>
-#define _SVSTDARR_USHORTS
+#define _SVSTDARR_sal_uInt16S
#include <svl/svstdarr.hxx> // SvUShorts
#include <rtl/ustring.hxx>
#include <osl/mutex.hxx>
@@ -59,10 +60,10 @@ class SfxWorkWindow;
struct SfxObjectBar_Impl
{
- USHORT nId; // Resource - and ConfigId of Toolbox
- USHORT nMode; // special visibility flags
- USHORT nPos;
- USHORT nIndex;
+ sal_uInt16 nId; // Resource - and ConfigId of Toolbox
+ sal_uInt16 nMode; // special visibility flags
+ sal_uInt16 nPos;
+ sal_uInt16 nIndex;
sal_Bool bDestroy;
String aName;
SfxInterface* pIFace;
@@ -80,14 +81,14 @@ struct SfxObjectBar_Impl
struct SfxStatBar_Impl
{
- USHORT nId;
- BOOL bOn;
- BOOL bTemp;
+ sal_uInt16 nId;
+ sal_Bool bOn;
+ sal_Bool bTemp;
SfxStatBar_Impl() :
nId(0),
- bOn(TRUE),
- bTemp(FALSE)
+ bOn(sal_True),
+ bTemp(sal_False)
{}
};
@@ -105,15 +106,15 @@ struct SfxChild_Impl
Window* pWin;
Size aSize;
SfxChildAlignment eAlign;
- USHORT nVisible;
- BOOL bResize;
- BOOL bCanGetFocus;
- BOOL bSetFocus;
+ sal_uInt16 nVisible;
+ sal_Bool bResize;
+ sal_Bool bCanGetFocus;
+ sal_Bool bSetFocus;
SfxChild_Impl( Window& rChild, const Size& rSize,
- SfxChildAlignment eAlignment, BOOL bIsVisible ):
- pWin(&rChild), aSize(rSize), eAlign(eAlignment), bResize(FALSE),
- bCanGetFocus( FALSE ), bSetFocus( FALSE )
+ SfxChildAlignment eAlignment, sal_Bool bIsVisible ):
+ pWin(&rChild), aSize(rSize), eAlign(eAlignment), bResize(sal_False),
+ bCanGetFocus( sal_False ), bSetFocus( sal_False )
{
nVisible = bIsVisible ? CHILD_VISIBLE : CHILD_NOT_VISIBLE;
}
@@ -125,34 +126,34 @@ class SfxChildWinController_Impl : public SfxControllerItem
SfxWorkWindow* pWorkwin;
public:
- SfxChildWinController_Impl( USHORT nId, SfxWorkWindow *pWin );
- virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ SfxChildWinController_Impl( sal_uInt16 nId, SfxWorkWindow *pWin );
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
const SfxPoolItem* pState );
};
struct SfxChildWin_Impl
{
- USHORT nSaveId; // the ChildWindow-Id
- USHORT nInterfaceId; // the current context
- USHORT nId; // current Id
+ sal_uInt16 nSaveId; // the ChildWindow-Id
+ sal_uInt16 nInterfaceId; // the current context
+ sal_uInt16 nId; // current Id
SfxChildWindow* pWin;
- BOOL bCreate;
+ sal_Bool bCreate;
SfxChildWinInfo aInfo;
SfxChild_Impl* pCli; // != 0 at direct Children
- USHORT nVisibility;
- BOOL bEnable;
- BOOL bDisabled;
+ sal_uInt16 nVisibility;
+ sal_Bool bEnable;
+ sal_Bool bDisabled;
SfxChildWin_Impl( sal_uInt32 nID ) :
- nSaveId((USHORT) (nID & 0xFFFF) ),
- nInterfaceId((USHORT) (nID >> 16)),
+ nSaveId((sal_uInt16) (nID & 0xFFFF) ),
+ nInterfaceId((sal_uInt16) (nID >> 16)),
nId(nSaveId),
pWin(0),
- bCreate(FALSE),
+ bCreate(sal_False),
pCli(0),
- nVisibility( FALSE ),
- bEnable( TRUE ),
- bDisabled( FALSE )
+ nVisibility( sal_False ),
+ bEnable( sal_True ),
+ bDisabled( sal_False )
{}
};
@@ -175,14 +176,13 @@ enum SfxDockingConfig
DECL_PTRARRAY( SfxChildList_Impl, SfxChild_Impl*, 2, 2 )
DECL_PTRARRAY( SfxChildWindows_Impl, SfxChildWin_Impl*, 2, 2 )
-SV_DECL_OBJARR( SfxObjectBarArr_Impl, SfxObjectBar_Impl, 1, 2 )
struct SfxObjectBarList_Impl
{
- SfxObjectBarArr_Impl aArr;
- USHORT nAct;
+ std::deque<SfxObjectBar_Impl> aArr;
+ sal_uInt16 nAct;
- SfxObjectBar_Impl operator[] ( USHORT n )
+ SfxObjectBar_Impl operator[] ( sal_uInt16 n )
{ return aArr[n]; }
SfxObjectBar_Impl Actual()
{ return aArr[nAct]; }
@@ -258,15 +258,15 @@ protected:
Window* pWorkWin;
SfxShell* pConfigShell;
Window* pActiveChild;
- USHORT nUpdateMode;
- USHORT nChilds;
- USHORT nOrigMode;
- BOOL bSorted : 1;
- BOOL bDockingAllowed : 1;
- BOOL bInternalDockingAllowed : 1;
- BOOL bAllChildsVisible : 1;
- BOOL bIsFullScreen : 1;
- BOOL bShowStatusBar : 1;
+ sal_uInt16 nUpdateMode;
+ sal_uInt16 nChilds;
+ sal_uInt16 nOrigMode;
+ sal_Bool bSorted : 1;
+ sal_Bool bDockingAllowed : 1;
+ sal_Bool bInternalDockingAllowed : 1;
+ sal_Bool bAllChildsVisible : 1;
+ sal_Bool bIsFullScreen : 1;
+ sal_Bool bShowStatusBar : 1;
sal_Int32 m_nLock;
rtl::OUString m_aStatusBarResName;
rtl::OUString m_aLayoutManagerPropName;
@@ -275,13 +275,13 @@ protected:
::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > m_xLayoutManagerListener;
protected:
- void CreateChildWin_Impl(SfxChildWin_Impl*,BOOL);
+ void CreateChildWin_Impl(SfxChildWin_Impl*,sal_Bool);
void RemoveChildWin_Impl(SfxChildWin_Impl*);
void Sort_Impl();
void AlignChild_Impl( Window& rWindow, const Size& rNewSize,
SfxChildAlignment eAlign );
SfxChild_Impl* FindChild_Impl( const Window& rWindow ) const;
- virtual BOOL RequestTopToolSpacePixel_Impl( SvBorder aBorder );
+ virtual sal_Bool RequestTopToolSpacePixel_Impl( SvBorder aBorder );
virtual Rectangle GetTopRect_Impl();
SvBorder Arrange_Impl();
virtual void SaveStatus_Impl(SfxChildWindow*, const SfxChildWinInfo&);
@@ -295,14 +295,14 @@ public:
{ return *pBindings; }
Window* GetWindow() const
{ return pWorkWin; }
- Rectangle GetFreeArea( BOOL bAutoHide ) const;
- void SetDockingAllowed(BOOL bSet)
+ Rectangle GetFreeArea( sal_Bool bAutoHide ) const;
+ void SetDockingAllowed(sal_Bool bSet)
{ bDockingAllowed = bSet; }
- void SetInternalDockingAllowed(BOOL bSet)
+ void SetInternalDockingAllowed(sal_Bool bSet)
{ bInternalDockingAllowed = bSet; }
- BOOL IsDockingAllowed() const
+ sal_Bool IsDockingAllowed() const
{ return bDockingAllowed; }
- BOOL IsInternalDockingAllowed() const
+ sal_Bool IsInternalDockingAllowed() const
{ return bInternalDockingAllowed; }
SfxWorkWindow* GetParent_Impl() const
{ return pParent; }
@@ -311,64 +311,64 @@ public:
// Methods for all Child windows
void DataChanged_Impl( const DataChangedEvent& rDCEvt );
void ReleaseChild_Impl( Window& rWindow );
- SfxChild_Impl* RegisterChild_Impl( Window& rWindow, SfxChildAlignment eAlign, BOOL bCanGetFocus=FALSE );
+ SfxChild_Impl* RegisterChild_Impl( Window& rWindow, SfxChildAlignment eAlign, sal_Bool bCanGetFocus=sal_False );
void ShowChilds_Impl();
void HideChilds_Impl();
void Close_Impl();
- BOOL PrepareClose_Impl();
- virtual void ArrangeChilds_Impl( BOOL bForce = TRUE );
+ sal_Bool PrepareClose_Impl();
+ virtual void ArrangeChilds_Impl( sal_Bool bForce = sal_True );
void DeleteControllers_Impl();
void SaveStatus_Impl();
- void HidePopups_Impl(BOOL bHide, BOOL bParent=FALSE, USHORT nId=0);
+ void HidePopups_Impl(sal_Bool bHide, sal_Bool bParent=sal_False, sal_uInt16 nId=0);
void ConfigChild_Impl(SfxChildIdentifier,
- SfxDockingConfig, USHORT);
- void MakeChildsVisible_Impl( BOOL bVis );
+ SfxDockingConfig, sal_uInt16);
+ void MakeChildsVisible_Impl( sal_Bool bVis );
void ArrangeAutoHideWindows( SfxSplitWindow *pSplit );
- BOOL IsAutoHideMode( const SfxSplitWindow *pSplit );
+ sal_Bool IsAutoHideMode( const SfxSplitWindow *pSplit );
void EndAutoShow_Impl( Point aPos );
- void SetFullScreen_Impl( BOOL bSet ) { bIsFullScreen = bSet; }
- BOOL IsFullScreen_Impl() const { return bIsFullScreen; }
+ void SetFullScreen_Impl( sal_Bool bSet ) { bIsFullScreen = bSet; }
+ sal_Bool IsFullScreen_Impl() const { return bIsFullScreen; }
// Methods for Objectbars
virtual void UpdateObjectBars_Impl();
void ResetObjectBars_Impl();
- void SetObjectBar_Impl( USHORT nPos, sal_uInt32 nResId,
+ void SetObjectBar_Impl( sal_uInt16 nPos, sal_uInt32 nResId,
SfxInterface *pIFace, const String* pName=0 );
- Window* GetObjectBar_Impl( USHORT nPos, sal_uInt32 nResId );
- bool KnowsObjectBar_Impl( USHORT nPos ) const;
- BOOL IsVisible_Impl();
- void MakeVisible_Impl( BOOL );
- void SetObjectBarVisibility_Impl( USHORT nVis );
- BOOL IsContainer_Impl() const;
- void Lock_Impl( BOOL );
- void NextObjectBar_Impl( USHORT nPos );
- USHORT HasNextObjectBar_Impl( USHORT nPos, String* pStr=0 );
- void SetObjectBarCustomizeMode_Impl( BOOL );
+ Window* GetObjectBar_Impl( sal_uInt16 nPos, sal_uInt32 nResId );
+ bool KnowsObjectBar_Impl( sal_uInt16 nPos ) const;
+ sal_Bool IsVisible_Impl();
+ void MakeVisible_Impl( sal_Bool );
+ void SetObjectBarVisibility_Impl( sal_uInt16 nVis );
+ sal_Bool IsContainer_Impl() const;
+ void Lock_Impl( sal_Bool );
+ void NextObjectBar_Impl( sal_uInt16 nPos );
+ sal_uInt16 HasNextObjectBar_Impl( sal_uInt16 nPos, String* pStr=0 );
+ void SetObjectBarCustomizeMode_Impl( sal_Bool );
// Methods for ChildWindows
void UpdateChildWindows_Impl();
void ResetChildWindows_Impl();
- void SetChildWindowVisible_Impl( sal_uInt32, BOOL, USHORT );
- void ToggleChildWindow_Impl(USHORT,BOOL);
- BOOL HasChildWindow_Impl(USHORT);
- BOOL KnowsChildWindow_Impl(USHORT);
- void ShowChildWindow_Impl(USHORT, BOOL bVisible, BOOL bSetFocus);
- void SetChildWindow_Impl(USHORT, BOOL bOn, BOOL bSetFocus);
- SfxChildWindow* GetChildWindow_Impl(USHORT);
+ void SetChildWindowVisible_Impl( sal_uInt32, sal_Bool, sal_uInt16 );
+ void ToggleChildWindow_Impl(sal_uInt16,sal_Bool);
+ sal_Bool HasChildWindow_Impl(sal_uInt16);
+ sal_Bool KnowsChildWindow_Impl(sal_uInt16);
+ void ShowChildWindow_Impl(sal_uInt16, sal_Bool bVisible, sal_Bool bSetFocus);
+ void SetChildWindow_Impl(sal_uInt16, sal_Bool bOn, sal_Bool bSetFocus);
+ SfxChildWindow* GetChildWindow_Impl(sal_uInt16);
virtual void InitializeChild_Impl(SfxChildWin_Impl*);
SfxSplitWindow* GetSplitWindow_Impl(SfxChildAlignment);
- BOOL IsVisible_Impl( USHORT nMode ) const;
- void DisableChildWindow_Impl( USHORT nId, BOOL bDisable );
- BOOL IsFloating( USHORT nId );
+ sal_Bool IsVisible_Impl( sal_uInt16 nMode ) const;
+ void DisableChildWindow_Impl( sal_uInt16 nId, sal_Bool bDisable );
+ sal_Bool IsFloating( sal_uInt16 nId );
void ChangeWindow_Impl( Window *pNew );
void SetActiveChild_Impl( Window *pChild );
Window* GetActiveChild_Impl();
- virtual BOOL ActivateNextChild_Impl( BOOL bForward = TRUE );
+ virtual sal_Bool ActivateNextChild_Impl( sal_Bool bForward = sal_True );
bool AllowChildWindowCreation_Impl( const SfxChildWin_Impl& i_rCW ) const;
// Methods for StatusBar
- void SetTempStatusBar_Impl( BOOL bSet );
+ void SetTempStatusBar_Impl( sal_Bool bSet );
void ResetStatusBar_Impl();
void SetStatusBar_Impl(sal_uInt32 nResId, SfxShell *pShell, SfxBindings& );
void UpdateStatusBar_Impl();
@@ -382,7 +382,7 @@ class SfxFrameWorkWin_Impl : public SfxWorkWindow
SfxFrame* pFrame;
public:
SfxFrameWorkWin_Impl( Window* pWin, SfxFrame* pFrm, SfxFrame* pMaster );
- virtual void ArrangeChilds_Impl( BOOL bForce = TRUE );
+ virtual void ArrangeChilds_Impl( sal_Bool bForce = sal_True );
virtual void UpdateObjectBars_Impl();
virtual Rectangle GetTopRect_Impl();
};
diff --git a/sfx2/source/inet/inettbc.cxx b/sfx2/source/inet/inettbc.cxx
index c5ec26367a21..9504049e5ec5 100644..100755
--- a/sfx2/source/inet/inettbc.cxx
+++ b/sfx2/source/inet/inettbc.cxx
@@ -73,7 +73,7 @@ using namespace ::com::sun::star::task;
SFX_IMPL_TOOLBOX_CONTROL(SfxURLToolBoxControl_Impl,SfxStringItem)
-SfxURLToolBoxControl_Impl::SfxURLToolBoxControl_Impl( USHORT nSlotId, USHORT nId, ToolBox& rBox )
+SfxURLToolBoxControl_Impl::SfxURLToolBoxControl_Impl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rBox )
: SfxToolBoxControl( nSlotId, nId, rBox ),
pAccExec( 0 )
{
@@ -92,7 +92,7 @@ SvtURLBox* SfxURLToolBoxControl_Impl::GetURLBox() const
//***************************************************************************
-void SfxURLToolBoxControl_Impl::OpenURL( const String& rName, BOOL /*bNew*/ ) const
+void SfxURLToolBoxControl_Impl::OpenURL( const String& rName, sal_Bool /*bNew*/ ) const
{
String aName;
String aFilter;
@@ -181,7 +181,7 @@ IMPL_LINK( SfxURLToolBoxControl_Impl, SelectHdl, void*, EMPTYARG )
String aName( pURLBox->GetURL() );
if ( !pURLBox->IsTravelSelect() && aName.Len() )
- OpenURL( aName, FALSE );
+ OpenURL( aName, sal_False );
return 1L;
}
@@ -231,7 +231,7 @@ IMPL_LINK( SfxURLToolBoxControl_Impl, WindowEventListener, VclSimpleEvent*, pEve
void SfxURLToolBoxControl_Impl::StateChanged
(
- USHORT nSID,
+ sal_uInt16 nSID,
SfxItemState eState,
const SfxPoolItem* pState
)
diff --git a/sfx2/source/layout/factory.cxx b/sfx2/source/layout/factory.cxx
index a5a00227eecf..a5a00227eecf 100644..100755
--- a/sfx2/source/layout/factory.cxx
+++ b/sfx2/source/layout/factory.cxx
diff --git a/sfx2/source/layout/makefile.mk b/sfx2/source/layout/makefile.mk
deleted file mode 100644
index a11ba76a15bd..000000000000
--- a/sfx2/source/layout/makefile.mk
+++ /dev/null
@@ -1,56 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..
-
-PRJNAME=sfx2
-TARGET=layout
-ENABLE_EXCEPTIONS=true
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Files --------------------------------------------------------
-
-.IF "$(ENABLE_LAYOUT)" == "TRUE"
-
-SLOFILES = \
- $(SLO)$/sfxdialog.obj
-#
-
-SLOFILES += $(SLO)$/sfxtabdialog.obj \
- $(SLO)$/factory.obj \
- $(SLO)$/sfxtabpage.obj
-
-.ENDIF # ENABLE_LAYOUT == TRUE
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sfx2/source/layout/sfxdialog.cxx b/sfx2/source/layout/sfxdialog.cxx
index e8eb980c0466..e8eb980c0466 100644..100755
--- a/sfx2/source/layout/sfxdialog.cxx
+++ b/sfx2/source/layout/sfxdialog.cxx
diff --git a/sfx2/source/layout/sfxtabdialog.cxx b/sfx2/source/layout/sfxtabdialog.cxx
index a24a14c9dc69..da2dc738ae4e 100644..100755
--- a/sfx2/source/layout/sfxtabdialog.cxx
+++ b/sfx2/source/layout/sfxtabdialog.cxx
@@ -43,8 +43,8 @@
#include <sfx2/tabdlg.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/app.hxx>
-#include "sfxresid.hxx"
-#include "sfxhelp.hxx"
+#include "sfx2/sfxresid.hxx"
+#include "sfx2/sfxhelp.hxx"
#include <sfx2/ctrlitem.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/sfxdlg.hxx>
diff --git a/sfx2/source/layout/sfxtabpage.cxx b/sfx2/source/layout/sfxtabpage.cxx
index b7a857c6fbde..b7a857c6fbde 100644..100755
--- a/sfx2/source/layout/sfxtabpage.cxx
+++ b/sfx2/source/layout/sfxtabpage.cxx
diff --git a/sfx2/source/menu/makefile.mk b/sfx2/source/menu/makefile.mk
deleted file mode 100644
index 8b55bd0840ea..000000000000
--- a/sfx2/source/menu/makefile.mk
+++ /dev/null
@@ -1,55 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..
-
-
-PRJNAME=sfx2
-TARGET=menu
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Files --------------------------------------------------------
-
-SRS1NAME=$(TARGET)
-SRC1FILES = menu.src
-
-SLOFILES = \
- $(SLO)$/mnuitem.obj \
- $(SLO)$/mnumgr.obj \
- $(SLO)$/objmnctl.obj \
- $(SLO)$/thessubmenu.obj \
- $(SLO)$/virtmenu.obj
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sfx2/source/menu/menu.hrc b/sfx2/source/menu/menu.hrc
index b437f797c26e..b437f797c26e 100644..100755
--- a/sfx2/source/menu/menu.hrc
+++ b/sfx2/source/menu/menu.hrc
diff --git a/sfx2/source/menu/menu.src b/sfx2/source/menu/menu.src
index a2e07a3348b0..5e3d8296bb59 100644..100755
--- a/sfx2/source/menu/menu.src
+++ b/sfx2/source/menu/menu.src
@@ -26,6 +26,7 @@
************************************************************************/
#include "menu.hrc"
+#include <sfx2/sfxcommands.h>
String STR_MENU_CFGITEM
{
@@ -44,19 +45,19 @@ Menu MN_CLIPBOARDFUNCS
MenuItem
{
Identifier = SID_CUT ;
- HelpID = SID_CUT ;
+ HelpID = CMD_SID_CUT ;
Text [ en-US ] = "Cu~t" ;
};
MenuItem
{
Identifier = SID_COPY ;
- HelpID = SID_COPY ;
+ HelpID = CMD_SID_COPY ;
Text [ en-US ] = "~Copy" ;
};
MenuItem
{
Identifier = SID_PASTE ;
- HelpID = SID_PASTE ;
+ HelpID = CMD_SID_PASTE ;
Text [ en-US ] = "~Paste" ;
};
};
diff --git a/sfx2/source/menu/mnuitem.cxx b/sfx2/source/menu/mnuitem.cxx
index 2a7a5fffa1cc..b34625820fae 100644..100755
--- a/sfx2/source/menu/mnuitem.cxx
+++ b/sfx2/source/menu/mnuitem.cxx
@@ -58,7 +58,6 @@
#include <sfx2/dispatch.hxx>
#include "idpool.hxx"
#include "sfxtypes.hxx"
-#include <sfx2/macrconf.hxx>
#include "virtmenu.hxx"
#include <sfx2/mnuitem.hxx>
#include <sfx2/tbxctrl.hxx>
@@ -66,9 +65,9 @@
#include <sfx2/module.hxx>
#include <sfx2/unoctitm.hxx>
#include <sfx2/viewfrm.hxx>
-#include "imgmgr.hxx"
-#include "imagemgr.hxx"
-#include "sfxresid.hxx"
+#include "sfx2/imgmgr.hxx"
+#include "sfx2/imagemgr.hxx"
+#include "sfx2/sfxresid.hxx"
#include "../doc/doc.hrc"
using namespace ::com::sun::star::uno;
@@ -80,7 +79,7 @@ using namespace ::com::sun::star::util;
class SfxEnumMenu: public PopupMenu
{
- USHORT nSlot;
+ sal_uInt16 nSlot;
SfxEnumItem *pItem;
SfxBindings* pBindings;
@@ -88,20 +87,20 @@ protected:
virtual void Select();
public:
- SfxEnumMenu( USHORT nSlot, SfxBindings* pBind, const SfxEnumItem &rItem );
+ SfxEnumMenu( sal_uInt16 nSlot, SfxBindings* pBind, const SfxEnumItem &rItem );
~SfxEnumMenu();
};
//=========================================================================
-SfxEnumMenu::SfxEnumMenu( USHORT nSlotId, SfxBindings* pBind, const SfxEnumItem &rItem ):
+SfxEnumMenu::SfxEnumMenu( sal_uInt16 nSlotId, SfxBindings* pBind, const SfxEnumItem &rItem ):
nSlot( nSlotId ),
pItem( (SfxEnumItem*) rItem.Clone() ),
pBindings( pBind )
{
- for ( USHORT nVal = 0; nVal < pItem->GetValueCount(); ++nVal )
+ for ( sal_uInt16 nVal = 0; nVal < pItem->GetValueCount(); ++nVal )
InsertItem( nVal+1, pItem->GetValueTextByPos(nVal) );
- CheckItem( pItem->GetValue() + 1, TRUE );
+ CheckItem( pItem->GetValue() + 1, sal_True );
}
//-------------------------------------------------------------------------
@@ -137,7 +136,7 @@ void SfxMenuControl::SetOwnMenu( SfxVirtualMenu* pMenu )
void SfxMenuControl::Bind(
SfxVirtualMenu* pOwn,
- USHORT nSlotId,
+ sal_uInt16 nSlotId,
const String& rTitle,
SfxBindings &rBindings )
{
@@ -161,7 +160,7 @@ void SfxMenuControl::Bind(
void SfxMenuControl::Bind(
SfxVirtualMenu* pOwn,
- USHORT nSlotId,
+ sal_uInt16 nSlotId,
SfxVirtualMenu& rMenu,
const String& rTitle,
SfxBindings &rBindings )
@@ -178,7 +177,7 @@ void SfxMenuControl::Bind(
// Constructor for explicit registration
-SfxMenuControl::SfxMenuControl( BOOL bShowStrings )
+SfxMenuControl::SfxMenuControl( sal_Bool bShowStrings )
: pOwnMenu(0),
pSubMenu(0),
b_ShowStrings(bShowStrings)
@@ -192,18 +191,18 @@ SfxMenuControl::SfxMenuControl( BOOL bShowStrings )
SfxMenuControl::SfxMenuControl():
pOwnMenu(0),
pSubMenu(0),
- b_ShowStrings(FALSE)
+ b_ShowStrings(sal_False)
{
DBG_MEMTEST();
}
//--------------------------------------------------------------------
-SfxMenuControl::SfxMenuControl(USHORT nSlotId, SfxBindings& rBindings):
+SfxMenuControl::SfxMenuControl(sal_uInt16 nSlotId, SfxBindings& rBindings):
SfxControllerItem(nSlotId, rBindings),
pOwnMenu(0),
pSubMenu(0),
- b_ShowStrings(FALSE)
+ b_ShowStrings(sal_False)
{
DBG_MEMTEST();
@@ -219,8 +218,6 @@ SfxMenuControl::SfxMenuControl(USHORT nSlotId, SfxBindings& rBindings):
SfxMenuControl::~SfxMenuControl()
{
- if ( SfxMacroConfig::IsMacroSlot( GetId() ) )
- SFX_APP()->GetMacroConfig()->ReleaseSlotId(GetId());
delete pSubMenu;
}
@@ -235,7 +232,7 @@ void SfxMenuControl::RemovePopup()
void SfxMenuControl::StateChanged
(
- USHORT nSID,
+ sal_uInt16 nSID,
SfxItemState eState,
const SfxPoolItem* pState
)
@@ -252,7 +249,7 @@ void SfxMenuControl::StateChanged
#ifdef UNIX
if (nSID == SID_PASTE)
- pOwnMenu->EnableItem( GetId(), TRUE );
+ pOwnMenu->EnableItem( GetId(), sal_True );
else
#endif
pOwnMenu->EnableItem( GetId(), bIsObjMenu
@@ -263,7 +260,7 @@ void SfxMenuControl::StateChanged
{
// check only for non-Object Menus
if ( !bIsObjMenu )
- pOwnMenu->CheckItem( GetId(), FALSE );
+ pOwnMenu->CheckItem( GetId(), sal_False );
if ( pOwnMenu->GetSVMenu()->GetItemText( GetId() ) != GetTitle() )
{
@@ -324,14 +321,14 @@ void SfxMenuControl::StateChanged
//--------------------------------------------------------------------
-SfxMenuControl* SfxMenuControl::CreateImpl( USHORT /*nId*/, Menu& /*rMenu*/, SfxBindings& /*rBindings*/ )
+SfxMenuControl* SfxMenuControl::CreateImpl( sal_uInt16 /*nId*/, Menu& /*rMenu*/, SfxBindings& /*rBindings*/ )
{
- return new SfxMenuControl( TRUE );
+ return new SfxMenuControl( sal_True );
}
//--------------------------------------------------------------------
-void SfxMenuControl::RegisterControl( USHORT nSlotId, SfxModule *pMod )
+void SfxMenuControl::RegisterControl( sal_uInt16 nSlotId, SfxModule *pMod )
{
RegisterMenuControl( pMod, new SfxMenuCtrlFactory(
SfxMenuControl::CreateImpl, TYPE(SfxStringItem), nSlotId ) );
@@ -343,7 +340,7 @@ void SfxMenuControl::RegisterMenuControl(SfxModule* pMod, SfxMenuCtrlFactory* pF
SFX_APP()->RegisterMenuControl_Impl( pMod, pFact );
}
-SfxMenuControl* SfxMenuControl::CreateControl( USHORT nId, Menu &rMenu, SfxBindings &rBindings )
+SfxMenuControl* SfxMenuControl::CreateControl( sal_uInt16 nId, Menu &rMenu, SfxBindings &rBindings )
{
TypeId aSlotType = SFX_SLOTPOOL().GetSlotType(nId);
if ( aSlotType )
@@ -357,7 +354,7 @@ SfxMenuControl* SfxMenuControl::CreateControl( USHORT nId, Menu &rMenu, SfxBindi
if ( pFactories )
{
SfxMenuCtrlFactArr_Impl &rFactories = *pFactories;
- for ( USHORT nFactory = 0; nFactory < rFactories.Count(); ++nFactory )
+ for ( sal_uInt16 nFactory = 0; nFactory < rFactories.Count(); ++nFactory )
if ( rFactories[nFactory]->nTypeId == aSlotType &&
( ( rFactories[nFactory]->nSlotId == 0 ) ||
( rFactories[nFactory]->nSlotId == nId) ) )
@@ -367,7 +364,7 @@ SfxMenuControl* SfxMenuControl::CreateControl( USHORT nId, Menu &rMenu, SfxBindi
SfxMenuCtrlFactArr_Impl &rFactories = pApp->GetMenuCtrlFactories_Impl();
- for ( USHORT nFactory = 0; nFactory < rFactories.Count(); ++nFactory )
+ for ( sal_uInt16 nFactory = 0; nFactory < rFactories.Count(); ++nFactory )
if ( rFactories[nFactory]->nTypeId == aSlotType &&
( ( rFactories[nFactory]->nSlotId == 0 ) ||
( rFactories[nFactory]->nSlotId == nId) ) )
@@ -376,7 +373,7 @@ SfxMenuControl* SfxMenuControl::CreateControl( USHORT nId, Menu &rMenu, SfxBindi
return 0;
}
-BOOL SfxMenuControl::IsSpecialControl( USHORT nId, SfxModule* pMod )
+sal_Bool SfxMenuControl::IsSpecialControl( sal_uInt16 nId, SfxModule* pMod )
{
TypeId aSlotType = SFX_SLOTPOOL().GetSlotType( nId );
if ( aSlotType )
@@ -387,21 +384,21 @@ BOOL SfxMenuControl::IsSpecialControl( USHORT nId, SfxModule* pMod )
if ( pFactories )
{
SfxMenuCtrlFactArr_Impl &rFactories = *pFactories;
- for ( USHORT nFactory = 0; nFactory < rFactories.Count(); ++nFactory )
+ for ( sal_uInt16 nFactory = 0; nFactory < rFactories.Count(); ++nFactory )
if ( rFactories[nFactory]->nTypeId == aSlotType &&
( ( rFactories[nFactory]->nSlotId == 0 ) ||
( rFactories[nFactory]->nSlotId == nId) ) )
- return TRUE;
+ return sal_True;
}
}
SfxMenuCtrlFactArr_Impl &rFactories = SFX_APP()->GetMenuCtrlFactories_Impl();
- for ( USHORT nFactory = 0; nFactory < rFactories.Count(); ++nFactory )
+ for ( sal_uInt16 nFactory = 0; nFactory < rFactories.Count(); ++nFactory )
if ( rFactories[nFactory]->nTypeId == aSlotType &&
( ( rFactories[nFactory]->nSlotId == 0 ) ||
( rFactories[nFactory]->nSlotId == nId) ) )
- return TRUE;
+ return sal_True;
}
return 0;
}
@@ -421,7 +418,7 @@ long Select_Impl( void* pHdl, void* pVoid );
SFX_IMPL_MENU_CONTROL( SfxAppMenuControl_Impl, SfxStringItem );
SfxAppMenuControl_Impl::SfxAppMenuControl_Impl(
- USHORT nPos, Menu& rMenu, SfxBindings& rBindings )
+ sal_uInt16 nPos, Menu& rMenu, SfxBindings& rBindings )
: SfxMenuControl( nPos, rBindings ), pMenu(0)
{
String aText = rMenu.GetItemText( nPos );
@@ -453,8 +450,8 @@ IMPL_LINK( SfxAppMenuControl_Impl, Activate, Menu *, pActMenu )
if ( pActMenu )
{
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
- ULONG nSymbolsStyle = rSettings.GetSymbolsStyle();
- BOOL bShowMenuImages = rSettings.GetUseImagesInMenus();
+ sal_uIntPtr nSymbolsStyle = rSettings.GetSymbolsStyle();
+ sal_Bool bShowMenuImages = rSettings.GetUseImagesInMenus();
if (( nSymbolsStyle != m_nSymbolsStyle ) ||
( bShowMenuImages != m_bShowMenuImages ))
@@ -462,10 +459,10 @@ IMPL_LINK( SfxAppMenuControl_Impl, Activate, Menu *, pActMenu )
m_nSymbolsStyle = nSymbolsStyle;
m_bShowMenuImages = bShowMenuImages;
- USHORT nCount = pActMenu->GetItemCount();
- for ( USHORT nSVPos = 0; nSVPos < nCount; nSVPos++ )
+ sal_uInt16 nCount = pActMenu->GetItemCount();
+ for ( sal_uInt16 nSVPos = 0; nSVPos < nCount; nSVPos++ )
{
- USHORT nItemId = pActMenu->GetItemId( nSVPos );
+ sal_uInt16 nItemId = pActMenu->GetItemId( nSVPos );
if ( pActMenu->GetItemType( nSVPos ) != MENUITEM_SEPARATOR )
{
if ( bShowMenuImages )
@@ -481,7 +478,7 @@ IMPL_LINK( SfxAppMenuControl_Impl, Activate, Menu *, pActMenu )
if ( aImageId.getLength() > 0 )
{
Reference< ::com::sun::star::frame::XFrame > xFrame;
- Image aImage = GetImage( xFrame, aImageId, FALSE );
+ Image aImage = GetImage( xFrame, aImageId, false );
if ( !!aImage )
{
bImageSet = sal_True;
@@ -493,7 +490,7 @@ IMPL_LINK( SfxAppMenuControl_Impl, Activate, Menu *, pActMenu )
if ( !bImageSet && aCmd.Len() )
{
Image aImage = SvFileInformationManager::GetImage(
- INetURLObject(aCmd), FALSE );
+ INetURLObject(aCmd), false );
if ( !!aImage )
pActMenu->SetItemImage( nItemId, aImage );
}
@@ -504,26 +501,26 @@ IMPL_LINK( SfxAppMenuControl_Impl, Activate, Menu *, pActMenu )
}
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
SfxUnoMenuControl* SfxMenuControl::CreateControl( const String& rCmd,
- USHORT nId, Menu& rMenu, SfxBindings &rBindings, SfxVirtualMenu* pVirt )
+ sal_uInt16 nId, Menu& rMenu, SfxBindings &rBindings, SfxVirtualMenu* pVirt )
{
return new SfxUnoMenuControl( rCmd, nId, rMenu, rBindings, pVirt );
}
SfxUnoMenuControl* SfxMenuControl::CreateControl( const String& rCmd,
- USHORT nId, Menu& rMenu, const String& sItemText,
+ sal_uInt16 nId, Menu& rMenu, const String& sItemText,
SfxBindings& rBindings, SfxVirtualMenu* pVirt)
{
return new SfxUnoMenuControl( rCmd, nId, rMenu, sItemText, rBindings, pVirt);
}
-SfxUnoMenuControl::SfxUnoMenuControl( const String& rCmd, USHORT nSlotId,
+SfxUnoMenuControl::SfxUnoMenuControl( const String& rCmd, sal_uInt16 nSlotId,
Menu& rMenu, SfxBindings& rBindings, SfxVirtualMenu* pVirt )
: SfxMenuControl( nSlotId, rBindings )
{
@@ -535,7 +532,7 @@ SfxUnoMenuControl::SfxUnoMenuControl( const String& rCmd, USHORT nSlotId,
}
SfxUnoMenuControl::SfxUnoMenuControl(
- const String& rCmd, USHORT nSlotId, Menu& /*rMenu*/,
+ const String& rCmd, sal_uInt16 nSlotId, Menu& /*rMenu*/,
const String& rItemText,
SfxBindings& rBindings, SfxVirtualMenu* pVirt)
: SfxMenuControl( nSlotId, rBindings )
diff --git a/sfx2/source/menu/mnumgr.cxx b/sfx2/source/menu/mnumgr.cxx
index 5630bcafb66a..b82aeeb6bd6f 100644..100755
--- a/sfx2/source/menu/mnumgr.cxx
+++ b/sfx2/source/menu/mnumgr.cxx
@@ -56,6 +56,7 @@
#include <osl/file.hxx>
#include <vcl/graph.hxx>
#include <svtools/filter.hxx>
+#include <svl/lngmisc.hxx>
#include <sfx2/mnumgr.hxx>
@@ -71,8 +72,7 @@
#include "sfxtypes.hxx"
#include <sfx2/bindings.hxx>
#include "mnucfga.hxx"
-#include "sfxresid.hxx"
-#include <sfx2/macrconf.hxx>
+#include "sfx2/sfxresid.hxx"
#include <sfx2/msgpool.hxx>
#include <sfx2/sfx.hrc>
#include "menu.hrc"
@@ -82,8 +82,8 @@
#include "thessubmenu.hxx"
-static const USHORT nCompatVersion = 4;
-static const USHORT nVersion = 5;
+static const sal_uInt16 nCompatVersion = 4;
+static const sal_uInt16 nVersion = 5;
// static member initialization
PopupMenu * SfxPopupMenuManager::pStaticThesSubMenu = NULL;
@@ -114,7 +114,7 @@ SfxMenuManager::SfxMenuManager( const ResId& rResId, SfxBindings &rBindings )
pResMgr(rResId.GetResMgr()),
nType( rResId.GetId() )
{
- bAddClipboardFuncs = FALSE;
+ bAddClipboardFuncs = sal_False;
DBG_MEMTEST();
}
@@ -149,8 +149,8 @@ void InsertVerbs_Impl( SfxBindings* pBindings, const com::sun::star::uno::Sequen
{
SfxObjectShell* pDoc = pView->GetObjectShell();
pMenu->InsertSeparator();
- USHORT nr=0;
- for ( USHORT n = 0; n < aVerbs.getLength(); ++n )
+ sal_uInt16 nr=0;
+ for ( sal_uInt16 n = 0; n < aVerbs.getLength(); ++n )
{
// check for ReadOnly verbs
if ( pDoc->IsReadOnly() && !(aVerbs[n].VerbAttributes & embed::VerbAttributes::MS_VERBATTR_NEVERDIRTIES) )
@@ -160,13 +160,12 @@ void InsertVerbs_Impl( SfxBindings* pBindings, const com::sun::star::uno::Sequen
if ( !(aVerbs[n].VerbAttributes & embed::VerbAttributes::MS_VERBATTR_ONCONTAINERMENU) )
continue;
- USHORT nId = SID_VERB_START + nr++;
+ sal_uInt16 nId = SID_VERB_START + nr++;
DBG_ASSERT(nId <= SID_VERB_END, "Too many verbs!");
if ( nId > SID_VERB_END )
break;
pMenu->InsertItem( nId, aVerbs[n].VerbName );
- pMenu->SetHelpId( nId, (ULONG) nId );
}
}
}
@@ -232,12 +231,12 @@ PopupMenu* InsertThesaurusSubmenu_Impl( SfxBindings* pBindings, Menu* pSVMenu )
if (sThesImplName.Len() > 0 && aSynonymsImageUrl.getLength() > 0)
aImage = Image( lcl_GetImageFromPngUrl( aSynonymsImageUrl ) );
- for (USHORT i = 0; (size_t)i < nNumSynonyms; ++i)
+ for (sal_uInt16 i = 0; (size_t)i < nNumSynonyms; ++i)
{
//! item ids should start with values > 0, since 0 has special meaning
- const USHORT nId = i + 1;
+ const sal_uInt16 nId = i + 1;
- String aItemText( GetThesaurusReplaceText_Impl( aSynonyms[i] ) );
+ String aItemText( linguistic::GetThesaurusReplaceText( aSynonyms[i] ) );
pThesSubMenu->InsertItem( nId, aItemText );
::rtl::OUString aCmd(RTL_CONSTASCII_USTRINGPARAM(".uno:ThesaurusFromContext?WordReplace:string=") );
aCmd += aItemText;
@@ -289,10 +288,10 @@ void SfxMenuManager::UseDefault()
if ( bAddClipboardFuncs )
{
- USHORT n, nCount = pSVMenu->GetItemCount();
+ sal_uInt16 n, nCount = pSVMenu->GetItemCount();
for ( n=0; n<nCount; n++ )
{
- USHORT nId = pSVMenu->GetItemId( n );
+ sal_uInt16 nId = pSVMenu->GetItemId( n );
if ( nId == SID_COPY || nId == SID_CUT || nId == SID_PASTE )
break;
}
@@ -304,13 +303,13 @@ void SfxMenuManager::UseDefault()
pSVMenu->InsertSeparator();
for ( n=0; n<nCount; n++ )
{
- USHORT nId = aPop.GetItemId( n );
+ sal_uInt16 nId = aPop.GetItemId( n );
pSVMenu->InsertItem( nId, aPop.GetItemText( nId ), aPop.GetItemBits( nId ) );
}
}
}
- pVMenu = new SfxVirtualMenu( pSVMenu, FALSE, *pBindings, TRUE, TRUE );
+ pVMenu = new SfxVirtualMenu( pSVMenu, sal_False, *pBindings, sal_True, sal_True );
}
Construct(*pVMenu);
@@ -328,7 +327,7 @@ IMPL_LINK( SfxMenuManager, Select, Menu *, pSelMenu )
{
DBG_MEMTEST();
- USHORT nId = (USHORT) pSelMenu->GetCurItemId();
+ sal_uInt16 nId = (sal_uInt16) pSelMenu->GetCurItemId();
String aCommand = pSelMenu->GetItemCommand( nId );
if ( !aCommand.Len() && pBindings )
{
@@ -351,12 +350,12 @@ IMPL_LINK( SfxMenuManager, Select, Menu *, pSelMenu )
// special menu function
pBindings->GetDispatcher_Impl()->Execute( nId );
- return TRUE;
+ return sal_True;
}
//--------------------------------------------------------------------
-void SfxMenuManager::Construct_Impl( Menu* pSVMenu, BOOL bWithHelp )
+void SfxMenuManager::Construct_Impl( Menu* pSVMenu, sal_Bool bWithHelp )
{
SfxVirtualMenu *pOldVirtMenu=0;
if ( pMenu )
@@ -367,7 +366,7 @@ void SfxMenuManager::Construct_Impl( Menu* pSVMenu, BOOL bWithHelp )
}
TryToHideDisabledEntries_Impl( pSVMenu );
- SfxVirtualMenu *pVMenu = new SfxVirtualMenu( pSVMenu, bWithHelp, *pBindings, TRUE );
+ SfxVirtualMenu *pVMenu = new SfxVirtualMenu( pSVMenu, bWithHelp, *pBindings, sal_True );
Construct(*pVMenu);
if ( pOldVirtMenu )
@@ -401,10 +400,10 @@ void SfxPopupMenuManager::RemoveDisabledEntries()
//--------------------------------------------------------------------
-USHORT SfxPopupMenuManager::Execute( const Point& rPos, Window* pWindow )
+sal_uInt16 SfxPopupMenuManager::Execute( const Point& rPos, Window* pWindow )
{
DBG_MEMTEST();
- USHORT nVal = ( (PopupMenu*) GetMenu()->GetSVMenu() )->Execute( pWindow, rPos );
+ sal_uInt16 nVal = ( (PopupMenu*) GetMenu()->GetSVMenu() )->Execute( pWindow, rPos );
delete pStaticThesSubMenu; pStaticThesSubMenu = NULL;
return nVal;
}
@@ -420,13 +419,13 @@ IMPL_LINK_INLINE_END( SfxPopupMenuManager, SelectHdl, void *, EMPTYARG )
//--------------------------------------------------------------------
-USHORT SfxPopupMenuManager::Execute( const Point& rPoint, Window* pWindow, va_list pArgs, const SfxPoolItem *pArg1 )
+sal_uInt16 SfxPopupMenuManager::Execute( const Point& rPoint, Window* pWindow, va_list pArgs, const SfxPoolItem *pArg1 )
{
DBG_MEMTEST();
PopupMenu* pPopMenu = ( (PopupMenu*)GetMenu()->GetSVMenu() );
pPopMenu->SetSelectHdl( LINK( this, SfxPopupMenuManager, SelectHdl ) );
- USHORT nId = pPopMenu->Execute( pWindow, rPoint );
+ sal_uInt16 nId = pPopMenu->Execute( pWindow, rPoint );
pPopMenu->SetSelectHdl( Link() );
if ( nId )
@@ -437,7 +436,7 @@ USHORT SfxPopupMenuManager::Execute( const Point& rPoint, Window* pWindow, va_li
//--------------------------------------------------------------------
-USHORT SfxPopupMenuManager::Execute( const Point& rPoint, Window* pWindow, const SfxPoolItem *pArg1, ... )
+sal_uInt16 SfxPopupMenuManager::Execute( const Point& rPoint, Window* pWindow, const SfxPoolItem *pArg1, ... )
{
DBG_MEMTEST();
@@ -462,43 +461,43 @@ void SfxPopupMenuManager::StartInsert()
void SfxPopupMenuManager::EndInsert()
{
pBindings->ENTERREGISTRATIONS();
- pMenu = new SfxVirtualMenu( pSVMenu, FALSE, *pBindings, TRUE, TRUE );
+ pMenu = new SfxVirtualMenu( pSVMenu, sal_False, *pBindings, sal_True, sal_True );
Construct( *pMenu );
pBindings->LEAVEREGISTRATIONS();
}
//-------------------------------------------------------------------------
-void SfxPopupMenuManager::InsertSeparator( USHORT nPos )
+void SfxPopupMenuManager::InsertSeparator( sal_uInt16 nPos )
{
pSVMenu->InsertSeparator( nPos );
}
//-------------------------------------------------------------------------
-void SfxPopupMenuManager::InsertItem( USHORT nId, const String& rName, MenuItemBits nBits, USHORT nPos )
+void SfxPopupMenuManager::InsertItem( sal_uInt16 nId, const String& rName, MenuItemBits nBits, const rtl::OString& rHelpId, sal_uInt16 nPos )
{
pSVMenu->InsertItem( nId, rName, nBits,nPos );
- pSVMenu->SetHelpId( nId, (ULONG) nId );
+ pSVMenu->SetHelpId( nId, rHelpId );
}
//-------------------------------------------------------------------------
-void SfxPopupMenuManager::RemoveItem( USHORT nId )
+void SfxPopupMenuManager::RemoveItem( sal_uInt16 nId )
{
pSVMenu->RemoveItem( nId );
}
//-------------------------------------------------------------------------
-void SfxPopupMenuManager::CheckItem( USHORT nId, BOOL bCheck )
+void SfxPopupMenuManager::CheckItem( sal_uInt16 nId, sal_Bool bCheck )
{
pSVMenu->CheckItem( nId, bCheck );
}
void SfxPopupMenuManager::AddClipboardFunctions()
{
- bAddClipboardFuncs = TRUE;
+ bAddClipboardFuncs = sal_True;
}
SfxMenuManager::SfxMenuManager( Menu* pMenuArg, SfxBindings &rBindings )
@@ -508,8 +507,8 @@ SfxMenuManager::SfxMenuManager( Menu* pMenuArg, SfxBindings &rBindings )
pResMgr(NULL),
nType(0)
{
- bAddClipboardFuncs = FALSE;
- SfxVirtualMenu* pVMenu = new SfxVirtualMenu( pMenuArg, FALSE, rBindings, TRUE, TRUE );
+ bAddClipboardFuncs = sal_False;
+ SfxVirtualMenu* pVMenu = new SfxVirtualMenu( pMenuArg, sal_False, rBindings, sal_True, sal_True );
Construct(*pVMenu);
}
@@ -522,10 +521,10 @@ SfxPopupMenuManager::SfxPopupMenuManager( PopupMenu* pMenuArg, SfxBindings& rBin
SfxPopupMenuManager* SfxPopupMenuManager::Popup( const ResId& rResId, SfxViewFrame* pFrame,const Point& rPoint, Window* pWindow )
{
PopupMenu *pSVMenu = new PopupMenu( rResId );
- USHORT n, nCount = pSVMenu->GetItemCount();
+ sal_uInt16 n, nCount = pSVMenu->GetItemCount();
for ( n=0; n<nCount; n++ )
{
- USHORT nId = pSVMenu->GetItemId( n );
+ sal_uInt16 nId = pSVMenu->GetItemId( n );
if ( nId == SID_COPY || nId == SID_CUT || nId == SID_PASTE )
break;
}
@@ -541,7 +540,7 @@ SfxPopupMenuManager* SfxPopupMenuManager::Popup( const ResId& rResId, SfxViewFra
pSVMenu->InsertSeparator();
for ( n=0; n<nCount; n++ )
{
- USHORT nId = aPop.GetItemId( n );
+ sal_uInt16 nId = aPop.GetItemId( n );
pSVMenu->InsertItem( nId, aPop.GetItemText( nId ), aPop.GetItemBits( nId ) );
pSVMenu->SetHelpId( nId, aPop.GetHelpId( nId ));
}
@@ -574,10 +573,10 @@ SfxPopupMenuManager* SfxPopupMenuManager::Popup( const ResId& rResId, SfxViewFra
void SfxPopupMenuManager::ExecutePopup( const ResId& rResId, SfxViewFrame* pFrame, const Point& rPoint, Window* pWindow )
{
PopupMenu *pSVMenu = new PopupMenu( rResId );
- USHORT n, nCount = pSVMenu->GetItemCount();
+ sal_uInt16 n, nCount = pSVMenu->GetItemCount();
for ( n=0; n<nCount; n++ )
{
- USHORT nId = pSVMenu->GetItemId( n );
+ sal_uInt16 nId = pSVMenu->GetItemId( n );
if ( nId == SID_COPY || nId == SID_CUT || nId == SID_PASTE )
break;
}
@@ -591,7 +590,7 @@ void SfxPopupMenuManager::ExecutePopup( const ResId& rResId, SfxViewFrame* pFram
pSVMenu->InsertSeparator();
for ( n=0; n<nCount; n++ )
{
- USHORT nId = aPop.GetItemId( n );
+ sal_uInt16 nId = aPop.GetItemId( n );
pSVMenu->InsertItem( nId, aPop.GetItemText( nId ), aPop.GetItemBits( nId ) );
pSVMenu->SetHelpId( nId, aPop.GetHelpId( nId ));
}
diff --git a/sfx2/source/menu/objmnctl.cxx b/sfx2/source/menu/objmnctl.cxx
index be34e70612d9..1042d48bf354 100644..100755
--- a/sfx2/source/menu/objmnctl.cxx
+++ b/sfx2/source/menu/objmnctl.cxx
@@ -53,7 +53,7 @@ using namespace com::sun::star;
its Parent.
*/
-SfxObjectVerbsControl::SfxObjectVerbsControl(USHORT nSlotId, Menu &rMenu, SfxBindings &rBindings)
+SfxObjectVerbsControl::SfxObjectVerbsControl(sal_uInt16 nSlotId, Menu &rMenu, SfxBindings &rBindings)
: SfxMenuControl( nSlotId, rBindings )
, pMenu(new PopupMenu)
, rParent(rMenu)
@@ -79,8 +79,8 @@ void SfxObjectVerbsControl::FillMenu()
const com::sun::star::uno::Sequence < com::sun::star::embed::VerbDescriptor >& aVerbs = pView->GetVerbs();
if ( aVerbs.getLength() )
{
- USHORT nSlotId = SID_VERB_START;
- for (USHORT n=0; n<aVerbs.getLength(); n++)
+ sal_uInt16 nSlotId = SID_VERB_START;
+ for (sal_uInt16 n=0; n<aVerbs.getLength(); n++)
{
// check for ReadOnly verbs
if ( pDoc->IsReadOnly() && !(aVerbs[n].VerbAttributes & embed::VerbAttributes::MS_VERBATTR_NEVERDIRTIES) )
@@ -99,7 +99,7 @@ void SfxObjectVerbsControl::FillMenu()
}
}
- rParent.EnableItem( GetId(), (BOOL)pMenu->GetItemCount() );
+ rParent.EnableItem( GetId(), (sal_Bool)pMenu->GetItemCount() );
}
//--------------------------------------------------------------------
@@ -112,7 +112,7 @@ void SfxObjectVerbsControl::FillMenu()
*/
void SfxObjectVerbsControl::StateChanged(
- USHORT /*nSID*/,
+ sal_uInt16 /*nSID*/,
SfxItemState eState,
const SfxPoolItem* /*pState*/ )
{
@@ -130,7 +130,7 @@ void SfxObjectVerbsControl::StateChanged(
IMPL_LINK_INLINE_START( SfxObjectVerbsControl, MenuSelect, Menu *, pSelMenu )
{
- const USHORT nSlotId = pSelMenu->GetCurItemId();
+ const sal_uInt16 nSlotId = pSelMenu->GetCurItemId();
if( nSlotId )
GetBindings().Execute(nSlotId);
return 1;
diff --git a/sfx2/source/menu/thessubmenu.cxx b/sfx2/source/menu/thessubmenu.cxx
index 83877710f7e5..00eeed73f8f0 100644..100755
--- a/sfx2/source/menu/thessubmenu.cxx
+++ b/sfx2/source/menu/thessubmenu.cxx
@@ -59,45 +59,12 @@ SFX_IMPL_MENU_CONTROL(SfxThesSubMenuControl, SfxStringItem);
////////////////////////////////////////////////////////////
-String GetThesaurusReplaceText_Impl( const ::rtl::OUString &rText )
-{
- // The strings returned by the thesaurus sometimes have some
- // explanation text put in between '(' and ')' or a trailing '*'.
- // These parts should not be put in the ReplaceEdit Text that may get
- // inserted into the document. Thus we strip them from the text.
-
- String aText( rText );
-
- xub_StrLen nPos = aText.Search( sal_Unicode('(') );
- while (STRING_NOTFOUND != nPos)
- {
- xub_StrLen nEnd = aText.Search( sal_Unicode(')'), nPos );
- if (STRING_NOTFOUND != nEnd)
- aText.Erase( nPos, nEnd-nPos+1 );
- else
- break;
- nPos = aText.Search( sal_Unicode('(') );
- }
-
- nPos = aText.Search( sal_Unicode('*') );
- if (STRING_NOTFOUND != nPos)
- aText.Erase( nPos );
-
- // remove any possible remaining ' ' that may confuse the thesaurus
- // when it gets called with the text
- aText.EraseLeadingAndTrailingChars( sal_Unicode(' ') );
-
- return aText;
-}
-
-////////////////////////////////////////////////////////////
-
/*
Constructor; sets the Select-Handler for the Menu and inserts it into
its Parent.
*/
-SfxThesSubMenuControl::SfxThesSubMenuControl( USHORT nSlotId, Menu &rMenu, SfxBindings &rBindings )
+SfxThesSubMenuControl::SfxThesSubMenuControl( sal_uInt16 nSlotId, Menu &rMenu, SfxBindings &rBindings )
: SfxMenuControl( nSlotId, rBindings ),
pMenu(new PopupMenu),
rParent(rMenu)
@@ -105,7 +72,7 @@ SfxThesSubMenuControl::SfxThesSubMenuControl( USHORT nSlotId, Menu &rMenu, SfxBi
rMenu.SetPopupMenu(nSlotId, pMenu);
pMenu->SetSelectHdl(LINK(this, SfxThesSubMenuControl, MenuSelect));
pMenu->Clear();
- rParent.EnableItem( GetId(), FALSE );
+ rParent.EnableItem( GetId(), sal_False );
}
@@ -121,7 +88,7 @@ SfxThesSubMenuControl::~SfxThesSubMenuControl()
menu entry in Parentmenu is disabled, otherwise it is enabled.
*/
void SfxThesSubMenuControl::StateChanged(
- USHORT /*nSID*/,
+ sal_uInt16 /*nSID*/,
SfxItemState eState,
const SfxPoolItem* /*pState*/ )
{
@@ -135,7 +102,7 @@ void SfxThesSubMenuControl::StateChanged(
*/
IMPL_LINK_INLINE_START( SfxThesSubMenuControl, MenuSelect, Menu *, pSelMenu )
{
- const USHORT nSlotId = pSelMenu->GetCurItemId();
+ const sal_uInt16 nSlotId = pSelMenu->GetCurItemId();
if( nSlotId )
GetBindings().Execute(nSlotId);
return 1;
diff --git a/sfx2/source/menu/thessubmenu.hxx b/sfx2/source/menu/thessubmenu.hxx
index 57012a174e90..49169d7b1c2d 100644..100755
--- a/sfx2/source/menu/thessubmenu.hxx
+++ b/sfx2/source/menu/thessubmenu.hxx
@@ -44,21 +44,17 @@ namespace css = ::com::sun::star;
////////////////////////////////////////////////////////////
-String GetThesaurusReplaceText_Impl( const ::rtl::OUString &rText );
-
-////////////////////////////////////////////////////////////
-
class SfxThesSubMenuControl : public SfxMenuControl
{
PopupMenu* pMenu;
Menu& rParent;
private:
- virtual void StateChanged( USHORT, SfxItemState, const SfxPoolItem* pState );
+ virtual void StateChanged( sal_uInt16, SfxItemState, const SfxPoolItem* pState );
DECL_LINK( MenuSelect, Menu * );
public:
- SfxThesSubMenuControl(USHORT, Menu&, SfxBindings&);
+ SfxThesSubMenuControl(sal_uInt16, Menu&, SfxBindings&);
~SfxThesSubMenuControl();
virtual PopupMenu* GetPopup() const;
diff --git a/sfx2/source/menu/virtmenu.cxx b/sfx2/source/menu/virtmenu.cxx
index 5c40cd2dd8ce..9ef8beb9bf87 100644..100755
--- a/sfx2/source/menu/virtmenu.cxx
+++ b/sfx2/source/menu/virtmenu.cxx
@@ -55,10 +55,9 @@
#include <sfx2/sfx.hrc>
#include <sfx2/viewsh.hxx>
#include "sfxpicklist.hxx"
-#include <sfx2/macrconf.hxx>
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include "menu.hrc"
-#include "imagemgr.hxx"
+#include "sfx2/imagemgr.hxx"
#include <sfx2/viewfrm.hxx>
#include <sfx2/objsh.hxx>
#include <framework/addonsoptions.hxx>
@@ -83,21 +82,21 @@ class SfxMenuImageControl_Impl : public SfxControllerItem
{
SfxVirtualMenu* pMenu;
long lRotation;
- BOOL bIsMirrored;
+ sal_Bool bIsMirrored;
protected:
- virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState );
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState );
public:
- SfxMenuImageControl_Impl( USHORT nSlotId, SfxBindings& rBindings, SfxVirtualMenu* pVMenu )
+ SfxMenuImageControl_Impl( sal_uInt16 nSlotId, SfxBindings& rBindings, SfxVirtualMenu* pVMenu )
: SfxControllerItem( nSlotId, rBindings )
, pMenu( pVMenu )
, lRotation( 0 )
- , bIsMirrored( FALSE )
+ , bIsMirrored( sal_False )
{}
void Update();
};
-void SfxMenuImageControl_Impl::StateChanged( USHORT /*nSID*/, SfxItemState /*eState*/, const SfxPoolItem* pState )
+void SfxMenuImageControl_Impl::StateChanged( sal_uInt16 /*nSID*/, SfxItemState /*eState*/, const SfxPoolItem* pState )
{
const SfxImageItem* pItem = PTR_CAST( SfxImageItem, pState );
if ( pItem )
@@ -114,13 +113,13 @@ void SfxMenuImageControl_Impl::Update()
SfxModule* pModule = pViewFrame->GetObjectShell()->GetModule();
SfxSlotPool* pPool = pModule->GetSlotPool();
Menu* pSVMenu = pMenu->GetSVMenu();
- for (USHORT nPos = 0; nPos<pSVMenu->GetItemCount(); nPos++)
+ for (sal_uInt16 nPos = 0; nPos<pSVMenu->GetItemCount(); nPos++)
{
- USHORT nslotId = pSVMenu->GetItemId( nPos );
+ sal_uInt16 nslotId = pSVMenu->GetItemId( nPos );
const SfxSlot* pSlot = pPool->GetSlot( nslotId );
if ( pSlot && pSlot->IsMode( SFX_SLOT_IMAGEROTATION ) )
{
- pSVMenu->SetItemImageMirrorMode( nslotId, FALSE );
+ pSVMenu->SetItemImageMirrorMode( nslotId, sal_False );
pSVMenu->SetItemImageAngle( nslotId, lRotation );
}
@@ -134,7 +133,7 @@ void SfxMenuImageControl_Impl::Update()
static Image RetrieveAddOnImage( Reference< com::sun::star::frame::XFrame >& rFrame,
const rtl::OUString& aImageId,
const rtl::OUString& aURL,
- BOOL bBigImage
+ bool bBigImage
)
{
Image aImage;
@@ -160,7 +159,7 @@ static Image RetrieveAddOnImage( Reference< com::sun::star::frame::XFrame >& rFr
if the OLE server application exist or not.
*/
-BOOL IsItemHidden_Impl( USHORT nItemId, int bOleServer, int bMac )
+sal_Bool IsItemHidden_Impl( sal_uInt16 nItemId, int bOleServer, int bMac )
{
return ( bMac &&
( nItemId == SID_MINIMIZED ) ) ||
@@ -187,11 +186,11 @@ void SfxVirtualMenu::Construct_Impl()
//--------------------------------------------------------------------
-SfxVirtualMenu::SfxVirtualMenu( USHORT nOwnId,
- SfxVirtualMenu* pOwnParent, Menu& rMenu, BOOL bWithHelp,
- SfxBindings &rBindings, BOOL bOLEServer, BOOL bRes, BOOL bIsAddonMenu ):
+SfxVirtualMenu::SfxVirtualMenu( sal_uInt16 nOwnId,
+ SfxVirtualMenu* pOwnParent, Menu& rMenu, sal_Bool bWithHelp,
+ SfxBindings &rBindings, sal_Bool bOLEServer, sal_Bool bRes, sal_Bool bIsAddonMenu ):
pItems(0),
- pImageControl(0),
+ pImageControl(0),
pBindings(&rBindings),
pResMgr(0),
pAutoDeactivate(0),
@@ -212,19 +211,19 @@ SfxVirtualMenu::SfxVirtualMenu( USHORT nOwnId,
pWindowMenu = NULL;
pPickMenu = NULL;
pAddonsMenu = NULL;
- bIsActive = FALSE;
- bControllersUnBound = FALSE;
+ bIsActive = sal_False;
+ bControllersUnBound = sal_False;
CreateFromSVMenu();
Construct_Impl();
- bHelpInitialized = FALSE;
+ bHelpInitialized = sal_False;
}
//--------------------------------------------------------------------
// creates a virtual menu from a StarView MenuBar or PopupMenu
-SfxVirtualMenu::SfxVirtualMenu( Menu *pStarViewMenu, BOOL bWithHelp,
- SfxBindings &rBindings, BOOL bOLEServer, BOOL bRes, BOOL bIsAddonMenu ):
+SfxVirtualMenu::SfxVirtualMenu( Menu *pStarViewMenu, sal_Bool bWithHelp,
+ SfxBindings &rBindings, sal_Bool bOLEServer, sal_Bool bRes, sal_Bool bIsAddonMenu ):
pItems(0),
pImageControl(0),
pBindings(&rBindings),
@@ -248,11 +247,11 @@ SfxVirtualMenu::SfxVirtualMenu( Menu *pStarViewMenu, BOOL bWithHelp,
pWindowMenu = NULL;
pPickMenu = NULL;
pAddonsMenu = NULL;
- bIsActive = FALSE;
- bControllersUnBound = FALSE;
+ bIsActive = sal_False;
+ bControllersUnBound = sal_False;
CreateFromSVMenu();
Construct_Impl();
- bHelpInitialized = FALSE;
+ bHelpInitialized = sal_False;
}
//--------------------------------------------------------------------
@@ -272,7 +271,7 @@ SfxVirtualMenu::~SfxVirtualMenu()
if ( bIsActive )
{
- pBindings->LEAVEREGISTRATIONS(); --nLocks; bIsActive = FALSE;
+ pBindings->LEAVEREGISTRATIONS(); --nLocks; bIsActive = sal_False;
}
// QAP-Hack
@@ -324,11 +323,13 @@ 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() );
+ SfxViewFrame* pViewFrame = pBindings->GetDispatcher()->GetFrame();
+ SfxSlotPool* pSlotPool = pViewFrame->GetObjectShell()->GetModule()->GetSlotPool();
+ Reference< com::sun::star::frame::XFrame > xFrame( pViewFrame->GetFrame().GetFrameInterface() );
if ( pSVMenu->IsMenuBar() )
{
- USHORT nPos = pSVMenu->GetItemPos( SID_MDIWINDOWLIST );
+ sal_uInt16 nPos = pSVMenu->GetItemPos( SID_MDIWINDOWLIST );
if ( nPos != MENU_ITEM_NOTFOUND && xFrame.is() )
{
// Retrieve addon popup menus and add them to our menu bar
@@ -369,8 +370,8 @@ void SfxVirtualMenu::CreateFromSVMenu()
// remember some values
SFX_APP();
- const int bOleServer = FALSE;
- const int bMac = FALSE;
+ const int bOleServer = sal_False;
+ const int bMac = sal_False;
SvtMenuOptions aOptions;
aOptions.AddListenerLink( LINK( this, SfxVirtualMenu, SettingsChanged ) );
@@ -378,10 +379,10 @@ void SfxVirtualMenu::CreateFromSVMenu()
pBindings->ENTERREGISTRATIONS(); ++nLocks;
pImageControl = new SfxMenuImageControl_Impl( SID_IMAGE_ORIENTATION, *pBindings, this );
- USHORT nSVPos = 0;
- for ( USHORT nPos=0; nPos<nCount; ++nPos, ++nSVPos )
+ sal_uInt16 nSVPos = 0;
+ for ( sal_uInt16 nPos=0; nPos<nCount; ++nPos, ++nSVPos )
{
- USHORT nSlotId = pSVMenu->GetItemId(nSVPos);
+ sal_uInt16 nSlotId = pSVMenu->GetItemId(nSVPos);
PopupMenu* pPopup = pSVMenu->GetPopupMenu(nSlotId);
if( pPopup && nSlotId >= SID_OBJECTMENU0 && nSlotId <= SID_OBJECTMENU_LAST )
{
@@ -416,13 +417,12 @@ void SfxVirtualMenu::CreateFromSVMenu()
{
rtl::OUString aSlotURL( RTL_CONSTASCII_USTRINGPARAM( "slot:" ));
aSlotURL += rtl::OUString::valueOf( sal_Int32( nSlotId ));
- Image aImage = GetImage( xFrame, aSlotURL, FALSE );
+ Image aImage = GetImage( xFrame, aSlotURL, false );
pSVMenu->SetItemImage( nSlotId, aImage );
}
}
else
{
- pSVMenu->SetHelpId( nSlotId, 0L );
pMnuCtrl = pItems+nPos;
// Normally only now in Activate-Handler
@@ -445,24 +445,6 @@ void SfxVirtualMenu::CreateFromSVMenu()
{
SfxMenuControl *pMnuCtrl=0;
String aCmd( pSVMenu->GetItemCommand( nSlotId ) );
- if ( aCmd.CompareToAscii("slot:", 5) == 0 )
- {
- SfxMacroConfig* pCfg = SFX_APP()->GetMacroConfig();
- if ( pCfg->IsMacroSlot( nSlotId ) )
- {
- if ( pCfg->GetMacroInfo( nSlotId ) )
- {
- pCfg->RegisterSlotId( nSlotId );
- pSVMenu->SetItemCommand( nSlotId, String() );
- aCmd.Erase();
- }
- else
- {
- pSVMenu->SetItemCommand( nSlotId, String::CreateFromAscii("macro:///macro.not.founc") );
- }
- }
- }
-
if ( aCmd.Len() && (( nSlotId < SID_SFX_START ) || ( nSlotId > SHRT_MAX )) )
{
// try to create control via comand name
@@ -505,13 +487,13 @@ void SfxVirtualMenu::CreateFromSVMenu()
if ( pMenuAttributes )
aImageId = pMenuAttributes->aImageId; // Retrieve image id from menu attributes
- aImage = RetrieveAddOnImage( xFrame, aImageId, aCmd, FALSE );
+ aImage = RetrieveAddOnImage( xFrame, aImageId, aCmd, false );
}
else
{
rtl::OUString aSlotURL( RTL_CONSTASCII_USTRINGPARAM( "slot:" ));
aSlotURL += rtl::OUString::valueOf( sal_Int32( nSlotId ));
- aImage = GetImage( xFrame, aSlotURL, FALSE );
+ aImage = GetImage( xFrame, aSlotURL, false );
}
if ( !!aImage )
@@ -557,21 +539,21 @@ IMPL_LINK( SfxVirtualMenu, Highlight, Menu *, pMenu )
pAutoDeactivate->Stop();
}
- return TRUE;
+ return sal_True;
}
IMPL_LINK( SfxVirtualMenu, SettingsChanged, void*, EMPTYARG )
{
- USHORT nItemCount = pSVMenu->GetItemCount();
+ sal_uInt16 nItemCount = pSVMenu->GetItemCount();
SfxViewFrame *pViewFrame = pBindings->GetDispatcher()->GetFrame();
- BOOL bIcons = Application::GetSettings().GetStyleSettings().GetUseImagesInMenus();
+ sal_Bool bIcons = Application::GetSettings().GetStyleSettings().GetUseImagesInMenus();
Reference<com::sun::star::frame::XFrame> xFrame( pViewFrame->GetFrame().GetFrameInterface() );
if ( !bIsAddonPopupMenu )
{
- for ( USHORT nSVPos=0; nSVPos<nItemCount; ++nSVPos )
+ for ( sal_uInt16 nSVPos=0; nSVPos<nItemCount; ++nSVPos )
{
- USHORT nSlotId = pSVMenu->GetItemId( nSVPos );
+ sal_uInt16 nSlotId = pSVMenu->GetItemId( nSVPos );
MenuItemType nType = pSVMenu->GetItemType( nSVPos );
if ( nType == MENUITEM_STRING && bIcons )
{
@@ -587,13 +569,13 @@ IMPL_LINK( SfxVirtualMenu, SettingsChanged, void*, EMPTYARG )
if ( pMenuAttributes )
aImageId = pMenuAttributes->aImageId; // Retrieve image id from menu attributes
- pSVMenu->SetItemImage( nSlotId, RetrieveAddOnImage( xFrame, aImageId, aCmd, FALSE ));
+ pSVMenu->SetItemImage( nSlotId, RetrieveAddOnImage( xFrame, aImageId, aCmd, false ));
}
else
{
rtl::OUString aSlotURL( RTL_CONSTASCII_USTRINGPARAM( "slot:" ));
aSlotURL += rtl::OUString::valueOf( sal_Int32( nSlotId ));
- pSVMenu->SetItemImage( nSlotId, GetImage( xFrame, aSlotURL, FALSE ));
+ pSVMenu->SetItemImage( nSlotId, GetImage( xFrame, aSlotURL, false ));
}
}
else if( nType == MENUITEM_STRINGIMAGE && !bIcons )
@@ -630,17 +612,17 @@ IMPL_LINK( SfxVirtualMenu, SettingsChanged, void*, EMPTYARG )
void SfxVirtualMenu::UpdateImages()
{
- BOOL bIcons = Application::GetSettings().GetStyleSettings().GetUseImagesInMenus();
+ sal_Bool bIcons = Application::GetSettings().GetStyleSettings().GetUseImagesInMenus();
if ( bIcons )
{
- USHORT nItemCount = pSVMenu->GetItemCount();
+ sal_uInt16 nItemCount = pSVMenu->GetItemCount();
SfxViewFrame * pViewFrame = pBindings->GetDispatcher()->GetFrame();
Reference<com::sun::star::frame::XFrame> xFrame( pViewFrame->GetFrame().GetFrameInterface() );
- for ( USHORT nSVPos=0; nSVPos < nItemCount; ++nSVPos )
+ for ( sal_uInt16 nSVPos=0; nSVPos < nItemCount; ++nSVPos )
{
- USHORT nSlotId = pSVMenu->GetItemId( nSVPos );
+ sal_uInt16 nSlotId = pSVMenu->GetItemId( nSVPos );
if ( pSVMenu->GetItemType( nSVPos ) == MENUITEM_STRINGIMAGE )
{
if ( framework::AddonMenuManager::IsAddonMenuId( nSlotId ))
@@ -655,13 +637,13 @@ void SfxVirtualMenu::UpdateImages()
if ( pMenuAttributes )
aImageId = pMenuAttributes->aImageId; // Retrieve image id from menu attributes
- pSVMenu->SetItemImage( nSlotId, RetrieveAddOnImage( xFrame, aImageId, aCmd, FALSE ));
+ pSVMenu->SetItemImage( nSlotId, RetrieveAddOnImage( xFrame, aImageId, aCmd, false ));
}
else
{
rtl::OUString aSlotURL( RTL_CONSTASCII_USTRINGPARAM( "slot:" ));
aSlotURL += rtl::OUString::valueOf( sal_Int32( nSlotId ));
- pSVMenu->SetItemImage( nSlotId, GetImage( xFrame, aSlotURL, FALSE ));
+ pSVMenu->SetItemImage( nSlotId, GetImage( xFrame, aSlotURL, false ));
}
}
}
@@ -680,15 +662,15 @@ void SfxVirtualMenu::UpdateImages( Menu* pMenu )
framework::AddonsOptions aAddonOptions;
- BOOL bIcons = Application::GetSettings().GetStyleSettings().GetUseImagesInMenus();
+ sal_Bool bIcons = Application::GetSettings().GetStyleSettings().GetUseImagesInMenus();
if ( bIcons )
{
- USHORT nItemCount = pMenu->GetItemCount();
+ sal_uInt16 nItemCount = pMenu->GetItemCount();
Reference<com::sun::star::frame::XFrame> aXFrame( pBindings->GetDispatcher_Impl()->GetFrame()->GetFrame().GetFrameInterface() );
- for ( USHORT nPos=0; nPos < nItemCount; ++nPos )
+ for ( sal_uInt16 nPos=0; nPos < nItemCount; ++nPos )
{
- USHORT nSlotId = pMenu->GetItemId( nPos );
+ sal_uInt16 nSlotId = pMenu->GetItemId( nPos );
PopupMenu* pPopup = pMenu->GetPopupMenu( nSlotId );
if ( pMenu->GetItemType( nPos ) != MENUITEM_SEPARATOR )
{
@@ -700,7 +682,7 @@ void SfxVirtualMenu::UpdateImages( Menu* pMenu )
if ( pMenuAttributes )
aImageId = pMenuAttributes->aImageId; // Retrieve image id from menu attributes
- pMenu->SetItemImage( nSlotId, RetrieveAddOnImage( aXFrame, aImageId, pMenu->GetItemCommand( nSlotId ), FALSE ));
+ pMenu->SetItemImage( nSlotId, RetrieveAddOnImage( aXFrame, aImageId, pMenu->GetItemCommand( nSlotId ), false ));
}
if ( pPopup )
@@ -719,10 +701,10 @@ void SfxVirtualMenu::RemoveMenuImages( Menu* pMenu )
if ( !pMenu )
return;
- USHORT nItemCount = pMenu->GetItemCount();
- for ( USHORT nPos=0; nPos < nItemCount; ++nPos )
+ sal_uInt16 nItemCount = pMenu->GetItemCount();
+ for ( sal_uInt16 nPos=0; nPos < nItemCount; ++nPos )
{
- USHORT nSlotId = pMenu->GetItemId( nPos );
+ sal_uInt16 nSlotId = pMenu->GetItemId( nPos );
PopupMenu* pPopup = pMenu->GetPopupMenu( nSlotId );
if ( pMenu->GetItemType( nPos ) == MENUITEM_STRINGIMAGE )
pMenu->SetItemImage( nSlotId, Image() );
@@ -735,16 +717,16 @@ void SfxVirtualMenu::RemoveMenuImages( Menu* pMenu )
bool SfxVirtualMenu::Bind_Impl( Menu *pMenu )
{
- // Search , as SV with 'USHORT nSID = pSVMenu->GetCurItemId();' always
+ // Search , as SV with 'sal_uInt16 nSID = pSVMenu->GetCurItemId();' always
// returns 0. It is like this, since the Event-Forwarding has nothing to do
// with the Parent-Menus CurItem.
sal_uInt32 nAddonsPopupPrefixLen = ADDONSPOPUPMENU_URL_PREFIX.getLength();
- for ( USHORT nPos = 0; nPos < nCount; ++nPos )
+ for ( sal_uInt16 nPos = 0; nPos < nCount; ++nPos )
{
// found the Sub-Menu in question?
bool bFound = false;
- USHORT nSID = pSVMenu->GetItemId(nPos);
+ sal_uInt16 nSID = pSVMenu->GetItemId(nPos);
SfxMenuControl &rCtrl = pItems[nPos];
bFound = pSVMenu->GetPopupMenu(nSID) == pMenu;
SfxVirtualMenu *pSubMenu = rCtrl.GetPopupMenu();
@@ -754,7 +736,7 @@ bool SfxVirtualMenu::Bind_Impl( Menu *pMenu )
// Only a binded Menu-Controller as already an Id!
if ( !rCtrl.GetId() )
{
- bIsAddonPopupMenu = FALSE;
+ bIsAddonPopupMenu = sal_False;
DBG_ASSERT( !pSubMenu, "Popup already exists!");
// Check if the popup is an Add-On popup menu
@@ -764,12 +746,12 @@ bool SfxVirtualMenu::Bind_Impl( Menu *pMenu )
( nSID == SID_ADDONHELP ) ||
(( (sal_uInt32)aCommand.getLength() > nAddonsPopupPrefixLen ) &&
( aCommand.indexOf( ADDONSPOPUPMENU_URL_PREFIX ) == 0 )) )
- bIsAddonPopupMenu = TRUE;
+ bIsAddonPopupMenu = sal_True;
// Create VirtualMenu for Sub-Menu
- BOOL bRes = bResCtor;
+ sal_Bool bRes = bResCtor;
pSubMenu = new SfxVirtualMenu( nSID, this,
- *pMenu, FALSE, *pBindings, bOLE, bRes, bIsAddonPopupMenu );
+ *pMenu, sal_False, *pBindings, bOLE, bRes, bIsAddonPopupMenu );
DBG_OUTF( ("New VirtualMenu %lx created", pSubMenu) );
@@ -788,18 +770,18 @@ bool SfxVirtualMenu::Bind_Impl( Menu *pMenu )
// If found, break
if ( bFound )
- return TRUE;
+ return true;
}
// Not found in this submenu
- return FALSE;
+ return false;
}
void SfxVirtualMenu::BindControllers()
{
pBindings->ENTERREGISTRATIONS();
- USHORT nPos;
+ sal_uInt16 nPos;
for ( nPos = 0; nPos < nCount; ++nPos )
{
SfxMenuControl& rCtrl = pItems[nPos];
@@ -811,20 +793,20 @@ void SfxVirtualMenu::BindControllers()
for ( nPos=0; nPos<rCtrlArr.Count(); nPos++ )
{
SfxMenuControl* pCtrl = rCtrlArr[nPos];
- USHORT nSlotId = pCtrl->GetId();
+ sal_uInt16 nSlotId = pCtrl->GetId();
if ( !pSVMenu->GetItemCommand(nSlotId).Len() )
pCtrl->ReBind();
}
pBindings->LEAVEREGISTRATIONS();
- bControllersUnBound = FALSE;
+ bControllersUnBound = sal_False;
}
void SfxVirtualMenu::UnbindControllers()
{
pBindings->ENTERREGISTRATIONS();
- USHORT nPos;
+ sal_uInt16 nPos;
for ( nPos = 0; nPos < nCount; ++nPos )
{
SfxMenuControl &rCtrl = pItems[nPos];
@@ -842,7 +824,7 @@ void SfxVirtualMenu::UnbindControllers()
}
pBindings->LEAVEREGISTRATIONS();
- bControllersUnBound = TRUE;
+ bControllersUnBound = sal_True;
}
@@ -866,7 +848,7 @@ void SfxVirtualMenu::InsertAddOnsMenuItem( Menu* pMenu )
// Create menu item at the end of the tools popup menu for the addons popup menu
if ( pAddonMenu && pAddonMenu->GetItemCount() > 0 )
{
- USHORT nItemCount = pMenu->GetItemCount();
+ sal_uInt16 nItemCount = pMenu->GetItemCount();
String aAddonsTitle( SfxResId( STR_MENU_ADDONS ));
if ( nItemCount > 0 && pMenu->GetItemType( nItemCount-1 ) != MENUITEM_SEPARATOR )
pMenu->InsertSeparator();
@@ -877,7 +859,7 @@ void SfxVirtualMenu::InsertAddOnsMenuItem( Menu* pMenu )
{
rtl::OUString aSlotURL( RTL_CONSTASCII_USTRINGPARAM( "slot:" ));
aSlotURL += rtl::OUString::valueOf( sal_Int32( SID_ADDONS ));
- pMenu->SetItemImage( SID_ADDONS, GetImage( xFrame, aSlotURL, FALSE ));
+ pMenu->SetItemImage( SID_ADDONS, GetImage( xFrame, aSlotURL, false ));
}
}
else
@@ -913,7 +895,7 @@ IMPL_LINK( SfxVirtualMenu, Activate, Menu *, pMenu )
{
// Prevent Double Activate
if ( bIsActive )
- return TRUE;
+ return sal_True;
// ggf. Pick-Menu erzeugen
if ( pParent && pSVMenu == pParent->pPickMenu )
@@ -930,8 +912,8 @@ IMPL_LINK( SfxVirtualMenu, Activate, Menu *, pMenu )
Reference< XDesktop > xDesktop( ::comphelper::getProcessServiceFactory()->createInstance(
DEFINE_CONST_OUSTRING( "com.sun.star.frame.Desktop" ) ), UNO_QUERY );
- USHORT nActiveItemId = 0;
- USHORT nItemId = START_ITEMID_WINDOWLIST;
+ sal_uInt16 nActiveItemId = 0;
+ sal_uInt16 nItemId = START_ITEMID_WINDOWLIST;
if ( xDesktop.is() )
{
@@ -1000,9 +982,9 @@ IMPL_LINK( SfxVirtualMenu, Activate, Menu *, pMenu )
//InvalidateKeyCodes();
pBindings->GetDispatcher_Impl()->Flush();
- for ( USHORT nPos = 0; nPos < nCount; ++nPos )
+ for ( sal_uInt16 nPos = 0; nPos < nCount; ++nPos )
{
- USHORT nSlotId = (pItems+nPos)->GetId();
+ sal_uInt16 nSlotId = (pItems+nPos)->GetId();
if ( nSlotId && nSlotId > END_ITEMID_WINDOWLIST )
pBindings->Update(nSlotId);
}
@@ -1010,12 +992,12 @@ IMPL_LINK( SfxVirtualMenu, Activate, Menu *, pMenu )
pBindings->Update( SID_IMAGE_ORIENTATION );
// Supress the Status updates until Deactivate
- pBindings->ENTERREGISTRATIONS(); ++nLocks; bIsActive = TRUE;
+ pBindings->ENTERREGISTRATIONS(); ++nLocks; bIsActive = sal_True;
if ( pAutoDeactivate ) // QAP-Hack
pAutoDeactivate->Start();
- return TRUE;
+ return sal_True;
}
else
{
@@ -1045,9 +1027,9 @@ IMPL_LINK( SfxVirtualMenu, Deactivate, Menu *, pMenu )
// when the menu is disabled (= closed)
if ( pParent )
UnbindControllers();
- pBindings->LEAVEREGISTRATIONS(); --nLocks; bIsActive = FALSE;
+ pBindings->LEAVEREGISTRATIONS(); --nLocks; bIsActive = sal_False;
}
- return TRUE;
+ return sal_True;
}
//--------------------------------------------------------------------
@@ -1055,7 +1037,7 @@ IMPL_LINK( SfxVirtualMenu, Deactivate, Menu *, pMenu )
IMPL_LINK( SfxVirtualMenu, Select, Menu *, pMenu )
{
- USHORT nSlotId = (USHORT) pMenu->GetCurItemId();
+ sal_uInt16 nSlotId = (sal_uInt16) pMenu->GetCurItemId();
DBG_OUTF( ("SfxVirtualMenu %lx selected %u from %lx", this, nSlotId, pMenu) );
if ( nSlotId >= START_ITEMID_WINDOWLIST && nSlotId <= END_ITEMID_WINDOWLIST )
@@ -1065,7 +1047,7 @@ IMPL_LINK( SfxVirtualMenu, Select, Menu *, pMenu )
DEFINE_CONST_OUSTRING( "com.sun.star.frame.Desktop" ) ), UNO_QUERY );
if ( xDesktop.is() )
{
- USHORT nTaskId = START_ITEMID_WINDOWLIST;
+ sal_uInt16 nTaskId = START_ITEMID_WINDOWLIST;
Reference< XIndexAccess > xList( xDesktop->getFrames(), UNO_QUERY );
sal_Int32 nFrameCount = xList->getCount();
for ( sal_Int32 i=0; i<nFrameCount; ++i )
@@ -1084,7 +1066,7 @@ IMPL_LINK( SfxVirtualMenu, Select, Menu *, pMenu )
}
}
- return TRUE;
+ return sal_True;
}
else if ( nSlotId >= START_ITEMID_PICKLIST && nSlotId <= END_ITEMID_PICKLIST )
{
@@ -1097,7 +1079,7 @@ IMPL_LINK( SfxVirtualMenu, Select, Menu *, pMenu )
else
pBindings->Execute( nSlotId );
- return TRUE;
+ return sal_True;
}
//--------------------------------------------------------------------
@@ -1116,12 +1098,12 @@ Menu* SfxVirtualMenu::GetSVMenu() const
// return the position of the specified item
-USHORT SfxVirtualMenu::GetItemPos( USHORT nItemId ) const
+sal_uInt16 SfxVirtualMenu::GetItemPos( sal_uInt16 nItemId ) const
{
DBG_MEMTEST();
DBG_CHKTHIS(SfxVirtualMenu, 0);
- for ( USHORT nPos = 0; nPos < nCount; ++nPos )
+ for ( sal_uInt16 nPos = 0; nPos < nCount; ++nPos )
if ( (pItems+nPos)->GetId() == nItemId )
return nPos;
return MENU_ITEM_NOTFOUND;
@@ -1131,12 +1113,12 @@ USHORT SfxVirtualMenu::GetItemPos( USHORT nItemId ) const
// returns the popup-menu assigned to the item or 0 if none
-SfxVirtualMenu* SfxVirtualMenu::GetPopupMenu( USHORT nItemId ) const
+SfxVirtualMenu* SfxVirtualMenu::GetPopupMenu( sal_uInt16 nItemId ) const
{
DBG_MEMTEST();
DBG_CHKTHIS(SfxVirtualMenu, 0);
- USHORT nPos = GetItemPos(nItemId);
+ sal_uInt16 nPos = GetItemPos(nItemId);
if ( nPos != MENU_ITEM_NOTFOUND )
return (pItems+nPos)->GetPopupMenu();
return 0;
@@ -1145,12 +1127,12 @@ SfxVirtualMenu* SfxVirtualMenu::GetPopupMenu( USHORT nItemId ) const
// returns the text of the item as currently shown in the menu
-String SfxVirtualMenu::GetItemText( USHORT nSlotId ) const
+String SfxVirtualMenu::GetItemText( sal_uInt16 nSlotId ) const
{
DBG_MEMTEST();
DBG_CHKTHIS(SfxVirtualMenu, 0);
- USHORT nPos = GetItemPos(nSlotId);
+ sal_uInt16 nPos = GetItemPos(nSlotId);
if ( nPos != MENU_ITEM_NOTFOUND )
return (pItems+nPos)->GetTitle();
return String();
@@ -1159,7 +1141,7 @@ String SfxVirtualMenu::GetItemText( USHORT nSlotId ) const
// set the checkmark of the specified item
-void SfxVirtualMenu::CheckItem( USHORT nItemId, BOOL bCheck )
+void SfxVirtualMenu::CheckItem( sal_uInt16 nItemId, sal_Bool bCheck )
{
DBG_MEMTEST();
DBG_CHKTHIS(SfxVirtualMenu, 0);
@@ -1172,7 +1154,7 @@ void SfxVirtualMenu::CheckItem( USHORT nItemId, BOOL bCheck )
// set the enabled-state of the specified item
-void SfxVirtualMenu::EnableItem( USHORT nItemId, BOOL bEnable )
+void SfxVirtualMenu::EnableItem( sal_uInt16 nItemId, sal_Bool bEnable )
{
DBG_MEMTEST();
DBG_CHKTHIS(SfxVirtualMenu, 0);
@@ -1186,7 +1168,7 @@ void SfxVirtualMenu::EnableItem( USHORT nItemId, BOOL bEnable )
// set the text of the specified item
-void SfxVirtualMenu::SetItemText( USHORT nItemId, const String& rText )
+void SfxVirtualMenu::SetItemText( sal_uInt16 nItemId, const String& rText )
{
DBG_MEMTEST();
DBG_CHKTHIS(SfxVirtualMenu, 0);
@@ -1200,14 +1182,14 @@ void SfxVirtualMenu::SetItemText( USHORT nItemId, const String& rText )
//
-void SfxVirtualMenu::SetPopupMenu( USHORT nItemId, PopupMenu *pMenu )
+void SfxVirtualMenu::SetPopupMenu( sal_uInt16 nItemId, PopupMenu *pMenu )
{
DBG_MEMTEST();
DBG_CHKTHIS(SfxVirtualMenu, 0);
if (pSVMenu->GetItemPos( nItemId ) != MENU_ITEM_NOTFOUND )
GetSVMenu()->SetPopupMenu( nItemId, pMenu );
- for ( USHORT n = 0; n < nCount; ++n )
+ for ( sal_uInt16 n = 0; n < nCount; ++n )
{
SfxVirtualMenu *pSubMenu = (pItems+n)->GetPopupMenu();
if ( pSubMenu )
@@ -1219,12 +1201,12 @@ void SfxVirtualMenu::SetPopupMenu( USHORT nItemId, PopupMenu *pMenu )
// Forces the initialization, which is otherwise only happens in Activate
-void SfxVirtualMenu::InitPopup( USHORT nPos, BOOL /*bOLE*/ )
+void SfxVirtualMenu::InitPopup( sal_uInt16 nPos, sal_Bool /*bOLE*/ )
{
DBG_MEMTEST();
DBG_CHKTHIS(SfxVirtualMenu, 0);
- USHORT nSID = pSVMenu->GetItemId(nPos);
+ sal_uInt16 nSID = pSVMenu->GetItemId(nPos);
PopupMenu *pMenu = pSVMenu->GetPopupMenu( nSID );
DBG_ASSERT( pMenu, "No popup exist here!");
@@ -1233,9 +1215,9 @@ void SfxVirtualMenu::InitPopup( USHORT nPos, BOOL /*bOLE*/ )
if ( !rCtrl.GetId() )
{
// Generate VirtualMenu for Sub-Menu
- BOOL bRes = bResCtor;
+ sal_Bool bRes = bResCtor;
SfxVirtualMenu *pSubMenu =
- new SfxVirtualMenu(nSID, this, *pMenu, FALSE, *pBindings, bOLE, bRes);
+ new SfxVirtualMenu(nSID, this, *pMenu, sal_False, *pBindings, bOLE, bRes);
DBG_OUTF( ("New VirtualMenu %lx created", pSubMenu) );
@@ -1245,13 +1227,13 @@ void SfxVirtualMenu::InitPopup( USHORT nPos, BOOL /*bOLE*/ )
void SfxVirtualMenu::InitializeHelp()
{
- for ( USHORT nPos = 0; nPos<pSVMenu->GetItemCount(); ++nPos )
+ for ( sal_uInt16 nPos = 0; nPos<pSVMenu->GetItemCount(); ++nPos )
{
- USHORT nSlotId = pSVMenu->GetItemId(nPos);
+ sal_uInt16 nSlotId = pSVMenu->GetItemId(nPos);
SfxMenuControl &rCtrl = pItems[nPos];
if ( nSlotId && !rCtrl.GetId() )
{
- InitPopup( nPos, TRUE );
+ InitPopup( nPos, sal_True );
}
SfxVirtualMenu *pSubMenu = rCtrl.GetPopupMenu();
@@ -1259,10 +1241,10 @@ void SfxVirtualMenu::InitializeHelp()
pSubMenu->InitializeHelp();
}
- bHelpInitialized = TRUE;
+ bHelpInitialized = sal_True;
}
-typedef ULONG (__LOADONCALLAPI *HelpIdFunc) ( const String& );
+typedef sal_uIntPtr (__LOADONCALLAPI *HelpIdFunc) ( const String& );
void SfxVirtualMenu::SetHelpIds( ResMgr *pRes )
{
diff --git a/sfx2/source/notify/eventsupplier.cxx b/sfx2/source/notify/eventsupplier.cxx
index ed6814df9fd4..b5bf27c86b3b 100644..100755
--- a/sfx2/source/notify/eventsupplier.cxx
+++ b/sfx2/source/notify/eventsupplier.cxx
@@ -45,10 +45,11 @@
#include <unotools/securityoptions.hxx>
#include <comphelper/processfactory.hxx>
+#include <comphelper/namedvaluecollection.hxx>
#include "eventsupplier.hxx"
#include <sfx2/app.hxx>
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include <sfx2/sfxsids.hrc>
#include "sfxlocal.hrc"
@@ -85,41 +86,37 @@ void SAL_CALL SfxEvents_Impl::replaceByName( const OUSTRING & aName, const ANY &
{
if ( maEventNames[i] == aName )
{
- Sequence< PropertyValue > aProperties;
+ const ::comphelper::NamedValueCollection aEventDescriptor( rElement );
// check for correct type of the element
- if ( rElement.hasValue() && !( rElement >>= aProperties ) )
+ if ( rElement.hasValue() && aEventDescriptor.empty() )
throw ILLEGALARGUMENTEXCEPTION();
// create Configuration at first, creation might call this method also and that would overwrite everything
// we might have stored before!
if ( mpObjShell && !mpObjShell->IsLoading() )
- mpObjShell->SetModified( TRUE );
+ mpObjShell->SetModified( sal_True );
- if ( aProperties.getLength() )
+ ::comphelper::NamedValueCollection aNormalizedDescriptor;
+ NormalizeMacro( aEventDescriptor, aNormalizedDescriptor, mpObjShell );
+
+ ::rtl::OUString sType;
+ if ( ( aNormalizedDescriptor.size() == 1 )
+ && ( aNormalizedDescriptor.has( PROP_EVENT_TYPE) == 0 )
+ && ( aNormalizedDescriptor.get( PROP_EVENT_TYPE ) >>= sType )
+ && ( sType.getLength() == 0 )
+ )
{
- // "normalize" the macro descriptor
- ANY aValue;
- BlowUpMacro( rElement, aValue, mpObjShell );
- aValue >>= aProperties;
-
- ::rtl::OUString sType;
- if ( ( aProperties.getLength() == 1 )
- && ( aProperties[0].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(PROP_EVENT_TYPE)) )
- && ( aProperties[0].Value >>= sType )
- && ( sType.getLength() == 0 )
- )
- {
- // An empty event type means no binding. Therefore reset data
- // to reflect that state.
- // (that's for compatibility only. Nowadays, the Tools/Customize dialog should
- // set an empty sequence to indicate the request for resetting the assignment.)
- aProperties.realloc( 0 );
- }
+ // An empty event type means no binding. Therefore reset data
+ // to reflect that state.
+ // (that's for compatibility only. Nowadays, the Tools/Customize dialog should
+ // set an empty sequence to indicate the request for resetting the assignment.)
+ OSL_ENSURE( false, "legacy event assignment format detected" );
+ aNormalizedDescriptor.clear();
}
- if ( aProperties.getLength() )
+ if ( !aNormalizedDescriptor.empty() )
{
- maEventData[i] = makeAny( aProperties );
+ maEventData[i] <<= aNormalizedDescriptor.getPropertyValues();
}
else
{
@@ -375,13 +372,13 @@ SfxEvents_Impl::~SfxEvents_Impl()
}
//--------------------------------------------------------------------------------------------------------
-SvxMacro* SfxEvents_Impl::ConvertToMacro( const ANY& rElement, SfxObjectShell* pObjShell, BOOL bBlowUp )
+SvxMacro* SfxEvents_Impl::ConvertToMacro( const ANY& rElement, SfxObjectShell* pObjShell, sal_Bool bNormalizeMacro )
{
SvxMacro* pMacro = NULL;
SEQUENCE < PROPERTYVALUE > aProperties;
ANY aAny;
- if ( bBlowUp )
- BlowUpMacro( rElement, aAny, pObjShell );
+ if ( bNormalizeMacro )
+ NormalizeMacro( rElement, aAny, pObjShell );
else
aAny = rElement;
@@ -441,58 +438,38 @@ SvxMacro* SfxEvents_Impl::ConvertToMacro( const ANY& rElement, SfxObjectShell* p
return pMacro;
}
-void SfxEvents_Impl::BlowUpMacro( const ANY& rEvent, ANY& rRet, SfxObjectShell* pDoc )
+void SfxEvents_Impl::NormalizeMacro( const ANY& rEvent, ANY& rRet, SfxObjectShell* pDoc )
{
- if ( !pDoc )
- pDoc = SfxObjectShell::Current();
-
- SEQUENCE < PROPERTYVALUE > aInProps;
- SEQUENCE < PROPERTYVALUE > aOutProps(2);
-
- if ( !( rEvent >>= aInProps ) )
- return;
+ const ::comphelper::NamedValueCollection aEventDescriptor( rEvent );
+ ::comphelper::NamedValueCollection aEventDescriptorOut;
- sal_Int32 nCount = aInProps.getLength();
+ NormalizeMacro( aEventDescriptor, aEventDescriptorOut, pDoc );
- if ( !nCount )
- return;
+ rRet <<= aEventDescriptorOut.getPropertyValues();
+}
- OUSTRING aType;
- OUSTRING aScript;
- OUSTRING aLibrary;
- OUSTRING aMacroName;
+void SfxEvents_Impl::NormalizeMacro( const ::comphelper::NamedValueCollection& i_eventDescriptor,
+ ::comphelper::NamedValueCollection& o_normalizedDescriptor, SfxObjectShell* i_document )
+{
+ SfxObjectShell* pDoc = i_document;
+ if ( !pDoc )
+ pDoc = SfxObjectShell::Current();
- sal_Int32 nIndex = 0;
+ ::rtl::OUString aType = i_eventDescriptor.getOrDefault( PROP_EVENT_TYPE, ::rtl::OUString() );
+ ::rtl::OUString aScript = i_eventDescriptor.getOrDefault( PROP_SCRIPT, ::rtl::OUString() );
+ ::rtl::OUString aLibrary = i_eventDescriptor.getOrDefault( PROP_LIBRARY, ::rtl::OUString() );
+ ::rtl::OUString aMacroName = i_eventDescriptor.getOrDefault( PROP_MACRO_NAME, ::rtl::OUString() );
- while ( nIndex < nCount )
- {
- if (aInProps[ nIndex ].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(PROP_EVENT_TYPE)))
- {
- aInProps[nIndex].Value >>= aType;
- aOutProps[0] = aInProps[nIndex];
- }
- else if (aInProps[ nIndex ].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(PROP_SCRIPT)))
- {
- aInProps[nIndex].Value >>= aScript;
- aOutProps[1] = aInProps[nIndex];
- }
- else if (aInProps[ nIndex ].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(PROP_LIBRARY)))
- {
- aInProps[ nIndex ].Value >>= aLibrary;
- }
- else if (aInProps[ nIndex ].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(PROP_MACRO_NAME)))
- {
- aInProps[ nIndex ].Value >>= aMacroName;
- }
- nIndex += 1;
- }
+ if ( aType.getLength() )
+ o_normalizedDescriptor.put( PROP_EVENT_TYPE, aType );
+ if ( aScript.getLength() )
+ o_normalizedDescriptor.put( PROP_SCRIPT, aScript );
if (aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(STAR_BASIC)))
{
- aOutProps.realloc(4);
if ( aScript.getLength() )
{
- if( ! aMacroName.getLength() || ! aLibrary.getLength() )
+ if ( !aMacroName.getLength() || !aLibrary.getLength() )
{
sal_Int32 nHashPos = aScript.indexOf( '/', 8 );
sal_Int32 nArgsPos = aScript.indexOf( '(' );
@@ -539,22 +516,9 @@ void SfxEvents_Impl::BlowUpMacro( const ANY& rEvent, ANY& rRet, SfxObjectShell*
aLibrary = String::CreateFromAscii("application");
}
- aOutProps[1].Name = OUSTRING(RTL_CONSTASCII_USTRINGPARAM( PROP_SCRIPT ));
- aOutProps[1].Value <<= aScript;
- aOutProps[2].Name = OUSTRING(RTL_CONSTASCII_USTRINGPARAM( PROP_LIBRARY ));
- aOutProps[2].Value <<= aLibrary;
- aOutProps[3].Name = OUSTRING(RTL_CONSTASCII_USTRINGPARAM( PROP_MACRO_NAME ));
- aOutProps[3].Value <<= aMacroName;
- rRet <<= aOutProps;
- }
- else if (aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(SVX_MACRO_LANGUAGE_JAVASCRIPT)))
- {
- aOutProps[1] = aInProps[1];
- rRet <<= aOutProps;
- }
- else
- {
- rRet <<= aOutProps;
+ o_normalizedDescriptor.put( PROP_SCRIPT, aScript );
+ o_normalizedDescriptor.put( PROP_LIBRARY, aLibrary );
+ o_normalizedDescriptor.put( PROP_MACRO_NAME, aMacroName );
}
}
diff --git a/sfx2/source/notify/hintpost.cxx b/sfx2/source/notify/hintpost.cxx
index 09299a152102..09299a152102 100644..100755
--- a/sfx2/source/notify/hintpost.cxx
+++ b/sfx2/source/notify/hintpost.cxx
diff --git a/sfx2/source/statbar/makefile.mk b/sfx2/source/statbar/makefile.mk
deleted file mode 100644
index f99c8fcdaa1e..000000000000
--- a/sfx2/source/statbar/makefile.mk
+++ /dev/null
@@ -1,47 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..
-
-PRJNAME=sfx2
-TARGET=statbar
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Files --------------------------------------------------------
-
-SLOFILES = \
- $(SLO)$/stbitem.obj
-
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sfx2/source/statbar/stbitem.cxx b/sfx2/source/statbar/stbitem.cxx
index 536ca9b75232..739362ed50f0 100644..100755
--- a/sfx2/source/statbar/stbitem.cxx
+++ b/sfx2/source/statbar/stbitem.cxx
@@ -40,7 +40,7 @@
#include <vcl/status.hxx>
#include <sfx2/app.hxx>
-#include "stbitem.hxx"
+#include "sfx2/stbitem.hxx"
#include "sfxtypes.hxx"
#include <sfx2/msg.hxx>
#include "arrdecl.hxx"
@@ -63,9 +63,9 @@ using namespace ::com::sun::star;
//--------------------------------------------------------------------
-USHORT SfxStatusBarControl::convertAwtToVCLMouseButtons( sal_Int16 nAwtMouseButtons )
+sal_uInt16 SfxStatusBarControl::convertAwtToVCLMouseButtons( sal_Int16 nAwtMouseButtons )
{
- USHORT nVCLMouseButtons( 0 );
+ sal_uInt16 nVCLMouseButtons( 0 );
if ( nAwtMouseButtons & awt::MouseButton::LEFT )
nVCLMouseButtons |= MOUSE_LEFT;
@@ -127,9 +127,14 @@ svt::StatusbarController* SAL_CALL SfxStatusBarControllerFactory(
const SfxSlot* pSlot = pSlotPool->GetUnoSlot( aTargetURL.Path );
if ( pSlot )
{
- USHORT nSlotId = pSlot->GetSlotId();
+ sal_uInt16 nSlotId = pSlot->GetSlotId();
if ( nSlotId > 0 )
+ {
+ rtl::OString aCmd(".uno:");
+ aCmd += pSlot->GetUnoName();
+ pStatusBar->SetHelpId( nSlotId, aCmd );
return SfxStatusBarControl::CreateControl( nSlotId, nID, pStatusBar, pModule );
+ }
}
return NULL;
@@ -139,13 +144,13 @@ svt::StatusbarController* SAL_CALL SfxStatusBarControllerFactory(
SfxStatusBarControl::SfxStatusBarControl
(
- USHORT nSlotID, /* Slot-Id which is connected to this
+ sal_uInt16 nSlotID, /* Slot-Id which is connected to this
instance. If a Slot-Id is set to != 0 at
registration it will always be set there.
*/
- USHORT nCtrlID, /* ID of this controller in the status bar */
+ sal_uInt16 nCtrlID, /* ID of this controller in the status bar */
StatusBar& rBar /* Reference to the StatusBar,for which
this Control was created. */
@@ -245,7 +250,7 @@ throw ( ::com::sun::star::uno::RuntimeException )
}
}
- USHORT nSlotID = 0;
+ sal_uInt16 nSlotID = 0;
SfxSlotPool& rPool = SfxSlotPool::GetSlotPool( pViewFrame );
const SfxSlot* pSlot = rPool.GetUnoSlot( rEvent.FeatureURL.Path );
if ( pSlot )
@@ -331,7 +336,7 @@ throw ( uno::RuntimeException )
::Point aPos( rMouseEvent.X, rMouseEvent.Y );
::MouseEvent aMouseEvent( aPos,
- (USHORT)rMouseEvent.ClickCount,
+ (sal_uInt16)rMouseEvent.ClickCount,
0,
convertAwtToVCLMouseButtons( rMouseEvent.Buttons ),
0 );
@@ -349,7 +354,7 @@ throw (uno::RuntimeException)
::Point aPos( rMouseEvent.X, rMouseEvent.Y );
::MouseEvent aMouseEvent( aPos,
- (USHORT)rMouseEvent.ClickCount,
+ (sal_uInt16)rMouseEvent.ClickCount,
0,
convertAwtToVCLMouseButtons( rMouseEvent.Buttons ),
0 );
@@ -366,7 +371,7 @@ throw ( uno::RuntimeException )
::Point aPos( rMouseEvent.X, rMouseEvent.Y );
::MouseEvent aMouseEvent( aPos,
- (USHORT)rMouseEvent.ClickCount,
+ (sal_uInt16)rMouseEvent.ClickCount,
0,
convertAwtToVCLMouseButtons( rMouseEvent.Buttons ),
0 );
@@ -384,7 +389,7 @@ throw (::com::sun::star::uno::RuntimeException)
{
SolarMutexGuard aGuard;
::Point aPos( rPos.X, rPos.Y );
- CommandEvent aCmdEvent( aPos, (USHORT)nCommand, TRUE, NULL );
+ CommandEvent aCmdEvent( aPos, (sal_uInt16)nCommand, sal_True, NULL );
Command( aCmdEvent );
}
@@ -404,7 +409,7 @@ throw ( ::uno::RuntimeException )
if ( pOutDev )
{
::Rectangle aRect = VCLRectangle( rOutputRectangle );
- UserDrawEvent aUserDrawEvent( pOutDev, aRect, (USHORT)nItemId, (USHORT)nStyle );
+ UserDrawEvent aUserDrawEvent( pOutDev, aRect, (sal_uInt16)nItemId, (sal_uInt16)nStyle );
Paint( aUserDrawEvent );
}
}
@@ -433,7 +438,7 @@ throw ( uno::RuntimeException )
void SfxStatusBarControl::StateChanged
(
- USHORT nSID,
+ sal_uInt16 nSID,
SfxItemState eState,
const SfxPoolItem* pState /* Pointer to SfxPoolItem, is only valid
withih this Method call. This can be a
@@ -468,7 +473,7 @@ void SfxStatusBarControl::StateChanged
//--------------------------------------------------------------------
-BOOL SfxStatusBarControl::MouseButtonDown( const MouseEvent & )
+sal_Bool SfxStatusBarControl::MouseButtonDown( const MouseEvent & )
/* [Description]
@@ -480,7 +485,7 @@ BOOL SfxStatusBarControl::MouseButtonDown( const MouseEvent & )
[Return value]
- BOOL TRUE
+ sal_Bool TRUE
The event has been processed and is not intended to
be forwarded to StatusBar
@@ -490,12 +495,12 @@ BOOL SfxStatusBarControl::MouseButtonDown( const MouseEvent & )
*/
{
- return FALSE;
+ return sal_False;
}
//--------------------------------------------------------------------
-BOOL SfxStatusBarControl::MouseMove( const MouseEvent & )
+sal_Bool SfxStatusBarControl::MouseMove( const MouseEvent & )
/* [Description]
@@ -507,7 +512,7 @@ BOOL SfxStatusBarControl::MouseMove( const MouseEvent & )
[Return value]
- BOOL TRUE
+ sal_Bool TRUE
The event has been processed and is not intended to
be forwarded to StatusBar
@@ -517,12 +522,12 @@ BOOL SfxStatusBarControl::MouseMove( const MouseEvent & )
*/
{
- return FALSE;
+ return sal_False;
}
//--------------------------------------------------------------------
-BOOL SfxStatusBarControl::MouseButtonUp( const MouseEvent & )
+sal_Bool SfxStatusBarControl::MouseButtonUp( const MouseEvent & )
/* [Description]
@@ -534,7 +539,7 @@ BOOL SfxStatusBarControl::MouseButtonUp( const MouseEvent & )
[Return value]
- BOOL TRUE
+ sal_Bool TRUE
The event has been processed and is not intended to
be forwarded to StatusBar
@@ -544,7 +549,7 @@ BOOL SfxStatusBarControl::MouseButtonUp( const MouseEvent & )
*/
{
- return FALSE;
+ return sal_False;
}
//--------------------------------------------------------------------
@@ -628,8 +633,8 @@ void SfxStatusBarControl::ReleaseMouse()
SfxStatusBarControl* SfxStatusBarControl::CreateControl
(
- USHORT nSlotID,
- USHORT nStbId,
+ sal_uInt16 nSlotID,
+ sal_uInt16 nStbId,
StatusBar* pBar,
SfxModule* pMod
)
@@ -652,7 +657,7 @@ SfxStatusBarControl* SfxStatusBarControl::CreateControl
if ( pFactories )
{
SfxStbCtrlFactArr_Impl &rFactories = *pFactories;
- for ( USHORT nFactory = 0; nFactory < rFactories.Count(); ++nFactory )
+ for ( sal_uInt16 nFactory = 0; nFactory < rFactories.Count(); ++nFactory )
if ( rFactories[nFactory]->nTypeId == aSlotType &&
( ( rFactories[nFactory]->nSlotId == 0 ) ||
( rFactories[nFactory]->nSlotId == nSlotID) ) )
@@ -661,7 +666,7 @@ SfxStatusBarControl* SfxStatusBarControl::CreateControl
}
SfxStbCtrlFactArr_Impl &rFactories = pApp->GetStbCtrlFactories_Impl();
- for ( USHORT nFactory = 0; nFactory < rFactories.Count(); ++nFactory )
+ for ( sal_uInt16 nFactory = 0; nFactory < rFactories.Count(); ++nFactory )
if ( rFactories[nFactory]->nTypeId == aSlotType &&
( ( rFactories[nFactory]->nSlotId == 0 ) ||
( rFactories[nFactory]->nSlotId == nSlotID) ) )
diff --git a/sfx2/source/toolbox/imgmgr.cxx b/sfx2/source/toolbox/imgmgr.cxx
index 3f5c21a264bc..9d1031034a7a 100644..100755
--- a/sfx2/source/toolbox/imgmgr.cxx
+++ b/sfx2/source/toolbox/imgmgr.cxx
@@ -32,10 +32,10 @@
#include <stdio.h>
#include <boost/unordered_map.hpp>
-#include "imgmgr.hxx"
+#include "sfx2/imgmgr.hxx"
#include <sfx2/sfx.hrc>
#include <sfx2/app.hxx>
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include <sfx2/bindings.hxx>
#include "statcach.hxx"
#include <sfx2/module.hxx>
@@ -54,7 +54,7 @@ const sal_uInt32 IMAGELIST_COUNT = 4; // small, small-hi, large, large-hi
struct ToolBoxInf_Impl
{
ToolBox* pToolBox;
- USHORT nFlags;
+ sal_uInt16 nFlags;
};
class SfxImageManager_Impl
@@ -66,8 +66,8 @@ public:
ImageList* m_pImageList[IMAGELIST_COUNT];
SfxModule* m_pModule;
- ImageList* GetImageList( BOOL bBig );
- Image GetImage( USHORT nId, BOOL bBig );
+ ImageList* GetImageList( bool bBig );
+ Image GetImage( sal_uInt16 nId, bool bBig );
void SetSymbolsSize_Impl( sal_Int16 );
DECL_LINK( OptionsChanged_Impl, void* );
@@ -114,7 +114,7 @@ static SfxImageManager_Impl* GetImageManager( SfxModule* pModule )
}
// Global image list
-static ImageList* GetImageList( BOOL bBig )
+static ImageList* GetImageList( bool bBig )
{
SolarMutexGuard aGuard;
ImageList* rpList = NULL;
@@ -169,7 +169,7 @@ SfxImageManager_Impl::~SfxImageManager_Impl()
//-------------------------------------------------------------------------
-ImageList* SfxImageManager_Impl::GetImageList( BOOL bBig )
+ImageList* SfxImageManager_Impl::GetImageList( bool bBig )
{
sal_Int32 nIndex = impl_convertBools( bBig );
if ( !m_pImageList[nIndex] )
@@ -185,7 +185,7 @@ ImageList* SfxImageManager_Impl::GetImageList( BOOL bBig )
//-------------------------------------------------------------------------
-Image SfxImageManager_Impl::GetImage( USHORT nId, BOOL bBig )
+Image SfxImageManager_Impl::GetImage( sal_uInt16 nId, bool bBig )
{
ImageList* pImageList = GetImageList( bBig );
if ( pImageList )
@@ -202,7 +202,7 @@ void SfxImageManager_Impl::SetSymbolsSize_Impl( sal_Int16 nNewSymbolsSize )
if ( nNewSymbolsSize != m_nSymbolsSize )
{
m_nSymbolsSize = nNewSymbolsSize;
- BOOL bLarge( m_nSymbolsSize == SFX_SYMBOLS_SIZE_LARGE );
+ sal_Bool bLarge( m_nSymbolsSize == SFX_SYMBOLS_SIZE_LARGE );
for ( sal_uInt32 n=0; n < m_aToolBoxes.size(); n++ )
{
@@ -210,10 +210,10 @@ void SfxImageManager_Impl::SetSymbolsSize_Impl( sal_Int16 nNewSymbolsSize )
if ( pInf->nFlags & SFX_TOOLBOX_CHANGESYMBOLSET )
{
ToolBox *pBox = pInf->pToolBox;
- USHORT nCount = pBox->GetItemCount();
- for ( USHORT nPos=0; nPos<nCount; nPos++ )
+ sal_uInt16 nCount = pBox->GetItemCount();
+ for ( sal_uInt16 nPos=0; nPos<nCount; nPos++ )
{
- USHORT nId = pBox->GetItemId( nPos );
+ sal_uInt16 nId = pBox->GetItemId( nPos );
if ( pBox->GetItemType(nPos) == TOOLBOXITEM_BUTTON )
{
pBox->SetItemImage( nId, GetImage( nId, bLarge ) );
@@ -295,7 +295,7 @@ SfxImageManager* SfxImageManager::GetImageManager( SfxModule* pModule )
//-------------------------------------------------------------------------
-Image SfxImageManager::GetImage( USHORT nId, BOOL bBig ) const
+Image SfxImageManager::GetImage( sal_uInt16 nId, bool bBig ) const
{
ImageList* pImageList = pImp->GetImageList( bBig );
if ( pImageList && pImageList->HasImageAtPos( nId ) )
@@ -305,15 +305,15 @@ Image SfxImageManager::GetImage( USHORT nId, BOOL bBig ) const
//-------------------------------------------------------------------------
-Image SfxImageManager::GetImage( USHORT nId ) const
+Image SfxImageManager::GetImage( sal_uInt16 nId ) const
{
- BOOL bLarge = SvtMiscOptions().AreCurrentSymbolsLarge();
+ sal_Bool bLarge = SvtMiscOptions().AreCurrentSymbolsLarge();
return GetImage( nId, bLarge );
}
//-------------------------------------------------------------------------
-Image SfxImageManager::SeekImage( USHORT nId, BOOL bBig ) const
+Image SfxImageManager::SeekImage( sal_uInt16 nId, bool bBig ) const
{
sal_Bool bGlobal = ( pImp->m_pModule == 0 );
ImageList* pImageList = pImp->GetImageList( bBig );
@@ -330,15 +330,15 @@ Image SfxImageManager::SeekImage( USHORT nId, BOOL bBig ) const
//-------------------------------------------------------------------------
-Image SfxImageManager::SeekImage( USHORT nId ) const
+Image SfxImageManager::SeekImage( sal_uInt16 nId ) const
{
- BOOL bLarge = SvtMiscOptions().AreCurrentSymbolsLarge();
+ sal_Bool bLarge = SvtMiscOptions().AreCurrentSymbolsLarge();
return SeekImage( nId, bLarge );
}
//-------------------------------------------------------------------------
-void SfxImageManager::RegisterToolBox( ToolBox *pBox, USHORT nFlags )
+void SfxImageManager::RegisterToolBox( ToolBox *pBox, sal_uInt16 nFlags )
{
SolarMutexGuard aGuard;
@@ -367,21 +367,21 @@ void SfxImageManager::ReleaseToolBox( ToolBox *pBox )
//-------------------------------------------------------------------------
-void SfxImageManager::SetImages( ToolBox& rToolBox, BOOL bLarge )
+void SfxImageManager::SetImages( ToolBox& rToolBox, bool bLarge )
{
SetImagesForceSize( rToolBox, bLarge );
}
//-------------------------------------------------------------------------
-void SfxImageManager::SetImagesForceSize( ToolBox& rToolBox, BOOL bLarge )
+void SfxImageManager::SetImagesForceSize( ToolBox& rToolBox, bool bLarge )
{
ImageList* pImageList = pImp->GetImageList( bLarge );
- USHORT nCount = rToolBox.GetItemCount();
- for (USHORT n=0; n<nCount; n++)
+ sal_uInt16 nCount = rToolBox.GetItemCount();
+ for (sal_uInt16 n=0; n<nCount; n++)
{
- USHORT nId = rToolBox.GetItemId(n);
+ sal_uInt16 nId = rToolBox.GetItemId(n);
switch ( rToolBox.GetItemType(n) )
{
case TOOLBOXITEM_BUTTON:
@@ -403,7 +403,7 @@ void SfxImageManager::SetImagesForceSize( ToolBox& rToolBox, BOOL bLarge )
void SfxImageManager::SetImages( ToolBox& rToolBox )
{
- BOOL bLarge = ( pImp->m_nSymbolsSize == SFX_SYMBOLS_SIZE_LARGE );
+ sal_Bool bLarge = ( pImp->m_nSymbolsSize == SFX_SYMBOLS_SIZE_LARGE );
SetImagesForceSize( rToolBox, bLarge );
}
diff --git a/sfx2/source/toolbox/makefile.mk b/sfx2/source/toolbox/makefile.mk
deleted file mode 100644
index ce4f011e6044..000000000000
--- a/sfx2/source/toolbox/makefile.mk
+++ /dev/null
@@ -1,48 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..
-
-PRJNAME=sfx2
-TARGET=toolbox
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Files --------------------------------------------------------
-
-SLOFILES = \
- $(SLO)$/tbxitem.obj \
- $(SLO)$/imgmgr.obj
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx
index 995924ede6b0..344bb3a7bc43 100644..100755
--- a/sfx2/source/toolbox/tbxitem.cxx
+++ b/sfx2/source/toolbox/tbxitem.cxx
@@ -85,9 +85,8 @@
#include <sfx2/viewfrm.hxx>
#include "arrdecl.hxx"
#include "sfxtypes.hxx"
-#include <sfx2/macrconf.hxx>
#include <sfx2/genlink.hxx>
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include <sfx2/sfx.hrc>
#include <sfx2/module.hxx>
#include <sfx2/docfile.hxx>
@@ -98,11 +97,11 @@
#include <sfx2/unoctitm.hxx>
#include "helpid.hrc"
#include "workwin.hxx"
-#include "imgmgr.hxx"
+#include "sfx2/imgmgr.hxx"
#include "virtmenu.hxx"
#include <sfx2/viewfrm.hxx>
#include <sfx2/module.hxx>
-#include "imagemgr.hxx"
+#include "sfx2/imagemgr.hxx"
#include <comphelper/uieventslogger.hxx>
#include <com/sun/star/frame/XModuleManager.hpp>
@@ -119,7 +118,7 @@ using namespace ::com::sun::star::ui;
//====================================================================
-SFX_IMPL_TOOLBOX_CONTROL_ARG(SfxToolBoxControl, SfxStringItem, TRUE);
+SFX_IMPL_TOOLBOX_CONTROL_ARG(SfxToolBoxControl, SfxStringItem, sal_True);
SFX_IMPL_TOOLBOX_CONTROL(SfxAppToolBoxControl_Impl, SfxStringItem);
static Window* GetTopMostParentSystemWindow( Window* pWindow )
@@ -190,7 +189,7 @@ svt::ToolboxController* SAL_CALL SfxToolBoxControllerFactory( const Reference< X
const SfxSlot* pSlot = pSlotPool->GetUnoSlot( aTargetURL.Path );
if ( pSlot )
{
- USHORT nSlotId = pSlot->GetSlotId();
+ sal_uInt16 nSlotId = pSlot->GetSlotId();
if ( nSlotId > 0 )
return SfxToolBoxControl::CreateControl( nSlotId, nID, pToolbox, pModule );
}
@@ -201,11 +200,11 @@ svt::ToolboxController* SAL_CALL SfxToolBoxControllerFactory( const Reference< X
struct SfxToolBoxControl_Impl
{
ToolBox* pBox;
- BOOL bShowString;
- USHORT nSelectModifier;
+ sal_Bool bShowString;
+ sal_uInt16 nSelectModifier;
SfxTbxCtrlFactory* pFact;
- USHORT nTbxId;
- USHORT nSlotId;
+ sal_uInt16 nTbxId;
+ sal_uInt16 nSlotId;
SfxPopupWindow* mpFloatingWindow;
SfxPopupWindow* mpPopupWindow;
Reference< XUIElement > mxUIElement;
@@ -235,10 +234,10 @@ IMPL_LINK( SfxToolBoxControl_Impl, WindowEventListener, VclSimpleEvent*, pEvent
//--------------------------------------------------------------------
SfxToolBoxControl::SfxToolBoxControl(
- USHORT nSlotID,
- USHORT nID,
+ sal_uInt16 nSlotID,
+ sal_uInt16 nID,
ToolBox& rBox,
- BOOL bShowStringItems )
+ sal_Bool bShowStringItems )
: svt::ToolboxController()
{
pImpl = new SfxToolBoxControl_Impl;
@@ -322,7 +321,7 @@ void SfxToolBoxControl::RegisterToolBoxControl( SfxModule* pMod, SfxTbxCtrlFacto
SFX_APP()->RegisterToolBoxControl_Impl( pMod, pFact );
}
-SfxToolBoxControl* SfxToolBoxControl::CreateControl( USHORT nSlotId, USHORT nTbxId, ToolBox *pBox, SfxModule* pMod )
+SfxToolBoxControl* SfxToolBoxControl::CreateControl( sal_uInt16 nSlotId, sal_uInt16 nTbxId, ToolBox *pBox, SfxModule* pMod )
{
SolarMutexGuard aGuard;
@@ -343,8 +342,8 @@ SfxToolBoxControl* SfxToolBoxControl::CreateControl( USHORT nSlotId, USHORT nTbx
if ( pFactories )
{
SfxTbxCtrlFactArr_Impl &rFactories = *pFactories;
- USHORT nFactory;
- const USHORT nCount = rFactories.Count();
+ sal_uInt16 nFactory;
+ const sal_uInt16 nCount = rFactories.Count();
// search for a factory with the given slot id
for( nFactory = 0; nFactory < nCount; ++nFactory )
@@ -370,8 +369,8 @@ SfxToolBoxControl* SfxToolBoxControl::CreateControl( USHORT nSlotId, USHORT nTbx
}
SfxTbxCtrlFactArr_Impl &rFactories = pApp->GetTbxCtrlFactories_Impl();
- USHORT nFactory;
- const USHORT nCount = rFactories.Count();
+ sal_uInt16 nFactory;
+ const sal_uInt16 nCount = rFactories.Count();
for( nFactory = 0; nFactory < nCount; ++nFactory )
if( (rFactories[nFactory]->nTypeId == aSlotType) && (rFactories[nFactory]->nSlotId == nSlotId) )
@@ -554,7 +553,7 @@ throw ( ::com::sun::star::uno::RuntimeException )
}
}
- USHORT nSlotId = 0;
+ sal_uInt16 nSlotId = 0;
SfxSlotPool& rPool = SfxSlotPool::GetSlotPool( pViewFrame );
const SfxSlot* pSlot = rPool.GetUnoSlot( rEvent.FeatureURL.Path );
if ( pSlot )
@@ -662,7 +661,7 @@ void SAL_CALL SfxToolBoxControl::updateImage() throw (::com::sun::star::uno::Run
void SAL_CALL SfxToolBoxControl::execute( sal_Int16 KeyModifier ) throw (::com::sun::star::uno::RuntimeException)
{
SolarMutexGuard aGuard;
- Select( (USHORT)KeyModifier );
+ Select( (sal_uInt16)KeyModifier );
}
void SAL_CALL SfxToolBoxControl::click() throw (::com::sun::star::uno::RuntimeException)
{
@@ -816,7 +815,7 @@ void SfxToolBoxControl::createAndPositionSubToolBar( const ::rtl::OUString& rSub
{
static WeakReference< XUIElementFactory > xWeakUIElementFactory;
- USHORT nItemId = pImpl->pBox->GetDownItemId();
+ sal_uInt16 nItemId = pImpl->pBox->GetDownItemId();
if ( !nItemId )
return;
@@ -951,7 +950,7 @@ IMPL_LINK( SfxToolBoxControl, ClosePopupWindow, SfxPopupWindow *, pWindow )
void SfxToolBoxControl::StateChanged
(
- USHORT nId,
+ sal_uInt16 nId,
SfxItemState eState,
const SfxPoolItem* pState
)
@@ -965,7 +964,7 @@ void SfxToolBoxControl::StateChanged
// enabled/disabled-Flag correcting the lump sum
pImpl->pBox->EnableItem( GetId(), eState != SFX_ITEM_DISABLED );
- USHORT nItemBits = pImpl->pBox->GetItemBits( GetId() );
+ sal_uInt16 nItemBits = pImpl->pBox->GetItemBits( GetId() );
nItemBits &= ~TIB_CHECKABLE;
TriState eTri = STATE_NOCHECK;
switch ( eState )
@@ -1005,15 +1004,15 @@ void SfxToolBoxControl::StateChanged
//--------------------------------------------------------------------
-void SfxToolBoxControl::Select( USHORT nModifier )
+void SfxToolBoxControl::Select( sal_uInt16 nModifier )
{
pImpl->nSelectModifier = nModifier;
- Select( BOOL((nModifier & KEY_MOD1)!=0) );
+ Select( sal_Bool((nModifier & KEY_MOD1)!=0) );
}
//--------------------------------------------------------------------
-void SfxToolBoxControl::Select( BOOL /*bMod1*/ )
+void SfxToolBoxControl::Select( sal_Bool /*bMod1*/ )
{
if(::comphelper::UiEventsLogger::isEnabled()) //#i88653# #i102805#
{
@@ -1124,7 +1123,7 @@ throw ( ::com::sun::star::uno::RuntimeException )
}
}
- USHORT nSlotId = 0;
+ sal_uInt16 nSlotId = 0;
SfxSlotPool& rPool = SfxSlotPool::GetSlotPool( pViewFrame );
const SfxSlot* pSlot = rPool.GetUnoSlot( rEvent.FeatureURL.Path );
if ( pSlot )
@@ -1212,12 +1211,12 @@ throw ( ::com::sun::star::uno::RuntimeException )
//--------------------------------------------------------------------
SfxPopupWindow::SfxPopupWindow(
- USHORT nId,
+ sal_uInt16 nId,
const Reference< XFrame >& rFrame,
WinBits nBits ) :
FloatingWindow( SFX_APP()->GetTopWindow(), nBits )
- , m_bFloating(FALSE)
- , m_bCascading( FALSE )
+ , m_bFloating(sal_False)
+ , m_bCascading( sal_False )
, m_nId( nId )
, m_xFrame( rFrame )
, m_pStatusListener( 0 )
@@ -1232,12 +1231,12 @@ SfxPopupWindow::SfxPopupWindow(
//--------------------------------------------------------------------
SfxPopupWindow::SfxPopupWindow(
- USHORT nId,
+ sal_uInt16 nId,
const Reference< XFrame >& rFrame,
const ResId &rId ) :
FloatingWindow( SFX_APP()->GetTopWindow(), rId )
- , m_bFloating(FALSE)
- , m_bCascading( FALSE )
+ , m_bFloating(sal_False)
+ , m_bCascading( sal_False )
, m_nId( nId )
, m_xFrame( rFrame )
, m_pStatusListener( 0 )
@@ -1252,13 +1251,13 @@ SfxPopupWindow::SfxPopupWindow(
//--------------------------------------------------------------------
SfxPopupWindow::SfxPopupWindow(
- USHORT nId,
+ sal_uInt16 nId,
const Reference< XFrame >& rFrame,
Window* pParentWindow,
WinBits nBits ) :
FloatingWindow( pParentWindow, nBits )
- , m_bFloating(FALSE)
- , m_bCascading( FALSE )
+ , m_bFloating(sal_False)
+ , m_bCascading( sal_False )
, m_nId( nId )
, m_xFrame( rFrame )
, m_pStatusListener( 0 )
@@ -1273,13 +1272,13 @@ SfxPopupWindow::SfxPopupWindow(
//--------------------------------------------------------------------
SfxPopupWindow::SfxPopupWindow(
- USHORT nId,
+ sal_uInt16 nId,
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,
Window* pParentWindow,
const ResId &rId ) :
FloatingWindow( pParentWindow, rId )
- , m_bFloating(FALSE)
- , m_bCascading( FALSE )
+ , m_bFloating(sal_False)
+ , m_bCascading( sal_False )
, m_nId( nId )
, m_xFrame( rFrame )
, m_pStatusListener( 0 )
@@ -1370,13 +1369,13 @@ void SfxPopupWindow::UpdateStatus( const rtl::OUString& rCommandURL )
//--------------------------------------------------------------------
-BOOL SfxPopupWindow::Close()
+sal_Bool SfxPopupWindow::Close()
{
- m_bFloating = FALSE;
+ m_bFloating = sal_False;
FloatingWindow::Close();
Delete(0);
- return TRUE;
+ return sal_True;
}
//--------------------------------------------------------------------
@@ -1390,7 +1389,7 @@ void SfxPopupWindow::PopupModeEnd()
{
// was teared-off
DeleteFloatingWindow();
- m_bFloating = TRUE;
+ m_bFloating = sal_True;
}
else
Close();
@@ -1411,14 +1410,14 @@ void SfxPopupWindow::DeleteFloatingWindow()
void SfxPopupWindow::MouseMove( const ::MouseEvent& rMEvt )
{
- if ( m_bCascading == FALSE )
+ if ( m_bCascading == sal_False )
FloatingWindow::MouseMove( rMEvt );
else
{
// Forward MouseMove-Event to Children
::Point aPos = rMEvt.GetPosPixel();
::Point aScrPos = OutputToScreenPixel( aPos );
- USHORT i = 0;
+ sal_uInt16 i = 0;
Window* pWindow = GetChild( i );
while ( pWindow )
{
@@ -1437,12 +1436,12 @@ void SfxPopupWindow::MouseMove( const ::MouseEvent& rMEvt )
void SfxPopupWindow::StartCascading()
{
- m_bCascading= TRUE;
+ m_bCascading= sal_True;
}
void SfxPopupWindow::EndCascading()
{
- m_bCascading = FALSE;
+ m_bCascading = sal_False;
}
//--------------------------------------------------------------------
@@ -1466,7 +1465,7 @@ SfxPopupWindow* SfxPopupWindow::Clone() const
//--------------------------------------------------------------------
void SfxPopupWindow::StateChanged(
- USHORT /*nSID*/,
+ sal_uInt16 /*nSID*/,
SfxItemState eState,
const SfxPoolItem* /*pState*/ )
/* [Description]
@@ -1486,7 +1485,7 @@ void SfxPopupWindow::StateChanged(
}
else if ( m_bFloating )
{
- Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE );
+ Show( sal_True, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE );
}
}
@@ -1502,9 +1501,9 @@ IMPL_LINK( SfxPopupWindow, Delete, void *, EMPTYARG )
//--------------------------------------------------------------------
-SfxAppToolBoxControl_Impl::SfxAppToolBoxControl_Impl( USHORT nSlotId, USHORT nId, ToolBox& rBox )
+SfxAppToolBoxControl_Impl::SfxAppToolBoxControl_Impl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rBox )
: SfxToolBoxControl( nSlotId, nId, rBox )
- , bBigImages( FALSE )
+ , bBigImages( sal_False )
, pMenu( 0 )
{
rBox.SetHelpId( nId, HID_TBXCONTROL_FILENEW );
@@ -1528,8 +1527,8 @@ SfxAppToolBoxControl_Impl::~SfxAppToolBoxControl_Impl()
it return the existing state of the given URL in the popupmenu of this toolbox control.
If the given URL can be located as an action command of one menu item of the
- popup menu of this control, we return TRUE. Otherwhise we return FALSE.
- Further we return a fallback URL, in case we have to return FALSE. Because
+ popup menu of this control, we return sal_True. Otherwhise we return sal_False.
+ Further we return a fallback URL, in case we have to return sal_False. Because
the outside code must select a valid item of the popup menu everytime ...
and we define it here. By the way this m ethod was written to handle
error situations gracefully. E.g. it can be called during creation time
@@ -1550,34 +1549,34 @@ SfxAppToolBoxControl_Impl::~SfxAppToolBoxControl_Impl()
@param pImage
contains the image of the menu for the URL.
- @return TRUE - if URL could be located as an item of the popup menu.
- FALSE - otherwhise.
+ @return sal_True - if URL could be located as an item of the popup menu.
+ sal_False - otherwhise.
*/
-BOOL Impl_ExistURLInMenu( const PopupMenu *pMenu ,
+sal_Bool Impl_ExistURLInMenu( const PopupMenu *pMenu ,
String &sURL ,
String *pFallback ,
Image *pImage )
{
- BOOL bValidFallback = FALSE;
+ sal_Bool bValidFallback = sal_False;
if (pMenu && sURL.Len())
{
- USHORT c = pMenu->GetItemCount();
- for (USHORT p=0; p<c; ++p)
+ sal_uInt16 c = pMenu->GetItemCount();
+ for (sal_uInt16 p=0; p<c; ++p)
{
- USHORT nId = pMenu->GetItemId(p);
+ sal_uInt16 nId = pMenu->GetItemId(p);
String aCmd( pMenu->GetItemCommand(nId) );
if (!bValidFallback && aCmd.Len())
{
*pFallback = aCmd;
- bValidFallback = TRUE;
+ bValidFallback = sal_True;
}
if (aCmd.Search(sURL)==0)//match even if the menu command is more detailed (maybe an additional query) #i28667#
{
sURL = aCmd;
*pImage = pMenu->GetItemImage( nId );
- return TRUE;
+ return sal_True;
}
}
}
@@ -1588,7 +1587,7 @@ BOOL Impl_ExistURLInMenu( const PopupMenu *pMenu ,
*pFallback += String(SvtModuleOptions().GetDefaultModuleName());
}
- return FALSE;
+ return sal_False;
}
long Select_Impl( void* pHdl, void* pVoid );
@@ -1611,15 +1610,15 @@ SfxPopupWindow* SfxAppToolBoxControl_Impl::CreatePopupWindow()
{
pMenu->SetSelectHdl( Link( NULL, Select_Impl ) );
pMenu->SetActivateHdl( LINK( this, SfxAppToolBoxControl_Impl, Activate ));
- rBox.SetItemDown( GetId(), TRUE );
- USHORT nSelected = pMenu->Execute( &rBox, aRect, POPUPMENU_EXECUTE_DOWN );
+ rBox.SetItemDown( GetId(), sal_True );
+ sal_uInt16 nSelected = pMenu->Execute( &rBox, aRect, POPUPMENU_EXECUTE_DOWN );
if ( nSelected )
{
aLastURL = pMenu->GetItemCommand( nSelected );
SetImage( pMenu->GetItemCommand( nSelected ) );
}
- rBox.SetItemDown( GetId(), FALSE );
+ rBox.SetItemDown( GetId(), sal_False );
}
return 0;
@@ -1632,11 +1631,11 @@ void SfxAppToolBoxControl_Impl::SetImage( const String &rURL )
String aURL = rURL;
String sFallback;
Image aMenuImage;
- BOOL bValid = Impl_ExistURLInMenu(pMenu,aURL,&sFallback,&aMenuImage);
+ sal_Bool bValid = Impl_ExistURLInMenu(pMenu,aURL,&sFallback,&aMenuImage);
if (!bValid)
aURL = sFallback;
- BOOL bBig = SvtMiscOptions().AreCurrentSymbolsLarge();
+ sal_Bool bBig = SvtMiscOptions().AreCurrentSymbolsLarge();
Image aImage = SvFileInformationManager::GetImageNoDefault( INetURLObject( aURL ), bBig );
if ( !aImage )
aImage = !!aMenuImage ? aMenuImage :
@@ -1655,7 +1654,7 @@ void SfxAppToolBoxControl_Impl::SetImage( const String &rURL )
void SfxAppToolBoxControl_Impl::StateChanged
(
- USHORT nSlotId,
+ sal_uInt16 nSlotId,
SfxItemState eState,
const SfxPoolItem* pState
)
@@ -1685,7 +1684,7 @@ void SfxAppToolBoxControl_Impl::StateChanged
//--------------------------------------------------------------------
-void SfxAppToolBoxControl_Impl::Select( BOOL bMod1 )
+void SfxAppToolBoxControl_Impl::Select( sal_Bool bMod1 )
{
if( aLastURL.Len() )
{
@@ -1778,7 +1777,7 @@ long Select_Impl( void* /*pHdl*/, void* pVoid )
Application::PostUserEvent( STATIC_LINK( 0, SfxAppToolBoxControl_Impl, ExecuteHdl_Impl), pExecuteInfo );
}
- return TRUE;
+ return sal_True;
}
IMPL_LINK( SfxAppToolBoxControl_Impl, Activate, Menu *, pActMenu )
@@ -1786,8 +1785,8 @@ IMPL_LINK( SfxAppToolBoxControl_Impl, Activate, Menu *, pActMenu )
if ( pActMenu )
{
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
- ULONG nSymbolsStyle = rSettings.GetSymbolsStyle();
- BOOL bShowMenuImages = rSettings.GetUseImagesInMenus();
+ sal_uIntPtr nSymbolsStyle = rSettings.GetSymbolsStyle();
+ sal_Bool bShowMenuImages = rSettings.GetUseImagesInMenus();
if (( nSymbolsStyle != m_nSymbolsStyle ) ||
( bShowMenuImages != m_bShowMenuImages ))
@@ -1795,10 +1794,10 @@ IMPL_LINK( SfxAppToolBoxControl_Impl, Activate, Menu *, pActMenu )
m_nSymbolsStyle = nSymbolsStyle;
m_bShowMenuImages = bShowMenuImages;
- USHORT nCount = pActMenu->GetItemCount();
- for ( USHORT nSVPos = 0; nSVPos < nCount; nSVPos++ )
+ sal_uInt16 nCount = pActMenu->GetItemCount();
+ for ( sal_uInt16 nSVPos = 0; nSVPos < nCount; nSVPos++ )
{
- USHORT nId = pActMenu->GetItemId( nSVPos );
+ sal_uInt16 nId = pActMenu->GetItemId( nSVPos );
if ( pActMenu->GetItemType( nSVPos ) != MENUITEM_SEPARATOR )
{
if ( bShowMenuImages )
@@ -1814,7 +1813,7 @@ IMPL_LINK( SfxAppToolBoxControl_Impl, Activate, Menu *, pActMenu )
if ( aImageId.getLength() > 0 )
{
Reference< ::com::sun::star::frame::XFrame > xFrame;
- Image aImage = GetImage( xFrame, aImageId, FALSE );
+ Image aImage = GetImage( xFrame, aImageId, false );
if ( !!aImage )
{
bImageSet = sal_True;
@@ -1826,7 +1825,7 @@ IMPL_LINK( SfxAppToolBoxControl_Impl, Activate, Menu *, pActMenu )
if ( !bImageSet && aCmd.Len() )
{
Image aImage = SvFileInformationManager::GetImage(
- INetURLObject(aCmd), FALSE );
+ INetURLObject(aCmd), false );
if ( !!aImage )
pActMenu->SetItemImage( nId, aImage );
}
@@ -1837,10 +1836,10 @@ IMPL_LINK( SfxAppToolBoxControl_Impl, Activate, Menu *, pActMenu )
}
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
//--------------------------------------------------------------------
diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx
index a4c65ca94eca..42ab08eed43a 100644..100755
--- a/sfx2/source/view/frame.cxx
+++ b/sfx2/source/view/frame.cxx
@@ -135,14 +135,14 @@ SfxFrame::~SfxFrame()
sal_Bool SfxFrame::DoClose()
{
// Actually, one more PrepareClose is still needed!
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( !pImp->bClosing )
{
pImp->bClosing = sal_True;
CancelTransfers();
// now close frame; it will be deleted if this call is successful, so don't use any members after that!
- bRet = TRUE;
+ bRet = sal_True;
try
{
Reference< XCloseable > xCloseable ( pImp->xFrame, UNO_QUERY );
@@ -160,7 +160,7 @@ sal_Bool SfxFrame::DoClose()
catch( ::com::sun::star::util::CloseVetoException& )
{
pImp->bClosing = sal_False;
- bRet = FALSE;
+ bRet = sal_False;
}
catch( ::com::sun::star::lang::DisposedException& )
{
@@ -224,7 +224,7 @@ sal_uInt16 SfxFrame::PrepareClose_Impl( sal_Bool bUI, sal_Bool bForBrowsing )
bOther = ( &pFrame->GetFrame() != this );
}
- SFX_APP()->NotifyEvent( SfxEventHint(SFX_EVENT_PREPARECLOSEVIEW, GlobalEventConfig::GetEventName( STR_EVENT_PREPARECLOSEVIEW ), pCur) );
+ SFX_APP()->NotifyEvent( SfxViewEventHint(SFX_EVENT_PREPARECLOSEVIEW, GlobalEventConfig::GetEventName( STR_EVENT_PREPARECLOSEVIEW ), pCur, GetController() ) );
if ( bOther )
// if there are other views only the current view of this frame must be asked
@@ -237,7 +237,7 @@ sal_uInt16 SfxFrame::PrepareClose_Impl( sal_Bool bUI, sal_Bool bForBrowsing )
if ( nRet == RET_OK )
{
// if this frame has child frames, ask them too
- for( USHORT nPos = GetChildFrameCount(); nRet == RET_OK && nPos--; )
+ for( sal_uInt16 nPos = GetChildFrameCount(); nRet == RET_OK && nPos--; )
nRet = pChildArr->GetObject( nPos )->PrepareClose_Impl( bUI, bForBrowsing );
}
@@ -286,7 +286,7 @@ sal_Bool SfxFrame::IsClosing_Impl() const
void SfxFrame::SetIsClosing_Impl()
{
- pImp->bClosing = TRUE;
+ pImp->bClosing = sal_True;
}
sal_uInt16 SfxFrame::GetChildFrameCount() const
@@ -583,18 +583,18 @@ SfxPoolItem* SfxFrameItem::Clone( SfxItemPool *) const
return pNew;
}
-bool SfxFrameItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE ) const
+bool SfxFrameItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 ) const
{
if ( wFrame )
{
rVal <<= wFrame->GetFrameInterface();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-bool SfxFrameItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE )
+bool SfxFrameItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 )
{
Reference < XFrame > xFrame;
if ( (rVal >>= xFrame) && xFrame.is() )
@@ -605,15 +605,15 @@ bool SfxFrameItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE )
if ( pFr->GetFrameInterface() == xFrame )
{
wFrame = pFrame = pFr;
- return TRUE;
+ return sal_True;
}
pFr = SfxFrame::GetNext( *pFr );
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
@@ -634,13 +634,13 @@ SfxPoolItem* SfxUsrAnyItem::Clone( SfxItemPool *) const
return new SfxUsrAnyItem( Which(), aValue );
}
-bool SfxUsrAnyItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) const
+bool SfxUsrAnyItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
{
rVal = aValue;
return sal_True;
}
-bool SfxUsrAnyItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ )
+bool SfxUsrAnyItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
{
aValue = rVal;
return sal_True;
@@ -668,13 +668,13 @@ SfxPoolItem* SfxUnoFrameItem::Clone( SfxItemPool* ) const
return new SfxUnoFrameItem( Which(), m_xFrame );
}
-bool SfxUnoFrameItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) const
+bool SfxUnoFrameItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
{
rVal <<= m_xFrame;
return sal_True;
}
-bool SfxUnoFrameItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ )
+bool SfxUnoFrameItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
{
return ( rVal >>= m_xFrame );
}
@@ -969,7 +969,7 @@ SfxFrame* SfxFrame::GetFirst()
SfxFrame* SfxFrame::GetNext( SfxFrame& rFrame )
{
- USHORT nPos = pFramesArr_Impl->GetPos( &rFrame );
+ sal_uInt16 nPos = pFramesArr_Impl->GetPos( &rFrame );
if ( nPos+1 < pFramesArr_Impl->Count() )
return pFramesArr_Impl->GetObject(nPos+1);
else
diff --git a/sfx2/source/view/frame2.cxx b/sfx2/source/view/frame2.cxx
index f263da6758a4..72843c57789e 100644..100755
--- a/sfx2/source/view/frame2.cxx
+++ b/sfx2/source/view/frame2.cxx
@@ -31,7 +31,7 @@
#include "impframe.hxx"
#include "objshimp.hxx"
-#include "sfxhelp.hxx"
+#include "sfx2/sfxhelp.hxx"
#include "workwin.hxx"
#include "sfx2/app.hxx"
@@ -123,20 +123,20 @@ long SfxFrameWindow_Impl::Notify( NotifyEvent& rNEvt )
if ( pView->GetViewShell() && !pView->GetViewShell()->GetUIActiveIPClient_Impl() && !pFrame->IsInPlace() )
{
OSL_TRACE("SfxFrame: GotFocus");
- pView->MakeActive_Impl( FALSE );
+ pView->MakeActive_Impl( sal_False );
}
// TODO/LATER: do we still need this code?
Window* pWindow = rNEvt.GetWindow();
- ULONG nHelpId = 0;
- while ( !nHelpId && pWindow )
+ rtl::OString sHelpId;
+ while ( !sHelpId.getLength() && pWindow )
{
- nHelpId = pWindow->GetHelpId();
+ sHelpId = pWindow->GetHelpId();
pWindow = pWindow->GetParent();
}
- if ( nHelpId )
- SfxHelp::OpenHelpAgent( pFrame, nHelpId );
+ if ( sHelpId.getLength() )
+ SfxHelp::OpenHelpAgent( pFrame, sHelpId );
// if focus was on an external window, the clipboard content might have been changed
pView->GetBindings().Invalidate( SID_PASTE );
@@ -146,7 +146,7 @@ long SfxFrameWindow_Impl::Notify( NotifyEvent& rNEvt )
else if( rNEvt.GetType() == EVENT_KEYINPUT )
{
if ( pView->GetViewShell()->KeyInput( *rNEvt.GetKeyEvent() ) )
- return TRUE;
+ return sal_True;
}
else if ( rNEvt.GetType() == EVENT_EXECUTEDIALOG /*|| rNEvt.GetType() == EVENT_INPUTDISABLE*/ )
{
@@ -165,7 +165,7 @@ long SfxFrameWindow_Impl::Notify( NotifyEvent& rNEvt )
long SfxFrameWindow_Impl::PreNotify( NotifyEvent& rNEvt )
{
- USHORT nType = rNEvt.GetType();
+ sal_uInt16 nType = rNEvt.GetType();
if ( nType == EVENT_KEYINPUT || nType == EVENT_KEYUP )
{
SfxViewFrame* pView = pFrame->GetCurrentViewFrame();
@@ -200,7 +200,7 @@ long SfxFrameWindow_Impl::PreNotify( NotifyEvent& rNEvt )
void SfxFrameWindow_Impl::GetFocus()
{
if ( pFrame && !pFrame->IsClosing_Impl() && pFrame->GetCurrentViewFrame() && pFrame->GetFrameInterface().is() )
- pFrame->GetCurrentViewFrame()->MakeActive_Impl( TRUE );
+ pFrame->GetCurrentViewFrame()->MakeActive_Impl( sal_True );
}
void SfxFrameWindow_Impl::Resize()
@@ -213,7 +213,7 @@ void SfxFrameWindow_Impl::StateChanged( StateChangedType nStateChange )
{
if ( nStateChange == STATE_CHANGE_INITSHOW )
{
- pFrame->pImp->bHidden = FALSE;
+ pFrame->pImp->bHidden = sal_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
@@ -251,7 +251,7 @@ Reference < XFrame > SfxFrame::CreateBlankFrame()
return xFrame;
}
-SfxFrame* SfxFrame::Create( SfxObjectShell& rDoc, Window& rWindow, USHORT nViewId, bool bHidden )
+SfxFrame* SfxFrame::Create( SfxObjectShell& rDoc, Window& rWindow, sal_uInt16 nViewId, bool bHidden )
{
SfxFrame* pFrame = NULL;
try
@@ -342,7 +342,7 @@ SfxFrame::SfxFrame( Window& i_rContainerWindow, bool i_bHidden )
pWindow->Show();
}
-void SfxFrame::SetPresentationMode( BOOL bSet )
+void SfxFrame::SetPresentationMode( sal_Bool bSet )
{
if ( GetCurrentViewFrame() )
GetCurrentViewFrame()->GetWindow().SetBorderStyle( bSet ? WINDOW_BORDER_NOBORDER : WINDOW_BORDER_NORMAL );
@@ -363,7 +363,7 @@ void SfxFrame::SetPresentationMode( BOOL bSet )
if ( GetWorkWindow_Impl() )
GetWorkWindow_Impl()->SetDockingAllowed( !bSet );
if ( GetCurrentViewFrame() )
- GetCurrentViewFrame()->GetDispatcher()->Update_Impl( TRUE );
+ GetCurrentViewFrame()->GetDispatcher()->Update_Impl( sal_True );
}
SystemWindow* SfxFrame::GetSystemWindow() const
@@ -390,14 +390,14 @@ sal_Bool SfxFrame::Close()
return sal_True;
}
-void SfxFrame::LockResize_Impl( BOOL bLock )
+void SfxFrame::LockResize_Impl( sal_Bool bLock )
{
pImp->bLockResize = bLock;
}
IMPL_LINK( SfxFrameWindow_Impl, CloserHdl, void*, EMPTYARG )
{
- if ( pFrame && !pFrame->PrepareClose_Impl( TRUE ) )
+ if ( pFrame && !pFrame->PrepareClose_Impl( sal_True ) )
return 0L;
if ( pFrame )
@@ -405,7 +405,7 @@ IMPL_LINK( SfxFrameWindow_Impl, CloserHdl, void*, EMPTYARG )
return 0L;
}
-void SfxFrame::SetMenuBarOn_Impl( BOOL bOn )
+void SfxFrame::SetMenuBarOn_Impl( sal_Bool bOn )
{
pImp->bMenuBarOn = bOn;
@@ -429,7 +429,7 @@ void SfxFrame::SetMenuBarOn_Impl( BOOL bOn )
}
}
-BOOL SfxFrame::IsMenuBarOn_Impl() const
+sal_Bool SfxFrame::IsMenuBarOn_Impl() const
{
return pImp->bMenuBarOn;
}
@@ -472,7 +472,7 @@ void SfxFrame::PrepareForDoc_Impl( SfxObjectShell& i_rDoc )
// plugin mode
sal_Int16 nPluginMode = aDocumentArgs.getOrDefault( "PluginMode", sal_Int16( 0 ) );
if ( nPluginMode && ( nPluginMode != 2 ) )
- SetInPlace_Impl( TRUE );
+ SetInPlace_Impl( sal_True );
}
bool SfxFrame::IsMarkedHidden_Impl() const
diff --git a/sfx2/source/view/frmload.cxx b/sfx2/source/view/frmload.cxx
index 75775adf661b..a72b49ad1dc6 100644..100755
--- a/sfx2/source/view/frmload.cxx
+++ b/sfx2/source/view/frmload.cxx
@@ -32,7 +32,6 @@
#include <sal/macros.h>
#include "frmload.hxx"
#include "objshimp.hxx"
-#include "viewfac.hxx"
#include "sfx2/app.hxx"
#include "sfx2/dispatch.hxx"
#include "sfx2/docfac.hxx"
@@ -47,6 +46,7 @@
#include "sfx2/sfxuno.hxx"
#include "sfx2/viewfrm.hxx"
#include "sfx2/viewsh.hxx"
+#include "sfx2/viewfac.hxx"
/** === begin UNO includes === **/
#include <com/sun/star/container/XContainerQuery.hpp>
@@ -218,11 +218,10 @@ const SfxFilter* SfxFrameLoader_Impl::impl_getFilterFromServiceName_nothrow( con
::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();
+ ::framework::RequestFilterSelect aRequest( i_rDocumentURL );
+ i_rxHandler->handle( aRequest.GetRequest() );
+ if( !aRequest.isAbort() )
+ sFilterName = aRequest.getFilter();
}
catch( const Exception& )
{
@@ -255,36 +254,17 @@ namespace
}
// --------------------------------------------------------------------------------------------------------------------
-sal_Bool SfxFrameLoader_Impl::impl_createNewDocWithSlotParam( const USHORT _nSlotID, const Reference< XFrame >& i_rxFrame,
+sal_Bool SfxFrameLoader_Impl::impl_createNewDocWithSlotParam( const sal_uInt16 _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 ) );
+ aRequest.AppendItem( SfxBoolItem( SID_HIDDEN, sal_True ) );
return lcl_getDispatchResult( SFX_APP()->ExecuteSlot( aRequest ) );
}
// --------------------------------------------------------------------------------------------------------------------
-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;
-}
-
-// --------------------------------------------------------------------------------------------------------------------
void SfxFrameLoader_Impl::impl_determineFilter( ::comphelper::NamedValueCollection& io_rDescriptor ) const
{
const ::rtl::OUString sURL = io_rDescriptor.getOrDefault( "URL", ::rtl::OUString() );
@@ -334,9 +314,9 @@ void SfxFrameLoader_Impl::impl_determineFilter( ::comphelper::NamedValueCollecti
}
// --------------------------------------------------------------------------------------------------------------------
-SfxObjectShellLock SfxFrameLoader_Impl::impl_findObjectShell( const Reference< XModel2 >& i_rxDocument ) const
+SfxObjectShellRef SfxFrameLoader_Impl::impl_findObjectShell( const Reference< XModel2 >& i_rxDocument ) const
{
- for ( SfxObjectShell* pDoc = SfxObjectShell::GetFirst( NULL, FALSE ); pDoc; pDoc = SfxObjectShell::GetNext( *pDoc, NULL, FALSE ) )
+ for ( SfxObjectShell* pDoc = SfxObjectShell::GetFirst( NULL, sal_False ); pDoc; pDoc = SfxObjectShell::GetNext( *pDoc, NULL, sal_False ) )
{
if ( i_rxDocument == pDoc->GetModel() )
{
@@ -394,7 +374,7 @@ bool SfxFrameLoader_Impl::impl_determineTemplateDocument( ::comphelper::NamedVal
}
// --------------------------------------------------------------------------------------------------------------------
-USHORT SfxFrameLoader_Impl::impl_findSlotParam( const ::rtl::OUString& i_rFactoryURL ) const
+sal_uInt16 SfxFrameLoader_Impl::impl_findSlotParam( const ::rtl::OUString& i_rFactoryURL ) const
{
::rtl::OUString sSlotParam;
const sal_Int32 nParamPos = i_rFactoryURL.indexOf( '?' );
@@ -407,7 +387,7 @@ USHORT SfxFrameLoader_Impl::impl_findSlotParam( const ::rtl::OUString& i_rFactor
}
if ( sSlotParam.getLength() )
- return USHORT( sSlotParam.toInt32() );
+ return sal_uInt16( sSlotParam.toInt32() );
return 0;
}
@@ -574,7 +554,7 @@ sal_Bool SAL_CALL SfxFrameLoader_Impl::load( const Sequence< PropertyValue >& rA
{
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 );
+ const sal_uInt16 nSlotParam = impl_findSlotParam( sFactory );
if ( nSlotParam != 0 )
{
return impl_createNewDocWithSlotParam( nSlotParam, _rTargetFrame, aDescriptor.getOrDefault( "Hidden", false ) );
@@ -638,15 +618,12 @@ sal_Bool SAL_CALL SfxFrameLoader_Impl::load( const Sequence< PropertyValue >& rA
// 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.
}
// get the SfxObjectShell (still needed at the moment)
- const SfxObjectShellLock xDoc = impl_findObjectShell( xModel );
+ // SfxObjectShellRef is used here ( instead of ...Lock ) since the model is closed below if necessary
+ // SfxObjectShellLock would be even dangerous here, since the lifetime control should be done outside in case of success
+ const SfxObjectShellRef 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
@@ -654,16 +631,6 @@ sal_Bool SAL_CALL SfxFrameLoader_Impl::load( const Sequence< PropertyValue >& rA
const sal_Int16 nViewNo = xDoc->GetFactory().GetViewNo_Impl( nViewId, 0 );
const ::rtl::OUString sViewName( xDoc->GetFactory().GetViewFactory( nViewNo ).GetAPIViewName() );
- // 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;
diff --git a/sfx2/source/view/impframe.hxx b/sfx2/source/view/impframe.hxx
index b49f9dd777a4..b49f9dd777a4 100644..100755
--- a/sfx2/source/view/impframe.hxx
+++ b/sfx2/source/view/impframe.hxx
diff --git a/sfx2/source/view/impviewframe.hxx b/sfx2/source/view/impviewframe.hxx
index a89049751d13..c4b3d081843e 100644..100755
--- a/sfx2/source/view/impviewframe.hxx
+++ b/sfx2/source/view/impviewframe.hxx
@@ -79,13 +79,13 @@ struct SfxViewFrame_Impl
class SfxFrameViewWindow_Impl : public Window
{
- BOOL bActive;
+ sal_Bool bActive;
SfxViewFrame* pFrame;
public:
SfxFrameViewWindow_Impl( SfxViewFrame* p, Window& rParent, WinBits nBits=0 ) :
Window( &rParent, nBits | WB_BORDER | WB_CLIPCHILDREN ),
- bActive( FALSE ),
+ bActive( sal_False ),
pFrame( p )
{
p->GetFrame().GetWindow().SetBorderStyle( WINDOW_BORDER_NOBORDER );
diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx
index a2508c15544c..903e4d35ece8 100644..100755
--- a/sfx2/source/view/ipclient.cxx
+++ b/sfx2/source/view/ipclient.cxx
@@ -221,6 +221,7 @@ void SAL_CALL SfxInPlaceClient_Impl::notifyEvent( const document::EventObject& a
if ( m_pClient && aEvent.EventName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("OnVisAreaChanged")) && m_nAspect != embed::Aspects::MSOLE_ICON )
{
+ m_pClient->FormatChanged(); // for Writer when format of the object is changed with the area
m_pClient->ViewChanged();
m_pClient->Invalidate();
}
@@ -399,7 +400,7 @@ void SAL_CALL SfxInPlaceClient_Impl::activatingUI()
throw uno::RuntimeException();
m_pClient->GetViewShell()->ResetAllClients_Impl(m_pClient);
- m_bUIActive = TRUE;
+ m_bUIActive = sal_True;
m_pClient->GetViewShell()->UIActivating( m_pClient );
}
@@ -423,7 +424,7 @@ void SAL_CALL SfxInPlaceClient_Impl::deactivatedUI()
throw uno::RuntimeException();
m_pClient->GetViewShell()->UIDeactivated( m_pClient );
- m_bUIActive = FALSE;
+ m_bUIActive = sal_False;
}
//--------------------------------------------------------------------
@@ -771,7 +772,7 @@ void SfxInPlaceClient::SetObject( const uno::Reference < embed::XEmbeddedObject
}
//--------------------------------------------------------------------
-BOOL SfxInPlaceClient::SetObjArea( const Rectangle& rArea )
+sal_Bool SfxInPlaceClient::SetObjArea( const Rectangle& rArea )
{
if( rArea != m_pImp->m_aObjArea )
{
@@ -779,10 +780,10 @@ BOOL SfxInPlaceClient::SetObjArea( const Rectangle& rArea )
m_pImp->SizeHasChanged();
Invalidate();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
//--------------------------------------------------------------------
@@ -992,7 +993,7 @@ ErrCode SfxInPlaceClient::DoVerb( long nVerb )
{
if ( m_pViewSh )
- m_pViewSh->GetViewFrame()->GetTopFrame().LockResize_Impl(TRUE);
+ m_pViewSh->GetViewFrame()->GetTopFrame().LockResize_Impl(sal_True);
try
{
m_pImp->m_xObject->setClientSite( m_pImp->m_xClient );
@@ -1042,7 +1043,7 @@ ErrCode SfxInPlaceClient::DoVerb( long nVerb )
if ( m_pViewSh )
{
SfxViewFrame* pFrame = m_pViewSh->GetViewFrame();
- pFrame->GetTopFrame().LockResize_Impl(FALSE);
+ pFrame->GetTopFrame().LockResize_Impl(sal_False);
pFrame->GetTopFrame().Resize();
}
}
@@ -1083,14 +1084,19 @@ void SfxInPlaceClient::MakeVisible()
// dummy implementation
}
+void SfxInPlaceClient::FormatChanged()
+{
+ // dummy implementation
+}
+
void SfxInPlaceClient::DeactivateObject()
{
if ( GetObject().is() )
{
try
{
- m_pImp->m_bUIActive = FALSE;
- BOOL bHasFocus = FALSE;
+ m_pImp->m_bUIActive = sal_False;
+ sal_Bool bHasFocus = sal_False;
uno::Reference< frame::XModel > xModel( m_pImp->m_xObject->getComponent(), uno::UNO_QUERY );
if ( xModel.is() )
{
@@ -1098,12 +1104,12 @@ void SfxInPlaceClient::DeactivateObject()
if ( xController.is() )
{
Window* pWindow = VCLUnoHelper::GetWindow( xController->getFrame()->getContainerWindow() );
- bHasFocus = pWindow->HasChildPathFocus( TRUE );
+ bHasFocus = pWindow->HasChildPathFocus( sal_True );
}
}
if ( m_pViewSh )
- m_pViewSh->GetViewFrame()->GetTopFrame().LockResize_Impl(TRUE);
+ m_pViewSh->GetViewFrame()->GetTopFrame().LockResize_Impl(sal_True);
if ( m_pImp->m_xObject->getStatus( m_pImp->m_nAspect ) & embed::EmbedMisc::MS_EMBED_ACTIVATEWHENVISIBLE )
{
@@ -1125,7 +1131,7 @@ void SfxInPlaceClient::DeactivateObject()
{
SfxViewFrame* pFrame = m_pViewSh->GetViewFrame();
SfxViewFrame::SetViewFrame( pFrame );
- pFrame->GetTopFrame().LockResize_Impl(FALSE);
+ pFrame->GetTopFrame().LockResize_Impl(sal_False);
pFrame->GetTopFrame().Resize();
}
}
@@ -1140,7 +1146,7 @@ void SfxInPlaceClient::ResetObject()
{
try
{
- m_pImp->m_bUIActive = FALSE;
+ m_pImp->m_bUIActive = sal_False;
if ( m_pImp->m_xObject->getStatus( m_pImp->m_nAspect ) & embed::EmbedMisc::MS_EMBED_ACTIVATEWHENVISIBLE )
m_pImp->m_xObject->changeState( embed::EmbedStates::INPLACE_ACTIVE );
else
@@ -1158,7 +1164,7 @@ void SfxInPlaceClient::ResetObject()
}
}
-BOOL SfxInPlaceClient::IsUIActive()
+sal_Bool SfxInPlaceClient::IsUIActive()
{
return m_pImp->m_bUIActive;
}
diff --git a/sfx2/source/view/makefile.mk b/sfx2/source/view/makefile.mk
deleted file mode 100644
index 9c257f4c9f75..000000000000
--- a/sfx2/source/view/makefile.mk
+++ /dev/null
@@ -1,65 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-
-
-PRJ=..$/..
-
-PRJNAME= sfx2
-TARGET= view
-ENABLE_EXCEPTIONS= TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Files --------------------------------------------------------
-
-SRS1NAME=$(TARGET)
-SRC1FILES = \
- view.src
-
-SLOFILES = \
- $(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)$/viewfrm2.obj \
- $(SLO)$/sfxbasecontroller.obj \
- $(SLO)$/userinputinterception.obj
-
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sfx2/source/view/orgmgr.cxx b/sfx2/source/view/orgmgr.cxx
index e54754f611bf..c923135dbdc4 100644..100755
--- a/sfx2/source/view/orgmgr.cxx
+++ b/sfx2/source/view/orgmgr.cxx
@@ -48,7 +48,7 @@
#include "docvor.hxx"
#include "orgmgr.hxx"
#include "sfxtypes.hxx"
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include "view.hrc"
#include <sfx2/docfilt.hxx>
#include "fltfnc.hxx"
@@ -69,12 +69,12 @@ struct _FileListEntry
const CollatorWrapper* pCollator;
SfxObjectShellLock aDocShell; // ObjectShell as reference class
- BOOL bFile; // As File on disk
+ sal_Bool bFile; // As File on disk
// (!= not processed, not loaded as document
// these are not saved!)
- BOOL bOwner; // self-generated
- BOOL bNoName;
- BOOL bOwnFormat;
+ sal_Bool bOwner; // self-generated
+ sal_Bool bNoName;
+ sal_Bool bOwnFormat;
_FileListEntry( const String& rFileName,
const CollatorWrapper* pColl, const String* pTitle = NULL );
@@ -82,7 +82,7 @@ struct _FileListEntry
int operator==( const _FileListEntry &rCmp) const;
int operator< ( const _FileListEntry &rCmp) const;
- BOOL DeleteObjectShell();
+ sal_Bool DeleteObjectShell();
};
//-------------------------------------------------------------------------
@@ -108,10 +108,10 @@ _FileListEntry::_FileListEntry( const String& rFileName,
aFileName ( rFileName ),
pCollator ( pColl ),
- bFile ( FALSE ),
- bOwner ( FALSE ),
- bNoName ( TRUE ),
- bOwnFormat ( TRUE )
+ bFile ( sal_False ),
+ bOwner ( sal_False ),
+ bNoName ( sal_True ),
+ bOwnFormat ( sal_True )
{
if ( pTitle )
aBaseName = *pTitle;
@@ -136,7 +136,7 @@ SV_IMPL_OP_PTRARR_SORT(_SfxObjectList, _FileListEntry*)
//=========================================================================
-BOOL _FileListEntry::DeleteObjectShell()
+sal_Bool _FileListEntry::DeleteObjectShell()
/* [Description]
@@ -148,7 +148,7 @@ BOOL _FileListEntry::DeleteObjectShell()
*/
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if(bOwner && aDocShell.Is() && aDocShell->IsModified())
{
@@ -156,7 +156,7 @@ BOOL _FileListEntry::DeleteObjectShell()
if( bOwnFormat )
{
if(!aDocShell->Save() )
- bRet = FALSE;
+ bRet = sal_False;
else
{
try {
@@ -208,14 +208,14 @@ SfxObjectList::~SfxObjectList()
//-------------------------------------------------------------------------
-const String &SfxObjectList::GetBaseName(USHORT i) const
+const String &SfxObjectList::GetBaseName(sal_uInt16 i) const
{
return (*this)[i]->aBaseName;
}
//-------------------------------------------------------------------------
-const String& SfxObjectList::GetFileName( USHORT i ) const
+const String& SfxObjectList::GetFileName( sal_uInt16 i ) const
{
return (*this)[i]->aFileName;
}
@@ -267,7 +267,7 @@ SfxOrganizeMgr::~SfxOrganizeMgr()
//-------------------------------------------------------------------------
-SfxObjectShellRef SfxOrganizeMgr::CreateObjectShell( USHORT nIdx )
+SfxObjectShellRef SfxOrganizeMgr::CreateObjectShell( sal_uInt16 nIdx )
/* [Description]
@@ -283,17 +283,17 @@ SfxObjectShellRef SfxOrganizeMgr::CreateObjectShell( USHORT nIdx )
if ( !pEntry->aDocShell.Is() )
{
INetURLObject aFileObj( pEntry->aFileName );
- BOOL bDum = FALSE;
+ sal_Bool bDum = sal_False;
SfxApplication* pSfxApp = SFX_APP();
String aFilePath = aFileObj.GetMainURL( INetURLObject::NO_DECODE );
- pEntry->aDocShell = pSfxApp->DocAlreadyLoaded( aFilePath, FALSE, bDum );
+ pEntry->aDocShell = pSfxApp->DocAlreadyLoaded( aFilePath, sal_False, bDum );
if ( !pEntry->aDocShell.Is() )
{
- pEntry->bOwner = TRUE;
+ pEntry->bOwner = sal_True;
SfxMedium* pMed = new SfxMedium(
- aFilePath, ( STREAM_READ | STREAM_SHARE_DENYWRITE ), FALSE, 0 );
+ aFilePath, ( STREAM_READ | STREAM_SHARE_DENYWRITE ), sal_False, 0 );
const SfxFilter* pFilter = NULL;
- pMed->UseInteractionHandler(TRUE);
+ pMed->UseInteractionHandler(sal_True);
if (
pSfxApp->GetFilterMatcher().GuessFilter(*pMed, &pFilter, SFX_FILTER_TEMPLATE, 0) ||
(pFilter && !pFilter->IsOwnFormat()) ||
@@ -301,7 +301,7 @@ SfxObjectShellRef SfxOrganizeMgr::CreateObjectShell( USHORT nIdx )
)
{
pSfxApp->LoadTemplate( pEntry->aDocShell, aFilePath );
- pEntry->bOwnFormat = FALSE;
+ pEntry->bOwnFormat = sal_False;
delete pMed;
if ( pEntry->aDocShell.Is() )
return (SfxObjectShellRef)(SfxObjectShell*)(pEntry->aDocShell);
@@ -310,7 +310,7 @@ SfxObjectShellRef SfxOrganizeMgr::CreateObjectShell( USHORT nIdx )
{
if ( pFilter )
{
- pEntry->bOwnFormat = TRUE;
+ pEntry->bOwnFormat = sal_True;
pEntry->aDocShell = SfxObjectShell::CreateObject( pFilter->GetServiceName(), SFX_CREATE_MODE_ORGANIZER );
if ( pEntry->aDocShell.Is() )
{
@@ -328,7 +328,7 @@ SfxObjectShellRef SfxOrganizeMgr::CreateObjectShell( USHORT nIdx )
//-------------------------------------------------------------------------
-BOOL SfxOrganizeMgr::DeleteObjectShell(USHORT nIdx)
+sal_Bool SfxOrganizeMgr::DeleteObjectShell(sal_uInt16 nIdx)
/* [Description]
@@ -344,8 +344,8 @@ BOOL SfxOrganizeMgr::DeleteObjectShell(USHORT nIdx)
//-------------------------------------------------------------------------
-SfxObjectShellRef SfxOrganizeMgr::CreateObjectShell(USHORT nRegion,
- USHORT nIdx)
+SfxObjectShellRef SfxOrganizeMgr::CreateObjectShell(sal_uInt16 nRegion,
+ sal_uInt16 nIdx)
/* [Description]
Access to the DocumentShell at Position nIdx in Region
@@ -360,7 +360,7 @@ SfxObjectShellRef SfxOrganizeMgr::CreateObjectShell(USHORT nRegion,
//-------------------------------------------------------------------------
-BOOL SfxOrganizeMgr::DeleteObjectShell(USHORT nRegion, USHORT nIdx)
+sal_Bool SfxOrganizeMgr::DeleteObjectShell(sal_uInt16 nRegion, sal_uInt16 nIdx)
/* [Description]
@@ -378,10 +378,10 @@ BOOL SfxOrganizeMgr::DeleteObjectShell(USHORT nRegion, USHORT nIdx)
//-------------------------------------------------------------------------
-BOOL SfxOrganizeMgr::Copy(USHORT nTargetRegion,
- USHORT nTargetIdx,
- USHORT nSourceRegion,
- USHORT nSourceIdx)
+sal_Bool SfxOrganizeMgr::Copy(sal_uInt16 nTargetRegion,
+ sal_uInt16 nTargetIdx,
+ sal_uInt16 nSourceRegion,
+ sal_uInt16 nSourceIdx)
/* [Description]
@@ -389,10 +389,10 @@ BOOL SfxOrganizeMgr::Copy(USHORT nTargetRegion,
[Parameter]
- USHORT nTargetRegion Index of the Target Region
- USHORT nTargetIdx Index of the Target Position
- USHORT nSourceRegion Index of the Source Region
- USHORT nSourceIdx Index of the template to be
+ sal_uInt16 nTargetRegion Index of the Target Region
+ sal_uInt16 nTargetIdx Index of the Target Position
+ sal_uInt16 nSourceRegion Index of the Source Region
+ sal_uInt16 nSourceIdx Index of the template to be
copied/moved.
[Return value] Success (TRUE) or Failure (FALSE)
@@ -400,17 +400,17 @@ BOOL SfxOrganizeMgr::Copy(USHORT nTargetRegion,
[Cross-reference]
- <SfxDocumentTemplates::Copy(USHORT nTargetRegion,
- USHORT nTargetIdx,
- USHORT nSourceRegion,
- USHORT nSourceIdx)>
+ <SfxDocumentTemplates::Copy(sal_uInt16 nTargetRegion,
+ sal_uInt16 nTargetIdx,
+ sal_uInt16 nSourceRegion,
+ sal_uInt16 nSourceIdx)>
*/
{
if(nSourceIdx == USHRT_MAX) // No directories copied
- return FALSE ;
- const BOOL bOk = pTemplates->Copy(nTargetRegion, nTargetIdx,
+ return sal_False ;
+ const sal_Bool bOk = pTemplates->Copy(nTargetRegion, nTargetIdx,
nSourceRegion, nSourceIdx);
if(bOk)
bModified = 1;
@@ -419,10 +419,10 @@ BOOL SfxOrganizeMgr::Copy(USHORT nTargetRegion,
//-------------------------------------------------------------------------
-BOOL SfxOrganizeMgr::Move(USHORT nTargetRegion,
- USHORT nTargetIdx,
- USHORT nSourceRegion,
- USHORT nSourceIdx)
+sal_Bool SfxOrganizeMgr::Move(sal_uInt16 nTargetRegion,
+ sal_uInt16 nTargetIdx,
+ sal_uInt16 nSourceRegion,
+ sal_uInt16 nSourceIdx)
/* [Description]
@@ -430,26 +430,26 @@ BOOL SfxOrganizeMgr::Move(USHORT nTargetRegion,
[Parameter]
- USHORT nTargetRegion Index of the Target Region
- USHORT nTargetIdx Index of the Target Position
- USHORT nSourceRegion Index of the Source Region
- USHORT nSourceIdx Index of the template to be
+ sal_uInt16 nTargetRegion Index of the Target Region
+ sal_uInt16 nTargetIdx Index of the Target Position
+ sal_uInt16 nSourceRegion Index of the Source Region
+ sal_uInt16 nSourceIdx Index of the template to be
copied/moved.
[Return value] Success (TRUE) or Failure (FALSE)
[Cross-reference]
- <SfxDocumentTemplates::Move(USHORT nTargetRegion,
- USHORT nTargetIdx,
- USHORT nSourceRegion,
- USHORT nSourceIdx)>
+ <SfxDocumentTemplates::Move(sal_uInt16 nTargetRegion,
+ sal_uInt16 nTargetIdx,
+ sal_uInt16 nSourceRegion,
+ sal_uInt16 nSourceIdx)>
*/
{
if(nSourceIdx == USHRT_MAX) // No directory moved
- return FALSE ;
- const BOOL bOk = pTemplates->Move(nTargetRegion, nTargetIdx,
+ return sal_False ;
+ const sal_Bool bOk = pTemplates->Move(nTargetRegion, nTargetIdx,
nSourceRegion, nSourceIdx);
if(bOk)
bModified = 1;
@@ -458,8 +458,8 @@ BOOL SfxOrganizeMgr::Move(USHORT nTargetRegion,
//-------------------------------------------------------------------------
-BOOL SfxOrganizeMgr::Delete(SfxOrganizeListBox_Impl *pCaller,
- USHORT nRegion, USHORT nIdx)
+sal_Bool SfxOrganizeMgr::Delete(SfxOrganizeListBox_Impl *pCaller,
+ sal_uInt16 nRegion, sal_uInt16 nIdx)
/* [Description]
@@ -470,19 +470,19 @@ BOOL SfxOrganizeMgr::Delete(SfxOrganizeListBox_Impl *pCaller,
SfxOrganizeListBox *pCaller calling ListBox, since this event
is triggered by the menu or the
keyboard, the ListBox must be updated.
- USHORT nRegion Index for Region
- USHORT nIdx Index of Document template
+ sal_uInt16 nRegion Index for Region
+ sal_uInt16 nIdx Index of Document template
[Return value] Success (TRUE) or Failure (FALSE)
[Cross-reference]
- <SfxDocumentTemplates::Delete(USHORT nRegion, USHORT nIdx)>
+ <SfxDocumentTemplates::Delete(sal_uInt16 nRegion, sal_uInt16 nIdx)>
*/
{
- BOOL bOk = FALSE;
+ sal_Bool bOk = sal_False;
if ( USHRT_MAX == nIdx )
{
@@ -491,11 +491,11 @@ BOOL SfxOrganizeMgr::Delete(SfxOrganizeListBox_Impl *pCaller,
SvLBoxEntry *pGroupToDelete = pCaller->SvLBox::GetEntry(nRegion);
if ( pGroupToDelete )
{
- USHORT nItemNum = (USHORT)( pCaller->GetModel()->GetChildCount( pGroupToDelete ) );
- USHORT nToDeleteNum = 0;
+ sal_uInt16 nItemNum = (sal_uInt16)( pCaller->GetModel()->GetChildCount( pGroupToDelete ) );
+ sal_uInt16 nToDeleteNum = 0;
SvLBoxEntry **pEntriesToDelete = new SvLBoxEntry*[nItemNum];
- USHORT nInd = 0;
+ sal_uInt16 nInd = 0;
for ( nInd = 0; nInd < nItemNum; nInd++ )
pEntriesToDelete[nInd] = NULL;
@@ -540,13 +540,13 @@ BOOL SfxOrganizeMgr::Delete(SfxOrganizeListBox_Impl *pCaller,
//-------------------------------------------------------------------------
-BOOL SfxOrganizeMgr::InsertDir
+sal_Bool SfxOrganizeMgr::InsertDir
(
SfxOrganizeListBox_Impl* pCaller, /* calling ListBox, since this event
is triggered by the menu or the
keyboard, the ListBox must be updated. */
const String& rText, // logical Name of Region
- USHORT nRegion // Index of Region
+ sal_uInt16 nRegion // Index of Region
)
/* [Description]
@@ -557,18 +557,18 @@ BOOL SfxOrganizeMgr::InsertDir
[Cross-reference]
- <SfxDocumentTemplates::InsertDir(const String &, USHORT nRegion)>
+ <SfxDocumentTemplates::InsertDir(const String &, sal_uInt16 nRegion)>
*/
{
- const BOOL bOk = pTemplates->InsertDir(rText, nRegion);
+ const sal_Bool bOk = pTemplates->InsertDir(rText, nRegion);
if(bOk)
{
bModified = 1;
SvLBoxEntry *pEntry = pCaller->InsertEntry(rText,
pCaller->GetOpenedBmp(0),
pCaller->GetClosedBmp(0),
- 0, TRUE, nRegion);
+ 0, sal_True, nRegion);
pCaller->Update();
pCaller->EditEntry(pEntry);
}
@@ -577,8 +577,8 @@ BOOL SfxOrganizeMgr::InsertDir
//-------------------------------------------------------------------------
-BOOL SfxOrganizeMgr::SetName(const String &rName,
- USHORT nRegion, USHORT nIdx)
+sal_Bool SfxOrganizeMgr::SetName(const String &rName,
+ sal_uInt16 nRegion, sal_uInt16 nIdx)
/* [Description]
@@ -587,18 +587,18 @@ BOOL SfxOrganizeMgr::SetName(const String &rName,
[Parameter]
const String &rName The new Name
- USHORT nRegion Index of Region
- USHORT nIdx Index of Document template
+ sal_uInt16 nRegion Index of Region
+ sal_uInt16 nIdx Index of Document template
[Return value] Success (TRUE) or Failure (FALSE)
[Cross-reference]
- <SfxDocumentTemplates::SetName(const String &, USHORT nRegion, USHORT nIdx)>
+ <SfxDocumentTemplates::SetName(const String &, sal_uInt16 nRegion, sal_uInt16 nIdx)>
*/
{
- const BOOL bOk = pTemplates->SetName(rName, nRegion, nIdx);
+ const sal_Bool bOk = pTemplates->SetName(rName, nRegion, nIdx);
if(bOk)
bModified = 1;
return bOk;
@@ -606,7 +606,7 @@ BOOL SfxOrganizeMgr::SetName(const String &rName,
//-------------------------------------------------------------------------
-BOOL SfxOrganizeMgr::CopyTo(USHORT nRegion, USHORT nIdx, const String &rName) const
+sal_Bool SfxOrganizeMgr::CopyTo(sal_uInt16 nRegion, sal_uInt16 nIdx, const String &rName) const
/* [Description]
@@ -614,15 +614,15 @@ BOOL SfxOrganizeMgr::CopyTo(USHORT nRegion, USHORT nIdx, const String &rName) co
[Parameter]
- USHORT nRegion Index of Region
- USHORT nIdx Index of Document Template
+ sal_uInt16 nRegion Index of Region
+ sal_uInt16 nIdx Index of Document Template
const String &rName File name
[Return value] Success (TRUE) or Failure (FALSE)
[Cross-reference]
- <SfxDocumentTemplates::CopyTo( USHORT nRegion, USHORT nIdx, const String &)>
+ <SfxDocumentTemplates::CopyTo( sal_uInt16 nRegion, sal_uInt16 nIdx, const String &)>
*/
{
@@ -631,8 +631,8 @@ BOOL SfxOrganizeMgr::CopyTo(USHORT nRegion, USHORT nIdx, const String &rName) co
//-------------------------------------------------------------------------
-BOOL SfxOrganizeMgr::CopyFrom(SfxOrganizeListBox_Impl *pCaller,
- USHORT nRegion, USHORT nIdx, String &rName)
+sal_Bool SfxOrganizeMgr::CopyFrom(SfxOrganizeListBox_Impl *pCaller,
+ sal_uInt16 nRegion, sal_uInt16 nIdx, String &rName)
/* [Description]
@@ -644,15 +644,15 @@ BOOL SfxOrganizeMgr::CopyFrom(SfxOrganizeListBox_Impl *pCaller,
is triggered by the menu or the
keyboard, the ListBox must be updated.
- USHORT nRegion Index of Region
- USHORT nIdx Index of Document Template
+ sal_uInt16 nRegion Index of Region
+ sal_uInt16 nIdx Index of Document Template
String &rName File name
[Return value] Success (TRUE) or Failure (FALSE)
[Cross-reference]
- <SfxDocumentTemplates::CopyFrom( USHORT nRegion, USHORT nIdx, const String &)>
+ <SfxDocumentTemplates::CopyFrom( sal_uInt16 nRegion, sal_uInt16 nIdx, const String &)>
*/
{
@@ -670,20 +670,20 @@ BOOL SfxOrganizeMgr::CopyFrom(SfxOrganizeListBox_Impl *pCaller,
pCaller->GetOpenedBmp(1),
pCaller->GetClosedBmp(1),
pParent,
- TRUE,
+ sal_True,
nIdx);
pCaller->Update();
// pCaller->EditEntry( pEntry );
pCaller->Expand( pParent );
- bModified = TRUE;
- return TRUE;
+ bModified = sal_True;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
//-------------------------------------------------------------------------
-BOOL SfxOrganizeMgr::InsertFile( SfxOrganizeListBox_Impl* pCaller, const String& rFileName )
+sal_Bool SfxOrganizeMgr::InsertFile( SfxOrganizeListBox_Impl* pCaller, const String& rFileName )
/* [Description]
@@ -705,18 +705,18 @@ BOOL SfxOrganizeMgr::InsertFile( SfxOrganizeListBox_Impl* pCaller, const String&
_FileListEntry* pEntry = new _FileListEntry( rFileName, pCollator );
if ( pImpl->pDocList->C40_PTR_INSERT( _FileListEntry, pEntry ) )
{
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
pImpl->pDocList->Seek_Entry( pEntry, &nPos );
pCaller->InsertEntry( pEntry->aBaseName, pCaller->GetOpenedBmp(1),
- pCaller->GetClosedBmp(1), 0, TRUE, nPos );
- return TRUE;
+ pCaller->GetClosedBmp(1), 0, sal_True, nPos );
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
//-------------------------------------------------------------------------
-BOOL SfxOrganizeMgr::Rescan()
+sal_Bool SfxOrganizeMgr::Rescan()
/* [Description]
@@ -735,10 +735,10 @@ BOOL SfxOrganizeMgr::Rescan()
{
if(pTemplates->Rescan())
{
- bModified = TRUE;
- return TRUE;
+ bModified = sal_True;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
//-------------------------------------------------------------------------
@@ -755,14 +755,14 @@ void SfxOrganizeMgr::SaveAll(Window *pParent)
*/
{
- USHORT nRangeCount = pTemplates->GetRegionCount();
- USHORT i;
+ sal_uInt16 nRangeCount = pTemplates->GetRegionCount();
+ sal_uInt16 i;
for(i = 0; i < nRangeCount; ++i)
{
if( pTemplates->IsRegionLoaded( i ))
{
- const USHORT nCount = pTemplates->GetCount(i);
- for(USHORT j = 0; j < nCount; ++j)
+ const sal_uInt16 nCount = pTemplates->GetCount(i);
+ for(sal_uInt16 j = 0; j < nCount; ++j)
{
if(!pTemplates->DeleteObjectShell(i, j))
{
diff --git a/sfx2/source/view/printer.cxx b/sfx2/source/view/printer.cxx
index 34e988de604d..5f044c94dc0b 100644..100755
--- a/sfx2/source/view/printer.cxx
+++ b/sfx2/source/view/printer.cxx
@@ -31,7 +31,6 @@
#include <vcl/virdev.hxx>
#include <vcl/metric.hxx>
#include <vcl/msgbox.hxx>
-#include <svtools/printdlg.hxx>
#include <unotools/printwarningoptions.hxx>
#include <svtools/printoptions.hxx>
#include <vector>
@@ -42,57 +41,26 @@
#include <sfx2/prnmon.hxx>
#include <sfx2/viewsh.hxx>
#include <sfx2/tabdlg.hxx>
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include "view.hrc"
-#ifdef MSC
-// this one is buggy
-#define NEW_OBJECTS(Class, nCount) ((Class*) new char[ sizeof(Class) * (nCount) ])
-#else
-#define NEW_OBJECTS(Class, nCount) (new Class[nCount])
-#endif
-
-
-USHORT SfxFontSizeInfo::pStaticSizes[] =
-{
- 60,
- 80,
- 100,
- 120,
- 140,
- 180,
- 240,
- 360,
- 480,
- 600,
- 720
-};
-
-//--------------------------------------------------------------------
-
-SV_DECL_PTRARR_DEL(SfxFontArr_Impl,SfxFont*,10,5)
-
// struct SfxPrinter_Impl ------------------------------------------------
struct SfxPrinter_Impl
{
- SfxFontArr_Impl* mpFonts;
- BOOL mbAll;
- BOOL mbSelection;
- BOOL mbFromTo;
- BOOL mbRange;
+ sal_Bool mbAll;
+ sal_Bool mbSelection;
+ sal_Bool mbFromTo;
+ sal_Bool mbRange;
SfxPrinter_Impl() :
- mpFonts ( NULL ),
- mbAll ( TRUE ),
- mbSelection ( TRUE ),
- mbFromTo ( TRUE ),
- mbRange ( TRUE ) {}
- ~SfxPrinter_Impl() { delete mpFonts; }
+ mbAll ( sal_True ),
+ mbSelection ( sal_True ),
+ mbFromTo ( sal_True ),
+ mbRange ( sal_True ) {}
+ ~SfxPrinter_Impl() {}
};
-#define FONTS() pImpl->mpFonts
-
struct SfxPrintOptDlg_Impl
{
sal_Bool mbHelpDisabled;
@@ -101,98 +69,6 @@ struct SfxPrintOptDlg_Impl
mbHelpDisabled ( sal_False ) {}
};
-//--------------------------------------------------------------------
-
-SfxFontSizeInfo::SfxFontSizeInfo( const SfxFont &rFont,
- const OutputDevice &rDevice ) :
-
- pSizes(0),
- nSizes(0),
- bScalable(TRUE)
-
-{
- if ( 0 == rDevice.GetDevFontCount() )
- bScalable = FALSE;
- else
- {
- OutputDevice &rDev = (OutputDevice&) rDevice;
- Font aFont(rFont.GetName(), Size(0,12));
- aFont.SetFamily(rFont.GetFamily());
- aFont.SetPitch(rFont.GetPitch());
- aFont.SetCharSet(rFont.GetCharSet());
-
- // Add available sizes to the list, size in tenths of a point
- int nSizeCount = rDev.GetDevFontSizeCount(aFont);
- pSizes = NEW_OBJECTS(Size, nSizeCount);
- const MapMode aOldMapMode = rDev.GetMapMode();
- MapMode aMap(aOldMapMode);
- aMap.SetMapUnit(MAP_POINT);
- const Fraction aTen(1, 10);
- aMap.SetScaleX(aTen);
- aMap.SetScaleY(aTen);
- rDev.SetMapMode(aMap);
-
- // There are fonts with bitmaps and scalable sizes
- // In this case the fonts arehandled as scalable
- BOOL bFoundScalable = FALSE;
- for ( int i = 0; i < nSizeCount; ++i )
- {
- const Size aSize( rDev.GetDevFontSize(aFont, i) );
- if ( aSize.Height() != 0 )
- pSizes[nSizes++] = aSize;
- else
- bFoundScalable |= TRUE;
- }
- if( !bFoundScalable )
- bScalable = FALSE;
- else
- {
- // Static Font-Sizes are used
- delete [] pSizes;
- nSizes = 0;
- }
- rDev.SetMapMode(aOldMapMode);
- }
-
- if ( 0 == nSizes )
- {
- nSizes = sizeof(pStaticSizes) / sizeof(USHORT);
- pSizes = NEW_OBJECTS(Size, nSizes);
- for ( USHORT nPos = 0; nPos <nSizes; ++nPos )
- pSizes[nPos] = Size( 0, pStaticSizes[nPos] );
- }
-}
-
-//--------------------------------------------------------------------
-
-SfxFontSizeInfo::~SfxFontSizeInfo()
-{
- delete [] pSizes;
-}
-
-//--------------------------------------------------------------------
-
-BOOL SfxFontSizeInfo::HasSize(const Size &rSize) const
-{
- if ( bScalable )
- return TRUE;
- for ( USHORT i = 0; i < nSizes; ++i)
- if ( pSizes[i] == rSize )
- return TRUE;
- return FALSE;
-}
-
-//--------------------------------------------------------------------
-
-SfxFont::SfxFont( const FontFamily eFontFamily, const String& aFontName,
- const FontPitch eFontPitch, const CharSet eFontCharSet ):
- aName( aFontName ),
- eFamily( eFontFamily ),
- ePitch( eFontPitch ),
- eCharSet( eFontCharSet )
-{
-}
-
// class SfxPrinter ------------------------------------------------------
SfxPrinter* SfxPrinter::Create( SvStream& rStream, SfxItemSet* pOptions )
@@ -333,194 +209,6 @@ void SfxPrinter::SetOptions( const SfxItemSet &rNewOptions )
//--------------------------------------------------------------------
-void SfxPrinter::EnableRange( USHORT nRange )
-{
- PrintDialogRange eRange = (PrintDialogRange)nRange;
-
- if ( eRange == PRINTDIALOG_ALL )
- pImpl->mbAll = TRUE;
- else if ( eRange == PRINTDIALOG_SELECTION )
- pImpl->mbSelection = TRUE;
- else if ( eRange == PRINTDIALOG_FROMTO )
- pImpl->mbFromTo = TRUE;
- else if ( eRange == PRINTDIALOG_RANGE )
- pImpl->mbRange = TRUE;
-}
-
-//--------------------------------------------------------------------
-
-void SfxPrinter::DisableRange( USHORT nRange )
-{
- PrintDialogRange eRange = (PrintDialogRange)nRange;
-
- if ( eRange == PRINTDIALOG_ALL )
- pImpl->mbAll = FALSE;
- else if ( eRange == PRINTDIALOG_SELECTION )
- pImpl->mbSelection = FALSE;
- else if ( eRange == PRINTDIALOG_FROMTO )
- pImpl->mbFromTo = FALSE;
- else if ( eRange == PRINTDIALOG_RANGE )
- pImpl->mbRange = FALSE;
-}
-
-//--------------------------------------------------------------------
-
-BOOL SfxPrinter::IsRangeEnabled( USHORT nRange ) const
-{
- PrintDialogRange eRange = (PrintDialogRange)nRange;
- BOOL bRet = FALSE;
-
- if ( eRange == PRINTDIALOG_ALL )
- bRet = pImpl->mbAll;
- else if ( eRange == PRINTDIALOG_SELECTION )
- bRet = pImpl->mbSelection;
- else if ( eRange == PRINTDIALOG_FROMTO )
- bRet = pImpl->mbFromTo;
- else if ( eRange == PRINTDIALOG_RANGE )
- bRet = pImpl->mbRange;
-
- return bRet;
-}
-
-//--------------------------------------------------------------------
-
-SV_IMPL_PTRARR(SfxFontArr_Impl,SfxFont*)
-
-//--------------------------------------------------------------------
-
-const SfxFont* SfxFindFont_Impl( const SfxFontArr_Impl& rArr,
- const String& rName )
-{
- const USHORT nCount = rArr.Count();
- for ( USHORT i = 0; i < nCount; ++i )
- {
- const SfxFont *pFont = rArr[i];
- if ( pFont->GetName() == rName )
- return pFont;
- }
- return NULL;
-}
-
-//--------------------------------------------------------------------
-
-void SfxPrinter::UpdateFonts_Impl()
-{
- VirtualDevice *pVirDev = 0;
- const OutputDevice *pOut = this;
-
- // If no printer was found, a temporay device is created
- // for queries about fonts
- if( !IsValid() )
- pOut = pVirDev = new VirtualDevice;
-
- int nCount = pOut->GetDevFontCount();
- FONTS() = new SfxFontArr_Impl((BYTE)nCount);
-
- std::vector< Font > aNonRegularFonts;
- for(int i = 0;i < nCount;++i)
- {
- Font aFont(pOut->GetDevFont(i));
- if ( (aFont.GetItalic() != ITALIC_NONE) ||
- (aFont.GetWeight() != WEIGHT_MEDIUM) )
- {
- // First: Don't add non-regular fonts. The font name is not unique so we have
- // to filter the device font list.
- aNonRegularFonts.push_back( aFont );
- }
- else if ( FONTS()->Count() == 0 ||
- (*FONTS())[FONTS()->Count()-1]->GetName() != aFont.GetName() )
- {
- DBG_ASSERT(0 == SfxFindFont_Impl(*FONTS(), aFont.GetName()), "Double Fonts from SV-Device!");
- SfxFont* pTmp = new SfxFont( aFont.GetFamily(), aFont.GetName(),
- aFont.GetPitch(), aFont.GetCharSet() );
- FONTS()->C40_INSERT(SfxFont, pTmp, FONTS()->Count());
- }
- }
- delete pVirDev;
-
- // Try to add all non-regular fonts. It could be that there was no regular font
- // with the same name added.
- std::vector< Font >::const_iterator pIter;
- for ( pIter = aNonRegularFonts.begin(); pIter != aNonRegularFonts.end(); ++pIter )
- {
- if ( SfxFindFont_Impl( *FONTS(), pIter->GetName() ) == 0 )
- {
- SfxFont* pTmp = new SfxFont( pIter->GetFamily(), pIter->GetName(),
- pIter->GetPitch(), pIter->GetCharSet() );
- FONTS()->C40_INSERT( SfxFont, pTmp, FONTS()->Count() );
- }
- }
-}
-
-//--------------------------------------------------------------------
-
-USHORT SfxPrinter::GetFontCount()
-{
- if ( !FONTS() )
- UpdateFonts_Impl();
- return FONTS()->Count();
-}
-
-//--------------------------------------------------------------------
-
-const SfxFont* SfxPrinter::GetFont( USHORT nNo ) const
-{
- DBG_ASSERT( FONTS(), "First, please check GetFontCount()!" );
- return (*FONTS())[ nNo ];
-}
-
-//--------------------------------------------------------------------
-
-const SfxFont* SfxPrinter::GetFontByName( const String &rFontName )
-{
- if ( !FONTS() )
- UpdateFonts_Impl();
- return SfxFindFont_Impl(*FONTS(), rFontName);
-}
-
-//--------------------------------------------------------------------
-
-BOOL SfxPrinter::InitJob( Window* pUIParent, BOOL bAskAboutTransparentObjects )
-{
- const SvtPrinterOptions aPrinterOpt;
- const SvtPrintFileOptions aPrintFileOpt;
- const SvtBasePrintOptions* pPrinterOpt = &aPrinterOpt;
- const SvtBasePrintOptions* pPrintFileOpt = &aPrintFileOpt;
- PrinterOptions aNewPrinterOptions;
- BOOL bRet = TRUE;
-
- ( ( IsPrintFileEnabled() && GetPrintFile().Len() ) ? pPrintFileOpt : pPrinterOpt )->GetPrinterOptions( aNewPrinterOptions );
-
- if( bAskAboutTransparentObjects && !aNewPrinterOptions.IsReduceTransparency() )
- {
- if ( !Application::IsHeadlessModeEnabled() )
- {
- SvtPrintWarningOptions aWarnOpt;
-
- if( aWarnOpt.IsTransparency() )
- {
- TransparencyPrintWarningBox aWarnBox( pUIParent );
- const USHORT nRet = aWarnBox.Execute();
-
- if( nRet == RET_CANCEL )
- bRet = FALSE;
- else
- {
- aNewPrinterOptions.SetReduceTransparency( nRet != RET_NO );
- aWarnOpt.SetTransparency( !aWarnBox.IsNoWarningChecked() );
- }
- }
- }
- }
-
- if( bRet )
- SetPrinterOptions( aNewPrinterOptions );
-
- return bRet;
-}
-
-//--------------------------------------------------------------------
-
SfxPrintOptionsDialog::SfxPrintOptionsDialog( Window *pParent,
SfxViewShell *pViewShell,
const SfxItemSet *pSet ) :
diff --git a/sfx2/source/view/prnmon.cxx b/sfx2/source/view/prnmon.cxx
deleted file mode 100644
index bb6d69ff83d4..000000000000
--- a/sfx2/source/view/prnmon.cxx
+++ /dev/null
@@ -1,475 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sfx2.hxx"
-#include <com/sun/star/view/PrintableState.hpp>
-#include <com/sun/star/util/XCloseable.hpp>
-#include <com/sun/star/util/XCloseBroadcaster.hpp>
-#include <com/sun/star/util/XCloseListener.hpp>
-#include <com/sun/star/util/CloseVetoException.hpp>
-#include <vcl/fixed.hxx>
-#include <vcl/msgbox.hxx>
-#include <svtools/asynclink.hxx>
-
-#include <unotools/printwarningoptions.hxx>
-#include <svl/eitem.hxx>
-
-#include <sfx2/prnmon.hxx>
-#include <sfx2/viewsh.hxx>
-#include <sfx2/viewfrm.hxx>
-#include <sfx2/objsh.hxx>
-#include <sfx2/docfile.hxx>
-#include "sfxtypes.hxx"
-#include <sfx2/progress.hxx>
-#include <sfx2/bindings.hxx>
-#include "sfxresid.hxx"
-#include <sfx2/event.hxx>
-#include <sfx2/request.hxx>
-#include <sfx2/app.hxx>
-
-#include "view.hrc"
-
-//------------------------------------------------------------------------
-
-#define SFX_TITLE_MAXLEN_PRINTMONITOR 22
-
-//------------------------------------------------------------------------
-
-struct SfxPrintMonitor_Impl: public ModelessDialog
-{
-
- SfxPrintMonitor_Impl( Window *pParent, SfxViewShell *rpViewShell );
- virtual BOOL Close();
-
- SfxViewShell* pViewShell;
- FixedText aDocName;
- FixedText aPrinting;
- FixedText aPrinter;
- FixedText aPrintInfo;
- CancelButton aCancel;
-};
-
-//-------------------------------------------------------------------------
-
-struct SfxPrintProgress_Impl : public SfxListener
-{
- SfxPrintMonitor_Impl* pMonitor;
- SfxViewShell* pViewShell;
- SfxPrinter* pPrinter;
- SfxPrinter* pOldPrinter;
- USHORT nLastPage;
- BOOL bRunning;
- BOOL bCancel;
- BOOL bDeleteOnEndPrint;
- BOOL bShow;
- BOOL bCallbacks;
- BOOL bOldEnablePrintFile;
- BOOL bOldFlag;
- BOOL bRestoreFlag;
- BOOL bAborted;
- svtools::AsynchronLink aDeleteLink;
- Link aCancelHdl;
-
-private:
- DECL_LINK( CancelHdl, Button * );
- DECL_STATIC_LINK( SfxPrintProgress_Impl, DeleteHdl, SfxPrintProgress * );
-
-public:
- SfxPrintProgress_Impl( SfxViewShell* pTheViewShell, SfxPrinter* pThePrinter );
- ~SfxPrintProgress_Impl();
-
- void Delete( SfxPrintProgress* pAntiImpl ) { aDeleteLink.Call( pAntiImpl ); }
- SfxViewShell* GetViewShell() const { return pViewShell; }
- BOOL SetPage( USHORT nPage, const String &rPage );
- void CreateMonitor();
- virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
-};
-
-void SfxPrintProgress_Impl::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
-{
- SfxPrintingHint* pPrintHint = PTR_CAST( SfxPrintingHint, &rHint );
- if ( pPrintHint )
- {
- if ( pPrintHint->GetWhich() == -2 )
- CancelHdl(0);
- }
-}
-
-//------------------------------------------------------------------------
-
-SfxPrintMonitor_Impl::SfxPrintMonitor_Impl( Window* pParent, SfxViewShell* rpViewShell ) :
- ModelessDialog( pParent, SfxResId( DLG_PRINTMONITOR ) ),
- pViewShell ( rpViewShell ),
- aDocName ( this, SfxResId( FT_DOCNAME ) ),
- aPrinting ( this, SfxResId( FT_PRINTING ) ),
- aPrinter ( this, SfxResId( FT_PRINTER ) ),
- aPrintInfo ( this, SfxResId( FT_PRINTINFO ) ),
- aCancel ( this, SfxResId( PB_CANCELPRNMON ) )
-{
- if( rpViewShell->GetPrinter()->GetCapabilities( PRINTER_CAPABILITIES_EXTERNALDIALOG ) != 0 )
- {
- String aPrep( SfxResId( STR_FT_PREPARATION ) );
- aPrinting.SetText( aPrep );
- aPrinter.Show( FALSE );
- }
- FreeResource();
-}
-
-//------------------------------------------------------------------------
-
-IMPL_STATIC_LINK_NOINSTANCE( SfxPrintProgress_Impl, DeleteHdl, SfxPrintProgress*, pAntiImpl )
-{
- delete pAntiImpl;
- return 0;
-}
-
-void actualizePrintCancelState(CancelButton& rButton, const SfxObjectShell* pShell)
-{
- sal_Bool bEnableCancelButton = sal_True;
- if (pShell)
- bEnableCancelButton = pShell->Stamp_GetPrintCancelState();
-
- if (!bEnableCancelButton)
- rButton.Disable();
- else
- rButton.Enable();
-}
-
-//------------------------------------------------------------------------
-
-SfxPrintProgress_Impl::SfxPrintProgress_Impl( SfxViewShell* pTheViewShell,
- SfxPrinter* pThePrinter ) :
-
- pMonitor ( 0 ),
- pViewShell ( pTheViewShell ),
- pPrinter ( pThePrinter ),
- pOldPrinter ( NULL ),
- nLastPage ( 0 ),
- bRunning ( TRUE ),
- bCancel ( FALSE ),
- bDeleteOnEndPrint ( FALSE ),
- bShow ( FALSE ),
- bCallbacks ( FALSE ),
- bOldEnablePrintFile ( FALSE ),
- bOldFlag ( TRUE ),
- bRestoreFlag ( FALSE ),
- bAborted ( FALSE ),
- aDeleteLink ( STATIC_LINK( this, SfxPrintProgress_Impl, DeleteHdl ) )
-{
- StartListening( *pViewShell->GetObjectShell() );
-}
-
-void SfxPrintProgress_Impl::CreateMonitor()
-{
- // mark monitor to been shown in first status indication
- bShow = TRUE;
-
- if ( !pMonitor )
- {
- Window* pParent = pViewShell->GetWindow();
- pMonitor = new SfxPrintMonitor_Impl( pParent, pViewShell );
- pMonitor->aDocName.SetText( pViewShell->GetObjectShell()->GetTitle( SFX_TITLE_MAXLEN_PRINTMONITOR ) );
- pMonitor->aPrinter.SetText( pViewShell->GetPrinter()->GetName() );
-
- // Stampit enable/dsiable cancel button
- actualizePrintCancelState( pMonitor->aCancel, pViewShell->GetObjectShell() );
- pMonitor->aCancel.SetClickHdl( LINK( this, SfxPrintProgress_Impl, CancelHdl ) );
- }
-}
-
-//------------------------------------------------------------------------
-
-SfxPrintProgress_Impl::~SfxPrintProgress_Impl()
-{
-}
-
-//------------------------------------------------------------------------
-
-BOOL SfxPrintProgress_Impl::SetPage( USHORT nPage, const String &rPage )
-{
- // Was the print job canceled?
- if ( bCancel || !pMonitor )
- return FALSE;
-
- // Stampit enable/dsiable cancel button
- actualizePrintCancelState(pMonitor->aCancel, pViewShell->GetObjectShell());
-
- nLastPage = nPage;
- String aStrPrintInfo = String( SfxResId( STR_PAGE ) );
- if ( !rPage.Len() )
- aStrPrintInfo += String::CreateFromInt32( nLastPage );
- else
- aStrPrintInfo += rPage;
- pMonitor->aPrintInfo.SetText( aStrPrintInfo );
- pMonitor->Update();
- return TRUE;
-}
-
-//------------------------------------------------------------------------
-
-IMPL_LINK( SfxPrintProgress_Impl, CancelHdl, Button *, EMPTYARG )
-{
- if ( !pViewShell->GetPrinter()->IsJobActive() && pViewShell->GetPrinter()->IsPrinting() )
- // we are still in StartJob, cancelling now might lead to a crash
- return 0;
-
- if ( pMonitor )
- pMonitor->Hide();
-
- pViewShell->GetObjectShell()->Broadcast( SfxPrintingHint( com::sun::star::view::PrintableState_JOB_ABORTED, NULL, NULL ) );
- pViewShell->GetPrinter()->AbortJob();
- bCancel = TRUE;
-
- if ( aCancelHdl.IsSet() )
- aCancelHdl.Call( this );
-
- bAborted = TRUE;
- return 0;
-}
-
-BOOL SfxPrintMonitor_Impl::Close()
-{
- BOOL bAgree = pViewShell ? pViewShell->GetObjectShell()->Stamp_GetPrintCancelState() : TRUE;
- if (!bAgree)
- return FALSE;
- else
- return ModelessDialog::Close();
-}
-
-//--------------------------------------------------------------------
-
-SfxPrintProgress::SfxPrintProgress( SfxViewShell* pViewSh, bool bShow )
-: SfxProgress( pViewSh->GetViewFrame()->GetObjectShell(),
- String(SfxResId(STR_PRINTING)), 1, FALSE ),
- pImp( new SfxPrintProgress_Impl( pViewSh, pViewSh->GetPrinter() ) )
-{
- SfxObjectShell* pDoc = pViewSh->GetObjectShell();
- SFX_ITEMSET_ARG( pDoc->GetMedium()->GetItemSet(), pItem, SfxBoolItem, SID_HIDDEN, FALSE );
- if ( pItem && pItem->GetValue() )
- bShow = FALSE;
-
- if ( bShow )
- pImp->CreateMonitor();
-
- Lock();
- if ( !SvtPrintWarningOptions().IsModifyDocumentOnPrintingAllowed() )
- {
- pImp->bRestoreFlag = TRUE;
- pImp->bOldFlag = pDoc->IsEnableSetModified();
- if ( pImp->bOldFlag )
- pDoc->EnableSetModified( FALSE );
- }
-}
-
-//--------------------------------------------------------------------
-
-SfxPrintProgress::~SfxPrintProgress()
-{
- // Can already have been deleted (in EndPrintNotify)
- DELETEZ(pImp->pMonitor);
-
- // If possible remove Callbacks
- if ( pImp->bCallbacks )
- {
- // pImp->pPrinter->SetEndPrintHdl( Link() );
- pImp->pPrinter->SetErrorHdl( Link() );
- pImp->bCallbacks = FALSE;
- }
-
- // If possible use the previously used printer
- if ( pImp->pOldPrinter )
- pImp->pViewShell->SetPrinter( pImp->pOldPrinter, SFX_PRINTER_PRINTER );
- else
- // If possible reset Print-To-File-Status
- pImp->pViewShell->GetPrinter()->EnablePrintFile( pImp->bOldEnablePrintFile );
-
- // EndPrint-Notification an Frame
- //pImp->pViewShell->GetViewFrame()->GetFrame().Lock_Impl(FALSE);
- pImp->EndListening( *(pImp->pViewShell->GetObjectShell()) );
-
- // the following call might destroy the view or even the document
- pImp->pViewShell->CheckOwnerShip_Impl();
- delete pImp;
-}
-
-//--------------------------------------------------------------------
-
-BOOL SfxPrintProgress::SetState( ULONG nValue, ULONG nNewRange )
-{
- if ( pImp->bShow )
- {
- pImp->bShow = FALSE;
- if ( pImp->pMonitor )
- {
- pImp->pMonitor->Show();
- pImp->pMonitor->Update();
- }
- }
-
- return pImp->SetPage( (USHORT)nValue, GetStateText_Impl() ) &&
- SfxProgress::SetState( nValue, nNewRange );
-}
-
-//--------------------------------------------------------------------
-
-void SfxPrintProgress::SetText( const String& rText )
-{
- if ( pImp->pMonitor )
- {
- pImp->pMonitor->SetText( rText );
- pImp->pMonitor->Update();
- }
- SfxProgress::SetText( rText );
-}
-
-//------------------------------------------------------------------------
-
-IMPL_LINK_INLINE_START( SfxPrintProgress, PrintErrorNotify, void *, EMPTYARG )
-{
- if ( pImp->pMonitor )
- pImp->pMonitor->Hide();
- // AbortJob calls EndPrint hdl, so do not delete pImp just now
- BOOL bWasDeleteOnEndPrint = pImp->bDeleteOnEndPrint;
- pImp->bDeleteOnEndPrint = FALSE;
- pImp->pPrinter->AbortJob();
- InfoBox( pImp->GetViewShell()->GetWindow(),
- String( SfxResId(STR_ERROR_PRINT) ) ).Execute();
- if ( pImp->bRestoreFlag && pImp->pViewShell->GetObjectShell()->IsEnableSetModified() != pImp->bOldFlag )
- pImp->pViewShell->GetObjectShell()->EnableSetModified( pImp->bOldFlag );
- pImp->GetViewShell()->GetObjectShell()->Broadcast( SfxPrintingHint( com::sun::star::view::PrintableState_JOB_FAILED, NULL, NULL ) );
- // now we can clean up like normally EndPrint hdl does
- if( bWasDeleteOnEndPrint )
- {
- DELETEZ(pImp->pMonitor);
- delete this;
- }
- return 0;
-}
-IMPL_LINK_INLINE_END( SfxPrintProgress, PrintErrorNotify, void *, EMPTYARG )
-
-//------------------------------------------------------------------------
-
-IMPL_LINK( SfxPrintProgress, StartPrintNotify, void *, EMPTYARG )
-{
- SfxObjectShell *pObjShell = pImp->pViewShell->GetObjectShell();
- SFX_APP()->NotifyEvent(SfxEventHint(SFX_EVENT_PRINTDOC, GlobalEventConfig::GetEventName( STR_EVENT_PRINTDOC ), pObjShell));
- pObjShell->Broadcast( SfxPrintingHint( com::sun::star::view::PrintableState_JOB_STARTED, NULL, NULL ) );
- return 0;
-}
-
-IMPL_LINK( SfxPrintProgress, EndPrintNotify, void *, EMPTYARG )
-{
- if ( pImp->pMonitor )
- pImp->pMonitor->Hide();
-
- SfxViewShell* pViewShell = pImp->pViewShell;
-
- // Slots enablen
- pViewShell->Invalidate( SID_PRINTDOC );
- pViewShell->Invalidate( SID_PRINTDOCDIRECT );
- pViewShell->Invalidate( SID_SETUPPRINTER );
-
- // Check out Callbacks
- pImp->pPrinter->SetErrorHdl( Link() );
- pImp->bCallbacks = FALSE;
-
- // If possible insert the old Printer again.
- if ( pImp->pOldPrinter )
- {
- }
- else
- // If possible reset previous Print-To-File-Status.
- pViewShell->GetPrinter()->EnablePrintFile( pImp->bOldEnablePrintFile );
-
- // it is possible that after printing the document or view is deleted (because the VieShell got the ownership)
- // so first clean up
- if ( pImp->bRestoreFlag && pViewShell->GetObjectShell()->IsEnableSetModified() != pImp->bOldFlag )
- pViewShell->GetObjectShell()->EnableSetModified( TRUE );
-
- pViewShell->GetObjectShell()->Broadcast( SfxPrintingHint( com::sun::star::view::PrintableState_JOB_COMPLETED, NULL, NULL ) );
- if ( pImp->bDeleteOnEndPrint )
- {
- DELETEZ(pImp->pMonitor);
- delete this;
- }
- else
- {
- DBG_ASSERT( !pImp->pOldPrinter, "Unable to restore printer!" );
- pImp->bRunning = FALSE;
- }
-
- return 0;
-}
-
-//------------------------------------------------------------------------
-
-void SfxPrintProgress::DeleteOnEndPrint()
-{
- UnLock(); // Already now because printer in Thread.
-#ifndef WNT
- // As the print in the 'Thread' is undefined on Windows, the Print-Monitor
- // will get stuck here, on the other platforms the work can continue,
- // thus this part is removed.
- DELETEZ( pImp->pMonitor );
-#endif
-
- pImp->bDeleteOnEndPrint = TRUE;
- if ( !pImp->bRunning )
- delete this;
-}
-
-//------------------------------------------------------------------------
-
-void SfxPrintProgress::RestoreOnEndPrint( SfxPrinter *pOldPrinter,
- BOOL bOldEnablePrintFile )
-{
- pImp->pOldPrinter = pOldPrinter;
- pImp->bOldEnablePrintFile = bOldEnablePrintFile;
-}
-
-//------------------------------------------------------------------------
-
-void SfxPrintProgress::RestoreOnEndPrint( SfxPrinter *pOldPrinter )
-{
- RestoreOnEndPrint( pOldPrinter, FALSE );
-}
-
-//------------------------------------------------------------------------
-
-void SfxPrintProgress::SetCancelHdl( const Link& aCancelHdl )
-{
- pImp->aCancelHdl = aCancelHdl;
-}
-
-BOOL SfxPrintProgress::IsAborted() const
-{
- return pImp->bAborted;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx
index 074c5b0ad6c8..1b49688489be 100644..100755
--- a/sfx2/source/view/sfxbasecontroller.cxx
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -94,7 +94,7 @@
#include <boost/unordered_map.hpp>
#include <sfx2/event.hxx>
-#include "viewfac.hxx"
+#include "sfx2/viewfac.hxx"
#define OMULTITYPEINTERFACECONTAINERHELPER ::cppu::OMultiTypeInterfaceContainerHelper
#define OINTERFACECONTAINERHELPER ::cppu::OInterfaceContainerHelper
@@ -425,7 +425,7 @@ void SAL_CALL IMPL_SfxBaseController_CloseListenerHelper::queryClosing( const EV
SfxViewShell* pShell = m_pController->GetViewShell_Impl();
if ( m_pController != NULL && pShell )
{
- BOOL bCanClose = (BOOL) pShell->PrepareClose( FALSE );
+ sal_Bool bCanClose = (sal_Bool) pShell->PrepareClose( sal_False );
if ( !bCanClose )
{
if ( bDeliverOwnership && ( !pShell->GetWindow() || !pShell->GetWindow()->IsReallyVisible() ) )
@@ -515,7 +515,7 @@ void SAL_CALL IMPL_SfxBaseController_ListenerHelper::frameAction( const FRAMEACT
if ( aEvent.Action == ::com::sun::star::frame::FrameAction_FRAME_UI_ACTIVATED )
{
if ( !m_pController->GetViewShell_Impl()->GetUIActiveIPClient_Impl() )
- m_pController->GetViewShell_Impl()->GetViewFrame()->MakeActive_Impl( FALSE );
+ m_pController->GetViewShell_Impl()->GetViewFrame()->MakeActive_Impl( sal_False );
}
else if ( aEvent.Action == ::com::sun::star::frame::FrameAction_CONTEXT_CHANGED )
{
@@ -640,7 +640,7 @@ void SAL_CALL SfxBaseController::attachFrame( const REFERENCE< XFRAME >& xFrame
ConnectSfxFrame_Impl( E_CONNECT );
// 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() );
+ SfxViewEventHint aHint( SFX_EVENT_VIEWCREATED, GlobalEventConfig::GetEventName( STR_EVENT_VIEWCREATED ), m_pData->m_pViewShell->GetObjectShell(), uno::Reference< frame::XController2 >( this ) );
SFX_APP()->NotifyEvent( aHint );
}
}
@@ -699,7 +699,7 @@ sal_Bool SAL_CALL SfxBaseController::suspend( sal_Bool bSuspend ) throw( ::com::
for ( const SfxViewFrame* pFrame = SfxViewFrame::GetFirst( pDocShell ); !bOther && pFrame; pFrame = SfxViewFrame::GetNext( *pFrame, pDocShell ) )
bOther = (pFrame != pActFrame);
- BOOL bRet = bOther || pDocShell->PrepareClose();
+ sal_Bool bRet = bOther || pDocShell->PrepareClose();
if ( bRet )
{
ConnectSfxFrame_Impl( E_DISCONNECT );
@@ -735,7 +735,7 @@ ANY SfxBaseController::getViewData() throw( ::com::sun::star::uno::RuntimeExcept
if ( m_pData->m_pViewShell )
{
m_pData->m_pViewShell->WriteUserData( sData1 ) ;
- OUSTRING sData( sData1 );
+ ::rtl::OUString sData( sData1 );
aAny <<= sData ;
}
@@ -751,7 +751,7 @@ void SAL_CALL SfxBaseController::restoreViewData( const ANY& aValue ) throw( ::c
SolarMutexGuard aGuard;
if ( m_pData->m_pViewShell )
{
- OUSTRING sData;
+ ::rtl::OUString sData;
aValue >>= sData ;
m_pData->m_pViewShell->ReadUserData( sData ) ;
}
@@ -782,7 +782,7 @@ REFERENCE< XMODEL > SAL_CALL SfxBaseController::getModel() throw( ::com::sun::st
//________________________________________________________________________________________________________
REFERENCE< XDISPATCH > SAL_CALL SfxBaseController::queryDispatch( const UNOURL& aURL ,
- const OUSTRING& sTargetFrameName,
+ const ::rtl::OUString& sTargetFrameName,
sal_Int32 eSearchFlags ) throw( RUNTIMEEXCEPTION )
{
SolarMutexGuard aGuard;
@@ -796,7 +796,7 @@ REFERENCE< XDISPATCH > SAL_CALL SfxBaseController::queryDispatch( const UNOU
{
SfxViewFrame *pFrame = m_pData->m_pViewShell->GetViewFrame();
if ( eSearchFlags & ( ::com::sun::star::frame::FrameSearchFlag::CREATE ))
- pFrame->SetChildWindow( SID_BROWSER, TRUE );
+ pFrame->SetChildWindow( SID_BROWSER, sal_True );
SfxChildWindow* pChildWin = pFrame->GetChildWindow( SID_BROWSER );
REFERENCE < XFRAME > xFrame;
if ( pChildWin )
@@ -867,7 +867,7 @@ REFERENCE< XDISPATCH > SAL_CALL SfxBaseController::queryDispatch( const UNOU
}
else if ( aURL.Protocol.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("slot:")) )
{
- USHORT nId = (USHORT) aURL.Path.toInt32();
+ sal_uInt16 nId = (sal_uInt16) aURL.Path.toInt32();
pAct = m_pData->m_pViewShell->GetViewFrame() ;
if (nId >= SID_VERB_START && nId <= SID_VERB_END)
@@ -939,12 +939,12 @@ REFERENCE< XDISPATCH > SAL_CALL SfxBaseController::queryDispatch( const UNOU
// SfxBaseController -> XDispatchProvider
//________________________________________________________________________________________________________
-SEQUENCE< REFERENCE< XDISPATCH > > SAL_CALL SfxBaseController::queryDispatches( const SEQUENCE< DISPATCHDESCRIPTOR >& seqDescripts ) throw( ::com::sun::star::uno::RuntimeException )
+uno::Sequence< REFERENCE< XDISPATCH > > SAL_CALL SfxBaseController::queryDispatches( const uno::Sequence< DISPATCHDESCRIPTOR >& seqDescripts ) throw( ::com::sun::star::uno::RuntimeException )
{
// Create return list - which must have same size then the given descriptor
// It's not allowed to pack it!
sal_Int32 nCount = seqDescripts.getLength();
- SEQUENCE< REFERENCE< XDISPATCH > > lDispatcher( nCount );
+ uno::Sequence< REFERENCE< XDISPATCH > > lDispatcher( nCount );
for( sal_Int32 i=0; i<nCount; ++i )
{
@@ -1053,7 +1053,7 @@ void SAL_CALL SfxBaseController::dispose() throw( ::com::sun::star::uno::Runtime
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 ;
+ m_pData->m_pViewShell->pImp->m_bControllerSet = false;
if ( pFrame )
{
@@ -1070,7 +1070,7 @@ void SAL_CALL SfxBaseController::dispose() throw( ::com::sun::star::uno::Runtime
pView = SfxViewFrame::GetNext( *pView, pDoc );
}
- SFX_APP()->NotifyEvent( SfxEventHint(SFX_EVENT_CLOSEVIEW, GlobalEventConfig::GetEventName( STR_EVENT_CLOSEVIEW ), pDoc ) );
+ SFX_APP()->NotifyEvent( SfxViewEventHint(SFX_EVENT_CLOSEVIEW, GlobalEventConfig::GetEventName( STR_EVENT_CLOSEVIEW ), pDoc, uno::Reference< frame::XController2 >( this ) ) );
if ( !pView )
SFX_APP()->NotifyEvent( SfxEventHint(SFX_EVENT_CLOSEDOC, GlobalEventConfig::GetEventName( STR_EVENT_CLOSEDOC ), pDoc) );
@@ -1207,10 +1207,10 @@ throw (::com::sun::star::uno::RuntimeException)
SfxSlotPool* pPool = &SfxSlotPool::GetSlotPool( pViewFrame );
SfxSlotPool* pSlotPool = pPool ? pPool : &SFX_SLOTPOOL();
- const ULONG nMode( SFX_SLOT_TOOLBOXCONFIG|SFX_SLOT_ACCELCONFIG|SFX_SLOT_MENUCONFIG );
+ const sal_uIntPtr nMode( SFX_SLOT_TOOLBOXCONFIG|SFX_SLOT_ACCELCONFIG|SFX_SLOT_MENUCONFIG );
// Select Group ( Group 0 is internal )
- for ( USHORT i=0; i<pSlotPool->GetGroupCount(); i++ )
+ for ( sal_uInt16 i=0; i<pSlotPool->GetGroupCount(); i++ )
{
String aName = pSlotPool->SeekGroup( i );
const SfxSlot* pSfxSlot = pSlotPool->FirstSlot();
@@ -1239,14 +1239,14 @@ throw (::com::sun::star::uno::RuntimeException)
SolarMutexGuard aGuard;
if ( m_pData->m_pViewShell )
{
- const ULONG nMode( SFX_SLOT_TOOLBOXCONFIG|SFX_SLOT_ACCELCONFIG|SFX_SLOT_MENUCONFIG );
+ const sal_uIntPtr nMode( SFX_SLOT_TOOLBOXCONFIG|SFX_SLOT_ACCELCONFIG|SFX_SLOT_MENUCONFIG );
SfxViewFrame* pViewFrame( m_pData->m_pViewShell->GetFrame() );
SfxSlotPool* pPool( &SfxSlotPool::GetSlotPool( pViewFrame ));
rtl::OUString aCmdPrefix( RTL_CONSTASCII_USTRINGPARAM( ".uno:" ));
SfxSlotPool* pSlotPool = pPool ? pPool : &SFX_SLOTPOOL();
- for ( USHORT i=0; i<pSlotPool->GetGroupCount(); i++ )
+ for ( sal_uInt16 i=0; i<pSlotPool->GetGroupCount(); i++ )
{
String aName = pSlotPool->SeekGroup( i );
const SfxSlot* pSfxSlot = pSlotPool->FirstSlot();
@@ -1279,17 +1279,17 @@ throw (::com::sun::star::uno::RuntimeException)
return aSeq;
}
-BOOL SfxBaseController::HandleEvent_Impl( NotifyEvent& rEvent )
+sal_Bool SfxBaseController::HandleEvent_Impl( NotifyEvent& rEvent )
{
return m_pData->m_aUserInputInterception.handleNotifyEvent( rEvent );
}
-BOOL SfxBaseController::HasKeyListeners_Impl()
+sal_Bool SfxBaseController::HasKeyListeners_Impl()
{
return m_pData->m_aUserInputInterception.hasKeyHandlers();
}
-BOOL SfxBaseController::HasMouseClickListeners_Impl()
+sal_Bool SfxBaseController::HasMouseClickListeners_Impl()
{
return m_pData->m_aUserInputInterception.hasMouseClickListeners();
}
@@ -1368,15 +1368,15 @@ void SfxBaseController::ConnectSfxFrame_Impl( const ConnectSfxFrame i_eConnect )
if ( !rFrame.IsMarkedHidden_Impl() )
{
if ( rDoc.IsHelpDocument() || ( nPluginMode == 2 ) )
- pViewFrame->GetDispatcher()->HideUI( TRUE );
+ pViewFrame->GetDispatcher()->HideUI( sal_True );
else
- pViewFrame->GetDispatcher()->HideUI( FALSE );
+ pViewFrame->GetDispatcher()->HideUI( sal_False );
if ( rFrame.IsInPlace() )
pViewFrame->LockAdjustPosSizePixel();
if ( nPluginMode == 3 )
- rFrame.GetWorkWindow_Impl()->SetInternalDockingAllowed( FALSE );
+ rFrame.GetWorkWindow_Impl()->SetInternalDockingAllowed( sal_False );
if ( !rFrame.IsInPlace() )
pViewFrame->GetDispatcher()->Update_Impl();
@@ -1391,7 +1391,7 @@ void SfxBaseController::ConnectSfxFrame_Impl( const ConnectSfxFrame i_eConnect )
// force resize for OLE server to fix layout problems of writer and math
// see i53651
if ( nPluginMode == 3 )
- pViewFrame->Resize( TRUE );
+ pViewFrame->Resize( sal_True );
}
}
else
@@ -1404,7 +1404,7 @@ void SfxBaseController::ConnectSfxFrame_Impl( const ConnectSfxFrame i_eConnect )
pViewFrame->UpdateTitle();
if ( !rFrame.IsInPlace() )
- pViewFrame->Resize( TRUE );
+ pViewFrame->Resize( sal_True );
// if there's a JumpMark given, then, well, jump to it
::comphelper::NamedValueCollection aViewArgs( getCreationArguments() );
@@ -1439,11 +1439,11 @@ void SfxBaseController::ConnectSfxFrame_Impl( const ConnectSfxFrame i_eConnect )
try
{
Reference< XViewDataSupplier > xViewDataSupplier( getModel(), UNO_QUERY_THROW );
- Reference< XIndexAccess > xViewData( xViewDataSupplier->getViewData(), UNO_SET_THROW );
+ Reference< XIndexAccess > xViewData( xViewDataSupplier->getViewData() );
// find the view data item whose ViewId matches the ID of the view we're just connecting to
const SfxObjectFactory& rDocFactory( rDoc.GetFactory() );
- const sal_Int32 nCount = xViewData->getCount();
+ const sal_Int32 nCount = xViewData.is() ? xViewData->getCount() : 0;
sal_Int32 nViewDataIndex = 0;
for ( sal_Int32 i=0; i<nCount; ++i )
{
@@ -1467,7 +1467,7 @@ void SfxBaseController::ConnectSfxFrame_Impl( const ConnectSfxFrame i_eConnect )
Sequence< PropertyValue > aViewData;
OSL_VERIFY( xViewData->getByIndex( nViewDataIndex ) >>= aViewData );
if ( aViewData.getLength() > 0 )
- m_pData->m_pViewShell->ReadUserDataSequence( aViewData, TRUE );
+ m_pData->m_pViewShell->ReadUserDataSequence( aViewData, sal_True );
}
}
catch( const Exception& )
diff --git a/sfx2/source/view/userinputinterception.cxx b/sfx2/source/view/userinputinterception.cxx
index fdd9f97fb4e0..19c6ff50e5c9 100644..100755
--- a/sfx2/source/view/userinputinterception.cxx
+++ b/sfx2/source/view/userinputinterception.cxx
@@ -185,7 +185,7 @@ namespace sfx2
{
Reference < XInterface > xHoldAlive( m_pData->m_rControllerImpl );
- USHORT nType = _rEvent.GetType();
+ sal_uInt16 nType = _rEvent.GetType();
bool bHandled = false;
switch ( nType )
diff --git a/sfx2/source/view/view.hrc b/sfx2/source/view/view.hrc
index 243dcd56e4c8..3dce1ec795bb 100644..100755
--- a/sfx2/source/view/view.hrc
+++ b/sfx2/source/view/view.hrc
@@ -41,12 +41,6 @@
#define STR_NOSTARTPRINTER (RID_SFX_VIEW_START+ 9)
#define STR_PRINTING (RID_SFX_VIEW_START+10)
-#ifndef STR_UNDO
-#define STR_UNDO (RID_SFX_VIEW_START+11)
-#define STR_REDO (RID_SFX_VIEW_START+12)
-#define STR_REPEAT (RID_SFX_VIEW_START+13)
-#endif
-
#define DLG_PRINTMONITOR (RID_SFX_VIEW_START)
#define FT_DOCNAME 1
#define FT_PRINTING 2
diff --git a/sfx2/source/view/view.src b/sfx2/source/view/view.src
index b4c09a0677ed..b4c09a0677ed 100644..100755
--- a/sfx2/source/view/view.src
+++ b/sfx2/source/view/view.src
diff --git a/sfx2/source/view/viewfac.cxx b/sfx2/source/view/viewfac.cxx
index d2bf808fe654..16fd68505ad9 100644..100755
--- a/sfx2/source/view/viewfac.cxx
+++ b/sfx2/source/view/viewfac.cxx
@@ -31,8 +31,8 @@
// INCLUDE ---------------------------------------------------------------
#include <sfx2/app.hxx>
+#include "sfx2/viewfac.hxx"
#include <rtl/ustrbuf.hxx>
-#include "viewfac.hxx"
// STATIC DATA -----------------------------------------------------------
@@ -72,7 +72,7 @@ String SfxViewFactory::GetAPIViewName() const
// CTOR / DTOR -----------------------------------------------------------
SfxViewFactory::SfxViewFactory( SfxViewCtor fnC, SfxViewInit fnI,
- USHORT nOrdinal, const sal_Char* asciiViewName ):
+ sal_uInt16 nOrdinal, const sal_Char* asciiViewName ):
fnCreate(fnC),
fnInit(fnI),
nOrd(nOrdinal),
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index b493286ccd98..6d5d0930370a 100644..100755
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -94,6 +94,8 @@
#include <comphelper/storagehelper.hxx>
#include <svtools/asynclink.hxx>
#include <svl/sharecontrolfile.hxx>
+#include <svtools/svtools.hrc>
+#include <svtools/svtdata.hxx>
#include <framework/framelistanalyzer.hxx>
#include <boost/optional.hpp>
@@ -125,10 +127,10 @@ namespace css = ::com::sun::star;
#include <sfx2/request.hxx>
#include <sfx2/docfac.hxx>
#include <sfx2/ipclient.hxx>
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include "appbas.hxx"
#include <sfx2/objitem.hxx>
-#include "viewfac.hxx"
+#include "sfx2/viewfac.hxx"
#include <sfx2/event.hxx>
#include "fltfnc.hxx"
#include <sfx2/docfile.hxx>
@@ -145,7 +147,7 @@ namespace css = ::com::sun::star;
#include "workwin.hxx"
#include "helper.hxx"
#include "macro.hxx"
-#include "minfitem.hxx"
+#include "sfx2/minfitem.hxx"
#include "../appl/app.hrc"
#include "impviewframe.hxx"
@@ -604,7 +606,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
bForEdit = !bForEdit;
// If possible ask the User
- sal_Bool bDo = ( GetViewShell()->PrepareClose() != FALSE );
+ sal_Bool bDo = ( GetViewShell()->PrepareClose() != sal_False );
SFX_REQUEST_ARG(rReq, pSilentItem, SfxBoolItem, SID_SILENT, sal_False);
if ( bDo && GetFrame().DocIsModified_Impl() &&
!rReq.IsAPI() && ( !pSilentItem || !pSilentItem->GetValue() ) )
@@ -631,7 +633,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
// 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;
+ typedef ::std::pair< Reference< XFrame >, sal_uInt16 > ViewDescriptor;
::std::list< ViewDescriptor > aViewFrames;
SfxViewFrame *pView = GetFirst( xOldObj );
while ( pView )
@@ -707,9 +709,9 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
if ( pSilentItem && pSilentItem->GetValue() )
pNewSet->Put( SfxBoolItem( SID_SILENT, sal_True ) );
- SFX_ITEMSET_ARG(pNewSet, pInteractionItem, SfxUnoAnyItem, SID_INTERACTIONHANDLER, FALSE);
- SFX_ITEMSET_ARG(pNewSet, pMacroExecItem , SfxUInt16Item, SID_MACROEXECMODE , FALSE);
- SFX_ITEMSET_ARG(pNewSet, pDocTemplateItem, SfxUInt16Item, SID_UPDATEDOCMODE , FALSE);
+ SFX_ITEMSET_ARG(pNewSet, pInteractionItem, SfxUnoAnyItem, SID_INTERACTIONHANDLER, sal_False);
+ SFX_ITEMSET_ARG(pNewSet, pMacroExecItem , SfxUInt16Item, SID_MACROEXECMODE , sal_False);
+ SFX_ITEMSET_ARG(pNewSet, pDocTemplateItem, SfxUInt16Item, SID_UPDATEDOCMODE , sal_False);
if (!pInteractionItem)
{
@@ -950,7 +952,7 @@ void SfxViewFrame::ExecHistory_Impl( SfxRequest &rReq )
{
// Is there an Undo-Manager on the top Shell?
SfxShell *pSh = GetDispatcher()->GetShell(0);
- SfxUndoManager* pShUndoMgr = pSh->GetUndoManager();
+ ::svl::IUndoManager* pShUndoMgr = pSh->GetUndoManager();
sal_Bool bOK = sal_False;
if ( pShUndoMgr )
{
@@ -962,20 +964,20 @@ void SfxViewFrame::ExecHistory_Impl( SfxRequest &rReq )
break;
case SID_UNDO:
- pShUndoMgr->Undo(0);
+ pShUndoMgr->Undo();
GetBindings().InvalidateAll(sal_False);
bOK = sal_True;
break;
case SID_REDO:
- pShUndoMgr->Redo(0);
+ pShUndoMgr->Redo();
GetBindings().InvalidateAll(sal_False);
bOK = sal_True;
break;
case SID_REPEAT:
if ( pSh->GetRepeatTarget() )
- pShUndoMgr->Repeat( *pSh->GetRepeatTarget(), 0);
+ pShUndoMgr->Repeat( *pSh->GetRepeatTarget() );
bOK = sal_True;
break;
}
@@ -1001,7 +1003,7 @@ void SfxViewFrame::StateHistory_Impl( SfxItemSet &rSet )
// I'm just on reload and am yielding myself ...
return;
- SfxUndoManager *pShUndoMgr = pSh->GetUndoManager();
+ ::svl::IUndoManager *pShUndoMgr = pSh->GetUndoManager();
if ( !pShUndoMgr )
{
// The SW has its own undo in the View
@@ -1020,8 +1022,8 @@ void SfxViewFrame::StateHistory_Impl( SfxItemSet &rSet )
if ( pShUndoMgr && pShUndoMgr->GetUndoActionCount() )
{
- String aTmp( SfxResId( STR_UNDO ) );
- aTmp += pShUndoMgr->GetUndoActionComment(0);
+ String aTmp( SvtResId( STR_UNDO ) );
+ aTmp+= pShUndoMgr->GetUndoActionComment(0);
rSet.Put( SfxStringItem( SID_UNDO, aTmp ) );
}
else
@@ -1029,7 +1031,7 @@ void SfxViewFrame::StateHistory_Impl( SfxItemSet &rSet )
if ( pShUndoMgr && pShUndoMgr->GetRedoActionCount() )
{
- String aTmp( SfxResId(STR_REDO) );
+ String aTmp( SvtResId(STR_REDO) );
aTmp += pShUndoMgr->GetRedoActionComment(0);
rSet.Put( SfxStringItem( SID_REDO, aTmp ) );
}
@@ -1037,10 +1039,10 @@ void SfxViewFrame::StateHistory_Impl( SfxItemSet &rSet )
rSet.DisableItem( SID_REDO );
SfxRepeatTarget *pTarget = pSh->GetRepeatTarget();
if ( pShUndoMgr && pTarget && pShUndoMgr->GetRepeatActionCount() &&
- pShUndoMgr->CanRepeat(*pTarget, 0) )
+ pShUndoMgr->CanRepeat(*pTarget) )
{
- String aTmp( SfxResId(STR_REPEAT) );
- aTmp += pShUndoMgr->GetRepeatActionComment(*pTarget, 0);
+ String aTmp( SvtResId(STR_REPEAT) );
+ aTmp += pShUndoMgr->GetRepeatActionComment(*pTarget);
rSet.Put( SfxStringItem( SID_REPEAT, aTmp ) );
}
else
@@ -1173,10 +1175,6 @@ void SfxViewFrame::DoActivate( sal_Bool bUI, SfxViewFrame* pOldFrame )
DBG_CHKTHIS(SfxViewFrame, 0);
SFX_APP();
-#ifdef WIN
- pSfxApp->TestFreeResources_Impl();
-#endif
-
pDispatcher->DoActivate_Impl( bUI, pOldFrame );
// If this ViewFrame has got a parent and this is not a parent of the
@@ -1212,9 +1210,6 @@ void SfxViewFrame::DoDeactivate(sal_Bool bUI, SfxViewFrame* pNewFrame )
pFrame = pFrame->GetParentViewFrame();
}
}
-#ifdef WIN
- pSfxApp->TestFreeResources_Impl();
-#endif
}
//------------------------------------------------------------------------
@@ -1804,7 +1799,7 @@ void SfxViewFrame::Enable( sal_Bool bEnable )
if ( !bEnable )
pImp->bWindowWasEnabled = pWindow->IsInputEnabled();
if ( !bEnable || pImp->bWindowWasEnabled )
- pWindow->EnableInput( bEnable, TRUE );
+ pWindow->EnableInput( bEnable, sal_True );
}
// cursor and focus
@@ -1861,8 +1856,8 @@ void SfxViewFrame::Show()
if ( xObjSh.Is() && xObjSh->Get_Impl()->bHiddenLockedByAPI )
{
- xObjSh->Get_Impl()->bHiddenLockedByAPI = FALSE;
- xObjSh->OwnerLock(FALSE);
+ xObjSh->Get_Impl()->bHiddenLockedByAPI = sal_False;
+ xObjSh->OwnerLock(sal_False);
}
}
@@ -1891,7 +1886,7 @@ void SfxViewFrame::LockObjectShell_Impl( sal_Bool bLock )
}
//--------------------------------------------------------------------
-void SfxViewFrame::MakeActive_Impl( BOOL bGrabFocus )
+void SfxViewFrame::MakeActive_Impl( sal_Bool bGrabFocus )
{
if ( GetViewShell() && !GetFrame().IsClosing_Impl() )
{
@@ -1899,10 +1894,10 @@ void SfxViewFrame::MakeActive_Impl( BOOL bGrabFocus )
{
if ( GetViewShell() )
{
- BOOL bPreview = FALSE;
+ sal_Bool bPreview = sal_False;
if ( GetObjectShell()->IsPreview() )
{
- bPreview = TRUE;
+ bPreview = sal_True;
}
else
{
@@ -1935,7 +1930,7 @@ void SfxViewFrame::MakeActive_Impl( BOOL bGrabFocus )
{
GetBindings().SetDispatcher( GetDispatcher() );
GetBindings().SetActiveFrame( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > () );
- GetDispatcher()->Update_Impl( FALSE );
+ GetDispatcher()->Update_Impl( sal_False );
}
}
}
@@ -1988,7 +1983,7 @@ 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 )
+ const sal_uInt16 i_nViewId, const bool i_bHidden )
{
Reference< XFrame > xFrame( i_rFrame );
bool bOwnFrame = false;
@@ -2061,7 +2056,7 @@ SfxViewFrame* SfxViewFrame::LoadViewIntoFrame_Impl_NoThrow( const SfxObjectShell
//--------------------------------------------------------------------
SfxViewShell* SfxViewFrame::LoadViewIntoFrame_Impl( const SfxObjectShell& i_rDoc, const Reference< XFrame >& i_rFrame,
- const Sequence< PropertyValue >& i_rLoadArgs, const USHORT i_nViewId,
+ const Sequence< PropertyValue >& i_rLoadArgs, const sal_uInt16 i_nViewId,
const bool i_bHidden )
{
Reference< XModel > xDocument( i_rDoc.GetModel(), UNO_SET_THROW );
@@ -2091,37 +2086,37 @@ SfxViewShell* SfxViewFrame::LoadViewIntoFrame_Impl( const SfxObjectShell& i_rDoc
//--------------------------------------------------------------------
-SfxViewFrame* SfxViewFrame::LoadHiddenDocument( SfxObjectShell& i_rDoc, const USHORT i_nViewId )
+SfxViewFrame* SfxViewFrame::LoadHiddenDocument( SfxObjectShell& i_rDoc, const sal_uInt16 i_nViewId )
{
return LoadViewIntoFrame_Impl_NoThrow( i_rDoc, Reference< XFrame >(), i_nViewId, true );
}
//--------------------------------------------------------------------
-SfxViewFrame* SfxViewFrame::LoadDocument( SfxObjectShell& i_rDoc, const USHORT i_nViewId )
+SfxViewFrame* SfxViewFrame::LoadDocument( SfxObjectShell& i_rDoc, const sal_uInt16 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 )
+SfxViewFrame* SfxViewFrame::LoadDocumentIntoFrame( SfxObjectShell& i_rDoc, const Reference< XFrame >& i_rTargetFrame, const sal_uInt16 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 )
+SfxViewFrame* SfxViewFrame::LoadDocumentIntoFrame( SfxObjectShell& i_rDoc, const SfxFrameItem* i_pFrameItem, const sal_uInt16 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 )
+SfxViewFrame* SfxViewFrame::DisplayNewDocument( SfxObjectShell& i_rDoc, const SfxRequest& i_rCreateDocRequest, const sal_uInt16 i_nViewId )
{
- SFX_REQUEST_ARG( i_rCreateDocRequest, pFrameItem, SfxUnoFrameItem, SID_FILLFRAME, FALSE );
- SFX_REQUEST_ARG( i_rCreateDocRequest, pHiddenItem, SfxBoolItem, SID_HIDDEN, FALSE );
+ SFX_REQUEST_ARG( i_rCreateDocRequest, pFrameItem, SfxUnoFrameItem, SID_FILLFRAME, sal_False );
+ SFX_REQUEST_ARG( i_rCreateDocRequest, pHiddenItem, SfxBoolItem, SID_HIDDEN, sal_False );
return LoadViewIntoFrame_Impl_NoThrow(
i_rDoc,
@@ -2153,9 +2148,9 @@ SfxViewFrame* SfxViewFrame::Get( const Reference< XController>& i_rController, c
}
SfxViewFrame* pViewFrame = NULL;
- for ( pViewFrame = SfxViewFrame::GetFirst( pDoc, FALSE );
+ for ( pViewFrame = SfxViewFrame::GetFirst( pDoc, sal_False );
pViewFrame;
- pViewFrame = SfxViewFrame::GetNext( *pViewFrame, pDoc, FALSE )
+ pViewFrame = SfxViewFrame::GetNext( *pViewFrame, pDoc, sal_False )
)
{
if ( pViewFrame->GetViewShell()->GetController() == i_rController )
@@ -2167,7 +2162,7 @@ SfxViewFrame* SfxViewFrame::Get( const Reference< XController>& i_rController, c
//--------------------------------------------------------------------
-void SfxViewFrame::SaveCurrentViewData_Impl( const USHORT i_nNewViewId )
+void SfxViewFrame::SaveCurrentViewData_Impl( const sal_uInt16 i_nNewViewId )
{
SfxViewShell* pCurrentShell = GetViewShell();
ENSURE_OR_RETURN_VOID( pCurrentShell != NULL, "SfxViewFrame::SaveCurrentViewData_Impl: no current view shell -> no current view data!" );
@@ -2278,7 +2273,7 @@ sal_Bool SfxViewFrame::SwitchToViewShell_Impl
if ( pOldSh )
{
// ask wether it can be closed
- if ( !pOldSh->PrepareClose( TRUE ) )
+ if ( !pOldSh->PrepareClose( sal_True ) )
return sal_False;
// remove sub shells from Dispatcher before switching to new ViewShell
@@ -2290,7 +2285,7 @@ sal_Bool SfxViewFrame::SwitchToViewShell_Impl
// ID of the new view
SfxObjectFactory& rDocFact = GetObjectShell()->GetFactory();
- const USHORT nViewId = ( bIsIndex || !nViewIdOrNo ) ? rDocFact.GetViewFactory( nViewIdOrNo ).GetOrdinal() : nViewIdOrNo;
+ const sal_uInt16 nViewId = ( bIsIndex || !nViewIdOrNo ) ? rDocFact.GetViewFactory( nViewIdOrNo ).GetOrdinal() : nViewIdOrNo;
// save the view data of the old view, so it can be restored later on (when needed)
SaveCurrentViewData_Impl( nViewId );
@@ -2326,7 +2321,7 @@ sal_Bool SfxViewFrame::SwitchToViewShell_Impl
}
//-------------------------------------------------------------------------
-void SfxViewFrame::SetCurViewId_Impl( const USHORT i_nID )
+void SfxViewFrame::SetCurViewId_Impl( const sal_uInt16 i_nID )
{
pImp->nCurViewId = i_nID;
}
@@ -2374,7 +2369,7 @@ void SfxViewFrame::ExecView_Impl
)
{
const sal_uInt16 nViewId = static_cast< const SfxUInt16Item* >( pItem )->GetValue();
- BOOL bSuccess = SwitchToViewShell_Impl( nViewId );
+ sal_Bool bSuccess = SwitchToViewShell_Impl( nViewId );
rReq.SetReturnValue( SfxBoolItem( 0, bSuccess ) );
}
break;
@@ -2387,7 +2382,7 @@ void SfxViewFrame::ExecView_Impl
case SID_VIEWSHELL4:
{
const sal_uInt16 nViewNo = rReq.GetSlot() - SID_VIEWSHELL0;
- BOOL bSuccess = SwitchToViewShell_Impl( nViewNo, sal_True );
+ sal_Bool bSuccess = SwitchToViewShell_Impl( nViewNo, sal_True );
rReq.SetReturnValue( SfxBoolItem( 0, bSuccess ) );
break;
}
@@ -2410,7 +2405,7 @@ void SfxViewFrame::ExecView_Impl
// 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();
+ const sal_uInt16 nViewId = pViewIdItem ? pViewIdItem->GetValue() : GetCurViewId();
Reference < XFrame > xFrame;
// the frame (optional arg. TODO: this is currently not supported in the slot definition ...)
@@ -2655,12 +2650,12 @@ void SfxViewFrame::SetModalMode( sal_Bool bModal )
}
}
-BOOL SfxViewFrame::IsInModalMode() const
+sal_Bool SfxViewFrame::IsInModalMode() const
{
return pImp->bModal || GetFrame().GetWindow().IsInModalMode();
}
-void SfxViewFrame::Resize( BOOL bForce )
+void SfxViewFrame::Resize( sal_Bool bForce )
{
Size aSize = GetWindow().GetOutputSizePixel();
if ( bForce || aSize != pImp->aSize )
@@ -2684,7 +2679,7 @@ void SfxViewFrame::Resize( BOOL bForce )
#define LINE_SEP 0x0A
-void CutLines( ::rtl::OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, BOOL bEraseTrailingEmptyLines )
+void CutLines( ::rtl::OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, sal_Bool bEraseTrailingEmptyLines )
{
sal_Int32 nStartPos = 0;
sal_Int32 nLine = 0;
@@ -2742,7 +2737,7 @@ void SfxViewFrame::AddDispatchMacroToBasic_Impl( const ::rtl::OUString& sMacro )
SfxApplication* pSfxApp = SFX_APP();
SfxRequest aReq( SID_BASICCHOOSER, SFX_CALLMODE_SYNCHRON, pSfxApp->GetPool() );
- aReq.AppendItem( SfxBoolItem(SID_RECORDMACRO,TRUE) );
+ aReq.AppendItem( SfxBoolItem(SID_RECORDMACRO,sal_True) );
const SfxPoolItem* pRet = SFX_APP()->ExecuteSlot( aReq );
String aScriptURL;
if ( pRet )
@@ -2779,8 +2774,6 @@ void SfxViewFrame::AddDispatchMacroToBasic_Impl( const ::rtl::OUString& sMacro )
}
}
- pSfxApp->EnterBasicCall();
-
BasicManager* pBasMgr = 0;
if ( aLocation.EqualsIgnoreCaseAscii( "application" ) )
{
@@ -2803,11 +2796,11 @@ void SfxViewFrame::AddDispatchMacroToBasic_Impl( const ::rtl::OUString& sMacro )
{
SbMethod* pMethod = (SbMethod*)pModule->GetMethods()->Find( aMacroName, SbxCLASS_METHOD );
aOUSource = pModule->GetSource32();
- USHORT nStart, nEnd;
+ sal_uInt16 nStart, nEnd;
pMethod->GetLineRange( nStart, nEnd );
- ULONG nlStart = nStart;
- ULONG nlEnd = nEnd;
- CutLines( aOUSource, nlStart-1, nlEnd-nlStart+1, TRUE );
+ sal_uIntPtr nlStart = nStart;
+ sal_uIntPtr nlEnd = nEnd;
+ CutLines( aOUSource, nlStart-1, nlEnd-nlStart+1, sal_True );
}
}
}
@@ -2855,7 +2848,7 @@ void SfxViewFrame::AddDispatchMacroToBasic_Impl( const ::rtl::OUString& sMacro )
::rtl::OUString sCode;
::rtl::OUStringBuffer sRoutine(10000);
::rtl::OUString sMacroName( aMacroName );
- BOOL bReplace = FALSE;
+ sal_Bool bReplace = sal_False;
// get module
::rtl::OUString sModule( aModuleName );
@@ -2872,7 +2865,7 @@ void SfxViewFrame::AddDispatchMacroToBasic_Impl( const ::rtl::OUString& sMacro )
sRoutine.append( sCode );
}
- bReplace = TRUE;
+ bReplace = sal_True;
}
// append new method
@@ -2913,8 +2906,6 @@ void SfxViewFrame::AddDispatchMacroToBasic_Impl( const ::rtl::OUString& sMacro )
}
}
}
-
- pSfxApp->LeaveBasicCall();
}
else
{
@@ -2945,7 +2936,7 @@ void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq )
if (xSupplier.is())
xRecorder = xSupplier->getDispatchRecorder();
- BOOL bIsRecording = xRecorder.is();
+ sal_Bool bIsRecording = xRecorder.is();
SFX_REQUEST_ARG( rReq, pItem, SfxBoolItem, SID_RECORDMACRO, sal_False);
if ( pItem && pItem->GetValue() == bIsRecording )
return;
@@ -2965,7 +2956,7 @@ void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq )
xRecorder = NULL;
GetBindings().SetRecorder_Impl( xRecorder );
- SetChildWindow( SID_RECORDING_FLOATWINDOW, FALSE );
+ SetChildWindow( SID_RECORDING_FLOATWINDOW, sal_False );
if ( rReq.GetSlot() != SID_RECORDMACRO )
GetBindings().Invalidate( SID_RECORDMACRO );
}
@@ -2989,7 +2980,7 @@ void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq )
aProp <<= xSupplier;
xSet->setPropertyValue(sProperty,aProp);
GetBindings().SetRecorder_Impl( xRecorder );
- SetChildWindow( SID_RECORDING_FLOATWINDOW, TRUE );
+ SetChildWindow( SID_RECORDING_FLOATWINDOW, sal_True );
}
rReq.Done();
@@ -3020,8 +3011,8 @@ void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq )
{
rtl::OUString aStatusbarResString( RTL_CONSTASCII_USTRINGPARAM( "private:resource/statusbar/statusbar" ));
// Evaluate parameter.
- SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, rReq.GetSlot(), FALSE);
- BOOL bShow( TRUE );
+ SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, rReq.GetSlot(), sal_False);
+ sal_Bool bShow( sal_True );
if ( !pShowItem )
bShow = xLayoutManager->isElementVisible( aStatusbarResString );
else
@@ -3045,7 +3036,7 @@ void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq )
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
case SID_WIN_FULLSCREEN:
{
- SFX_REQUEST_ARG(rReq, pItem, SfxBoolItem, rReq.GetSlot(), FALSE);
+ SFX_REQUEST_ARG(rReq, pItem, SfxBoolItem, rReq.GetSlot(), sal_False);
SfxViewFrame *pTop = GetTopViewFrame();
if ( pTop )
{
@@ -3070,7 +3061,7 @@ void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq )
}
}
- BOOL bNewFullScreenMode = pItem ? pItem->GetValue() : !pWork->IsFullScreenMode();
+ sal_Bool bNewFullScreenMode = pItem ? pItem->GetValue() : !pWork->IsFullScreenMode();
if ( bNewFullScreenMode != pWork->IsFullScreenMode() )
{
Reference< ::com::sun::star::beans::XPropertySet > xLMPropSet( xLayoutManager, UNO_QUERY );
@@ -3100,24 +3091,21 @@ void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq )
else
rReq.Ignore();
- GetDispatcher()->Update_Impl( TRUE );
+ GetDispatcher()->Update_Impl( sal_True );
break;
}
}
-
- if ( bDone )
- rReq.Done();
}
void SfxViewFrame::MiscState_Impl(SfxItemSet &rSet)
{
DBG_MEMTEST();
- const USHORT *pRanges = rSet.GetRanges();
+ const sal_uInt16 *pRanges = rSet.GetRanges();
DBG_ASSERT(pRanges && *pRanges, "Set without range");
while ( *pRanges )
{
- for(USHORT nWhich = *pRanges++; nWhich <= *pRanges; ++nWhich)
+ for(sal_uInt16 nWhich = *pRanges++; nWhich <= *pRanges; ++nWhich)
{
switch(nWhich)
{
@@ -3189,11 +3177,11 @@ void SfxViewFrame::MiscState_Impl(SfxItemSet &rSet)
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LayoutManager" )) );
if ( !( aProp >>= xLayoutManager ))
- rSet.Put( SfxBoolItem( nWhich, FALSE ));
+ rSet.Put( SfxBoolItem( nWhich, sal_False ));
else
{
rtl::OUString aStatusbarResString( RTL_CONSTASCII_USTRINGPARAM( "private:resource/statusbar/statusbar" ));
- BOOL bShow = xLayoutManager->isElementVisible( aStatusbarResString );
+ sal_Bool bShow = xLayoutManager->isElementVisible( aStatusbarResString );
rSet.Put( SfxBoolItem( nWhich, bShow ));
}
break;
@@ -3244,17 +3232,17 @@ void SfxViewFrame::ChildWindowExecute( SfxRequest &rReq )
{
// Evaluate Parameter
- USHORT nSID = rReq.GetSlot();
+ sal_uInt16 nSID = rReq.GetSlot();
- SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, nSID, FALSE);
+ SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, nSID, sal_False);
if ( nSID == SID_VIEW_DATA_SOURCE_BROWSER )
{
if (!SvtModuleOptions().IsModuleInstalled(SvtModuleOptions::E_SDATABASE))
return;
Reference < XFrame > xFrame = GetFrame().GetTopFrame().GetFrameInterface();
Reference < XFrame > xBeamer( xFrame->findFrame( DEFINE_CONST_UNICODE("_beamer"), FrameSearchFlag::CHILDREN ) );
- BOOL bShow = FALSE;
- BOOL bHasChild = xBeamer.is();
+ sal_Bool bShow = sal_False;
+ sal_Bool bHasChild = xBeamer.is();
bShow = pShowItem ? pShowItem->GetValue() : !bHasChild;
if ( pShowItem )
{
@@ -3266,7 +3254,7 @@ void SfxViewFrame::ChildWindowExecute( SfxRequest &rReq )
if ( !bShow )
{
- SetChildWindow( SID_BROWSER, FALSE );
+ SetChildWindow( SID_BROWSER, sal_False );
}
else
{
@@ -3293,8 +3281,8 @@ void SfxViewFrame::ChildWindowExecute( SfxRequest &rReq )
return;
}
- BOOL bShow = FALSE;
- BOOL bHasChild = HasChildWindow(nSID);
+ sal_Bool bShow = sal_False;
+ sal_Bool bHasChild = HasChildWindow(nSID);
bShow = pShowItem ? pShowItem->GetValue() : !bHasChild;
// Perform action.
@@ -3302,7 +3290,7 @@ void SfxViewFrame::ChildWindowExecute( SfxRequest &rReq )
ToggleChildWindow( nSID );
GetBindings().Invalidate( nSID );
- GetDispatcher()->Update_Impl( TRUE );
+ GetDispatcher()->Update_Impl( sal_True );
// Record if possible.
if ( nSID == SID_HYPERLINK_DIALOG || nSID == SID_SEARCH_DLG )
@@ -3330,7 +3318,7 @@ void SfxViewFrame::ChildWindowState( SfxItemSet& rState )
{
SfxWhichIter aIter( rState );
- for ( USHORT nSID = aIter.FirstWhich(); nSID; nSID = aIter.NextWhich() )
+ for ( sal_uInt16 nSID = aIter.FirstWhich(); nSID; nSID = aIter.NextWhich() )
{
if ( nSID == SID_VIEW_DATA_SOURCE_BROWSER )
{
@@ -3383,14 +3371,14 @@ void SfxViewFrame::ChildWindowState( SfxItemSet& rState )
}
//--------------------------------------------------------------------
-SfxWorkWindow* SfxViewFrame::GetWorkWindow_Impl( USHORT /*nId*/ )
+SfxWorkWindow* SfxViewFrame::GetWorkWindow_Impl( sal_uInt16 /*nId*/ )
{
SfxWorkWindow* pWork = 0;
pWork = GetFrame().GetWorkWindow_Impl();
return pWork;
}
-void SfxViewFrame::SetChildWindow(USHORT nId, BOOL bOn, BOOL bSetFocus )
+void SfxViewFrame::SetChildWindow(sal_uInt16 nId, sal_Bool bOn, sal_Bool bSetFocus )
{
SfxWorkWindow* pWork = GetWorkWindow_Impl( nId );
if ( pWork )
@@ -3399,44 +3387,44 @@ void SfxViewFrame::SetChildWindow(USHORT nId, BOOL bOn, BOOL bSetFocus )
//--------------------------------------------------------------------
-void SfxViewFrame::ToggleChildWindow(USHORT nId)
+void SfxViewFrame::ToggleChildWindow(sal_uInt16 nId)
{
SfxWorkWindow* pWork = GetWorkWindow_Impl( nId );
if ( pWork )
- pWork->ToggleChildWindow_Impl( nId, TRUE );
+ pWork->ToggleChildWindow_Impl( nId, sal_True );
}
//--------------------------------------------------------------------
-BOOL SfxViewFrame::HasChildWindow( USHORT nId )
+sal_Bool SfxViewFrame::HasChildWindow( sal_uInt16 nId )
{
SfxWorkWindow* pWork = GetWorkWindow_Impl( nId );
- return pWork ? pWork->HasChildWindow_Impl(nId) : FALSE;
+ return pWork ? pWork->HasChildWindow_Impl(nId) : sal_False;
}
//--------------------------------------------------------------------
-BOOL SfxViewFrame::KnowsChildWindow( USHORT nId )
+sal_Bool SfxViewFrame::KnowsChildWindow( sal_uInt16 nId )
{
SfxWorkWindow* pWork = GetWorkWindow_Impl( nId );
- return pWork ? pWork->KnowsChildWindow_Impl(nId) : FALSE;
+ return pWork ? pWork->KnowsChildWindow_Impl(nId) : sal_False;
}
//--------------------------------------------------------------------
-void SfxViewFrame::ShowChildWindow( USHORT nId, BOOL bVisible )
+void SfxViewFrame::ShowChildWindow( sal_uInt16 nId, sal_Bool bVisible )
{
SfxWorkWindow* pWork = GetWorkWindow_Impl( nId );
if ( pWork )
{
GetDispatcher()->Update_Impl(sal_True);
- pWork->ShowChildWindow_Impl(nId, bVisible, TRUE );
+ pWork->ShowChildWindow_Impl(nId, bVisible, sal_True );
}
}
//--------------------------------------------------------------------
-SfxChildWindow* SfxViewFrame::GetChildWindow(USHORT nId)
+SfxChildWindow* SfxViewFrame::GetChildWindow(sal_uInt16 nId)
{
SfxWorkWindow* pWork = GetWorkWindow_Impl( nId );
return pWork ? pWork->GetChildWindow_Impl(nId) : NULL;
diff --git a/sfx2/source/view/viewfrm2.cxx b/sfx2/source/view/viewfrm2.cxx
index d32c31ff15ac..b43051b22d45 100644..100755
--- a/sfx2/source/view/viewfrm2.cxx
+++ b/sfx2/source/view/viewfrm2.cxx
@@ -31,7 +31,7 @@
#include "impviewframe.hxx"
#include "statcach.hxx"
-#include "viewfac.hxx"
+#include "sfx2/viewfac.hxx"
#include "workwin.hxx"
#include "sfx2/app.hxx"
@@ -278,17 +278,17 @@ void SfxViewFrame::Exec_Impl(SfxRequest &rReq )
{
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;
+ SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, SID_SHOWPOPUPS, sal_False);
+ sal_Bool bShow = pShowItem ? pShowItem->GetValue() : sal_True;
+ SFX_REQUEST_ARG(rReq, pIdItem, SfxUInt16Item, SID_CONFIGITEMID, sal_False);
+ sal_uInt16 nId = pIdItem ? pIdItem->GetValue() : 0;
SfxWorkWindow *pWorkWin = GetFrame().GetWorkWindow_Impl();
if ( bShow )
{
// First, make the floats viewable
pWorkWin->MakeChildsVisible_Impl( bShow );
- GetDispatcher()->Update_Impl( TRUE );
+ GetDispatcher()->Update_Impl( sal_True );
// Then view it
GetBindings().HidePopups( !bShow );
@@ -303,7 +303,7 @@ void SfxViewFrame::Exec_Impl(SfxRequest &rReq )
pBind = pBind->GetSubBindings_Impl();
}
- pWorkWin->HidePopups_Impl( !bShow, TRUE, nId );
+ pWorkWin->HidePopups_Impl( !bShow, sal_True, nId );
pWorkWin->MakeChildsVisible_Impl( bShow );
}
@@ -314,14 +314,14 @@ void SfxViewFrame::Exec_Impl(SfxRequest &rReq )
case SID_ACTIVATE:
{
- MakeActive_Impl( TRUE );
+ MakeActive_Impl( sal_True );
rReq.SetReturnValue( SfxObjectItem( 0, this ) );
break;
}
case SID_NEWDOCDIRECT :
{
- SFX_REQUEST_ARG( rReq, pFactoryItem, SfxStringItem, SID_NEWDOCDIRECT, FALSE);
+ SFX_REQUEST_ARG( rReq, pFactoryItem, SfxStringItem, SID_NEWDOCDIRECT, sal_False);
String aFactName;
if ( pFactoryItem )
aFactName = pFactoryItem->GetValue();
@@ -365,11 +365,11 @@ void SfxViewFrame::Exec_Impl(SfxRequest &rReq )
// Document only needs to be queried, if no other View present.
sal_Bool bClosed = sal_False;
- sal_Bool bUI = TRUE;
+ sal_Bool bUI = sal_True;
if ( ( bOther || pDocSh->PrepareClose( bUI ) ) )
{
if ( !bOther )
- pDocSh->SetModified( FALSE );
+ pDocSh->SetModified( sal_False );
rReq.Done(); // Must call this before Close()!
bClosed = sal_False;
try
@@ -439,7 +439,7 @@ void SfxViewFrame::GetState_Impl( SfxItemSet &rSet )
{
uno::Any aAny;
aAny <<= GetViewShell()->GetVerbs();
- rSet.Put( SfxUnoAnyItem( USHORT( SID_OBJECT ), aAny ) );
+ rSet.Put( SfxUnoAnyItem( sal_uInt16( SID_OBJECT ), aAny ) );
}
else
rSet.DisableItem( SID_OBJECT );
diff --git a/sfx2/source/view/viewimp.hxx b/sfx2/source/view/viewimp.hxx
index c0d9c021a42d..edd5495a33ef 100644..100755
--- a/sfx2/source/view/viewimp.hxx
+++ b/sfx2/source/view/viewimp.hxx
@@ -26,8 +26,8 @@
*
************************************************************************/
-#ifndef _VIEWIMP_HXX
-#define _VIEWIMP_HXX
+#ifndef SFX_VIEWIMP_HXX
+#define SFX_VIEWIMP_HXX
// include ---------------------------------------------------------------
@@ -57,28 +57,29 @@ struct SfxViewShell_Impl
{
::osl::Mutex aMutex;
::cppu::OInterfaceContainerHelper aInterceptorContainer;
- BOOL bControllerSet;
+ bool m_bControllerSet;
SfxShellArr_Impl aArr;
SvBorder aBorder;
Size aOptimalSize;
Size aMargin;
- USHORT nPrinterLocks;
- BOOL bCanPrint;
- BOOL bHasPrintOptions;
- BOOL bPlugInsActive;
- BOOL bIsShowView;
- BOOL bOwnsMenu;
- BOOL bGotOwnerShip;
- BOOL bGotFrameOwnerShip;
- SfxScrollingMode eScroll;
- USHORT nFamily;
- SfxBaseController* pController;
- ::svt::AcceleratorExecute* pAccExec;
+ sal_uInt16 m_nPrinterLocks;
+ bool m_bCanPrint;
+ bool m_bHasPrintOptions;
+ bool m_bPlugInsActive;
+ bool m_bIsShowView;
+ // FIXME UNUSED ???
+ //bool m_bOwnsMenu;
+ bool m_bGotOwnership;
+ bool m_bGotFrameOwnership;
+ SfxScrollingMode m_eScroll;
+ sal_uInt16 m_nFamily;
+ ::rtl::Reference<SfxBaseController> m_pController;
+ ::std::auto_ptr< ::svt::AcceleratorExecute > m_pAccExec;
com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue > aPrintOpts;
::rtl::Reference< SfxClipboardChangeListener > xClipboardListener;
::boost::shared_ptr< vcl::PrinterController > m_pPrinterController;
- SfxViewShell_Impl();
+ SfxViewShell_Impl(sal_uInt16 const nFlags);
};
#endif
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index 001a0019de7e..4c02651073c2 100644..100755
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -35,7 +35,6 @@
#include <svl/itempool.hxx>
#include <vcl/msgbox.hxx>
-#include <svtools/printdlg.hxx>
#include <svtools/prnsetup.hxx>
#include <svl/flagitem.hxx>
#include <svl/stritem.hxx>
@@ -51,7 +50,7 @@
#include "viewimp.hxx"
#include <sfx2/viewfrm.hxx>
#include <sfx2/prnmon.hxx>
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include <sfx2/request.hxx>
#include <sfx2/objsh.hxx>
#include "sfxtypes.hxx"
@@ -353,30 +352,6 @@ void SfxPrinterController::jobFinished( com::sun::star::view::PrintableState nSt
}
}
-// -----------------------------------------------------------------------
-
-void DisableRanges( PrintDialog& rDlg, SfxPrinter* pPrinter )
-
-/* [Description]
-
- This function forwards the non-available ranges from the printer
- to the print dialog.
-*/
-
-{
- if ( !pPrinter )
- return;
-
- if ( !pPrinter->IsRangeEnabled( PRINTDIALOG_ALL ) )
- rDlg.DisableRange( PRINTDIALOG_ALL );
- if ( !pPrinter->IsRangeEnabled( PRINTDIALOG_SELECTION ) )
- rDlg.DisableRange( PRINTDIALOG_SELECTION );
- if ( !pPrinter->IsRangeEnabled( PRINTDIALOG_FROMTO ) )
- rDlg.DisableRange( PRINTDIALOG_FROMTO );
- if ( !pPrinter->IsRangeEnabled( PRINTDIALOG_RANGE ) )
- rDlg.DisableRange( PRINTDIALOG_RANGE );
-}
-
//====================================================================
class SfxDialogExecutor_Impl
@@ -392,7 +367,6 @@ class SfxDialogExecutor_Impl
{
private:
SfxViewShell* _pViewSh;
- PrintDialog* _pPrintParent;
PrinterSetupDialog* _pSetupParent;
SfxItemSet* _pOptions;
sal_Bool _bModified;
@@ -401,7 +375,6 @@ private:
DECL_LINK( Execute, void * );
public:
- SfxDialogExecutor_Impl( SfxViewShell* pViewSh, PrintDialog* pParent );
SfxDialogExecutor_Impl( SfxViewShell* pViewSh, PrinterSetupDialog* pParent );
~SfxDialogExecutor_Impl() { delete _pOptions; }
@@ -412,22 +385,9 @@ public:
//--------------------------------------------------------------------
-SfxDialogExecutor_Impl::SfxDialogExecutor_Impl( SfxViewShell* pViewSh, PrintDialog* pParent ) :
-
- _pViewSh ( pViewSh ),
- _pPrintParent ( pParent ),
- _pSetupParent ( NULL ),
- _pOptions ( NULL ),
- _bModified ( sal_False ),
- _bHelpDisabled ( sal_False )
-
-{
-}
-
SfxDialogExecutor_Impl::SfxDialogExecutor_Impl( SfxViewShell* pViewSh, PrinterSetupDialog* pParent ) :
_pViewSh ( pViewSh ),
- _pPrintParent ( NULL ),
_pSetupParent ( pParent ),
_pOptions ( NULL ),
_bModified ( sal_False ),
@@ -443,27 +403,13 @@ IMPL_LINK( SfxDialogExecutor_Impl, Execute, void *, EMPTYARG )
// Options noted locally
if ( !_pOptions )
{
- DBG_ASSERT( _pPrintParent || _pSetupParent, "no dialog parent" );
- if( _pPrintParent )
- _pOptions = ( (SfxPrinter*)_pPrintParent->GetPrinter() )->GetOptions().Clone();
- else if( _pSetupParent )
+ DBG_ASSERT( _pSetupParent, "no dialog parent" );
+ if( _pSetupParent )
_pOptions = ( (SfxPrinter*)_pSetupParent->GetPrinter() )->GetOptions().Clone();
}
- if ( _pOptions && _pPrintParent && _pPrintParent->IsSheetRangeAvailable() )
- {
- SfxItemState eState = _pOptions->GetItemState( SID_PRINT_SELECTEDSHEET );
- if ( eState != SFX_ITEM_UNKNOWN )
- {
- PrintSheetRange eRange = _pPrintParent->GetCheckedSheetRange();
- BOOL bValue = ( PRINTSHEETS_ALL != eRange );
- _pOptions->Put( SfxBoolItem( SID_PRINT_SELECTEDSHEET, bValue ) );
- }
- }
-
// Create Dialog
- SfxPrintOptionsDialog* pDlg = new SfxPrintOptionsDialog( _pPrintParent ? static_cast<Window*>(_pPrintParent)
- : static_cast<Window*>(_pSetupParent),
+ SfxPrintOptionsDialog* pDlg = new SfxPrintOptionsDialog( static_cast<Window*>(_pSetupParent),
_pViewSh, _pOptions );
if ( _bHelpDisabled )
pDlg->DisableHelp();
@@ -472,15 +418,6 @@ IMPL_LINK( SfxDialogExecutor_Impl, Execute, void *, EMPTYARG )
delete _pOptions;
_pOptions = pDlg->GetOptions().Clone();
- if ( _pOptions && _pPrintParent && _pPrintParent->IsSheetRangeAvailable() )
- {
- const SfxPoolItem* pItem;
- if ( SFX_ITEM_SET == _pOptions->GetItemState( SID_PRINT_SELECTEDSHEET, FALSE , &pItem ) )
- {
- _pPrintParent->CheckSheetRange( ( (const SfxBoolItem*)pItem )->GetValue()
- ? PRINTSHEETS_SELECTED_SHEETS : PRINTSHEETS_ALL );
- }
- }
}
delete pDlg;
@@ -505,11 +442,11 @@ SfxPrinter* SfxViewShell::SetPrinter_Impl( SfxPrinter *pNewPrinter )
bool bSizeToDoc = false;
if ( &pDocPrinter->GetOptions() )
{
- USHORT nWhich = GetPool().GetWhich(SID_PRINTER_CHANGESTODOC);
+ sal_uInt16 nWhich = GetPool().GetWhich(SID_PRINTER_CHANGESTODOC);
const SfxFlagItem *pFlagItem = 0;
- pDocPrinter->GetOptions().GetItemState( nWhich, FALSE, (const SfxPoolItem**) &pFlagItem );
- bOriToDoc = pFlagItem ? (pFlagItem->GetValue() & SFX_PRINTER_CHG_ORIENTATION) : FALSE;
- bSizeToDoc = pFlagItem ? (pFlagItem->GetValue() & SFX_PRINTER_CHG_SIZE) : FALSE;
+ pDocPrinter->GetOptions().GetItemState( nWhich, sal_False, (const SfxPoolItem**) &pFlagItem );
+ bOriToDoc = pFlagItem ? (pFlagItem->GetValue() & SFX_PRINTER_CHG_ORIENTATION) : sal_False;
+ bSizeToDoc = pFlagItem ? (pFlagItem->GetValue() & SFX_PRINTER_CHG_SIZE) : sal_False;
}
// Determine the previous format and size
@@ -521,8 +458,8 @@ SfxPrinter* SfxViewShell::SetPrinter_Impl( SfxPrinter *pNewPrinter )
Size aNewPgSz = pNewPrinter->GetPaperSizePixel();
// Determine the changes in page format
- BOOL bOriChg = (eOldOri != eNewOri) && bOriToDoc;
- BOOL bPgSzChg = ( aOldPgSz.Height() !=
+ sal_Bool bOriChg = (eOldOri != eNewOri) && bOriToDoc;
+ sal_Bool bPgSzChg = ( aOldPgSz.Height() !=
( bOriChg ? aNewPgSz.Width() : aNewPgSz.Height() ) ||
aOldPgSz.Width() !=
( bOriChg ? aNewPgSz.Height() : aNewPgSz.Width() ) ) &&
@@ -530,7 +467,7 @@ SfxPrinter* SfxViewShell::SetPrinter_Impl( SfxPrinter *pNewPrinter )
// Message and Flags for page format, summaries changes
String aMsg;
- USHORT nNewOpt=0;
+ sal_uInt16 nNewOpt=0;
if( bOriChg && bPgSzChg )
{
aMsg = String(SfxResId(STR_PRINT_NEWORISIZE));
@@ -548,7 +485,7 @@ SfxPrinter* SfxViewShell::SetPrinter_Impl( SfxPrinter *pNewPrinter )
}
// Summaries in this variable what has been changed.
- USHORT nChangedFlags = 0;
+ sal_uInt16 nChangedFlags = 0;
// Ask if possible, if page format should be taken over from printer.
if ( ( bOriChg || bPgSzChg ) &&
@@ -638,7 +575,7 @@ void SfxViewShell::ExecPrint( const uno::Sequence < beans::PropertyValue >& rPro
makeAny( rtl::OUString( pObjShell->GetTitle(0) ) ) );
// FIXME: job setup
- SfxPrinter* pDocPrt = GetPrinter(FALSE);
+ SfxPrinter* pDocPrt = GetPrinter(sal_False);
JobSetup aJobSetup = pDocPrt ? pDocPrt->GetJobSetup() : GetJobSetup();
if( bIsDirect )
aJobSetup.SetValue( String( RTL_CONSTASCII_USTRINGPARAM( "IsQuickJob" ) ),
@@ -655,17 +592,16 @@ Printer* SfxViewShell::GetActivePrinter() const
void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
{
- // USHORT nCopies=1;
- USHORT nDialogRet = RET_CANCEL;
- // BOOL bCollate=FALSE;
+ // sal_uInt16 nCopies=1;
+ sal_uInt16 nDialogRet = RET_CANCEL;
+ // sal_Bool bCollate=sal_False;
SfxPrinter* pPrinter = 0;
- PrintDialog* pPrintDlg = 0;
SfxDialogExecutor_Impl* pExecutor = 0;
bool bSilent = false;
- BOOL bIsAPI = rReq.GetArgs() && rReq.GetArgs()->Count();
+ sal_Bool bIsAPI = rReq.GetArgs() && rReq.GetArgs()->Count();
if ( bIsAPI )
{
- SFX_REQUEST_ARG(rReq, pSilentItem, SfxBoolItem, SID_SILENT, FALSE);
+ SFX_REQUEST_ARG(rReq, pSilentItem, SfxBoolItem, SID_SILENT, sal_False);
bSilent = pSilentItem && pSilentItem->GetValue();
}
@@ -679,7 +615,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
const SfxFilter* pFilter = pMedium ? pMedium->GetFilter() : NULL;
sal_Bool bPrintOnHelp = ( pFilter && pFilter->GetFilterName() == aHelpFilterName );
- const USHORT nId = rReq.GetSlot();
+ const sal_uInt16 nId = rReq.GetSlot();
switch( nId )
{
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -691,7 +627,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
// derived class may decide to abort this
if( !pDoc->QuerySlotExecutable( nId ) )
{
- rReq.SetReturnValue( SfxBoolItem( 0, FALSE ) );
+ rReq.SetReturnValue( SfxBoolItem( 0, sal_False ) );
return;
}
@@ -699,10 +635,10 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
if ( bDetectHidden && pDoc->QueryHiddenInformation( WhenPrinting, NULL ) != RET_YES )
break;
- SFX_REQUEST_ARG(rReq, pSelectItem, SfxBoolItem, SID_SELECTION, FALSE);
+ SFX_REQUEST_ARG(rReq, pSelectItem, SfxBoolItem, SID_SELECTION, sal_False);
sal_Bool bSelection = pSelectItem && pSelectItem->GetValue();
if( pSelectItem && rReq.GetArgs()->Count() == 1 )
- bIsAPI = FALSE;
+ bIsAPI = sal_False;
uno::Sequence < beans::PropertyValue > aProps;
if ( bIsAPI )
@@ -757,10 +693,10 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
case SID_PRINTER_NAME : // only for recorded macros
{
// get printer and printer settings from the document
- SfxPrinter *pDocPrinter = GetPrinter(TRUE);
+ SfxPrinter *pDocPrinter = GetPrinter(sal_True);
// look for printer in parameters
- SFX_REQUEST_ARG( rReq, pPrinterItem, SfxStringItem, SID_PRINTER_NAME, FALSE );
+ SFX_REQUEST_ARG( rReq, pPrinterItem, SfxStringItem, SID_PRINTER_NAME, sal_False );
if ( pPrinterItem )
{
// use PrinterName parameter to create a printer
@@ -789,7 +725,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
// no valid printer either in ItemSet or at the document
if ( bSilent )
{
- rReq.SetReturnValue(SfxBoolItem(0,FALSE));
+ rReq.SetReturnValue(SfxBoolItem(0,sal_False));
break;
}
else
@@ -802,7 +738,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
// if printer is busy, abort printing
if ( !bSilent )
InfoBox( NULL, String( SfxResId( STR_ERROR_PRINTER_BUSY ) ) ).Execute();
- rReq.SetReturnValue(SfxBoolItem(0,FALSE));
+ rReq.SetReturnValue(SfxBoolItem(0,sal_False));
break;
}
@@ -816,7 +752,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
// execute PrinterSetupDialog
PrinterSetupDialog* pPrintSetupDlg = new PrinterSetupDialog( GetWindow() );
- if ( pImp->bHasPrintOptions )
+ if (pImp->m_bHasPrintOptions)
{
// additional controls for dialog
pExecutor = new SfxDialogExecutor_Impl( this, pPrintSetupDlg );
@@ -856,7 +792,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
}
if ( nId == SID_SETUPPRINTER )
{
- rReq.AppendItem( SfxBoolItem( SID_DIALOG_RETURN, TRUE ) );
+ rReq.AppendItem( SfxBoolItem( SID_DIALOG_RETURN, sal_True ) );
}
// take the changes made in the dialog
@@ -865,22 +801,18 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
// forget new printer, it was taken over (as pPrinter) or deleted
pDlgPrinter = NULL;
- /* Now lets reset the Dialog printer, since its freed */
- if (pPrintDlg)
- pPrintDlg->SetPrinter (pPrinter);
}
else
{
// PrinterDialog is used to transfer information on printing,
// so it will only be deleted here if dialog was cancelled
DELETEZ( pDlgPrinter );
- DELETEZ( pPrintDlg );
rReq.Ignore();
if ( SID_PRINTDOC == nId )
- rReq.SetReturnValue(SfxBoolItem(0,FALSE));
+ rReq.SetReturnValue(SfxBoolItem(0,sal_False));
if ( nId == SID_SETUPPRINTER )
{
- rReq.AppendItem( SfxBoolItem( SID_DIALOG_RETURN, FALSE ) );
+ rReq.AppendItem( SfxBoolItem( SID_DIALOG_RETURN, sal_False ) );
}
}
}
@@ -897,52 +829,24 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
//--------------------------------------------------------------------
-PrintDialog* SfxViewShell::CreatePrintDialog( Window* /*pParent*/ )
-
-/* [Description]
-
- This Method can be overloaded to create a tailored PrintDialog.
- This is for example necessary when using special <StarView> Features
- as printing of page breaks.
-*/
-
+sal_Bool SfxViewShell::IsPrinterLocked() const
{
- return NULL;
+ return pImp->m_nPrinterLocks > 0;
}
//--------------------------------------------------------------------
-void SfxViewShell::PreparePrint( PrintDialog * )
+void SfxViewShell::LockPrinter( sal_Bool bLock)
{
-}
-
-//--------------------------------------------------------------------
-
-
-ErrCode SfxViewShell::DoPrint( SfxPrinter* /*pPrinter*/,
- PrintDialog* /*pPrintDlg*/,
- BOOL /*bSilent*/, BOOL /*bIsAPI*/ )
-{
- OSL_FAIL( "DoPrint called, dead code !" );
- return ERRCODE_IO_NOTSUPPORTED;
-}
-
-//--------------------------------------------------------------------
-
-BOOL SfxViewShell::IsPrinterLocked() const
-{
- return pImp->nPrinterLocks > 0;
-}
-
-//--------------------------------------------------------------------
-
-void SfxViewShell::LockPrinter( BOOL bLock)
-{
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = sal_False;
if ( bLock )
- bChanged = 1 == ++pImp->nPrinterLocks;
+ {
+ bChanged = 1 == ++pImp->m_nPrinterLocks;
+ }
else
- bChanged = 0 == --pImp->nPrinterLocks;
+ {
+ bChanged = 0 == --pImp->m_nPrinterLocks;
+ }
if ( bChanged )
{
@@ -954,21 +858,14 @@ void SfxViewShell::LockPrinter( BOOL bLock)
//--------------------------------------------------------------------
-USHORT SfxViewShell::Print( SfxProgress& /*rProgress*/, BOOL /*bIsAPI*/, PrintDialog* /*pDlg*/ )
-{
- return 0;
-}
-
-//--------------------------------------------------------------------
-
-SfxPrinter* SfxViewShell::GetPrinter( BOOL /*bCreate*/ )
+SfxPrinter* SfxViewShell::GetPrinter( sal_Bool /*bCreate*/ )
{
return 0;
}
//--------------------------------------------------------------------
-USHORT SfxViewShell::SetPrinter( SfxPrinter* /*pNewPrinter*/, USHORT /*nDiffFlags*/, bool )
+sal_uInt16 SfxViewShell::SetPrinter( SfxPrinter* /*pNewPrinter*/, sal_uInt16 /*nDiffFlags*/, bool )
{
return 0;
}
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 7a9376b7daf5..f1a9126bb037 100644..100755
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -45,7 +45,6 @@
#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
#include <com/sun/star/container/XContainerQuery.hpp>
#include <com/sun/star/frame/XStorable.hpp>
-#include <com/sun/star/datatransfer/clipboard/XClipboardNotifier.hpp>
#include <com/sun/star/datatransfer/clipboard/XClipboard.hpp>
#include <cppuhelper/implbase1.hxx>
@@ -71,7 +70,7 @@
#include "view.hrc"
#include <sfx2/viewsh.hxx>
#include "viewimp.hxx"
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include <sfx2/request.hxx>
#include <sfx2/templdlg.hxx>
#include <sfx2/printer.hxx>
@@ -82,8 +81,8 @@
#include "view.hrc"
#include "sfxlocal.hrc"
#include <sfx2/sfxbasecontroller.hxx>
+#include "sfx2/mailmodelapi.hxx"
#include <sfx2/viewfrm.hxx>
-#include "mailmodelapi.hxx"
#include <sfx2/event.hxx>
#include <sfx2/fcontnr.hxx>
#include <sfx2/ipclient.hxx>
@@ -114,7 +113,9 @@ DBG_NAME(SfxViewShell)
class SfxClipboardChangeListener : public ::cppu::WeakImplHelper1<
datatransfer::clipboard::XClipboardListener >
{
- SfxViewShell* pViewShell;
+public:
+ SfxClipboardChangeListener( SfxViewShell* pView, const uno::Reference< datatransfer::clipboard::XClipboardNotifier >& xClpbrdNtfr );
+ virtual ~SfxClipboardChangeListener();
// XEventListener
virtual void SAL_CALL disposing( const lang::EventObject& rEventObject )
@@ -124,21 +125,46 @@ class SfxClipboardChangeListener : public ::cppu::WeakImplHelper1<
virtual void SAL_CALL changedContents( const datatransfer::clipboard::ClipboardEvent& rEventObject )
throw ( uno::RuntimeException );
-public:
- SfxClipboardChangeListener( SfxViewShell* pView );
- virtual ~SfxClipboardChangeListener();
+ void DisconnectViewShell() { m_pViewShell = NULL; }
+ void ChangedContents();
+
+ enum AsyncExecuteCmd
+ {
+ ASYNCEXECUTE_CMD_DISPOSING,
+ ASYNCEXECUTE_CMD_CHANGEDCONTENTS
+ };
- void DisconnectViewShell() { pViewShell = NULL; }
+ struct AsyncExecuteInfo
+ {
+ AsyncExecuteInfo( AsyncExecuteCmd eCmd, uno::Reference< datatransfer::clipboard::XClipboardListener > xThis, SfxClipboardChangeListener* pListener ) :
+ m_eCmd( eCmd ), m_xThis( xThis ), m_pListener( pListener ) {}
+
+ AsyncExecuteCmd m_eCmd;
+ uno::Reference< datatransfer::clipboard::XClipboardListener > m_xThis;
+ SfxClipboardChangeListener* m_pListener;
+ };
+
+private:
+ SfxViewShell* m_pViewShell;
+ uno::Reference< datatransfer::clipboard::XClipboardNotifier > m_xClpbrdNtfr;
+ uno::Reference< lang::XComponent > m_xCtrl;
+
+ DECL_STATIC_LINK( SfxClipboardChangeListener, AsyncExecuteHdl_Impl, AsyncExecuteInfo* );
};
-SfxClipboardChangeListener::SfxClipboardChangeListener( SfxViewShell* pView )
-: pViewShell( 0 )
+SfxClipboardChangeListener::SfxClipboardChangeListener( SfxViewShell* pView, const uno::Reference< datatransfer::clipboard::XClipboardNotifier >& xClpbrdNtfr )
+ : m_pViewShell( 0 ), m_xClpbrdNtfr( xClpbrdNtfr )
{
- uno::Reference < lang::XComponent > xCtrl( pView->GetController(), uno::UNO_QUERY );
- if ( xCtrl.is() )
+ m_xCtrl = uno::Reference < lang::XComponent >( pView->GetController(), uno::UNO_QUERY );
+ if ( m_xCtrl.is() )
{
- xCtrl->addEventListener( uno::Reference < lang::XEventListener > ( static_cast < lang::XEventListener* >( this ) ) );
- pViewShell = pView;
+ m_xCtrl->addEventListener( uno::Reference < lang::XEventListener > ( static_cast < lang::XEventListener* >( this ) ) );
+ m_pViewShell = pView;
+ }
+ if ( m_xClpbrdNtfr.is() )
+ {
+ m_xClpbrdNtfr->addClipboardListener( uno::Reference< datatransfer::clipboard::XClipboardListener >(
+ static_cast< datatransfer::clipboard::XClipboardListener* >( this )));
}
}
@@ -146,34 +172,68 @@ SfxClipboardChangeListener::~SfxClipboardChangeListener()
{
}
-void SAL_CALL SfxClipboardChangeListener::disposing( const lang::EventObject& /*rEventObject*/ )
-throw ( uno::RuntimeException )
+void SfxClipboardChangeListener::ChangedContents()
{
- // either clipboard or ViewShell is going to be destroyed -> no interest in listening anymore
const SolarMutexGuard aGuard;
- if ( pViewShell )
+ if( m_pViewShell )
{
- uno::Reference < lang::XComponent > xCtrl( pViewShell->GetController(), uno::UNO_QUERY );
- if ( xCtrl.is() )
- xCtrl->removeEventListener( uno::Reference < lang::XEventListener > ( static_cast < lang::XEventListener* >( this ) ) );
- pViewShell->AddRemoveClipboardListener( uno::Reference < datatransfer::clipboard::XClipboardListener > (this), FALSE );
- pViewShell = 0;
+ SfxBindings& rBind = m_pViewShell->GetViewFrame()->GetBindings();
+ rBind.Invalidate( SID_PASTE );
+ rBind.Invalidate( SID_PASTE_SPECIAL );
+ rBind.Invalidate( SID_CLIPBOARD_FORMAT_ITEMS );
}
}
-void SAL_CALL SfxClipboardChangeListener::changedContents( const datatransfer::clipboard::ClipboardEvent& )
- throw ( RuntimeException )
+IMPL_STATIC_LINK_NOINSTANCE( SfxClipboardChangeListener, AsyncExecuteHdl_Impl, AsyncExecuteInfo*, pAsyncExecuteInfo )
{
- const SolarMutexGuard aGuard;
- if( pViewShell )
+ if ( pAsyncExecuteInfo )
{
- SfxBindings& rBind = pViewShell->GetViewFrame()->GetBindings();
- rBind.Invalidate( SID_PASTE );
- rBind.Invalidate( SID_PASTE_SPECIAL );
- rBind.Invalidate( SID_CLIPBOARD_FORMAT_ITEMS );
+ uno::Reference< datatransfer::clipboard::XClipboardListener > xThis( pAsyncExecuteInfo->m_xThis );
+ if ( pAsyncExecuteInfo->m_pListener )
+ {
+ if ( pAsyncExecuteInfo->m_eCmd == ASYNCEXECUTE_CMD_DISPOSING )
+ pAsyncExecuteInfo->m_pListener->DisconnectViewShell();
+ else if ( pAsyncExecuteInfo->m_eCmd == ASYNCEXECUTE_CMD_CHANGEDCONTENTS )
+ pAsyncExecuteInfo->m_pListener->ChangedContents();
+ }
}
+ delete pAsyncExecuteInfo;
+
+ return 0;
}
+void SAL_CALL SfxClipboardChangeListener::disposing( const lang::EventObject& /*rEventObject*/ )
+throw ( uno::RuntimeException )
+{
+ // Either clipboard or ViewShell is going to be destroyed -> no interest in listening anymore
+ uno::Reference< lang::XComponent > xCtrl( m_xCtrl );
+ uno::Reference< datatransfer::clipboard::XClipboardNotifier > xNotify( m_xClpbrdNtfr );
+
+ uno::Reference< datatransfer::clipboard::XClipboardListener > xThis( static_cast< datatransfer::clipboard::XClipboardListener* >( this ));
+ if ( xCtrl.is() )
+ xCtrl->removeEventListener( uno::Reference < lang::XEventListener > ( static_cast < lang::XEventListener* >( this )));
+ if ( xNotify.is() )
+ xNotify->removeClipboardListener( xThis );
+
+ // Make asynchronous call to avoid locking SolarMutex which is the
+ // root for many deadlocks, especially in conjuction with the "Windows"
+ // based single thread apartment clipboard code!
+ AsyncExecuteInfo* pInfo = new AsyncExecuteInfo( ASYNCEXECUTE_CMD_DISPOSING, xThis, this );
+ Application::PostUserEvent( STATIC_LINK( 0, SfxClipboardChangeListener, AsyncExecuteHdl_Impl ), pInfo );
+}
+
+void SAL_CALL SfxClipboardChangeListener::changedContents( const datatransfer::clipboard::ClipboardEvent& )
+ throw ( RuntimeException )
+{
+ // Make asynchronous call to avoid locking SolarMutex which is the
+ // root for many deadlocks, especially in conjuction with the "Windows"
+ // based single thread apartment clipboard code!
+ uno::Reference< datatransfer::clipboard::XClipboardListener > xThis( static_cast< datatransfer::clipboard::XClipboardListener* >( this ));
+ AsyncExecuteInfo* pInfo = new AsyncExecuteInfo( ASYNCEXECUTE_CMD_CHANGEDCONTENTS, xThis, this );
+ Application::PostUserEvent( STATIC_LINK( 0, SfxClipboardChangeListener, AsyncExecuteHdl_Impl ), pInfo );
+}
+
+//=========================================================================
static ::rtl::OUString RetrieveLabelFromCommand(
const ::rtl::OUString& rCommandURL,
@@ -239,15 +299,27 @@ static ::rtl::OUString RetrieveLabelFromCommand(
}
//=========================================================================
-SfxViewShell_Impl::SfxViewShell_Impl()
+SfxViewShell_Impl::SfxViewShell_Impl(sal_uInt16 const nFlags)
: aInterceptorContainer( aMutex )
-, pAccExec(0)
+, m_bControllerSet(false)
+, m_nPrinterLocks(0)
+, m_bCanPrint(SFX_VIEW_CAN_PRINT == (nFlags & SFX_VIEW_CAN_PRINT))
+, m_bHasPrintOptions(
+ SFX_VIEW_HAS_PRINTOPTIONS == (nFlags & SFX_VIEW_HAS_PRINTOPTIONS))
+, m_bPlugInsActive(true)
+, m_bIsShowView(SFX_VIEW_NO_SHOW != (nFlags & SFX_VIEW_NO_SHOW))
+, m_bGotOwnership(false)
+, m_bGotFrameOwnership(false)
+, m_eScroll(SCROLLING_DEFAULT)
+, m_nFamily(0xFFFF) // undefined, default set by TemplateDialog
+, m_pController(0)
+, m_pAccExec(0)
{}
//=========================================================================
SFX_IMPL_INTERFACE(SfxViewShell,SfxShell,SfxResId(0))
{
- SFX_CHILDWINDOW_REGISTRATION( SID_MAIL_CHILDWIN );
+ SFX_CHILDWINDOW_REGISTRATION( SID_MAIL_CHILDWIN );
}
TYPEINIT2(SfxViewShell,SfxShell,SfxListener);
@@ -366,7 +438,7 @@ enum ETypeFamily
SAL_DLLPRIVATE void SfxViewShell::IPClientGone_Impl( SfxInPlaceClient *pIPClient )
{
- SfxInPlaceClientList* pClientList = GetIPClientList_Impl(TRUE);
+ SfxInPlaceClientList* pClientList = GetIPClientList_Impl(sal_True);
for( SfxInPlaceClientList::iterator it = pClientList->begin(); it < pClientList->end(); ++it )
{
@@ -384,25 +456,27 @@ SAL_DLLPRIVATE void SfxViewShell::IPClientGone_Impl( SfxInPlaceClient *pIPClient
void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
{
- const USHORT nId = rReq.GetSlot();
- switch( nId )
- {
- case SID_STYLE_FAMILY :
+ const sal_uInt16 nId = rReq.GetSlot();
+ switch( nId )
{
- SFX_REQUEST_ARG(rReq, pItem, SfxUInt16Item, nId, FALSE);
- if (pItem)
- pImp->nFamily = pItem->GetValue();
- break;
- }
+ case SID_STYLE_FAMILY :
+ {
+ SFX_REQUEST_ARG(rReq, pItem, SfxUInt16Item, nId, sal_False);
+ if (pItem)
+ {
+ pImp->m_nFamily = pItem->GetValue();
+ }
+ break;
+ }
- case SID_STYLE_CATALOG:
- {
- SfxTemplateCatalog aCatalog(
- SFX_APP()->GetTopWindow(), &GetViewFrame()->GetBindings());
- aCatalog.Execute();
+ case SID_STYLE_CATALOG:
+ {
+ SfxTemplateCatalog aCatalog(
+ SFX_APP()->GetTopWindow(), &GetViewFrame()->GetBindings());
+ aCatalog.Execute();
rReq.Ignore();
- break;
- }
+ break;
+ }
case SID_ACTIVATE_STYLE_APPLY:
{
com::sun::star::uno::Reference< com::sun::star::frame::XFrame > xFrame(
@@ -438,10 +512,10 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
ToolBox* pTextToolbox = dynamic_cast< ToolBox* >( pWin );
if( pTextToolbox )
{
- USHORT nItemCount = pTextToolbox->GetItemCount();
- for( USHORT nItem = 0; nItem < nItemCount; ++nItem )
+ sal_uInt16 nItemCount = pTextToolbox->GetItemCount();
+ for( sal_uInt16 nItem = 0; nItem < nItemCount; ++nItem )
{
- USHORT nItemId = pTextToolbox->GetItemId( nItem );
+ sal_uInt16 nItemId = pTextToolbox->GetItemId( nItem );
const XubString& rCommand = pTextToolbox->GetItemCommand( nItemId );
if( rCommand.EqualsAscii( ".uno:StyleApply" ) )
{
@@ -462,85 +536,85 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
rReq.Done();
}
break;
- // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- case SID_MAIL_SENDDOCASMS:
- case SID_MAIL_SENDDOCASOOO:
- case SID_MAIL_SENDDOCASPDF:
- case SID_MAIL_SENDDOC:
+ case SID_MAIL_SENDDOCASMS:
+ case SID_MAIL_SENDDOCASOOO:
+ case SID_MAIL_SENDDOCASPDF:
+ case SID_MAIL_SENDDOC:
case SID_MAIL_SENDDOCASFORMAT:
- {
- SfxObjectShell* pDoc = GetObjectShell();
- if ( pDoc && pDoc->QueryHiddenInformation(
- WhenSaving, &GetViewFrame()->GetWindow() ) != RET_YES )
- break;
+ {
+ SfxObjectShell* pDoc = GetObjectShell();
+ if ( pDoc && pDoc->QueryHiddenInformation(
+ WhenSaving, &GetViewFrame()->GetWindow() ) != RET_YES )
+ break;
- if ( SvtInternalOptions().MailUIEnabled() )
+ if ( SvtInternalOptions().MailUIEnabled() )
{
- GetViewFrame()->SetChildWindow( SID_MAIL_CHILDWIN, TRUE );
+ GetViewFrame()->SetChildWindow( SID_MAIL_CHILDWIN, sal_True );
}
else
{
- SfxMailModel aModel;
+ SfxMailModel aModel;
rtl::OUString aDocType;
- SFX_REQUEST_ARG(rReq, pMailSubject, SfxStringItem, SID_MAIL_SUBJECT, FALSE );
- if ( pMailSubject )
- aModel.SetSubject( pMailSubject->GetValue() );
+ SFX_REQUEST_ARG(rReq, pMailSubject, SfxStringItem, SID_MAIL_SUBJECT, sal_False );
+ if ( pMailSubject )
+ aModel.SetSubject( pMailSubject->GetValue() );
- SFX_REQUEST_ARG(rReq, pMailRecipient, SfxStringItem, SID_MAIL_RECIPIENT, FALSE );
- if ( pMailRecipient )
- {
- String aRecipient( pMailRecipient->GetValue() );
- String aMailToStr( String::CreateFromAscii( "mailto:" ));
+ SFX_REQUEST_ARG(rReq, pMailRecipient, SfxStringItem, SID_MAIL_RECIPIENT, sal_False );
+ if ( pMailRecipient )
+ {
+ String aRecipient( pMailRecipient->GetValue() );
+ String aMailToStr( String::CreateFromAscii( "mailto:" ));
- if ( aRecipient.Search( aMailToStr ) == 0 )
- aRecipient = aRecipient.Erase( 0, aMailToStr.Len() );
- aModel.AddAddress( aRecipient, SfxMailModel::ROLE_TO );
- }
- SFX_REQUEST_ARG(rReq, pMailDocType, SfxStringItem, SID_TYPE_NAME, FALSE );
+ if ( aRecipient.Search( aMailToStr ) == 0 )
+ aRecipient = aRecipient.Erase( 0, aMailToStr.Len() );
+ aModel.AddAddress( aRecipient, SfxMailModel::ROLE_TO );
+ }
+ SFX_REQUEST_ARG(rReq, pMailDocType, SfxStringItem, SID_TYPE_NAME, sal_False );
if ( pMailDocType )
aDocType = pMailDocType->GetValue();
uno::Reference < frame::XFrame > xFrame( pFrame->GetFrame().GetFrameInterface() );
- SfxMailModel::SendMailResult eResult = SfxMailModel::SEND_MAIL_ERROR;
+ SfxMailModel::SendMailResult eResult = SfxMailModel::SEND_MAIL_ERROR;
if ( nId == SID_MAIL_SENDDOC )
- eResult = aModel.SaveAndSend( xFrame, rtl::OUString() );
- else
- if ( nId == SID_MAIL_SENDDOCASPDF )
+ eResult = aModel.SaveAndSend( xFrame, rtl::OUString() );
+ else
+ if ( nId == SID_MAIL_SENDDOCASPDF )
eResult = aModel.SaveAndSend( xFrame, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "pdf_Portable_Document_Format" )));
else
- if ( nId == SID_MAIL_SENDDOCASMS )
+ if ( nId == SID_MAIL_SENDDOCASMS )
{
aDocType = impl_searchFormatTypeForApp(xFrame, E_MS_DOC);
if (aDocType.getLength() > 0)
eResult = aModel.SaveAndSend( xFrame, aDocType );
}
else
- if ( nId == SID_MAIL_SENDDOCASOOO )
+ if ( nId == SID_MAIL_SENDDOCASOOO )
{
aDocType = impl_searchFormatTypeForApp(xFrame, E_OOO_DOC);
if (aDocType.getLength() > 0)
eResult = aModel.SaveAndSend( xFrame, aDocType );
}
- if ( eResult == SfxMailModel::SEND_MAIL_ERROR )
- {
- InfoBox aBox( SFX_APP()->GetTopWindow(), SfxResId( MSG_ERROR_SEND_MAIL ));
- aBox.Execute();
+ if ( eResult == SfxMailModel::SEND_MAIL_ERROR )
+ {
+ InfoBox aBox( SFX_APP()->GetTopWindow(), SfxResId( MSG_ERROR_SEND_MAIL ));
+ aBox.Execute();
rReq.Ignore();
- }
+ }
else
rReq.Done();
- }
+ }
- break;
- }
+ break;
+ }
- // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- case SID_WEBHTML:
- {
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ case SID_WEBHTML:
+ {
static const char HTML_DOCUMENT_TYPE[] = "writer_web_HTML";
static const char HTML_GRAPHIC_TYPE[] = "graphic_HTML";
const sal_Int32 FILTERFLAG_EXPORT = 0x00000002;
@@ -553,7 +627,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
css::uno::Reference< css::frame::XModuleManager > xModuleManager( xSMGR->createInstance( aModuleManager ), css::uno::UNO_QUERY_THROW );
if ( !xModuleManager.is() )
{
- rReq.Done(FALSE);
+ rReq.Done(sal_False);
return;
}
@@ -611,7 +685,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
// No type and no location => error
if (( aFilterName.getLength() == 0 ) || ( aTypeName.getLength() == 0 ))
{
- rReq.Done(FALSE);
+ rReq.Done(sal_False);
return;
}
@@ -652,7 +726,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
}
catch ( com::sun::star::io::IOException& )
{
- rReq.Done(FALSE);
+ rReq.Done(sal_False);
return;
}
@@ -660,212 +734,215 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.system.SystemShellExecute"))),
css::uno::UNO_QUERY );
- BOOL bRet( TRUE );
+ sal_Bool bRet( sal_True );
if ( xSystemShellExecute.is() )
{
try
{
- xSystemShellExecute->execute(
- aFileURL, ::rtl::OUString(), SystemShellExecuteFlags::DEFAULTS );
+ xSystemShellExecute->execute(
+ aFileURL, ::rtl::OUString(), SystemShellExecuteFlags::DEFAULTS );
}
catch ( uno::Exception& )
{
SolarMutexGuard aGuard;
Window *pParent = SFX_APP()->GetTopWindow();
- ErrorBox( pParent, SfxResId( MSG_ERROR_NO_WEBBROWSER_FOUND )).Execute();
- bRet = FALSE;
+ ErrorBox( pParent, SfxResId( MSG_ERROR_NO_WEBBROWSER_FOUND )).Execute();
+ bRet = sal_False;
}
}
rReq.Done(bRet);
- break;
+ break;
}
else
{
- rReq.Done(FALSE);
+ rReq.Done(sal_False);
return;
}
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- case SID_PLUGINS_ACTIVE:
- {
- SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, nId, FALSE);
- BOOL bActive = pShowItem ? pShowItem->GetValue() : !pImp->bPlugInsActive;
- // Record if possible
- if ( !rReq.IsAPI() )
- rReq.AppendItem( SfxBoolItem( nId, bActive ) );
-
- // Call DONE here already since there might be arguments that
- // are using Pool, which can be gone.
- rReq.Done(TRUE);
-
- // Execute
- if ( !pShowItem || bActive != pImp->bPlugInsActive )
- {
- SfxFrame* pTopFrame = &GetFrame()->GetTopFrame();
- if ( pTopFrame != &GetFrame()->GetFrame() )
+ case SID_PLUGINS_ACTIVE:
{
- // FramesetDocument
- SfxViewShell *pShell = pTopFrame->GetCurrentViewFrame()->GetViewShell();
- if ( pShell->GetInterface()->GetSlot( nId ) )
- pShell->ExecuteSlot( rReq );
- break;
- }
-
- SfxFrameIterator aIter( *pTopFrame );
- while ( pTopFrame )
- {
- if ( pTopFrame->GetCurrentViewFrame() )
- {
- SfxViewShell *pView = pTopFrame->GetCurrentViewFrame()->GetViewShell();
- if ( pView )
+ SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, nId, sal_False);
+ bool const bActive = (pShowItem)
+ ? pShowItem->GetValue()
+ : !pImp->m_bPlugInsActive;
+ // ggf. recorden
+ if ( !rReq.IsAPI() )
+ rReq.AppendItem( SfxBoolItem( nId, bActive ) );
+
+ // Jetzt schon DONE aufrufen, da die Argumente evtl. einen Pool
+ // benutzen, der demn"achst weg ist
+ rReq.Done(sal_True);
+
+ // ausfuehren
+ if (!pShowItem || (bActive != pImp->m_bPlugInsActive))
{
- pView->pImp->bPlugInsActive = bActive;
+ SfxFrame* pTopFrame = &GetFrame()->GetTopFrame();
+ if ( pTopFrame != &GetFrame()->GetFrame() )
+ {
+ // FramesetDocument
+ SfxViewShell *pShell = pTopFrame->GetCurrentViewFrame()->GetViewShell();
+ if ( pShell->GetInterface()->GetSlot( nId ) )
+ pShell->ExecuteSlot( rReq );
+ break;
+ }
+
+ SfxFrameIterator aIter( *pTopFrame );
+ while ( pTopFrame )
+ {
+ if ( pTopFrame->GetCurrentViewFrame() )
+ {
+ SfxViewShell *pView = pTopFrame->GetCurrentViewFrame()->GetViewShell();
+ if ( pView )
+ {
+ pView->pImp->m_bPlugInsActive = bActive;
Rectangle aVisArea = GetObjectShell()->GetVisArea();
VisAreaChanged(aVisArea);
- // the plugins might need change in their state
- SfxInPlaceClientList *pClients = pView->GetIPClientList_Impl(FALSE);
- if ( pClients )
- {
- for ( size_t n = 0; n < pClients->size(); n++)
- {
- SfxInPlaceClient* pIPClient = pClients->at( n );
- if ( pIPClient )
- pView->CheckIPClient_Impl( pIPClient, aVisArea );
+ // the plugins might need change in their state
+ SfxInPlaceClientList *pClients = pView->GetIPClientList_Impl(sal_False);
+ if ( pClients )
+ {
+ for ( size_t n = 0; n < pClients->size(); n++)
+ {
+ SfxInPlaceClient* pIPClient = pClients->at( n );
+ if ( pIPClient )
+ pView->CheckIPClient_Impl( pIPClient, aVisArea );
+ }
+ }
+ }
+ }
+
+ if ( !pTopFrame->GetParentFrame() )
+ pTopFrame = aIter.FirstFrame();
+ else
+ pTopFrame = aIter.NextFrame( *pTopFrame );
}
- }
}
- }
- if ( !pTopFrame->GetParentFrame() )
- pTopFrame = aIter.FirstFrame();
- else
- pTopFrame = aIter.NextFrame( *pTopFrame );
+ break;
}
- }
-
- break;
}
- }
}
//--------------------------------------------------------------------
void SfxViewShell::GetState_Impl( SfxItemSet &rSet )
{
- DBG_CHKTHIS(SfxViewShell, 0);
+ DBG_CHKTHIS(SfxViewShell, 0);
- SfxWhichIter aIter( rSet );
- for ( USHORT nSID = aIter.FirstWhich(); nSID; nSID = aIter.NextWhich() )
- {
- switch ( nSID )
+ SfxWhichIter aIter( rSet );
+ for ( sal_uInt16 nSID = aIter.FirstWhich(); nSID; nSID = aIter.NextWhich() )
{
- case SID_STYLE_CATALOG:
+ switch ( nSID )
{
- if ( !GetViewFrame()->KnowsChildWindow( SID_STYLE_DESIGNER ) )
- rSet.DisableItem( nSID );
- break;
- }
-
- // Printer functions
- case SID_PRINTDOC:
- case SID_PRINTDOCDIRECT:
- case SID_SETUPPRINTER:
- case SID_PRINTER_NAME:
- {
- BOOL bEnabled = pImp->bCanPrint && !pImp->nPrinterLocks;
- bEnabled = bEnabled && !Application::GetSettings().GetMiscSettings().GetDisablePrinting();
- if ( bEnabled )
- {
- SfxPrinter *pPrinter = GetPrinter(FALSE);
+ case SID_STYLE_CATALOG:
+ {
+ if ( !GetViewFrame()->KnowsChildWindow( SID_STYLE_DESIGNER ) )
+ rSet.DisableItem( nSID );
+ break;
+ }
- if ( SID_PRINTDOCDIRECT == nSID )
+ // Printer functions
+ case SID_PRINTDOC:
+ case SID_PRINTDOCDIRECT:
+ case SID_SETUPPRINTER:
+ case SID_PRINTER_NAME:
{
- rtl::OUString aPrinterName;
- if ( pPrinter != NULL )
- aPrinterName = pPrinter->GetName();
- else
- aPrinterName = Printer::GetDefaultPrinterName();
- if ( aPrinterName.getLength() > 0 )
+ bool bEnabled = pImp->m_bCanPrint && !pImp->m_nPrinterLocks;
+ bEnabled = bEnabled && !Application::GetSettings().GetMiscSettings().GetDisablePrinting();
+ if ( bEnabled )
{
- uno::Reference < frame::XFrame > xFrame( pFrame->GetFrame().GetFrameInterface() );
+ SfxPrinter *pPrinter = GetPrinter(sal_False);
- ::rtl::OUStringBuffer aBuffer( 60 );
- aBuffer.append( RetrieveLabelFromCommand(
+ if ( SID_PRINTDOCDIRECT == nSID )
+ {
+ rtl::OUString aPrinterName;
+ if ( pPrinter != NULL )
+ aPrinterName = pPrinter->GetName();
+ else
+ aPrinterName = Printer::GetDefaultPrinterName();
+ if ( aPrinterName.getLength() > 0 )
+ {
+ uno::Reference < frame::XFrame > xFrame( pFrame->GetFrame().GetFrameInterface() );
+
+ ::rtl::OUStringBuffer aBuffer( 60 );
+ aBuffer.append( RetrieveLabelFromCommand(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:PrintDefault" )),
xFrame ));
- aBuffer.appendAscii( " (" );
- aBuffer.append( aPrinterName );
- aBuffer.appendAscii( ")" );
+ aBuffer.appendAscii( " (" );
+ aBuffer.append( aPrinterName );
+ aBuffer.appendAscii( ")" );
- rSet.Put( SfxStringItem( SID_PRINTDOCDIRECT, aBuffer.makeStringAndClear() ) );
+ rSet.Put( SfxStringItem( SID_PRINTDOCDIRECT, aBuffer.makeStringAndClear() ) );
+ }
+ }
+ bEnabled = !pPrinter || !pPrinter->IsPrinting();
+ }
+ if ( !bEnabled )
+ {
+ // will now be handled by requeing the request
+ /* rSet.DisableItem( SID_PRINTDOC );
+ rSet.DisableItem( SID_PRINTDOCDIRECT );
+ rSet.DisableItem( SID_SETUPPRINTER ); */
}
+ break;
}
- bEnabled = !pPrinter || !pPrinter->IsPrinting();
- }
- if ( !bEnabled )
- {
- // will now be handled by requeing the request
- /* rSet.DisableItem( SID_PRINTDOC );
- rSet.DisableItem( SID_PRINTDOCDIRECT );
- rSet.DisableItem( SID_SETUPPRINTER ); */
- }
- break;
- }
- // Mail functions
- case SID_MAIL_SENDDOCASPDF:
- case SID_MAIL_SENDDOC:
- case SID_MAIL_SENDDOCASFORMAT:
- {
- BOOL bEnable = !GetViewFrame()->HasChildWindow( SID_MAIL_CHILDWIN );
- if ( !bEnable )
- rSet.DisableItem( nSID );
- break;
- }
+ // Mail functions
+ case SID_MAIL_SENDDOCASPDF:
+ case SID_MAIL_SENDDOC:
+ case SID_MAIL_SENDDOCASFORMAT:
+ {
+ sal_Bool bEnable = !GetViewFrame()->HasChildWindow( SID_MAIL_CHILDWIN );
+ if ( !bEnable )
+ rSet.DisableItem( nSID );
+ break;
+ }
- // PlugIns running
- case SID_PLUGINS_ACTIVE:
- {
- rSet.Put( SfxBoolItem( SID_PLUGINS_ACTIVE, !pImp->bPlugInsActive) );
- break;
- }
-/*
- // SelectionText
- case SID_SELECTION_TEXT:
- {
- rSet.Put( SfxStringItem( SID_SELECTION_TEXT, GetSelectionText() ) );
- break;
- }
+ // PlugIns running
+ case SID_PLUGINS_ACTIVE:
+ {
+ rSet.Put( SfxBoolItem( SID_PLUGINS_ACTIVE,
+ !pImp->m_bPlugInsActive) );
+ break;
+ }
+ /*
+ // SelectionText
+ case SID_SELECTION_TEXT:
+ {
+ rSet.Put( SfxStringItem( SID_SELECTION_TEXT, GetSelectionText() ) );
+ break;
+ }
- // SelectionTextExt
- case SID_SELECTION_TEXT_EXT:
- {
- rSet.Put( SfxStringItem( SID_SELECTION_TEXT_EXT, GetSelectionText(TRUE) ) );
- break;
- }
-*/
- case SID_STYLE_FAMILY :
- {
- rSet.Put( SfxUInt16Item( SID_STYLE_FAMILY, pImp->nFamily ) );
- break;
+ // SelectionTextExt
+ case SID_SELECTION_TEXT_EXT:
+ {
+ rSet.Put( SfxStringItem( SID_SELECTION_TEXT_EXT, GetSelectionText(sal_True) ) );
+ break;
+ }
+ */
+ case SID_STYLE_FAMILY :
+ {
+ rSet.Put( SfxUInt16Item( SID_STYLE_FAMILY, pImp->m_nFamily ) );
+ break;
+ }
}
}
- }
}
//--------------------------------------------------------------------
void SfxViewShell::SetZoomFactor( const Fraction &rZoomX,
- const Fraction &rZoomY )
+ const Fraction &rZoomY )
{
- DBG_ASSERT( GetWindow(), "no window" );
- MapMode aMap( GetWindow()->GetMapMode() );
- aMap.SetScaleX( rZoomX );
- aMap.SetScaleY( rZoomY );
- GetWindow()->SetMapMode( aMap );
+ DBG_ASSERT( GetWindow(), "no window" );
+ MapMode aMap( GetWindow()->GetMapMode() );
+ aMap.SetScaleX( rZoomX );
+ aMap.SetScaleY( rZoomY );
+ GetWindow()->SetMapMode( aMap );
}
//--------------------------------------------------------------------
@@ -879,30 +956,30 @@ ErrCode SfxViewShell::DoVerb(long /*nVerb*/)
*/
{
- return ERRCODE_SO_NOVERBS;
+ return ERRCODE_SO_NOVERBS;
}
//--------------------------------------------------------------------
void SfxViewShell::OutplaceActivated( sal_Bool bActive, SfxInPlaceClient* /*pClient*/ )
{
- if ( !bActive )
- GetFrame()->GetFrame().Appear();
+ if ( !bActive )
+ GetFrame()->GetFrame().Appear();
}
//--------------------------------------------------------------------
void SfxViewShell::InplaceActivating( SfxInPlaceClient* /*pClient*/ )
{
- // TODO/LATER: painting of the bitmap can be stopped, it is required if CLIPCHILDREN problem #i25788# is not solved,
- // but may be the bug will not affect the real office vcl windows, then it is not required
+ // TODO/LATER: painting of the bitmap can be stopped, it is required if CLIPCHILDREN problem #i25788# is not solved,
+ // but may be the bug will not affect the real office vcl windows, then it is not required
}
//--------------------------------------------------------------------
void SfxViewShell::InplaceDeactivated( SfxInPlaceClient* /*pClient*/ )
{
- // TODO/LATER: paint the replacement image in normal way if the painting was stopped
+ // TODO/LATER: paint the replacement image in normal way if the painting was stopped
}
//--------------------------------------------------------------------
@@ -914,8 +991,8 @@ void SfxViewShell::UIActivating( SfxInPlaceClient* /*pClient*/ )
if ( xParentFrame.is() )
xParentFrame->setActiveFrame( xOwnFrame );
- pFrame->GetBindings().HidePopups(TRUE);
- pFrame->GetDispatcher()->Update_Impl( TRUE );
+ pFrame->GetBindings().HidePopups(sal_True);
+ pFrame->GetDispatcher()->Update_Impl( sal_True );
}
//--------------------------------------------------------------------
@@ -924,8 +1001,8 @@ void SfxViewShell::UIDeactivated( SfxInPlaceClient* /*pClient*/ )
{
if ( !pFrame->GetFrame().IsClosing_Impl() ||
SfxViewFrame::Current() != pFrame )
- pFrame->GetDispatcher()->Update_Impl( TRUE );
- pFrame->GetBindings().HidePopups(FALSE);
+ pFrame->GetDispatcher()->Update_Impl( sal_True );
+ pFrame->GetBindings().HidePopups(sal_False);
// uno::Reference < frame::XFrame > xOwnFrame( pFrame->GetFrame().GetFrameInterface() );
// uno::Reference < frame::XFramesSupplier > xParentFrame( xOwnFrame->getCreator(), uno::UNO_QUERY );
@@ -941,12 +1018,12 @@ SfxInPlaceClient* SfxViewShell::FindIPClient
Window* pObjParentWin
) const
{
- SfxInPlaceClientList *pClients = GetIPClientList_Impl(FALSE);
- if ( !pClients )
- return 0;
+ SfxInPlaceClientList *pClients = GetIPClientList_Impl(sal_False);
+ if ( !pClients )
+ return 0;
- if( !pObjParentWin )
- pObjParentWin = GetWindow();
+ if( !pObjParentWin )
+ pObjParentWin = GetWindow();
for ( size_t n = 0; n < pClients->size(); n++)
{
SfxInPlaceClient *pIPClient = (SfxInPlaceClient*) pClients->at( n );
@@ -961,7 +1038,7 @@ SfxInPlaceClient* SfxViewShell::FindIPClient
SfxInPlaceClient* SfxViewShell::GetIPClient() const
{
- return GetUIActiveClient();
+ return GetUIActiveClient();
}
//--------------------------------------------------------------------
@@ -969,9 +1046,9 @@ SfxInPlaceClient* SfxViewShell::GetIPClient() const
SfxInPlaceClient* SfxViewShell::GetUIActiveIPClient_Impl() const
{
// this method is needed as long as SFX still manages the border space for ChildWindows (see SfxFrame::Resize)
- SfxInPlaceClientList *pClients = GetIPClientList_Impl(FALSE);
- if ( !pClients )
- return 0;
+ SfxInPlaceClientList *pClients = GetIPClientList_Impl(sal_False);
+ if ( !pClients )
+ return 0;
for ( size_t n = 0; n < pClients->size(); n++)
{
@@ -985,40 +1062,40 @@ SfxInPlaceClient* SfxViewShell::GetUIActiveIPClient_Impl() const
SfxInPlaceClient* SfxViewShell::GetUIActiveClient() const
{
- SfxInPlaceClientList *pClients = GetIPClientList_Impl(FALSE);
- if ( !pClients )
- return 0;
+ SfxInPlaceClientList *pClients = GetIPClientList_Impl(sal_False);
+ if ( !pClients )
+ return 0;
for ( size_t n = 0; n < pClients->size(); n++)
- {
+ {
SfxInPlaceClient* pIPClient = pClients->at( n );
if ( pIPClient->IsObjectUIActive() )
return pIPClient;
- }
+ }
return NULL;
}
//--------------------------------------------------------------------
-void SfxViewShell::Activate( BOOL bMDI )
+void SfxViewShell::Activate( sal_Bool bMDI )
{
- DBG_CHKTHIS(SfxViewShell, 0);
- if ( bMDI )
- {
- SfxObjectShell *pSh = GetViewFrame()->GetObjectShell();
- if ( pSh->GetModel().is() )
- pSh->GetModel()->setCurrentController( GetViewFrame()->GetFrame().GetController() );
+ DBG_CHKTHIS(SfxViewShell, 0);
+ if ( bMDI )
+ {
+ SfxObjectShell *pSh = GetViewFrame()->GetObjectShell();
+ if ( pSh->GetModel().is() )
+ pSh->GetModel()->setCurrentController( GetViewFrame()->GetFrame().GetController() );
SetCurrentDocument();
- }
+ }
}
//--------------------------------------------------------------------
-void SfxViewShell::Deactivate(BOOL /*bMDI*/)
+void SfxViewShell::Deactivate(sal_Bool /*bMDI*/)
{
- DBG_CHKTHIS(SfxViewShell, 0);
+ DBG_CHKTHIS(SfxViewShell, 0);
}
//--------------------------------------------------------------------
@@ -1030,7 +1107,7 @@ void SfxViewShell::AdjustPosSizePixel
)
{
- DBG_CHKTHIS(SfxViewShell, 0);
+ DBG_CHKTHIS(SfxViewShell, 0);
}
//--------------------------------------------------------------------
@@ -1099,12 +1176,12 @@ void SfxViewShell::OuterResizePixel
[Cross-reference]
- <SfxViewShell::InnerResizePixel(const Point&,const Size& rSize)>
+ <SfxViewShell::InnerResizePixel(const Point&,const Size& rSize)>
*/
{
- DBG_CHKTHIS(SfxViewShell, 0);
- SetBorderPixel( SvBorder() );
+ DBG_CHKTHIS(SfxViewShell, 0);
+ SetBorderPixel( SvBorder() );
}
//--------------------------------------------------------------------
@@ -1150,7 +1227,7 @@ void SfxViewShell::InnerResizePixel
[Cross-reference]
- <SfxViewShell::OuterResizePixel(const Point&,const Size& rSize)>
+ <SfxViewShell::OuterResizePixel(const Point&,const Size& rSize)>
*/
{
@@ -1166,8 +1243,10 @@ void SfxViewShell::InvalidateBorder()
DBG_ASSERT( GetViewFrame(), "SfxViewShell without SfxViewFrame" );
GetViewFrame()->InvalidateBorderImpl( this );
- if ( pImp->pController )
- pImp->pController->BorderWidthsChanged_Impl();
+ if (pImp->m_pController.is())
+ {
+ pImp->m_pController->BorderWidthsChanged_Impl();
+ }
}
//--------------------------------------------------------------------
@@ -1182,8 +1261,10 @@ void SfxViewShell::SetBorderPixel( const SvBorder &rBorder )
GetViewFrame()->SetBorderPixelImpl( this, rBorder );
// notify related controller that border size is changed
- if ( pImp->pController )
- pImp->pController->BorderWidthsChanged_Impl();
+ if (pImp->m_pController.is())
+ {
+ pImp->m_pController->BorderWidthsChanged_Impl();
+ }
}
}
@@ -1223,20 +1304,20 @@ void SfxViewShell::SetWindow
DiscardClients_Impl();
// Switch View-Port
- BOOL bHadFocus = pWindow ? pWindow->HasChildPathFocus( TRUE ) : FALSE;
+ sal_Bool bHadFocus = pWindow ? pWindow->HasChildPathFocus( sal_True ) : sal_False;
pWindow = pViewPort;
if( pWindow )
{
// Disable automatic GUI mirroring (right-to-left) for document windows
- pWindow->EnableRTL( FALSE );
+ pWindow->EnableRTL( sal_False );
}
if ( bHadFocus && pWindow )
pWindow->GrabFocus();
- //TODO/CLEANUP
- //Do we still need this Method?!
- //SFX_APP()->GrabFocus( pWindow );
+ //TODO/CLEANUP
+ //Do we still need this Method?!
+ //SFX_APP()->GrabFocus( pWindow );
}
//--------------------------------------------------------------------
@@ -1253,36 +1334,26 @@ SfxViewShell::SfxViewShell
(
SfxViewFrame* pViewFrame, /* <SfxViewFrame>, which will be
displayed in this View */
- USHORT nFlags /* See <SfxViewShell-Flags> */
+ sal_uInt16 nFlags /* See <SfxViewShell-Flags> */
)
: SfxShell(this)
- ,pImp( new SfxViewShell_Impl )
- ,pIPClientList( 0 )
- ,pFrame(pViewFrame)
- ,pSubShell(0)
- ,pWindow(0)
- ,bNoNewWindow( 0 != (nFlags & SFX_VIEW_NO_NEWWINDOW) )
+, pImp( new SfxViewShell_Impl(nFlags) )
+ ,pIPClientList( 0 )
+ ,pFrame(pViewFrame)
+ ,pSubShell(0)
+ ,pWindow(0)
+ ,bNoNewWindow( 0 != (nFlags & SFX_VIEW_NO_NEWWINDOW) )
{
DBG_CTOR(SfxViewShell, 0);
//pImp->pPrinterCommandQueue = new SfxAsyncPrintExec_Impl( this );
- pImp->pController = 0;
- pImp->bIsShowView =
- !(SFX_VIEW_NO_SHOW == (nFlags & SFX_VIEW_NO_SHOW));
-
- pImp->bCanPrint = SFX_VIEW_CAN_PRINT == (nFlags & SFX_VIEW_CAN_PRINT);
- pImp->bHasPrintOptions =
- SFX_VIEW_HAS_PRINTOPTIONS == (nFlags & SFX_VIEW_HAS_PRINTOPTIONS);
- pImp->bPlugInsActive = TRUE;
- pImp->bGotOwnerShip = FALSE;
- pImp->bGotFrameOwnerShip = FALSE;
+
if ( pViewFrame->GetParentViewFrame() )
- pImp->bPlugInsActive = pViewFrame->GetParentViewFrame()->GetViewShell()->pImp->bPlugInsActive;
- pImp->eScroll = SCROLLING_DEFAULT;
- pImp->nPrinterLocks = 0;
- pImp->bControllerSet = FALSE;
- pImp->nFamily = 0xFFFF; // undefined, default set by TemplateDialog
+ {
+ pImp->m_bPlugInsActive = pViewFrame->GetParentViewFrame()
+ ->GetViewShell()->pImp->m_bPlugInsActive;
+ }
SetMargin( pViewFrame->GetMargin_Impl() );
SetPool( &pViewFrame->GetObjectShell()->GetPool() );
@@ -1311,16 +1382,10 @@ SfxViewShell::~SfxViewShell()
pImp->xClipboardListener = NULL;
}
- if ( pImp->pController )
- {
- pImp->pController->ReleaseShell_Impl();
- pImp->pController->release();
- pImp->pController = NULL;
- }
-
- if (pImp->pAccExec)
+ if (pImp->m_pController.is())
{
- DELETEZ( pImp->pAccExec );
+ pImp->m_pController->ReleaseShell_Impl();
+ pImp->m_pController.clear();
}
//DELETEZ( pImp->pPrinterCommandQueue );
@@ -1330,10 +1395,10 @@ SfxViewShell::~SfxViewShell()
//--------------------------------------------------------------------
-USHORT SfxViewShell::PrepareClose
+sal_uInt16 SfxViewShell::PrepareClose
(
- BOOL bUI, // TRUE: Allow Dialog and so on, FALSE: silent-mode
- BOOL /*bForBrowsing*/
+ sal_Bool bUI, // TRUE: Allow Dialog and so on, FALSE: silent-mode
+ sal_Bool /*bForBrowsing*/
)
{
SfxPrinter *pPrinter = GetPrinter();
@@ -1345,16 +1410,16 @@ USHORT SfxViewShell::PrepareClose
aInfoBox.Execute();
}
- return FALSE;
+ return sal_False;
}
if( GetViewFrame()->IsInModalMode() )
- return FALSE;
+ return sal_False;
if( bUI && GetViewFrame()->GetDispatcher()->IsLocked() )
- return FALSE;
+ return sal_False;
- return TRUE;
+ return sal_True;
}
//--------------------------------------------------------------------
@@ -1372,9 +1437,9 @@ SfxViewShell* SfxViewShell::Get( const Reference< XController>& i_rController )
if ( !i_rController.is() )
return NULL;
- for ( SfxViewShell* pViewShell = SfxViewShell::GetFirst( NULL, FALSE );
+ for ( SfxViewShell* pViewShell = SfxViewShell::GetFirst( NULL, sal_False );
pViewShell;
- pViewShell = SfxViewShell::GetNext( *pViewShell, NULL, FALSE )
+ pViewShell = SfxViewShell::GetNext( *pViewShell, NULL, sal_False )
)
{
if ( pViewShell->GetController() == i_rController )
@@ -1403,7 +1468,7 @@ SdrView* SfxViewShell::GetDrawView() const
String SfxViewShell::GetSelectionText
(
- BOOL /*bCompleteWords*/ /* FALSE (default)
+ sal_Bool /*bCompleteWords*/ /* FALSE (default)
Only the actual selected text is returned.
TRUE
@@ -1431,7 +1496,7 @@ String SfxViewShell::GetSelectionText
//--------------------------------------------------------------------
-BOOL SfxViewShell::HasSelection( BOOL ) const
+sal_Bool SfxViewShell::HasSelection( sal_Bool ) const
/* [Description]
@@ -1441,7 +1506,7 @@ BOOL SfxViewShell::HasSelection( BOOL ) const
*/
{
- return FALSE;
+ return sal_False;
}
//--------------------------------------------------------------------
@@ -1493,10 +1558,10 @@ void SfxViewShell::RemoveSubShell( SfxShell* pShell )
SfxDispatcher *pDisp = pFrame->GetDispatcher();
if ( !pShell )
{
- USHORT nCount = pImp->aArr.Count();
+ sal_uInt16 nCount = pImp->aArr.Count();
if ( pDisp->IsActive(*this) )
{
- for ( USHORT n=nCount; n>0; n-- )
+ for ( sal_uInt16 n=nCount; n>0; n-- )
pDisp->Pop( *pImp->aArr[n-1] );
pDisp->Flush();
}
@@ -1505,7 +1570,7 @@ void SfxViewShell::RemoveSubShell( SfxShell* pShell )
}
else
{
- USHORT nPos = pImp->aArr.GetPos( pShell );
+ sal_uInt16 nPos = pImp->aArr.GetPos( pShell );
if ( nPos != 0xFFFF )
{
pImp->aArr.Remove( nPos );
@@ -1518,21 +1583,21 @@ void SfxViewShell::RemoveSubShell( SfxShell* pShell )
}
}
-SfxShell* SfxViewShell::GetSubShell( USHORT nNo )
+SfxShell* SfxViewShell::GetSubShell( sal_uInt16 nNo )
{
- USHORT nCount = pImp->aArr.Count();
+ sal_uInt16 nCount = pImp->aArr.Count();
if ( nNo<nCount )
return pImp->aArr[nCount-nNo-1];
return NULL;
}
-void SfxViewShell::PushSubShells_Impl( BOOL bPush )
+void SfxViewShell::PushSubShells_Impl( sal_Bool bPush )
{
- USHORT nCount = pImp->aArr.Count();
+ sal_uInt16 nCount = pImp->aArr.Count();
SfxDispatcher *pDisp = pFrame->GetDispatcher();
if ( bPush )
{
- for ( USHORT n=0; n<nCount; n++ )
+ for ( sal_uInt16 n=0; n<nCount; n++ )
pDisp->Push( *pImp->aArr[n] );
}
else if ( nCount )
@@ -1547,19 +1612,20 @@ void SfxViewShell::PushSubShells_Impl( BOOL bPush )
//--------------------------------------------------------------------
-void SfxViewShell::WriteUserData( String&, BOOL )
+void SfxViewShell::WriteUserData( String&, sal_Bool )
{
}
//--------------------------------------------------------------------
-void SfxViewShell::ReadUserData(const String&, BOOL )
+void SfxViewShell::ReadUserData(const String&, sal_Bool )
{
}
void SfxViewShell::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool )
{
}
+
void SfxViewShell::WriteUserDataSequence ( ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool )
{
}
@@ -1570,14 +1636,14 @@ void SfxViewShell::WriteUserDataSequence ( ::com::sun::star::uno::Sequence < ::c
SfxViewShell* SfxViewShell::GetFirst
(
- const TypeId* pType,
- BOOL bOnlyVisible
+ const TypeId* pType,
+ sal_Bool bOnlyVisible
)
{
// search for a SfxViewShell of the specified type
SfxViewShellArr_Impl &rShells = SFX_APP()->GetViewShells_Impl();
SfxViewFrameArr_Impl &rFrames = SFX_APP()->GetViewFrames_Impl();
- for ( USHORT nPos = 0; nPos < rShells.Count(); ++nPos )
+ for ( sal_uInt16 nPos = 0; nPos < rShells.Count(); ++nPos )
{
SfxViewShell *pShell = rShells.GetObject(nPos);
if ( pShell )
@@ -1609,12 +1675,12 @@ SfxViewShell* SfxViewShell::GetNext
(
const SfxViewShell& rPrev,
const TypeId* pType,
- BOOL bOnlyVisible
+ sal_Bool bOnlyVisible
)
{
SfxViewShellArr_Impl &rShells = SFX_APP()->GetViewShells_Impl();
SfxViewFrameArr_Impl &rFrames = SFX_APP()->GetViewFrames_Impl();
- USHORT nPos;
+ sal_uInt16 nPos;
for ( nPos = 0; nPos < rShells.Count(); ++nPos )
if ( rShells.GetObject(nPos) == &rPrev )
break;
@@ -1668,7 +1734,8 @@ void SfxViewShell::Notify( SfxBroadcaster& rBC,
SFX_ITEMSET_ARG( pSet, pItem, SfxUnoAnyItem, SID_VIEW_DATA, sal_False );
if ( pItem )
{
- pImp->pController->restoreViewData( pItem->GetValue() );
+ pImp->m_pController->restoreViewData(
+ pItem->GetValue() );
pSet->ClearItem( SID_VIEW_DATA );
}
@@ -1685,15 +1752,17 @@ void SfxViewShell::Notify( SfxBroadcaster& rBC,
//--------------------------------------------------------------------
-BOOL SfxViewShell::ExecKey_Impl(const KeyEvent& aKey)
+sal_Bool SfxViewShell::ExecKey_Impl(const KeyEvent& aKey)
{
- if (!pImp->pAccExec)
+ if (!pImp->m_pAccExec.get())
{
- pImp->pAccExec = ::svt::AcceleratorExecute::createAcceleratorHelper();
- pImp->pAccExec->init(::comphelper::getProcessServiceFactory(), pFrame->GetFrame().GetFrameInterface());
+ pImp->m_pAccExec.reset(
+ ::svt::AcceleratorExecute::createAcceleratorHelper() );
+ pImp->m_pAccExec->init(::comphelper::getProcessServiceFactory(),
+ pFrame->GetFrame().GetFrameInterface());
}
- return pImp->pAccExec->execute(aKey.GetKeyCode());
+ return pImp->m_pAccExec->execute(aKey.GetKeyCode());
}
//--------------------------------------------------------------------
@@ -1766,7 +1835,7 @@ void SfxViewShell::GotFocus() const
void SfxViewShell::ResetAllClients_Impl( SfxInPlaceClient *pIP )
{
- SfxInPlaceClientList *pClients = GetIPClientList_Impl(FALSE);
+ SfxInPlaceClientList *pClients = GetIPClientList_Impl(sal_False);
if ( !pClients )
return;
@@ -1782,7 +1851,7 @@ void SfxViewShell::ResetAllClients_Impl( SfxInPlaceClient *pIP )
void SfxViewShell::DisconnectAllClients()
{
- SfxInPlaceClientList *pClients = GetIPClientList_Impl(FALSE);
+ SfxInPlaceClientList *pClients = GetIPClientList_Impl(sal_False);
if ( !pClients )
return;
@@ -1809,7 +1878,7 @@ void SfxViewShell::AdjustVisArea(const Rectangle& rRect)
void SfxViewShell::VisAreaChanged(const Rectangle& /*rVisArea*/)
{
- SfxInPlaceClientList *pClients = GetIPClientList_Impl(FALSE);
+ SfxInPlaceClientList *pClients = GetIPClientList_Impl(sal_False);
if ( !pClients )
return;
@@ -1834,12 +1903,12 @@ void SfxViewShell::CheckIPClient_Impl( SfxInPlaceClient *pIPClient, const Rectan
( ( pIPClient->GetObjectMiscStatus() & embed::EmbedMisc::MS_EMBED_ACTIVATEWHENVISIBLE ) != 0 );
// this method is called when either a client is created or the "Edit/Plugins" checkbox is checked
- if ( !pIPClient->IsObjectInPlaceActive() && pImp->bPlugInsActive )
+ if ( !pIPClient->IsObjectInPlaceActive() && pImp->m_bPlugInsActive )
{
- // object in client is currently not active
- // check if the object wants to be activated always or when it becomes at least partially visible
- // TODO/LATER: maybe we should use the scaled area instead of the ObjArea?!
- if ( bAlwaysActive || (bActiveWhenVisible && rVisArea.IsOver(pIPClient->GetObjArea())) )
+ // object in client is currently not active
+ // check if the object wants to be activated always or when it becomes at least partially visible
+ // TODO/LATER: maybe we should use the scaled area instead of the ObjArea?!
+ if ( bAlwaysActive || (bActiveWhenVisible && rVisArea.IsOver(pIPClient->GetObjArea())) )
{
try
{
@@ -1850,21 +1919,21 @@ void SfxViewShell::CheckIPClient_Impl( SfxInPlaceClient *pIPClient, const Rectan
}
}
}
- else if ( !pImp->bPlugInsActive )
+ else if (!pImp->m_bPlugInsActive)
{
- // object in client is currently active and "Edit/Plugins" checkbox is selected
- // check if the object wants to be activated always or when it becomes at least partially visible
+ // object in client is currently active and "Edit/Plugins" checkbox is selected
+ // check if the object wants to be activated always or when it becomes at least partially visible
// in this case selecting of the "Edit/Plugin" checkbox should let such objects deactivate
- if ( bAlwaysActive || bActiveWhenVisible )
- pIPClient->GetObject()->changeState( embed::EmbedStates::RUNNING );
+ if ( bAlwaysActive || bActiveWhenVisible )
+ pIPClient->GetObject()->changeState( embed::EmbedStates::RUNNING );
}
}
//--------------------------------------------------------------------
-BOOL SfxViewShell::PlugInsActive() const
+sal_Bool SfxViewShell::PlugInsActive() const
{
- return pImp->bPlugInsActive;
+ return pImp->m_bPlugInsActive;
}
//--------------------------------------------------------------------
@@ -1877,7 +1946,7 @@ void SfxViewShell::DiscardClients_Impl()
*/
{
- SfxInPlaceClientList *pClients = GetIPClientList_Impl(FALSE);
+ SfxInPlaceClientList *pClients = GetIPClientList_Impl(sal_False);
if ( !pClients )
return;
@@ -1889,14 +1958,14 @@ void SfxViewShell::DiscardClients_Impl()
SfxScrollingMode SfxViewShell::GetScrollingMode() const
{
- return pImp->eScroll;
+ return pImp->m_eScroll;
}
//--------------------------------------------------------------------
void SfxViewShell::SetScrollingMode( SfxScrollingMode eMode )
{
- pImp->eScroll = eMode;
+ pImp->m_eScroll = eMode;
}
//--------------------------------------------------------------------
@@ -1961,9 +2030,9 @@ void SfxViewShell::MarginChanged()
//--------------------------------------------------------------------
-BOOL SfxViewShell::IsShowView_Impl() const
+sal_Bool SfxViewShell::IsShowView_Impl() const
{
- return pImp->bIsShowView;
+ return pImp->m_bIsShowView;
}
//--------------------------------------------------------------------
@@ -1979,14 +2048,14 @@ void SfxViewShell::JumpToMark( const String& rMark )
{
SfxStringItem aMarkItem( SID_JUMPTOMARK, rMark );
GetViewFrame()->GetDispatcher()->Execute(
- SID_JUMPTOMARK,
- SFX_CALLMODE_SYNCHRON|SFX_CALLMODE_RECORD,
- &aMarkItem, 0L );
+ SID_JUMPTOMARK,
+ SFX_CALLMODE_SYNCHRON|SFX_CALLMODE_RECORD,
+ &aMarkItem, 0L );
}
//------------------------------------------------------------------------
-SfxInPlaceClientList* SfxViewShell::GetIPClientList_Impl( BOOL bCreate ) const
+SfxInPlaceClientList* SfxViewShell::GetIPClientList_Impl( sal_Bool bCreate ) const
{
if ( !pIPClientList && bCreate )
( (SfxViewShell*) this )->pIPClientList = new SfxInPlaceClientList;
@@ -1995,26 +2064,24 @@ SfxInPlaceClientList* SfxViewShell::GetIPClientList_Impl( BOOL bCreate ) const
void SfxViewShell::SetController( SfxBaseController* pController )
{
- pImp->pController = pController;
- pImp->pController->acquire();
- pImp->bControllerSet = TRUE;
+ pImp->m_pController = pController;
+ pImp->m_bControllerSet = true;
// there should be no old listener, but if there is one, it should be disconnected
if ( pImp->xClipboardListener.is() )
pImp->xClipboardListener->DisconnectViewShell();
- pImp->xClipboardListener = new SfxClipboardChangeListener( this );
- AddRemoveClipboardListener( pImp->xClipboardListener.get(), TRUE );
+ pImp->xClipboardListener = new SfxClipboardChangeListener( this, GetClipboardNotifier() );
}
Reference < XController > SfxViewShell::GetController()
{
- return pImp->pController;
+ return pImp->m_pController.get();
}
SfxBaseController* SfxViewShell::GetBaseController_Impl() const
{
- return pImp->pController;
+ return pImp->m_pController.get();
}
void SfxViewShell::AddContextMenuInterceptor_Impl( const REFERENCE< XCONTEXTMENUINTERCEPTOR >& xInterceptor )
@@ -2035,10 +2102,10 @@ void SfxViewShell::RemoveContextMenuInterceptor_Impl( const REFERENCE< XCONTEXTM
void Change( Menu* pMenu, SfxViewShell* pView )
{
SfxDispatcher *pDisp = pView->GetViewFrame()->GetDispatcher();
- USHORT nCount = pMenu->GetItemCount();
- for ( USHORT nPos=0; nPos<nCount; ++nPos )
+ sal_uInt16 nCount = pMenu->GetItemCount();
+ for ( sal_uInt16 nPos=0; nPos<nCount; ++nPos )
{
- USHORT nId = pMenu->GetItemId(nPos);
+ sal_uInt16 nId = pMenu->GetItemId(nPos);
String aCmd = pMenu->GetItemCommand(nId);
PopupMenu* pPopup = pMenu->GetPopupMenu(nId);
if ( pPopup )
@@ -2049,7 +2116,7 @@ void Change( Menu* pMenu, SfxViewShell* pView )
{
if ( aCmd.CompareToAscii(".uno:", 5) == 0 )
{
- for (USHORT nIdx=0;;)
+ for (sal_uInt16 nIdx=0;;)
{
SfxShell *pShell=pDisp->GetShell(nIdx++);
if (pShell == NULL)
@@ -2059,6 +2126,7 @@ void Change( Menu* pMenu, SfxViewShell* pView )
if ( pSlot )
{
pMenu->InsertItem( pSlot->GetSlotId(), pMenu->GetItemText( nId ), pMenu->GetItemBits( nId ), nPos );
+ pMenu->SetItemCommand( pSlot->GetSlotId(), aCmd );
pMenu->RemoveItem( nPos+1 );
break;
}
@@ -2069,19 +2137,19 @@ void Change( Menu* pMenu, SfxViewShell* pView )
}
-BOOL SfxViewShell::TryContextMenuInterception( Menu& rIn, const ::rtl::OUString& rMenuIdentifier, Menu*& rpOut, ::com::sun::star::ui::ContextMenuExecuteEvent aEvent )
+sal_Bool SfxViewShell::TryContextMenuInterception( Menu& rIn, const ::rtl::OUString& rMenuIdentifier, Menu*& rpOut, ui::ContextMenuExecuteEvent aEvent )
{
rpOut = NULL;
- BOOL bModified = FALSE;
+ sal_Bool bModified = sal_False;
// create container from menu
- // #110897#
+ // #110897#
// aEvent.ActionTriggerContainer = ::framework::ActionTriggerHelper::CreateActionTriggerContainerFromMenu( &rIn );
aEvent.ActionTriggerContainer = ::framework::ActionTriggerHelper::CreateActionTriggerContainerFromMenu(
::comphelper::getProcessServiceFactory(), &rIn, &rMenuIdentifier );
// get selection from controller
- aEvent.Selection = ::com::sun::star::uno::Reference < ::com::sun::star::view::XSelectionSupplier > ( GetController(), ::com::sun::star::uno::UNO_QUERY );
+ aEvent.Selection = uno::Reference < view::XSelectionSupplier > ( GetController(), uno::UNO_QUERY );
// call interceptors
::cppu::OInterfaceIteratorHelper aIt( pImp->aInterceptorContainer );
@@ -2089,22 +2157,22 @@ BOOL SfxViewShell::TryContextMenuInterception( Menu& rIn, const ::rtl::OUString&
{
try
{
- ::com::sun::star::ui::ContextMenuInterceptorAction eAction =
- ((::com::sun::star::ui::XContextMenuInterceptor*)aIt.next())->notifyContextMenuExecute( aEvent );
+ ui::ContextMenuInterceptorAction eAction =
+ ((ui::XContextMenuInterceptor*)aIt.next())->notifyContextMenuExecute( aEvent );
switch ( eAction )
{
- case ::com::sun::star::ui::ContextMenuInterceptorAction_CANCELLED :
+ case ui::ContextMenuInterceptorAction_CANCELLED :
// interceptor does not want execution
- return FALSE;
- case ::com::sun::star::ui::ContextMenuInterceptorAction_EXECUTE_MODIFIED :
+ return sal_False;
+ case ui::ContextMenuInterceptorAction_EXECUTE_MODIFIED :
// interceptor wants his modified menu to be executed
- bModified = TRUE;
+ bModified = sal_True;
break;
- case ::com::sun::star::ui::ContextMenuInterceptorAction_CONTINUE_MODIFIED :
+ case ui::ContextMenuInterceptorAction_CONTINUE_MODIFIED :
// interceptor has modified menu, but allows for calling other interceptors
- bModified = TRUE;
+ bModified = sal_True;
continue;
- case ::com::sun::star::ui::ContextMenuInterceptorAction_IGNORED :
+ case ui::ContextMenuInterceptorAction_IGNORED :
// interceptor is indifferent
continue;
default:
@@ -2112,7 +2180,7 @@ BOOL SfxViewShell::TryContextMenuInterception( Menu& rIn, const ::rtl::OUString&
continue;
}
}
- catch( ::com::sun::star::uno::RuntimeException& )
+ catch( uno::RuntimeException& )
{
aIt.remove();
}
@@ -2129,56 +2197,56 @@ BOOL SfxViewShell::TryContextMenuInterception( Menu& rIn, const ::rtl::OUString&
Change( rpOut, this );
}
- return TRUE;
+ return sal_True;
}
void SfxViewShell::TakeOwnerShip_Impl()
{
// currently there is only one reason to take OwnerShip: a hidden frame is printed
// so the ViewShell will check this on EndPrint (->prnmon.cxx)
- pImp->bGotOwnerShip = TRUE;
+ pImp->m_bGotOwnership = true;
}
void SfxViewShell::TakeFrameOwnerShip_Impl()
{
// currently there is only one reason to take OwnerShip: a hidden frame is printed
// so the ViewShell will check this on EndPrint (->prnmon.cxx)
- pImp->bGotFrameOwnerShip = TRUE;
+ pImp->m_bGotFrameOwnership = true;
}
void SfxViewShell::CheckOwnerShip_Impl()
{
- BOOL bSuccess = FALSE;
- if( pImp->bGotOwnerShip )
+ sal_Bool bSuccess = sal_False;
+ if (pImp->m_bGotOwnership)
{
- com::sun::star::uno::Reference < com::sun::star::util::XCloseable > xModel(
- GetObjectShell()->GetModel(), com::sun::star::uno::UNO_QUERY );
+ uno::Reference < util::XCloseable > xModel(
+ GetObjectShell()->GetModel(), uno::UNO_QUERY );
if ( xModel.is() )
{
try
{
// this call will destroy this object in case of success!
xModel->close( sal_True );
- bSuccess = TRUE;
+ bSuccess = sal_True;
}
- catch ( com::sun::star::util::CloseVetoException& )
+ catch ( util::CloseVetoException& )
{
}
}
}
- if( !bSuccess && pImp->bGotFrameOwnerShip )
+ if (!bSuccess && pImp->m_bGotFrameOwnership)
{
// 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 );
+ uno::Reference < util::XCloseable > xFrame(
+ GetViewFrame()->GetFrame().GetFrameInterface(), com::sun::star::uno::UNO_QUERY );
if ( xFrame.is() )
{
try
{
xFrame->close( sal_True );
}
- catch ( com::sun::star::util::CloseVetoException& )
+ catch ( util::CloseVetoException& )
{
}
}
@@ -2187,28 +2255,30 @@ void SfxViewShell::CheckOwnerShip_Impl()
long SfxViewShell::HandleNotifyEvent_Impl( NotifyEvent& rEvent )
{
- if ( pImp->pController )
- return pImp->pController->HandleEvent_Impl( rEvent );
+ if (pImp->m_pController.is())
+ return pImp->m_pController->HandleEvent_Impl( rEvent );
return 0;
}
-BOOL SfxViewShell::HasKeyListeners_Impl()
+sal_Bool SfxViewShell::HasKeyListeners_Impl()
{
- return pImp->pController ? pImp->pController->HasKeyListeners_Impl() : FALSE;
+ return (pImp->m_pController.is())
+ ? pImp->m_pController->HasKeyListeners_Impl() : sal_False;
}
-BOOL SfxViewShell::HasMouseClickListeners_Impl()
+sal_Bool SfxViewShell::HasMouseClickListeners_Impl()
{
- return pImp->pController ? pImp->pController->HasMouseClickListeners_Impl() : FALSE;
+ return (pImp->m_pController.is())
+ ? pImp->m_pController->HasMouseClickListeners_Impl() : sal_False;
}
void SfxViewShell::SetAdditionalPrintOptions( const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >& rOpts )
{
pImp->aPrintOpts = rOpts;
-// GetObjectShell()->Broadcast( SfxPrintingHint( -3, NULL, NULL, rOpts ) );
+// GetObjectShell()->Broadcast( SfxPrintingHint( -3, NULL, NULL, rOpts ) );
}
-BOOL SfxViewShell::Escape()
+sal_Bool SfxViewShell::Escape()
{
return GetViewFrame()->GetBindings().Execute( SID_TERMINATE_INPLACEACTIVATION );
}
@@ -2221,12 +2291,21 @@ Reference< view::XRenderable > SfxViewShell::GetRenderable()
{
Reference< frame::XModel > xModel( pObj->GetModel() );
if( xModel.is() )
- xRender = Reference< view::XRenderable >( xModel, UNO_QUERY );
+ xRender = Reference< view::XRenderable >( xModel, UNO_QUERY );
}
return xRender;
}
-void SfxViewShell::AddRemoveClipboardListener( const uno::Reference < datatransfer::clipboard::XClipboardListener >& rClp, BOOL bAdd )
+uno::Reference< datatransfer::clipboard::XClipboardNotifier > SfxViewShell::GetClipboardNotifier()
+{
+ uno::Reference< datatransfer::clipboard::XClipboardNotifier > xClipboardNotifier;
+ if ( GetViewFrame() )
+ xClipboardNotifier = uno::Reference< datatransfer::clipboard::XClipboardNotifier >( GetViewFrame()->GetWindow().GetClipboard(), uno::UNO_QUERY );
+
+ return xClipboardNotifier;
+}
+
+void SfxViewShell::AddRemoveClipboardListener( const uno::Reference < datatransfer::clipboard::XClipboardListener >& rClp, sal_Bool bAdd )
{
try
{
diff --git a/sfx2/util/hidother.src b/sfx2/util/hidother.src
index 38e5577a72be..72bd77c5c011 100644..100755
--- a/sfx2/util/hidother.src
+++ b/sfx2/util/hidother.src
@@ -26,41 +26,20 @@
************************************************************************/
#include "../source/inc/helpid.hrc" // HID_XXX
-#include "../inc/sfx2/sfxsids.hrc" // SID_XXX
-#include "../inc/sfx2/sfx.hrc"
-
hidspecial HID_APP_WIN { HelpID = HID_APP_WIN; };
hidspecial HID_DESKTOP { HelpID = HID_DESKTOP; };
hidspecial HID_DOCINFO_FRAME { HelpID = HID_DOCINFO_FRAME; };
hidspecial HID_EXPLORER_FRAME { HelpID = HID_EXPLORER_FRAME; };
-hidspecial HID_FILEDLG_FILE { HelpID = HID_FILEDLG_FILE; };
-hidspecial HID_FILEDLG_MANAGER { HelpID = HID_FILEDLG_MANAGER; };
-hidspecial HID_FILEDLG_READ_ONLY { HelpID = HID_FILEDLG_READ_ONLY; };
-hidspecial HID_FILEDLG_STANDARD { HelpID = HID_FILEDLG_STANDARD; };
-hidspecial HID_FILEDLG_URL { HelpID = HID_FILEDLG_URL; };
-hidspecial HID_FILEDLG_USE_PASSWD { HelpID = HID_FILEDLG_USE_PASSWD; };
-hidspecial HID_INTERFACE_SFXMAILVIEW { HelpID = HID_INTERFACE_SFXMAILVIEW; };
-hidspecial HID_INTERFACE_SFXEXPLVIEWSH { HelpID = HID_INTERFACE_SFXEXPLVIEWSH; };
-hidspecial HID_INTERFACE_SFXFRAMESETVIEW { HelpID = HID_INTERFACE_SFXFRAMESETVIEW; };
-hidspecial HID_INTERFACE_SFXFRAMESETSOURCEVIEW { HelpID = HID_INTERFACE_SFXFRAMESETSOURCEVIEW; };
-hidspecial HID_INTERFACE_SFXHELP_VIEWSH { HelpID = HID_INTERFACE_SFXHELP_VIEWSH; };
hidspecial HID_PREVIEW_FRAME { HelpID = HID_PREVIEW_FRAME; };
hidspecial HID_PRINT_OPTIONS { HelpID = HID_PRINT_OPTIONS; };
hidspecial HID_TEMPLATE_FILTER { HelpID = HID_TEMPLATE_FILTER; };
hidspecial HID_TEMPLATE_FMT { HelpID = HID_TEMPLATE_FMT; };
hidspecial HID_SEARCH_DLG_TABLB { HelpID = HID_SEARCH_DLG_TABLB; };
-hidspecial SID_STYLE_FAMILY1 { HelpID = SID_STYLE_FAMILY1; };
-hidspecial SID_STYLE_FAMILY2 { HelpID = SID_STYLE_FAMILY2; };
-hidspecial SID_STYLE_FAMILY3 { HelpID = SID_STYLE_FAMILY3; };
-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 HID_HELPAGENT_TIP_BOX { HelpId = HID_HELPAGENT_TIP_BOX; };
hidspecial HID_TEMPLDLG_TOOLBOX_LEFT { HelpId = HID_TEMPLDLG_TOOLBOX_LEFT;};
hidspecial HID_EXPLORER_SRCH_COUNT { HelpId = HID_EXPLORER_SRCH_COUNT;};
-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 HID_CONFIG_EVENT_OFFICE_BASED { HelpID = HID_CONFIG_EVENT_OFFICE_BASED; };
@@ -70,35 +49,10 @@ hidspecial HID_EXPLORERMENU_ARRANGEICONS { HelpID = HID_EXPLORERMENU_ARRA
hidspecial HID_EXPLORERMENU_STDTEMPLATE { HelpID = HID_EXPLORERMENU_STDTEMPLATE; };
hidspecial HID_EXPLORER_DOCVIEW_ICON { HelpID = HID_EXPLORER_DOCVIEW_ICON; };
hidspecial HID_EXPLORER_DOCVIEW_DETAILS { HelpID = HID_EXPLORER_DOCVIEW_DETAILS; };
-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 HID_BRWBOX_HEADERBAR { HelpID = HID_BRWBOX_HEADERBAR; };
hidspecial HID_TASKBAR { HelpID = HID_TASKBAR; };
hidspecial HID_TASKBUTTONBAR { HelpID = HID_TASKBUTTONBAR; };
hidspecial HID_TASKTOOLBAR { HelpID = HID_TASKTOOLBAR; };
-hidspecial HID_CHAOS_NEW_IMAP_BOX { HelpID = HID_CHAOS_NEW_IMAP_BOX; };
-hidspecial HID_CHAOS_NEW_IMAP_MSG { HelpID = HID_CHAOS_NEW_IMAP_MSG; };
-hidspecial HID_CHAOS_NEW_IMAP_FLD { HelpID = HID_CHAOS_NEW_IMAP_FLD; };
-hidspecial HID_CHAOS_NEW_NEWS_BOX { HelpID = HID_CHAOS_NEW_NEWS_BOX; };
-hidspecial HID_CHAOS_NEW_NEWS_MSG { HelpID = HID_CHAOS_NEW_NEWS_MSG; };
-hidspecial HID_CHAOS_NEW_IMAP_BOX { HelpID = HID_CHAOS_NEW_IMAP_BOX; };
-hidspecial HID_CHAOS_NEW_FSYS_FLD { HelpID = HID_CHAOS_NEW_FSYS_FLD; };
-hidspecial HID_CHAOS_NEW_FSYS_LNK { HelpID = HID_CHAOS_NEW_FSYS_LNK; };
-hidspecial HID_CHAOS_NEW_FTP_BOX { HelpID = HID_CHAOS_NEW_FTP_BOX; };
-hidspecial HID_CHAOS_NEW_FTP_FLD { HelpID = HID_CHAOS_NEW_FTP_FLD; };
-hidspecial HID_CHAOS_NEW_OUT_BOX { HelpID = HID_CHAOS_NEW_OUT_BOX; };
-hidspecial HID_CHAOS_NEW_OUT_MSG { HelpID = HID_CHAOS_NEW_OUT_MSG; };
-hidspecial HID_CHAOS_NEW_POP3_BOX { HelpID = HID_CHAOS_NEW_POP3_BOX; };
-hidspecial HID_CHAOS_NEW_POP3_MSG { HelpID = HID_CHAOS_NEW_POP3_MSG; };
-hidspecial HID_CHAOS_NEW_SEARCH { HelpID = HID_CHAOS_NEW_SEARCH; };
-hidspecial HID_CHAOS_NEW_VIM_BOX { HelpID = HID_CHAOS_NEW_VIM_BOX; };
-hidspecial HID_CHAOS_NEW_VIM_MSG { HelpID = HID_CHAOS_NEW_VIM_MSG; };
-hidspecial HID_CHAOS_NEW_SUBSCR_BOX { HelpID = HID_CHAOS_NEW_SUBSCR_BOX; };
-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 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; };
@@ -107,22 +61,9 @@ hidspecial HID_CNT_PAGE_HEADER { HelpID = HID_CNT_PAGE_HEADER;
hidspecial HID_CNT_PAGE_DESCRIPTION { HelpID = HID_CNT_PAGE_DESCRIPTION; };
hidspecial HID_CNT_LB_HEADER { HelpID = HID_CNT_LB_HEADER; };
hidspecial HID_CNT_LB_DESCRIPTION { HelpID = HID_CNT_LB_DESCRIPTION; };
-hidspecial SID_GROUPVIEW { HelpID = SID_GROUPVIEW; };
hidspecial HID_GROUPVIEW_CONTENT_BIG { HelpID = HID_GROUPVIEW_CONTENT_BIG; };
hidspecial HID_GROUPVIEW_CONTENT_SMALL { HelpID = HID_GROUPVIEW_CONTENT_SMALL; };
hidspecial HID_GROUPVIEW_CONTENT_TREE { HelpID = HID_GROUPVIEW_CONTENT_TREE; };
-hidspecial HID_FILEDLG_AUTOCOMPLETEBOX { HelpID = HID_FILEDLG_AUTOCOMPLETEBOX; };
-hidspecial HID_FILEDLG_SAVE_BTN { HelpID = HID_FILEDLG_SAVE_BTN; };
-hidspecial HID_FILEDLG_SAVE_FILENAME { HelpID = HID_FILEDLG_SAVE_FILENAME; };
-hidspecial HID_FILEDLG_SAVE_FILETYPE { HelpID = HID_FILEDLG_SAVE_FILETYPE; };
-hidspecial HID_FILEDLG_INSERT_BTN { HelpID = HID_FILEDLG_INSERT_BTN; };
-hidspecial HID_FILEDLG_PATH_BTN { HelpID = HID_FILEDLG_PATH_BTN; };
-hidspecial HID_FILEDLG_PATH_FILENAME { HelpID = HID_FILEDLG_PATH_FILENAME; };
-hidspecial HID_FILEDLG_FOLDER_BTN { HelpID = HID_FILEDLG_FOLDER_BTN; };
-hidspecial HID_FILEDLG_FOLDER_FILENAME { HelpID = HID_FILEDLG_FOLDER_FILENAME; };
-hidspecial HID_FILEDLG_SRCHFOLDER_BTN { HelpID = HID_FILEDLG_SRCHFOLDER_BTN; };
-hidspecial HID_FILEDLG_EDIT_FAVORITES_LISTBOX { HelpID = HID_FILEDLG_EDIT_FAVORITES_LISTBOX; };
-hidspecial HID_FILEDLG_EDIT_FAVORITES_HEADERBAR { HelpID = HID_FILEDLG_EDIT_FAVORITES_HEADERBAR; };
hidspecial HID_BROWSERCONTROL { HelpID = HID_BROWSERCONTROL; };
hidspecial HID_TASKSTATUSBAR { HelpID = HID_TASKSTATUSBAR; };
hidspecial HID_CNT_PAGE_HEADER_TABBAR { HelpID = HID_CNT_PAGE_HEADER_TABBAR; };
@@ -147,8 +88,6 @@ hidspecial HID_CNT_SENT_VIEW_SENT_ARTICLES { HelpID = HID_CNT_SENT_VIEW_SEN
hidspecial HID_CNT_SENT_VIEW_UNSENT_ARTICLES { HelpID = HID_CNT_SENT_VIEW_UNSENT_ARTICLES; };
hidspecial HID_CNT_SENT_VIEW_MARKED_ARTICLES { HelpID = HID_CNT_SENT_VIEW_MARKED_ARTICLES; };
hidspecial HID_TABDLG_APPLY_BTN { HelpID = HID_TABDLG_APPLY_BTN; };
-hidspecial HID_FILEDLG_LINK_CB { HelpID = HID_FILEDLG_LINK_CB; };
-hidspecial HID_FILEDLG_PREVIEW_CB { HelpID = HID_FILEDLG_PREVIEW_CB; };
hidspecial HID_HELP_WINDOW { HelpID = HID_HELP_WINDOW; };
hidspecial HID_HELP_TOOLBOX { HelpID = HID_HELP_TOOLBOX; };
hidspecial HID_HELP_TOOLBOXITEM_INDEX { HelpID = HID_HELP_TOOLBOXITEM_INDEX; };
@@ -159,7 +98,6 @@ hidspecial HID_HELP_TOOLBOXITEM_PRINT { HelpID = HID_HELP_TOOLBOXITEM_
hidspecial HID_HELP_TOOLBOXITEM_BOOKMARKS { HelpID = HID_HELP_TOOLBOXITEM_BOOKMARKS; };
hidspecial HID_HELP_TOOLBOXITEM_SEARCHDIALOG { HelpID = HID_HELP_TOOLBOXITEM_SEARCHDIALOG; };
hidspecial HID_TBXCONTROL_FILENEW { HelpID = HID_TBXCONTROL_FILENEW; };
-hidspecial HID_GLOBAL_FALLBACK { HelpID = HID_GLOBAL_FALLBACK; };
hidspecial HID_CLOSE_WARNING { HelpID = HID_CLOSE_WARNING; };
hidspecial HID_DID_SAVE_PACKED_XML { HelpID = HID_DID_SAVE_PACKED_XML; };
hidspecial HID_HELP_ONHELP { HelpID = HID_HELP_ONHELP; };
diff --git a/sfx2/util/make_tco.btm b/sfx2/util/make_tco.btm
index d25dad24a692..d25dad24a692 100644..100755
--- a/sfx2/util/make_tco.btm
+++ b/sfx2/util/make_tco.btm
diff --git a/sfx2/util/makefile.mk b/sfx2/util/makefile.mk
deleted file mode 100644
index 9e20a82d4252..000000000000
--- a/sfx2/util/makefile.mk
+++ /dev/null
@@ -1,160 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..
-
-ENABLE_EXCEPTIONS=TRUE
-PRJNAME=sfx2
-TARGET=sfx
-#sfx.hid generieren
-GEN_HID=TRUE
-GEN_HID_OTHER=TRUE
-USE_DEFFILE=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Allgemein ----------------------------------------------------
-
-LIB1TARGET= $(SLB)$/$(TARGET).lib
-LIB1FILES= $(SLB)$/appl.lib \
- $(SLB)$/explorer.lib \
- $(SLB)$/doc.lib \
- $(SLB)$/view.lib \
- $(SLB)$/control.lib \
- $(SLB)$/notify.lib \
- $(SLB)$/menu.lib \
- $(SLB)$/inet.lib \
- $(SLB)$/toolbox.lib \
- $(SLB)$/statbar.lib \
- $(SLB)$/dialog.lib \
- $(SLB)$/bastyp.lib \
- $(SLB)$/config.lib
-
-.IF "$(ENABLE_LAYOUT)" == "TRUE"
-LIB1FILES += $(SLB)$/layout.lib
-.ENDIF # ENABLE_LAYOUT == TRUE
-
-HELPIDFILES=\
- ..\inc\sfx2\sfxsids.hrc \
- ..\source\inc\helpid.hrc
-
-.IF "$(GUI)"!="UNX"
-LIB2TARGET= $(LB)$/$(TARGET).lib
-LIB2FILES= $(LB)$/isfx.lib
-LIB2DEPN=$(SHL1TARGETN)
-.ENDIF
-
-SHL1TARGET= sfx$(DLLPOSTFIX)
-SHL1IMPLIB= isfx
-SHL1USE_EXPORTS=name
-
-SHL1STDLIBS+=\
- $(FWELIB) \
- $(BASICLIB) \
- $(SVTOOLLIB) \
- $(TKLIB) \
- $(VCLLIB) \
- $(SVLLIB) \
- $(SOTLIB) \
- $(UNOTOOLSLIB) \
- $(TOOLSLIB) \
- $(I18NISOLANGLIB) \
- $(SAXLIB) \
- $(COMPHELPERLIB) \
- $(UCBHELPERLIB) \
- $(CPPUHELPERLIB) \
- $(CPPULIB) \
- $(SALLIB) \
- $(LIBXML2LIB) \
-
-
-.IF "$(GUI)"=="WNT"
-
-SHL1STDLIBS+=\
- $(UWINAPILIB) \
- $(ADVAPI32LIB) \
- $(SHELL32LIB) \
- $(GDI32LIB) \
- $(OLE32LIB) \
- $(UUIDLIB)
-.ELSE # WNT
-.IF "$(OS)" == "MACOSX"
-SHL1STDLIBS+= -framework Cocoa
-.ENDIF # MACOSX
-.ENDIF # WNT
-
-
-SHL1DEPN += $(shell @$(FIND) $(SLO) -type f -name "*.OBJ" -print)
-
-SHL1LIBS= $(LIB1TARGET)
-
-SHL1DEF= $(MISC)$/$(SHL1TARGET).def
-
-DEF1NAME =$(SHL1TARGET)
-DEFLIB1NAME =sfx
-DEF1DES =Sfx
-
-SFXSRSLIST=\
- $(SRS)$/appl.srs \
- $(SRS)$/sfx.srs \
- $(SRS)$/doc.srs \
- $(SRS)$/view.srs \
- $(SRS)$/menu.srs \
- $(SRS)$/dialog.srs \
- $(SRS)$/bastyp.srs
-
-RESLIB1NAME=$(TARGET)
-RESLIB1IMAGES=$(PRJ)$/res
-RESLIB1SRSFILES=$(SFXSRSLIST)
-
-# gtk quick-starter
-.IF "$(GUI)"=="UNX"
-.IF "$(ENABLE_SYSTRAY_GTK)"=="TRUE"
-PKGCONFIG_MODULES=gtk+-2.0
-.INCLUDE: pkg_config.mk
-CFLAGS+=$(PKGCONFIG_CFLAGS)
-
-SHL3TARGET=qstart_gtk$(DLLPOSTFIX)
-SHL3LIBS=$(SLB)$/quickstart.lib
-SHL3DEPN=$(SHL1IMPLIBN) $(SHL1TARGETN)
-# libs for gtk plugin
-SHL3STDLIBS=$(SHL1STDLIBS) $(SFX2LIB)
-SHL3STDLIBS+=$(PKGCONFIG_LIBS:s/ -lpangoxft-1.0//)
-# hack for faked SO environment
-.IF "$(PKGCONFIG_ROOT)"!=""
-SHL3SONAME+=-z nodefs
-SHL3NOCHECK=TRUE
-.ENDIF # "$(PKGCONFIG_ROOT)"!=""
-.ENDIF # "$(ENABLE_SYSTRAY_GTK)"=="TRUE"
-.ENDIF # "$(GUI)"=="UNX"
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
diff --git a/sfx2/util/mkdemo.pl b/sfx2/util/mkdemo.pl
index fd4a2d9cecbe..fd4a2d9cecbe 100644..100755
--- a/sfx2/util/mkdemo.pl
+++ b/sfx2/util/mkdemo.pl
diff --git a/sfx2/util/sfx.component b/sfx2/util/sfx.component
new file mode 100755
index 000000000000..dfa3d208a169
--- /dev/null
+++ b/sfx2/util/sfx.component
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="SfxDocumentMetaData">
+ <service name="com.sun.star.document.DocumentProperties"/>
+ </implementation>
+ <implementation name="CompatWriterDocPropsImpl">
+ <service name="com.sun.star.writer.DocumentProperties"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.desktop.QuickstartWrapper">
+ <service name="com.sun.star.office.Quickstart"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.document.OwnSubFilter">
+ <service name="com.sun.star.comp.document.OwnSubFilter"/>
+ <service name="com.sun.star.document.OwnSubFilter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.embed.PackageStructureCreator">
+ <service name="com.sun.star.comp.embed.PackageStructureCreator"/>
+ <service name="com.sun.star.embed.PackageStructureCreator"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.office.FrameLoader">
+ <service name="com.sun.star.frame.SynchronousFrameLoader"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.sfx2.AppDispatchProvider">
+ <service name="com.sun.star.frame.ProtocolHandler"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.sfx2.ApplicationDialogLibraryContainer">
+ <service name="com.sun.star.script.ApplicationDialogLibraryContainer"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.sfx2.ApplicationScriptLibraryContainer">
+ <service name="com.sun.star.script.ApplicationScriptLibraryContainer"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.sfx2.DocumentTemplates">
+ <service name="com.sun.star.frame.DocumentTemplates"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.sfx2.GlobalEventBroadcaster">
+ <service name="com.sun.star.frame.GlobalEventBroadcaster"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.sfx2.IFrameObject">
+ <service name="com.sun.star.frame.SpecialEmbeddedObject"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.sfx2.PluginObject">
+ <service name="com.sun.star.frame.SpecialEmbeddedObject"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.sfx2.SfxMacroLoader">
+ <service name="com.sun.star.frame.ProtocolHandler"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.sfx2.StandaloneDocumentInfo">
+ <service name="com.sun.star.document.StandaloneDocumentInfo"/>
+ </implementation>
+</component>
diff --git a/sfx2/util/sfx.xml b/sfx2/util/sfx.xml
index 971981cc5171..971981cc5171 100644..100755
--- a/sfx2/util/sfx.xml
+++ b/sfx2/util/sfx.xml
diff --git a/sfx2/workben/custompanel/CalcWindowState.xcu b/sfx2/workben/custompanel/CalcWindowState.xcu
index 17629c0bf698..17629c0bf698 100644..100755
--- a/sfx2/workben/custompanel/CalcWindowState.xcu
+++ b/sfx2/workben/custompanel/CalcWindowState.xcu
diff --git a/sfx2/workben/custompanel/DrawWindowState.xcu b/sfx2/workben/custompanel/DrawWindowState.xcu
index 6037a3f5a083..6037a3f5a083 100644..100755
--- a/sfx2/workben/custompanel/DrawWindowState.xcu
+++ b/sfx2/workben/custompanel/DrawWindowState.xcu
diff --git a/sfx2/workben/custompanel/Factories.xcu b/sfx2/workben/custompanel/Factories.xcu
index f8df23e9f40a..f8df23e9f40a 100644..100755
--- a/sfx2/workben/custompanel/Factories.xcu
+++ b/sfx2/workben/custompanel/Factories.xcu
diff --git a/sfx2/workben/custompanel/ImpressWindowState.xcu b/sfx2/workben/custompanel/ImpressWindowState.xcu
index a8fea859bbab..a8fea859bbab 100644..100755
--- a/sfx2/workben/custompanel/ImpressWindowState.xcu
+++ b/sfx2/workben/custompanel/ImpressWindowState.xcu
diff --git a/sfx2/workben/custompanel/WriterWindowState.xcu b/sfx2/workben/custompanel/WriterWindowState.xcu
index 248a2e14a3f4..248a2e14a3f4 100644..100755
--- a/sfx2/workben/custompanel/WriterWindowState.xcu
+++ b/sfx2/workben/custompanel/WriterWindowState.xcu
diff --git a/sfx2/workben/custompanel/ctp_factory.cxx b/sfx2/workben/custompanel/ctp_factory.cxx
index c49e5279ebbd..c49e5279ebbd 100644..100755
--- a/sfx2/workben/custompanel/ctp_factory.cxx
+++ b/sfx2/workben/custompanel/ctp_factory.cxx
diff --git a/sfx2/workben/custompanel/ctp_factory.hxx b/sfx2/workben/custompanel/ctp_factory.hxx
index 471485f1e0ea..471485f1e0ea 100644..100755
--- a/sfx2/workben/custompanel/ctp_factory.hxx
+++ b/sfx2/workben/custompanel/ctp_factory.hxx
diff --git a/sfx2/workben/custompanel/ctp_panel.cxx b/sfx2/workben/custompanel/ctp_panel.cxx
index e7f36edcf0ff..e7f36edcf0ff 100644..100755
--- a/sfx2/workben/custompanel/ctp_panel.cxx
+++ b/sfx2/workben/custompanel/ctp_panel.cxx
diff --git a/sfx2/workben/custompanel/ctp_panel.hxx b/sfx2/workben/custompanel/ctp_panel.hxx
index ed844f3a3ee5..ed844f3a3ee5 100644..100755
--- a/sfx2/workben/custompanel/ctp_panel.hxx
+++ b/sfx2/workben/custompanel/ctp_panel.hxx
diff --git a/sfx2/workben/custompanel/ctp_services.cxx b/sfx2/workben/custompanel/ctp_services.cxx
index 7f4f45f4e6e7..7f4f45f4e6e7 100644..100755
--- a/sfx2/workben/custompanel/ctp_services.cxx
+++ b/sfx2/workben/custompanel/ctp_services.cxx
diff --git a/sfx2/workben/custompanel/delzip b/sfx2/workben/custompanel/delzip
index e69de29bb2d1..e69de29bb2d1 100644..100755
--- a/sfx2/workben/custompanel/delzip
+++ b/sfx2/workben/custompanel/delzip
diff --git a/sfx2/workben/custompanel/description.xml b/sfx2/workben/custompanel/description.xml
index a90aa73a77f6..a90aa73a77f6 100644..100755
--- a/sfx2/workben/custompanel/description.xml
+++ b/sfx2/workben/custompanel/description.xml
diff --git a/sfx2/workben/custompanel/makefile.mk b/sfx2/workben/custompanel/makefile.mk
deleted file mode 100644
index 20780a065592..000000000000
--- a/sfx2/workben/custompanel/makefile.mk
+++ /dev/null
@@ -1,120 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=../..
-PRJNAME=sfx2
-
-TARGET=custompanel
-ENABLE_EXCEPTIONS=TRUE
-LIBTARGET=NO
-EXTENSIONNAME:=custom-tool-panel
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-#-------------------------------------------------------------------
-
-#---- extension version
-EXTENSION_VERSION_BASE=0.1
-.IF ( "$(CWS_WORK_STAMP)" == "" ) || ( "$(UPDATER)" == "YES" )
- EXTENSION_VERSION=$(EXTENSION_VERSION_BASE)
-.ELSE
- EXTENSION_VERSION=$(EXTENSION_VERSION_BASE).cws.$(CWS_WORK_STAMP)
-.ENDIF
-
-#---- extension title package name
-EXTENSION_TITLE=Custom Tool Panel Example
-EXTENSION_ZIPNAME=$(EXTENSIONNAME)-$(EXTENSION_VERSION_BASE)-$(RTL_OS:l)-$(RTL_ARCH:l)
-
-#--------------------------------------------------
-
-SHL1DLLPRE=
-SHL1TARGET=$(TARGET).uno
-LIB1TARGET=$(SLB)/$(SHL1TARGET).lib
-LIB1OBJFILES= \
- $(SLO)/ctp_factory.obj \
- $(SLO)/ctp_services.obj \
- $(SLO)/ctp_panel.obj
-
-SHL1STDLIBS= \
- $(CPPULIB) \
- $(SALLIB) \
- $(SALHELPERLIB) \
- $(CPPUHELPERLIB)
-
-SHL1VERSIONMAP=$(SOLARSRC)/solenv/src/component.map
-SHL1LIBS= $(LIB1TARGET)
-SHL1DEF= $(MISC)/$(SHL1TARGET).def
-SHL1RPATH= OXT
-DEF1NAME= $(SHL1TARGET)
-
-# create Extension -----------------------------
-
-COMPONENT_CONFIGDEST=.
-
-COMPONENT_XCU = \
- $(EXTENSIONDIR)/WriterWindowState.xcu \
- $(EXTENSIONDIR)/CalcWindowState.xcu \
- $(EXTENSIONDIR)/DrawWindowState.xcu \
- $(EXTENSIONDIR)/ImpressWindowState.xcu \
- $(EXTENSIONDIR)/Factories.xcu
-
-COMPONENT_LIBRARIES = \
- $(EXTENSIONDIR)/$(SHL1TARGET)$(DLLPOST)
-
-COMPONENT_IMAGES= \
- $(EXTENSIONDIR)/panel.png
-
-# ........ dependencies for packaging the extension ........
-EXTENSION_PACKDEPS=makefile.mk $(COMPONENT_XCU) $(COMPONENT_LIBRARIES) $(COMPONENT_IMAGES)
-
-# --- Targets ------------------------------------------------------
-.INCLUDE : extension_pre.mk
-.INCLUDE : target.mk
-.INCLUDE : extension_post.mk
-
-$(EXTENSIONDIR)/%.png : ./%.png
- @@-$(MKDIRHIER) $(@:d)
- @$(COPY) $< $@ > $(NULLDEV)
-
-$(EXTENSIONDIR)/WriterWindowState.xcu: ./WriterWindowState.xcu
- @@-$(MKDIRHIER) $(@:d)
- $(COMMAND_ECHO)$(TYPE) ./WriterWindowState.xcu | sed s/UPDATED_IDENTIFIER/$(IMPLEMENTATION_IDENTIFIER)/ > $(EXTENSIONDIR)/WriterWindowState.xcu
-
-$(EXTENSIONDIR)/CalcWindowState.xcu: ./CalcWindowState.xcu
- @@-$(MKDIRHIER) $(@:d)
- $(COMMAND_ECHO)$(TYPE) ./CalcWindowState.xcu | sed s/UPDATED_IDENTIFIER/$(IMPLEMENTATION_IDENTIFIER)/ > $(EXTENSIONDIR)/CalcWindowState.xcu
-
-$(EXTENSIONDIR)/DrawWindowState.xcu: ./DrawWindowState.xcu
- @@-$(MKDIRHIER) $(@:d)
- $(COMMAND_ECHO)$(TYPE) ./DrawWindowState.xcu | sed s/UPDATED_IDENTIFIER/$(IMPLEMENTATION_IDENTIFIER)/ > $(EXTENSIONDIR)/DrawWindowState.xcu
-
-$(EXTENSIONDIR)/ImpressWindowState.xcu: ./ImpressWindowState.xcu
- @@-$(MKDIRHIER) $(@:d)
- $(COMMAND_ECHO)$(TYPE) ./ImpressWindowState.xcu | sed s/UPDATED_IDENTIFIER/$(IMPLEMENTATION_IDENTIFIER)/ > $(EXTENSIONDIR)/ImpressWindowState.xcu
-
diff --git a/sfx2/workben/custompanel/manifest.xml b/sfx2/workben/custompanel/manifest.xml
index 9122d16a4189..9122d16a4189 100644..100755
--- a/sfx2/workben/custompanel/manifest.xml
+++ b/sfx2/workben/custompanel/manifest.xml
diff --git a/sfx2/workben/custompanel/panel.png b/sfx2/workben/custompanel/panel.png
index 2438714af8a6..2438714af8a6 100644..100755
--- a/sfx2/workben/custompanel/panel.png
+++ b/sfx2/workben/custompanel/panel.png
Binary files differ