summaryrefslogtreecommitdiff
path: root/desktop/source/deployment
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-10-17 10:52:52 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-10-24 16:49:49 +0200
commit33a0f8ce656c8c5bb9c3c3deaa10c182e262b374 (patch)
treeabd469ffb224c8d7b2de1cf76e3aada03e035fc1 /desktop/source/deployment
parentf252b332dd2652abb02851ba0c2521c045787801 (diff)
fdo#46808, Adapt awt::Toolkit UNO service to new style
Create a merged XToolkit2 interface for this service to implement. Which is backwards-compatible, but does not require creating a new service. Also mark sub-interfaces as non-optional. Change-Id: I278d0288e92be277033013302267cf93f7d70480
Diffstat (limited to 'desktop/source/deployment')
-rw-r--r--desktop/source/deployment/gui/dp_gui_updatedialog.cxx14
1 files changed, 3 insertions, 11 deletions
diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
index 27ca935f394f..129663a28dec 100644
--- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
@@ -42,7 +42,7 @@
#include "com/sun/star/awt/WindowAttribute.hpp"
#include "com/sun/star/awt/WindowClass.hpp"
#include "com/sun/star/awt/WindowDescriptor.hpp"
-#include "com/sun/star/awt/XToolkit.hpp"
+#include "com/sun/star/awt/Toolkit.hpp"
#include "com/sun/star/awt/XWindow.hpp"
#include "com/sun/star/awt/XWindowPeer.hpp"
#include "com/sun/star/beans/NamedValue.hpp"
@@ -554,17 +554,9 @@ UpdateDialog::UpdateDialog(
m_xExtensionManager = deployment::ExtensionManager::get( context );
- uno::Reference< awt::XToolkit > toolkit;
+ uno::Reference< awt::XToolkit2 > toolkit;
try {
- toolkit = uno::Reference< awt::XToolkit >(
- (uno::Reference< lang::XMultiComponentFactory >(
- m_context->getServiceManager(),
- uno::UNO_QUERY_THROW)->
- createInstanceWithContext(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.Toolkit")),
- m_context)),
- uno::UNO_QUERY_THROW);
+ toolkit = awt::Toolkit::create(m_context);
} catch (const uno::RuntimeException &) {
throw;
} catch (const uno::Exception & e) {