Kaydet (Commit) 89d4ecc1 authored tarafından Noel Grandin's avatar Noel Grandin

fdo#46808, Convert frame::DispatchRecorder to new style

API CHANGE: dropped the XIndexReplace interface because no-one is using it.

Change-Id: Iad77af588a070b22f2fce007a6ec4641758997a8
üst 4633b07b
...@@ -38,7 +38,6 @@ namespace framework{ ...@@ -38,7 +38,6 @@ namespace framework{
#define SERVICENAME_CONTENTHANDLERFACTORY DECLARE_ASCII("com.sun.star.frame.ContentHandlerFactory" ) #define SERVICENAME_CONTENTHANDLERFACTORY DECLARE_ASCII("com.sun.star.frame.ContentHandlerFactory" )
#define SERVICENAME_STATUSINDICATORFACTORY DECLARE_ASCII("com.sun.star.task.StatusIndicatorFactory" ) #define SERVICENAME_STATUSINDICATORFACTORY DECLARE_ASCII("com.sun.star.task.StatusIndicatorFactory" )
#define SERVICENAME_JOB DECLARE_ASCII("com.sun.star.task.Job" ) #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_PROTOCOLHANDLER DECLARE_ASCII("com.sun.star.frame.ProtocolHandler" )
#define SERVICENAME_PATHSETTINGS DECLARE_ASCII("com.sun.star.util.PathSettings" ) #define SERVICENAME_PATHSETTINGS DECLARE_ASCII("com.sun.star.util.PathSettings" )
#define SERVICENAME_LAYOUTMANAGER DECLARE_ASCII("com.sun.star.frame.LayoutManager" ) #define SERVICENAME_LAYOUTMANAGER DECLARE_ASCII("com.sun.star.frame.LayoutManager" )
...@@ -77,7 +76,6 @@ namespace framework{ ...@@ -77,7 +76,6 @@ namespace framework{
#define IMPLEMENTATIONNAME_SWTHREADMANAGER DECLARE_ASCII("com.sun.star.util.comp.FinalThreadManager" ) #define IMPLEMENTATIONNAME_SWTHREADMANAGER DECLARE_ASCII("com.sun.star.util.comp.FinalThreadManager" )
#define IMPLEMENTATIONNAME_JOBEXECUTOR DECLARE_ASCII("com.sun.star.comp.framework.JobExecutor" ) #define IMPLEMENTATIONNAME_JOBEXECUTOR DECLARE_ASCII("com.sun.star.comp.framework.JobExecutor" )
#define IMPLEMENTATIONNAME_DISPATCHRECORDERSUPPLIER DECLARE_ASCII("com.sun.star.comp.framework.DispatchRecorderSupplier") #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_MAILTODISPATCHER DECLARE_ASCII("com.sun.star.comp.framework.MailToDispatcher" )
#define IMPLEMENTATIONNAME_SERVICEHANDLER DECLARE_ASCII("com.sun.star.comp.framework.ServiceHandler" ) #define IMPLEMENTATIONNAME_SERVICEHANDLER DECLARE_ASCII("com.sun.star.comp.framework.ServiceHandler" )
#define IMPLEMENTATIONNAME_UIINTERACTIONHANDLER DECLARE_ASCII("com.sun.star.comp.uui.UUIInteractionHandler" ) #define IMPLEMENTATIONNAME_UIINTERACTIONHANDLER DECLARE_ASCII("com.sun.star.comp.uui.UUIInteractionHandler" )
......
...@@ -59,8 +59,8 @@ DEFINE_XTYPEPROVIDER_6( ...@@ -59,8 +59,8 @@ DEFINE_XTYPEPROVIDER_6(
DEFINE_XSERVICEINFO_MULTISERVICE( DEFINE_XSERVICEINFO_MULTISERVICE(
DispatchRecorder, DispatchRecorder,
::cppu::OWeakObject, ::cppu::OWeakObject,
SERVICENAME_DISPATCHRECORDER, OUString("com.sun.star.frame.DispatchRecorder"),
IMPLEMENTATIONNAME_DISPATCHRECORDER) OUString("com.sun.star.comp.framework.DispatchRecorder"))
DEFINE_INIT_SERVICE( DEFINE_INIT_SERVICE(
DispatchRecorder, DispatchRecorder,
......
...@@ -149,6 +149,7 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/frame,\ ...@@ -149,6 +149,7 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/frame,\
AutoRecovery \ AutoRecovery \
Desktop \ Desktop \
DispatchHelper \ DispatchHelper \
DispatchRecorder \
DispatchRecorderSupplier \ DispatchRecorderSupplier \
DocumentTemplates \ DocumentTemplates \
GlobalEventBroadcaster \ GlobalEventBroadcaster \
...@@ -872,7 +873,6 @@ $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/frame,\ ...@@ -872,7 +873,6 @@ $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/frame,\
DesktopTask \ DesktopTask \
DesktopTasks \ DesktopTasks \
DispatchProvider \ DispatchProvider \
DispatchRecorder \
Frame \ Frame \
FrameControl \ FrameControl \
FrameLoader \ FrameLoader \
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
#define __com_sun_star_frame_DispatchRecorder_idl__ #define __com_sun_star_frame_DispatchRecorder_idl__
#include <com/sun/star/frame/XDispatchRecorder.idl> #include <com/sun/star/frame/XDispatchRecorder.idl>
#include <com/sun/star/container/XIndexReplace.idl>
module com { module sun { module star { module frame { module com { module sun { module star { module frame {
...@@ -42,15 +41,7 @@ ...@@ -42,15 +41,7 @@
@since OOo 1.1.2 @since OOo 1.1.2
*/ */
published service DispatchRecorder published service DispatchRecorder : XDispatchRecorder;
{
/** 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;
};
}; }; }; }; }; }; }; };
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include <sfx2/viewfrm.hxx> #include <sfx2/viewfrm.hxx>
#include <com/sun/star/document/MacroExecMode.hpp> #include <com/sun/star/document/MacroExecMode.hpp>
#include <com/sun/star/frame/Desktop.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/DispatchRecorderSupplier.hpp>
#include <com/sun/star/frame/XLoadable.hpp> #include <com/sun/star/frame/XLoadable.hpp>
#include <com/sun/star/frame/XLayoutManager.hpp> #include <com/sun/star/frame/XLayoutManager.hpp>
...@@ -2828,15 +2829,10 @@ void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq ) ...@@ -2828,15 +2829,10 @@ void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq )
else if ( rReq.GetSlot() == SID_RECORDMACRO ) else if ( rReq.GetSlot() == SID_RECORDMACRO )
{ {
// enable recording // 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( com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > xContext(
::comphelper::getProcessComponentContext()); ::comphelper::getProcessComponentContext());
xRecorder = com::sun::star::uno::Reference< com::sun::star::frame::XDispatchRecorder >( xRecorder = com::sun::star::frame::DispatchRecorder::create( xContext );
xFactory->createInstance(rtl::OUString("com.sun.star.frame.DispatchRecorder")),
com::sun::star::uno::UNO_QUERY);
xSupplier = com::sun::star::frame::DispatchRecorderSupplier::create( xContext ); xSupplier = com::sun::star::frame::DispatchRecorderSupplier::create( xContext );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment