summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--stoc/source/corereflection/base.hxx7
-rw-r--r--stoc/source/corereflection/crefl.cxx28
2 files changed, 30 insertions, 5 deletions
diff --git a/stoc/source/corereflection/base.hxx b/stoc/source/corereflection/base.hxx
index 606e744c12fb..26bbf0230675 100644
--- a/stoc/source/corereflection/base.hxx
+++ b/stoc/source/corereflection/base.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: base.hxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: dbo $ $Date: 2002-10-17 07:49:57 $
+ * last change: $Author: dbo $ $Date: 2002-11-11 16:41:52 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -108,6 +108,9 @@
#include <com/sun/star/reflection/XIdlField2.hpp>
#include <com/sun/star/reflection/XIdlMethod.hpp>
+#define OUSTR(x) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(x) )
+
+
using namespace std;
using namespace osl;
using namespace rtl;
diff --git a/stoc/source/corereflection/crefl.cxx b/stoc/source/corereflection/crefl.cxx
index 13ef5d988a98..533b6efd6eed 100644
--- a/stoc/source/corereflection/crefl.cxx
+++ b/stoc/source/corereflection/crefl.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: crefl.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: dbo $ $Date: 2002-10-17 07:49:57 $
+ * last change: $Author: dbo $ $Date: 2002-11-11 16:41:53 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -70,6 +70,7 @@
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/reflection/XTypeDescription.hpp>
+using namespace com::sun::star;
using namespace com::sun::star::lang;
using namespace com::sun::star::registry;
using namespace cppu;
@@ -550,7 +551,28 @@ void SAL_CALL component_getImplementationEnvironment(
sal_Bool SAL_CALL component_writeInfo(
void * pServiceManager, void * pRegistryKey )
{
- return component_writeInfoHelper( pServiceManager, pRegistryKey, g_entries );
+ if (component_writeInfoHelper( pServiceManager, pRegistryKey, g_entries ))
+ {
+ try
+ {
+ // register singleton
+ registry::XRegistryKey * pKey =
+ reinterpret_cast< registry::XRegistryKey * >( pRegistryKey );
+ Reference< registry::XRegistryKey > xKey(
+ pKey->createKey(
+ OUSTR(IMPLNAME "/UNO/SINGLETONS/com.sun.star.reflection.theCoreReflection") ) );
+ xKey->setStringValue( OUSTR("com.sun.star.reflection.CoreReflection") );
+ return sal_True;
+ }
+ catch (Exception & exc)
+ {
+#ifdef _DEBUG
+ OString cstr( OUStringToOString( exc.Message, RTL_TEXTENCODING_ASCII_US ) );
+ OSL_ENSURE( 0, cstr.getStr() );
+#endif
+ }
+ }
+ return sal_False;
}
//==================================================================================================
void * SAL_CALL component_getFactory(