summaryrefslogtreecommitdiff
path: root/framework/source/dispatch/closedispatcher.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-01-07 16:19:36 +0200
committerNoel Grandin <noel@peralex.com>2013-01-15 09:56:00 +0200
commite7018375cdf0e5e542631df9dee6023ff80b7840 (patch)
tree50879e1febe6555236be77e8eb956c113019cd8c /framework/source/dispatch/closedispatcher.cxx
parent435989ad0616a36d03975096919721e8506f5516 (diff)
fdo#46808, Adapt frame::StartModule UNO service to new style
The service already existed, it just did not have an IDL file. Change-Id: I400551d34d074cc8cf36fad58badc921422a2efa
Diffstat (limited to 'framework/source/dispatch/closedispatcher.cxx')
-rw-r--r--framework/source/dispatch/closedispatcher.cxx14
1 files changed, 6 insertions, 8 deletions
diff --git a/framework/source/dispatch/closedispatcher.cxx b/framework/source/dispatch/closedispatcher.cxx
index eb9087e0ec79..1809a9e82631 100644
--- a/framework/source/dispatch/closedispatcher.cxx
+++ b/framework/source/dispatch/closedispatcher.cxx
@@ -28,6 +28,7 @@
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/frame/XController.hpp>
#include <com/sun/star/frame/CommandGroup.hpp>
+#include <com/sun/star/frame/StartModule.hpp>
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/awt/XTopWindow.hpp>
#include <com/sun/star/document/XActionLockable.hpp>
@@ -549,17 +550,14 @@ sal_Bool CloseDispatcher::implts_establishBackingMode()
return sal_False;
css::uno::Reference< css::awt::XWindow > xContainerWindow = xFrame->getContainerWindow();
- css::uno::Sequence< css::uno::Any > lArgs(1);
- lArgs[0] <<= xContainerWindow;
- css::uno::Reference< css::frame::XController > xBackingComp(
- xSMGR->createInstanceWithArguments(SERVICENAME_STARTMODULE, lArgs),
- css::uno::UNO_QUERY_THROW);
+ css::uno::Reference< css::frame::XController > xStartModule = css::frame::StartModule::createWithParentWindow(
+ comphelper::getComponentContext(xSMGR), xContainerWindow);
// Attention: You MUST(!) call setComponent() before you call attachFrame().
- css::uno::Reference< css::awt::XWindow > xBackingWin(xBackingComp, css::uno::UNO_QUERY);
- xFrame->setComponent(xBackingWin, xBackingComp);
- xBackingComp->attachFrame(xFrame);
+ css::uno::Reference< css::awt::XWindow > xBackingWin(xStartModule, css::uno::UNO_QUERY);
+ xFrame->setComponent(xBackingWin, xStartModule);
+ xStartModule->attachFrame(xFrame);
xContainerWindow->setVisible(sal_True);
return sal_True;