summaryrefslogtreecommitdiff
path: root/stoc/source/inspect
diff options
context:
space:
mode:
authorDaniel Boelzle <dbo@openoffice.org>2002-06-14 12:26:30 +0000
committerDaniel Boelzle <dbo@openoffice.org>2002-06-14 12:26:30 +0000
commit8f0762f89160b4082da93c9e1b0ff99df15dd976 (patch)
tree7d8eb3ae7cef3fc3b41504e70fb0d1c92e60e631 /stoc/source/inspect
parentcec9e449acbec8a6ccc8acd7206a9b4ec441c063 (diff)
#100075# modifying loaders, using macro expander singleton; service manager review
Diffstat (limited to 'stoc/source/inspect')
-rw-r--r--stoc/source/inspect/insp.xml1
-rw-r--r--stoc/source/inspect/introspection.cxx32
2 files changed, 28 insertions, 5 deletions
diff --git a/stoc/source/inspect/insp.xml b/stoc/source/inspect/insp.xml
index 0ca7fb5f12f4..4c4f5e699ead 100644
--- a/stoc/source/inspect/insp.xml
+++ b/stoc/source/inspect/insp.xml
@@ -35,6 +35,7 @@
<type> com.sun.star.uno.XAggregation </type>
<type> com.sun.star.uno.XWeak </type>
<type> com.sun.star.uno.TypeClass </type>
+ <type> com.sun.star.uno.DeploymentException </type>
<type> com.sun.star.container.XEnumerationAccess </type>
<type> com.sun.star.container.XNameContainer </type>
<type> com.sun.star.container.XIndexContainer </type>
diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx
index deddadcb4fac..4350ac2236b0 100644
--- a/stoc/source/inspect/introspection.cxx
+++ b/stoc/source/inspect/introspection.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: introspection.cxx,v $
*
- * $Revision: 1.12 $
+ * $Revision: 1.13 $
*
- * last change: $Author: ab $ $Date: 2002-04-10 15:28:45 $
+ * last change: $Author: dbo $ $Date: 2002-06-14 13:26:29 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -92,6 +92,7 @@
#include <cppuhelper/implbase3.hxx>
#include <cppuhelper/typeprovider.hxx>
+#include <com/sun/star/uno/DeploymentException.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
@@ -1757,9 +1758,30 @@ ImplIntrospection::ImplIntrospection( const Reference<XMultiServiceFactory> & rX
#endif
// Spezielle Klassen holen
- Reference< XInterface > xServiceIface = m_xSMgr->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.CoreReflection")) );
- if( xServiceIface.is() )
- mxCoreReflection = Reference< XIdlReflection >::query( xServiceIface );
+// Reference< XInterface > xServiceIface = m_xSMgr->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.CoreReflection")) );
+// if( xServiceIface.is() )
+// mxCoreReflection = Reference< XIdlReflection >::query( xServiceIface );
+ Reference< XPropertySet > xProps( rXSMgr, UNO_QUERY );
+ OSL_ASSERT( xProps.is() );
+ if (xProps.is())
+ {
+ Reference< XComponentContext > xContext;
+ xProps->getPropertyValue(
+ OUString( RTL_CONSTASCII_USTRINGPARAM("DefaultContext") ) ) >>= xContext;
+ OSL_ASSERT( xContext.is() );
+ if (xContext.is())
+ {
+ xContext->getValueByName(
+ OUString( RTL_CONSTASCII_USTRINGPARAM("/singletons/com.sun.star.reflection.theCoreReflection") ) ) >>= mxCoreReflection;
+ OSL_ENSURE( mxCoreReflection.is(), "### CoreReflection singleton not accessable!?" );
+ }
+ }
+ if (! mxCoreReflection.is())
+ {
+ throw DeploymentException(
+ OUString( RTL_CONSTASCII_USTRINGPARAM("/singletons/com.sun.star.reflection.theCoreReflection singleton not accessable") ),
+ Reference< XInterface >() );
+ }
mxElementAccessClass = mxCoreReflection->forName( OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.container.XElementAccess")) );
mxNameContainerClass = mxCoreReflection->forName( OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.container.XNameContainer")) );