summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-10-12 11:44:23 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-10-23 13:06:14 +0200
commitb30ee83058793ea8fbb020e5ac8f118bd20853d5 (patch)
treec187507f36c6288e5f4ede78a0d5e33876f7b3f1 /comphelper
parent5e48667f6bdd2f5e05b3f41d080fda06bd3d7c16 (diff)
fdo#46808, use service constructor for beans::Introspection
Change-Id: Ieb49277020d31779979d8eb508391d6f8b97bf94
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/inc/comphelper/eventattachermgr.hxx6
-rw-r--r--comphelper/source/eventattachermgr/eventattachermgr.cxx17
2 files changed, 6 insertions, 17 deletions
diff --git a/comphelper/inc/comphelper/eventattachermgr.hxx b/comphelper/inc/comphelper/eventattachermgr.hxx
index 2366dc687e67..a525e7c4ea54 100644
--- a/comphelper/inc/comphelper/eventattachermgr.hxx
+++ b/comphelper/inc/comphelper/eventattachermgr.hxx
@@ -26,9 +26,7 @@
namespace com { namespace sun { namespace star {
namespace uno {
class Exception;
-}
-namespace lang {
- class XMultiServiceFactory;
+ class XComponentContext;
}
namespace script {
class XEventAttacherManager;
@@ -44,7 +42,7 @@ namespace comphelper
COMPHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::script::XEventAttacherManager >
createEventAttacherManager(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr )
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > & rxContext )
throw( ::com::sun::star::uno::Exception );
}
diff --git a/comphelper/source/eventattachermgr/eventattachermgr.cxx b/comphelper/source/eventattachermgr/eventattachermgr.cxx
index 85ed313a11fe..32ab38973407 100644
--- a/comphelper/source/eventattachermgr/eventattachermgr.cxx
+++ b/comphelper/source/eventattachermgr/eventattachermgr.cxx
@@ -25,7 +25,7 @@
#include <osl/diagnose.h>
#include <comphelper/eventattachermgr.hxx>
#include <comphelper/processfactory.hxx>
-#include <com/sun/star/beans/XIntrospection.hpp>
+#include <com/sun/star/beans/Introspection.hpp>
#include <com/sun/star/io/XObjectInputStream.hpp>
#include <com/sun/star/io/XPersistObject.hpp>
#include <com/sun/star/io/XObjectOutputStream.hpp>
@@ -353,20 +353,11 @@ void SAL_CALL AttacherAllListener_Impl::disposing(const EventObject& )
// Constructor method for EventAttacherManager
-Reference< XEventAttacherManager > createEventAttacherManager( const Reference< XMultiServiceFactory > & rSMgr )
+Reference< XEventAttacherManager > createEventAttacherManager( const Reference< XComponentContext > & rxContext )
throw( Exception )
{
- if ( rSMgr.is() )
- {
- Reference< XInterface > xIFace( rSMgr->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.beans.Introspection" )) ) );
- if ( xIFace.is() )
- {
- Reference< XIntrospection > xIntrospection( xIFace, UNO_QUERY);
- return new ImplEventAttacherManager( xIntrospection, comphelper::getComponentContext(rSMgr) );
- }
- }
-
- return Reference< XEventAttacherManager >();
+ Reference< XIntrospection > xIntrospection = Introspection::create( rxContext );
+ return new ImplEventAttacherManager( xIntrospection, rxContext );
}
//-----------------------------------------------------------------------------