/************************************************************************* * * 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 * * for a copy of the LGPLv3 License. * ************************************************************************/ #ifndef __FRAMEWORK_CLASSES_MENUMANAGER_HXX_ #define __FRAMEWORK_CLASSES_MENUMANAGER_HXX_ /** Attention: stl headers must(!) be included at first. Otherwhise it can make trouble with solaris headers ... */ #include //_________________________________________________________________________________________________________________ // interface includes //_________________________________________________________________________________________________________________ #include #include #include #include #include //_________________________________________________________________________________________________________________ // other includes //_________________________________________________________________________________________________________________ #include #include #include #include #include #include // #110897# #include #define REFERENCE ::com::sun::star::uno::Reference #define XFRAME ::com::sun::star::frame::XFrame #define XDISPATCH ::com::sun::star::frame::XDispatch #define XDISPATCHPROVIDER ::com::sun::star::frame::XDispatchProvider #define XSTATUSLISTENER ::com::sun::star::frame::XStatusListener #define XEVENTLISTENER ::com::sun::star::lang::XEventListener #define FEATURSTATEEVENT ::com::sun::star::frame::FeatureStateEvent #define RUNTIMEEXCEPTION ::com::sun::star::uno::RuntimeException #define EVENTOBJECT ::com::sun::star::lang::EventObject namespace framework { class BmkMenu; class AddonMenu; class AddonPopupMenu; class MenuManager : public ThreadHelpBase , public ::cppu::WeakImplHelper1< ::com::sun::star::frame::XStatusListener > { public: // #110897# MenuManager( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory, REFERENCE< XFRAME >& rFrame, Menu* pMenu, sal_Bool bDelete, sal_Bool bDeleteChildren ); MenuManager( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory, REFERENCE< XFRAME >& rFrame, AddonMenu* pAddonMenu, sal_Bool bDelete, sal_Bool bDeleteChildren ); virtual ~MenuManager(); // XStatusListener virtual void SAL_CALL statusChanged( const FEATURSTATEEVENT& Event ) throw ( RUNTIMEEXCEPTION ); // XEventListener virtual void SAL_CALL disposing( const EVENTOBJECT& Source ) throw ( RUNTIMEEXCEPTION ); DECL_LINK( Select, Menu * ); Menu* GetMenu() const { return m_pVCLMenu; } void RemoveListener(); // #110897# const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& getServiceFactory(); static void UpdateSpecialWindowMenu( Menu* pMenu ,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,IMutex& _rMutex); static void FillMenuImages(::com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& xFrame,Menu* _pMenu,sal_Bool bIsHiContrast,sal_Bool bShowMenuImages); protected: DECL_LINK( Highlight, Menu * ); DECL_LINK( Activate, Menu * ); DECL_LINK( Deactivate, Menu * ); private: void UpdateSpecialFileMenu( Menu* pMenu ); void UpdateSpecialWindowMenu( Menu* pMenu ); void ClearMenuDispatch(const EVENTOBJECT& Source = EVENTOBJECT(),bool _bRemoveOnly = true); void SetHdl(); void AddMenu(PopupMenu* _pPopupMenu,const ::rtl::OUString& _sItemCommand,USHORT _nItemId,sal_Bool _bDelete,sal_Bool _bDeleteChildren); USHORT FillItemCommand(::rtl::OUString& _rItemCommand,Menu* _pMenu,USHORT _nIndex) const; struct MenuItemHandler { MenuItemHandler( USHORT aItemId, MenuManager* pManager, REFERENCE< XDISPATCH >& rDispatch ) : nItemId( aItemId ), pSubMenuManager( pManager ), xMenuItemDispatch( rDispatch ) {} USHORT nItemId; ::rtl::OUString aTargetFrame; ::rtl::OUString aMenuItemURL; ::rtl::OUString aFilter; ::rtl::OUString aPassword; ::rtl::OUString aTitle; MenuManager* pSubMenuManager; REFERENCE< XDISPATCH > xMenuItemDispatch; }; void CreatePicklistArguments( ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgsList, const MenuItemHandler* ); MenuItemHandler* GetMenuItemHandler( USHORT nItemId ); sal_Bool m_bInitialized; sal_Bool m_bDeleteMenu; sal_Bool m_bDeleteChildren; sal_Bool m_bActive; sal_Bool m_bIsBookmarkMenu; sal_Bool m_bWasHiContrast; sal_Bool m_bShowMenuImages; ::rtl::OUString m_aMenuItemCommand; Menu* m_pVCLMenu; REFERENCE< XFRAME > m_xFrame; ::std::vector< MenuItemHandler* > m_aMenuItemHandlerVector; // #110897# const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& mxServiceFactory; ::com::sun::star::uno::Reference< ::com::sun::star::util::XURLTransformer > m_xURLTransformer; }; } // namespace #endif tion value='distro/nisz/libreoffice-6-4'>distro/nisz/libreoffice-6-4 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Expand)Author
2014-02-25Remove visual noise from crashrepAlexander Wilms
2013-12-13Targetted text updates, with seasonable changes before l10n freeze.Michael Meeks
2013-11-20Windows: Require at least Windows XP SP2Thomas Arnhold
2013-11-07remove INPATH and PROEXTMichael Stahl
2013-11-04remove redundant calls to OUString constructorNoel Grandin
2013-10-29gbuild: stop using stuff in OUTDIR/unittest/installMichael Stahl
2013-10-03fix thinkoDavid Tardon
2013-08-18Use subfolder names from <config_folders.h>Tor Lillqvist
2013-07-16gbuild: consolidate ULF copypaste in gb_CustomTarget_ulfex_ruleMichael Stahl
2013-04-07mass removal of rtl:: prefixes for O(U)String*Luboš Luňák
2013-03-27Remove unused macro "PMAP_CMD"Julien Nabet
2013-03-25Remove unneeded project and projectroot parametersZolnai Tamás
2013-03-19removal of RTL_CONSTASCII_USTRINGPARAM for quoted OUStrings declarationsThomas Arnhold
2013-03-19automated removal of RTL_CONSTASCII_USTRINGPARAM for quoted OUStringsThomas Arnhold
2013-03-14remove legacy build.pl prj/build.lst files.Michael Meeks
2013-03-09fdo#43460: use isEmpty()Thomas Arnhold
2013-03-02remove minor.mkMatúš Kukan
2013-02-28remove all d.lstMichael Stahl
2013-02-28bin PATCH_SO_NAME crackAndras Timar
2013-02-13fix translation of crash reporterDavid Tardon
2013-02-13let's split this for easier cherry-pickingDavid Tardon
2013-02-13fdo#60386 fix l10n of windows shell extensionDavid Tardon
2013-01-26gbuild: do not copy boost headers aroundMichael Stahl
2013-01-26crashrep: fix conditionals: it used to be built in non-pro tooMichael Stahl
2013-01-22convert crashrep to gbuild and add to tail_buildPeter Foley
2013-01-07fix misleading comment.Michael Meeks
2012-12-27Some cppcheck cleaningJulien Nabet
2012-11-28We only support MSVC 2008 (_MSC_VER 1500) or laterTor Lillqvist
2012-10-01translations is a source-only moduleAndras Timar
2012-10-01use "LibreOffice" as the default value of ProductKey for crashrepTakeshi Abe
2012-08-11Remove unused local varsJulien Nabet