summaryrefslogtreecommitdiff
path: root/sfx2/source/view/viewfrm.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/view/viewfrm.cxx')
-rw-r--r--sfx2/source/view/viewfrm.cxx8
1 files changed, 2 insertions, 6 deletions
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 );