diff options
author | Noel Grandin <noel@peralex.com> | 2013-01-31 10:31:47 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-02-11 08:02:16 +0200 |
commit | bb98b129db1029aaa37511306836f0e31d13fc38 (patch) | |
tree | 0bc316c44a2d128f389e2a65feeba776ec080f79 | |
parent | ae25ee162c13277fa55778b228efa4959cbeac2a (diff) |
fdo#46808, use service constructor for awt::ContainerWindowProvider
Change-Id: I15f45bb51fe8880041c396025efdd5c91ebc3f13
-rw-r--r-- | cui/source/options/treeopt.cxx | 8 | ||||
-rw-r--r-- | framework/source/classes/fwktabwindow.cxx | 8 |
2 files changed, 4 insertions, 12 deletions
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index 358a56570adf..4b8a3a621b26 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -52,7 +52,7 @@ #include "treeopt.hxx" #include <com/sun/star/awt/XContainerWindowEventHandler.hpp> -#include <com/sun/star/awt/XContainerWindowProvider.hpp> +#include <com/sun/star/awt/ContainerWindowProvider.hpp> #include <com/sun/star/awt/XControl.hpp> #include <com/sun/star/awt/PosSize.hpp> #include <com/sun/star/frame/Desktop.hpp> @@ -1122,11 +1122,7 @@ void OfaTreeOptionsDialog::SelectHdl_Impl() { if ( !m_xContainerWinProvider.is() ) { - Reference < XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() ); - m_xContainerWinProvider = Reference < awt::XContainerWindowProvider >( - xFactory->createInstance( - "com.sun.star.awt.ContainerWindowProvider" ), UNO_QUERY ); - DBG_ASSERT( m_xContainerWinProvider.is(), "service com.sun.star.awt.ContainerWindowProvider could not be loaded" ); + m_xContainerWinProvider = awt::ContainerWindowProvider::create( ::comphelper::getProcessComponentContext() ); } pPageInfo->m_pExtPage = new ExtensionsTabPage( diff --git a/framework/source/classes/fwktabwindow.cxx b/framework/source/classes/fwktabwindow.cxx index 55ae33741774..323f4b4cddd8 100644 --- a/framework/source/classes/fwktabwindow.cxx +++ b/framework/source/classes/fwktabwindow.cxx @@ -25,13 +25,12 @@ #include <com/sun/star/awt/PosSize.hpp> #include <com/sun/star/awt/XContainerWindowEventHandler.hpp> -#include <com/sun/star/awt/XContainerWindowProvider.hpp> +#include <com/sun/star/awt/ContainerWindowProvider.hpp> #include <com/sun/star/awt/XWindow.hpp> #include <com/sun/star/awt/XWindowPeer.hpp> #include <com/sun/star/awt/XControl.hpp> #include <com/sun/star/beans/NamedValue.hpp> #include <com/sun/star/graphic/XGraphic.hpp> -#include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <comphelper/processfactory.hxx> #include <toolkit/helper/vclunohelper.hxx> @@ -41,7 +40,6 @@ #include <vcl/image.hxx> #include <vcl/msgbox.hxx> -const char SERVICENAME_WINPROVIDER[] = "com.sun.star.awt.ContainerWindowProvider"; const char EXTERNAL_EVENT[] = "external_event"; const char INITIALIZE_METHOD[] = "initialize"; @@ -197,9 +195,7 @@ FwkTabWindow::FwkTabWindow( Window* pParent ) : m_aTabCtrl ( this, FwkResId( TC_TABCONTROL ) ) { - uno::Reference < lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() ); - m_xWinProvider = uno::Reference < awt::XContainerWindowProvider >( - xFactory->createInstance( rtl::OUString(SERVICENAME_WINPROVIDER) ), uno::UNO_QUERY ); + m_xWinProvider = awt::ContainerWindowProvider::create( ::comphelper::getProcessComponentContext() ); SetPaintTransparent(true); |