summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-02-22 14:55:20 +0200
committerNoel Grandin <noel@peralex.com>2013-03-04 14:22:33 +0200
commit89d4ecc16e7e9501f357a26de50b3318d24446f3 (patch)
tree1f62de9516904ef8eac2612cdf7c77610dedc0a4
parent4633b07bed7d71d1ab9d7fa30d979f054043958b (diff)
fdo#46808, Convert frame::DispatchRecorder to new style
API CHANGE: dropped the XIndexReplace interface because no-one is using it. Change-Id: Iad77af588a070b22f2fce007a6ec4641758997a8
-rw-r--r--framework/inc/services.h2
-rw-r--r--framework/source/recording/dispatchrecorder.cxx4
-rw-r--r--offapi/UnoApi_offapi.mk2
-rw-r--r--offapi/com/sun/star/frame/DispatchRecorder.idl11
-rw-r--r--offapi/type_reference/types.rdbbin7439872 -> 7439872 bytes
-rw-r--r--sfx2/source/view/viewfrm.cxx8
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 <com/sun/star/frame/XDispatchRecorder.idl>
-#include <com/sun/star/container/XIndexReplace.idl>
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
--- a/offapi/type_reference/types.rdb
+++ b/offapi/type_reference/types.rdb
Binary files 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 <sfx2/viewfrm.hxx>
#include <com/sun/star/document/MacroExecMode.hpp>
#include <com/sun/star/frame/Desktop.hpp>
+#include <com/sun/star/frame/DispatchRecorder.hpp>
#include <com/sun/star/frame/DispatchRecorderSupplier.hpp>
#include <com/sun/star/frame/XLoadable.hpp>
#include <com/sun/star/frame/XLayoutManager.hpp>
@@ -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 );