diff options
author | Noel Grandin <noel@peralex.com> | 2012-08-23 15:43:05 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-08-27 15:40:06 +0200 |
commit | f789715a414bd1115401f93d11f09260f891956c (patch) | |
tree | 2e7ce9d3841ae8c98585901ddae699dbb9528820 /framework | |
parent | 65c78617de30f4928255b15599e7709fa0081f67 (diff) |
fdo#46808, Use factory methods for frame::DispatchHelper instances
Change-Id: I7bdf16fc6d042e5ecd404c604a8b7c31c1ac7bc1
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/lomenubar/FrameHelper.cxx | 5 |
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. |