summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-10-17 15:51:00 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-10-29 17:32:54 +0100
commit9b63e4e6e46ee7560d99c3d4cff5e085efc14949 (patch)
tree4bbd88a3b97943ccf97028115dd8a21c26640054
parentec4a5ba7f2f205ace9a8e64fb59eb6d43ee5f2ab (diff)
fdo#46808, use service constructor for frame::DispatchRecorderSupplier
-rw-r--r--framework/inc/services.h1
-rw-r--r--framework/source/recording/dispatchrecordersupplier.cxx2
-rw-r--r--sfx2/source/view/viewfrm.cxx7
3 files changed, 5 insertions, 5 deletions
diff --git a/framework/inc/services.h b/framework/inc/services.h
index a58c51680782..da5ade37193e 100644
--- a/framework/inc/services.h
+++ b/framework/inc/services.h
@@ -49,7 +49,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_DISPATCHRECORDERSUPPLIER DECLARE_ASCII("com.sun.star.frame.DispatchRecorderSupplier" )
#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" )
diff --git a/framework/source/recording/dispatchrecordersupplier.cxx b/framework/source/recording/dispatchrecordersupplier.cxx
index 164b6370b7c1..22ad83824ac0 100644
--- a/framework/source/recording/dispatchrecordersupplier.cxx
+++ b/framework/source/recording/dispatchrecordersupplier.cxx
@@ -47,7 +47,7 @@ DEFINE_XTYPEPROVIDER_3(
DEFINE_XSERVICEINFO_MULTISERVICE(
DispatchRecorderSupplier,
::cppu::OWeakObject,
- SERVICENAME_DISPATCHRECORDERSUPPLIER,
+ DECLARE_ASCII("com.sun.star.frame.DispatchRecorderSupplier"),
IMPLEMENTATIONNAME_DISPATCHRECORDERSUPPLIER)
DEFINE_INIT_SERVICE(
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index c963fe6ed345..f039d3e2c39c 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -23,6 +23,7 @@
#include <sfx2/infobar.hxx>
#include <sfx2/viewfrm.hxx>
#include <com/sun/star/document/MacroExecMode.hpp>
+#include <com/sun/star/frame/DispatchRecorderSupplier.hpp>
#include <com/sun/star/frame/XLoadable.hpp>
#include <com/sun/star/frame/XLayoutManager.hpp>
#include <com/sun/star/frame/XComponentLoader.hpp>
@@ -2833,14 +2834,14 @@ void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq )
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);
- xSupplier = com::sun::star::uno::Reference< com::sun::star::frame::XDispatchRecorderSupplier >(
- xFactory->createInstance(rtl::OUString("com.sun.star.frame.DispatchRecorderSupplier")),
- com::sun::star::uno::UNO_QUERY);
+ xSupplier = com::sun::star::frame::DispatchRecorderSupplier::create( xContext );
xSupplier->setDispatchRecorder(xRecorder);
xRecorder->startRecording(xFrame);