summaryrefslogtreecommitdiff
path: root/stoc/source/corereflection
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2011-03-18 15:58:02 +0100
committerJan Holesovsky <kendy@suse.cz>2011-03-18 15:58:02 +0100
commit980b7de55c897cb38f5706164a053f38c1b35d88 (patch)
tree34b80af4ad8b97fc5c31768be1073d91dc659c46 /stoc/source/corereflection
parent2475c0b62d65f9db542d4fd0a0792795a39185a2 (diff)
parentc953ef4b46ced010ed3ebd77c4dd11174da60dd1 (diff)
Merge remote-tracking branch 'origin/integration/dev300_m101'
Conflicts: bridges/source/remote/urp/urp_environment.cxx bridges/source/remote/urp/urp_propertyobject.cxx bridges/source/remote/urp/urp_reader.cxx remotebridges/source/factory/bridgefactory.cxx stoc/source/corereflection/crefl.cxx stoc/source/javavm/javavm.cxx stoc/source/simpleregistry/simpleregistry.cxx
Diffstat (limited to 'stoc/source/corereflection')
-rw-r--r--stoc/source/corereflection/base.hxx3
-rw-r--r--stoc/source/corereflection/crefl.cxx32
-rw-r--r--stoc/source/corereflection/lrucache.hxx3
-rw-r--r--stoc/source/corereflection/makefile.mk7
-rw-r--r--stoc/source/corereflection/reflection.component35
5 files changed, 44 insertions, 36 deletions
diff --git a/stoc/source/corereflection/base.hxx b/stoc/source/corereflection/base.hxx
index 31610f8c3..be4cc792b 100644
--- a/stoc/source/corereflection/base.hxx
+++ b/stoc/source/corereflection/base.hxx
@@ -54,9 +54,6 @@
#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 cppu;
diff --git a/stoc/source/corereflection/crefl.cxx b/stoc/source/corereflection/crefl.cxx
index 7e08a32e6..b45d12fe8 100644
--- a/stoc/source/corereflection/crefl.cxx
+++ b/stoc/source/corereflection/crefl.cxx
@@ -31,7 +31,6 @@
#include <cppuhelper/queryinterface.hxx>
#include <cppuhelper/implementationentry.hxx>
-#include <com/sun/star/registry/XRegistryKey.hpp>
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/reflection/XTypeDescription.hpp>
#include "com/sun/star/uno/RuntimeException.hpp"
@@ -180,8 +179,6 @@ void IdlReflectionServiceImpl::dispose()
MutexGuard aGuard( _aComponentMutex );
_aElements.clear();
- _xTDMgr.clear();
- _xMgr.clear();
#ifdef TEST_LIST_CLASSES
OSL_ENSURE( g_aClassNames.size() == 0, "### idl classes still alive!" );
ClassNameList::const_iterator iPos( g_aClassNames.begin() );
@@ -509,35 +506,6 @@ void SAL_CALL component_getImplementationEnvironment(
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
//==================================================================================================
-sal_Bool SAL_CALL component_writeInfo(
- void * pServiceManager, void * pRegistryKey )
-{
- 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)
- {
-#if OSL_DEBUG_LEVEL > 0
- OString cstr( OUStringToOString( exc.Message, RTL_TEXTENCODING_ASCII_US ) );
- OSL_FAIL( cstr.getStr() );
-#else
- (void) exc; // unused
-#endif
- }
- }
- return sal_False;
-}
-//==================================================================================================
void * SAL_CALL component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
{
diff --git a/stoc/source/corereflection/lrucache.hxx b/stoc/source/corereflection/lrucache.hxx
index 5fe3c6260..b58e9845f 100644
--- a/stoc/source/corereflection/lrucache.hxx
+++ b/stoc/source/corereflection/lrucache.hxx
@@ -178,9 +178,9 @@ template< class t_Key, class t_Val, class t_KeyHash, class t_KeyEqual >
inline void LRU_Cache< t_Key, t_Val, t_KeyHash, t_KeyEqual >::setValue(
const t_Key & rKey, const t_Val & rValue )
{
+ ::osl::MutexGuard aGuard( _aCacheMutex );
if (_nCachedElements > 0)
{
- ::osl::MutexGuard aGuard( _aCacheMutex );
const typename t_Key2Element::const_iterator iFind( _aKey2Element.find( rKey ) );
CacheEntry * pEntry;
@@ -222,6 +222,7 @@ inline void LRU_Cache< t_Key, t_Val, t_KeyHash, t_KeyEqual >::clear()
_pBlock[nPos].aKey = t_Key();
_pBlock[nPos].aVal = t_Val();
}
+ _nCachedElements = 0;
#ifdef __CACHE_DIAGNOSE
OSL_TRACE( "> cleared cache <\n" );
#endif
diff --git a/stoc/source/corereflection/makefile.mk b/stoc/source/corereflection/makefile.mk
index b61eb13aa..7156f6d63 100644
--- a/stoc/source/corereflection/makefile.mk
+++ b/stoc/source/corereflection/makefile.mk
@@ -73,3 +73,10 @@ DEF1NAME= $(SHL1TARGET)
.INCLUDE : target.mk
+ALLTAR : $(MISC)/reflection.component
+
+$(MISC)/reflection.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ reflection.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_URE_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt reflection.component
diff --git a/stoc/source/corereflection/reflection.component b/stoc/source/corereflection/reflection.component
new file mode 100644
index 000000000..00772a448
--- /dev/null
+++ b/stoc/source/corereflection/reflection.component
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.stoc.CoreReflection">
+ <service name="com.sun.star.reflection.CoreReflection"/>
+ <singleton name="com.sun.star.reflection.theCoreReflection"/>
+ </implementation>
+</component>