From 89d4ecc16e7e9501f357a26de50b3318d24446f3 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 22 Feb 2013 14:55:20 +0200 Subject: fdo#46808, Convert frame::DispatchRecorder to new style API CHANGE: dropped the XIndexReplace interface because no-one is using it. Change-Id: Iad77af588a070b22f2fce007a6ec4641758997a8 --- framework/inc/services.h | 2 -- framework/source/recording/dispatchrecorder.cxx | 4 ++-- offapi/UnoApi_offapi.mk | 2 +- offapi/com/sun/star/frame/DispatchRecorder.idl | 11 +---------- offapi/type_reference/types.rdb | Bin 7439872 -> 7439872 bytes sfx2/source/view/viewfrm.cxx | 8 ++------ 6 files changed, 6 insertions(+), 21 deletions(-) diff --git a/framework/inc/services.h b/framework/inc/services.h index 3a5496a565ea..abc275b58ae5 100644 --- a/framework/inc/services.h +++ b/framework/inc/services.h @@ -38,7 +38,6 @@ namespace framework{ #define SERVICENAME_CONTENTHANDLERFACTORY DECLARE_ASCII("com.sun.star.frame.ContentHandlerFactory" ) #define SERVICENAME_STATUSINDICATORFACTORY DECLARE_ASCII("com.sun.star.task.StatusIndicatorFactory" ) #define SERVICENAME_JOB DECLARE_ASCII("com.sun.star.task.Job" ) -#define SERVICENAME_DISPATCHRECORDER DECLARE_ASCII("com.sun.star.frame.DispatchRecorder" ) #define SERVICENAME_PROTOCOLHANDLER DECLARE_ASCII("com.sun.star.frame.ProtocolHandler" ) #define SERVICENAME_PATHSETTINGS DECLARE_ASCII("com.sun.star.util.PathSettings" ) #define SERVICENAME_LAYOUTMANAGER DECLARE_ASCII("com.sun.star.frame.LayoutManager" ) @@ -77,7 +76,6 @@ namespace framework{ #define IMPLEMENTATIONNAME_SWTHREADMANAGER DECLARE_ASCII("com.sun.star.util.comp.FinalThreadManager" ) #define IMPLEMENTATIONNAME_JOBEXECUTOR DECLARE_ASCII("com.sun.star.comp.framework.JobExecutor" ) #define IMPLEMENTATIONNAME_DISPATCHRECORDERSUPPLIER DECLARE_ASCII("com.sun.star.comp.framework.DispatchRecorderSupplier") -#define IMPLEMENTATIONNAME_DISPATCHRECORDER DECLARE_ASCII("com.sun.star.comp.framework.DispatchRecorder" ) #define IMPLEMENTATIONNAME_MAILTODISPATCHER DECLARE_ASCII("com.sun.star.comp.framework.MailToDispatcher" ) #define IMPLEMENTATIONNAME_SERVICEHANDLER DECLARE_ASCII("com.sun.star.comp.framework.ServiceHandler" ) #define IMPLEMENTATIONNAME_UIINTERACTIONHANDLER DECLARE_ASCII("com.sun.star.comp.uui.UUIInteractionHandler" ) diff --git a/framework/source/recording/dispatchrecorder.cxx b/framework/source/recording/dispatchrecorder.cxx index f4a131358c70..73c8d1e5af5d 100644 --- a/framework/source/recording/dispatchrecorder.cxx +++ b/framework/source/recording/dispatchrecorder.cxx @@ -59,8 +59,8 @@ DEFINE_XTYPEPROVIDER_6( DEFINE_XSERVICEINFO_MULTISERVICE( DispatchRecorder, ::cppu::OWeakObject, - SERVICENAME_DISPATCHRECORDER, - IMPLEMENTATIONNAME_DISPATCHRECORDER) + OUString("com.sun.star.frame.DispatchRecorder"), + OUString("com.sun.star.comp.framework.DispatchRecorder")) DEFINE_INIT_SERVICE( DispatchRecorder, diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk index 3f2f28782539..81968bbae7bd 100644 --- a/offapi/UnoApi_offapi.mk +++ b/offapi/UnoApi_offapi.mk @@ -149,6 +149,7 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/frame,\ AutoRecovery \ Desktop \ DispatchHelper \ + DispatchRecorder \ DispatchRecorderSupplier \ DocumentTemplates \ GlobalEventBroadcaster \ @@ -872,7 +873,6 @@ $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/frame,\ DesktopTask \ DesktopTasks \ DispatchProvider \ - DispatchRecorder \ Frame \ FrameControl \ FrameLoader \ diff --git a/offapi/com/sun/star/frame/DispatchRecorder.idl b/offapi/com/sun/star/frame/DispatchRecorder.idl index 499f5ba019e9..2038477adb94 100644 --- a/offapi/com/sun/star/frame/DispatchRecorder.idl +++ b/offapi/com/sun/star/frame/DispatchRecorder.idl @@ -20,7 +20,6 @@ #define __com_sun_star_frame_DispatchRecorder_idl__ #include -#include module com { module sun { module star { module frame { @@ -42,15 +41,7 @@ @since OOo 1.1.2 */ -published service DispatchRecorder -{ - /** provides the record functionality and access on the generated code - */ - interface com::sun::star::frame::XDispatchRecorder; - /** provides replacement capability of recorded statements - */ - interface com::sun::star::container::XIndexReplace; -}; +published service DispatchRecorder : XDispatchRecorder; }; }; }; }; diff --git a/offapi/type_reference/types.rdb b/offapi/type_reference/types.rdb index ff334d8332de..5c4c99cee576 100644 Binary files a/offapi/type_reference/types.rdb and b/offapi/type_reference/types.rdb differ diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index bdc54c0b505c..9ec782e6aab1 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -2828,15 +2829,10 @@ void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq ) else if ( rReq.GetSlot() == SID_RECORDMACRO ) { // enable recording - com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > xFactory( - ::comphelper::getProcessServiceFactory(), - com::sun::star::uno::UNO_QUERY); com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext()); - xRecorder = com::sun::star::uno::Reference< com::sun::star::frame::XDispatchRecorder >( - xFactory->createInstance(rtl::OUString("com.sun.star.frame.DispatchRecorder")), - com::sun::star::uno::UNO_QUERY); + xRecorder = com::sun::star::frame::DispatchRecorder::create( xContext ); xSupplier = com::sun::star::frame::DispatchRecorderSupplier::create( xContext ); -- cgit v1.2.3