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 /embeddedobj | |
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 'embeddedobj')
-rw-r--r-- | embeddedobj/source/general/docholder.cxx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/embeddedobj/source/general/docholder.cxx b/embeddedobj/source/general/docholder.cxx index 75643c901bda..c7e63d86ee03 100644 --- a/embeddedobj/source/general/docholder.cxx +++ b/embeddedobj/source/general/docholder.cxx @@ -38,6 +38,7 @@ #include <com/sun/star/frame/XControllerBorder.hpp> #include <com/sun/star/util/XModifyBroadcaster.hpp> #include <com/sun/star/frame/XDispatchProviderInterception.hpp> +#include <com/sun/star/awt/Toolkit.hpp> #include <com/sun/star/awt/XTopWindow.hpp> #include <com/sun/star/awt/PosSize.hpp> #include <com/sun/star/awt/XView.hpp> @@ -454,11 +455,8 @@ sal_Bool DocumentHolder::ShowInplace( const uno::Reference< awt::XWindowPeer >& awt::Rectangle(),//aOwnRectangle, awt::WindowAttribute::SHOW | awt::VclWindowPeerAttribute::CLIPCHILDREN ); - uno::Reference< awt::XToolkit > xToolkit( - m_xFactory->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.Toolkit" )) ), - uno::UNO_QUERY ); - if ( !xToolkit.is() ) - throw uno::RuntimeException(); + uno::Reference< awt::XToolkit2 > xToolkit = + awt::Toolkit::create(comphelper::getComponentContext(m_xFactory)); uno::Reference< awt::XWindowPeer > xNewWinPeer = xToolkit->createWindow( aOwnWinDescriptor ); uno::Reference< awt::XWindow > xOwnWindow( xNewWinPeer, uno::UNO_QUERY ); |