diff options
author | Noel Grandin <noel@peralex.com> | 2012-10-17 10:52:52 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-10-24 16:49:49 +0200 |
commit | 33a0f8ce656c8c5bb9c3c3deaa10c182e262b374 (patch) | |
tree | abd469ffb224c8d7b2de1cf76e3aada03e035fc1 /desktop/test | |
parent | f252b332dd2652abb02851ba0c2521c045787801 (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/test')
-rw-r--r-- | desktop/test/deployment/active/active_native.cxx | 10 | ||||
-rw-r--r-- | desktop/test/deployment/passive/passive_native.cxx | 10 |
2 files changed, 10 insertions, 10 deletions
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 >( |