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 /sfx2/workben/custompanel | |
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 'sfx2/workben/custompanel')
-rw-r--r-- | sfx2/workben/custompanel/ctp_panel.cxx | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sfx2/workben/custompanel/ctp_panel.cxx b/sfx2/workben/custompanel/ctp_panel.cxx index 6cde8e4e5fb9..d41f2e64a847 100644 --- a/sfx2/workben/custompanel/ctp_panel.cxx +++ b/sfx2/workben/custompanel/ctp_panel.cxx @@ -22,7 +22,7 @@ #include <com/sun/star/lang/DisposedException.hpp> #include <com/sun/star/awt/XWindowPeer.hpp> -#include <com/sun/star/awt/XToolkit.hpp> +#include <com/sun/star/awt/Toolkit.hpp> #include <com/sun/star/awt/WindowClass.hpp> #include <com/sun/star/awt/WindowAttribute.hpp> #include <com/sun/star/awt/PosSize.hpp> @@ -81,10 +81,7 @@ namespace sd { namespace colortoolpanel { ENSURE_OR_THROW( i_rContext.is(), "illegal component context" ); Reference< XMultiComponentFactory > xFactory( i_rContext->getServiceManager(), UNO_SET_THROW ); - Reference< XToolkit > xToolkit( xFactory->createInstanceWithContext( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.Toolkit" ) ), - i_rContext - ), UNO_QUERY_THROW ); + Reference< XToolkit2 > xToolkit = Toolkit::create(i_rContext); WindowDescriptor aWindow; aWindow.Type = WindowClass_SIMPLE; |