summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/deployment/gui/dp_gui_updatedialog.cxx14
-rw-r--r--desktop/test/deployment/active/active_native.cxx10
-rw-r--r--desktop/test/deployment/passive/passive_native.cxx10
3 files changed, 13 insertions, 21 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) {
diff --git a/desktop/test/deployment/active/active_native.cxx b/desktop/test/deployment/active/active_native.cxx
index 9845fd511168..493728d44c3a 100644
--- a/desktop/test/deployment/active/active_native.cxx
+++ b/desktop/test/deployment/active/active_native.cxx
@@ -31,6 +31,7 @@
#include "boost/noncopyable.hpp"
#include "com/sun/star/awt/MessageBoxButtons.hpp"
#include "com/sun/star/awt/Rectangle.hpp"
+#include "com/sun/star/awt/Toolkit.hpp"
#include "com/sun/star/awt/XMessageBox.hpp"
#include "com/sun/star/awt/XMessageBoxFactory.hpp"
#include "com/sun/star/awt/XWindowPeer.hpp"
@@ -235,13 +236,12 @@ void Dispatch::dispatch(
css::uno::Sequence< css::beans::PropertyValue > const &)
throw (css::uno::RuntimeException)
{
- css::uno::Reference< css::lang::XMultiComponentFactory > smgr(
- context_->getServiceManager(), css::uno::UNO_SET_THROW);
+ css::uno::Reference< css::lang::XMultiComponentFactory > smgr( context_->getServiceManager(), css::uno::UNO_SET_THROW);
+ css::uno::Reference< css::awt::XToolkit > toolkit( css::awt::Toolkit::create(context_), css::uno::UNO_SET_THROW);
+
css::uno::Reference< css::awt::XMessageBox > box(
css::uno::Reference< css::awt::XMessageBoxFactory >(
- smgr->createInstanceWithContext(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.awt.Toolkit")), context_),
+ toolkit,
css::uno::UNO_QUERY_THROW)->createMessageBox(
css::uno::Reference< css::awt::XWindowPeer >(
css::uno::Reference< css::frame::XFrame >(
diff --git a/desktop/test/deployment/passive/passive_native.cxx b/desktop/test/deployment/passive/passive_native.cxx
index 0da885d5a31d..5e409f6cb30d 100644
--- a/desktop/test/deployment/passive/passive_native.cxx
+++ b/desktop/test/deployment/passive/passive_native.cxx
@@ -32,6 +32,7 @@
#include "com/sun/star/awt/MessageBoxButtons.hpp"
#include "com/sun/star/awt/Rectangle.hpp"
#include "com/sun/star/awt/XMessageBox.hpp"
+#include "com/sun/star/awt/Toolkit.hpp"
#include "com/sun/star/awt/XMessageBoxFactory.hpp"
#include "com/sun/star/awt/XWindowPeer.hpp"
#include "com/sun/star/beans/PropertyValue.hpp"
@@ -233,13 +234,12 @@ void Dispatch::dispatch(
css::uno::Sequence< css::beans::PropertyValue > const &)
throw (css::uno::RuntimeException)
{
- css::uno::Reference< css::lang::XMultiComponentFactory > smgr(
- context_->getServiceManager(), css::uno::UNO_SET_THROW);
+ css::uno::Reference< css::lang::XMultiComponentFactory > smgr(context_->getServiceManager(), css::uno::UNO_SET_THROW);
+ css::uno::Reference< css::awt::XToolkit > toolkit( css::awt::Toolkit::create(context_), css::uno::UNO_SET_THROW);
+
css::uno::Reference< css::awt::XMessageBox > box(
css::uno::Reference< css::awt::XMessageBoxFactory >(
- smgr->createInstanceWithContext(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.awt.Toolkit")), context_),
+ toolkit,
css::uno::UNO_QUERY_THROW)->createMessageBox(
css::uno::Reference< css::awt::XWindowPeer >(
css::uno::Reference< css::frame::XFrame >(