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 /framework/source/uielement | |
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 'framework/source/uielement')
46 files changed, 543 insertions, 1550 deletions
diff --git a/framework/source/uielement/addonstoolbarmanager.cxx b/framework/source/uielement/addonstoolbarmanager.cxx index 6841066ab47a..3b8122321d46 100644..100755 --- a/framework/source/uielement/addonstoolbarmanager.cxx +++ b/framework/source/uielement/addonstoolbarmanager.cxx @@ -40,11 +40,11 @@ #include <uielement/generictoolbarcontroller.hxx> #include <threadhelp/resetableguard.hxx> #include "services.h" -#include <helper/imageproducer.hxx> -#include <classes/sfxhelperfunctions.hxx> +#include <framework/imageproducer.hxx> +#include <framework/sfxhelperfunctions.hxx> #include <classes/fwkresid.hxx> #include <classes/resource.hrc> -#include <classes/addonsoptions.hxx> +#include <framework/addonsoptions.hxx> #include <uielement/comboboxtoolbarcontroller.hxx> #include <uielement/imagebuttontoolbarcontroller.hxx> #include <uielement/togglebuttontoolbarcontroller.hxx> @@ -98,7 +98,7 @@ namespace framework { static const char TOOLBOXITEM_SEPARATOR_STR[] = "private:separator"; -static const USHORT TOOLBOXITEM_SEPARATOR_STR_LEN = sizeof( TOOLBOXITEM_SEPARATOR_STR )-1; +static const sal_uInt16 TOOLBOXITEM_SEPARATOR_STR_LEN = sizeof( TOOLBOXITEM_SEPARATOR_STR )-1; AddonsToolBarManager::AddonsToolBarManager( const Reference< XMultiServiceFactory >& rServiceManager, const Reference< XFrame >& rFrame, @@ -175,7 +175,7 @@ void SAL_CALL AddonsToolBarManager::dispose() throw( RuntimeException ) ResetableGuard aGuard( m_aLock ); for ( sal_uInt16 n = 0; n < m_pToolBar->GetItemCount(); n++ ) { - USHORT nId( m_pToolBar->GetItemId( n ) ); + sal_uInt16 nId( m_pToolBar->GetItemId( n ) ); if ( nId > 0 ) { @@ -203,9 +203,9 @@ bool AddonsToolBarManager::MenuItemAllowed( sal_uInt16 nId ) const void AddonsToolBarManager::RefreshImages() { sal_Bool bBigImages( SvtMiscOptions().AreCurrentSymbolsLarge() ); - for ( USHORT nPos = 0; nPos < m_pToolBar->GetItemCount(); nPos++ ) + for ( sal_uInt16 nPos = 0; nPos < m_pToolBar->GetItemCount(); nPos++ ) { - USHORT nId( m_pToolBar->GetItemId( nPos ) ); + sal_uInt16 nId( m_pToolBar->GetItemId( nPos ) ); if ( nId > 0 ) { @@ -230,7 +230,7 @@ void AddonsToolBarManager::FillToolbar( const Sequence< Sequence< PropertyValue if ( m_bDisposed ) return; - USHORT nId( 1 ); + sal_uInt16 nId( 1 ); RemoveControllers(); @@ -278,7 +278,7 @@ void AddonsToolBarManager::FillToolbar( const Sequence< Sequence< PropertyValue { if ( aURL.equalsAsciiL( TOOLBOXITEM_SEPARATOR_STR, TOOLBOXITEM_SEPARATOR_STR_LEN )) { - USHORT nCount = m_pToolBar->GetItemCount(); + sal_uInt16 nCount = m_pToolBar->GetItemCount(); if ( nCount > 0 && ( m_pToolBar->GetItemType( nCount-1 ) != TOOLBOXITEM_SEPARATOR ) && nElements > 0 ) { nElements = 0; @@ -287,13 +287,13 @@ void AddonsToolBarManager::FillToolbar( const Sequence< Sequence< PropertyValue } else { - USHORT nCount = m_pToolBar->GetItemCount(); + sal_uInt16 nCount = m_pToolBar->GetItemCount(); if ( bAppendSeparator && nCount > 0 && ( m_pToolBar->GetItemType( nCount-1 ) != TOOLBOXITEM_SEPARATOR )) { // We have to append a separator first if the last item is not a separator m_pToolBar->InsertSeparator(); } - bAppendSeparator = FALSE; + bAppendSeparator = sal_False; m_pToolBar->InsertItem( nId, aTitle ); @@ -428,7 +428,7 @@ IMPL_LINK( AddonsToolBarManager, Click, ToolBox*, EMPTYARG ) if ( m_bDisposed ) return 1; - USHORT nId( m_pToolBar->GetCurItemId() ); + sal_uInt16 nId( m_pToolBar->GetCurItemId() ); ToolBarControllerMap::const_iterator pIter = m_aControllerMap.find( nId ); if ( pIter != m_aControllerMap.end() ) { @@ -446,7 +446,7 @@ IMPL_LINK( AddonsToolBarManager, DoubleClick, ToolBox*, EMPTYARG ) if ( m_bDisposed ) return 1; - USHORT nId( m_pToolBar->GetCurItemId() ); + sal_uInt16 nId( m_pToolBar->GetCurItemId() ); ToolBarControllerMap::const_iterator pIter = m_aControllerMap.find( nId ); if ( pIter != m_aControllerMap.end() ) { @@ -475,7 +475,7 @@ IMPL_LINK( AddonsToolBarManager, Select, ToolBox*, EMPTYARG ) return 1; sal_Int16 nKeyModifier( (sal_Int16)m_pToolBar->GetModifier() ); - USHORT nId( m_pToolBar->GetCurItemId() ); + sal_uInt16 nId( m_pToolBar->GetCurItemId() ); ToolBarControllerMap::const_iterator pIter = m_aControllerMap.find( nId ); if ( pIter != m_aControllerMap.end() ) { @@ -521,9 +521,9 @@ IMPL_LINK( AddonsToolBarManager, DataChanged, DataChangedEvent*, pDataChangedEve CheckAndUpdateImages(); } - for ( USHORT nPos = 0; nPos < m_pToolBar->GetItemCount(); ++nPos ) + for ( sal_uInt16 nPos = 0; nPos < m_pToolBar->GetItemCount(); ++nPos ) { - const USHORT nId = m_pToolBar->GetItemId(nPos); + const sal_uInt16 nId = m_pToolBar->GetItemId(nPos); Window* pWindow = m_pToolBar->GetItemWindow( nId ); if ( pWindow ) { diff --git a/framework/source/uielement/addonstoolbarwrapper.cxx b/framework/source/uielement/addonstoolbarwrapper.cxx index ab42096f6143..49e74d12ca1a 100644..100755 --- a/framework/source/uielement/addonstoolbarwrapper.cxx +++ b/framework/source/uielement/addonstoolbarwrapper.cxx @@ -36,7 +36,7 @@ #include <uielement/addonstoolbarwrapper.hxx> #include <threadhelp/resetableguard.hxx> -#include <helper/actiontriggerhelper.hxx> +#include <framework/actiontriggerhelper.hxx> #include <uielement/constitemcontainer.hxx> #include <uielement/rootitemcontainer.hxx> #include <uielement/addonstoolbarmanager.hxx> @@ -140,7 +140,7 @@ void SAL_CALL AddonsToolBarWrapper::initialize( const Sequence< Any >& aArgument Window* pWindow = VCLUnoHelper::GetWindow( xFrame->getContainerWindow() ); if ( pWindow ) { - ULONG nStyles = WB_LINESPACING | WB_BORDER | WB_SCROLL | WB_MOVEABLE | WB_3DLOOK | WB_DOCKABLE | WB_SIZEABLE | WB_CLOSEABLE; + sal_uLong nStyles = WB_LINESPACING | WB_BORDER | WB_SCROLL | WB_MOVEABLE | WB_3DLOOK | WB_DOCKABLE | WB_SIZEABLE | WB_CLOSEABLE; pToolBar = new ToolBar( pWindow, nStyles ); m_xToolBarWindow = VCLUnoHelper::GetInterface( pToolBar ); @@ -157,7 +157,7 @@ void SAL_CALL AddonsToolBarWrapper::initialize( const Sequence< Any >& aArgument // Fill toolbar with container contents pToolBarManager->FillToolbar( m_aConfigData ); pToolBar->SetOutStyle( SvtMiscOptions().GetToolboxStyle() ); - pToolBar->EnableCustomize( TRUE ); + pToolBar->EnableCustomize( sal_True ); ::Size aActSize( pToolBar->GetSizePixel() ); ::Size aSize( pToolBar->CalcWindowSizePixel() ); aSize.Width() = aActSize.Width(); diff --git a/framework/source/uielement/buttontoolbarcontroller.cxx b/framework/source/uielement/buttontoolbarcontroller.cxx index c4d4f7b6c8fc..c4d4f7b6c8fc 100644..100755 --- a/framework/source/uielement/buttontoolbarcontroller.cxx +++ b/framework/source/uielement/buttontoolbarcontroller.cxx diff --git a/framework/source/uielement/comboboxtoolbarcontroller.cxx b/framework/source/uielement/comboboxtoolbarcontroller.cxx index 47300348d993..45520e63b000 100644..100755 --- a/framework/source/uielement/comboboxtoolbarcontroller.cxx +++ b/framework/source/uielement/comboboxtoolbarcontroller.cxx @@ -165,7 +165,7 @@ ComboboxToolbarController::ComboboxToolbarController( const Reference< XMultiServiceFactory >& rServiceManager, const Reference< XFrame >& rFrame, ToolBox* pToolbar, - USHORT nID, + sal_uInt16 nID, sal_Int32 nWidth, const ::rtl::OUString& aCommand ) : ComplexToolbarController( rServiceManager, rFrame, pToolbar, nID, aCommand ) @@ -415,7 +415,7 @@ void ComboboxToolbarController::executeControlCommand( const ::com::sun::star::f com::sun::star::util::Color aColor(0); if ( rControlCommand.Arguments[i].Value >>= aColor ) { - ::Color aBackColor( static_cast< UINT32 >( aColor )); + ::Color aBackColor( static_cast< sal_uInt32 >( aColor )); m_pComboBox->SetControlBackground( aBackColor ); } break; @@ -431,7 +431,7 @@ void ComboboxToolbarController::executeControlCommand( const ::com::sun::star::f com::sun::star::util::Color aColor(0); if ( rControlCommand.Arguments[i].Value >>= aColor ) { - ::Color aForeColor( static_cast< UINT32 >( aColor )); + ::Color aForeColor( static_cast< sal_uInt32 >( aColor )); m_pComboBox->SetControlForeground( aForeColor ); } break; diff --git a/framework/source/uielement/complextoolbarcontroller.cxx b/framework/source/uielement/complextoolbarcontroller.cxx index f1d6291531da..b52e4cd66f1c 100644..100755 --- a/framework/source/uielement/complextoolbarcontroller.cxx +++ b/framework/source/uielement/complextoolbarcontroller.cxx @@ -77,7 +77,7 @@ ComplexToolbarController::ComplexToolbarController( const Reference< XMultiServiceFactory >& rServiceManager, const Reference< XFrame >& rFrame, ToolBox* pToolbar, - USHORT nID, + sal_uInt16 nID, const ::rtl::OUString& aCommand ) : svt::ToolboxController( rServiceManager, rFrame, aCommand ) , m_pToolbar( pToolbar ) @@ -180,7 +180,7 @@ throw ( RuntimeException ) { m_pToolbar->EnableItem( m_nID, Event.IsEnabled ); - USHORT nItemBits = m_pToolbar->GetItemBits( m_nID ); + sal_uInt16 nItemBits = m_pToolbar->GetItemBits( m_nID ); nItemBits &= ~TIB_CHECKABLE; TriState eTri = STATE_NOCHECK; @@ -194,7 +194,7 @@ throw ( RuntimeException ) { // Boolean, treat it as checked/unchecked if ( m_bMadeInvisible ) - m_pToolbar->ShowItem( m_nID, TRUE ); + m_pToolbar->ShowItem( m_nID, sal_True ); m_pToolbar->CheckItem( m_nID, bValue ); if ( bValue ) eTri = STATE_CHECK; @@ -207,14 +207,14 @@ throw ( RuntimeException ) m_pToolbar->SetQuickHelpText( m_nID, aText ); if ( m_bMadeInvisible ) - m_pToolbar->ShowItem( m_nID, TRUE ); + m_pToolbar->ShowItem( m_nID, sal_True ); } else if ( Event.State >>= aItemState ) { eTri = STATE_DONTKNOW; nItemBits |= TIB_CHECKABLE; if ( m_bMadeInvisible ) - m_pToolbar->ShowItem( m_nID, TRUE ); + m_pToolbar->ShowItem( m_nID, sal_True ); } else if ( Event.State >>= aItemVisibility ) { @@ -225,11 +225,11 @@ throw ( RuntimeException ) { executeControlCommand( aControlCommand ); if ( m_bMadeInvisible ) - m_pToolbar->ShowItem( m_nID, TRUE ); + m_pToolbar->ShowItem( m_nID, sal_True ); } else if ( m_bMadeInvisible ) - m_pToolbar->ShowItem( m_nID, TRUE ); + m_pToolbar->ShowItem( m_nID, sal_True ); m_pToolbar->SetItemState( m_nID, eTri ); m_pToolbar->SetItemBits( m_nID, nItemBits ); diff --git a/framework/source/uielement/constitemcontainer.cxx b/framework/source/uielement/constitemcontainer.cxx deleted file mode 100644 index c90d0580ea1b..000000000000 --- a/framework/source/uielement/constitemcontainer.cxx +++ /dev/null @@ -1,481 +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_framework.hxx" -//_________________________________________________________________________________________________________________ -// my own includes -//_________________________________________________________________________________________________________________ -#include <uielement/constitemcontainer.hxx> -#include <uielement/rootitemcontainer.hxx> -#include <uielement/itemcontainer.hxx> -#include <threadhelp/resetableguard.hxx> - -//_________________________________________________________________________________________________________________ -// interface includes -//_________________________________________________________________________________________________________________ -#include <com/sun/star/beans/PropertyAttribute.hpp> - -//_________________________________________________________________________________________________________________ -// other includes -//_________________________________________________________________________________________________________________ -#include <cppuhelper/implbase1.hxx> - -using namespace cppu; -using namespace com::sun::star::uno; -using namespace com::sun::star::lang; -using namespace com::sun::star::beans; -using namespace com::sun::star::container; - -const char WRONG_TYPE_EXCEPTION[] = "Type must be com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >"; - -const int PROPHANDLE_UINAME = 1; -const int PROPCOUNT = 1; -const rtl::OUString PROPNAME_UINAME( RTL_CONSTASCII_USTRINGPARAM( "UIName" )); - -namespace framework -{ - -/** - * The class which implements the PropertySetInfo interface. - */ -extern "C" -{ -static int SAL_CALL compare_OUString_Property_Impl( const void *arg1, const void *arg2 ) SAL_THROW( () ) -{ - return ((::rtl::OUString *)arg1)->compareTo( ((Property *)arg2)->Name ); -} -} - -class OPropertySetHelperInfo_Impl - : public WeakImplHelper1< ::com::sun::star::beans::XPropertySetInfo > -{ - Sequence < Property > aInfos; - -public: - OPropertySetHelperInfo_Impl( IPropertyArrayHelper & rHelper_ ) SAL_THROW( () ); - - // XPropertySetInfo-Methoden - virtual Sequence< Property > SAL_CALL getProperties(void) throw(::com::sun::star::uno::RuntimeException); - virtual Property SAL_CALL getPropertyByName(const ::rtl::OUString& PropertyName) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL hasPropertyByName(const ::rtl::OUString& PropertyName) throw(::com::sun::star::uno::RuntimeException); -}; - - -/** - * Create an object that implements XPropertySetInfo IPropertyArrayHelper. - */ -OPropertySetHelperInfo_Impl::OPropertySetHelperInfo_Impl( - IPropertyArrayHelper & rHelper_ ) - SAL_THROW( () ) - :aInfos( rHelper_.getProperties() ) -{ -} - -/** - * Return the sequence of properties, which are provided throug the constructor. - */ -Sequence< Property > OPropertySetHelperInfo_Impl::getProperties(void) throw(::com::sun::star::uno::RuntimeException) -{ - return aInfos; -} - -/** - * Return the sequence of properties, which are provided throug the constructor. - */ -Property OPropertySetHelperInfo_Impl::getPropertyByName( const ::rtl::OUString & PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException) -{ - Property * pR; - pR = (Property *)bsearch( &PropertyName, aInfos.getConstArray(), aInfos.getLength(), - sizeof( Property ), - compare_OUString_Property_Impl ); - if( !pR ) { - throw UnknownPropertyException(); - } - - return *pR; -} - -/** - * Return the sequence of properties, which are provided throug the constructor. - */ -sal_Bool OPropertySetHelperInfo_Impl::hasPropertyByName( const ::rtl::OUString & PropertyName ) throw(::com::sun::star::uno::RuntimeException) -{ - Property * pR; - pR = (Property *)bsearch( &PropertyName, aInfos.getConstArray(), aInfos.getLength(), - sizeof( Property ), - compare_OUString_Property_Impl ); - return pR != NULL; -} - -//***************************************************************************************************************** -// XInterface, XTypeProvider -//***************************************************************************************************************** -DEFINE_XINTERFACE_6 ( ConstItemContainer , - OWeakObject , - DIRECT_INTERFACE( ::com::sun::star::lang::XTypeProvider ), - DIRECT_INTERFACE( ::com::sun::star::container::XElementAccess ), - DIRECT_INTERFACE( ::com::sun::star::container::XIndexAccess ), - DIRECT_INTERFACE( ::com::sun::star::beans::XFastPropertySet ), - DIRECT_INTERFACE( ::com::sun::star::beans::XPropertySet ), - DIRECT_INTERFACE( ::com::sun::star::lang::XUnoTunnel ) - ) - -DEFINE_XTYPEPROVIDER_6 ( ConstItemContainer , - ::com::sun::star::lang::XTypeProvider , - ::com::sun::star::container::XIndexAccess , - ::com::sun::star::container::XElementAccess , - ::com::sun::star::beans::XFastPropertySet , - ::com::sun::star::beans::XPropertySet , - ::com::sun::star::lang::XUnoTunnel - ) - -ConstItemContainer::ConstItemContainer() : ::cppu::OWeakObject() -{ -} - -ConstItemContainer::ConstItemContainer( const RootItemContainer& rRootItemContainer, sal_Bool bFastCopy ) -{ - ShareGuard( rRootItemContainer.m_aShareMutex ); - - // If bFastCopy is set the onwer of the root item container will transfer ownership to us. So - // it is possible to copy only the root part. - m_aUIName = rRootItemContainer.m_aUIName; - if ( bFastCopy ) - m_aItemVector = rRootItemContainer.m_aItemVector; - else - copyItemContainer( rRootItemContainer.m_aItemVector ); -} - -ConstItemContainer::ConstItemContainer( const ItemContainer& rItemContainer ) -{ - ShareGuard( rItemContainer.m_aShareMutex ); - copyItemContainer( rItemContainer.m_aItemVector ); -} - -ConstItemContainer::ConstItemContainer( const Reference< XIndexAccess >& rSourceContainer, sal_Bool bFastCopy ) -{ - // We also have to copy the UIName property - try - { - Reference< XPropertySet > xPropSet( rSourceContainer, UNO_QUERY ); - if ( xPropSet.is() ) - { - rtl::OUString aUIName; - xPropSet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "UIName" ))) >>= m_aUIName; - } - } - catch ( Exception& ) - { - } - - if ( rSourceContainer.is() ) - { - try - { - sal_Int32 nCount = rSourceContainer->getCount(); - m_aItemVector.reserve(nCount); - if ( bFastCopy ) - { - for ( sal_Int32 i = 0; i < nCount; i++ ) - { - Sequence< PropertyValue > aPropSeq; - if ( rSourceContainer->getByIndex( i ) >>= aPropSeq ) - m_aItemVector.push_back( aPropSeq ); - } - } - else - { - for ( sal_Int32 i = 0; i < nCount; i++ ) - { - Sequence< PropertyValue > aPropSeq; - if ( rSourceContainer->getByIndex( i ) >>= aPropSeq ) - { - sal_Int32 nContainerIndex = -1; - Reference< XIndexAccess > xIndexAccess; - for ( sal_Int32 j = 0; j < aPropSeq.getLength(); j++ ) - { - if ( aPropSeq[j].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ItemDescriptorContainer" ) )) - { - aPropSeq[j].Value >>= xIndexAccess; - nContainerIndex = j; - break; - } - } - - if ( xIndexAccess.is() && nContainerIndex >= 0 ) - aPropSeq[nContainerIndex].Value <<= deepCopyContainer( xIndexAccess ); - - m_aItemVector.push_back( aPropSeq ); - } - } - } - } - catch ( IndexOutOfBoundsException& ) - { - } - } -} - -ConstItemContainer::~ConstItemContainer() -{ -} - -// private -void ConstItemContainer::copyItemContainer( const std::vector< Sequence< PropertyValue > >& rSourceVector ) -{ - const sal_uInt32 nCount = rSourceVector.size(); - for ( sal_uInt32 i = 0; i < nCount; i++ ) - { - sal_Int32 nContainerIndex = -1; - Sequence< PropertyValue > aPropSeq( rSourceVector[i] ); - Reference< XIndexAccess > xIndexAccess; - for ( sal_Int32 j = 0; j < aPropSeq.getLength(); j++ ) - { - if ( aPropSeq[j].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ItemDescriptorContainer" ) )) - { - aPropSeq[j].Value >>= xIndexAccess; - nContainerIndex = j; - break; - } - } - - if ( xIndexAccess.is() && nContainerIndex >= 0 ) - aPropSeq[nContainerIndex].Value <<= deepCopyContainer( xIndexAccess ); - - m_aItemVector.push_back( aPropSeq ); - } -} - -Reference< XIndexAccess > ConstItemContainer::deepCopyContainer( const Reference< XIndexAccess >& rSubContainer ) -{ - Reference< XIndexAccess > xReturn; - if ( rSubContainer.is() ) - { - ItemContainer* pSource = ItemContainer::GetImplementation( rSubContainer ); - ConstItemContainer* pSubContainer( 0 ); - if ( pSource ) - pSubContainer = new ConstItemContainer( *pSource ); - else - pSubContainer = new ConstItemContainer( rSubContainer ); - xReturn = Reference< XIndexAccess >( static_cast< OWeakObject* >( pSubContainer ), UNO_QUERY ); - } - - return xReturn; -} - -// XUnoTunnel -sal_Int64 ConstItemContainer::getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& rIdentifier ) throw(::com::sun::star::uno::RuntimeException) -{ - if( ( rIdentifier.getLength() == 16 ) && ( 0 == rtl_compareMemory( ConstItemContainer::GetUnoTunnelId().getConstArray(), rIdentifier.getConstArray(), 16 ) ) ) - { - return reinterpret_cast< sal_Int64 >( this ); - } - return 0; -} - -const Sequence< sal_Int8 >& ConstItemContainer::GetUnoTunnelId() throw() -{ - static ::com::sun::star::uno::Sequence< sal_Int8 > * pSeq = NULL; - if( !pSeq ) - { - ::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() ); - if( !pSeq ) - { - static ::com::sun::star::uno::Sequence< sal_Int8 > aSeq( 16 ); - rtl_createUuid( (sal_uInt8*)aSeq.getArray(), 0, sal_True ); - pSeq = &aSeq; - } - } - return *pSeq; -} - -ConstItemContainer* ConstItemContainer::GetImplementation( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rxIFace ) throw() -{ - ::com::sun::star::uno::Reference< ::com::sun::star::lang::XUnoTunnel > xUT( rxIFace, ::com::sun::star::uno::UNO_QUERY ); - return xUT.is() ? reinterpret_cast< ConstItemContainer* >(sal::static_int_cast< sal_IntPtr >( - xUT->getSomething( ConstItemContainer::GetUnoTunnelId() ))) : NULL; -} - -// XElementAccess -sal_Bool SAL_CALL ConstItemContainer::hasElements() -throw ( RuntimeException ) -{ - return ( !m_aItemVector.empty() ); -} - -// XIndexAccess -sal_Int32 SAL_CALL ConstItemContainer::getCount() -throw ( RuntimeException ) -{ - return m_aItemVector.size(); -} - -Any SAL_CALL ConstItemContainer::getByIndex( sal_Int32 Index ) -throw ( IndexOutOfBoundsException, WrappedTargetException, RuntimeException ) -{ - if ( sal_Int32( m_aItemVector.size()) > Index ) - return makeAny( m_aItemVector[Index] ); - else - throw IndexOutOfBoundsException( ::rtl::OUString(), (OWeakObject *)this ); -} - -// XPropertySet -Reference< XPropertySetInfo > SAL_CALL ConstItemContainer::getPropertySetInfo() -throw (::com::sun::star::uno::RuntimeException) -{ - // Optimize this method ! - // We initialize a static variable only one time. And we don't must use a mutex at every call! - // For the first call; pInfo is NULL - for the second call pInfo is different from NULL! - static Reference< XPropertySetInfo >* pInfo = NULL; - - if( pInfo == NULL ) - { - // Ready for multithreading - osl::MutexGuard aGuard( osl::Mutex::getGlobalMutex() ) ; - // Control this pointer again, another instance can be faster then these! - if( pInfo == NULL ) - { - // Create structure of propertysetinfo for baseclass "OPropertySetHelper". - // (Use method "getInfoHelper()".) - static Reference< XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) ); - pInfo = &xInfo; - } - } - - return (*pInfo); -} - -void SAL_CALL ConstItemContainer::setPropertyValue( const ::rtl::OUString&, const Any& ) -throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) -{ -} - -Any SAL_CALL ConstItemContainer::getPropertyValue( const ::rtl::OUString& PropertyName ) -throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) -{ - if ( PropertyName.equals( PROPNAME_UINAME )) - return makeAny( m_aUIName ); - - throw UnknownPropertyException(); -} - -void SAL_CALL ConstItemContainer::addPropertyChangeListener( const ::rtl::OUString&, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& ) -throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) -{ -} - -void SAL_CALL ConstItemContainer::removePropertyChangeListener( const ::rtl::OUString&, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& ) -throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) -{ - // Only read-only properties - do nothing -} - -void SAL_CALL ConstItemContainer::addVetoableChangeListener( const ::rtl::OUString&, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& ) -throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) -{ - // Only read-only properties - do nothing -} - -void SAL_CALL ConstItemContainer::removeVetoableChangeListener( const ::rtl::OUString&, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& ) -throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) -{ - // Only read-only properties - do nothing -} - -// XFastPropertySet -void SAL_CALL ConstItemContainer::setFastPropertyValue( sal_Int32, const ::com::sun::star::uno::Any& ) -throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) -{ -} - -Any SAL_CALL ConstItemContainer::getFastPropertyValue( sal_Int32 nHandle ) -throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) -{ - if ( nHandle == PROPHANDLE_UINAME ) - return makeAny( m_aUIName ); - - throw UnknownPropertyException(); -} - -::cppu::IPropertyArrayHelper& SAL_CALL ConstItemContainer::getInfoHelper() -{ - // Optimize this method ! - // We initialize a static variable only one time. And we don't must use a mutex at every call! - // For the first call; pInfoHelper is NULL - for the second call pInfoHelper is different from NULL! - static ::cppu::OPropertyArrayHelper* pInfoHelper = NULL; - - if( pInfoHelper == NULL ) - { - // Ready for multithreading - osl::MutexGuard aGuard( osl::Mutex::getGlobalMutex() ) ; - - // Control this pointer again, another instance can be faster then these! - if( pInfoHelper == NULL ) - { - // Define static member to give structure of properties to baseclass "OPropertySetHelper". - // "impl_getStaticPropertyDescriptor" is a non exported and static funtion, who will define a static propertytable. - // "sal_True" say: Table is sorted by name. - static ::cppu::OPropertyArrayHelper aInfoHelper( impl_getStaticPropertyDescriptor(), sal_True ); - pInfoHelper = &aInfoHelper; - } - } - - return(*pInfoHelper); -} - -const com::sun::star::uno::Sequence< com::sun::star::beans::Property > ConstItemContainer::impl_getStaticPropertyDescriptor() -{ - // Create a new static property array to initialize sequence! - // Table of all predefined properties of this class. Its used from OPropertySetHelper-class! - // Don't forget to change the defines (see begin of this file), if you add, change or delete a property in this list!!! - // It's necessary for methods of OPropertySetHelper. - // ATTENTION: - // YOU MUST SORT FOLLOW TABLE BY NAME ALPHABETICAL !!! - - static const com::sun::star::beans::Property pProperties[] = - { - com::sun::star::beans::Property( PROPNAME_UINAME, PROPHANDLE_UINAME , - ::getCppuType((const rtl::OUString*)NULL), - com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY ) - }; - // Use it to initialize sequence! - static const com::sun::star::uno::Sequence< com::sun::star::beans::Property > lPropertyDescriptor( pProperties, PROPCOUNT ); - // Return static "PropertyDescriptor" - return lPropertyDescriptor; -} - -Reference < XPropertySetInfo > ConstItemContainer::createPropertySetInfo( - IPropertyArrayHelper & rProperties ) SAL_THROW( () ) -{ - return static_cast< XPropertySetInfo * >( new OPropertySetHelperInfo_Impl( rProperties ) ); -} - -} // namespace framework - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/framework/source/uielement/controlmenucontroller.cxx b/framework/source/uielement/controlmenucontroller.cxx index 82674e30a896..4804c60bcf67 100644..100755 --- a/framework/source/uielement/controlmenucontroller.cxx +++ b/framework/source/uielement/controlmenucontroller.cxx @@ -287,7 +287,7 @@ void SAL_CALL ControlMenuController::statusChanged( const FeatureStateEvent& Eve { osl::ResettableMutexGuard aLock( m_aMutex ); - USHORT nMenuId = 0; + sal_uInt16 nMenuId = 0; for (sal_uInt32 i=0; i < SAL_N_ELEMENTS(aCommands); ++i) { if ( Event.FeatureURL.Complete.equalsAscii( aCommands[i] )) diff --git a/framework/source/uielement/dropdownboxtoolbarcontroller.cxx b/framework/source/uielement/dropdownboxtoolbarcontroller.cxx index cb1fa6cc9e4e..06c0c51e1ec7 100644..100755 --- a/framework/source/uielement/dropdownboxtoolbarcontroller.cxx +++ b/framework/source/uielement/dropdownboxtoolbarcontroller.cxx @@ -147,7 +147,7 @@ DropdownToolbarController::DropdownToolbarController( const Reference< XMultiServiceFactory >& rServiceManager, const Reference< XFrame >& rFrame, ToolBox* pToolbar, - USHORT nID, + sal_uInt16 nID, sal_Int32 nWidth, const ::rtl::OUString& aCommand ) : ComplexToolbarController( rServiceManager, rFrame, pToolbar, nID, aCommand ) diff --git a/framework/source/uielement/edittoolbarcontroller.cxx b/framework/source/uielement/edittoolbarcontroller.cxx index 2b9a6b811467..79039f8a3ce6 100644..100755 --- a/framework/source/uielement/edittoolbarcontroller.cxx +++ b/framework/source/uielement/edittoolbarcontroller.cxx @@ -146,7 +146,7 @@ EditToolbarController::EditToolbarController( const Reference< XMultiServiceFactory >& rServiceManager, const Reference< XFrame >& rFrame, ToolBox* pToolbar, - USHORT nID, + sal_uInt16 nID, sal_Int32 nWidth, const ::rtl::OUString& aCommand ) : ComplexToolbarController( rServiceManager, rFrame, pToolbar, nID, aCommand ) diff --git a/framework/source/uielement/fontmenucontroller.cxx b/framework/source/uielement/fontmenucontroller.cxx index 3e9df2b5ae46..c09950565e0a 100644..100755 --- a/framework/source/uielement/fontmenucontroller.cxx +++ b/framework/source/uielement/fontmenucontroller.cxx @@ -114,7 +114,7 @@ void FontMenuController::fillPopupMenu( const Sequence< ::rtl::OUString >& rFont { vector<rtl::OUString> aVector; aVector.reserve(rFontNameSeq.getLength()); - for ( USHORT i = 0; i < rFontNameSeq.getLength(); i++ ) + for ( sal_uInt16 i = 0; i < rFontNameSeq.getLength(); i++ ) { aVector.push_back(MnemonicGenerator::EraseAllMnemonicChars(pFontNameArray[i])); } @@ -195,12 +195,12 @@ void SAL_CALL FontMenuController::activate( const css::awt::MenuEvent& ) throw ( if ( m_xPopupMenu.is() ) { // find new font name and set check mark! - USHORT nChecked = 0; - USHORT nItemCount = m_xPopupMenu->getItemCount(); + sal_uInt16 nChecked = 0; + sal_uInt16 nItemCount = m_xPopupMenu->getItemCount(); rtl::OUString aEmpty; - for( USHORT i = 0; i < nItemCount; i++ ) + for( sal_uInt16 i = 0; i < nItemCount; i++ ) { - USHORT nItemId = m_xPopupMenu->getItemId( i ); + sal_uInt16 nItemId = m_xPopupMenu->getItemId( i ); if ( m_xPopupMenu->isItemChecked( nItemId ) ) nChecked = nItemId; diff --git a/framework/source/uielement/fontsizemenucontroller.cxx b/framework/source/uielement/fontsizemenucontroller.cxx index 08b370ca796b..e27aab595185 100644..100755 --- a/framework/source/uielement/fontsizemenucontroller.cxx +++ b/framework/source/uielement/fontsizemenucontroller.cxx @@ -50,7 +50,7 @@ //_________________________________________________________________________________________________________________ #include <vcl/menu.hxx> -#include <vcl/mapunit.hxx> +#include <tools/mapunit.hxx> #include <vcl/svapp.hxx> #include <vcl/i18nhelp.hxx> #include <vcl/outdev.hxx> @@ -128,16 +128,16 @@ rtl::OUString FontSizeMenuController::retrievePrinterName( com::sun::star::uno:: void FontSizeMenuController::setCurHeight( long nHeight, Reference< css::awt::XPopupMenu >& rPopupMenu ) { // check menu item - rtl::OUString aHeight = Application::GetSettings().GetUILocaleI18nHelper().GetNum( nHeight, 1, TRUE, FALSE ); - USHORT nChecked = 0; - USHORT nItemCount = rPopupMenu->getItemCount(); - for( USHORT i = 0; i < nItemCount; i++ ) + rtl::OUString aHeight = Application::GetSettings().GetUILocaleI18nHelper().GetNum( nHeight, 1, sal_True, sal_False ); + sal_uInt16 nChecked = 0; + sal_uInt16 nItemCount = rPopupMenu->getItemCount(); + for( sal_uInt16 i = 0; i < nItemCount; i++ ) { - USHORT nItemId = rPopupMenu->getItemId( i ); + sal_uInt16 nItemId = rPopupMenu->getItemId( i ); if ( m_pHeightArray[i] == nHeight ) { - rPopupMenu->checkItem( nItemId, TRUE ); + rPopupMenu->checkItem( nItemId, sal_True ); return; } @@ -146,7 +146,7 @@ void FontSizeMenuController::setCurHeight( long nHeight, Reference< css::awt::XP } if ( nChecked ) - rPopupMenu->checkItem( nChecked, FALSE ); + rPopupMenu->checkItem( nChecked, sal_False ); } // private function @@ -188,11 +188,11 @@ void FontSizeMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r const long* pTempAry; const long* pAry = pFontList->GetSizeAry( aFntInfo ); - USHORT nSizeCount = 0; + sal_uInt16 nSizeCount = 0; while ( pAry[nSizeCount] ) nSizeCount++; - USHORT nPos = 0; + sal_uInt16 nPos = 0; const rtl::OUString aFontHeightCommand( RTL_CONSTASCII_USTRINGPARAM( ".uno:FontHeight?FontHeight.Height:float=" )); // first insert font size names (for simplified/traditional chinese) @@ -207,8 +207,8 @@ void FontSizeMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r if ( pAry == pFontList->GetStdSizeAry() ) { // for scalable fonts all font size names - ULONG nCount = aFontSizeNames.Count(); - for( ULONG i = 0; i < nCount; i++ ) + sal_uLong nCount = aFontSizeNames.Count(); + for( sal_uLong i = 0; i < nCount; i++ ) { String aSizeName = aFontSizeNames.GetIndexName( i ); long nSize = aFontSizeNames.GetIndexSize( i ); @@ -252,7 +252,7 @@ void FontSizeMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r { m_pHeightArray[nPos] = *pTempAry; nPos++; // Id is nPos+1 - pVCLPopupMenu->InsertItem( nPos, rI18nHelper.GetNum( *pTempAry, 1, TRUE, FALSE ), MIB_RADIOCHECK | MIB_AUTOCHECK ); + pVCLPopupMenu->InsertItem( nPos, rI18nHelper.GetNum( *pTempAry, 1, sal_True, sal_False ), MIB_RADIOCHECK | MIB_AUTOCHECK ); fPoint = float( m_pHeightArray[nPos-1] ) / 10; // Create dispatchable .uno command and set it diff --git a/framework/source/uielement/footermenucontroller.cxx b/framework/source/uielement/footermenucontroller.cxx index 6526296ace62..6526296ace62 100644..100755 --- a/framework/source/uielement/footermenucontroller.cxx +++ b/framework/source/uielement/footermenucontroller.cxx diff --git a/framework/source/uielement/generictoolbarcontroller.cxx b/framework/source/uielement/generictoolbarcontroller.cxx index 18a0a772dd86..6270dd0c82c5 100644..100755 --- a/framework/source/uielement/generictoolbarcontroller.cxx +++ b/framework/source/uielement/generictoolbarcontroller.cxx @@ -60,7 +60,7 @@ #include <classes/fwkresid.hxx> #include <dispatch/uieventloghelper.hxx> -#include <xml/menuconfiguration.hxx> +#include <framework/menuconfiguration.hxx> #include <uielement/menubarmanager.hxx> using namespace ::com::sun::star::awt; @@ -125,7 +125,7 @@ struct ExecuteInfo GenericToolbarController::GenericToolbarController( const Reference< XMultiServiceFactory >& rServiceManager, const Reference< XFrame >& rFrame, ToolBox* pToolbar, - USHORT nID, + sal_uInt16 nID, const ::rtl::OUString& aCommand ) : svt::ToolboxController( rServiceManager, rFrame, aCommand ) , m_pToolbar( pToolbar ) @@ -217,7 +217,7 @@ throw ( RuntimeException ) { m_pToolbar->EnableItem( m_nID, Event.IsEnabled ); - USHORT nItemBits = m_pToolbar->GetItemBits( m_nID ); + sal_uInt16 nItemBits = m_pToolbar->GetItemBits( m_nID ); nItemBits &= ~TIB_CHECKABLE; TriState eTri = STATE_NOCHECK; @@ -230,7 +230,7 @@ throw ( RuntimeException ) { // Boolean, treat it as checked/unchecked if ( m_bMadeInvisible ) - m_pToolbar->ShowItem( m_nID, TRUE ); + m_pToolbar->ShowItem( m_nID, sal_True ); m_pToolbar->CheckItem( m_nID, bValue ); if ( bValue ) eTri = STATE_CHECK; @@ -281,14 +281,14 @@ throw ( RuntimeException ) } if ( m_bMadeInvisible ) - m_pToolbar->ShowItem( m_nID, TRUE ); + m_pToolbar->ShowItem( m_nID, sal_True ); } else if (( Event.State >>= aItemState ) && !m_bEnumCommand ) { eTri = STATE_DONTKNOW; nItemBits |= TIB_CHECKABLE; if ( m_bMadeInvisible ) - m_pToolbar->ShowItem( m_nID, TRUE ); + m_pToolbar->ShowItem( m_nID, sal_True ); } else if ( Event.State >>= aItemVisibility ) { @@ -296,7 +296,7 @@ throw ( RuntimeException ) m_bMadeInvisible = !aItemVisibility.bVisible; } else if ( m_bMadeInvisible ) - m_pToolbar->ShowItem( m_nID, TRUE ); + m_pToolbar->ShowItem( m_nID, sal_True ); m_pToolbar->SetItemState( m_nID, eTri ); m_pToolbar->SetItemBits( m_nID, nItemBits ); @@ -322,7 +322,7 @@ IMPL_STATIC_LINK_NOINSTANCE( GenericToolbarController, ExecuteHdl_Impl, ExecuteI return 0; } -MenuToolbarController::MenuToolbarController( const Reference< XMultiServiceFactory >& rServiceManager, const Reference< XFrame >& rFrame, ToolBox* pToolBar, USHORT nID, const rtl::OUString& aCommand, const rtl::OUString& aModuleIdentifier, const Reference< XIndexAccess >& xMenuDesc ) : GenericToolbarController( rServiceManager, rFrame, pToolBar, nID, aCommand ), m_xMenuDesc( xMenuDesc ), pMenu( NULL ), m_aModuleIdentifier( aModuleIdentifier ) +MenuToolbarController::MenuToolbarController( const Reference< XMultiServiceFactory >& rServiceManager, const Reference< XFrame >& rFrame, ToolBox* pToolBar, sal_uInt16 nID, const rtl::OUString& aCommand, const rtl::OUString& aModuleIdentifier, const Reference< XIndexAccess >& xMenuDesc ) : GenericToolbarController( rServiceManager, rFrame, pToolBar, nID, aCommand ), m_xMenuDesc( xMenuDesc ), pMenu( NULL ), m_aModuleIdentifier( aModuleIdentifier ) { } diff --git a/framework/source/uielement/headermenucontroller.cxx b/framework/source/uielement/headermenucontroller.cxx index 642dcf3cd5fb..24329418595a 100644..100755 --- a/framework/source/uielement/headermenucontroller.cxx +++ b/framework/source/uielement/headermenucontroller.cxx @@ -79,7 +79,7 @@ using namespace com::sun::star::container; //#define RID_SW_SHELLRES (RID_SW_START + 1250 + 1) //#define STR_ALLPAGE_HEADFOOT 14 -const USHORT ALL_MENUITEM_ID = 1; +const sal_uInt16 ALL_MENUITEM_ID = 1; namespace framework { @@ -136,8 +136,8 @@ void HeaderMenuController::fillPopupMenu( const Reference< ::com::sun::star::fra { Sequence< rtl::OUString > aSeqNames = xNameContainer->getElementNames(); - USHORT nId = 2; - USHORT nCount = 0; + sal_uInt16 nId = 2; + sal_uInt16 nCount = 0; sal_Bool bAllOneState( sal_True ); sal_Bool bLastCheck( sal_True ); sal_Bool bFirstChecked( sal_False ); @@ -180,7 +180,7 @@ void HeaderMenuController::fillPopupMenu( const Reference< ::com::sun::star::fra // Check if all entries have the same state if( bAllOneState && n && bHeaderIsOn != bLastCheck ) - bAllOneState = FALSE; + bAllOneState = sal_False; bLastCheck = bHeaderIsOn; ++nCount; } diff --git a/framework/source/uielement/imagebuttontoolbarcontroller.cxx b/framework/source/uielement/imagebuttontoolbarcontroller.cxx index 705dc9020b32..16d4317c2932 100644..100755 --- a/framework/source/uielement/imagebuttontoolbarcontroller.cxx +++ b/framework/source/uielement/imagebuttontoolbarcontroller.cxx @@ -34,7 +34,7 @@ //_________________________________________________________________________________________________________________ // my own includes //_________________________________________________________________________________________________________________ -#include <classes/addonsoptions.hxx> +#include <framework/addonsoptions.hxx> #include "uielement/toolbar.hxx" //_________________________________________________________________________________________________________________ @@ -131,7 +131,7 @@ ImageButtonToolbarController::ImageButtonToolbarController( const Reference< XMultiServiceFactory >& rServiceManager, const Reference< XFrame >& rFrame, ToolBox* pToolbar, - USHORT nID, + sal_uInt16 nID, const ::rtl::OUString& aCommand ) : ComplexToolbarController( rServiceManager, rFrame, pToolbar, nID, aCommand ) { diff --git a/framework/source/uielement/itemcontainer.cxx b/framework/source/uielement/itemcontainer.cxx deleted file mode 100644 index dca5d23da86d..000000000000 --- a/framework/source/uielement/itemcontainer.cxx +++ /dev/null @@ -1,268 +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_framework.hxx" -//_________________________________________________________________________________________________________________ -// my own includes -//_________________________________________________________________________________________________________________ -#include <uielement/itemcontainer.hxx> -#include <uielement/constitemcontainer.hxx> -#include <threadhelp/resetableguard.hxx> - -//_________________________________________________________________________________________________________________ -// other includes -//_________________________________________________________________________________________________________________ - -using namespace cppu; -using namespace com::sun::star::uno; -using namespace com::sun::star::lang; -using namespace com::sun::star::beans; -using namespace com::sun::star::container; - -const char WRONG_TYPE_EXCEPTION[] = "Type must be com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >"; - -namespace framework -{ - -//***************************************************************************************************************** -// XInterface, XTypeProvider -//***************************************************************************************************************** - -ItemContainer::ItemContainer( const ShareableMutex& rMutex ) : - m_aShareMutex( rMutex ) -{ -} - - -ItemContainer::ItemContainer( const ConstItemContainer& rConstItemContainer, const ShareableMutex& rMutex ) : m_aShareMutex( rMutex ) -{ - copyItemContainer( rConstItemContainer.m_aItemVector, rMutex ); -} - -ItemContainer::ItemContainer( const Reference< XIndexAccess >& rSourceContainer, const ShareableMutex& rMutex ) : - m_aShareMutex( rMutex ) -{ - if ( rSourceContainer.is() ) - { - sal_Int32 nCount = rSourceContainer->getCount(); - try - { - for ( sal_Int32 i = 0; i < nCount; i++ ) - { - Sequence< PropertyValue > aPropSeq; - if ( rSourceContainer->getByIndex( i ) >>= aPropSeq ) - { - sal_Int32 nContainerIndex = -1; - Reference< XIndexAccess > xIndexAccess; - for ( sal_Int32 j = 0; j < aPropSeq.getLength(); j++ ) - { - if ( aPropSeq[j].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ItemDescriptorContainer" ) )) - { - aPropSeq[j].Value >>= xIndexAccess; - nContainerIndex = j; - break; - } - } - - if ( xIndexAccess.is() && nContainerIndex >= 0 ) - aPropSeq[nContainerIndex].Value <<= deepCopyContainer( xIndexAccess, rMutex ); - - m_aItemVector.push_back( aPropSeq ); - } - } - } - catch ( IndexOutOfBoundsException& ) - { - } - } -} - -ItemContainer::~ItemContainer() -{ -} - -// private -void ItemContainer::copyItemContainer( const std::vector< Sequence< PropertyValue > >& rSourceVector, const ShareableMutex& rMutex ) -{ - const sal_uInt32 nCount = rSourceVector.size(); - for ( sal_uInt32 i = 0; i < nCount; ++i ) - { - sal_Int32 nContainerIndex = -1; - Sequence< PropertyValue > aPropSeq( rSourceVector[i] ); - Reference< XIndexAccess > xIndexAccess; - for ( sal_Int32 j = 0; j < aPropSeq.getLength(); j++ ) - { - if ( aPropSeq[j].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ItemDescriptorContainer" ) )) - { - aPropSeq[j].Value >>= xIndexAccess; - nContainerIndex = j; - break; - } - } - - if ( xIndexAccess.is() && nContainerIndex >= 0 ) - aPropSeq[nContainerIndex].Value <<= deepCopyContainer( xIndexAccess, rMutex ); - - m_aItemVector.push_back( aPropSeq ); - } -} - -Reference< XIndexAccess > ItemContainer::deepCopyContainer( const Reference< XIndexAccess >& rSubContainer, const ShareableMutex& rMutex ) -{ - Reference< XIndexAccess > xReturn; - if ( rSubContainer.is() ) - { - ConstItemContainer* pSource = ConstItemContainer::GetImplementation( rSubContainer ); - ItemContainer* pSubContainer( 0 ); - if ( pSource ) - pSubContainer = new ItemContainer( *pSource, rMutex ); - else - pSubContainer = new ItemContainer( rSubContainer, rMutex ); - xReturn = Reference< XIndexAccess >( static_cast< OWeakObject* >( pSubContainer ), UNO_QUERY ); - } - - return xReturn; -} - -// XUnoTunnel -sal_Int64 ItemContainer::getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& rIdentifier ) throw(::com::sun::star::uno::RuntimeException) -{ - if( ( rIdentifier.getLength() == 16 ) && ( 0 == rtl_compareMemory( ItemContainer::GetUnoTunnelId().getConstArray(), rIdentifier.getConstArray(), 16 ) ) ) - return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >( this )); - - return 0; -} - -const Sequence< sal_Int8 >& ItemContainer::GetUnoTunnelId() throw() -{ - static ::com::sun::star::uno::Sequence< sal_Int8 > * pSeq = NULL; - if( !pSeq ) - { - ::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() ); - if( !pSeq ) - { - static ::com::sun::star::uno::Sequence< sal_Int8 > aSeq( 16 ); - rtl_createUuid( (sal_uInt8*)aSeq.getArray(), 0, sal_True ); - pSeq = &aSeq; - } - } - return *pSeq; -} - -ItemContainer* ItemContainer::GetImplementation( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rxIFace ) throw() -{ - ::com::sun::star::uno::Reference< ::com::sun::star::lang::XUnoTunnel > xUT( rxIFace, ::com::sun::star::uno::UNO_QUERY ); - return xUT.is() ? reinterpret_cast< ItemContainer* >(sal::static_int_cast< sal_IntPtr >( - xUT->getSomething( ItemContainer::GetUnoTunnelId() ))) : NULL; -} - -// XElementAccess -sal_Bool SAL_CALL ItemContainer::hasElements() -throw ( RuntimeException ) -{ - ShareGuard aLock( m_aShareMutex ); - return ( !m_aItemVector.empty() ); -} - -// XIndexAccess -sal_Int32 SAL_CALL ItemContainer::getCount() -throw ( RuntimeException ) -{ - ShareGuard aLock( m_aShareMutex ); - return m_aItemVector.size(); -} - -Any SAL_CALL ItemContainer::getByIndex( sal_Int32 Index ) -throw ( IndexOutOfBoundsException, WrappedTargetException, RuntimeException ) -{ - ShareGuard aLock( m_aShareMutex ); - if ( sal_Int32( m_aItemVector.size()) > Index ) - return makeAny( m_aItemVector[Index] ); - else - throw IndexOutOfBoundsException( ::rtl::OUString(), (OWeakObject *)this ); -} - -// XIndexContainer -void SAL_CALL ItemContainer::insertByIndex( sal_Int32 Index, const Any& aItem ) -throw ( IllegalArgumentException, IndexOutOfBoundsException, WrappedTargetException, RuntimeException ) -{ - Sequence< PropertyValue > aSeq; - if ( aItem >>= aSeq ) - { - ShareGuard aLock( m_aShareMutex ); - if ( sal_Int32( m_aItemVector.size()) == Index ) - m_aItemVector.push_back( aSeq ); - else if ( sal_Int32( m_aItemVector.size()) >Index ) - { - std::vector< Sequence< PropertyValue > >::iterator aIter = m_aItemVector.begin(); - aIter += Index; - m_aItemVector.insert( aIter, aSeq ); - } - else - throw IndexOutOfBoundsException( ::rtl::OUString(), (OWeakObject *)this ); - } - else - throw IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( WRONG_TYPE_EXCEPTION )), - (OWeakObject *)this, 2 ); -} - -void SAL_CALL ItemContainer::removeByIndex( sal_Int32 Index ) -throw ( IndexOutOfBoundsException, WrappedTargetException, RuntimeException ) -{ - ShareGuard aLock( m_aShareMutex ); - if ( (sal_Int32)m_aItemVector.size() > Index ) - { - std::vector< Sequence< PropertyValue > >::iterator aIter = m_aItemVector.begin(); - aIter += Index; - m_aItemVector.erase( aIter ); - } - else - throw IndexOutOfBoundsException( ::rtl::OUString(), (OWeakObject *)this ); -} - -void SAL_CALL ItemContainer::replaceByIndex( sal_Int32 Index, const Any& aItem ) -throw ( IllegalArgumentException, IndexOutOfBoundsException, WrappedTargetException, RuntimeException ) -{ - Sequence< PropertyValue > aSeq; - if ( aItem >>= aSeq ) - { - ShareGuard aLock( m_aShareMutex ); - if ( sal_Int32( m_aItemVector.size()) > Index ) - m_aItemVector[Index] = aSeq; - else - throw IndexOutOfBoundsException( ::rtl::OUString(), (OWeakObject *)this ); - } - else - throw IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( WRONG_TYPE_EXCEPTION )), - (OWeakObject *)this, 2 ); -} - -} // namespace framework - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/framework/source/uielement/langselectionmenucontroller.cxx b/framework/source/uielement/langselectionmenucontroller.cxx index ba695c163abe..30c8b1e098f1 100644..100755 --- a/framework/source/uielement/langselectionmenucontroller.cxx +++ b/framework/source/uielement/langselectionmenucontroller.cxx @@ -287,7 +287,7 @@ void LanguageSelectionMenuController::fillPopupMenu( Reference< css::awt::XPopup if (rStr == m_aCurLang && eMode == MODE_SetLanguageSelectionMenu ) { //make a sign for the current language - pPopupMenu->CheckItem( nItemId, TRUE ); + pPopupMenu->CheckItem( nItemId, sal_True ); } aLangMap[ nItemId ] = rStr; ++nItemId; diff --git a/framework/source/uielement/langselectionstatusbarcontroller.cxx b/framework/source/uielement/langselectionstatusbarcontroller.cxx index 485db0d26489..bceaf3417500 100644..100755 --- a/framework/source/uielement/langselectionstatusbarcontroller.cxx +++ b/framework/source/uielement/langselectionstatusbarcontroller.cxx @@ -223,7 +223,7 @@ throw (::com::sun::star::uno::RuntimeException) if ( rStr == m_aCurLang ) { //make a sign for the current language - xPopupMenu->checkItem( nItemId, TRUE ); + xPopupMenu->checkItem( nItemId, sal_True ); } aLangMap[ nItemId ] = rStr; ++nItemId; diff --git a/framework/source/uielement/logoimagestatusbarcontroller.cxx b/framework/source/uielement/logoimagestatusbarcontroller.cxx index 6b20e717c457..6b20e717c457 100644..100755 --- a/framework/source/uielement/logoimagestatusbarcontroller.cxx +++ b/framework/source/uielement/logoimagestatusbarcontroller.cxx diff --git a/framework/source/uielement/logotextstatusbarcontroller.cxx b/framework/source/uielement/logotextstatusbarcontroller.cxx index f332c458a6e7..f332c458a6e7 100644..100755 --- a/framework/source/uielement/logotextstatusbarcontroller.cxx +++ b/framework/source/uielement/logotextstatusbarcontroller.cxx diff --git a/framework/source/uielement/macrosmenucontroller.cxx b/framework/source/uielement/macrosmenucontroller.cxx index 986260ba4098..bd05a9ae7ddd 100644..100755 --- a/framework/source/uielement/macrosmenucontroller.cxx +++ b/framework/source/uielement/macrosmenucontroller.cxx @@ -35,7 +35,7 @@ #include "services.h" #include <classes/resource.hrc> #include <classes/fwkresid.hxx> -#include <helper/imageproducer.hxx> +#include <framework/imageproducer.hxx> #include <com/sun/star/awt/MenuItemStyle.hpp> #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/beans/XPropertySet.hpp> @@ -49,6 +49,7 @@ #include <rtl/ustrbuf.hxx> #include <dispatch/uieventloghelper.hxx> #include "helper/mischelper.hxx" +#include "helpid.hrc" #include <osl/mutex.hxx> using namespace com::sun::star::uno; @@ -102,8 +103,6 @@ void MacrosMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& rPo String aDisplayName = RetrieveLabelFromCommand( aCommand ); pPopupMenu->InsertItem( 2, aDisplayName ); pPopupMenu->SetItemCommand( 2, aCommand ); - //pPopupMenu->SetHelpId( 2, HID_SVX_BASIC_MACRO_ORGANIZER ); - pPopupMenu->SetHelpId( 2, 40012 ); // insert providers but not basic or java addScriptItems( pPopupMenu, 4); @@ -184,13 +183,13 @@ String MacrosMenuController::RetrieveLabelFromCommand( const String& aCmdURL ) return framework::RetrieveLabelFromCommand(aCmdURL,m_xServiceManager,m_xUICommandLabels,m_xFrame,m_aModuleIdentifier,bModuleIdentified,"Label"); } -void MacrosMenuController::addScriptItems( PopupMenu* pPopupMenu, USHORT startItemId ) +void MacrosMenuController::addScriptItems( PopupMenu* pPopupMenu, sal_uInt16 startItemId ) { const String aCmdBase = String::CreateFromAscii( ".uno:ScriptOrganizer?ScriptOrganizer.Language:string=" ); const String ellipsis = String::CreateFromAscii( "..." ); const ::rtl::OUString providerKey(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.script.provider.ScriptProviderFor")); const ::rtl::OUString languageProviderName(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.script.provider.LanguageScriptProvider")); - USHORT itemId = startItemId; + sal_uInt16 itemId = startItemId; Reference< XContentEnumerationAccess > xEnumAccess = Reference< XContentEnumerationAccess >( m_xServiceManager, UNO_QUERY_THROW ); Reference< XEnumeration > xEnum = xEnumAccess->createContentEnumeration ( languageProviderName ); @@ -221,8 +220,6 @@ void MacrosMenuController::addScriptItems( PopupMenu* pPopupMenu, USHORT startIt aDisplayName.Append( ellipsis ); pPopupMenu->InsertItem( itemId, aDisplayName ); pPopupMenu->SetItemCommand( itemId, aCommand ); - //pPopupMenu->SetHelpId( itemId, HID_SVX_COMMON_MACRO_ORGANIZER ); - pPopupMenu->SetHelpId( itemId, 40014 ); itemId++; break; } diff --git a/framework/source/uielement/makefile.mk b/framework/source/uielement/makefile.mk deleted file mode 100644 index b74adb1e176f..000000000000 --- a/framework/source/uielement/makefile.mk +++ /dev/null @@ -1,87 +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= framework -TARGET= fwk_uielement -USE_DEFFILE= TRUE -ENABLE_EXCEPTIONS= TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Generate ----------------------------------------------------- - -SLOFILES= \ - $(SLO)$/addonstoolbarmanager.obj \ - $(SLO)$/addonstoolbarwrapper.obj \ - $(SLO)$/buttontoolbarcontroller.obj \ - $(SLO)$/comboboxtoolbarcontroller.obj \ - $(SLO)$/complextoolbarcontroller.obj \ - $(SLO)$/constitemcontainer.obj \ - $(SLO)$/controlmenucontroller.obj \ - $(SLO)$/dropdownboxtoolbarcontroller.obj \ - $(SLO)$/edittoolbarcontroller.obj \ - $(SLO)$/fontmenucontroller.obj \ - $(SLO)$/fontsizemenucontroller.obj \ - $(SLO)$/footermenucontroller.obj \ - $(SLO)$/generictoolbarcontroller.obj \ - $(SLO)$/headermenucontroller.obj \ - $(SLO)$/imagebuttontoolbarcontroller.obj \ - $(SLO)$/itemcontainer.obj \ - $(SLO)$/langselectionmenucontroller.obj \ - $(SLO)$/langselectionstatusbarcontroller.obj \ - $(SLO)$/logoimagestatusbarcontroller.obj \ - $(SLO)$/logotextstatusbarcontroller.obj \ - $(SLO)$/macrosmenucontroller.obj \ - $(SLO)$/menubarmanager.obj \ - $(SLO)$/menubarmerger.obj \ - $(SLO)$/menubarwrapper.obj \ - $(SLO)$/newmenucontroller.obj \ - $(SLO)$/objectmenucontroller.obj \ - $(SLO)$/progressbarwrapper.obj \ - $(SLO)$/recentfilesmenucontroller.obj \ - $(SLO)$/rootitemcontainer.obj \ - $(SLO)$/simpletextstatusbarcontroller.obj \ - $(SLO)$/spinfieldtoolbarcontroller.obj \ - $(SLO)$/statusbar.obj \ - $(SLO)$/statusbarmanager.obj \ - $(SLO)$/statusbarwrapper.obj \ - $(SLO)$/statusindicatorinterfacewrapper.obj \ - $(SLO)$/togglebuttontoolbarcontroller.obj \ - $(SLO)$/toolbar.obj \ - $(SLO)$/toolbarmanager.obj \ - $(SLO)$/toolbarmerger.obj \ - $(SLO)$/toolbarsmenucontroller.obj \ - $(SLO)$/toolbarwrapper.obj \ - $(SLO)$/popupmenucontroller.obj \ - $(SLO)$/uicommanddescription.obj \ - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index e515f1065cb8..10ed484d407b 100644..100755 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -34,17 +34,17 @@ // my own includes //_________________________________________________________________________________________________________________ #include <uielement/menubarmanager.hxx> -#include <xml/menuconfiguration.hxx> -#include <classes/bmkmenu.hxx> -#include <classes/addonmenu.hxx> -#include <helper/imageproducer.hxx> +#include <framework/menuconfiguration.hxx> +#include <framework/bmkmenu.hxx> +#include <framework/addonmenu.hxx> +#include <framework/imageproducer.hxx> #include <threadhelp/resetableguard.hxx> -#include "classes/addonsoptions.hxx" +#include "framework/addonsoptions.hxx" #include <classes/fwkresid.hxx> #include <classes/menumanager.hxx> -#include <helper/acceleratorinfo.hxx> +#include <framework/acceleratorinfo.hxx> #include <helper/mischelper.hxx> -#include <classes/menuextensionsupplier.hxx> +#include <framework/menuextensionsupplier.hxx> #include <classes/resource.hrc> #include <services.h> @@ -94,7 +94,7 @@ #include <svtools/acceleratorexecute.hxx> #include <rtl/logfile.hxx> #include "svtools/miscopt.hxx" -#include <classes/addonmenu.hxx> +#include <framework/addonmenu.hxx> #include <uielement/menubarmerger.hxx> #include <dispatch/uieventloghelper.hxx> @@ -538,7 +538,7 @@ throw ( RuntimeException ) if ( Event.State >>= bCheckmark ) { // Checkmark or RadioButton - m_pVCLMenu->ShowItem( pMenuItemHandler->nItemId, TRUE ); + m_pVCLMenu->ShowItem( pMenuItemHandler->nItemId, sal_True ); m_pVCLMenu->CheckItem( pMenuItemHandler->nItemId, bCheckmark ); MenuItemBits nBits = m_pVCLMenu->GetItemBits( pMenuItemHandler->nItemId ); @@ -572,7 +572,7 @@ throw ( RuntimeException ) aItemText = aTmp; } - m_pVCLMenu->ShowItem( pMenuItemHandler->nItemId, TRUE ); + m_pVCLMenu->ShowItem( pMenuItemHandler->nItemId, sal_True ); m_pVCLMenu->SetItemText( pMenuItemHandler->nItemId, aItemText ); } else if ( Event.State >>= aVisibilityStatus ) @@ -581,7 +581,7 @@ throw ( RuntimeException ) m_pVCLMenu->ShowItem( pMenuItemHandler->nItemId, aVisibilityStatus.bVisible ); } else - m_pVCLMenu->ShowItem( pMenuItemHandler->nItemId, TRUE ); + m_pVCLMenu->ShowItem( pMenuItemHandler->nItemId, sal_True ); } if ( Event.Requery ) @@ -594,7 +594,7 @@ throw ( RuntimeException ) } // Helper to retrieve own structure from item ID -MenuBarManager::MenuItemHandler* MenuBarManager::GetMenuItemHandler( USHORT nItemId ) +MenuBarManager::MenuItemHandler* MenuBarManager::GetMenuItemHandler( sal_uInt16 nItemId ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "MenuBarManager::GetMenuItemHandler" ); ResetableGuard aGuard( m_aLock ); @@ -820,7 +820,7 @@ void MenuBarManager::CheckAndAddMenuExtension( Menu* pMenu ) } } -static void lcl_CheckForChildren(Menu* pMenu, USHORT nItemId) +static void lcl_CheckForChildren(Menu* pMenu, sal_uInt16 nItemId) { if (PopupMenu* pThisPopup = pMenu->GetPopupMenu( nItemId )) pMenu->EnableItem( nItemId, pThisPopup->GetItemCount() ? true : false ); @@ -853,7 +853,7 @@ IMPL_LINK( MenuBarManager, Activate, Menu *, pMenu ) if ( m_bActive ) return 0; - m_bActive = TRUE; + m_bActive = sal_True; ::rtl::OUString aMenuCommand( m_aMenuItemCommand ); if ( m_aMenuItemCommand.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(aSpecialWindowMenu)) || @@ -875,9 +875,9 @@ IMPL_LINK( MenuBarManager, Activate, Menu *, pMenu ) } // Try to map commands to labels - for ( USHORT nPos = 0; nPos < pMenu->GetItemCount(); nPos++ ) + for ( sal_uInt16 nPos = 0; nPos < pMenu->GetItemCount(); nPos++ ) { - USHORT nItemId = pMenu->GetItemId( nPos ); + sal_uInt16 nItemId = pMenu->GetItemId( nPos ); if (( pMenu->GetItemType( nPos ) != MENUITEM_SEPARATOR ) && ( pMenu->GetItemText( nItemId ).Len() == 0 )) { @@ -1073,8 +1073,8 @@ IMPL_LINK( MenuBarManager, Select, Menu *, pMenu ) { ResetableGuard aGuard( m_aLock ); - USHORT nCurItemId = pMenu->GetCurItemId(); - USHORT nCurPos = pMenu->GetItemPos( nCurItemId ); + sal_uInt16 nCurItemId = pMenu->GetCurItemId(); + sal_uInt16 nCurPos = pMenu->GetItemPos( nCurItemId ); if ( pMenu == m_pVCLMenu && pMenu->GetItemType( nCurPos ) != MENUITEM_SEPARATOR ) { @@ -1089,7 +1089,7 @@ IMPL_LINK( MenuBarManager, Select, Menu *, pMenu ) if ( xDesktop.is() ) { - USHORT nTaskId = START_ITEMID_WINDOWLIST; + sal_uInt16 nTaskId = START_ITEMID_WINDOWLIST; Reference< XIndexAccess > xList( xDesktop->getFrames(), UNO_QUERY ); sal_Int32 nCount = xList->getCount(); for ( sal_Int32 i=0; i<nCount; ++i ) @@ -1266,10 +1266,10 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF if ( pMenu->IsMenuBar() && rFrame.is() ) { // First merge all addon popup menus into our structure - USHORT nPos = 0; + sal_uInt16 nPos = 0; for ( nPos = 0; nPos < pMenu->GetItemCount(); nPos++ ) { - USHORT nItemId = pMenu->GetItemId( nPos ); + sal_uInt16 nItemId = pMenu->GetItemId( nPos ); ::rtl::OUString aCommand = pMenu->GetItemCommand( nItemId ); if ( nItemId == SID_MDIWINDOWLIST || aCommand.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(aSpecialWindowCommand)) ) @@ -1290,12 +1290,12 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF String aEmpty; sal_Bool bAccessibilityEnabled( Application::GetSettings().GetMiscSettings().GetEnableATToolSupport() ); - USHORT nItemCount = pMenu->GetItemCount(); + sal_uInt16 nItemCount = pMenu->GetItemCount(); ::rtl::OUString aItemCommand; m_aMenuItemHandlerVector.reserve(nItemCount); - for ( USHORT i = 0; i < nItemCount; i++ ) + for ( sal_uInt16 i = 0; i < nItemCount; i++ ) { - USHORT nItemId = FillItemCommand(aItemCommand,pMenu, i ); + sal_uInt16 nItemId = FillItemCommand(aItemCommand,pMenu, i ); // Set module identifier when provided from outside if ( rModuleIdentifier.getLength() > 0 ) @@ -1382,7 +1382,7 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF AddonMenuManager::HasAddonMenuElements() ) { // Create addon popup menu if there exist elements and this is the tools popup menu - USHORT nCount = 0; + sal_uInt16 nCount = 0; AddonMenu* pSubMenu = AddonMenuManager::CreateAddonMenu( rFrame ); if ( pSubMenu && ( pSubMenu->GetItemCount() > 0 )) { @@ -1419,7 +1419,7 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF if ( bItemShowMenuImages && !pPopup->GetItemImage( ITEMID_ADDONLIST )) { Reference< XFrame > xTemp( rFrame ); - Image aImage = GetImageFromURL( xTemp, aItemCommand, FALSE ); + Image aImage = GetImageFromURL( xTemp, aItemCommand, false ); if ( !!aImage ) pPopup->SetItemImage( ITEMID_ADDONLIST, aImage ); } @@ -1449,14 +1449,14 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF if ( pMenuAttributes && pMenuAttributes->aImageId.getLength() > 0 ) { // Retrieve image id from menu attributes - aImage = GetImageFromURL( m_xFrame, aImageId, FALSE ); + aImage = GetImageFromURL( m_xFrame, aImageId, false ); } if ( !aImage ) { - aImage = GetImageFromURL( m_xFrame, aItemCommand, FALSE ); + aImage = GetImageFromURL( m_xFrame, aItemCommand, false ); if ( !aImage ) - aImage = AddonsOptions().GetImageFromURL( aItemCommand, FALSE ); + aImage = AddonsOptions().GetImageFromURL( aItemCommand, false ); } if ( !!aImage ) @@ -1692,7 +1692,7 @@ void MenuBarManager::RetrieveImageManagers() } void MenuBarManager::FillMenuWithConfiguration( - USHORT& nId, + sal_uInt16& nId, Menu* pMenu, const ::rtl::OUString& rModuleIdentifier, const Reference< XIndexAccess >& rItemContainer, @@ -1728,7 +1728,7 @@ void MenuBarManager::FillMenuWithConfiguration( } void MenuBarManager::FillMenu( - USHORT& nId, + sal_uInt16& nId, Menu* pMenu, const rtl::OUString& rModuleIdentifier, const Reference< XIndexAccess >& rItemContainer, @@ -1784,9 +1784,6 @@ void MenuBarManager::FillMenu( pMenu->InsertItem( nId, aLabel ); pMenu->SetItemCommand( nId, aCommandURL ); - sal_Int32 nHelpId = aHelpURL.toInt32(); - if ( nHelpId > 0 ) - pMenu->SetHelpId( nId, (USHORT)nHelpId ); if ( nStyle ) { MenuItemBits nBits = pMenu->GetItemBits( nId ); @@ -1808,7 +1805,7 @@ void MenuBarManager::FillMenu( // Use attributes struct to transport special dispatch provider MenuConfiguration::Attributes* pAttributes = new MenuConfiguration::Attributes; pAttributes->xDispatchProvider = xDispatchProvider; - pMenu->SetUserValue( nId, (ULONG)( pAttributes )); + pMenu->SetUserValue( nId, (sal_uIntPtr)( pAttributes )); } // Use help command to transport module identifier @@ -1938,7 +1935,7 @@ void MenuBarManager::SetItemContainer( const Reference< XIndexAccess >& rItemCon // Remove top-level parts m_pVCLMenu->Clear(); - USHORT nId = 1; + sal_uInt16 nId = 1; // Fill menu bar with container contents FillMenuWithConfiguration( nId, (Menu *)m_pVCLMenu, m_aModuleIdentifier, rItemContainer, m_xURLTransformer ); @@ -2006,7 +2003,7 @@ const Reference< XMultiServiceFactory >& MenuBarManager::getServiceFactory() return mxServiceFactory; } -void MenuBarManager::AddMenu(MenuBarManager* pSubMenuManager,const ::rtl::OUString& _sItemCommand,USHORT _nItemId) +void MenuBarManager::AddMenu(MenuBarManager* pSubMenuManager,const ::rtl::OUString& _sItemCommand,sal_uInt16 _nItemId) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "MenuBarManager::AddMenu" ); Reference< XStatusListener > xSubMenuManager( static_cast< OWeakObject *>( pSubMenuManager ), UNO_QUERY ); @@ -2023,10 +2020,10 @@ void MenuBarManager::AddMenu(MenuBarManager* pSubMenuManager,const ::rtl::OUStri m_aMenuItemHandlerVector.push_back( pMenuItemHandler ); } -USHORT MenuBarManager::FillItemCommand(::rtl::OUString& _rItemCommand,Menu* _pMenu,USHORT _nIndex) const +sal_uInt16 MenuBarManager::FillItemCommand(::rtl::OUString& _rItemCommand,Menu* _pMenu,sal_uInt16 _nIndex) const { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "MenuBarManager::FillItemCommand" ); - USHORT nItemId = _pMenu->GetItemId( _nIndex ); + sal_uInt16 nItemId = _pMenu->GetItemId( _nIndex ); _rItemCommand = _pMenu->GetItemCommand( nItemId ); if ( !_rItemCommand.getLength() ) @@ -2056,12 +2053,12 @@ void MenuBarManager::Init(const Reference< XFrame >& rFrame,AddonMenu* pAddonMen Reference< XStatusListener > xStatusListener; Reference< XDispatch > xDispatch; - USHORT nItemCount = pAddonMenu->GetItemCount(); + sal_uInt16 nItemCount = pAddonMenu->GetItemCount(); ::rtl::OUString aItemCommand; m_aMenuItemHandlerVector.reserve(nItemCount); - for ( USHORT i = 0; i < nItemCount; i++ ) + for ( sal_uInt16 i = 0; i < nItemCount; i++ ) { - USHORT nItemId = FillItemCommand(aItemCommand,pAddonMenu, i ); + sal_uInt16 nItemId = FillItemCommand(aItemCommand,pAddonMenu, i ); PopupMenu* pPopupMenu = pAddonMenu->GetPopupMenu( nItemId ); if ( pPopupMenu ) diff --git a/framework/source/uielement/menubarmerger.cxx b/framework/source/uielement/menubarmerger.cxx index 38dfa32cca68..5aba33de6877 100644..100755 --- a/framework/source/uielement/menubarmerger.cxx +++ b/framework/source/uielement/menubarmerger.cxx @@ -30,7 +30,7 @@ #include "precompiled_framework.hxx" #include <uielement/menubarmerger.hxx> -#include <classes/addonsoptions.hxx> +#include <framework/addonsoptions.hxx> using namespace ::com::sun::star; diff --git a/framework/source/uielement/menubarwrapper.cxx b/framework/source/uielement/menubarwrapper.cxx index 2b771ac5d50d..d1aff13ee32d 100644..100755 --- a/framework/source/uielement/menubarwrapper.cxx +++ b/framework/source/uielement/menubarwrapper.cxx @@ -34,7 +34,7 @@ //_________________________________________________________________________________________________________________ #include <uielement/menubarwrapper.hxx> #include <threadhelp/resetableguard.hxx> -#include <helper/actiontriggerhelper.hxx> +#include <framework/actiontriggerhelper.hxx> #include <services.h> //_________________________________________________________________________________________________________________ @@ -182,7 +182,7 @@ void SAL_CALL MenuBarWrapper::initialize( const Sequence< Any >& aArguments ) th if ( m_xConfigData.is() ) { // Fill menubar with container contents - USHORT nId = 1; + sal_uInt16 nId = 1; MenuBarManager::FillMenuWithConfiguration( nId, pVCLMenuBar, aModuleIdentifier, m_xConfigData, xTrans ); } } diff --git a/framework/source/uielement/newmenucontroller.cxx b/framework/source/uielement/newmenucontroller.cxx index f7011398f069..184afc3bd9ed 100644..100755 --- a/framework/source/uielement/newmenucontroller.cxx +++ b/framework/source/uielement/newmenucontroller.cxx @@ -37,9 +37,9 @@ #include "services.h" #include <classes/resource.hrc> #include <classes/fwkresid.hxx> -#include <classes/bmkmenu.hxx> -#include <helper/imageproducer.hxx> -#include <xml/menuconfiguration.hxx> +#include <framework/bmkmenu.hxx> +#include <framework/imageproducer.hxx> +#include <framework/menuconfiguration.hxx> //_________________________________________________________________________________________________________________ // interface includes @@ -96,13 +96,13 @@ DEFINE_INIT_SERVICE ( NewMenuController, {} ) void NewMenuController::setMenuImages( PopupMenu* pPopupMenu, sal_Bool bSetImages ) { - USHORT nItemCount = pPopupMenu->GetItemCount(); + sal_uInt16 nItemCount = pPopupMenu->GetItemCount(); Image aImage; Reference< XFrame > xFrame( m_xFrame ); - for ( USHORT i = 0; i < nItemCount; i++ ) + for ( sal_uInt16 i = 0; i < nItemCount; i++ ) { - USHORT nItemId = pPopupMenu->GetItemId( sal::static_int_cast<USHORT>( i )); + sal_uInt16 nItemId = pPopupMenu->GetItemId( sal::static_int_cast<sal_uInt16>( i )); if ( nItemId != 0 ) { if ( bSetImages ) @@ -116,7 +116,7 @@ void NewMenuController::setMenuImages( PopupMenu* pPopupMenu, sal_Bool bSetImage if ( aImageId.getLength() > 0 ) { - aImage = GetImageFromURL( xFrame, aImageId, FALSE ); + aImage = GetImageFromURL( xFrame, aImageId, false ); if ( !!aImage ) { bImageSet = sal_True; @@ -128,7 +128,7 @@ void NewMenuController::setMenuImages( PopupMenu* pPopupMenu, sal_Bool bSetImage { String aCmd( pPopupMenu->GetItemCommand( nItemId ) ); if ( aCmd.Len() ) - aImage = GetImageFromURL( xFrame, aCmd, FALSE ); + aImage = GetImageFromURL( xFrame, aCmd, false ); if ( !!aImage ) pPopupMenu->SetItemImage( nItemId, aImage ); @@ -142,8 +142,8 @@ void NewMenuController::setMenuImages( PopupMenu* pPopupMenu, sal_Bool bSetImage void NewMenuController::determineAndSetNewDocAccel( PopupMenu* pPopupMenu, const KeyCode& rKeyCode ) { - USHORT nCount( pPopupMenu->GetItemCount() ); - USHORT nId( 0 ); + sal_uInt16 nCount( pPopupMenu->GetItemCount() ); + sal_uInt16 nId( 0 ); sal_Bool bFound( sal_False ); rtl::OUString aCommand; @@ -153,7 +153,7 @@ void NewMenuController::determineAndSetNewDocAccel( PopupMenu* pPopupMenu, const for ( sal_uInt32 i = 0; i < sal_uInt32( nCount ); i++ ) { - nId = pPopupMenu->GetItemId( USHORT( i )); + nId = pPopupMenu->GetItemId( sal_uInt16( i )); if ( nId != 0 && pPopupMenu->GetItemType( nId ) != MENUITEM_SEPARATOR ) { aCommand = pPopupMenu->GetItemCommand( nId ); @@ -175,7 +175,7 @@ void NewMenuController::determineAndSetNewDocAccel( PopupMenu* pPopupMenu, const { for ( sal_uInt32 i = 0; i < sal_uInt32( nCount ); i++ ) { - nId = pPopupMenu->GetItemId( USHORT( i )); + nId = pPopupMenu->GetItemId( sal_uInt16( i )); if ( nId != 0 && pPopupMenu->GetItemType( nId ) != MENUITEM_SEPARATOR ) { aCommand = pPopupMenu->GetItemCommand( nId ); @@ -254,7 +254,7 @@ void NewMenuController::setAccelerators( PopupMenu* pPopupMenu ) std::vector< sal_uInt32 > aIds; for ( sal_uInt32 i = 0; i < nItemCount; i++ ) { - USHORT nId( pPopupMenu->GetItemId( USHORT( i ))); + sal_uInt16 nId( pPopupMenu->GetItemId( sal_uInt16( i ))); if ( nId & ( pPopupMenu->GetItemType( nId ) != MENUITEM_SEPARATOR )) { aIds.push_back( nId ); @@ -290,7 +290,7 @@ void NewMenuController::setAccelerators( PopupMenu* pPopupMenu ) const sal_uInt32 nCount2 = aIds.size(); for ( sal_uInt32 i = 0; i < nCount2; i++ ) - pPopupMenu->SetAccelKey( USHORT( aIds[i] ), aMenuShortCuts[i] ); + pPopupMenu->SetAccelKey( sal_uInt16( aIds[i] ), aMenuShortCuts[i] ); // Special handling for "New" menu short-cut should be set at the // document which will be opened using it. @@ -369,9 +369,9 @@ void NewMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& rPopup // retrieve additional parameters from bookmark menu and // store it in a boost::unordered_map. - for ( USHORT i = 0; i < pSubMenu->GetItemCount(); i++ ) + for ( sal_uInt16 i = 0; i < pSubMenu->GetItemCount(); i++ ) { - USHORT nItemId = pSubMenu->GetItemId( sal::static_int_cast<USHORT>( i ) ); + sal_uInt16 nItemId = pSubMenu->GetItemId( sal::static_int_cast<sal_uInt16>( i ) ); if (( nItemId != 0 ) && ( pSubMenu->GetItemType( nItemId ) != MENUITEM_SEPARATOR )) { diff --git a/framework/source/uielement/objectmenucontroller.cxx b/framework/source/uielement/objectmenucontroller.cxx index dd009de823a8..841c84e661cd 100644..100755 --- a/framework/source/uielement/objectmenucontroller.cxx +++ b/framework/source/uielement/objectmenucontroller.cxx @@ -105,7 +105,7 @@ void ObjectMenuController::fillPopupMenu( const Sequence< com::sun::star::embed: if ( pVCLPopupMenu ) { const rtl::OUString aVerbCommand( RTL_CONSTASCII_USTRINGPARAM( ".uno:ObjectMenue?VerbID:short=" )); - for ( USHORT i = 0; i < rVerbCommandSeq.getLength(); i++ ) + for ( sal_uInt16 i = 0; i < rVerbCommandSeq.getLength(); i++ ) { const com::sun::star::embed::VerbDescriptor& rVerb = pVerbCommandArray[i]; if ( rVerb.VerbAttributes & com::sun::star::embed::VerbAttributes::MS_VERBATTR_ONCONTAINERMENU ) diff --git a/framework/source/uielement/panelwindow.cxx b/framework/source/uielement/panelwindow.cxx new file mode 100755 index 000000000000..c8729dbb028d --- /dev/null +++ b/framework/source/uielement/panelwindow.cxx @@ -0,0 +1,77 @@ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_framework.hxx" + +//_________________________________________________________________________________________________________________ +// my own includes +//_________________________________________________________________________________________________________________ + +#include <uielement/panelwindow.hxx> + +namespace framework +{ + +PanelWindow::PanelWindow( Window* pParent, WinBits nWinBits ) : + DockingWindow( pParent, nWinBits ) +{ +} + +PanelWindow::~PanelWindow() +{ +} + +const ::rtl::OUString& PanelWindow::getResourceURL() const +{ + return m_aResourceURL; +} + +void PanelWindow::setResourceURL(const ::rtl::OUString& rResourceURL) +{ + m_aResourceURL = rResourceURL; +} + +Window* PanelWindow::getContentWindow() const +{ + return m_pContentWindow; +} + +void PanelWindow::setContentWindow( Window* pContentWindow ) +{ + m_pContentWindow = pContentWindow; + if ( m_pContentWindow != NULL ) + { + m_pContentWindow->SetParent(this); + m_pContentWindow->SetSizePixel( GetOutputSizePixel() ); + m_pContentWindow->Show(); + } +} + +void PanelWindow::Command( const CommandEvent& rCEvt ) +{ + if ( m_aCommandHandler.IsSet() ) + m_aCommandHandler.Call( (void *)( &rCEvt )); + DockingWindow::Command( rCEvt ); +} + +void PanelWindow::StateChanged( StateChangedType nType ) +{ + DockingWindow::StateChanged( nType ); + if ( m_aStateChangedHandler.IsSet() ) + m_aStateChangedHandler.Call( &nType ); +} + +void PanelWindow::DataChanged( const DataChangedEvent& rDCEvt ) +{ + DockingWindow::DataChanged( rDCEvt ); + if ( m_aDataChangedHandler.IsSet() ) + m_aDataChangedHandler.Call( (void*)&rDCEvt ); +} + +void PanelWindow::Resize() +{ + DockingWindow::Resize(); + if ( m_pContentWindow ) + m_pContentWindow->SetSizePixel( GetOutputSizePixel() ); +} + +} diff --git a/framework/source/uielement/panelwrapper.cxx b/framework/source/uielement/panelwrapper.cxx new file mode 100755 index 000000000000..02d05d2653a2 --- /dev/null +++ b/framework/source/uielement/panelwrapper.cxx @@ -0,0 +1,226 @@ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_framework.hxx" +//_________________________________________________________________________________________________________________ +// my own includes +//_________________________________________________________________________________________________________________ + +#include <services.h> +#include <uielement/panelwrapper.hxx> +#include <threadhelp/resetableguard.hxx> +#include <uielement/constitemcontainer.hxx> +#include <uielement/rootitemcontainer.hxx> +#include <uielement/panelwindow.hxx> +#include <services/modelwinservice.hxx> + +//_________________________________________________________________________________________________________________ +// interface includes +//_________________________________________________________________________________________________________________ + +#include <com/sun/star/lang/XServiceInfo.hpp> +#include <com/sun/star/beans/XPropertySet.hpp> +#include <com/sun/star/awt/XSystemDependentMenuPeer.hpp> +#include <com/sun/star/awt/XMenuBar.hpp> +#include <com/sun/star/container/XIndexContainer.hpp> +#include <com/sun/star/container/XNameAccess.hpp> +#include <com/sun/star/ui/UIElementType.hpp> + +//_________________________________________________________________________________________________________________ +// other includes +//_________________________________________________________________________________________________________________ + +#include <toolkit/unohlp.hxx> +#include <toolkit/awt/vclxwindow.hxx> +#include <comphelper/processfactory.hxx> +#include <svtools/miscopt.hxx> +#include <vcl/svapp.hxx> +#include <rtl/logfile.hxx> + +using namespace com::sun::star; +using namespace com::sun::star::uno; +using namespace com::sun::star::beans; +using namespace com::sun::star::frame; +using namespace com::sun::star::lang; +using namespace com::sun::star::container; +using namespace com::sun::star::awt; +using namespace ::com::sun::star::ui; + +namespace framework +{ + +PanelWrapper::PanelWrapper( const Reference< XMultiServiceFactory >& xServiceManager ) : + UIElementWrapperBase( UIElementType::DOCKINGWINDOW ), + m_xServiceManager( xServiceManager ), + m_bNoClose(false) +{ +} + +PanelWrapper::~PanelWrapper() +{ +} + +// XInterface +void SAL_CALL PanelWrapper::acquire() throw() +{ + UIElementWrapperBase::acquire(); +} + +void SAL_CALL PanelWrapper::release() throw() +{ + UIElementWrapperBase::release(); +} + +uno::Any SAL_CALL PanelWrapper::queryInterface( const uno::Type & rType ) +throw( ::com::sun::star::uno::RuntimeException ) +{ + return UIElementWrapperBase::queryInterface( rType ); +} + +// XComponent +void SAL_CALL PanelWrapper::dispose() throw ( RuntimeException ) +{ + Reference< XComponent > xThis( static_cast< OWeakObject* >(this), UNO_QUERY ); + Reference< XMultiServiceFactory > xSMGR( m_xServiceManager ); + Reference< XWindow > xWindow; + + { + ResetableGuard aLock( m_aLock ); + if ( m_bDisposed ) + return; + xSMGR = m_xServiceManager; + } + + com::sun::star::lang::EventObject aEvent( xThis ); + m_aListenerContainer.disposeAndClear( aEvent ); + + rtl::OUString aModelWinService( SERVICENAME_MODELWINSERVICE ); + Reference< XNameAccess > xNameAccess( xSMGR->createInstance( aModelWinService ), UNO_QUERY ); + if ( xNameAccess.is() ) + { + ModelWinService* pService = dynamic_cast< ModelWinService* >( xNameAccess.get() ); + if ( pService != 0 ) + { + vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + PanelWindow* pPanelWindow = dynamic_cast< PanelWindow* >( m_xPanelWindow.get() ); + if ( pPanelWindow != NULL ) + { + xWindow = VCLUnoHelper::GetInterface( pPanelWindow->getContentWindow() ); + pService->deregisterModelForXWindow( xWindow ); + } + } + } + + ResetableGuard aLock( m_aLock ); + m_xPanelWindow.clear(); + m_bDisposed = sal_True; +} + +// XInitialization +void SAL_CALL PanelWrapper::initialize( const Sequence< Any >& aArguments ) throw ( Exception, RuntimeException ) +{ + ResetableGuard aLock( m_aLock ); + + if ( m_bDisposed ) + throw DisposedException(); + + if ( !m_bInitialized ) + { + UIElementWrapperBase::initialize( aArguments ); + + sal_Bool bPopupMode( sal_False ); + Reference< XWindow > xContentWindow; + for ( sal_Int32 i = 0; i < aArguments.getLength(); i++ ) + { + PropertyValue aPropValue; + if ( aArguments[i] >>= aPropValue ) + { + if ( aPropValue.Name.equalsAsciiL( "PopupMode", 9 )) + aPropValue.Value >>= bPopupMode; + else if ( aPropValue.Name.equalsAsciiL( "ContentWindow", 13 )) + aPropValue.Value >>= xContentWindow; + } + } + + Reference< XFrame > xFrame( m_xWeakFrame ); + if ( xFrame.is() ) + { + PanelWindow* pPanelWindow(0); + Window* pContentWindow(0); + { + vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + Window* pWindow = VCLUnoHelper::GetWindow( xFrame->getContainerWindow() ); + pContentWindow = VCLUnoHelper::GetWindow( xContentWindow ); + if ( pWindow ) + { + sal_uInt32 nStyles = WB_LINESPACING | WB_BORDER | WB_SCROLL | WB_MOVEABLE | WB_3DLOOK | WB_DOCKABLE | WB_SIZEABLE | WB_CLOSEABLE; + + pPanelWindow = new PanelWindow( pWindow, nStyles ); + m_xPanelWindow = VCLUnoHelper::GetInterface( pPanelWindow ); + pPanelWindow->setResourceURL( m_aResourceURL ); + pPanelWindow->setContentWindow( pContentWindow ); + } + } + + try + { + } + catch ( NoSuchElementException& ) + { + } + } + } +} + +// XEventListener +void SAL_CALL PanelWrapper::disposing( const ::com::sun::star::lang::EventObject& ) throw (::com::sun::star::uno::RuntimeException) +{ + // nothing todo +} + +// XUpdatable +void SAL_CALL PanelWrapper::update() throw (::com::sun::star::uno::RuntimeException) +{ + ResetableGuard aLock( m_aLock ); + + if ( m_bDisposed ) + throw DisposedException(); +} + +// XUIElement interface +Reference< XInterface > SAL_CALL PanelWrapper::getRealInterface( ) throw (::com::sun::star::uno::RuntimeException) +{ + ResetableGuard aLock( m_aLock ); + return m_xPanelWindow; +} + +void SAL_CALL PanelWrapper::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const com::sun::star::uno::Any& aValue ) throw( com::sun::star::uno::Exception ) +{ + ResetableGuard aLock( m_aLock ); + sal_Bool bNoClose( m_bNoClose ); + aLock.unlock(); + + UIElementWrapperBase::setFastPropertyValue_NoBroadcast( nHandle, aValue ); + + aLock.lock(); + + sal_Bool bNewNoClose( m_bNoClose ); + if ( m_xPanelWindow.is() && !m_bDisposed && ( bNewNoClose != bNoClose )) + { + PanelWindow* pPanelWindow = dynamic_cast< PanelWindow* >( VCLUnoHelper::GetWindow( m_xPanelWindow ) ); + if ( pPanelWindow ) + { + if ( bNewNoClose ) + { + pPanelWindow->SetStyle( pPanelWindow->GetStyle() & ~WB_CLOSEABLE ); + pPanelWindow->SetFloatStyle( pPanelWindow->GetFloatStyle() & ~WB_CLOSEABLE ); + } + else + { + pPanelWindow->SetStyle( pPanelWindow->GetStyle() | WB_CLOSEABLE ); + pPanelWindow->SetFloatStyle( pPanelWindow->GetFloatStyle() | WB_CLOSEABLE ); + } + } + } +} + +} // namespace framework diff --git a/framework/source/uielement/popupmenucontroller.cxx b/framework/source/uielement/popupmenucontroller.cxx index 31308e9a7df1..ab455cc5296a 100644..100755 --- a/framework/source/uielement/popupmenucontroller.cxx +++ b/framework/source/uielement/popupmenucontroller.cxx @@ -204,7 +204,7 @@ Reference< awt::XWindow > SAL_CALL PopupMenuController::createPopupWindow() thro return xRet; // get selected button - USHORT nItemId = pToolBox->GetDownItemId(); + sal_uInt16 nItemId = pToolBox->GetDownItemId(); if( !nItemId ) return xRet; @@ -223,10 +223,10 @@ Reference< awt::XWindow > SAL_CALL PopupMenuController::createPopupWindow() thro mxPopupMenuController->updatePopupMenu(); } - pToolBox->SetItemDown( nItemId, TRUE ); + pToolBox->SetItemDown( nItemId, sal_True ); Reference< awt::XWindowPeer > xPeer( getParent(), UNO_QUERY_THROW ); mxPopupMenu->execute( xPeer, VCLUnoHelper::ConvertToAWTRect( aRect ), 0 ); - pToolBox->SetItemDown( nItemId, FALSE ); + pToolBox->SetItemDown( nItemId, sal_False ); } catch( Exception& ) { diff --git a/framework/source/uielement/progressbarwrapper.cxx b/framework/source/uielement/progressbarwrapper.cxx index 591b834af108..55c2a6a12293 100644..100755 --- a/framework/source/uielement/progressbarwrapper.cxx +++ b/framework/source/uielement/progressbarwrapper.cxx @@ -148,13 +148,13 @@ throw (uno::RuntimeException) pStatusBar->StartProgressMode( Text ); else { - pStatusBar->SetUpdateMode( FALSE ); + pStatusBar->SetUpdateMode( sal_False ); pStatusBar->EndProgressMode(); pStatusBar->StartProgressMode( Text ); - pStatusBar->SetProgressValue( USHORT( nValue )); - pStatusBar->SetUpdateMode( TRUE ); + pStatusBar->SetProgressValue( sal_uInt16( nValue )); + pStatusBar->SetUpdateMode( sal_True ); } - pStatusBar->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); + pStatusBar->Show( sal_True, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); } } } @@ -214,11 +214,11 @@ throw (uno::RuntimeException) StatusBar* pStatusBar = (StatusBar *)pWindow; if( pStatusBar->IsProgressMode() ) { - pStatusBar->SetUpdateMode( FALSE ); + pStatusBar->SetUpdateMode( sal_False ); pStatusBar->EndProgressMode(); pStatusBar->StartProgressMode( Text ); - pStatusBar->SetProgressValue( USHORT( nValue )); - pStatusBar->SetUpdateMode( TRUE ); + pStatusBar->SetProgressValue( sal_uInt16( nValue )); + pStatusBar->SetUpdateMode( sal_True ); } else pStatusBar->SetText( Text ); @@ -267,7 +267,7 @@ throw (uno::RuntimeException) StatusBar* pStatusBar = (StatusBar *)pWindow; if ( !pStatusBar->IsProgressMode() ) pStatusBar->StartProgressMode( aText ); - pStatusBar->SetProgressValue( USHORT( nValue )); + pStatusBar->SetProgressValue( sal_uInt16( nValue )); } } } diff --git a/framework/source/uielement/recentfilesmenucontroller.cxx b/framework/source/uielement/recentfilesmenucontroller.cxx index 87c7917bcaf9..989a85784856 100644..100755 --- a/framework/source/uielement/recentfilesmenucontroller.cxx +++ b/framework/source/uielement/recentfilesmenucontroller.cxx @@ -257,9 +257,9 @@ void RecentFilesMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > ::rtl::OUString aTitle( aMenuShortCut + aMenuTitle ); - pVCLPopupMenu->InsertItem( USHORT( i+1 ), aTitle ); - pVCLPopupMenu->SetTipHelpText( USHORT( i+1 ), aTipHelpText ); - pVCLPopupMenu->SetItemCommand( USHORT( i+1 ), aURLString ); + pVCLPopupMenu->InsertItem( sal_uInt16( i+1 ), aTitle ); + pVCLPopupMenu->SetTipHelpText( sal_uInt16( i+1 ), aTipHelpText ); + pVCLPopupMenu->SetItemCommand( sal_uInt16( i+1 ), aURLString ); } } else @@ -267,7 +267,7 @@ void RecentFilesMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > // No recent documents => insert "no document" string String aNoDocumentStr = String( FwkResId( STR_NODOCUMENT )); pVCLPopupMenu->InsertItem( 1, aNoDocumentStr ); - pVCLPopupMenu->EnableItem( 1, FALSE ); + pVCLPopupMenu->EnableItem( 1, sal_False ); } } } diff --git a/framework/source/uielement/rootitemcontainer.cxx b/framework/source/uielement/rootitemcontainer.cxx deleted file mode 100644 index 445419cf0edd..000000000000 --- a/framework/source/uielement/rootitemcontainer.cxx +++ /dev/null @@ -1,464 +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_framework.hxx" -//_________________________________________________________________________________________________________________ -// my own includes -//_________________________________________________________________________________________________________________ -#include <uielement/rootitemcontainer.hxx> - -#include <uielement/itemcontainer.hxx> - -#include <uielement/constitemcontainer.hxx> -#include <threadhelp/resetableguard.hxx> -#include <general.h> -#include <properties.h> - -//_________________________________________________________________________________________________________________ -// interface includes -//_________________________________________________________________________________________________________________ -#include <com/sun/star/beans/PropertyAttribute.hpp> - -//_________________________________________________________________________________________________________________ -// other includes -//_________________________________________________________________________________________________________________ - -using namespace cppu; -using namespace com::sun::star::uno; -using namespace com::sun::star::lang; -using namespace com::sun::star::beans; -using namespace com::sun::star::container; - -const char WRONG_TYPE_EXCEPTION[] = "Type must be com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >"; - -const int PROPHANDLE_UINAME = 1; -const int PROPCOUNT = 1; -const rtl::OUString PROPNAME_UINAME( RTL_CONSTASCII_USTRINGPARAM( "UIName" )); - -namespace framework -{ - -//***************************************************************************************************************** -// XInterface, XTypeProvider -//***************************************************************************************************************** -DEFINE_XINTERFACE_10 ( RootItemContainer , - OWeakObject , - DIRECT_INTERFACE( ::com::sun::star::lang::XTypeProvider ), - DIRECT_INTERFACE( ::com::sun::star::container::XIndexContainer ), - DIRECT_INTERFACE( ::com::sun::star::lang::XUnoTunnel ), - DIRECT_INTERFACE( ::com::sun::star::lang::XSingleComponentFactory ), - DIRECT_INTERFACE( ::com::sun::star::beans::XMultiPropertySet ), - DIRECT_INTERFACE( ::com::sun::star::beans::XFastPropertySet ), - DIRECT_INTERFACE( ::com::sun::star::beans::XPropertySet ), - DERIVED_INTERFACE( ::com::sun::star::container::XIndexReplace, com::sun::star::container::XIndexContainer ), - DERIVED_INTERFACE( ::com::sun::star::container::XIndexAccess, com::sun::star::container::XIndexReplace ), - DERIVED_INTERFACE( ::com::sun::star::container::XElementAccess, ::com::sun::star::container::XIndexAccess ) - ) - -DEFINE_XTYPEPROVIDER_10 ( RootItemContainer , - ::com::sun::star::lang::XTypeProvider , - ::com::sun::star::container::XIndexContainer , - ::com::sun::star::container::XIndexReplace , - ::com::sun::star::container::XIndexAccess , - ::com::sun::star::container::XElementAccess , - ::com::sun::star::beans::XMultiPropertySet , - ::com::sun::star::beans::XFastPropertySet , - ::com::sun::star::beans::XPropertySet , - ::com::sun::star::lang::XUnoTunnel , - ::com::sun::star::lang::XSingleComponentFactory - ) - -RootItemContainer::RootItemContainer() - : ThreadHelpBase ( ) - , ::cppu::OBroadcastHelperVar< ::cppu::OMultiTypeInterfaceContainerHelper, ::cppu::OMultiTypeInterfaceContainerHelper::keyType >( m_aLock.getShareableOslMutex() ) - , ::cppu::OPropertySetHelper ( *(static_cast< ::cppu::OBroadcastHelper* >(this)) ) - , ::cppu::OWeakObject() -{ -} - -RootItemContainer::RootItemContainer( const ConstItemContainer& rConstItemContainer ) - : ThreadHelpBase ( ) - , ::cppu::OBroadcastHelperVar< ::cppu::OMultiTypeInterfaceContainerHelper, ::cppu::OMultiTypeInterfaceContainerHelper::keyType >( m_aLock.getShareableOslMutex() ) - , ::cppu::OPropertySetHelper ( *(static_cast< ::cppu::OBroadcastHelper* >(this)) ) - , ::cppu::OWeakObject() -{ - m_aUIName = rConstItemContainer.m_aUIName; - copyItemContainer( rConstItemContainer.m_aItemVector ); -} - -RootItemContainer::RootItemContainer( const Reference< XIndexAccess >& rSourceContainer ) - : ThreadHelpBase ( ) - , ::cppu::OBroadcastHelperVar< ::cppu::OMultiTypeInterfaceContainerHelper, ::cppu::OMultiTypeInterfaceContainerHelper::keyType >( m_aLock.getShareableOslMutex() ) - , ::cppu::OPropertySetHelper ( *(static_cast< ::cppu::OBroadcastHelper* >(this)) ) - , ::cppu::OWeakObject() -{ - // We also have to copy the UIName property - try - { - Reference< XPropertySet > xPropSet( rSourceContainer, UNO_QUERY ); - if ( xPropSet.is() ) - { - xPropSet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "UIName" ))) >>= m_aUIName; - } - } - catch ( Exception& ) - { - } - - if ( rSourceContainer.is() ) - { - sal_Int32 nCount = rSourceContainer->getCount(); - try - { - for ( sal_Int32 i = 0; i < nCount; i++ ) - { - Sequence< PropertyValue > aPropSeq; - if ( rSourceContainer->getByIndex( i ) >>= aPropSeq ) - { - sal_Int32 nContainerIndex = -1; - Reference< XIndexAccess > xIndexAccess; - for ( sal_Int32 j = 0; j < aPropSeq.getLength(); j++ ) - { - if ( aPropSeq[j].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ItemDescriptorContainer" ) )) - { - aPropSeq[j].Value >>= xIndexAccess; - nContainerIndex = j; - break; - } - } - - if ( xIndexAccess.is() && nContainerIndex >= 0 ) - aPropSeq[nContainerIndex].Value <<= deepCopyContainer( xIndexAccess ); - - m_aItemVector.push_back( aPropSeq ); - } - } - } - catch ( IndexOutOfBoundsException& ) - { - } - } -} - -RootItemContainer::~RootItemContainer() -{ -} - -// private -void RootItemContainer::copyItemContainer( const std::vector< Sequence< PropertyValue > >& rSourceVector ) -{ - const sal_uInt32 nCount = rSourceVector.size(); - m_aItemVector.reserve(nCount); - for ( sal_uInt32 i = 0; i < nCount; i++ ) - { - sal_Int32 nContainerIndex = -1; - Sequence< PropertyValue > aPropSeq( rSourceVector[i] ); - Reference< XIndexAccess > xIndexAccess; - for ( sal_Int32 j = 0; j < aPropSeq.getLength(); j++ ) - { - if ( aPropSeq[j].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ItemDescriptorContainer" ) )) - { - aPropSeq[j].Value >>= xIndexAccess; - nContainerIndex = j; - break; - } - } - - if ( xIndexAccess.is() && nContainerIndex >= 0 ) - aPropSeq[nContainerIndex].Value <<= deepCopyContainer( xIndexAccess ); - - m_aItemVector.push_back( aPropSeq ); - } -} - -Reference< XIndexAccess > RootItemContainer::deepCopyContainer( const Reference< XIndexAccess >& rSubContainer ) -{ - Reference< XIndexAccess > xReturn; - if ( rSubContainer.is() ) - { - ConstItemContainer* pSource = ConstItemContainer::GetImplementation( rSubContainer ); - ItemContainer* pSubContainer( 0 ); - if ( pSource ) - pSubContainer = new ItemContainer( *pSource, m_aShareMutex ); - else - pSubContainer = new ItemContainer( rSubContainer, m_aShareMutex ); - xReturn = Reference< XIndexAccess >( static_cast< OWeakObject* >( pSubContainer ), UNO_QUERY ); - } - - return xReturn; -} - -// XUnoTunnel -sal_Int64 RootItemContainer::getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& rIdentifier ) throw(::com::sun::star::uno::RuntimeException) -{ - if( ( rIdentifier.getLength() == 16 ) && ( 0 == rtl_compareMemory( RootItemContainer::GetUnoTunnelId().getConstArray(), rIdentifier.getConstArray(), 16 ) ) ) - return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >( this )); - return 0; -} - -const Sequence< sal_Int8 >& RootItemContainer::GetUnoTunnelId() throw() -{ - static ::com::sun::star::uno::Sequence< sal_Int8 > * pSeq = NULL; - if( !pSeq ) - { - ::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() ); - if( !pSeq ) - { - static ::com::sun::star::uno::Sequence< sal_Int8 > aSeq( 16 ); - rtl_createUuid( (sal_uInt8*)aSeq.getArray(), 0, sal_True ); - pSeq = &aSeq; - } - } - return *pSeq; -} - -RootItemContainer* RootItemContainer::GetImplementation( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rxIFace ) throw() -{ - ::com::sun::star::uno::Reference< ::com::sun::star::lang::XUnoTunnel > xUT( rxIFace, ::com::sun::star::uno::UNO_QUERY ); - return xUT.is() ? reinterpret_cast< RootItemContainer* >(sal::static_int_cast< sal_IntPtr >( - xUT->getSomething( RootItemContainer::GetUnoTunnelId() ))) : NULL; -} - -// XElementAccess -sal_Bool SAL_CALL RootItemContainer::hasElements() -throw ( RuntimeException ) -{ - ShareGuard aLock( m_aShareMutex ); - return ( !m_aItemVector.empty() ); -} - -// XIndexAccess -sal_Int32 SAL_CALL RootItemContainer::getCount() -throw ( RuntimeException ) -{ - ShareGuard aLock( m_aShareMutex ); - return m_aItemVector.size(); -} - -Any SAL_CALL RootItemContainer::getByIndex( sal_Int32 Index ) -throw ( IndexOutOfBoundsException, WrappedTargetException, RuntimeException ) -{ - ShareGuard aLock( m_aShareMutex ); - if ( sal_Int32( m_aItemVector.size()) > Index ) - return makeAny( m_aItemVector[Index] ); - else - throw IndexOutOfBoundsException( ::rtl::OUString(), (OWeakObject *)this ); -} - -// XIndexContainer -void SAL_CALL RootItemContainer::insertByIndex( sal_Int32 Index, const Any& aItem ) -throw ( IllegalArgumentException, IndexOutOfBoundsException, WrappedTargetException, RuntimeException ) -{ - Sequence< PropertyValue > aSeq; - if ( aItem >>= aSeq ) - { - ShareGuard aLock( m_aShareMutex ); - if ( sal_Int32( m_aItemVector.size()) == Index ) - m_aItemVector.push_back( aSeq ); - else if ( sal_Int32( m_aItemVector.size()) >Index ) - { - std::vector< Sequence< PropertyValue > >::iterator aIter = m_aItemVector.begin(); - aIter += Index; - m_aItemVector.insert( aIter, aSeq ); - } - else - throw IndexOutOfBoundsException( ::rtl::OUString(), (OWeakObject *)this ); - } - else - throw IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( WRONG_TYPE_EXCEPTION )), - (OWeakObject *)this, 2 ); -} - -void SAL_CALL RootItemContainer::removeByIndex( sal_Int32 Index ) -throw ( IndexOutOfBoundsException, WrappedTargetException, RuntimeException ) -{ - ShareGuard aLock( m_aShareMutex ); - if ( (sal_Int32)m_aItemVector.size() > Index ) - { - std::vector< Sequence< PropertyValue > >::iterator aIter = m_aItemVector.begin(); - aIter += Index; - m_aItemVector.erase( aIter ); - } - else - throw IndexOutOfBoundsException( ::rtl::OUString(), (OWeakObject *)this ); -} - -void SAL_CALL RootItemContainer::replaceByIndex( sal_Int32 Index, const Any& aItem ) -throw ( IllegalArgumentException, IndexOutOfBoundsException, WrappedTargetException, RuntimeException ) -{ - Sequence< PropertyValue > aSeq; - if ( aItem >>= aSeq ) - { - ShareGuard aLock( m_aShareMutex ); - if ( sal_Int32( m_aItemVector.size()) > Index ) - m_aItemVector[Index] = aSeq; - else - throw IndexOutOfBoundsException( ::rtl::OUString(), (OWeakObject *)this ); - } - else - throw IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( WRONG_TYPE_EXCEPTION )), - (OWeakObject *)this, 2 ); -} - -Reference< XInterface > SAL_CALL RootItemContainer::createInstanceWithContext( const Reference< XComponentContext >& ) -throw ( Exception, RuntimeException) -{ - return (OWeakObject *)(new ItemContainer( m_aShareMutex )); -} - -Reference< XInterface > SAL_CALL RootItemContainer::createInstanceWithArgumentsAndContext( const Sequence< Any >&, const Reference< XComponentContext >& ) -throw (Exception, RuntimeException) -{ - return (OWeakObject *)(new ItemContainer( m_aShareMutex )); -} - -// XPropertySet helper -sal_Bool SAL_CALL RootItemContainer::convertFastPropertyValue( Any& aConvertedValue , - Any& aOldValue , - sal_Int32 nHandle , - const Any& aValue ) -throw( com::sun::star::lang::IllegalArgumentException ) -{ - // Initialize state with FALSE !!! - // (Handle can be invalid) - sal_Bool bReturn = sal_False; - - switch( nHandle ) - { - case PROPHANDLE_UINAME: - bReturn = PropHelper::willPropertyBeChanged( - com::sun::star::uno::makeAny(m_aUIName), - aValue, - aOldValue, - aConvertedValue); - break; - } - - // Return state of operation. - return bReturn ; -} - -void SAL_CALL RootItemContainer::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle , - const com::sun::star::uno::Any& aValue ) -throw( com::sun::star::uno::Exception ) -{ - switch( nHandle ) - { - case PROPHANDLE_UINAME: - aValue >>= m_aUIName; - break; - } -} - -void SAL_CALL RootItemContainer::getFastPropertyValue( com::sun::star::uno::Any& aValue , - sal_Int32 nHandle ) const -{ - switch( nHandle ) - { - case PROPHANDLE_UINAME: - aValue <<= m_aUIName; - break; - } -} - -::cppu::IPropertyArrayHelper& SAL_CALL RootItemContainer::getInfoHelper() -{ - // Optimize this method ! - // We initialize a static variable only one time. And we don't must use a mutex at every call! - // For the first call; pInfoHelper is NULL - for the second call pInfoHelper is different from NULL! - static ::cppu::OPropertyArrayHelper* pInfoHelper = NULL; - - if( pInfoHelper == NULL ) - { - // Ready for multithreading - osl::MutexGuard aGuard( osl::Mutex::getGlobalMutex() ) ; - - // Control this pointer again, another instance can be faster then these! - if( pInfoHelper == NULL ) - { - // Define static member to give structure of properties to baseclass "OPropertySetHelper". - // "impl_getStaticPropertyDescriptor" is a non exported and static funtion, who will define a static propertytable. - // "sal_True" say: Table is sorted by name. - static ::cppu::OPropertyArrayHelper aInfoHelper( impl_getStaticPropertyDescriptor(), sal_True ); - pInfoHelper = &aInfoHelper; - } - } - - return(*pInfoHelper); -} - -com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo > SAL_CALL RootItemContainer::getPropertySetInfo() -throw (::com::sun::star::uno::RuntimeException) -{ - // Optimize this method ! - // We initialize a static variable only one time. And we don't must use a mutex at every call! - // For the first call; pInfo is NULL - for the second call pInfo is different from NULL! - static com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo >* pInfo = NULL; - - if( pInfo == NULL ) - { - // Ready for multithreading - osl::MutexGuard aGuard( osl::Mutex::getGlobalMutex() ) ; - // Control this pointer again, another instance can be faster then these! - if( pInfo == NULL ) - { - // Create structure of propertysetinfo for baseclass "OPropertySetHelper". - // (Use method "getInfoHelper()".) - static com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) ); - pInfo = &xInfo; - } - } - - return (*pInfo); -} - -const com::sun::star::uno::Sequence< com::sun::star::beans::Property > RootItemContainer::impl_getStaticPropertyDescriptor() -{ - // Create a new static property array to initialize sequence! - // Table of all predefined properties of this class. Its used from OPropertySetHelper-class! - // Don't forget to change the defines (see begin of this file), if you add, change or delete a property in this list!!! - // It's necessary for methods of OPropertySetHelper. - // ATTENTION: - // YOU MUST SORT FOLLOW TABLE BY NAME ALPHABETICAL !!! - - static const com::sun::star::beans::Property pProperties[] = - { - com::sun::star::beans::Property( PROPNAME_UINAME, PROPHANDLE_UINAME , - ::getCppuType((const rtl::OUString*)NULL), - com::sun::star::beans::PropertyAttribute::TRANSIENT ) - }; - // Use it to initialize sequence! - static const com::sun::star::uno::Sequence< com::sun::star::beans::Property > lPropertyDescriptor( pProperties, PROPCOUNT ); - // Return static "PropertyDescriptor" - return lPropertyDescriptor; -} - -} // namespace framework - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/framework/source/uielement/simpletextstatusbarcontroller.cxx b/framework/source/uielement/simpletextstatusbarcontroller.cxx index df968765a6e6..df968765a6e6 100644..100755 --- a/framework/source/uielement/simpletextstatusbarcontroller.cxx +++ b/framework/source/uielement/simpletextstatusbarcontroller.cxx diff --git a/framework/source/uielement/spinfieldtoolbarcontroller.cxx b/framework/source/uielement/spinfieldtoolbarcontroller.cxx index 32c1fbb0777e..02f9ab5ab644 100644..100755 --- a/framework/source/uielement/spinfieldtoolbarcontroller.cxx +++ b/framework/source/uielement/spinfieldtoolbarcontroller.cxx @@ -200,7 +200,7 @@ SpinfieldToolbarController::SpinfieldToolbarController( const Reference< XMultiServiceFactory >& rServiceManager, const Reference< XFrame >& rFrame, ToolBox* pToolbar, - USHORT nID, + sal_uInt16 nID, sal_Int32 nWidth, const ::rtl::OUString& aCommand ) : ComplexToolbarController( rServiceManager, rFrame, pToolbar, nID, aCommand ) diff --git a/framework/source/uielement/statusbar.cxx b/framework/source/uielement/statusbar.cxx index ea1734802417..ea1734802417 100644..100755 --- a/framework/source/uielement/statusbar.cxx +++ b/framework/source/uielement/statusbar.cxx diff --git a/framework/source/uielement/statusbarmanager.cxx b/framework/source/uielement/statusbarmanager.cxx index 0c26320ab174..70bcc6fae0b0 100644..100755 --- a/framework/source/uielement/statusbarmanager.cxx +++ b/framework/source/uielement/statusbarmanager.cxx @@ -36,7 +36,7 @@ //_________________________________________________________________________________________________________________ #include <threadhelp/threadhelpbase.hxx> #include <threadhelp/resetableguard.hxx> -#include <classes/sfxhelperfunctions.hxx> +#include <framework/sfxhelperfunctions.hxx> #include <macros/generic.hxx> #include <macros/xinterface.hxx> #include <macros/xtypeprovider.hxx> @@ -92,9 +92,9 @@ static const char ITEM_DESCRIPTOR_TYPE[] = "Type"; namespace framework { -static USHORT impl_convertItemStyleToItemBits( sal_Int16 nStyle ) +static sal_uInt16 impl_convertItemStyleToItemBits( sal_Int16 nStyle ) { - USHORT nItemBits( 0 ); + sal_uInt16 nItemBits( 0 ); if (( nStyle & css_ui::ItemStyle::ALIGN_RIGHT ) == css_ui::ItemStyle::ALIGN_RIGHT ) nItemBits |= SIB_RIGHT; @@ -362,9 +362,9 @@ void StatusBarManager::CreateControllers() if ( xProps.is() ) xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))) >>= xComponentContext; - for ( USHORT i = 0; i < m_pStatusBar->GetItemCount(); i++ ) + for ( sal_uInt16 i = 0; i < m_pStatusBar->GetItemCount(); i++ ) { - USHORT nId = m_pStatusBar->GetItemId( i ); + sal_uInt16 nId = m_pStatusBar->GetItemId( i ); if ( nId == 0 ) continue; @@ -470,7 +470,7 @@ void StatusBarManager::FillStatusBar( const uno::Reference< container::XIndexAcc if ( m_bDisposed || !m_pStatusBar ) return; - USHORT nId( 1 ); + sal_uInt16 nId( 1 ); rtl::OUString aHelpIdPrefix( RTL_CONSTASCII_USTRINGPARAM( HELPID_PREFIX )); RemoveControllers(); @@ -525,21 +525,11 @@ void StatusBarManager::FillStatusBar( const uno::Reference< container::XIndexAcc if (( nType == ::com::sun::star::ui::ItemType::DEFAULT ) && ( aCommandURL.getLength() > 0 )) { rtl::OUString aString( RetrieveLabelFromCommand( aCommandURL )); - USHORT nItemBits( impl_convertItemStyleToItemBits( nStyle )); + sal_uInt16 nItemBits( impl_convertItemStyleToItemBits( nStyle )); m_pStatusBar->InsertItem( nId, nWidth, nItemBits, nOffset ); m_pStatusBar->SetItemCommand( nId, aCommandURL ); m_pStatusBar->SetAccessibleName( nId, aString ); -// m_pStatusBar->SetHelpText( nId, aString ); - - if ( aHelpURL.indexOf( aHelpIdPrefix ) == 0 ) - { - rtl::OUString aId( aHelpURL.copy( HELPID_PREFIX_LENGTH )); - sal_uInt16 nHelpId = (sal_uInt16)(aId.toInt32()); - if ( nHelpId > 0 ) - m_pStatusBar->SetHelpId( nId, nHelpId ); - } - ++nId; } } @@ -593,7 +583,7 @@ void StatusBarManager::UserDraw( const UserDrawEvent& rUDEvt ) if ( m_bDisposed ) return; - USHORT nId( rUDEvt.GetItemId() ); + sal_uInt16 nId( rUDEvt.GetItemId() ); if (( nId > 0 ) && ( nId <= m_aControllerVector.size() )) { uno::Reference< frame::XStatusbarController > xController( @@ -623,7 +613,7 @@ void StatusBarManager::Command( const CommandEvent& rEvt ) if ( rEvt.GetCommand() == COMMAND_CONTEXTMENU ) { - USHORT nId = m_pStatusBar->GetItemId( rEvt.GetMousePosPixel() ); + sal_uInt16 nId = m_pStatusBar->GetItemId( rEvt.GetMousePosPixel() ); if (( nId > 0 ) && ( nId <= m_aControllerVector.size() )) { uno::Reference< frame::XStatusbarController > xController( @@ -651,7 +641,7 @@ void StatusBarManager::MouseButton( const MouseEvent& rMEvt ,sal_Bool ( SAL_CALL if ( !m_bDisposed ) { - USHORT nId = m_pStatusBar->GetItemId( rMEvt.GetPosPixel() ); + sal_uInt16 nId = m_pStatusBar->GetItemId( rMEvt.GetPosPixel() ); if (( nId > 0 ) && ( nId <= m_aControllerVector.size() )) { uno::Reference< frame::XStatusbarController > xController( @@ -687,7 +677,7 @@ IMPL_LINK( StatusBarManager, Click, StatusBar*, EMPTYARG ) if ( m_bDisposed ) return 1; - USHORT nId = m_pStatusBar->GetCurItemId(); + sal_uInt16 nId = m_pStatusBar->GetCurItemId(); if (( nId > 0 ) && ( nId <= m_aControllerVector.size() )) { uno::Reference< frame::XStatusbarController > xController( @@ -706,7 +696,7 @@ IMPL_LINK( StatusBarManager, DoubleClick, StatusBar*, EMPTYARG ) if ( m_bDisposed ) return 1; - USHORT nId = m_pStatusBar->GetCurItemId(); + sal_uInt16 nId = m_pStatusBar->GetCurItemId(); if (( nId > 0 ) && ( nId <= m_aControllerVector.size() )) { uno::Reference< frame::XStatusbarController > xController( diff --git a/framework/source/uielement/statusbarwrapper.cxx b/framework/source/uielement/statusbarwrapper.cxx index e22b047045e5..0281e1be4d88 100644..100755 --- a/framework/source/uielement/statusbarwrapper.cxx +++ b/framework/source/uielement/statusbarwrapper.cxx @@ -35,7 +35,7 @@ // my own includes //_________________________________________________________________________________________________________________ #include <threadhelp/resetableguard.hxx> -#include <helper/actiontriggerhelper.hxx> +#include <framework/actiontriggerhelper.hxx> #include <uielement/constitemcontainer.hxx> #include <uielement/rootitemcontainer.hxx> #include <uielement/statusbar.hxx> @@ -130,7 +130,7 @@ void SAL_CALL StatusBarWrapper::initialize( const Sequence< Any >& aArguments ) Window* pWindow = VCLUnoHelper::GetWindow( xFrame->getContainerWindow() ); if ( pWindow ) { - ULONG nStyles = WinBits( WB_LEFT | WB_3DLOOK ); + sal_uLong nStyles = WinBits( WB_LEFT | WB_3DLOOK ); pStatusBar = new FrameworkStatusBar( pWindow, nStyles ); pStatusBarManager = new StatusBarManager( m_xServiceFactory, xFrame, m_aResourceURL, pStatusBar ); diff --git a/framework/source/uielement/statusindicatorinterfacewrapper.cxx b/framework/source/uielement/statusindicatorinterfacewrapper.cxx index 28bc86fb49b5..28bc86fb49b5 100644..100755 --- a/framework/source/uielement/statusindicatorinterfacewrapper.cxx +++ b/framework/source/uielement/statusindicatorinterfacewrapper.cxx diff --git a/framework/source/uielement/togglebuttontoolbarcontroller.cxx b/framework/source/uielement/togglebuttontoolbarcontroller.cxx index e15a63c20f74..0e310669b0fd 100644..100755 --- a/framework/source/uielement/togglebuttontoolbarcontroller.cxx +++ b/framework/source/uielement/togglebuttontoolbarcontroller.cxx @@ -34,7 +34,7 @@ //_________________________________________________________________________________________________________________ // my own includes //_________________________________________________________________________________________________________________ -#include <classes/addonsoptions.hxx> +#include <framework/addonsoptions.hxx> #include "uielement/toolbar.hxx" //_________________________________________________________________________________________________________________ @@ -82,7 +82,7 @@ ToggleButtonToolbarController::ToggleButtonToolbarController( const Reference< XMultiServiceFactory >& rServiceManager, const Reference< XFrame >& rFrame, ToolBox* pToolbar, - USHORT nID, + sal_uInt16 nID, Style eStyle, const ::rtl::OUString& aCommand ) : ComplexToolbarController( rServiceManager, rFrame, pToolbar, nID, aCommand ), @@ -146,10 +146,10 @@ throw (::com::sun::star::uno::RuntimeException) aPopup.CheckItem( sal_uInt16( i+1 ), sal_False ); } - m_pToolbar->SetItemDown( m_nID, TRUE ); + m_pToolbar->SetItemDown( m_nID, sal_True ); aPopup.SetSelectHdl( LINK( this, ToggleButtonToolbarController, MenuSelectHdl )); aPopup.Execute( m_pToolbar, m_pToolbar->GetItemRect( m_nID )); - m_pToolbar->SetItemDown( m_nID, FALSE ); + m_pToolbar->SetItemDown( m_nID, sal_False ); } return xWindow; diff --git a/framework/source/uielement/toolbar.cxx b/framework/source/uielement/toolbar.cxx index b0ea29a997de..b0ea29a997de 100644..100755 --- a/framework/source/uielement/toolbar.cxx +++ b/framework/source/uielement/toolbar.cxx diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index 02120e10afbe..7cddd4b566f9 100644..100755 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -41,13 +41,13 @@ #include "services.h" #include "general.h" #include "properties.h" -#include <helper/imageproducer.hxx> -#include <classes/sfxhelperfunctions.hxx> +#include <framework/imageproducer.hxx> +#include <framework/sfxhelperfunctions.hxx> #include <classes/fwkresid.hxx> #include <classes/resource.hrc> -#include <classes/addonsoptions.hxx> +#include <framework/addonsoptions.hxx> #include <uielement/toolbarmerger.hxx> -#include <helper/acceleratorinfo.hxx> +#include <framework/acceleratorinfo.hxx> //_________________________________________________________________________________________________________________ // interface includes @@ -135,7 +135,7 @@ static const sal_Int32 ITEM_DESCRIPTOR_STYLE_LEN = RTL_CONSTASCII_LENGTH(I static const char HELPID_PREFIX[] = "helpid:"; static const char HELPID_PREFIX_TESTTOOL[] = ".HelpId:"; -static const USHORT STARTID_CUSTOMIZE_POPUPMENU = 1000; +static const sal_uInt16 STARTID_CUSTOMIZE_POPUPMENU = 1000; #define MENUPREFIX "private:resource/menubar/" @@ -283,7 +283,7 @@ ToolBarManager::ToolBarManager( const Reference< XMultiServiceFactory >& rServic // enables a menu for clipped items and customization SvtCommandOptions aCmdOptions; - USHORT nMenuType = TOOLBOX_MENUTYPE_CLIPPEDITEMS; + sal_uInt16 nMenuType = TOOLBOX_MENUTYPE_CLIPPEDITEMS; if ( !aCmdOptions.Lookup( SvtCommandOptions::CMDOPTION_DISABLED, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CreateDialog")))) nMenuType |= TOOLBOX_MENUTYPE_CUSTOMIZE; //added for issue33668 by shizhoubo @@ -297,10 +297,10 @@ ToolBarManager::ToolBarManager( const Reference< XMultiServiceFactory >& rServic // set name for testtool, the useful part is after the last '/' sal_Int32 idx = rResourceName.lastIndexOf('/'); idx++; // will become 0 if '/' not found: use full string - ::rtl::OUString aHelpIdAsString( RTL_CONSTASCII_USTRINGPARAM( HELPID_PREFIX_TESTTOOL )); + ::rtl::OString aHelpIdAsString( HELPID_PREFIX_TESTTOOL ); ::rtl::OUString aToolbarName = rResourceName.copy( idx ); - aHelpIdAsString += aToolbarName; - m_pToolBar->SetSmartHelpId( SmartId( aHelpIdAsString ) ); + aHelpIdAsString += rtl::OUStringToOString( aToolbarName, RTL_TEXTENCODING_UTF8 );; + m_pToolBar->SetHelpId( aHelpIdAsString ); m_aAsyncUpdateControllersTimer.SetTimeout( 50 ); m_aAsyncUpdateControllersTimer.SetTimeoutHdl( LINK( this, ToolBarManager, AsyncUpdateControllersHdl ) ); @@ -390,9 +390,9 @@ void ToolBarManager::RefreshImages() ResetableGuard aGuard( m_aLock ); sal_Bool bBigImages( SvtMiscOptions().AreCurrentSymbolsLarge() ); - for ( USHORT nPos = 0; nPos < m_pToolBar->GetItemCount(); nPos++ ) + for ( sal_uInt16 nPos = 0; nPos < m_pToolBar->GetItemCount(); nPos++ ) { - USHORT nId( m_pToolBar->GetItemId( nPos ) ); + sal_uInt16 nId( m_pToolBar->GetItemId( nPos ) ); if ( nId > 0 ) { @@ -442,9 +442,9 @@ void ToolBarManager::UpdateImageOrientation() } } - for ( USHORT nPos = 0; nPos < m_pToolBar->GetItemCount(); nPos++ ) + for ( sal_uInt16 nPos = 0; nPos < m_pToolBar->GetItemCount(); nPos++ ) { - USHORT nId = m_pToolBar->GetItemId( nPos ); + sal_uInt16 nId = m_pToolBar->GetItemId( nPos ); if ( nId > 0 ) { rtl::OUString aCmd = m_pToolBar->GetItemCommand( nId ); @@ -454,7 +454,7 @@ void ToolBarManager::UpdateImageOrientation() { if ( pIter->second.bRotated ) { - m_pToolBar->SetItemImageMirrorMode( nId, FALSE ); + m_pToolBar->SetItemImageMirrorMode( nId, sal_False ); m_pToolBar->SetItemImageAngle( nId, m_lImageRotation ); } if ( pIter->second.bMirrored ) @@ -796,7 +796,7 @@ void ToolBarManager::impl_elementChanged(bool _bRemove,const ::com::sun::star::u } void ToolBarManager::setToolBarImage(const Image& _aImage,const CommandToInfoMap::const_iterator& _pIter) { - const ::std::vector< USHORT >& _rIDs = _pIter->second.aIds; + const ::std::vector< sal_uInt16 >& _rIDs = _pIter->second.aIds; m_pToolBar->SetItemImage( _pIter->second.nId, _aImage ); ::std::for_each(_rIDs.begin(),_rIDs.end(),::boost::bind(&ToolBar::SetItemImage,m_pToolBar,_1,_aImage)); } @@ -931,22 +931,22 @@ void ToolBarManager::CreateControllers() if ( xProps.is() ) xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))) >>= xComponentContext; - for ( USHORT i = 0; i < m_pToolBar->GetItemCount(); i++ ) + for ( sal_uInt16 i = 0; i < m_pToolBar->GetItemCount(); i++ ) { - USHORT nId = m_pToolBar->GetItemId( i ); + sal_uInt16 nId = m_pToolBar->GetItemId( i ); if ( nId == 0 ) continue; - sal_Int16 nWidth( sal_Int16( m_pToolBar->GetHelpId( nId ))); rtl::OUString aLoadURL( RTL_CONSTASCII_USTRINGPARAM( ".uno:OpenUrl" )); rtl::OUString aCommandURL( m_pToolBar->GetItemCommand( nId )); sal_Bool bInit( sal_True ); sal_Bool bCreate( sal_True ); Reference< XStatusListener > xController; + CommandToInfoMap::iterator pCommandIter = m_aCommandMap.find( aCommandURL ); + sal_Int16 nWidth = ( pCommandIter != m_aCommandMap.end() ? pCommandIter->second.nWidth : 0 ); svt::ToolboxController* pController( 0 ); - m_pToolBar->SetHelpId( nId, 0 ); // reset value again if ( bHasDisabledEntries ) { aURL.Complete = aCommandURL; @@ -1228,7 +1228,7 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine if ( m_bDisposed ) return; - USHORT nId( 1 ); + sal_uInt16 nId( 1 ); ::rtl::OUString aHelpIdPrefix( RTL_CONSTASCII_USTRINGPARAM( HELPID_PREFIX )); Reference< XModuleManager > xModuleManager( Reference< XModuleManager >( @@ -1395,6 +1395,7 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine if ( pIter == m_aCommandMap.end()) { aCmdInfo.nId = nId; + aCmdInfo.nWidth = nWidth; m_aCommandMap.insert( CommandToInfoMap::value_type( aCommandURL, aCmdInfo )); } else @@ -1402,9 +1403,6 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine pIter->second.aIds.push_back( nId ); } - // Add additional information for the controller to the obsolete help id - m_pToolBar->SetHelpId( ULONG( nWidth )); - if ( !bIsVisible ) m_pToolBar->HideItem( nId ); @@ -1619,7 +1617,7 @@ long ToolBarManager::HandleClick(void ( SAL_CALL XToolbarController::*_pClick )( if ( m_bDisposed ) return 1; - USHORT nId( m_pToolBar->GetCurItemId() ); + sal_uInt16 nId( m_pToolBar->GetCurItemId() ); ToolBarControllerMap::const_iterator pIter = m_aControllerMap.find( nId ); if ( pIter != m_aControllerMap.end() ) { @@ -1643,7 +1641,7 @@ IMPL_LINK( ToolBarManager, DropdownClick, ToolBox*, EMPTYARG ) if ( m_bDisposed ) return 1; - USHORT nId( m_pToolBar->GetCurItemId() ); + sal_uInt16 nId( m_pToolBar->GetCurItemId() ); ToolBarControllerMap::const_iterator pIter = m_aControllerMap.find( nId ); if ( pIter != m_aControllerMap.end() ) { @@ -1683,7 +1681,7 @@ void ToolBarManager::ImplClearPopupMenu( ToolBox *pToolBar ) } // remove all items that were not added by the toolbar itself - USHORT i; + sal_uInt16 i; for( i=0; i<pMenu->GetItemCount(); ) { if( pMenu->GetItemId( i ) < TOOLBOX_MENUITEM_START ) @@ -1769,7 +1767,7 @@ PopupMenu * ToolBarManager::GetToolBarCustomMeun(ToolBox* pToolBar) if ( m_pToolBar->IsCustomize() ) { - USHORT nPos( 0 ); + sal_uInt16 nPos( 0 ); PopupMenu* pItemMenu( aPopupMenu.GetPopupMenu( 1 )); sal_Bool bIsFloating( sal_False ); @@ -1810,7 +1808,7 @@ PopupMenu * ToolBarManager::GetToolBarCustomMeun(ToolBox* pToolBar) { if ( m_pToolBar->GetItemType(nPos) == TOOLBOXITEM_BUTTON ) { - USHORT nId = m_pToolBar->GetItemId(nPos); + sal_uInt16 nId = m_pToolBar->GetItemId(nPos); ::rtl::OUString aCommandURL = m_pToolBar->GetItemCommand( nId ); pItemMenu->InsertItem( STARTID_CUSTOMIZE_POPUPMENU+nPos, m_pToolBar->GetItemText( nId ), MIB_CHECKABLE ); pItemMenu->CheckItem( STARTID_CUSTOMIZE_POPUPMENU+nPos, m_pToolBar->IsItemVisible( nId ) ); @@ -1827,7 +1825,7 @@ PopupMenu * ToolBarManager::GetToolBarCustomMeun(ToolBox* pToolBar) } else { - USHORT nPos = aPopupMenu.GetItemPos( MENUITEM_TOOLBAR_CUSTOMIZETOOLBAR ); + sal_uInt16 nPos = aPopupMenu.GetItemPos( MENUITEM_TOOLBAR_CUSTOMIZETOOLBAR ); if ( nPos != MENU_ITEM_NOTFOUND ) aPopupMenu.RemoveItem( nPos ); } @@ -1836,7 +1834,7 @@ PopupMenu * ToolBarManager::GetToolBarCustomMeun(ToolBox* pToolBar) if( pMenu->GetItemCount() ) pMenu->InsertSeparator(); - USHORT i; + sal_uInt16 i; for( i=0; i< aPopupMenu.GetItemCount(); i++) { sal_uInt16 nId = aPopupMenu.GetItemId( i ); @@ -1995,7 +1993,7 @@ IMPL_LINK( ToolBarManager, MenuSelect, Menu*, pMenu ) default: { - USHORT nId = pMenu->GetCurItemId(); + sal_uInt16 nId = pMenu->GetCurItemId(); if(( nId > 0 ) && ( nId < TOOLBOX_MENUITEM_START )) { // toggle toolbar button visibility @@ -2077,7 +2075,7 @@ IMPL_LINK( ToolBarManager, Select, ToolBox*, EMPTYARG ) return 1; sal_Int16 nKeyModifier( (sal_Int16)m_pToolBar->GetModifier() ); - USHORT nId( m_pToolBar->GetCurItemId() ); + sal_uInt16 nId( m_pToolBar->GetCurItemId() ); ToolBarControllerMap::const_iterator pIter = m_aControllerMap.find( nId ); if ( pIter != m_aControllerMap.end() ) @@ -2136,9 +2134,9 @@ IMPL_LINK( ToolBarManager, DataChanged, DataChangedEvent*, pDataChangedEvent ) CheckAndUpdateImages(); } - for ( USHORT nPos = 0; nPos < m_pToolBar->GetItemCount(); ++nPos ) + for ( sal_uInt16 nPos = 0; nPos < m_pToolBar->GetItemCount(); ++nPos ) { - const USHORT nId = m_pToolBar->GetItemId(nPos); + const sal_uInt16 nId = m_pToolBar->GetItemId(nPos); Window* pWindow = m_pToolBar->GetItemWindow( nId ); if ( pWindow ) { diff --git a/framework/source/uielement/toolbarmerger.cxx b/framework/source/uielement/toolbarmerger.cxx index a80415bcb9b0..c5745e33c586 100644..100755 --- a/framework/source/uielement/toolbarmerger.cxx +++ b/framework/source/uielement/toolbarmerger.cxx @@ -31,7 +31,7 @@ #include <uielement/toolbarmerger.hxx> #include <uielement/generictoolbarcontroller.hxx> -#include <helper/imageproducer.hxx> +#include <framework/imageproducer.hxx> #include <svtools/miscopt.hxx> @@ -87,7 +87,7 @@ static const char TOOLBARCONTROLLER_TOGGLEDDBTN[] = "ToggleDropdownButto static const sal_uInt32 TOOLBARCONTROLLER_TOGGLEDDBTN_LEN = 20; static const char TOOLBOXITEM_SEPARATOR_STR[] = "private:separator"; -static const USHORT TOOLBOXITEM_SEPARATOR_STR_LEN = sizeof( TOOLBOXITEM_SEPARATOR_STR )-1; +static const sal_uInt16 TOOLBOXITEM_SEPARATOR_STR_LEN = sizeof( TOOLBOXITEM_SEPARATOR_STR )-1; using namespace ::com::sun::star; @@ -513,7 +513,6 @@ bool ToolBarMerger::MergeItems( pToolbar->InsertSeparator( sal_uInt16( nInsPos )); else { - ToolBarMerger::CreateToolbarItem( pToolbar, sal_uInt16( nInsPos ), rItemId, rItem ); CommandToInfoMap::iterator pIter = rCommandMap.find( rItem.aCommandURL ); if ( pIter == rCommandMap.end()) { @@ -525,6 +524,8 @@ bool ToolBarMerger::MergeItems( { pIter->second.aIds.push_back( rItemId ); } + + ToolBarMerger::CreateToolbarItem( pToolbar, rCommandMap, sal_uInt16( nInsPos ), rItemId, rItem ); } ++nIndex; @@ -692,7 +693,7 @@ bool ToolBarMerger::RemoveItems( return pResult; } -void ToolBarMerger::CreateToolbarItem( ToolBox* pToolbar, sal_uInt16 nPos, sal_uInt16 nItemId, const AddonToolbarItem& rItem ) +void ToolBarMerger::CreateToolbarItem( ToolBox* pToolbar, CommandToInfoMap& rCommandMap, sal_uInt16 nPos, sal_uInt16 nItemId, const AddonToolbarItem& rItem ) { pToolbar->InsertItem( nItemId, rItem.aLabel, 0, nPos ); pToolbar->SetItemCommand( nItemId, rItem.aCommandURL ); @@ -701,8 +702,9 @@ void ToolBarMerger::CreateToolbarItem( ToolBox* pToolbar, sal_uInt16 nPos, sal_u pToolbar->EnableItem( nItemId, sal_True ); pToolbar->SetItemState( nItemId, STATE_NOCHECK ); - // Use obsolete help id to transport the width of the item - pToolbar->SetHelpId( nItemId, rItem.nWidth ); + CommandToInfoMap::iterator pIter = rCommandMap.find( rItem.aCommandURL ); + if ( pIter != rCommandMap.end() ) + pIter->second.nWidth = rItem.nWidth; // Use the user data to store add-on specific data with the toolbar item AddonsParams* pAddonParams = new AddonsParams; diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx index a8619dd3e628..46a8258828cf 100644..100755 --- a/framework/source/uielement/toolbarsmenucontroller.cxx +++ b/framework/source/uielement/toolbarsmenucontroller.cxx @@ -40,8 +40,8 @@ #include <classes/resource.hrc> #include <classes/fwkresid.hxx> #include <uiconfiguration/windowstateconfiguration.hxx> -#include <helper/imageproducer.hxx> -#include <classes/sfxhelperfunctions.hxx> +#include <framework/imageproducer.hxx> +#include <framework/sfxhelperfunctions.hxx> //_________________________________________________________________________________________________________________ // interface includes @@ -175,9 +175,9 @@ ToolbarsMenuController::~ToolbarsMenuController() } void ToolbarsMenuController::addCommand( - Reference< css::awt::XPopupMenu >& rPopupMenu, const rtl::OUString& rCommandURL, USHORT nHelpId, const rtl::OUString& rLabel ) + Reference< css::awt::XPopupMenu >& rPopupMenu, const rtl::OUString& rCommandURL, const rtl::OUString& rLabel ) { - USHORT nItemId = m_xPopupMenu->getItemCount()+1; + sal_uInt16 nItemId = m_xPopupMenu->getItemCount()+1; rtl::OUString aLabel; if ( rLabel.getLength() == 0 ) @@ -202,7 +202,7 @@ void ToolbarsMenuController::addCommand( const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); if ( rSettings.GetUseImagesInMenus() ) - aImage = GetImageFromURL( m_xFrame, rCommandURL, FALSE ); + aImage = GetImageFromURL( m_xFrame, rCommandURL, false ); VCLXPopupMenu* pPopupMenu = (VCLXPopupMenu *)VCLXPopupMenu::GetImplementation( rPopupMenu ); if ( pPopupMenu ) @@ -210,7 +210,6 @@ void ToolbarsMenuController::addCommand( PopupMenu* pVCLPopupMenu = (PopupMenu *)pPopupMenu->GetMenu(); if ( !!aImage ) pVCLPopupMenu->SetItemImage( nItemId, aImage ); - pVCLPopupMenu->SetHelpId( nItemId, nHelpId ); } m_aCommandVector.push_back( rCommandURL ); @@ -469,7 +468,7 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r const sal_uInt32 nCount = aSortedTbs.size(); for ( sal_uInt32 i = 0; i < nCount; i++ ) { - USHORT nItemCount = m_xPopupMenu->getItemCount(); + sal_uInt16 nItemCount = m_xPopupMenu->getItemCount(); m_xPopupMenu->insertItem( nIndex, aSortedTbs[i].aUIName, css::awt::MenuItemStyle::CHECKABLE, nItemCount ); if ( aSortedTbs[i].bVisible ) m_xPopupMenu->checkItem( nIndex, sal_True ); @@ -479,7 +478,7 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r VCLXPopupMenu* pXPopupMenu = (VCLXPopupMenu *)VCLXMenu::GetImplementation( m_xPopupMenu ); PopupMenu* pVCLPopupMenu = (PopupMenu *)pXPopupMenu->GetMenu(); - pVCLPopupMenu->SetUserValue( nIndex, ULONG( aSortedTbs[i].bContextSensitive ? 1L : 0L )); + pVCLPopupMenu->SetUserValue( nIndex, sal_uIntPtr( aSortedTbs[i].bContextSensitive ? 1L : 0L )); } // use VCL popup menu pointer to set vital information that are not part of the awt implementation @@ -507,11 +506,11 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r { if ( m_aModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.DrawingDocument" ) ) || m_aModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.presentation.PresentationDocument" ) )) - addCommand( m_xPopupMenu, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( CMD_COLORBAR )), 10417, aEmptyString ); + addCommand( m_xPopupMenu, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( CMD_COLORBAR )), aEmptyString ); else if ( m_aModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.sheet.SpreadsheetDocument" ) )) - addCommand( m_xPopupMenu, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( CMD_INPUTLINEBAR )), 26241, aEmptyString ); + addCommand( m_xPopupMenu, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( CMD_INPUTLINEBAR )), aEmptyString ); else - addCommand( m_xPopupMenu, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( CMD_FORMULABAR )), 20128, aEmptyString ); + addCommand( m_xPopupMenu, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( CMD_FORMULABAR )), aEmptyString ); } sal_Bool bAddCommand( sal_True ); @@ -530,11 +529,11 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r // Create command for configure if ( m_xPopupMenu->getItemCount() > 0 ) { - USHORT nItemCount = m_xPopupMenu->getItemCount(); + sal_uInt16 nItemCount = m_xPopupMenu->getItemCount(); m_xPopupMenu->insertSeparator( nItemCount+1 ); } - addCommand( m_xPopupMenu, aConfigureToolbar, 5904, aEmptyString ); + addCommand( m_xPopupMenu, aConfigureToolbar, aEmptyString ); } // Add separator if no configure has been added @@ -543,14 +542,14 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r // Create command for configure if ( m_xPopupMenu->getItemCount() > 0 ) { - USHORT nItemCount = m_xPopupMenu->getItemCount(); + sal_uInt16 nItemCount = m_xPopupMenu->getItemCount(); m_xPopupMenu->insertSeparator( nItemCount+1 ); } } String aLabelStr = String( FwkResId( STR_RESTORE_TOOLBARS )); rtl::OUString aRestoreCmd( RTL_CONSTASCII_USTRINGPARAM( CMD_RESTOREVISIBILITY )); - addCommand( m_xPopupMenu, aRestoreCmd, 9999, aLabelStr ); + addCommand( m_xPopupMenu, aRestoreCmd, aLabelStr ); } } @@ -590,9 +589,9 @@ void SAL_CALL ToolbarsMenuController::statusChanged( const FeatureStateEvent& Ev VCLXPopupMenu* pXPopupMenu = (VCLXPopupMenu *)VCLXMenu::GetImplementation( xPopupMenu ); PopupMenu* pVCLPopupMenu = (PopupMenu *)pXPopupMenu->GetMenu(); - for ( USHORT i = 0; i < pVCLPopupMenu->GetItemCount(); i++ ) + for ( sal_uInt16 i = 0; i < pVCLPopupMenu->GetItemCount(); i++ ) { - USHORT nId = pVCLPopupMenu->GetItemId( i ); + sal_uInt16 nId = pVCLPopupMenu->GetItemId( i ); if ( nId == 0 ) continue; diff --git a/framework/source/uielement/toolbarwrapper.cxx b/framework/source/uielement/toolbarwrapper.cxx index c46966765a1b..d32ac97d186b 100644..100755 --- a/framework/source/uielement/toolbarwrapper.cxx +++ b/framework/source/uielement/toolbarwrapper.cxx @@ -35,7 +35,7 @@ #include <uielement/toolbarwrapper.hxx> #include <threadhelp/resetableguard.hxx> -#include <helper/actiontriggerhelper.hxx> +#include <framework/actiontriggerhelper.hxx> #include <uielement/constitemcontainer.hxx> #include <uielement/rootitemcontainer.hxx> #include <uielement/toolbarmanager.hxx> @@ -175,7 +175,7 @@ void SAL_CALL ToolBarWrapper::initialize( const Sequence< Any >& aArguments ) th Window* pWindow = VCLUnoHelper::GetWindow( xFrame->getContainerWindow() ); if ( pWindow ) { - ULONG nStyles = WB_LINESPACING | WB_BORDER | WB_SCROLL | WB_MOVEABLE | WB_3DLOOK | WB_DOCKABLE | WB_SIZEABLE | WB_CLOSEABLE; + sal_uLong nStyles = WB_LINESPACING | WB_BORDER | WB_SCROLL | WB_MOVEABLE | WB_3DLOOK | WB_DOCKABLE | WB_SIZEABLE | WB_CLOSEABLE; pToolBar = new ToolBar( pWindow, nStyles ); m_xToolBarWindow = VCLUnoHelper::GetInterface( pToolBar ); @@ -194,7 +194,7 @@ void SAL_CALL ToolBarWrapper::initialize( const Sequence< Any >& aArguments ) th // Fill toolbar with container contents pToolBarManager->FillToolbar( m_xConfigData ); pToolBar->SetOutStyle( SvtMiscOptions().GetToolboxStyle() ); - pToolBar->EnableCustomize( TRUE ); + pToolBar->EnableCustomize( sal_True ); ::Size aActSize( pToolBar->GetSizePixel() ); ::Size aSize( pToolBar->CalcWindowSizePixel() ); aSize.Width() = aActSize.Width(); @@ -209,7 +209,7 @@ void SAL_CALL ToolBarWrapper::initialize( const Sequence< Any >& aArguments ) th if ( pToolBar && pToolBarManager ) { pToolBar->SetOutStyle( SvtMiscOptions().GetToolboxStyle() ); - pToolBar->EnableCustomize( TRUE ); + pToolBar->EnableCustomize( sal_True ); ::Size aActSize( pToolBar->GetSizePixel() ); ::Size aSize( pToolBar->CalcWindowSizePixel() ); aSize.Width() = aActSize.Width(); diff --git a/framework/source/uielement/uicommanddescription.cxx b/framework/source/uielement/uicommanddescription.cxx index 073c08302959..d20d53c995cb 100644..100755 --- a/framework/source/uielement/uicommanddescription.cxx +++ b/framework/source/uielement/uicommanddescription.cxx @@ -145,6 +145,8 @@ class ConfigurationAccess_UICommand : // Order is neccessary for right initializ virtual void SAL_CALL disposing( const EventObject& aEvent ) throw(RuntimeException); protected: + virtual ::com::sun::star::uno::Any SAL_CALL getByNameImpl( const ::rtl::OUString& aName ); + struct CmdToInfoMap { CmdToInfoMap() : bPopup( false ), @@ -255,9 +257,9 @@ ConfigurationAccess_UICommand::~ConfigurationAccess_UICommand() xContainer->removeContainerListener(m_xConfigAccessListener); } + // XNameAccess -Any SAL_CALL ConfigurationAccess_UICommand::getByName( const ::rtl::OUString& rCommandURL ) -throw ( NoSuchElementException, WrappedTargetException, RuntimeException) +Any SAL_CALL ConfigurationAccess_UICommand::getByNameImpl( const ::rtl::OUString& rCommandURL ) { static sal_Int32 nRequests = 0; @@ -282,19 +284,24 @@ throw ( NoSuchElementException, WrappedTargetException, RuntimeException) else if ( rCommandURL.equalsIgnoreAsciiCaseAscii( UICOMMANDDESCRIPTION_NAMEACCESS_COMMANDMIRRORIMAGELIST )) return makeAny( m_aCommandMirrorImageList ); else - throw NoSuchElementException(); + return Any(); } else { // SAFE ++nRequests; - Any a = getInfoFromCommand( rCommandURL ); + return getInfoFromCommand( rCommandURL ); + } +} - if ( !a.hasValue() ) - throw NoSuchElementException(); +Any SAL_CALL ConfigurationAccess_UICommand::getByName( const ::rtl::OUString& rCommandURL ) +throw ( NoSuchElementException, WrappedTargetException, RuntimeException) +{ + Any aRet( getByNameImpl( rCommandURL ) ); + if( !aRet.hasValue() ) + throw NoSuchElementException(); - return a; - } + return aRet; } Sequence< ::rtl::OUString > SAL_CALL ConfigurationAccess_UICommand::getElementNames() @@ -306,7 +313,7 @@ throw ( RuntimeException ) sal_Bool SAL_CALL ConfigurationAccess_UICommand::hasByName( const ::rtl::OUString& rCommandURL ) throw (::com::sun::star::uno::RuntimeException) { - return getByName( rCommandURL ).hasValue(); + return getByNameImpl( rCommandURL ).hasValue(); } // XElementAccess @@ -472,7 +479,7 @@ Any ConfigurationAccess_UICommand::getInfoFromCommand( const rtl::OUString& rCom { // First try to ask our global commands configuration access. It also caches maybe // we find the entry in its cache first. - if ( m_xGenericUICommands.is() ) + if ( m_xGenericUICommands.is() && m_xGenericUICommands->hasByName( rCommandURL ) ) { try { |