From cd8ea20aa4b85128956a79c80f7953d30e99e802 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 26 Feb 2013 16:24:53 +0200 Subject: fdo#46808, Convert ui::UIConfigurationManager to new-style Change-Id: I62c37eb6d0e0b2a681a84e1fa0067d0a9f967cf2 --- framework/inc/framework/configimporter.hxx | 4 +-- framework/inc/services.h | 2 -- .../inc/uiconfiguration/uiconfigurationmanager.hxx | 12 ++----- framework/source/fwe/helper/configimporter.cxx | 2 +- .../uiconfiguration/uiconfigurationmanager.cxx | 39 ++++++++++++---------- 5 files changed, 26 insertions(+), 33 deletions(-) (limited to 'framework') diff --git a/framework/inc/framework/configimporter.hxx b/framework/inc/framework/configimporter.hxx index ab151ee8d059..06b6467f6c2a 100644 --- a/framework/inc/framework/configimporter.hxx +++ b/framework/inc/framework/configimporter.hxx @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include @@ -34,7 +34,7 @@ namespace framework { public: static sal_Bool ImportCustomToolbars( - const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIConfigurationManager >& rContainerFactory, + const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIConfigurationManager2 >& rContainerFactory, ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > >& rSeqContainer, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& rToolbarStorage ); diff --git a/framework/inc/services.h b/framework/inc/services.h index 6fb4b45c723e..956568db3721 100644 --- a/framework/inc/services.h +++ b/framework/inc/services.h @@ -41,7 +41,6 @@ namespace framework{ #define SERVICENAME_PATHSETTINGS DECLARE_ASCII("com.sun.star.util.PathSettings" ) #define SERVICENAME_LAYOUTMANAGER DECLARE_ASCII("com.sun.star.frame.LayoutManager" ) #define SERVICENAME_POPUPMENUCONTROLLER DECLARE_ASCII("com.sun.star.frame.PopupMenuController" ) -#define SERVICENAME_UICONFIGURATIONMANAGER DECLARE_ASCII("com.sun.star.ui.UIConfigurationManager" ) #define SERVICENAME_MODULEUICONFIGURATIONMANAGER DECLARE_ASCII("com.sun.star.ui.ModuleUIConfigurationManager" ) #define SERVICENAME_MENUBARFACTORY DECLARE_ASCII("com.sun.star.ui.UIElementFactory" ) #define SERVICENAME_FRAMECONTROLLER DECLARE_ASCII("com.sun.star.frame.Controller" ) @@ -94,7 +93,6 @@ namespace framework{ #define IMPLEMENTATIONNAME_UICOMMANDDESCRIPTION DECLARE_ASCII("com.sun.star.comp.framework.UICommandDescription" ) #define IMPLEMENTATIONNAME_UIELEMENTFACTORYMANAGER DECLARE_ASCII("com.sun.star.comp.framework.UIElementFactoryManager" ) #define IMPLEMENTATIONNAME_MODULEMANAGER DECLARE_ASCII("com.sun.star.comp.framework.ModuleManager" ) -#define IMPLEMENTATIONNAME_UICONFIGURATIONMANAGER DECLARE_ASCII("com.sun.star.comp.framework.UIConfigurationManager" ) #define IMPLEMENTATIONNAME_MODULEUICONFIGURATIONMANAGERSUPPLIER DECLARE_ASCII("com.sun.star.comp.framework.ModuleUIConfigurationManagerSupplier" ) #define IMPLEMENTATIONNAME_MODULEUICONFIGURATIONMANAGER DECLARE_ASCII("com.sun.star.comp.framework.ModuleUIConfigurationManager" ) #define IMPLEMENTATIONNAME_MENUBARFACTORY DECLARE_ASCII("com.sun.star.comp.framework.MenuBarFactory" ) diff --git a/framework/inc/uiconfiguration/uiconfigurationmanager.hxx b/framework/inc/uiconfiguration/uiconfigurationmanager.hxx index 6d93a74430a2..68d301453197 100644 --- a/framework/inc/uiconfiguration/uiconfigurationmanager.hxx +++ b/framework/inc/uiconfiguration/uiconfigurationmanager.hxx @@ -39,11 +39,7 @@ #include #include #include -#include -#include - -#include -#include +#include #include #include #include @@ -57,11 +53,7 @@ namespace framework { class UIConfigurationManager : public com::sun::star::lang::XTypeProvider , public com::sun::star::lang::XServiceInfo , - public com::sun::star::lang::XComponent , - public ::com::sun::star::ui::XUIConfiguration , - public ::com::sun::star::ui::XUIConfigurationManager , - public ::com::sun::star::ui::XUIConfigurationPersistence , - public ::com::sun::star::ui::XUIConfigurationStorage , + public com::sun::star::ui::XUIConfigurationManager2 , private ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses. public ::cppu::OWeakObject { diff --git a/framework/source/fwe/helper/configimporter.cxx b/framework/source/fwe/helper/configimporter.cxx index 47983fc49b22..57a98f5134a8 100644 --- a/framework/source/fwe/helper/configimporter.cxx +++ b/framework/source/fwe/helper/configimporter.cxx @@ -30,7 +30,7 @@ namespace framework { sal_Bool UIConfigurationImporterOOo1x::ImportCustomToolbars( - const uno::Reference< ui::XUIConfigurationManager >& rContainerFactory, + const uno::Reference< ui::XUIConfigurationManager2 >& rContainerFactory, uno::Sequence< uno::Reference< container::XIndexContainer > >& rSeqContainer, const uno::Reference< uno::XComponentContext >& rxContext, const uno::Reference< embed::XStorage >& rToolbarStorage ) diff --git a/framework/source/uiconfiguration/uiconfigurationmanager.cxx b/framework/source/uiconfiguration/uiconfigurationmanager.cxx index 8f3224f65f63..e19585ab094d 100644 --- a/framework/source/uiconfiguration/uiconfigurationmanager.cxx +++ b/framework/source/uiconfiguration/uiconfigurationmanager.cxx @@ -28,15 +28,16 @@ #include -#include -#include -#include -#include #include -#include #include -#include +#include #include +#include +#include +#include +#include +#include +#include #include #include @@ -60,31 +61,33 @@ namespace framework //***************************************************************************************************************** // XInterface, XTypeProvider, XServiceInfo //***************************************************************************************************************** -DEFINE_XINTERFACE_7 ( UIConfigurationManager , +DEFINE_XINTERFACE_8 ( UIConfigurationManager , OWeakObject , DIRECT_INTERFACE( css::lang::XTypeProvider ), DIRECT_INTERFACE( css::lang::XServiceInfo ), DIRECT_INTERFACE( css::lang::XComponent ), - DIRECT_INTERFACE( ::com::sun::star::ui::XUIConfiguration ), - DIRECT_INTERFACE( ::com::sun::star::ui::XUIConfigurationManager ), - DIRECT_INTERFACE( ::com::sun::star::ui::XUIConfigurationPersistence ), - DIRECT_INTERFACE( ::com::sun::star::ui::XUIConfigurationStorage ) + DIRECT_INTERFACE( css::ui::XUIConfiguration ), + DIRECT_INTERFACE( css::ui::XUIConfigurationManager ), + DIRECT_INTERFACE( css::ui::XUIConfigurationManager2 ), + DIRECT_INTERFACE( css::ui::XUIConfigurationPersistence ), + DIRECT_INTERFACE( css::ui::XUIConfigurationStorage ) ) -DEFINE_XTYPEPROVIDER_7 ( UIConfigurationManager , +DEFINE_XTYPEPROVIDER_8 ( UIConfigurationManager , css::lang::XTypeProvider , css::lang::XServiceInfo , css::lang::XComponent , - ::com::sun::star::ui::XUIConfiguration , - ::com::sun::star::ui::XUIConfigurationManager , - ::com::sun::star::ui::XUIConfigurationPersistence , - ::com::sun::star::ui::XUIConfigurationStorage + css::ui::XUIConfiguration , + css::ui::XUIConfigurationManager , + css::ui::XUIConfigurationManager2 , + css::ui::XUIConfigurationPersistence , + css::ui::XUIConfigurationStorage ) DEFINE_XSERVICEINFO_MULTISERVICE_2 ( UIConfigurationManager , ::cppu::OWeakObject , - SERVICENAME_UICONFIGURATIONMANAGER , - IMPLEMENTATIONNAME_UICONFIGURATIONMANAGER + OUString("com.sun.star.ui.UIConfigurationManager"), + OUString("com.sun.star.comp.framework.UIConfigurationManager") ) DEFINE_INIT_SERVICE ( UIConfigurationManager, {} ) -- cgit