summaryrefslogtreecommitdiffstats
path: root/framework
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-08-23 15:43:05 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-08-27 15:40:06 +0200
commitf789715a414bd1115401f93d11f09260f891956c (patch)
tree2e7ce9d3841ae8c98585901ddae699dbb9528820 /framework
parentfdo#46808, Shiny UNO, More use factory to create XSimpleFileAccess instances (diff)
downloadcore-f789715a414bd1115401f93d11f09260f891956c.tar.gz
core-f789715a414bd1115401f93d11f09260f891956c.zip
fdo#46808, Use factory methods for frame::DispatchHelper instances
Change-Id: I7bdf16fc6d042e5ecd404c604a8b7c31c1ac7bc1
Diffstat (limited to 'framework')
-rw-r--r--framework/source/lomenubar/FrameHelper.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/framework/source/lomenubar/FrameHelper.cxx b/framework/source/lomenubar/FrameHelper.cxx
index 12edf35d15fa..cd40491344bf 100644
--- a/framework/source/lomenubar/FrameHelper.cxx
+++ b/framework/source/lomenubar/FrameHelper.cxx
@@ -42,10 +42,10 @@
#include <com/sun/star/awt/XMenuExtended.hpp>
#include <com/sun/star/awt/XMenuListener.hpp>
#include <com/sun/star/awt/XPopupMenuExtended.hpp>
+#include <com/sun/star/frame/DispatchHelper.hpp>
#include <com/sun/star/frame/XController.hpp>
#include <com/sun/star/frame/XComponentLoader.hpp>
#include <com/sun/star/frame/XDispatch.hpp>
-#include <com/sun/star/frame/XDispatchHelper.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
#include <com/sun/star/frame/XLayoutManager.hpp>
#include <com/sun/star/frame/XModel.hpp>
@@ -718,8 +718,7 @@ void
FrameHelper::dispatchCommand (OUString command)
{
OUString target = OUString(RTL_CONSTASCII_USTRINGPARAM(""));
- Reference < XDispatchHelper > xdh (m_xMSF->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.DispatchHelper"))),
- UNO_QUERY);
+ Reference < XDispatchHelper > xdh( DispatchHelper::create(comphelper::ComponentContext(m_xMSF).getUNOContext()) );
// This is a special case, we don't want the helper to be disconnected from the frame
// when PrintPreview dettaches. See the frameAction method.