diff options
author | Oliver Bolte <obo@openoffice.org> | 2009-09-08 04:57:32 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2009-09-08 04:57:32 +0000 |
commit | ca00697e3dae9a03573d11281fc8d9a4ee391d3d (patch) | |
tree | c390c65f02f6f32b6d6d9faa600f4688a8c81857 /framework/inc/uielement | |
parent | 047473d4f1a12e867ab7154113f7f1c5422d5368 (diff) |
CWS-TOOLING: integrate CWS oj18
2009-08-21 15:08:49 +0200 oj r275263 : wrong check
2009-08-21 08:56:01 +0200 oj r275215 : missing not
2009-08-20 07:27:13 +0200 oj r275164 : use new method from global
2009-08-19 10:22:35 +0200 oj r275138 : call GetLocale instead of pLocale
2009-08-18 10:39:32 +0200 oj r275082 : missing header include
2009-08-18 10:09:44 +0200 oj r275081 : new methods at global
2009-08-18 10:09:00 +0200 oj r275080 : unused var
2009-08-18 08:59:04 +0200 oj r275078 : move files from classes to xml
2009-08-17 14:58:16 +0200 oj r275056 : CWS-TOOLING: rebase CWS oj18 to trunk@275001 (milestone: DEV300:m55)
2009-08-17 13:29:44 +0200 oj r275047 : compile error
2009-08-17 13:27:47 +0200 oj r275045 : compile error
2009-08-17 11:44:54 +0200 oj r275040 : add dep
2009-07-22 14:26:05 +0200 oj r274240 : move unused services into fwl
2009-07-22 14:25:35 +0200 oj r274239 : move unused services into fwl
2009-07-22 13:47:45 +0200 oj r274233 : remove some unused code
2009-07-22 09:06:20 +0200 oj r274219 : export dbtoolsclient dbcharsethelper for sc
2009-07-22 08:48:58 +0200 oj r274218 : create NumberFormatter on demand
2009-07-22 08:39:23 +0200 oj r274217 : change char to sal_Char
2009-07-22 07:33:34 +0200 oj r274214 : export dbtoolsclient dbcharsethelper for sc
2009-07-22 07:30:04 +0200 oj r274213 : late init of numberformatter and breakiterator
2009-07-22 07:28:55 +0200 oj r274212 : export dbtoolsclient dbcharsethelper for sc
2009-07-21 13:43:28 +0200 oj r274196 : check if quick start is enbaled
2009-07-21 13:40:09 +0200 oj r274195 : check config entry for UiEventsLogger
2009-07-21 13:37:40 +0200 oj r274194 : code refactoring, remove of duplicate code and some late inits and removale of not needed files
2009-07-21 13:35:38 +0200 oj r274193 : code refactoring, remove of duplicate code and some late inits and removale of not needed files
2009-07-21 13:33:41 +0200 oj r274192 : doc meta data will now be created on demand
2009-07-21 13:13:40 +0200 oj r274187 : load ldap functions on demand
2009-07-21 13:03:17 +0200 oj r274183 : late init of TransliterationImpl
2009-07-21 12:36:10 +0200 oj r274180 : late init of charClass
Diffstat (limited to 'framework/inc/uielement')
28 files changed, 73 insertions, 201 deletions
diff --git a/framework/inc/uielement/comboboxtoolbarcontroller.hxx b/framework/inc/uielement/comboboxtoolbarcontroller.hxx index 967ff4131f30..bdf4b3699cc8 100644 --- a/framework/inc/uielement/comboboxtoolbarcontroller.hxx +++ b/framework/inc/uielement/comboboxtoolbarcontroller.hxx @@ -77,9 +77,6 @@ class ComboboxToolbarController : public IComboBoxListener, // XComponent virtual void SAL_CALL dispose() throw ( ::com::sun::star::uno::RuntimeException ); - // XToolbarController - virtual void SAL_CALL execute( sal_Int16 KeyModifier ) throw (::com::sun::star::uno::RuntimeException); - // IComboBoxListener virtual void Select(); virtual void DoubleClick(); @@ -91,6 +88,7 @@ class ComboboxToolbarController : public IComboBoxListener, protected: virtual void executeControlCommand( const ::com::sun::star::frame::ControlCommand& rControlCommand ); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue> getExecuteArgs(sal_Int16 KeyModifier) const; private: ComboBoxControl* m_pComboBox; diff --git a/framework/inc/uielement/complextoolbarcontroller.hxx b/framework/inc/uielement/complextoolbarcontroller.hxx index cde94ff788d0..c882fb2cf244 100644 --- a/framework/inc/uielement/complextoolbarcontroller.hxx +++ b/framework/inc/uielement/complextoolbarcontroller.hxx @@ -95,6 +95,7 @@ class ComplexToolbarController : public svt::ToolboxController const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& rInfo ); virtual void executeControlCommand( const ::com::sun::star::frame::ControlCommand& rControlCommand ) = 0; + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue> getExecuteArgs(sal_Int16 KeyModifier) const; const ::com::sun::star::util::URL& getInitializedURL(); void notifyFocusGet(); void notifyFocusLost(); diff --git a/framework/inc/uielement/controlmenucontroller.hxx b/framework/inc/uielement/controlmenucontroller.hxx index ffa4b1c21c27..ab86506d385b 100644 --- a/framework/inc/uielement/controlmenucontroller.hxx +++ b/framework/inc/uielement/controlmenucontroller.hxx @@ -72,7 +72,6 @@ namespace framework DECLARE_XSERVICEINFO // XPopupMenuController - virtual void SAL_CALL setPopupMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu >& PopupMenu ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL updatePopupMenu() throw (::com::sun::star::uno::RuntimeException); // XInitialization @@ -82,15 +81,15 @@ namespace framework virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException ); // XMenuListener - virtual void SAL_CALL highlight( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL select( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL activate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL deactivate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); // XEventListener virtual void SAL_CALL disposing( const com::sun::star::lang::EventObject& Source ) throw ( ::com::sun::star::uno::RuntimeException ); private: + virtual void impl_setPopupMenu(); + virtual void impl_select(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch >& _xDispatch,const ::com::sun::star::util::URL& aURL); + class UrlToDispatchMap : public ::std::hash_map< ::rtl::OUString, com::sun::star::uno::Reference< com::sun::star::frame::XDispatch >, OUStringHashCode, diff --git a/framework/inc/uielement/dropdownboxtoolbarcontroller.hxx b/framework/inc/uielement/dropdownboxtoolbarcontroller.hxx index 14a141f52b24..70b3cf6ed657 100644 --- a/framework/inc/uielement/dropdownboxtoolbarcontroller.hxx +++ b/framework/inc/uielement/dropdownboxtoolbarcontroller.hxx @@ -75,9 +75,6 @@ class DropdownToolbarController : public IListBoxListener, // XComponent virtual void SAL_CALL dispose() throw ( ::com::sun::star::uno::RuntimeException ); - // XToolbarController - virtual void SAL_CALL execute( sal_Int16 KeyModifier ) throw (::com::sun::star::uno::RuntimeException); - // IComboBoxListener virtual void Select(); virtual void DoubleClick(); @@ -87,6 +84,7 @@ class DropdownToolbarController : public IListBoxListener, protected: virtual void executeControlCommand( const ::com::sun::star::frame::ControlCommand& rControlCommand ); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue> getExecuteArgs(sal_Int16 KeyModifier) const; private: ListBoxControl* m_pListBoxControl; diff --git a/framework/inc/uielement/edittoolbarcontroller.hxx b/framework/inc/uielement/edittoolbarcontroller.hxx index 7ee1a8571dec..144ae48baaad 100644 --- a/framework/inc/uielement/edittoolbarcontroller.hxx +++ b/framework/inc/uielement/edittoolbarcontroller.hxx @@ -75,9 +75,6 @@ class EditToolbarController : public IEditListener, // XComponent virtual void SAL_CALL dispose() throw ( ::com::sun::star::uno::RuntimeException ); - // XToolbarController - virtual void SAL_CALL execute( sal_Int16 KeyModifier ) throw (::com::sun::star::uno::RuntimeException); - // IEditListener virtual void Modify(); virtual void KeyInput( const KeyEvent& rKEvt ); @@ -87,6 +84,7 @@ class EditToolbarController : public IEditListener, protected: virtual void executeControlCommand( const ::com::sun::star::frame::ControlCommand& rControlCommand ); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue> getExecuteArgs(sal_Int16 KeyModifier) const; private: EditControl* m_pEditControl; diff --git a/framework/inc/uielement/fontmenucontroller.hxx b/framework/inc/uielement/fontmenucontroller.hxx index 5039cc757a25..33035d4a082f 100644 --- a/framework/inc/uielement/fontmenucontroller.hxx +++ b/framework/inc/uielement/fontmenucontroller.hxx @@ -69,25 +69,20 @@ namespace framework DECLARE_XSERVICEINFO // XPopupMenuController - virtual void SAL_CALL setPopupMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu >& PopupMenu ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL updatePopupMenu() throw (::com::sun::star::uno::RuntimeException); - // XInitialization - virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); - // XStatusListener virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException ); // XMenuListener - virtual void SAL_CALL highlight( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL select( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL activate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL deactivate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); // XEventListener virtual void SAL_CALL disposing( const com::sun::star::lang::EventObject& Source ) throw ( ::com::sun::star::uno::RuntimeException ); private: + virtual void impl_setPopupMenu(); + virtual void impl_select(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch >& _xDispatch,const ::com::sun::star::util::URL& aURL); void fillPopupMenu( const com::sun::star::uno::Sequence< ::rtl::OUString >& rFontNameSeq, com::sun::star::uno::Reference< com::sun::star::awt::XPopupMenu >& rPopupMenu ); rtl::OUString m_aFontFamilyName; diff --git a/framework/inc/uielement/fontsizemenucontroller.hxx b/framework/inc/uielement/fontsizemenucontroller.hxx index 191b323923e6..f571ccef0d16 100644 --- a/framework/inc/uielement/fontsizemenucontroller.hxx +++ b/framework/inc/uielement/fontsizemenucontroller.hxx @@ -70,25 +70,17 @@ namespace framework DECLARE_XSERVICEINFO // XPopupMenuController - virtual void SAL_CALL setPopupMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu >& PopupMenu ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL updatePopupMenu() throw (::com::sun::star::uno::RuntimeException); - // XInitialization - virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); - // XStatusListener virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException ); - // XMenuListener - virtual void SAL_CALL highlight( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL select( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL activate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL deactivate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); - // XEventListener virtual void SAL_CALL disposing( const com::sun::star::lang::EventObject& Source ) throw ( ::com::sun::star::uno::RuntimeException ); private: + virtual void impl_setPopupMenu(); + virtual void impl_select(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch >& _xDispatch,const ::com::sun::star::util::URL& aURL); void setCurHeight( long nHeight, com::sun::star::uno::Reference< com::sun::star::awt::XPopupMenu >& rPopupMenu ); void fillPopupMenu( com::sun::star::uno::Reference< com::sun::star::awt::XPopupMenu >& rPopupMenu ); rtl::OUString retrievePrinterName( com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rFrame ); diff --git a/framework/inc/uielement/footermenucontroller.hxx b/framework/inc/uielement/footermenucontroller.hxx index a54c8f60f170..534e4bd6437e 100644 --- a/framework/inc/uielement/footermenucontroller.hxx +++ b/framework/inc/uielement/footermenucontroller.hxx @@ -34,65 +34,26 @@ //_________________________________________________________________________________________________________________ // my own includes //_________________________________________________________________________________________________________________ - -#include <helper/popupmenucontrollerbase.hxx> -#include <stdtypes.h> - -//_________________________________________________________________________________________________________________ -// interface includes -//_________________________________________________________________________________________________________________ -#include <com/sun/star/lang/XServiceInfo.hpp> -#include <com/sun/star/lang/XTypeProvider.hpp> -#include <com/sun/star/lang/XInitialization.hpp> -#include <com/sun/star/lang/XMultiServiceFactory.hpp> -#include <com/sun/star/frame/XFrame.hpp> -#include <com/sun/star/frame/XDispatch.hpp> -#include <com/sun/star/frame/XStatusListener.hpp> -#include <com/sun/star/frame/XPopupMenuController.hpp> -#include <com/sun/star/frame/status/Verb.hpp> -#include <com/sun/star/frame/XModel.hpp> - -//_________________________________________________________________________________________________________________ -// includes of other projects -//_________________________________________________________________________________________________________________ -#include <toolkit/awt/vclxmenu.hxx> -#include <cppuhelper/weak.hxx> -#include <rtl/ustring.hxx> +#include <uielement/headermenucontroller.hxx> namespace framework { - class FooterMenuController : public PopupMenuControllerBase + class FooterMenuController : public HeaderMenuController { public: FooterMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ); virtual ~FooterMenuController(); // XServiceInfo - DECLARE_XSERVICEINFO - - // XPopupMenuController - virtual void SAL_CALL setPopupMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu >& PopupMenu ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL updatePopupMenu() throw (::com::sun::star::uno::RuntimeException); - - // XInitialization - virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); - - // XStatusListener - virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException ); - - // XMenuListener - virtual void SAL_CALL highlight( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL select( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL activate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL deactivate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); - - // XEventListener - virtual void SAL_CALL disposing( const com::sun::star::lang::EventObject& Source ) throw ( ::com::sun::star::uno::RuntimeException ); - - private: - void fillPopupMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& rModel, com::sun::star::uno::Reference< com::sun::star::awt::XPopupMenu >& rPopupMenu ); - - ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > m_xModel; + virtual ::rtl::OUString SAL_CALL getImplementationName ( ) throw( css::uno::RuntimeException ); + virtual sal_Bool SAL_CALL supportsService ( const ::rtl::OUString& sServiceName ) throw( css::uno::RuntimeException ); + virtual css::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames ( ) throw( css::uno::RuntimeException ); + /* Helper for XServiceInfo */ + static css::uno::Sequence< ::rtl::OUString > SAL_CALL impl_getStaticSupportedServiceNames( ); + static ::rtl::OUString SAL_CALL impl_getStaticImplementationName ( ); + /* Helper for registry */ + static css::uno::Reference< css::uno::XInterface > SAL_CALL impl_createInstance ( const css::uno::Reference< css::lang::XMultiServiceFactory >& xServiceManager ) throw( css::uno::Exception ); + static css::uno::Reference< css::lang::XSingleServiceFactory > SAL_CALL impl_createFactory ( const css::uno::Reference< css::lang::XMultiServiceFactory >& xServiceManager ); }; } diff --git a/framework/inc/uielement/headermenucontroller.hxx b/framework/inc/uielement/headermenucontroller.hxx index ade3b34bc80a..e0721bafb49a 100644 --- a/framework/inc/uielement/headermenucontroller.hxx +++ b/framework/inc/uielement/headermenucontroller.hxx @@ -64,35 +64,27 @@ namespace framework class HeaderMenuController : public PopupMenuControllerBase { public: - HeaderMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ); + HeaderMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager,bool _bFooter = sal_False ); virtual ~HeaderMenuController(); // XServiceInfo DECLARE_XSERVICEINFO // XPopupMenuController - virtual void SAL_CALL setPopupMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu >& PopupMenu ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL updatePopupMenu() throw (::com::sun::star::uno::RuntimeException); - // XInitialization - virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); - // XStatusListener virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException ); - // XMenuListener - virtual void SAL_CALL highlight( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL select( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL activate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL deactivate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); - // XEventListener virtual void SAL_CALL disposing( const com::sun::star::lang::EventObject& Source ) throw ( ::com::sun::star::uno::RuntimeException ); private: + virtual void impl_select(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch >& _xDispatch,const ::com::sun::star::util::URL& aURL); void fillPopupMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& rModel, com::sun::star::uno::Reference< com::sun::star::awt::XPopupMenu >& rPopupMenu ); ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > m_xModel; + bool m_bFooter; }; } diff --git a/framework/inc/uielement/imagebuttontoolbarcontroller.hxx b/framework/inc/uielement/imagebuttontoolbarcontroller.hxx index 8495ec93a734..850f024e9e76 100644 --- a/framework/inc/uielement/imagebuttontoolbarcontroller.hxx +++ b/framework/inc/uielement/imagebuttontoolbarcontroller.hxx @@ -61,9 +61,6 @@ class ImageButtonToolbarController : public ComplexToolbarController // XComponent virtual void SAL_CALL dispose() throw ( ::com::sun::star::uno::RuntimeException ); - // XToolbarController - virtual void SAL_CALL execute( sal_Int16 KeyModifier ) throw (::com::sun::star::uno::RuntimeException); - protected: virtual void executeControlCommand( const ::com::sun::star::frame::ControlCommand& rControlCommand ); diff --git a/framework/inc/uielement/itemcontainer.hxx b/framework/inc/uielement/itemcontainer.hxx index 03b169bef319..f9499e83edb8 100644 --- a/framework/inc/uielement/itemcontainer.hxx +++ b/framework/inc/uielement/itemcontainer.hxx @@ -52,7 +52,7 @@ // other includes //_________________________________________________________________________________________________________________ #include <rtl/ustring.hxx> -#include <cppuhelper/weak.hxx> +#include <cppuhelper/implbase1.hxx> #include <vector> @@ -60,10 +60,7 @@ namespace framework { class ConstItemContainer; -class ItemContainer : public ::com::sun::star::lang::XTypeProvider , - public ::com::sun::star::container::XIndexContainer , - public ::com::sun::star::lang::XUnoTunnel , - public ::cppu::OWeakObject +class ItemContainer : public ::cppu::WeakImplHelper1< ::com::sun::star::container::XIndexContainer> { friend class ConstItemContainer; @@ -76,9 +73,6 @@ class ItemContainer : public ::com::sun::star::lang::XTypeProvider , //--------------------------------------------------------------------------------------------------------- // XInterface, XTypeProvider //--------------------------------------------------------------------------------------------------------- - FWK_DECLARE_XINTERFACE - FWK_DECLARE_XTYPEPROVIDER - // XUnoTunnel static const ::com::sun::star::uno::Sequence< sal_Int8 >& GetUnoTunnelId() throw(); static ItemContainer* GetImplementation( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rxIFace ) throw(); diff --git a/framework/inc/uielement/langselectionmenucontroller.hxx b/framework/inc/uielement/langselectionmenucontroller.hxx index f9cec2dfb814..ff8083ce6714 100644 --- a/framework/inc/uielement/langselectionmenucontroller.hxx +++ b/framework/inc/uielement/langselectionmenucontroller.hxx @@ -72,7 +72,6 @@ namespace framework DECLARE_XSERVICEINFO // XPopupMenuController - virtual void SAL_CALL setPopupMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu >& PopupMenu ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL updatePopupMenu() throw (::com::sun::star::uno::RuntimeException); // XInitialization @@ -81,16 +80,12 @@ namespace framework // XStatusListener virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException ); - // XMenuListener - virtual void SAL_CALL highlight( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL select( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL activate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL deactivate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); - // XEventListener virtual void SAL_CALL disposing( const com::sun::star::lang::EventObject& Source ) throw ( ::com::sun::star::uno::RuntimeException ); private: + virtual void impl_setPopupMenu(); + virtual void impl_select(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch >& _xDispatch,const ::com::sun::star::util::URL& aURL); enum Mode { MODE_SetLanguageSelectionMenu, diff --git a/framework/inc/uielement/langselectionstatusbarcontroller.hxx b/framework/inc/uielement/langselectionstatusbarcontroller.hxx index 4e886f89adfb..0b9df06c8877 100644 --- a/framework/inc/uielement/langselectionstatusbarcontroller.hxx +++ b/framework/inc/uielement/langselectionstatusbarcontroller.hxx @@ -88,6 +88,7 @@ class LangSelectionStatusbarController : public svt::StatusbarController LangSelectionStatusbarController(LangSelectionStatusbarController &); // not defined void operator =(LangSelectionStatusbarController &); // not defined + sal_Bool m_bShowMenu; sal_Int16 m_nScriptType; ::rtl::OUString m_aCurrentLanguage; diff --git a/framework/inc/uielement/macrosmenucontroller.hxx b/framework/inc/uielement/macrosmenucontroller.hxx index 4729bff517d2..fb993e0af8f4 100644 --- a/framework/inc/uielement/macrosmenucontroller.hxx +++ b/framework/inc/uielement/macrosmenucontroller.hxx @@ -71,25 +71,14 @@ namespace framework // XServiceInfo DECLARE_XSERVICEINFO - // XPopupMenuController - virtual void SAL_CALL setPopupMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu >& PopupMenu ) throw (::com::sun::star::uno::RuntimeException); - - // XInitialization - virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); - // XStatusListener virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException ); - // XMenuListener - virtual void SAL_CALL highlight( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL select( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL activate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL deactivate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); - // XEventListener virtual void SAL_CALL disposing( const com::sun::star::lang::EventObject& Source ) throw ( ::com::sun::star::uno::RuntimeException ); private: + virtual void impl_select(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch >& _xDispatch,const ::com::sun::star::util::URL& aURL); void fillPopupMenu( com::sun::star::uno::Reference< com::sun::star::awt::XPopupMenu >& rPopupMenu ); String RetrieveLabelFromCommand( const String& aCmdURL ); void addScriptItems( PopupMenu* pPopupMenu, USHORT startItemId ); diff --git a/framework/inc/uielement/menubarmanager.hxx b/framework/inc/uielement/menubarmanager.hxx index 73d5ca1780b2..067fb9e2cfe3 100644 --- a/framework/inc/uielement/menubarmanager.hxx +++ b/framework/inc/uielement/menubarmanager.hxx @@ -103,6 +103,7 @@ class MenuBarManager : public com::sun::star::frame::XStatusListener MenuBarManager( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory, const ::com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rFrame, + const ::com::sun::star::uno::Reference< ::com::sun::star::util::XURLTransformer >& _xURLTransformer, AddonMenu* pAddonMenu, sal_Bool bDelete, sal_Bool bDeleteChildren ); @@ -111,6 +112,7 @@ class MenuBarManager : public com::sun::star::frame::XStatusListener MenuBarManager( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory, const ::com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rFrame, + const ::com::sun::star::uno::Reference< ::com::sun::star::util::XURLTransformer >& _xURLTransformer, AddonPopupMenu* pAddonMenu, sal_Bool bDelete, sal_Bool bDeleteChildren ); @@ -120,6 +122,7 @@ class MenuBarManager : public com::sun::star::frame::XStatusListener MenuBarManager( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, + const ::com::sun::star::uno::Reference< ::com::sun::star::util::XURLTransformer >& _xURLTransformer, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider >& rDispatchProvider, const rtl::OUString& aModuleIdentifier, Menu* pMenu, @@ -192,11 +195,12 @@ class MenuBarManager : public com::sun::star::frame::XStatusListener void RequestImages(); void RetrieveImageManagers(); static sal_Bool MustBeHidden( PopupMenu* pPopupMenu, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XURLTransformer >& rTransformer ); + String RetrieveLabelFromCommand( const String& aCmdURL ); private: - String RetrieveLabelFromCommand( const String& aCmdURL ); - void UpdateSpecialFileMenu( Menu* pMenu ); - void UpdateSpecialWindowMenu( Menu* pMenu ); + + + void Destroy(); struct MenuItemHandler @@ -235,6 +239,10 @@ class MenuBarManager : public com::sun::star::frame::XStatusListener MenuItemHandler* GetMenuItemHandler( USHORT nItemId ); sal_Bool CreatePopupMenuController( MenuItemHandler* pMenuItemHandler ); + void AddMenu(MenuBarManager* pSubMenuManager,const ::rtl::OUString& _sItemCommand,USHORT _nItemId); + USHORT FillItemCommand(::rtl::OUString& _rItemCommand,Menu* _pMenu,USHORT _nIndex) const; + void Init(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,AddonMenu* pAddonMenu,sal_Bool bDelete,sal_Bool bDeleteChildren,bool _bHandlePopUp = false); + void SetHdl(); sal_Bool m_bDisposed : 1, m_bInitialized : 1, @@ -244,9 +252,9 @@ class MenuBarManager : public com::sun::star::frame::XStatusListener m_bIsBookmarkMenu : 1, m_bWasHiContrast : 1, m_bShowMenuImages : 1; - sal_Bool m_bModuleIdentified : 1, - m_bRetrieveImages : 1, + sal_Bool m_bRetrieveImages : 1, m_bAcceleratorCfg : 1; + sal_Bool m_bModuleIdentified; ::rtl::OUString m_aMenuItemCommand; ::rtl::OUString m_aModuleIdentifier; Menu* m_pVCLMenu; @@ -262,6 +270,7 @@ class MenuBarManager : public com::sun::star::frame::XStatusListener ::com::sun::star::uno::Reference< ::com::sun::star::ui::XAcceleratorConfiguration > m_xModuleAcceleratorManager; ::com::sun::star::uno::Reference< ::com::sun::star::ui::XAcceleratorConfiguration > m_xGlobalAcceleratorManager; ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxServiceFactory; + ::com::sun::star::uno::Reference< ::com::sun::star::util::XURLTransformer > m_xURLTransformer; ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > m_xDeferedItemContainer; sal_Int16 m_nSymbolsStyle; Timer m_aAsyncSettingsTimer; diff --git a/framework/inc/uielement/menubarwrapper.hxx b/framework/inc/uielement/menubarwrapper.hxx index 8686d2e87ecb..027fc6deca14 100644 --- a/framework/inc/uielement/menubarwrapper.hxx +++ b/framework/inc/uielement/menubarwrapper.hxx @@ -74,9 +74,6 @@ class MenuBarWrapper : public UIConfigElementWrapperBase, FWK_DECLARE_XINTERFACE FWK_DECLARE_XTYPEPROVIDER - // #110897# - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& getServiceFactory(); - MenuBarManager* GetMenuBarManager() const { return static_cast< MenuBarManager* >( m_xMenuBarManager.get() ); } void InvalidatePopupControllerCache() { m_bRefreshPopupControllerCache = sal_True; } @@ -91,8 +88,6 @@ class MenuBarWrapper : public UIConfigElementWrapperBase, // XUIElementSettings virtual void SAL_CALL updateSettings( ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL getSettings( sal_Bool bWriteable ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setSettings( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& UISettings ) throw (::com::sun::star::uno::RuntimeException); // XElementAccess virtual ::com::sun::star::uno::Type SAL_CALL getElementType() throw (::com::sun::star::uno::RuntimeException); @@ -104,11 +99,11 @@ class MenuBarWrapper : public UIConfigElementWrapperBase, virtual ::sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException); private: + virtual void impl_fillNewData(); void fillPopupControllerCache(); sal_Bool m_bRefreshPopupControllerCache : 1; com::sun::star::uno::Reference< com::sun::star::lang::XComponent > m_xMenuBarManager; - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& mxServiceFactory; PopupControllerCache m_aPopupControllerCache; }; diff --git a/framework/inc/uielement/newmenucontroller.hxx b/framework/inc/uielement/newmenucontroller.hxx index fb65d2415479..799f58fd3f6b 100644 --- a/framework/inc/uielement/newmenucontroller.hxx +++ b/framework/inc/uielement/newmenucontroller.hxx @@ -51,7 +51,6 @@ #include <com/sun/star/frame/XStatusListener.hpp> #include <com/sun/star/frame/XPopupMenuController.hpp> #include <com/sun/star/beans/XPropertySet.hpp> -#include <com/sun/star/util/XURLTransformer.hpp> #include <com/sun/star/ui/XAcceleratorConfiguration.hpp> //_________________________________________________________________________________________________________________ @@ -84,10 +83,6 @@ namespace framework // XServiceInfo DECLARE_XSERVICEINFO - // XPopupMenuController - virtual void SAL_CALL updatePopupMenu() throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setPopupMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu >& PopupMenu ) throw (::com::sun::star::uno::RuntimeException); - // XInitialization virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); @@ -95,10 +90,8 @@ namespace framework virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException ); // XMenuListener - virtual void SAL_CALL highlight( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL select( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL activate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL deactivate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); // XEventListener virtual void SAL_CALL disposing( const com::sun::star::lang::EventObject& Source ) throw ( ::com::sun::star::uno::RuntimeException ); @@ -106,6 +99,7 @@ namespace framework DECL_STATIC_LINK( NewMenuController, ExecuteHdl_Impl, NewDocument* ); private: + virtual void impl_setPopupMenu(); struct AddInfo { rtl::OUString aTargetFrame; @@ -133,7 +127,6 @@ namespace framework rtl::OUString m_aTargetFrame; rtl::OUString m_aModuleIdentifier; rtl::OUString m_aEmptyDocURL; - ::com::sun::star::uno::Reference< ::com::sun::star::util::XURLTransformer > m_xURLTransformer; ::com::sun::star::uno::Reference< ::com::sun::star::ui::XAcceleratorConfiguration > m_xDocAcceleratorManager; ::com::sun::star::uno::Reference< ::com::sun::star::ui::XAcceleratorConfiguration > m_xModuleAcceleratorManager; ::com::sun::star::uno::Reference< ::com::sun::star::ui::XAcceleratorConfiguration > m_xGlobalAcceleratorManager; diff --git a/framework/inc/uielement/objectmenucontroller.hxx b/framework/inc/uielement/objectmenucontroller.hxx index 4107e1063869..d32f8aa61615 100644 --- a/framework/inc/uielement/objectmenucontroller.hxx +++ b/framework/inc/uielement/objectmenucontroller.hxx @@ -69,26 +69,15 @@ namespace framework // XServiceInfo DECLARE_XSERVICEINFO - // XPopupMenuController - virtual void SAL_CALL setPopupMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu >& PopupMenu ) throw (::com::sun::star::uno::RuntimeException); - - // XInitialization - virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); - // XStatusListener virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException ); - // XMenuListener - virtual void SAL_CALL highlight( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL select( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL activate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL deactivate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); - // XEventListener virtual void SAL_CALL disposing( const com::sun::star::lang::EventObject& Source ) throw ( ::com::sun::star::uno::RuntimeException ); private: void fillPopupMenu( const com::sun::star::uno::Sequence< com::sun::star::embed::VerbDescriptor >& rVerbCommandSeq, com::sun::star::uno::Reference< com::sun::star::awt::XPopupMenu >& rPopupMenu ); + virtual void impl_select(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch >& _xDispatch,const ::com::sun::star::util::URL& aURL); com::sun::star::uno::Reference< com::sun::star::frame::XDispatch > m_xObjectUpdateDispatch; }; diff --git a/framework/inc/uielement/recentfilesmenucontroller.hxx b/framework/inc/uielement/recentfilesmenucontroller.hxx index 40beb34dc69a..7fdd4897b31c 100644 --- a/framework/inc/uielement/recentfilesmenucontroller.hxx +++ b/framework/inc/uielement/recentfilesmenucontroller.hxx @@ -79,23 +79,16 @@ namespace framework // XPopupMenuController virtual void SAL_CALL updatePopupMenu() throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setPopupMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu >& PopupMenu ) throw (::com::sun::star::uno::RuntimeException); - - // XInitialization - virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); // XStatusListener virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException ); // XMenuListener - virtual void SAL_CALL highlight( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL select( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL activate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL deactivate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); // XDispatchProvider virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > SAL_CALL queryDispatch( const ::com::sun::star::util::URL& aURL, const ::rtl::OUString& sTarget, sal_Int32 nFlags ) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > > SAL_CALL queryDispatches( const ::com::sun::star::uno::Sequence< ::com::sun::star::frame::DispatchDescriptor >& lDescriptor ) throw( ::com::sun::star::uno::RuntimeException ); // XDispatch virtual void SAL_CALL dispatch( const ::com::sun::star::util::URL& aURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& seqProperties ) throw( ::com::sun::star::uno::RuntimeException ); @@ -108,6 +101,7 @@ namespace framework DECL_STATIC_LINK( RecentFilesMenuController, ExecuteHdl_Impl, LoadRecentFile* ); private: + virtual void impl_setPopupMenu(); struct RecentFile { rtl::OUString aURL; diff --git a/framework/inc/uielement/spinfieldtoolbarcontroller.hxx b/framework/inc/uielement/spinfieldtoolbarcontroller.hxx index 9d9706a25f82..a25c452c25e4 100644 --- a/framework/inc/uielement/spinfieldtoolbarcontroller.hxx +++ b/framework/inc/uielement/spinfieldtoolbarcontroller.hxx @@ -81,9 +81,6 @@ class SpinfieldToolbarController : public ISpinfieldListener, // XComponent virtual void SAL_CALL dispose() throw ( ::com::sun::star::uno::RuntimeException ); - // XToolbarController - virtual void SAL_CALL execute( sal_Int16 KeyModifier ) throw (::com::sun::star::uno::RuntimeException); - // ISpinfieldListener virtual void Up(); virtual void Down(); @@ -99,6 +96,7 @@ class SpinfieldToolbarController : public ISpinfieldListener, protected: virtual void executeControlCommand( const ::com::sun::star::frame::ControlCommand& rControlCommand ); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue> getExecuteArgs(sal_Int16 KeyModifier) const; private: bool impl_getValue( const ::com::sun::star::uno::Any& rAny, sal_Int32& nValue, double& fValue, bool& bFloat ); diff --git a/framework/inc/uielement/statusbarmanager.hxx b/framework/inc/uielement/statusbarmanager.hxx index 431dda7cae04..26bebd3924aa 100644 --- a/framework/inc/uielement/statusbarmanager.hxx +++ b/framework/inc/uielement/statusbarmanager.hxx @@ -46,6 +46,7 @@ //_________________________________________________________________________________________________________________ #include <com/sun/star/frame/XFrame.hpp> #include <com/sun/star/frame/XStatusListener.hpp> +#include <com/sun/star/frame/XStatusbarController.hpp> #include <com/sun/star/frame/XUIControllerRegistration.hpp> #include <com/sun/star/ui/XUIConfiguration.hpp> #include <com/sun/star/frame/XModuleManager.hpp> @@ -120,14 +121,15 @@ class StatusBarManager : public ::com::sun::star::frame::XFrameActionListener void CreateControllers(); void UpdateControllers(); void AddFrameActionListener(); + void MouseButton( const MouseEvent& rMEvt ,sal_Bool ( SAL_CALL ::com::sun::star::frame::XStatusbarController::*_pMethod )(const ::com::sun::star::awt::MouseEvent&)); protected: typedef std::vector< ::com::sun::star::uno::Reference< com::sun::star::frame::XStatusListener > > StatusBarControllerVector; sal_Bool m_bDisposed : 1, - m_bModuleIdentified : 1, m_bFrameActionRegistered : 1, m_bUpdateControllers : 1; + sal_Bool m_bModuleIdentified; StatusBar* m_pStatusBar; rtl::OUString m_aModuleIdentifier; rtl::OUString m_aResourceName; diff --git a/framework/inc/uielement/statusbarwrapper.hxx b/framework/inc/uielement/statusbarwrapper.hxx index a5baabee9f6e..cda501e9724d 100644 --- a/framework/inc/uielement/statusbarwrapper.hxx +++ b/framework/inc/uielement/statusbarwrapper.hxx @@ -70,12 +70,9 @@ class StatusBarWrapper : public UIConfigElementWrapperBase // XUIElementSettings virtual void SAL_CALL updateSettings() throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL getSettings( sal_Bool bWriteable ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setSettings( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& UISettings ) throw (::com::sun::star::uno::RuntimeException); private: ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > m_xStatusBarManager; - ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceFactory; }; } // namespace framework diff --git a/framework/inc/uielement/statusindicatorinterfacewrapper.hxx b/framework/inc/uielement/statusindicatorinterfacewrapper.hxx index 1bb78b63095c..525d2af3f22d 100644 --- a/framework/inc/uielement/statusindicatorinterfacewrapper.hxx +++ b/framework/inc/uielement/statusindicatorinterfacewrapper.hxx @@ -51,28 +51,20 @@ // other includes //_________________________________________________________________________________________________________________ #include <rtl/ustring.hxx> -#include <cppuhelper/weak.hxx> +#include <cppuhelper/implbase1.hxx> #include <vector> namespace framework { -class StatusIndicatorInterfaceWrapper : public ::com::sun::star::lang::XTypeProvider , - public ::com::sun::star::task::XStatusIndicator , - public ::cppu::OWeakObject +class StatusIndicatorInterfaceWrapper : public ::cppu::WeakImplHelper1< ::com::sun::star::task::XStatusIndicator> { public: StatusIndicatorInterfaceWrapper( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& rStatusIndicatorImpl ); virtual ~StatusIndicatorInterfaceWrapper(); //--------------------------------------------------------------------------------------------------------- - // XInterface, XTypeProvider - //--------------------------------------------------------------------------------------------------------- - FWK_DECLARE_XINTERFACE - FWK_DECLARE_XTYPEPROVIDER - - //--------------------------------------------------------------------------------------------------------- // XStatusIndicator //--------------------------------------------------------------------------------------------------------- virtual void SAL_CALL start ( const ::rtl::OUString& sText , diff --git a/framework/inc/uielement/togglebuttontoolbarcontroller.hxx b/framework/inc/uielement/togglebuttontoolbarcontroller.hxx index dea5a3b560d7..8778995c56ff 100644 --- a/framework/inc/uielement/togglebuttontoolbarcontroller.hxx +++ b/framework/inc/uielement/togglebuttontoolbarcontroller.hxx @@ -70,11 +70,11 @@ class ToggleButtonToolbarController : public ComplexToolbarController virtual void SAL_CALL dispose() throw ( ::com::sun::star::uno::RuntimeException ); // XToolbarController - virtual void SAL_CALL execute( sal_Int16 KeyModifier ) throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL createPopupWindow() throw (::com::sun::star::uno::RuntimeException); protected: virtual void executeControlCommand( const ::com::sun::star::frame::ControlCommand& rControlCommand ); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue> getExecuteArgs(sal_Int16 KeyModifier) const; private: DECL_LINK( MenuSelectHdl, Menu *); diff --git a/framework/inc/uielement/toolbarmanager.hxx b/framework/inc/uielement/toolbarmanager.hxx index e08983ef7a4a..553da978b8ce 100644 --- a/framework/inc/uielement/toolbarmanager.hxx +++ b/framework/inc/uielement/toolbarmanager.hxx @@ -56,7 +56,9 @@ #include <com/sun/star/ui/XImageManager.hpp> #include <com/sun/star/frame/XStatusListener.hpp> #include <com/sun/star/frame/XSubToolbarController.hpp> +#include <com/sun/star/frame/XToolbarController.hpp> #include <com/sun/star/ui/ItemStyle.hpp> +#include <com/sun/star/util/XURLTransformer.hpp> //_________________________________________________________________________________________________________________ // other includes @@ -189,6 +191,9 @@ class ToolBarManager : public ::com::sun::star::frame::XFrameActionListener ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > GetModelFromFrame() const; sal_Bool IsPluginMode() const; Image QueryAddonsImage( const ::rtl::OUString& aCommandURL, bool bBigImages, bool bHiContrast ); + long HandleClick(void ( SAL_CALL ::com::sun::star::frame::XToolbarController::*_pClick )( )); + void setToolBarImage(const Image& _aImage,const CommandToInfoMap::const_iterator& _pIter); + void impl_elementChanged(bool _bRemove,const ::com::sun::star::ui::ConfigurationEvent& Event ); protected: typedef ::std::hash_map< sal_uInt16, ::com::sun::star::uno::Reference< com::sun::star::frame::XStatusListener > > ToolBarControllerMap; @@ -210,6 +215,7 @@ class ToolBarManager : public ::com::sun::star::frame::XFrameActionListener ToolBar* m_pToolBar; rtl::OUString m_aModuleIdentifier; rtl::OUString m_aResourceName; + com::sun::star::uno::Reference< ::com::sun::star::util::XURLTransformer > m_xURLTransformer; com::sun::star::uno::Reference< com::sun::star::frame::XFrame > m_xFrame; com::sun::star::uno::Reference< com::sun::star::container::XNameAccess > m_xUICommandLabels; ToolBarControllerMap m_aControllerMap; diff --git a/framework/inc/uielement/toolbarsmenucontroller.hxx b/framework/inc/uielement/toolbarsmenucontroller.hxx index 03e2c0f63bf3..ff1d117efd65 100644 --- a/framework/inc/uielement/toolbarsmenucontroller.hxx +++ b/framework/inc/uielement/toolbarsmenucontroller.hxx @@ -52,7 +52,6 @@ #include <com/sun/star/frame/XLayoutManager.hpp> #include <com/sun/star/frame/XModel.hpp> #include <com/sun/star/container/XNameAccess.hpp> -#include <com/sun/star/util/XURLTransformer.hpp> #include <com/sun/star/ui/XUIConfigurationManager.hpp> //_________________________________________________________________________________________________________________ @@ -86,10 +85,8 @@ namespace framework virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException ); // XMenuListener - virtual void SAL_CALL highlight( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL select( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL activate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL deactivate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); // XEventListener virtual void SAL_CALL disposing( const com::sun::star::lang::EventObject& Source ) throw ( ::com::sun::star::uno::RuntimeException ); @@ -112,7 +109,6 @@ namespace framework sal_Bool isContextSensitiveToolbarNonVisible(); ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xPersistentWindowState; - ::com::sun::star::uno::Reference< ::com::sun::star::util::XURLTransformer > m_xURLTransformer; ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xUICommandDescription; ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIConfigurationManager > m_xModuleCfgMgr; ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIConfigurationManager > m_xDocCfgMgr; diff --git a/framework/inc/uielement/toolbarwrapper.hxx b/framework/inc/uielement/toolbarwrapper.hxx index 4fbc14a4185c..16e41e9029b0 100644 --- a/framework/inc/uielement/toolbarwrapper.hxx +++ b/framework/inc/uielement/toolbarwrapper.hxx @@ -79,13 +79,6 @@ class ToolBarWrapper : public ::com::sun::star::ui::XUIFunctionListener, // XUIElementSettings virtual void SAL_CALL updateSettings() throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL getSettings( sal_Bool bWriteable ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setSettings( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& UISettings ) throw (::com::sun::star::uno::RuntimeException); - - // XUIConfigurationListener - virtual void SAL_CALL elementInserted( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL elementRemoved( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL elementReplaced( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException); // XUIFunctionListener virtual void SAL_CALL functionExecute( const ::rtl::OUString& aUIElementName, const ::rtl::OUString& aCommand ) throw (::com::sun::star::uno::RuntimeException); @@ -99,9 +92,9 @@ class ToolBarWrapper : public ::com::sun::star::ui::XUIFunctionListener, //------------------------------------------------------------------------------------------------------------- protected: virtual void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const com::sun::star::uno::Any& aValue ) throw( com::sun::star::uno::Exception ); + virtual void impl_fillNewData(); private: - com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xServiceManager; com::sun::star::uno::Reference< com::sun::star::lang::XComponent > m_xToolBarManager; com::sun::star::uno::Reference< com::sun::star::awt::XWindow > m_xToolBarWindow; }; diff --git a/framework/inc/uielement/uicommanddescription.hxx b/framework/inc/uielement/uicommanddescription.hxx index f1647b87ab15..9b93c8eeefb2 100644 --- a/framework/inc/uielement/uicommanddescription.hxx +++ b/framework/inc/uielement/uicommanddescription.hxx @@ -59,28 +59,22 @@ //_________________________________________________________________________________________________________________ // other includes //_________________________________________________________________________________________________________________ -#include <cppuhelper/weak.hxx> +#include <cppuhelper/implbase2.hxx> #include <rtl/ustring.hxx> namespace framework { - -class ConfigurationAccess_UICommand; -class UICommandDescription : public com::sun::star::lang::XTypeProvider , - public com::sun::star::lang::XServiceInfo , - public com::sun::star::container::XNameAccess , - private ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses. - public ::cppu::OWeakObject +class UICommandDescription : private ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses. + public ::cppu::WeakImplHelper2< com::sun::star::lang::XServiceInfo , + com::sun::star::container::XNameAccess > { public: UICommandDescription( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ); virtual ~UICommandDescription(); // XInterface, XTypeProvider, XServiceInfo - FWK_DECLARE_XINTERFACE - FWK_DECLARE_XTYPEPROVIDER DECLARE_XSERVICEINFO - +private: // XNameAccess virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw ( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); @@ -97,6 +91,7 @@ class UICommandDescription : public com::sun::star::lang::XTypeProvider , virtual sal_Bool SAL_CALL hasElements() throw (::com::sun::star::uno::RuntimeException); +public: typedef ::std::hash_map< ::rtl::OUString, ::rtl::OUString, OUStringHashCode, @@ -107,7 +102,10 @@ class UICommandDescription : public com::sun::star::lang::XTypeProvider , OUStringHashCode, ::std::equal_to< ::rtl::OUString > > UICommandsHashMap; - private: + protected: + UICommandDescription( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager,bool ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > impl_createConfigAccess(const ::rtl::OUString& _sName); + void impl_fillElements(const sal_Char* _pName); sal_Bool m_bConfigRead; rtl::OUString m_aPrivateResourceURL; ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceManager; |