summaryrefslogtreecommitdiff
path: root/framework/inc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-09-29 17:20:22 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-09-29 18:18:28 +0200
commitc2ca6fabd1afc3fc07001721c2069d3c8db7000a (patch)
tree350741d6d19564bcaf00506bd7d22b4c644e0fdc /framework/inc
parentf05d7abf93bbcf443cb0b5759ca19992e2fa85a3 (diff)
Use comphelper::getComponentContext
...and some further clean up. Change-Id: Id294c0f38fe0041646fc86cacbd2e19734c746a9
Diffstat (limited to 'framework/inc')
-rw-r--r--framework/inc/macros/xserviceinfo.hxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/framework/inc/macros/xserviceinfo.hxx b/framework/inc/macros/xserviceinfo.hxx
index 7d9fa130a6d0..bcca5c25f6a0 100644
--- a/framework/inc/macros/xserviceinfo.hxx
+++ b/framework/inc/macros/xserviceinfo.hxx
@@ -41,8 +41,8 @@
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/uno/Type.hxx>
#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
#include <cppuhelper/factory.hxx>
+#include <comphelper/processfactory.hxx>
#include <comphelper/sequence.hxx>
#include <rtl/ustring.hxx>
#include <rtl/logfile.hxx>
@@ -143,10 +143,8 @@ ________________________________________________________________________________
throw( css::uno::Exception ) \
{ \
/* retrieve component context from the given service manager */ \
- static const ::rtl::OUString PROP_DEFAULTCONTEXT("DefaultContext"); \
- css::uno::Reference< css::beans::XPropertySet > xSMGRProps(xServiceManager, css::uno::UNO_QUERY_THROW); \
- css::uno::Reference< css::uno::XComponentContext > xComponentContext; \
- xSMGRProps->getPropertyValue( PROP_DEFAULTCONTEXT ) >>= xComponentContext; \
+ css::uno::Reference< css::uno::XComponentContext > xComponentContext( \
+ comphelper::getComponentContext( xServiceManager ) ); \
/* create new instance of service */ \
CLASS* pClass = new CLASS( xComponentContext ); \
/* hold it alive by increasing his ref count!!! */ \