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 /sdext | |
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 'sdext')
-rw-r--r-- | sdext/source/minimizer/unodialog.cxx | 3 | ||||
-rw-r--r-- | sdext/source/presenter/PresenterSlideShowView.cxx | 7 |
2 files changed, 4 insertions, 6 deletions
diff --git a/sdext/source/minimizer/unodialog.cxx b/sdext/source/minimizer/unodialog.cxx index c39e90106ed0..bb28f1127638 100644 --- a/sdext/source/minimizer/unodialog.cxx +++ b/sdext/source/minimizer/unodialog.cxx @@ -25,6 +25,7 @@ #include <com/sun/star/view/XSelectionSupplier.hpp> #include <com/sun/star/view/XControlAccess.hpp> #include <com/sun/star/frame/XDispatch.hpp> +#include <com/sun/star/awt/Toolkit.hpp> #include <com/sun/star/awt/XMessageBoxFactory.hpp> #include <com/sun/star/awt/MessageBoxButtons.hpp> @@ -97,7 +98,7 @@ Reference< XWindowPeer > UnoDialog::createWindowPeer( Reference< XWindowPeer > x throw ( Exception ) { mxDialogWindow->setVisible( sal_False ); - Reference< XToolkit > xToolkit( mxMSF->getServiceManager()->createInstanceWithContext( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.Toolkit" ) ), mxMSF ), UNO_QUERY_THROW ); + Reference< XToolkit > xToolkit( Toolkit::create( mxMSF ), UNO_QUERY_THROW ); if ( !xParentPeer.is() ) xParentPeer = xToolkit->getDesktopWindow(); mxReschedule = Reference< XReschedule >( xToolkit, UNO_QUERY ); diff --git a/sdext/source/presenter/PresenterSlideShowView.cxx b/sdext/source/presenter/PresenterSlideShowView.cxx index ba820ebefe41..2201a1edca2f 100644 --- a/sdext/source/presenter/PresenterSlideShowView.cxx +++ b/sdext/source/presenter/PresenterSlideShowView.cxx @@ -25,6 +25,7 @@ #include "PresenterPaneContainer.hxx" #include <com/sun/star/awt/InvalidateStyle.hpp> #include <com/sun/star/awt/PosSize.hpp> +#include <com/sun/star/awt/Toolkit.hpp> #include <com/sun/star/awt/WindowAttribute.hpp> #include <com/sun/star/awt/XWindow.hpp> #include <com/sun/star/awt/XWindow2.hpp> @@ -834,11 +835,7 @@ Reference<awt::XWindow> PresenterSlideShowView::CreateViewWindow ( if ( ! xFactory.is()) return xViewWindow; - Reference<awt::XToolkit> xToolkit ( - xFactory->createInstanceWithContext( - OUString("com.sun.star.awt.Toolkit"), - mxComponentContext), - UNO_QUERY_THROW); + Reference<awt::XToolkit2> xToolkit = awt::Toolkit::create(mxComponentContext); awt::WindowDescriptor aWindowDescriptor ( awt::WindowClass_CONTAINER, OUString(), |