diff options
author | Thorsten Behrens <tbehrens@novell.com> | 2011-03-12 02:42:58 +0100 |
---|---|---|
committer | Thorsten Behrens <tbehrens@novell.com> | 2011-03-12 02:42:58 +0100 |
commit | e65c0fe553a9d1b85dcacfff7af9df8231427876 (patch) | |
tree | 250636f82248275ef5c1d491e58e4e3cf136cdff /sfx2/source/doc | |
parent | 35fbb45086c389f91c0d6ff410d814f7567c1ceb (diff) | |
parent | 4fba42e5f98fcc0fa9addf41a793c1d7f11602c8 (diff) |
Merge commit 'ooo/DEV300_m101' into integration/dev300_m101
Conflicts:
avmedia/inc/avmedia/mediaitem.hxx
avmedia/prj/build.lst
avmedia/source/framework/mediaitem.cxx
avmedia/source/gstreamer/gstcommon.hxx
avmedia/source/gstreamer/gstframegrabber.cxx
avmedia/source/gstreamer/gstframegrabber.hxx
avmedia/source/gstreamer/gstmanager.cxx
avmedia/source/gstreamer/gstmanager.hxx
avmedia/source/gstreamer/gstplayer.cxx
avmedia/source/gstreamer/gstplayer.hxx
avmedia/source/gstreamer/gstuno.cxx
avmedia/source/gstreamer/gstwindow.cxx
avmedia/source/gstreamer/gstwindow.hxx
avmedia/source/gstreamer/makefile.mk
avmedia/source/quicktime/quicktimeuno.cxx
avmedia/source/viewer/mediawindow.cxx
avmedia/source/viewer/mediawindow_impl.cxx
avmedia/source/viewer/mediawindow_impl.hxx
avmedia/source/viewer/mediawindowbase_impl.cxx
avmedia/source/win/winuno.cxx
basic/inc/basic/basmgr.hxx
basic/inc/basic/mybasic.hxx
basic/inc/basic/process.hxx
basic/inc/basic/sbmeth.hxx
basic/inc/basic/sbmod.hxx
basic/inc/basic/sbxdef.hxx
basic/inc/basic/sbxvar.hxx
basic/source/app/app.cxx
basic/source/app/app.hxx
basic/source/app/appbased.cxx
basic/source/app/appedit.cxx
basic/source/app/appwin.cxx
basic/source/app/appwin.hxx
basic/source/app/brkpnts.cxx
basic/source/app/brkpnts.hxx
basic/source/app/dialogs.cxx
basic/source/app/dialogs.hxx
basic/source/app/msgedit.cxx
basic/source/app/mybasic.cxx
basic/source/app/process.cxx
basic/source/app/processw.hxx
basic/source/app/textedit.cxx
basic/source/basmgr/basicmanagerrepository.cxx
basic/source/basmgr/basmgr.cxx
basic/source/classes/disas.cxx
basic/source/classes/eventatt.cxx
basic/source/classes/image.cxx
basic/source/classes/sb.cxx
basic/source/classes/sbunoobj.cxx
basic/source/classes/sbxmod.cxx
basic/source/comp/codegen.cxx
basic/source/comp/dim.cxx
basic/source/comp/exprgen.cxx
basic/source/comp/exprnode.cxx
basic/source/comp/exprtree.cxx
basic/source/comp/sbcomp.cxx
basic/source/inc/expr.hxx
basic/source/inc/object.hxx
basic/source/inc/sbunoobj.hxx
basic/source/runtime/dllmgr-x86.cxx
basic/source/runtime/iosys.cxx
basic/source/runtime/makefile.mk
basic/source/runtime/methods.cxx
basic/source/runtime/methods1.cxx
basic/source/runtime/runtime.cxx
basic/source/runtime/stdobj.cxx
basic/source/runtime/step0.cxx
basic/source/runtime/step1.cxx
basic/source/runtime/step2.cxx
basic/source/sbx/sbxarray.cxx
basic/source/sbx/sbxbase.cxx
basic/source/sbx/sbxbool.cxx
basic/source/sbx/sbxbyte.cxx
basic/source/sbx/sbxcoll.cxx
basic/source/sbx/sbxconv.hxx
basic/source/sbx/sbxcurr.cxx
basic/source/sbx/sbxexec.cxx
basic/source/sbx/sbxint.cxx
basic/source/sbx/sbxobj.cxx
basic/source/sbx/sbxscan.cxx
basic/source/sbx/sbxstr.cxx
basic/source/sbx/sbxvals.cxx
basic/source/sbx/sbxvalue.cxx
basic/source/sbx/sbxvar.cxx
basic/workben/mgrtest.cxx
configmgr/prj/build.lst
configmgr/source/access.cxx
configmgr/source/configurationprovider.cxx
configmgr/source/defaultprovider.cxx
configmgr/source/pad.cxx
configmgr/source/services.cxx
configmgr/source/update.cxx
configmgr/source/xmlreader.cxx
configmgr/source/xmlreader.hxx
connectivity/prj/build.lst
connectivity/qa/complex/connectivity/TestCase.java
connectivity/source/cpool/Zregistration.cxx
connectivity/source/drivers/adabas/Bservices.cxx
connectivity/source/drivers/ado/Aservices.cxx
connectivity/source/drivers/calc/Cservices.cxx
connectivity/source/drivers/calc/makefile.mk
connectivity/source/drivers/dbase/DIndex.cxx
connectivity/source/drivers/dbase/DIndexIter.cxx
connectivity/source/drivers/dbase/DNoException.cxx
connectivity/source/drivers/dbase/DTable.cxx
connectivity/source/drivers/dbase/Dservices.cxx
connectivity/source/drivers/dbase/dindexnode.cxx
connectivity/source/drivers/evoab/LNoException.cxx
connectivity/source/drivers/evoab/LServices.cxx
connectivity/source/drivers/evoab2/NServices.cxx
connectivity/source/drivers/file/FNoException.cxx
connectivity/source/drivers/file/FPreparedStatement.cxx
connectivity/source/drivers/file/FResultSet.cxx
connectivity/source/drivers/file/FStatement.cxx
connectivity/source/drivers/file/quotedstring.cxx
connectivity/source/drivers/flat/ETable.cxx
connectivity/source/drivers/flat/Eservices.cxx
connectivity/source/drivers/hsqldb/Hservices.cxx
connectivity/source/drivers/jdbc/jservices.cxx
connectivity/source/drivers/kab/KServices.cxx
connectivity/source/drivers/macab/MacabServices.cxx
connectivity/source/drivers/mozab/MResultSet.cxx
connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx
connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx
connectivity/source/drivers/mysql/Yservices.cxx
connectivity/source/drivers/odbc/OFunctions.cxx
connectivity/source/drivers/odbc/oservices.cxx
connectivity/source/inc/dbase/DIndexPage.hxx
connectivity/source/inc/file/FTable.hxx
connectivity/source/manager/mregistration.cxx
connectivity/source/parse/PColumn.cxx
desktop/prj/build.lst
desktop/qa/deployment_misc/test_dp_version.cxx
desktop/source/app/app.cxx
desktop/source/app/appfirststart.cxx
desktop/source/app/cmdlineargs.cxx
desktop/source/app/cmdlineargs.hxx
desktop/source/app/sofficemain.cxx
desktop/source/deployment/gui/dp_gui.hrc
desktop/source/deployment/gui/dp_gui_dialog2.cxx
desktop/source/deployment/gui/dp_gui_dialog2.hxx
desktop/source/deployment/gui/dp_gui_updatedialog.cxx
desktop/source/deployment/gui/dp_gui_updatedialog.hxx
desktop/source/deployment/manager/dp_extensionmanager.cxx
desktop/source/deployment/manager/dp_extensionmanager.hxx
desktop/source/deployment/misc/dp_misc.src
desktop/source/deployment/registry/component/dp_component.cxx
desktop/source/deployment/registry/configuration/dp_configuration.cxx
desktop/source/deployment/registry/dp_backend.cxx
desktop/source/deployment/registry/help/dp_help.cxx
desktop/source/deployment/registry/script/dp_script.cxx
desktop/source/migration/pages.cxx
desktop/source/migration/pages.hxx
desktop/source/migration/wizard.cxx
desktop/source/migration/wizard.hrc
desktop/source/migration/wizard.hxx
desktop/source/migration/wizard.src
desktop/source/pkgchk/unopkg/unopkg_shared.h
desktop/source/so_comp/services.cxx
desktop/source/splash/makefile.mk
desktop/source/splash/services_spl.cxx
desktop/source/splash/splash.cxx
drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
editeng/inc/editeng/adjitem.hxx
editeng/inc/editeng/bolnitem.hxx
editeng/inc/editeng/borderline.hxx
editeng/inc/editeng/boxitem.hxx
editeng/inc/editeng/brkitem.hxx
editeng/inc/editeng/brshitem.hxx
editeng/inc/editeng/bulitem.hxx
editeng/inc/editeng/charreliefitem.hxx
editeng/inc/editeng/charrotateitem.hxx
editeng/inc/editeng/charscaleitem.hxx
editeng/inc/editeng/cmapitem.hxx
editeng/inc/editeng/colritem.hxx
editeng/inc/editeng/crsditem.hxx
editeng/inc/editeng/editdata.hxx
editeng/inc/editeng/editeng.hxx
editeng/inc/editeng/editobj.hxx
editeng/inc/editeng/editstat.hxx
editeng/inc/editeng/editview.hxx
editeng/inc/editeng/emphitem.hxx
editeng/inc/editeng/escpitem.hxx
editeng/inc/editeng/fhgtitem.hxx
editeng/inc/editeng/flstitem.hxx
editeng/inc/editeng/fontitem.hxx
editeng/inc/editeng/frmdiritem.hxx
editeng/inc/editeng/fwdtitem.hxx
editeng/inc/editeng/hyznitem.hxx
editeng/inc/editeng/kernitem.hxx
editeng/inc/editeng/langitem.hxx
editeng/inc/editeng/lrspitem.hxx
editeng/inc/editeng/lspcitem.hxx
editeng/inc/editeng/numitem.hxx
editeng/inc/editeng/outliner.hxx
editeng/inc/editeng/paravertalignitem.hxx
editeng/inc/editeng/pmdlitem.hxx
editeng/inc/editeng/postitem.hxx
editeng/inc/editeng/protitem.hxx
editeng/inc/editeng/shaditem.hxx
editeng/inc/editeng/sizeitem.hxx
editeng/inc/editeng/svxacorr.hxx
editeng/inc/editeng/svxfont.hxx
editeng/inc/editeng/svxrtf.hxx
editeng/inc/editeng/swafopt.hxx
editeng/inc/editeng/tstpitem.hxx
editeng/inc/editeng/twolinesitem.hxx
editeng/inc/editeng/txtrange.hxx
editeng/inc/editeng/udlnitem.hxx
editeng/inc/editeng/ulspitem.hxx
editeng/inc/editeng/wghtitem.hxx
editeng/inc/editeng/writingmodeitem.hxx
editeng/inc/editeng/xmlcnitm.hxx
editeng/inc/helpid.hrc
editeng/inc/pch/precompiled_editeng.hxx
editeng/source/editeng/editdbg.cxx
editeng/source/editeng/editdoc.cxx
editeng/source/editeng/editdoc.hxx
editeng/source/editeng/editdoc2.cxx
editeng/source/editeng/editeng.cxx
editeng/source/editeng/editobj.cxx
editeng/source/editeng/editobj2.hxx
editeng/source/editeng/editsel.cxx
editeng/source/editeng/editundo.cxx
editeng/source/editeng/editundo.hxx
editeng/source/editeng/editview.cxx
editeng/source/editeng/edtspell.hxx
editeng/source/editeng/eehtml.cxx
editeng/source/editeng/eehtml.hxx
editeng/source/editeng/eeobj.cxx
editeng/source/editeng/eerdll.cxx
editeng/source/editeng/eertfpar.cxx
editeng/source/editeng/impedit.cxx
editeng/source/editeng/impedit.hxx
editeng/source/editeng/impedit2.cxx
editeng/source/editeng/impedit3.cxx
editeng/source/editeng/impedit4.cxx
editeng/source/editeng/impedit5.cxx
editeng/source/editeng/makefile.mk
editeng/source/items/bulitem.cxx
editeng/source/items/charhiddenitem.cxx
editeng/source/items/flditem.cxx
editeng/source/items/frmitems.cxx
editeng/source/items/makefile.mk
editeng/source/items/numitem.cxx
editeng/source/items/paraitem.cxx
editeng/source/items/svxfont.cxx
editeng/source/items/textitem.cxx
editeng/source/items/writingmodeitem.cxx
editeng/source/items/xmlcnitm.cxx
editeng/source/misc/SvXMLAutoCorrectImport.cxx
editeng/source/misc/svxacorr.cxx
editeng/source/misc/txtrange.cxx
editeng/source/misc/unolingu.cxx
editeng/source/outliner/outleeng.cxx
editeng/source/outliner/outliner.cxx
editeng/source/outliner/outlundo.hxx
editeng/source/outliner/outlvw.cxx
editeng/source/outliner/paralist.cxx
editeng/source/outliner/paralist.hxx
editeng/source/rtf/rtfgrf.cxx
editeng/source/rtf/rtfitem.cxx
editeng/source/rtf/svxrtf.cxx
editeng/source/uno/unoipset.cxx
editeng/util/makefile.mk
embeddedobj/prj/build.lst
embeddedobj/source/commonembedding/miscobj.cxx
eventattacher/prj/build.lst
fileaccess/source/FileAccess.cxx
formula/inc/formula/FormulaCompiler.hxx
formula/inc/formula/token.hxx
formula/inc/formula/tokenarray.hxx
formula/source/core/api/FormulaCompiler.cxx
formula/source/core/api/token.cxx
formula/source/ui/dlg/FormulaHelper.cxx
formula/source/ui/dlg/formula.cxx
formula/source/ui/dlg/parawin.cxx
formula/source/ui/dlg/structpg.cxx
fpicker/prj/d.lst
fpicker/source/aqua/FPentry.cxx
fpicker/source/office/OfficeControlAccess.cxx
fpicker/source/office/iodlg.cxx
fpicker/source/office/iodlg.hxx
fpicker/source/office/iodlg.src
fpicker/source/office/iodlgimp.cxx
fpicker/source/unx/gnome/FPentry.cxx
fpicker/source/unx/gnome/SalGtkFilePicker.cxx
fpicker/source/unx/gnome/SalGtkPicker.cxx
fpicker/source/unx/kde4/KDE4FPEntry.cxx
fpicker/source/win32/filepicker/FPentry.cxx
framework/AllLangResTarget_fwe.mk
framework/inc/dispatch/interaction.hxx
framework/inc/framework/addonmenu.hxx
framework/inc/framework/addonsoptions.hxx
framework/inc/framework/bmkmenu.hxx
framework/inc/framework/imageproducer.hxx
framework/inc/framework/sfxhelperfunctions.hxx
framework/inc/framework/statusbarconfiguration.hxx
framework/inc/framework/titlehelper.hxx
framework/inc/framework/toolboxconfiguration.hxx
framework/inc/threadhelp/lockhelper.hxx
framework/inc/xml/eventsdocumenthandler.hxx
framework/inc/xml/statusbardocumenthandler.hxx
framework/inc/xml/toolboxconfiguration.hxx
framework/inc/xml/toolboxconfigurationdefines.hxx
framework/inc/xml/toolboxdocumenthandler.hxx
framework/prj/build.lst
framework/qa/complex/ModuleManager/makefile.mk
framework/qa/complex/accelerators/makefile.mk
framework/qa/complex/framework/recovery/makefile.mk
framework/qa/complex/imageManager/_XInitialization.java
framework/source/classes/menumanager.cxx
framework/source/dispatch/interaction.cxx
framework/source/fwe/classes/bmkmenu.cxx
framework/source/fwe/helper/actiontriggerhelper.cxx
framework/source/fwe/helper/imageproducer.cxx
framework/source/fwe/xml/menuconfiguration.cxx
framework/source/fwe/xml/toolboxdocumenthandler.cxx
framework/source/helper/uiconfigelementwrapperbase.cxx
framework/source/helper/uielementwrapperbase.cxx
framework/source/inc/pattern/window.hxx
framework/source/jobs/jobdata.cxx
framework/source/layoutmanager/layoutmanager.cxx
framework/source/layoutmanager/panel.hxx
framework/source/loadenv/loadenv.cxx
framework/source/register/registerservices.cxx
framework/source/services/menudocumenthandler.cxx
framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
framework/source/uiconfiguration/uiconfigurationmanager.cxx
framework/source/uiconfiguration/uiconfigurationmanagerimpl.cxx
framework/source/uielement/addonstoolbarmanager.cxx
framework/source/uielement/controlmenucontroller.cxx
framework/source/uielement/fontsizemenucontroller.cxx
framework/source/uielement/imagebuttontoolbarcontroller.cxx
framework/source/uielement/macrosmenucontroller.cxx
framework/source/uielement/menubarmanager.cxx
framework/source/uielement/newmenucontroller.cxx
framework/source/uielement/togglebuttontoolbarcontroller.cxx
framework/source/uielement/toolbarmanager.cxx
framework/source/uielement/toolbarsmenucontroller.cxx
framework/test/makefile.mk
framework/test/threadtest/makefile.mk
framework/test/typecfg/makefile.mk
framework/util/guiapps/makefile.mk
framework/util/makefile.mk
idl/inc/bastype.hxx
idl/inc/hash.hxx
idl/inc/lex.hxx
idl/inc/module.hxx
idl/inc/object.hxx
idl/inc/slot.hxx
idl/inc/types.hxx
idl/source/cmptools/hash.cxx
idl/source/cmptools/lex.cxx
idl/source/objects/basobj.cxx
idl/source/objects/bastype.cxx
idl/source/objects/module.cxx
idl/source/objects/object.cxx
idl/source/objects/slot.cxx
idl/source/objects/types.cxx
idl/source/prj/command.cxx
idl/source/prj/database.cxx
idl/source/prj/globals.cxx
idl/source/prj/svidl.cxx
linguistic/inc/linguistic/misc.hxx
linguistic/prj/build.lst
linguistic/source/convdic.cxx
linguistic/source/convdiclist.cxx
linguistic/source/dicimp.cxx
linguistic/source/dlistimp.cxx
linguistic/source/gciterator.cxx
linguistic/source/iprcache.cxx
linguistic/source/lngopt.cxx
linguistic/source/lngprophelp.cxx
linguistic/source/lngsvcmgr.cxx
linguistic/source/lngsvcmgr.hxx
linguistic/source/misc2.cxx
linguistic/workben/sprophelp.cxx
officecfg/registry/data/org/openoffice/VCL.xcu
officecfg/util/makefile.mk
oovbaapi/ooo/vba/XApplicationBase.idl
oovbaapi/ooo/vba/XVBAAppService.idl
oovbaapi/ooo/vba/XVBADocService.idl
oovbaapi/ooo/vba/excel/XApplication.idl
oovbaapi/ooo/vba/excel/XRange.idl
oovbaapi/ooo/vba/excel/XWorkbook.idl
oovbaapi/ooo/vba/excel/XWorksheet.idl
oovbaapi/ooo/vba/word/XApplication.idl
oovbaapi/ooo/vba/word/XGlobals.idl
oovbaapi/ooo/vba/word/XTableOfContents.idl
readlicense_oo/prj/build.lst
scripting/prj/build.lst
scripting/prj/d.lst
scripting/source/basprov/basprov.cxx
scripting/source/basprov/basscript.cxx
scripting/source/basprov/basscript.hxx
scripting/source/dlgprov/dlgprov.cxx
scripting/source/inc/util/util.hxx
scripting/source/protocolhandler/scripthandler.cxx
scripting/source/provider/ProviderCache.cxx
scripting/source/pyprov/makefile.mk
scripting/source/runtimemgr/ScriptNameResolverImpl.cxx
scripting/source/runtimemgr/ScriptRuntimeManager.cxx
scripting/source/runtimemgr/StorageBridge.cxx
scripting/source/storage/ScriptMetadataImporter.cxx
scripting/source/storage/ScriptSecurityManager.cxx
scripting/source/storage/ScriptStorage.cxx
scripting/source/storage/ScriptStorageManager.cxx
sfx2/inc/about.hxx
sfx2/inc/brokenpackageint.hxx
sfx2/inc/docvor.hxx
sfx2/inc/pch/precompiled_sfx2.hxx
sfx2/inc/sfx2/app.hxx
sfx2/inc/sfx2/basmgr.hxx
sfx2/inc/sfx2/bindings.hxx
sfx2/inc/sfx2/childwin.hxx
sfx2/inc/sfx2/ctrlitem.hxx
sfx2/inc/sfx2/dinfdlg.hxx
sfx2/inc/sfx2/dispatch.hxx
sfx2/inc/sfx2/docfilt.hxx
sfx2/inc/sfx2/evntconf.hxx
sfx2/inc/sfx2/fcontnr.hxx
sfx2/inc/sfx2/frame.hxx
sfx2/inc/sfx2/imagemgr.hxx
sfx2/inc/sfx2/imgmgr.hxx
sfx2/inc/sfx2/linksrc.hxx
sfx2/inc/sfx2/macrconf.hxx
sfx2/inc/sfx2/macropg.hxx
sfx2/inc/sfx2/mnuitem.hxx
sfx2/inc/sfx2/mnumgr.hxx
sfx2/inc/sfx2/module.hxx
sfx2/inc/sfx2/msg.hxx
sfx2/inc/sfx2/objsh.hxx
sfx2/inc/sfx2/passwd.hxx
sfx2/inc/sfx2/prnmon.hxx
sfx2/inc/sfx2/request.hxx
sfx2/inc/sfx2/sfx.hrc
sfx2/inc/sfx2/sfxbasemodel.hxx
sfx2/inc/sfx2/sfxhtml.hxx
sfx2/inc/sfx2/sfxresid.hxx
sfx2/inc/sfx2/sfxsids.hrc
sfx2/inc/sfx2/sfxuno.hxx
sfx2/inc/sfx2/shell.hxx
sfx2/inc/sfx2/stbitem.hxx
sfx2/inc/sfx2/styfitem.hxx
sfx2/inc/sfx2/tabdlg.hxx
sfx2/inc/sfx2/tbxctrl.hxx
sfx2/inc/sfx2/tplpitem.hxx
sfx2/inc/sfx2/viewfrm.hxx
sfx2/inc/sfx2/viewsh.hxx
sfx2/inc/sfxbasic.hxx
sfx2/inc/sorgitm.hxx
sfx2/prj/build.lst
sfx2/qa/complex/docinfo/makefile.mk
sfx2/qa/cppunit/makefile.mk
sfx2/sdi/makefile.mk
sfx2/source/appl/app.cxx
sfx2/source/appl/app.hrc
sfx2/source/appl/app.src
sfx2/source/appl/appbas.cxx
sfx2/source/appl/appcfg.cxx
sfx2/source/appl/appchild.cxx
sfx2/source/appl/appmain.cxx
sfx2/source/appl/appmisc.cxx
sfx2/source/appl/appopen.cxx
sfx2/source/appl/appquit.cxx
sfx2/source/appl/appserv.cxx
sfx2/source/appl/appuno.cxx
sfx2/source/appl/childwin.cxx
sfx2/source/appl/fileobj.cxx
sfx2/source/appl/helpinterceptor.cxx
sfx2/source/appl/imagemgr.cxx
sfx2/source/appl/impldde.cxx
sfx2/source/appl/impldde.hxx
sfx2/source/appl/linkmgr2.cxx
sfx2/source/appl/lnkbase2.cxx
sfx2/source/appl/makefile.mk
sfx2/source/appl/module.cxx
sfx2/source/appl/newhelp.cxx
sfx2/source/appl/opengrf.cxx
sfx2/source/appl/sfxdll.cxx
sfx2/source/appl/sfxhelp.cxx
sfx2/source/appl/shutdownicon.cxx
sfx2/source/appl/shutdowniconunx.cxx
sfx2/source/appl/workwin.cxx
sfx2/source/bastyp/fltfnc.cxx
sfx2/source/bastyp/frmhtml.cxx
sfx2/source/bastyp/frmhtmlw.cxx
sfx2/source/bastyp/helper.cxx
sfx2/source/bastyp/minarray.cxx
sfx2/source/bastyp/progress.cxx
sfx2/source/bastyp/sfxhtml.cxx
sfx2/source/config/evntconf.cxx
sfx2/source/control/bindings.cxx
sfx2/source/control/ctrlitem.cxx
sfx2/source/control/dispatch.cxx
sfx2/source/control/macrconf.cxx
sfx2/source/control/macro.cxx
sfx2/source/control/makefile.mk
sfx2/source/control/minfitem.cxx
sfx2/source/control/msg.cxx
sfx2/source/control/msgpool.cxx
sfx2/source/control/objface.cxx
sfx2/source/control/request.cxx
sfx2/source/control/shell.cxx
sfx2/source/control/sorgitm.cxx
sfx2/source/dialog/about.cxx
sfx2/source/dialog/basedlgs.cxx
sfx2/source/dialog/dinfdlg.cxx
sfx2/source/dialog/dinfedt.cxx
sfx2/source/dialog/dockwin.cxx
sfx2/source/dialog/filedlghelper.cxx
sfx2/source/dialog/mailmodel.cxx
sfx2/source/dialog/mailmodelapi.cxx
sfx2/source/dialog/makefile.mk
sfx2/source/dialog/mgetempl.cxx
sfx2/source/dialog/passwd.cxx
sfx2/source/dialog/passwd.hrc
sfx2/source/dialog/printopt.cxx
sfx2/source/dialog/securitypage.cxx
sfx2/source/dialog/splitwin.cxx
sfx2/source/dialog/styfitem.cxx
sfx2/source/dialog/tabdlg.cxx
sfx2/source/dialog/taskpane.cxx
sfx2/source/dialog/templdlg.cxx
sfx2/source/dialog/tplpitem.cxx
sfx2/source/dialog/versdlg.cxx
sfx2/source/doc/QuerySaveDocument.cxx
sfx2/source/doc/SfxDocumentMetaData.cxx
sfx2/source/doc/applet.cxx
sfx2/source/doc/doc.hrc
sfx2/source/doc/doc.src
sfx2/source/doc/docfile.cxx
sfx2/source/doc/docinf.cxx
sfx2/source/doc/doctempl.cxx
sfx2/source/doc/doctemplates.cxx
sfx2/source/doc/docvor.cxx
sfx2/source/doc/guisaveas.cxx
sfx2/source/doc/makefile.mk
sfx2/source/doc/objcont.cxx
sfx2/source/doc/objitem.cxx
sfx2/source/doc/objmisc.cxx
sfx2/source/doc/objserv.cxx
sfx2/source/doc/printhelper.cxx
sfx2/source/doc/sfxacldetect.cxx
sfx2/source/doc/sfxbasemodel.cxx
sfx2/source/inc/applet.hxx
sfx2/source/inc/fltoptint.hxx
sfx2/source/inc/sfxlocal.hrc
sfx2/source/inc/virtmenu.hxx
sfx2/source/inc/workwin.hxx
sfx2/source/menu/mnuitem.cxx
sfx2/source/menu/objmnctl.cxx
sfx2/source/menu/virtmenu.cxx
sfx2/source/notify/eventsupplier.cxx
sfx2/source/notify/makefile.mk
sfx2/source/toolbox/imgmgr.cxx
sfx2/source/toolbox/tbxitem.cxx
sfx2/source/view/frame.cxx
sfx2/source/view/orgmgr.cxx
sfx2/source/view/printer.cxx
sfx2/source/view/prnmon.cxx
sfx2/source/view/viewfrm.cxx
sfx2/source/view/viewprn.cxx
sfx2/source/view/viewsh.cxx
sfx2/util/makefile.mk
sfx2/workben/custompanel/makefile.mk
shell/source/backends/desktopbe/desktopbackend.cxx
shell/source/backends/gconfbe/gconfbackend.cxx
shell/source/backends/kde4be/kde4backend.cxx
shell/source/backends/kdebe/kdebackend.cxx
shell/source/win32/SysShentry.cxx
shell/source/win32/shlxthandler/propsheets/propsheets.cxx
shell/source/win32/simplemail/smplmailentry.cxx
svx/inc/float3d.hrc
svx/inc/fmhelp.hrc
svx/inc/globlmn_tmpl.hrc
svx/inc/helpid.hrc
svx/inc/pch/precompiled_svx.hxx
svx/inc/sjctrl.hxx
svx/inc/srchitem.hxx
svx/inc/svdibrow.hxx
svx/inc/svx/SmartTagItem.hxx
svx/inc/svx/algitem.hxx
svx/inc/svx/camera3d.hxx
svx/inc/svx/chrtitem.hxx
svx/inc/svx/clipfmtitem.hxx
svx/inc/svx/ctredlin.hxx
svx/inc/svx/dbtoolsclient.hxx
svx/inc/svx/deflt3d.hxx
svx/inc/svx/dialogs.hrc
svx/inc/svx/drawitem.hxx
svx/inc/svx/e3ditem.hxx
svx/inc/svx/extrud3d.hxx
svx/inc/svx/flagsdef.hxx
svx/inc/svx/float3d.hxx
svx/inc/svx/frmsel.hxx
svx/inc/svx/gallery.hxx
svx/inc/svx/gallery1.hxx
svx/inc/svx/galtheme.hxx
svx/inc/svx/grfcrop.hxx
svx/inc/svx/hdft.hxx
svx/inc/svx/hlnkitem.hxx
svx/inc/svx/hyprlink.hxx
svx/inc/svx/itemwin.hxx
svx/inc/svx/lathe3d.hxx
svx/inc/svx/linkwarn.hxx
svx/inc/svx/modctrl.hxx
svx/inc/svx/msdffdef.hxx
svx/inc/svx/obj3d.hxx
svx/inc/svx/optgenrl.hxx
svx/inc/svx/optgrid.hxx
svx/inc/svx/pageitem.hxx
svx/inc/svx/paraprev.hxx
svx/inc/svx/postattr.hxx
svx/inc/svx/rotmodit.hxx
svx/inc/svx/ruler.hxx
svx/inc/svx/rulritem.hxx
svx/inc/svx/scene3d.hxx
svx/inc/svx/sdasaitm.hxx
svx/inc/svx/sdasitm.hxx
svx/inc/svx/sdggaitm.hxx
svx/inc/svx/sdmetitm.hxx
svx/inc/svx/sdtaaitm.hxx
svx/inc/svx/sdtaditm.hxx
svx/inc/svx/sdtaitm.hxx
svx/inc/svx/sdtakitm.hxx
svx/inc/svx/sdtfchim.hxx
svx/inc/svx/sdtfsitm.hxx
svx/inc/svx/srchdlg.hxx
svx/inc/svx/svddrag.hxx
svx/inc/svx/svdetc.hxx
svx/inc/svx/svdglue.hxx
svx/inc/svx/svdhlpln.hxx
svx/inc/svx/svdlayer.hxx
svx/inc/svx/svdmark.hxx
svx/inc/svx/svdmodel.hxx
svx/inc/svx/svdoashp.hxx
svx/inc/svx/svdobj.hxx
svx/inc/svx/svdocirc.hxx
svx/inc/svx/svdoedge.hxx
svx/inc/svx/svdogrp.hxx
svx/inc/svx/svdomeas.hxx
svx/inc/svx/svdoole2.hxx
svx/inc/svx/svdorect.hxx
svx/inc/svx/svdotable.hxx
svx/inc/svx/svdotext.hxx
svx/inc/svx/svdovirt.hxx
svx/inc/svx/svdpage.hxx
svx/inc/svx/svdsnpv.hxx
svx/inc/svx/svdtrans.hxx
svx/inc/svx/svdundo.hxx
svx/inc/svx/svimbase.hxx
svx/inc/svx/svx3ditems.hxx
svx/inc/svx/svxdlg.hxx
svx/inc/svx/sxcikitm.hxx
svx/inc/svx/sxekitm.hxx
svx/inc/svx/sxelditm.hxx
svx/inc/svx/sxenditm.hxx
svx/inc/svx/sxmkitm.hxx
svx/inc/svx/sxmtpitm.hxx
svx/inc/svx/sxmuitm.hxx
svx/inc/svx/tabarea.hxx
svx/inc/svx/tabline.hxx
svx/inc/svx/unoprov.hxx
svx/inc/svx/viewlayoutitem.hxx
svx/inc/svx/xbitmap.hxx
svx/inc/svx/xbtmpit.hxx
svx/inc/svx/xcolit.hxx
svx/inc/svx/xfillit0.hxx
svx/inc/svx/xflclit.hxx
svx/inc/svx/xflftrit.hxx
svx/inc/svx/xflgrit.hxx
svx/inc/svx/xflhtit.hxx
svx/inc/svx/xftadit.hxx
svx/inc/svx/xftsfit.hxx
svx/inc/svx/xftshit.hxx
svx/inc/svx/xlineit0.hxx
svx/inc/svx/xlinjoit.hxx
svx/inc/svx/xlnclit.hxx
svx/inc/svx/xlndsit.hxx
svx/inc/svx/xlnedcit.hxx
svx/inc/svx/xlnedit.hxx
svx/inc/svx/xlnedwit.hxx
svx/inc/svx/xlnstcit.hxx
svx/inc/svx/xlnstit.hxx
svx/inc/svx/xlnstwit.hxx
svx/inc/svx/xlnwtit.hxx
svx/inc/svx/xtextit0.hxx
svx/inc/svx/zoomitem.hxx
svx/inc/svx/zoomslideritem.hxx
svx/inc/xpolyimp.hxx
svx/inc/zoom_def.hxx
svx/prj/d.lst
svx/source/accessibility/AccessibleShape.cxx
svx/source/accessibility/DescriptionGenerator.cxx
svx/source/customshapes/EnhancedCustomShapeEngine.cxx
svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
svx/source/dialog/_bmpmask.cxx
svx/source/dialog/_contdlg.cxx
svx/source/dialog/connctrl.cxx
svx/source/dialog/contwnd.cxx
svx/source/dialog/ctredlin.cxx
svx/source/dialog/ctredlin.hrc
svx/source/dialog/ctredlin.src
svx/source/dialog/dialcontrol.cxx
svx/source/dialog/dlgctrl.cxx
svx/source/dialog/docrecovery.cxx
svx/source/dialog/fntctrl.cxx
svx/source/dialog/fontwork.cxx
svx/source/dialog/frmsel.cxx
svx/source/dialog/graphctl.cxx
svx/source/dialog/grfflt.cxx
svx/source/dialog/hdft.cxx
svx/source/dialog/hyperdlg.cxx
svx/source/dialog/hyprdlg.hxx
svx/source/dialog/hyprlink.cxx
svx/source/dialog/hyprlink.hxx
svx/source/dialog/hyprlink.src
svx/source/dialog/imapdlg.cxx
svx/source/dialog/imapwnd.cxx
svx/source/dialog/linkwarn.hrc
svx/source/dialog/makefile.mk
svx/source/dialog/optgrid.cxx
svx/source/dialog/orienthelper.cxx
svx/source/dialog/pagectrl.cxx
svx/source/dialog/prtqry.cxx
svx/source/dialog/rlrcitem.cxx
svx/source/dialog/rubydialog.cxx
svx/source/dialog/rulritem.cxx
svx/source/dialog/simptabl.cxx
svx/source/dialog/srchdlg.cxx
svx/source/dialog/svxbmpnumvalueset.cxx
svx/source/dialog/svxruler.cxx
svx/source/dialog/swframeexample.cxx
svx/source/engine3d/float3d.cxx
svx/source/engine3d/float3d.src
svx/source/engine3d/svx3ditems.cxx
svx/source/fmcomp/gridctrl.cxx
svx/source/fmcomp/trace.cxx
svx/source/form/ParseContext.cxx
svx/source/form/datanavi.cxx
svx/source/form/filtnav.cxx
svx/source/form/fmexch.cxx
svx/source/form/fmexpl.cxx
svx/source/form/fmobjfac.cxx
svx/source/form/fmpage.cxx
svx/source/form/fmshell.cxx
svx/source/form/fmshimp.cxx
svx/source/form/fmsrcimp.cxx
svx/source/form/fmvwimp.cxx
svx/source/form/makefile.mk
svx/source/form/tabwin.cxx
svx/source/form/tbxform.cxx
svx/source/form/typemap.cxx
svx/source/gallery2/galbrws1.cxx
svx/source/gallery2/galbrws2.cxx
svx/source/gallery2/galexpl.cxx
svx/source/gallery2/gallery1.cxx
svx/source/gallery2/galtheme.cxx
svx/source/gallery2/makefile.mk
svx/source/gengal/gengal.cxx
svx/source/gengal/makefile.mk
svx/source/inc/fmgroup.hxx
svx/source/intro/about_ooo.hrc
svx/source/intro/iso.src
svx/source/intro/ooo.src
svx/source/items/SmartTagItem.cxx
svx/source/items/algitem.cxx
svx/source/items/chrtitem.cxx
svx/source/items/clipfmtitem.cxx
svx/source/items/customshapeitem.cxx
svx/source/items/drawitem.cxx
svx/source/items/e3ditem.cxx
svx/source/items/grfitem.cxx
svx/source/items/hlnkitem.cxx
svx/source/items/makefile.mk
svx/source/items/pageitem.cxx
svx/source/items/rotmodit.cxx
svx/source/items/viewlayoutitem.cxx
svx/source/items/zoomitem.cxx
svx/source/items/zoomslideritem.cxx
svx/source/src/app.hrc
svx/source/stbctrls/makefile.mk
svx/source/stbctrls/modctrl.cxx
svx/source/stbctrls/xmlsecctrl.cxx
svx/source/stbctrls/zoomctrl.cxx
svx/source/svdraw/clonelist.cxx
svx/source/svdraw/svdattr.cxx
svx/source/svdraw/svdcrtv.cxx
svx/source/svdraw/svdedtv1.cxx
svx/source/svdraw/svdedtv2.cxx
svx/source/svdraw/svdedxv.cxx
svx/source/svdraw/svdetc.cxx
svx/source/svdraw/svdfmtf.cxx
svx/source/svdraw/svdfmtf.hxx
svx/source/svdraw/svdglue.cxx
svx/source/svdraw/svdhdl.cxx
svx/source/svdraw/svdhlpln.cxx
svx/source/svdraw/svdibrow.cxx
svx/source/svdraw/svdlayer.cxx
svx/source/svdraw/svdmodel.cxx
svx/source/svdraw/svdoashp.cxx
svx/source/svdraw/svdobj.cxx
svx/source/svdraw/svdocapt.cxx
svx/source/svdraw/svdocirc.cxx
svx/source/svdraw/svdoedge.cxx
svx/source/svdraw/svdograf.cxx
svx/source/svdraw/svdogrp.cxx
svx/source/svdraw/svdomeas.cxx
svx/source/svdraw/svdomedia.cxx
svx/source/svdraw/svdopath.cxx
svx/source/svdraw/svdotext.cxx
svx/source/svdraw/svdotxdr.cxx
svx/source/svdraw/svdotxed.cxx
svx/source/svdraw/svdotxfl.cxx
svx/source/svdraw/svdotxln.cxx
svx/source/svdraw/svdotxtr.cxx
svx/source/svdraw/svdoutl.cxx
svx/source/svdraw/svdpage.cxx
svx/source/svdraw/svdpagv.cxx
svx/source/svdraw/svdpntv.cxx
svx/source/svdraw/svdpoev.cxx
svx/source/svdraw/svdsnpv.cxx
svx/source/svdraw/svdstr.src
svx/source/svdraw/svdtrans.cxx
svx/source/svdraw/svdundo.cxx
svx/source/svdraw/svdview.cxx
svx/source/svdraw/svdxcgv.cxx
svx/source/table/svdotable.cxx
svx/source/tbxctrls/colorwindow.hxx
svx/source/tbxctrls/extrusioncontrols.cxx
svx/source/tbxctrls/fillctrl.cxx
svx/source/tbxctrls/grafctrl.cxx
svx/source/tbxctrls/itemwin.cxx
svx/source/tbxctrls/layctrl.cxx
svx/source/tbxctrls/lboxctrl.cxx
svx/source/tbxctrls/linectrl.cxx
svx/source/tbxctrls/tbcontrl.cxx
svx/source/tbxctrls/verttexttbxctrl.cxx
svx/source/unodraw/unomod.cxx
svx/source/unodraw/unopage.cxx
svx/source/unodraw/unoprov.cxx
svx/source/unodraw/unoshape.cxx
svx/source/unodraw/unoshtxt.cxx
svx/source/xml/xmlxtexp.cxx
svx/source/xoutdev/_xpoly.cxx
svx/source/xoutdev/xattr.cxx
svx/source/xoutdev/xattr2.cxx
svx/source/xoutdev/xattrbmp.cxx
svx/source/xoutdev/xtabcolr.cxx
svx/util/makefile.mk
svx/workben/edittest.cxx
sysui/desktop/productversion.mk
ucb/prj/build.lst
ucb/source/cacher/cacheserv.cxx
ucb/source/core/ucb1.component
ucb/source/core/ucbserv.cxx
ucb/source/core/ucbstore.cxx
ucb/source/core/ucbstore.hxx
ucb/source/sorter/sortmain.cxx
ucb/source/ucp/file/prov.cxx
ucb/source/ucp/file/shell.cxx
ucb/source/ucp/ftp/ftpservices.cxx
ucb/source/ucp/gio/gio_provider.cxx
ucb/source/ucp/gvfs/gvfs_provider.cxx
ucb/source/ucp/hierarchy/hierarchyservices.cxx
ucb/source/ucp/odma/odma_lib.cxx
ucb/source/ucp/odma/odma_services.cxx
ucb/source/ucp/package/pkgservices.cxx
ucb/source/ucp/tdoc/tdoc_services.cxx
ucb/source/ucp/webdav/ContentProperties.cxx
ucb/source/ucp/webdav/NeonHeadRequest.cxx
ucb/source/ucp/webdav/webdavcontent.cxx
ucb/source/ucp/webdav/webdavservices.cxx
uui/source/iahndl.cxx
uui/source/iahndl.hxx
uui/source/loginerr.hxx
uui/source/nameclashdlg.hxx
uui/source/passcrtdlg.cxx
uui/source/passworddlg.cxx
uui/source/passworddlg.hxx
uui/source/services.cxx
vbahelper/inc/vbahelper/vbahelper.hxx
vbahelper/prj/build.lst
vbahelper/prj/d.lst
vbahelper/source/msforms/makefile.mk
vbahelper/source/msforms/vbauserform.cxx
vbahelper/source/vbahelper/makefile.mk
vbahelper/source/vbahelper/vbaapplicationbase.cxx
vbahelper/source/vbahelper/vbacommandbarcontrol.cxx
vbahelper/source/vbahelper/vbadocumentbase.cxx
vbahelper/source/vbahelper/vbadocumentsbase.cxx
vbahelper/source/vbahelper/vbahelper.cxx
vbahelper/util/makefile.mk
xmlhelp/source/cxxhelp/provider/databases.cxx
xmlhelp/source/cxxhelp/provider/services.cxx
xmlhelp/source/treeview/tvfactory.cxx
xmloff/JunitTest_xmloff_unoapi.mk
xmloff/inc/functional.hxx
xmloff/inc/xmloff/formlayerexport.hxx
xmloff/inc/xmloff/formlayerimport.hxx
xmloff/inc/xmloff/functional.hxx
xmloff/inc/xmloff/shapeimport.hxx
xmloff/inc/xmloff/xmlcnitm.hxx
xmloff/inc/xmloff/xmlnumfi.hxx
xmloff/prj/build.lst
xmloff/source/chart/SchXMLChartContext.cxx
xmloff/source/chart/SchXMLExport.cxx
xmloff/source/chart/SchXMLImport.cxx
xmloff/source/chart/SchXMLLegendContext.hxx
xmloff/source/chart/SchXMLPlotAreaContext.cxx
xmloff/source/core/xmluconv.cxx
xmloff/source/draw/sdxmlexp.cxx
xmloff/source/draw/shapeexport4.cxx
xmloff/source/draw/ximp3dobject.cxx
xmloff/source/draw/ximp3dscene.cxx
xmloff/source/forms/formlayerexport.cxx
xmloff/source/forms/formlayerimport.cxx
xmloff/source/forms/handler/vcl_time_handler.hxx
xmloff/source/forms/layerimport.cxx
xmloff/source/forms/layerimport.hxx
xmloff/source/forms/property_meta_data.hxx
xmloff/source/style/PageHeaderFooterContext.cxx
xmloff/source/style/PageMasterStyleMap.cxx
xmloff/source/style/prstylei.cxx
xmloff/source/style/xmlimppr.cxx
xmloff/source/style/xmlnumfi.cxx
xmloff/source/style/xmlstyle.cxx
xmloff/source/table/tabledesignsimporter.cxx
xmloff/source/text/XMLTextNumRuleInfo.cxx
xmloff/source/text/XMLTextShapeStyleContext.cxx
xmloff/source/text/txtstyle.cxx
xmloff/source/transform/ChartOOoTContext.cxx
xmloff/source/transform/EventOOoTContext.cxx
xmloff/source/transform/TransformerBase.cxx
xmloff/util/makefile.mk
xmlscript/util/xcr.component
Diffstat (limited to 'sfx2/source/doc')
59 files changed, 1474 insertions, 1467 deletions
diff --git a/sfx2/source/doc/DocumentMetadataAccess.cxx b/sfx2/source/doc/DocumentMetadataAccess.cxx index 8ad9d8b537cb..8ad9d8b537cb 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 302e181fe438..302e181fe438 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 f2b665f245cb..f2b665f245cb 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 eeaa574550ca..c13ae3d5ecd1 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 5119f646066b..c0e5bba2803b 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 759ceb3bc07c..695d3af6e31f 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() ) { // Alle verf"ugbaren Versionen einlesen @@ -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 71dd45bd0da1..3d5cf41708c3 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 99388aeda06c..d461b3a17fe0 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 // Index des Bereiches + sal_uInt16 nIdx // Index des Bereiches ) const /* [Beschreibung] @@ -351,7 +355,7 @@ String SfxDocumentTemplates::GetFullRegionName const String& SfxDocumentTemplates::GetRegionName ( - USHORT nIdx // Index des Bereiches + sal_uInt16 nIdx // Index des Bereiches ) const /* [Beschreibung] @@ -387,7 +391,7 @@ const String& SfxDocumentTemplates::GetRegionName //------------------------------------------------------------------------ -USHORT SfxDocumentTemplates::GetRegionNo +sal_uInt16 SfxDocumentTemplates::GetRegionNo ( const String &rRegion // Name der Region ) const @@ -399,7 +403,7 @@ USHORT SfxDocumentTemplates::GetRegionNo [R"uckgabewert] - USHORT Index von 'rRegion' oder USHRT_MAX falls unbekannt + sal_uInt16 Index von 'rRegion' oder USHRT_MAX falls unbekannt */ { @@ -412,7 +416,7 @@ USHORT SfxDocumentTemplates::GetRegionNo size_t nIndex = pImp->GetRegionPos( rRegion, bFound ); if ( bFound ) - return (USHORT) nIndex; + return (sal_uInt16) nIndex; else return USHRT_MAX; } @@ -420,7 +424,7 @@ USHORT SfxDocumentTemplates::GetRegionNo //------------------------------------------------------------------------ -USHORT SfxDocumentTemplates::GetRegionCount() const +sal_uInt16 SfxDocumentTemplates::GetRegionCount() const /* [Beschreibung] @@ -429,7 +433,7 @@ USHORT SfxDocumentTemplates::GetRegionCount() const [R"uckgabewert] - USHORT Anzahl der Bereiche + sal_uInt16 Anzahl der Bereiche */ { @@ -438,14 +442,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 ); @@ -462,7 +466,7 @@ sal_Bool SfxDocumentTemplates::IsRegionLoaded( USHORT nIdx ) const //------------------------------------------------------------------------ -USHORT SfxDocumentTemplates::GetCount +sal_uInt16 SfxDocumentTemplates::GetCount ( const String& rName /* Name des Bereiches, dessen Eintrags- anzahl ermittelt werden soll */ @@ -487,19 +491,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 /* Index des Bereiches, dessen Eintrags- + sal_uInt16 nRegion /* Index des Bereiches, dessen Eintrags- anzahl ermittelt werden soll */ ) const @@ -520,20 +524,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, // Index des Bereiches, in dem der Eintrag liegt - USHORT nIdx // Index des Eintrags + sal_uInt16 nRegion, // Index des Bereiches, in dem der Eintrag liegt + sal_uInt16 nIdx // Index des Eintrags ) const /* [Beschreibung] @@ -575,8 +579,8 @@ const String& SfxDocumentTemplates::GetName String SfxDocumentTemplates::GetFileName ( - USHORT nRegion, // Index des Bereiches, in dem der Eintrag liegt - USHORT nIdx // Index des Eintrags + sal_uInt16 nRegion, // Index des Bereiches, in dem der Eintrag liegt + sal_uInt16 nIdx // Index des Eintrags ) const /* [Beschreibung] @@ -612,8 +616,8 @@ String SfxDocumentTemplates::GetFileName String SfxDocumentTemplates::GetPath ( - USHORT nRegion, // Index des Bereiches, in dem der Eintrag liegt - USHORT nIdx // Index des Eintrags + sal_uInt16 nRegion, // Index des Bereiches, in dem der Eintrag liegt + sal_uInt16 nIdx // Index des Eintrags ) const /* [Beschreibung] @@ -649,7 +653,7 @@ String SfxDocumentTemplates::GetPath String SfxDocumentTemplates::GetTemplatePath ( - USHORT nRegion, // Index des Bereiches, in dem der Eintrag liegt + sal_uInt16 nRegion, // Index des Bereiches, in dem der Eintrag liegt const String& rLongName // logischer Name des Eintrags ) const @@ -819,7 +823,7 @@ sal_Bool SfxDocumentTemplates::SaveDir void SfxDocumentTemplates::NewTemplate ( - USHORT nRegion, /* Index des Bereiches, in dem die Vorlage + sal_uInt16 nRegion, /* Index des Bereiches, in dem die Vorlage angelegt werden soll */ const String& rLongName, // logischer Name der neuen Vorlage @@ -863,10 +867,10 @@ void SfxDocumentTemplates::NewTemplate sal_Bool SfxDocumentTemplates::CopyOrMove ( - USHORT nTargetRegion, // Index des Zielbereiches - USHORT nTargetIdx, // Index Zielposition - USHORT nSourceRegion, // Index des Quellbereiches - USHORT nSourceIdx, /* Index der zu kopierenden / zu verschiebenden + sal_uInt16 nTargetRegion, // Index des Zielbereiches + sal_uInt16 nTargetIdx, // Index Zielposition + sal_uInt16 nSourceRegion, // Index des Quellbereiches + sal_uInt16 nSourceIdx, /* Index der zu kopierenden / zu verschiebenden Dokumentvorlage */ sal_Bool bMove // kopieren / verschieben ) @@ -884,8 +888,8 @@ sal_Bool SfxDocumentTemplates::CopyOrMove Aktion konnte nicht ausgef2uhrt werden [Querverweise] - <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)> */ { @@ -975,10 +979,10 @@ sal_Bool SfxDocumentTemplates::CopyOrMove sal_Bool SfxDocumentTemplates::Move ( - USHORT nTargetRegion, // Index des Zielbereiches - USHORT nTargetIdx, // Index Zielposition - USHORT nSourceRegion, // Index des Quellbereiches - USHORT nSourceIdx /* Index der zu kopierenden / zu verschiebenden + sal_uInt16 nTargetRegion, // Index des Zielbereiches + sal_uInt16 nTargetIdx, // Index Zielposition + sal_uInt16 nSourceRegion, // Index des Quellbereiches + sal_uInt16 nSourceIdx /* Index der zu kopierenden / zu verschiebenden Dokumentvorlage */ ) @@ -997,7 +1001,7 @@ sal_Bool SfxDocumentTemplates::Move [Querverweise] - <SfxDocumentTemplates::CopyOrMove(USHORT,USHORT,USHORT,USHORT,sal_Bool)> + <SfxDocumentTemplates::CopyOrMove(sal_uInt16,sal_uInt16,sal_uInt16,sal_uInt16,sal_Bool)> */ { DocTemplLocker_Impl aLocker( *pImp ); @@ -1010,10 +1014,10 @@ sal_Bool SfxDocumentTemplates::Move sal_Bool SfxDocumentTemplates::Copy ( - USHORT nTargetRegion, // Index des Zielbereiches - USHORT nTargetIdx, // Index Zielposition - USHORT nSourceRegion, // Index des Quellbereiches - USHORT nSourceIdx /* Index der zu kopierenden / zu verschiebenden + sal_uInt16 nTargetRegion, // Index des Zielbereiches + sal_uInt16 nTargetIdx, // Index Zielposition + sal_uInt16 nSourceRegion, // Index des Quellbereiches + sal_uInt16 nSourceIdx /* Index der zu kopierenden / zu verschiebenden Dokumentvorlage */ ) @@ -1032,7 +1036,7 @@ sal_Bool SfxDocumentTemplates::Copy [Querverweise] - <SfxDocumentTemplates::CopyOrMove(USHORT,USHORT,USHORT,USHORT,sal_Bool)> + <SfxDocumentTemplates::CopyOrMove(sal_uInt16,sal_uInt16,sal_uInt16,sal_uInt16,sal_Bool)> */ { @@ -1046,9 +1050,9 @@ sal_Bool SfxDocumentTemplates::Copy sal_Bool SfxDocumentTemplates::CopyTo ( - USHORT nRegion, /* Bereich der Vorlage, die exportiert werden + sal_uInt16 nRegion, /* Bereich der Vorlage, die exportiert werden soll */ - USHORT nIdx, /* Index der Vorlage, die exportiert werden + sal_uInt16 nIdx, /* Index der Vorlage, die exportiert werden soll */ const String& rName /* Dateiname, unter dem die Vorlage angelegt werden soll */ @@ -1070,7 +1074,7 @@ sal_Bool SfxDocumentTemplates::CopyTo [Querverweise] - <SfxDocumentTemplates::CopyFrom(USHORT,USHORT,String&)> + <SfxDocumentTemplates::CopyFrom(sal_uInt16,sal_uInt16,String&)> */ { @@ -1125,9 +1129,9 @@ sal_Bool SfxDocumentTemplates::CopyTo sal_Bool SfxDocumentTemplates::CopyFrom ( - USHORT nRegion, /* Bereich, in den die Vorlage importiert + sal_uInt16 nRegion, /* Bereich, in den die Vorlage importiert werden soll */ - USHORT nIdx, // Index der neuen Vorlage in diesem Bereich + sal_uInt16 nIdx, // Index der neuen Vorlage in diesem Bereich String& rName /* Dateiname der Vorlage, die importiert werden soll, als out-Parameter der (auto- matisch aus dem Dateinamen generierte) @@ -1149,7 +1153,7 @@ sal_Bool SfxDocumentTemplates::CopyFrom [Querverweise] - <SfxDocumentTemplates::CopyTo(USHORT,USHORT,const String&)> + <SfxDocumentTemplates::CopyTo(sal_uInt16,sal_uInt16,const String&)> */ { @@ -1276,8 +1280,8 @@ sal_Bool SfxDocumentTemplates::CopyFrom sal_Bool SfxDocumentTemplates::Delete ( - USHORT nRegion, // Index des Bereiches - USHORT nIdx /* Index des Eintrags oder USHRT_MAX, + sal_uInt16 nRegion, // Index des Bereiches + sal_uInt16 nIdx /* Index des Eintrags oder USHRT_MAX, wenn ein Verzeichnis gemeint ist. */ ) @@ -1297,7 +1301,7 @@ sal_Bool SfxDocumentTemplates::Delete [Querverweise] - <SfxDocumentTemplates::InsertDir(const String&,USHORT)> + <SfxDocumentTemplates::InsertDir(const String&,sal_uInt16)> <SfxDocumentTemplates::KillDir(SfxTemplateDir&)> <SfxDocumentTemplates::SaveDir(SfxTemplateDir&)> */ @@ -1347,7 +1351,7 @@ sal_Bool SfxDocumentTemplates::Delete sal_Bool SfxDocumentTemplates::InsertDir ( const String& rText, // der logische Name des neuen Bereiches - USHORT nRegion // Index des Bereiches + sal_uInt16 nRegion // Index des Bereiches ) /* [Beschreibung] @@ -1401,8 +1405,8 @@ sal_Bool SfxDocumentTemplates::InsertDir sal_Bool SfxDocumentTemplates::SetName ( const String& rName, // Der zu setzende Name - USHORT nRegion, // Index des Bereiches - USHORT nIdx /* Index des Eintrags oder USHRT_MAX, + sal_uInt16 nRegion, // Index des Bereiches + sal_uInt16 nIdx /* Index des Eintrags oder USHRT_MAX, wenn ein Verzeichnis gemeint ist. */ ) @@ -1513,8 +1517,8 @@ sal_Bool SfxDocumentTemplates::Rescan() SfxObjectShellRef SfxDocumentTemplates::CreateObjectShell ( - USHORT nRegion, // Index des Bereiches - USHORT nIdx // Index des Eintrags + sal_uInt16 nRegion, // Index des Bereiches + sal_uInt16 nIdx // Index des Eintrags ) /* [Beschreibung] @@ -1530,7 +1534,7 @@ SfxObjectShellRef SfxDocumentTemplates::CreateObjectShell [Querverweise] <SfxTemplateDirEntry::CreateObjectShell()> - <SfxDocumentTemplates::DeleteObjectShell(USHORT, USHORT)> + <SfxDocumentTemplates::DeleteObjectShell(sal_uInt16, sal_uInt16)> */ { @@ -1555,8 +1559,8 @@ SfxObjectShellRef SfxDocumentTemplates::CreateObjectShell sal_Bool SfxDocumentTemplates::DeleteObjectShell ( - USHORT nRegion, // Index des Bereiches - USHORT nIdx // Index des Eintrags + sal_uInt16 nRegion, // Index des Bereiches + sal_uInt16 nIdx // Index des Eintrags ) /* [Beschreibung] @@ -1575,7 +1579,7 @@ sal_Bool SfxDocumentTemplates::DeleteObjectShell [Querverweise] <SfxTemplateDirEntry::DeleteObjectShell()> - <SfxDocumentTemplates::CreateObjectShell(USHORT, USHORT)> + <SfxDocumentTemplates::CreateObjectShell(sal_uInt16, sal_uInt16)> */ { @@ -1636,9 +1640,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 ); @@ -1702,16 +1706,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 ) @@ -1873,7 +1877,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()) || @@ -1883,7 +1887,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 ) @@ -1914,7 +1918,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 9734ac87edd1..08d7e2b8a404 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 bee3e7731ad0..b714b5816790 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 der QueryBox - USHORT nId, // Resource Id +sal_Bool QueryDelete_Impl(Window *pParent, // Parent der QueryBox + sal_uInt16 nId, // Resource Id const String &rTemplateName) // Name der zu l"oschenden Vorlage /* [Beschreibung] @@ -376,7 +376,7 @@ void ErrorDelete_Impl(Window *pParent, const String &rName, sal_Bool bFolder = s struct ImpPath_Impl { SvUShorts aUS; - USHORT nRef; + sal_uInt16 nRef; ImpPath_Impl(); ImpPath_Impl( const ImpPath_Impl& rCopy ); @@ -392,13 +392,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 ); } @@ -407,7 +407,7 @@ ImpPath_Impl::ImpPath_Impl( const ImpPath_Impl& rCopy ) : /* [Beschreibung] Implementierungsklasse; Darstellung einer Position in der Outline- - Listbox als USHORT-Array; dieses beschreibt die Position jeweil + Listbox als sal_uInt16-Array; dieses beschreibt die Position jeweil als relative Postion zum "ubergeordneten Eintrag */ @@ -437,8 +437,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; } @@ -454,7 +454,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; @@ -466,8 +466,8 @@ Path::Path(SvLBox *pBox, SvLBoxEntry *pEntry) : SvLBoxEntry *GetIndices_Impl(SvLBox *pBox, SvLBoxEntry *pEntry, - USHORT &rRegion, - USHORT &rOffset) + sal_uInt16 &rRegion, + sal_uInt16 &rOffset) /* [Beschreibung] Bereich und Position innerhalb eines Bereiches f"ur eine @@ -477,9 +477,9 @@ SvLBoxEntry *GetIndices_Impl(SvLBox *pBox, SvLBox *pBox Listbox, an der das Ereignis auftrat SvLBoxEntry *pEntry Eintrag, dessen Position ermittelt werden soll - USHORT &rRegion der Bereich innerhalb der Bereiche der + sal_uInt16 &rRegion der Bereich innerhalb der Bereiche der Dokumentvorlagen (Out-Parameter) - USHORT &rOffset die Position innerhalb des Bereiches + sal_uInt16 &rOffset die Position innerhalb des Bereiches Dokumentvorlagen (Out-Parameter) [Querverweise] @@ -497,27 +497,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); @@ -525,12 +528,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) /* [Beschreibung] Verschieben oder Kopieren von Dokumentvorlagen @@ -542,11 +545,11 @@ BOOL SfxOrganizeListBox_Impl::MoveOrCopyTemplates(SvLBox *pSourceBox, SvLBoxEntry* pTarget Ziel-Eintrag, auf den verschoben werden soll SvLBoxEntry *&pNewParent der Parent der an der Zielposition erzeugten Eintrags (Out-Parameter) - ULONG &rIdx Index des Zieleintrags - BOOL bCopy Flag f"ur Kopieren / Verschieben + sal_uIntPtr &rIdx Index des Zieleintrags + sal_Bool bCopy Flag f"ur Kopieren / Verschieben - [Returnwert] BOOL: Erfolg oder Mi"serfolg + [Returnwert] sal_Bool: Erfolg oder Mi"serfolg [Querverweise] @@ -554,27 +557,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 ? @@ -616,12 +619,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) /* [Beschreibung] Verschieben oder Kopieren von Dokumentinhalten @@ -633,11 +636,11 @@ BOOL SfxOrganizeListBox_Impl::MoveOrCopyContents(SvLBox *pSourceBox, SvLBoxEntry* pTarget Ziel-Eintrag, auf den verschoben werden soll SvLBoxEntry *&pNewParent der Parent der an der Zielposition erzeugten Eintrags (Out-Parameter) - ULONG &rIdx Index des Zieleintrags - BOOL bCopy Flag f"ur Kopieren / Verschieben + sal_uIntPtr &rIdx Index des Zieleintrags + sal_Bool bCopy Flag f"ur Kopieren / Verschieben - [Returnwert] BOOL: Erfolg oder Mi"serfolg + [Returnwert] sal_Bool: Erfolg oder Mi"serfolg [Querverweise] @@ -645,31 +648,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()) { @@ -680,8 +685,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]++; @@ -708,12 +713,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); // bis zum Index der aktuellen Ebene - for(USHORT j = 0; j < p[i]; ++j) + for(sal_uInt16 j = 0; j < p[i]; ++j) pChildIter = NextSibling(pChildIter); // gfs Fuellen bei Items onDemand ++i; @@ -729,7 +734,7 @@ BOOL SfxOrganizeListBox_Impl::MoveOrCopyContents(SvLBox *pSourceBox, pNewParent->HasChildsOnDemand() && !GetModel()->HasChilds(pNewParent)) { - bOk = FALSE; + bOk = sal_False; if(!bCopy) pSourceBox->GetModel()->Remove(pSource); } @@ -738,7 +743,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 ) { @@ -746,7 +751,7 @@ BOOL SfxOrganizeListBox_Impl::MoveOrCopyContents(SvLBox *pSourceBox, GetModel()->Remove(pChildIter); } else - bOk = FALSE; + bOk = sal_False; } if(!bCopy && &aSourceDoc != &aTargetDoc) { @@ -760,15 +765,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) /* [Beschreibung] @@ -781,10 +786,10 @@ BOOL SfxOrganizeListBox_Impl::NotifyMoving(SvLBoxEntry *pTarget, SvLBoxEntry *pSource Quell-Eintrag, der verschoben werden soll SvLBoxEntry *&pNewParent der Parent der an der Zielposition erzeugten Eintrags (Out-Parameter) - ULONG &rIdx Index des Zieleintrags + sal_uIntPtr &rIdx Index des Zieleintrags - [Returnwert] BOOL: Erfolg oder Mi"serfolg + [Returnwert] sal_Bool: Erfolg oder Mi"serfolg [Querverweise] @@ -792,22 +797,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; @@ -817,19 +822,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) /* [Beschreibung] Benachrichtigung, da"s ein Eintrag kopiert werden soll @@ -841,10 +846,10 @@ BOOL SfxOrganizeListBox_Impl::NotifyCopying(SvLBoxEntry *pTarget, SvLBoxEntry *pSource Quell-Eintrag, der kopiert werden soll SvLBoxEntry *&pNewParent der Parent der an der Zielposition erzeugten Eintrags (Out-Parameter) - ULONG &rIdx Index des Zieleintrags + sal_uIntPtr &rIdx Index des Zieleintrags - [Returnwert] BOOL: Erfolg oder Mi"serfolg + [Returnwert] sal_Bool: Erfolg oder Mi"serfolg [Querverweise] @@ -852,21 +857,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; @@ -875,16 +880,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& ) /* [Beschreibung] @@ -900,14 +905,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) /* [Beschreibung] @@ -917,8 +922,8 @@ BOOL SfxOrganizeListBox_Impl::EditedEntry(SvLBoxEntry* pEntry, const String& rTe [Returnwert] - BOOL TRUE: der Name soll in der Anzeige ge"andert werden - FALSE:der Name soll nicht ge"andert werden + sal_Bool sal_True: der Name soll in der Anzeige ge"andert werden + sal_False:der Name soll nicht ge"andert werden [Querverweise] <SfxOrganizeListBox_Impl::EditingEntry(SvLBoxEntry* pEntry, const String& rText)> @@ -934,16 +939,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 ) @@ -956,47 +961,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 == @@ -1035,7 +1040,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; @@ -1047,7 +1052,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 ) { @@ -1080,7 +1085,7 @@ void SfxOrganizeListBox_Impl::DragFinished( sal_Int8 nDropAction ) //------------------------------------------------------------------------- -inline USHORT SfxOrganizeListBox_Impl::GetDocLevel() const +inline sal_uInt16 SfxOrganizeListBox_Impl::GetDocLevel() const /* [Beschreibung] @@ -1089,7 +1094,7 @@ inline USHORT SfxOrganizeListBox_Impl::GetDocLevel() const [Returnwert] - USHORT Die Ebene der Dokumente + sal_uInt16 Die Ebene der Dokumente */ @@ -1157,19 +1162,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 = @@ -1214,7 +1222,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)) { @@ -1233,12 +1241,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 /* [Beschreibung] @@ -1252,7 +1260,7 @@ BOOL SfxOrganizeListBox_Impl::IsUniqName_Impl(const String &rText, [Returnwert] - BOOL TRUE, wenn der Name eindeutig ist, sonst FALSE + sal_Bool sal_True, wenn der Name eindeutig ist, sonst sal_False */ { @@ -1260,18 +1268,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; @@ -1285,8 +1293,8 @@ SvLBoxEntry* SfxOrganizeListBox_Impl::InsertEntryByBmpType( const XubString& rText, BMPTYPE eBmpType, SvLBoxEntry* pParent, - BOOL bChildsOnDemand, - ULONG nPos, + sal_Bool bChildsOnDemand, + sal_uIntPtr nPos, void* pUserData ) { @@ -1389,30 +1397,30 @@ void SfxOrganizeListBox_Impl::Reset() { DBG_ASSERT( pMgr != 0, "kein Manager" ); // Inhalte l"oschen - 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 /* [Beschreibung] @@ -1421,7 +1429,7 @@ const Image &SfxOrganizeListBox_Impl::GetClosedBmp(USHORT nLevel) const [Parameter] - USHORT nLevel Angabe der Ebene, 2 Ebenen sind erlaubt + sal_uInt16 nLevel Angabe der Ebene, 2 Ebenen sind erlaubt [Returnwert] @@ -1447,7 +1455,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 /* [Beschreibung] @@ -1456,7 +1464,7 @@ const Image &SfxOrganizeListBox_Impl::GetOpenedBmp(USHORT nLevel) const [Parameter] - USHORT nLevel Angabe der Ebene, 2 Ebenen sind erlaubt + sal_uInt16 nLevel Angabe der Ebene, 2 Ebenen sind erlaubt [Returnwert] @@ -1489,7 +1497,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 ) /* [Beschreibung] @@ -1498,7 +1506,7 @@ String SfxOrganizeDlg_Impl::GetPath_Impl( BOOL bOpen, const String& rFileName ) [Parameter] - BOOL bOpen Flag: "Offnen / Speichern + sal_Bool bOpen Flag: "Offnen / Speichern const String& rFileName aktueller Dateiname als Vorschlag [R"uckgabewert] Dateiname mit Pfad oder Leerstring, wenn @@ -1679,9 +1687,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++; @@ -1693,16 +1701,16 @@ BOOL SfxOrganizeDlg_Impl::DontDelete_Impl( SvLBoxEntry* pEntry ) (0 == nDepth && pFocusBox->GetLevelCount_Impl(0) < 2)) //Mindestens eine Vorlage behalten { - 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 @@ -1730,7 +1738,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 ) @@ -1740,13 +1748,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& ) @@ -1756,7 +1764,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 ) /* [Beschreibung] @@ -1764,7 +1772,7 @@ long SfxOrganizeDlg_Impl::Dispatch_Impl( USHORT nId, Menu* _pMenu ) [Parameter] - USHORT nId ID des Events + sal_uInt16 nId ID des Events [R"uckgabewert] 1: Event wurde verarbeitet, 0: Event wurde nicht verarbeitet (SV-Menu) @@ -1788,14 +1796,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; @@ -1805,13 +1813,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))) @@ -1823,10 +1831,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, @@ -1840,6 +1848,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()], @@ -1856,7 +1867,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 ) ); @@ -1888,7 +1899,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; } @@ -1906,10 +1917,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; @@ -2010,7 +2024,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(); } @@ -2032,12 +2046,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; // nur Vorlagen anlegen pMenu->EnableItem( ID_NEW, bEnable && 0 == nDepth && SfxOrganizeListBox_Impl::VIEW_TEMPLATES == eVT ); @@ -2058,14 +2072,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 ); @@ -2076,17 +2090,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( @@ -2126,7 +2140,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() ); @@ -2331,7 +2345,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 ab758585352b..3dfdd686259c 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 897979a39c2f..8392022dff5b 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(); - // 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; - 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 096f26ecd06f..a43ccd48214e 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(??? VB ueberlegt sich was); - BOOL bUsedOrUserDefined; + // sal_uInt16 nOldHelpId = pExist->GetHelpId(??? VB ueberlegt sich was); + 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; } } @@ -578,13 +578,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; @@ -592,14 +592,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) { @@ -612,7 +612,7 @@ BOOL SfxObjectShell::Remove String aEmpty; SfxStyleFamily eFamily = pMySheet->GetFamily(); pMyPool->Remove(pMySheet); - bRet = TRUE; + bRet = sal_True; SfxStyleSheetBase* pTestSheet = pMyPool->First(); while (pTestSheet) @@ -634,7 +634,7 @@ BOOL SfxObjectShell::Remove pTestSheet = pMyPool->Next(); } - SetModified( TRUE ); + SetModified( sal_True ); } return bRet; @@ -642,12 +642,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 ) { @@ -661,7 +661,7 @@ BOOL SfxObjectShell::Print pStylePool->GetSearchFamily(), pStylePool->GetSearchMask() ); SfxStyleSheetBase *pStyle = pIter->First(); if ( !pStyle ) - return TRUE; + return sal_True; // pepare adaptor for old style StartPage/EndPage printing boost::shared_ptr< Printer > pPrinter( new Printer( rPrt.GetJobSetup() ) ); @@ -675,8 +675,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 ) @@ -711,13 +711,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); @@ -738,7 +738,7 @@ BOOL SfxObjectShell::Print } else { - USHORT nChar = 1; + sal_uInt16 nChar = 1; while( nStart + nChar < aStr.Len() && aOutPos.X() + pPrinter->GetTextWidth( @@ -769,9 +769,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 c206c72ccc6d..1415377aa429 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 d8d00bdc6cfa..e03d0a8813c3 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" @@ -1103,9 +1104,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); } } } @@ -1584,15 +1585,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(); @@ -1602,23 +1596,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 ) @@ -1672,6 +1656,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() ) @@ -1689,7 +1676,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; } @@ -1723,118 +1710,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; @@ -1852,25 +1727,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; @@ -2019,7 +1875,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 @@ -2032,7 +1888,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 ) ) { @@ -2054,7 +1910,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 ); @@ -2077,7 +1933,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() ); @@ -2087,7 +1943,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(); @@ -2121,7 +1977,7 @@ Window* SfxObjectShell::GetDialogParent( SfxMedium* pLoadingMedium ) return pWindow; } -String SfxObjectShell::UpdateTitle( SfxMedium* pMed, USHORT nDocViewNumber ) +String SfxObjectShell::UpdateTitle( SfxMedium* pMed, sal_uInt16 nDocViewNumber ) { // Titel des Fensters String aTitle; @@ -2162,29 +2018,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 ) { } @@ -2200,8 +2056,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 >( @@ -2210,14 +2066,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 4019167ef9d3..9710836a3517 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, @@ -457,7 +457,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 @@ -493,7 +493,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; } @@ -518,7 +518,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 ) ); } @@ -526,7 +526,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 @@ -565,7 +565,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; @@ -600,8 +600,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; @@ -643,7 +644,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 ); @@ -680,14 +681,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; } @@ -730,8 +731,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,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) // Auf dieses Dokument existiert noch eine Sicht, die // in einem FrameSet liegt; diese darf nat"urlich nicht // geclosed werden - bInFrameSet = TRUE; + bInFrameSet = sal_True; } else nFrames++; @@ -761,8 +762,8 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) } // Parameter auswerten - 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 +786,22 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) } } else - SetModified(FALSE); + SetModified(sal_False); } // Benutzer bricht ab? 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(); // da der Pool in Close zerst"ort wird DoClose(); @@ -833,9 +834,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" ); @@ -891,10 +892,10 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) // Picklisten-Eintrag verhindern 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() ); } @@ -910,7 +911,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 ) { @@ -1060,13 +1061,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(); @@ -1096,7 +1090,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 ) { @@ -1178,7 +1172,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 ) ); @@ -1197,7 +1191,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); @@ -1362,7 +1356,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() ); @@ -1450,22 +1444,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 d279ef077304..673e56b2263a 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; } //------------------------------------------------------------------------- @@ -831,7 +845,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; @@ -891,7 +905,7 @@ sal_uInt32 SfxObjectShell::HandleFilter( SfxMedium* pMedium, SfxObjectShell* pDo pSet->Put( *pFilterData ); } else - bAbort = TRUE; + bAbort = sal_True; } } @@ -952,15 +966,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& ) @@ -1020,7 +1034,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 ) @@ -1339,13 +1353,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& ) @@ -1508,7 +1522,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 ) @@ -1708,8 +1722,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]; @@ -1751,7 +1765,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"); @@ -1904,7 +1918,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; { @@ -2227,7 +2241,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(); @@ -2322,7 +2336,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(); @@ -2413,9 +2427,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(); @@ -2608,7 +2622,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 ) { @@ -2702,7 +2716,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() ) @@ -2887,7 +2901,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; @@ -2945,7 +2959,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; @@ -2982,7 +2996,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 ) @@ -3088,13 +3102,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& ) { @@ -3162,7 +3176,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" ); @@ -3268,7 +3282,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() ) @@ -3416,7 +3430,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 3d40e454ede6..f37bb9f469dd 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" @@ -195,12 +195,7 @@ void SAL_CALL SfxModelListener_Impl::disposing( const com::sun::star::lang::Even SfxObjectShell::SetCurrentComponent( Reference< XInterface >() ); } - if ( mpDoc->Get_Impl()->bHiddenLockedByAPI ) - { - mpDoc->Get_Impl()->bHiddenLockedByAPI = FALSE; - mpDoc->OwnerLock(FALSE); - } - else if ( !mpDoc->Get_Impl()->bClosing ) + if ( !mpDoc->Get_Impl()->bClosing ) // GCC stuerzt ab, wenn schon im dtor, also vorher Flag abfragen mpDoc->DoClose(); } @@ -818,11 +813,33 @@ void SfxObjectShell::InitBasicManager_Impl() */ { + /* #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->bBasicInitialized = TRUE; - pImp->pBasicManager->reset( BasicManagerRepository::getDocumentBasicManager( GetModel() ) ); DBG_ASSERT( pImp->pBasicManager->isValid(), "SfxObjectShell::InitBasicManager_Impl: did not get a BasicManager!" ); + pImp->bBasicInitialized = sal_True; } //-------------------------------------------------------------------- @@ -848,7 +865,7 @@ SfxObjectShell* SfxObjectShell::GetObjectShell() //-------------------------------------------------------------------- -SEQUENCE< OUSTRING > SfxObjectShell::GetEventNames() +uno::Sequence< ::rtl::OUString > SfxObjectShell::GetEventNames() { static uno::Sequence< ::rtl::OUString >* pEventNameContainer = NULL; @@ -938,7 +955,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 ) { @@ -1037,8 +1054,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 add18f58f914..d0de20f85a77 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 ) @@ -618,9 +617,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)) ) { @@ -717,7 +716,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 e47ee5d5cc3f..a2d53139e956 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 + // 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() ) { - 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() ) + 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 ); DBG_TRACE( 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 ); } } @@ -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) |