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 /chart2 | |
parent | 65c78617de30f4928255b15599e7709fa0081f67 (diff) |
fdo#46808, Use factory methods for frame::DispatchHelper instances
Change-Id: I7bdf16fc6d042e5ecd404c604a8b7c31c1ac7bc1
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/controller/main/ChartController_Window.cxx | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx index 23a6eafdc3c0..16709ef22df2 100644 --- a/chart2/source/controller/main/ChartController_Window.cxx +++ b/chart2/source/controller/main/ChartController_Window.cxx @@ -51,7 +51,7 @@ #include <com/sun/star/chart2/RelativeSize.hpp> #include <com/sun/star/chart2/XRegressionCurveContainer.hpp> -#include <com/sun/star/frame/XDispatchHelper.hpp> +#include <com/sun/star/frame/DispatchHelper.hpp> #include <com/sun/star/frame/FrameSearchFlag.hpp> #include <com/sun/star/util/XUpdatable.hpp> #include <comphelper/InlineContainer.hxx> @@ -1550,20 +1550,15 @@ bool ChartController::execute_KeyInput( const KeyEvent& rKEvt ) if( ! bReturn && nCode == KEY_ESCAPE ) { - uno::Reference< frame::XDispatchHelper > xDispatchHelper( - m_xCC->getServiceManager()->createInstanceWithContext( - C2U("com.sun.star.frame.DispatchHelper"), m_xCC ), uno::UNO_QUERY ); - if( xDispatchHelper.is()) - { - uno::Sequence< beans::PropertyValue > aArgs; - xDispatchHelper->executeDispatch( - uno::Reference< frame::XDispatchProvider >( m_xFrame, uno::UNO_QUERY ), - C2U(".uno:TerminateInplaceActivation"), - C2U("_parent"), - frame::FrameSearchFlag::PARENT, - aArgs ); - bReturn = true; - } + uno::Reference< frame::XDispatchHelper > xDispatchHelper( frame::DispatchHelper::create(m_xCC) ); + uno::Sequence< beans::PropertyValue > aArgs; + xDispatchHelper->executeDispatch( + uno::Reference< frame::XDispatchProvider >( m_xFrame, uno::UNO_QUERY ), + C2U(".uno:TerminateInplaceActivation"), + C2U("_parent"), + frame::FrameSearchFlag::PARENT, + aArgs ); + bReturn = true; } if( ! bReturn && |