diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2020-07-08 18:39:27 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-07-09 08:46:19 +0200 |
commit | c435ee5c9c9882d0817039d5e53990418c3d1066 (patch) | |
tree | f65b07001d17d8ad5b69db42d6ceb603e5743bdb /framework/inc | |
parent | 113a5e2b70d31299acad676fadac8c820e655a67 (diff) |
framework: create instances with uno constructors
See tdf#74608 for motivation
Change-Id: Ia2d9447b687f0792d9d3a98d30cd2b8fe54049ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98388
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework/inc')
-rw-r--r-- | framework/inc/recording/dispatchrecorder.hxx | 10 | ||||
-rw-r--r-- | framework/inc/services.h | 1 | ||||
-rw-r--r-- | framework/inc/uielement/langselectionmenucontroller.hxx | 10 |
3 files changed, 8 insertions, 13 deletions
diff --git a/framework/inc/recording/dispatchrecorder.hxx b/framework/inc/recording/dispatchrecorder.hxx index 54a9cb0e2185..806fe3cb2f22 100644 --- a/framework/inc/recording/dispatchrecorder.hxx +++ b/framework/inc/recording/dispatchrecorder.hxx @@ -57,12 +57,10 @@ class DispatchRecorder final DispatchRecorder( const css::uno::Reference< css::uno::XComponentContext >& xSMGR ); virtual ~DispatchRecorder() override; - // XInterface, XTypeProvider, XServiceInfo - DECLARE_XSERVICEINFO_NOFACTORY - /* Helper for registry */ - /// @throws css::uno::Exception - static css::uno::Reference< css::uno::XInterface > SAL_CALL impl_createInstance ( const css::uno::Reference< css::lang::XMultiServiceFactory >& xServiceManager ); - static css::uno::Reference< css::lang::XSingleServiceFactory > impl_createFactory ( const css::uno::Reference< css::lang::XMultiServiceFactory >& xServiceManager ); + /* interface XServiceInfo */ + virtual OUString SAL_CALL getImplementationName() override; + virtual sal_Bool SAL_CALL supportsService( const OUString& sServiceName ) override; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override; // XDispatchRecorder virtual void SAL_CALL startRecording ( const css::uno::Reference< css::frame::XFrame >& xFrame ) override; diff --git a/framework/inc/services.h b/framework/inc/services.h index 8e1044811157..01a93213abd9 100644 --- a/framework/inc/services.h +++ b/framework/inc/services.h @@ -35,7 +35,6 @@ namespace framework{ #define IMPLEMENTATIONNAME_QUICKLAUNCHER "com.sun.star.comp.desktop.QuickstartWrapper" #define IMPLEMENTATIONNAME_FWK_TASKCREATOR "com.sun.star.comp.framework.TaskCreator" -#define IMPLEMENTATIONNAME_LANGUAGESELECTIONMENUCONTROLLER "com.sun.star.comp.framework.LanguageSelectionMenuController" } // namespace framework diff --git a/framework/inc/uielement/langselectionmenucontroller.hxx b/framework/inc/uielement/langselectionmenucontroller.hxx index cdf682e3e02b..32f2a45bac9c 100644 --- a/framework/inc/uielement/langselectionmenucontroller.hxx +++ b/framework/inc/uielement/langselectionmenucontroller.hxx @@ -38,12 +38,10 @@ namespace framework LanguageSelectionMenuController( const css::uno::Reference< css::uno::XComponentContext >& xContext ); virtual ~LanguageSelectionMenuController() override; - // XServiceInfo - DECLARE_XSERVICEINFO_NOFACTORY - /* Helper for registry */ - /// @throws css::uno::Exception - static css::uno::Reference< css::uno::XInterface > SAL_CALL impl_createInstance ( const css::uno::Reference< css::lang::XMultiServiceFactory >& xServiceManager ); - static css::uno::Reference< css::lang::XSingleServiceFactory > impl_createFactory ( const css::uno::Reference< css::lang::XMultiServiceFactory >& xServiceManager ); + /* interface XServiceInfo */ + virtual OUString SAL_CALL getImplementationName() override; + virtual sal_Bool SAL_CALL supportsService( const OUString& sServiceName ) override; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override; // XPopupMenuController virtual void SAL_CALL updatePopupMenu() override; |