From c28c09a8b24cd5927b2bec94208fe239f037a68c Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 2 Jan 2012 15:45:18 +0100 Subject: USE_INTROSPECTION_CACHE is always defined. --- stoc/source/inspect/introspection.cxx | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) (limited to 'stoc') diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx index 3b0ecf6b9b86..c2aeb492aa3b 100644 --- a/stoc/source/inspect/introspection.cxx +++ b/stoc/source/inspect/introspection.cxx @@ -29,12 +29,8 @@ #include -// Schalter fuer Introspection-Caching -#define USE_INTROSPECTION_CACHE - -#ifdef USE_INTROSPECTION_CACHE #define INTROSPECTION_CACHE_MAX_SIZE 100 -#endif + #include #include #include @@ -1491,8 +1487,6 @@ OUString ImplIntrospectionAccess::getExactName( const OUString& rApproximateName //----------------------------------------------------------------------------- -#ifdef USE_INTROSPECTION_CACHE - struct hashIntrospectionKey_Impl { Sequence< Reference > aIdlClasses; @@ -1670,9 +1664,6 @@ public: } }; -#endif - - //************************* //*** ImplIntrospection *** //************************* @@ -1711,12 +1702,10 @@ class ImplIntrospection : public XIntrospection Reference mxAggregationClass; sal_Bool mbDisposed; -#ifdef USE_INTROSPECTION_CACHE sal_uInt16 mnCacheEntryCount; sal_uInt16 mnTPCacheEntryCount; IntrospectionAccessCacheMap* mpCache; TypeProviderAccessCacheMap* mpTypeProviderCache; -#endif public: ImplIntrospection( const Reference & rXSMgr ); @@ -1760,12 +1749,10 @@ ImplIntrospection::ImplIntrospection( const Reference & rX : OComponentHelper( m_mutex ) , m_xSMgr( rXSMgr ) { -#ifdef USE_INTROSPECTION_CACHE mnCacheEntryCount = 0; mnTPCacheEntryCount = 0; mpCache = NULL; mpTypeProviderCache = NULL; -#endif // Spezielle Klassen holen // Reference< XInterface > xServiceIface = m_xSMgr->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.CoreReflection")) ); @@ -1809,13 +1796,11 @@ void ImplIntrospection::dispose() throw(::com::sun::star::uno::RuntimeException) { OComponentHelper::dispose(); -#ifdef USE_INTROSPECTION_CACHE // Cache loeschen delete mpCache; mpCache = NULL; delete mpTypeProviderCache; mpTypeProviderCache = NULL; -#endif mxElementAccessClass = NULL; mxNameContainerClass = NULL; @@ -2028,7 +2013,6 @@ IntrospectionAccessStatic_Impl* ImplIntrospection::implInspect(const Any& aToIns return NULL; } -#ifdef USE_INTROSPECTION_CACHE // Haben wir schon eine Cache-Instanz if( !mpCache ) mpCache = new IntrospectionAccessCacheMap; @@ -2039,10 +2023,6 @@ IntrospectionAccessStatic_Impl* ImplIntrospection::implInspect(const Any& aToIns // Pointer auf ggf. noetige neue IntrospectionAccess-Instanz IntrospectionAccessStatic_Impl* pAccess = NULL; -#else - // Pointer auf ggf. noetige neue IntrospectionAccess-Instanz - IntrospectionAccessStatic_Impl* pAccess = new IntrospectionAccessStatic_Impl( mxCoreReflection ); -#endif // Pruefen: Ist schon ein passendes Access-Objekt gecached? Sequence< Reference > SupportedClassSeq; @@ -2090,7 +2070,6 @@ IntrospectionAccessStatic_Impl* ImplIntrospection::implInspect(const Any& aToIns xImplClass = TypeToIdlClass( aToInspectObj.getValueType(), m_xSMgr ); } -#ifdef USE_INTROSPECTION_CACHE if( xTypeProvider.is() ) { Sequence< sal_Int8 > aImpIdSeq = xTypeProvider->getImplementationId(); @@ -2199,7 +2178,6 @@ IntrospectionAccessStatic_Impl* ImplIntrospection::implInspect(const Any& aToIns return (*aIt).second; } } -#endif // Kein Access gecached -> neu anlegen Property* pAllPropArray; -- cgit v1.2.3