summaryrefslogtreecommitdiff
path: root/stoc/source/inspect/introspection.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'stoc/source/inspect/introspection.cxx')
-rw-r--r--stoc/source/inspect/introspection.cxx663
1 files changed, 320 insertions, 343 deletions
diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx
index c0417cb2472c..2e95c452fcbd 100644
--- a/stoc/source/inspect/introspection.cxx
+++ b/stoc/source/inspect/introspection.cxx
@@ -1,30 +1,26 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/**************************************************************
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * OpenOffice.org - a multi-platform office productivity suite
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*
- * 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.
- *
- ************************************************************************/
+ *************************************************************/
+
+
#include <string.h>
@@ -67,6 +63,7 @@
#include <rtl/ref.hxx>
#include <rtl/ustrbuf.hxx>
+#include <rtl/ref.hxx>
#include <rtl/strbuf.hxx>
#include <boost/unordered_map.hpp>
@@ -82,10 +79,6 @@ using namespace com::sun::star::beans::MethodConcept;
using namespace cppu;
using namespace osl;
-using ::rtl::OUString;
-using ::rtl::OUStringToOString;
-using ::rtl::OString;
-
#define IMPLEMENTATION_NAME "com.sun.star.comp.stoc.Introspection"
#define SERVICE_NAME "com.sun.star.beans.Introspection"
@@ -98,7 +91,7 @@ typedef WeakImplHelper3< XIntrospectionAccess, XMaterialHolder, XExactName > Int
//==================================================================================================
// Spezial-Wert fuer Method-Concept, um "normale" Funktionen kennzeichnen zu koennen
-#define MethodConcept_NORMAL_IMPL 0x80000000
+#define MethodConcept_NORMAL_IMPL 0x80000000
// Methode zur Feststellung, ob eine Klasse von einer anderen abgeleitet ist
@@ -127,15 +120,15 @@ sal_Bool isDerivedFrom( Reference<XIdlClass> xToTestClass, Reference<XIdlClass>
// Properties aus einem PropertySet-Interface
#define MAP_PROPERTY_SET 0
// Properties aus Fields
-#define MAP_FIELD 1
+#define MAP_FIELD 1
// Properties, die durch get/set-Methoden beschrieben werden
-#define MAP_GETSET 2
+#define MAP_GETSET 2
// Properties, die nur eine set-Methode haben
-#define MAP_SETONLY 3
+#define MAP_SETONLY 3
// Schrittweite, in der die Groesse der Sequences angepasst wird
-#define ARRAY_SIZE_STEP 20
+#define ARRAY_SIZE_STEP 20
@@ -148,7 +141,7 @@ sal_Bool isDerivedFrom( Reference<XIdlClass> xToTestClass, Reference<XIdlClass>
// Hashtable fuer die Suche nach Namen
struct hashName_Impl
{
- size_t operator()(const OUString Str) const
+ size_t operator()(const ::rtl::OUString Str) const
{
return (size_t)Str.hashCode();
}
@@ -156,7 +149,7 @@ struct hashName_Impl
struct eqName_Impl
{
- sal_Bool operator()(const OUString Str1, const OUString Str2) const
+ sal_Bool operator()(const ::rtl::OUString Str1, const ::rtl::OUString Str2) const
{
return ( Str1 == Str2 );
}
@@ -164,7 +157,7 @@ struct eqName_Impl
typedef boost::unordered_map
<
- OUString,
+ ::rtl::OUString,
sal_Int32,
hashName_Impl,
eqName_Impl
@@ -176,8 +169,8 @@ IntrospectionNameMap;
// konvertierten Namen, dient zur Unterst�tzung von XExactName
typedef boost::unordered_map
<
- OUString,
- OUString,
+ ::rtl::OUString,
+ ::rtl::OUString,
hashName_Impl,
eqName_Impl
>
@@ -259,22 +252,22 @@ public:
{
delete[] mpOrgPropertyHandleArray;
}
- sal_Int32 getPropertyIndex( const OUString& aPropertyName ) const;
- sal_Int32 getMethodIndex( const OUString& aMethodName ) const;
+ sal_Int32 getPropertyIndex( const ::rtl::OUString& aPropertyName ) const;
+ sal_Int32 getMethodIndex( const ::rtl::OUString& aMethodName ) const;
// Methoden von XIntrospectionAccess (ALT, jetzt nur Impl)
- void setPropertyValue(const Any& obj, const OUString& aPropertyName, const Any& aValue) const;
-// void setPropertyValue(Any& obj, const OUString& aPropertyName, const Any& aValue) const;
- Any getPropertyValue(const Any& obj, const OUString& aPropertyName) const;
+ void setPropertyValue(const Any& obj, const ::rtl::OUString& aPropertyName, const Any& aValue) const;
+// void setPropertyValue(Any& obj, const ::rtl::OUString& aPropertyName, const Any& aValue) const;
+ Any getPropertyValue(const Any& obj, const ::rtl::OUString& aPropertyName) const;
void setPropertyValueByIndex(const Any& obj, sal_Int32 nIndex, const Any& aValue) const;
-// void setPropertyValueByIndex(Any& obj, sal_Int32 nIndex, const Any& aValue) const;
+// void setPropertyValueByIndex(Any& obj, sal_Int32 nIndex, const Any& aValue) const;
Any getPropertyValueByIndex(const Any& obj, sal_Int32 nIndex) const;
Sequence<Property> getProperties(void) const { return maAllPropertySeq; }
Sequence< Reference<XIdlMethod> > getMethods(void) const { return maAllMethodSeq; }
- Sequence< Type > getSupportedListeners(void) const { return maSupportedListenerSeq; }
- Sequence<sal_Int32> getPropertyConcepts(void) const { return maPropertyConceptSeq; }
- Sequence<sal_Int32> getMethodConcepts(void) const { return maMethodConceptSeq; }
+ Sequence< Type > getSupportedListeners(void) const { return maSupportedListenerSeq; }
+ Sequence<sal_Int32> getPropertyConcepts(void) const { return maPropertyConceptSeq; }
+ Sequence<sal_Int32> getMethodConcepts(void) const { return maMethodConceptSeq; }
};
@@ -303,7 +296,7 @@ IntrospectionAccessStatic_Impl::IntrospectionAccessStatic_Impl( Reference< XIdlR
mnMethCount = 0;
}
-sal_Int32 IntrospectionAccessStatic_Impl::getPropertyIndex( const OUString& aPropertyName ) const
+sal_Int32 IntrospectionAccessStatic_Impl::getPropertyIndex( const ::rtl::OUString& aPropertyName ) const
{
sal_Int32 iHashResult = -1;
IntrospectionAccessStatic_Impl* pThis = (IntrospectionAccessStatic_Impl*)this;
@@ -313,7 +306,7 @@ sal_Int32 IntrospectionAccessStatic_Impl::getPropertyIndex( const OUString& aPro
return iHashResult;
}
-sal_Int32 IntrospectionAccessStatic_Impl::getMethodIndex( const OUString& aMethodName ) const
+sal_Int32 IntrospectionAccessStatic_Impl::getMethodIndex( const ::rtl::OUString& aMethodName ) const
{
sal_Int32 iHashResult = -1;
IntrospectionAccessStatic_Impl* pThis = (IntrospectionAccessStatic_Impl*)this;
@@ -334,15 +327,15 @@ sal_Int32 IntrospectionAccessStatic_Impl::getMethodIndex( const OUString& aMetho
if( nFound == -1 )
break;
- OUString aPureMethodName = aMethodName.copy( nFound + 1 );
+ ::rtl::OUString aPureMethodName = aMethodName.copy( nFound + 1 );
aIt = pThis->maMethodNameMap.find( aPureMethodName );
if( !( aIt == pThis->maMethodNameMap.end() ) )
{
// Check if it can be a type?
// Problem: Does not work if package names contain _ ?!
- OUString aStr = aMethodName.copy( 0, nFound );
- OUString aTypeName = aStr.replace( '_', '.' );
+ ::rtl::OUString aStr = aMethodName.copy( 0, nFound );
+ ::rtl::OUString aTypeName = aStr.replace( '_', '.' );
Reference< XIdlClass > xClass = mxCoreReflection->forName( aTypeName );
if( xClass.is() )
{
@@ -370,8 +363,8 @@ sal_Int32 IntrospectionAccessStatic_Impl::getMethodIndex( const OUString& aMetho
{
const Reference<XIdlMethod> xMethod2 = pMethods[ i ];
- OUString aTestClassName = xMethod2->getDeclaringClass()->getName();
- OUString aTestMethodName = xMethod2->getName();
+ ::rtl::OUString aTestClassName = xMethod2->getDeclaringClass()->getName();
+ ::rtl::OUString aTestMethodName = xMethod2->getName();
if( xMethod2->getName() == aPureMethodName )
{
@@ -399,8 +392,8 @@ sal_Int32 IntrospectionAccessStatic_Impl::getMethodIndex( const OUString& aMetho
return iHashResult;
}
-void IntrospectionAccessStatic_Impl::setPropertyValue( const Any& obj, const OUString& aPropertyName, const Any& aValue ) const
-//void IntrospectionAccessStatic_Impl::setPropertyValue( Any& obj, const OUString& aPropertyName, const Any& aValue ) const
+void IntrospectionAccessStatic_Impl::setPropertyValue( const Any& obj, const ::rtl::OUString& aPropertyName, const Any& aValue ) const
+//void IntrospectionAccessStatic_Impl::setPropertyValue( Any& obj, const ::rtl::OUString& aPropertyName, const Any& aValue ) const
{
sal_Int32 i = getPropertyIndex( aPropertyName );
if( i != -1 )
@@ -448,7 +441,7 @@ void IntrospectionAccessStatic_Impl::setPropertyValueByIndex(const Any& obj, sal
if( eValType == TypeClass_INTERFACE )
{
Type aPropType = rProp.Type;
- OUString aTypeName( aPropType.getTypeName() );
+ ::rtl::OUString aTypeName( aPropType.getTypeName() );
Reference< XIdlClass > xPropClass = mxCoreReflection->forName( aTypeName );
//Reference<XIdlClass> xPropClass = rProp.Type;
if( xPropClass.is() && xPropClass->getTypeClass() == TypeClass_INTERFACE )
@@ -543,7 +536,7 @@ void IntrospectionAccessStatic_Impl::setPropertyValueByIndex(const Any& obj, sal
}
}
-Any IntrospectionAccessStatic_Impl::getPropertyValue( const Any& obj, const OUString& aPropertyName ) const
+Any IntrospectionAccessStatic_Impl::getPropertyValue( const Any& obj, const ::rtl::OUString& aPropertyName ) const
{
sal_Int32 i = getPropertyIndex( aPropertyName );
if( i != -1 )
@@ -700,6 +693,89 @@ void IntrospectionAccessStatic_Impl::checkInterfaceArraySize( Sequence< Referenc
//*******************************
+//*** ImplIntrospectionAccess ***
+//*******************************
+
+// Neue Impl-Klasse im Rahmen der Introspection-Umstellung auf Instanz-gebundene
+// Introspection mit Property-Zugriff ueber XPropertySet. Die alte Klasse
+// ImplIntrospectionAccess lebt als IntrospectionAccessStatic_Impl
+class ImplIntrospectionAccess : public IntrospectionAccessHelper
+{
+ friend class ImplIntrospection;
+
+ // Untersuchtes Objekt
+ Any maInspectedObject;
+
+ // Als Interface
+ Reference<XInterface> mxIface;
+
+ // Statische Daten der Introspection
+ rtl::Reference< IntrospectionAccessStatic_Impl > mpStaticImpl;
+
+ // Adapter-Implementation
+ WeakReference< XInterface > maAdapter;
+
+ // Letzte Sequence, die bei getProperties geliefert wurde (Optimierung)
+ Sequence<Property> maLastPropertySeq;
+ sal_Int32 mnLastPropertyConcept;
+
+ // Letzte Sequence, die bei getMethods geliefert wurde (Optimierung)
+ Sequence<Reference<XIdlMethod> > maLastMethodSeq;
+ sal_Int32 mnLastMethodConcept;
+
+public:
+ ImplIntrospectionAccess( const Any& obj, rtl::Reference< IntrospectionAccessStatic_Impl > const & pStaticImpl_ );
+ ~ImplIntrospectionAccess();
+
+ // Methoden von XIntrospectionAccess
+ virtual sal_Int32 SAL_CALL getSuppliedMethodConcepts(void)
+ throw( RuntimeException );
+ virtual sal_Int32 SAL_CALL getSuppliedPropertyConcepts(void)
+ throw( RuntimeException );
+ virtual Property SAL_CALL getProperty(const ::rtl::OUString& Name, sal_Int32 PropertyConcepts)
+ throw( NoSuchElementException, RuntimeException );
+ virtual sal_Bool SAL_CALL hasProperty(const ::rtl::OUString& Name, sal_Int32 PropertyConcepts)
+ throw( RuntimeException );
+ virtual Sequence< Property > SAL_CALL getProperties(sal_Int32 PropertyConcepts)
+ throw( RuntimeException );
+ virtual Reference<XIdlMethod> SAL_CALL getMethod(const ::rtl::OUString& Name, sal_Int32 MethodConcepts)
+ throw( NoSuchMethodException, RuntimeException );
+ virtual sal_Bool SAL_CALL hasMethod(const ::rtl::OUString& Name, sal_Int32 MethodConcepts)
+ throw( RuntimeException );
+ virtual Sequence< Reference<XIdlMethod> > SAL_CALL getMethods(sal_Int32 MethodConcepts)
+ throw( RuntimeException );
+ virtual Sequence< Type > SAL_CALL getSupportedListeners(void)
+ throw( RuntimeException );
+ using OWeakObject::queryAdapter;
+ virtual Reference<XInterface> SAL_CALL queryAdapter( const Type& rType )
+ throw( IllegalTypeException, RuntimeException );
+
+ // Methoden von XMaterialHolder
+ virtual Any SAL_CALL getMaterial(void) throw(RuntimeException);
+
+ // Methoden von XExactName
+ virtual ::rtl::OUString SAL_CALL getExactName( const ::rtl::OUString& rApproximateName ) throw( RuntimeException );
+};
+
+ImplIntrospectionAccess::ImplIntrospectionAccess
+ ( const Any& obj, rtl::Reference< IntrospectionAccessStatic_Impl > const & pStaticImpl_ )
+ : maInspectedObject( obj ), mpStaticImpl( pStaticImpl_ ), maAdapter()
+{
+ // Objekt als Interface merken, wenn moeglich
+ TypeClass eType = maInspectedObject.getValueType().getTypeClass();
+ if( eType == TypeClass_INTERFACE )
+ mxIface = *(Reference<XInterface>*)maInspectedObject.getValue();
+
+ mnLastPropertyConcept = -1;
+ mnLastMethodConcept = -1;
+}
+
+ImplIntrospectionAccess::~ImplIntrospectionAccess()
+{
+}
+
+
+//*******************************
//*** ImplIntrospectionAdapter ***
//*******************************
@@ -712,6 +788,9 @@ class ImplIntrospectionAdapter :
public XEnumerationAccess, public XIdlArray,
public OWeakObject
{
+ // Parent-Objekt
+ ::rtl::Reference< ImplIntrospectionAccess > mpAccess;
+
// Untersuchtes Objekt
const Any& mrInspectedObject;
@@ -722,16 +801,17 @@ class ImplIntrospectionAdapter :
Reference<XInterface> mxIface;
// Original-Interfaces des Objekts
- Reference<XElementAccess> mxObjElementAccess;
- Reference<XNameContainer> mxObjNameContainer;
- Reference<XNameAccess> mxObjNameAccess;
- Reference<XIndexAccess> mxObjIndexAccess;
- Reference<XIndexContainer> mxObjIndexContainer;
- Reference<XEnumerationAccess> mxObjEnumerationAccess;
+ Reference<XElementAccess> mxObjElementAccess;
+ Reference<XNameContainer> mxObjNameContainer;
+ Reference<XNameAccess> mxObjNameAccess;
+ Reference<XIndexAccess> mxObjIndexAccess;
+ Reference<XIndexContainer> mxObjIndexContainer;
+ Reference<XEnumerationAccess> mxObjEnumerationAccess;
Reference<XIdlArray> mxObjIdlArray;
public:
- ImplIntrospectionAdapter( const Any& obj,
+ ImplIntrospectionAdapter( ImplIntrospectionAccess* pAccess_,
+ const Any& obj,
rtl::Reference< IntrospectionAccessStatic_Impl > const & pStaticImpl_ );
// Methoden von XInterface
@@ -741,17 +821,17 @@ public:
// Methoden von XPropertySet
virtual Reference<XPropertySetInfo> SAL_CALL getPropertySetInfo() throw( RuntimeException );
- virtual void SAL_CALL setPropertyValue(const OUString& aPropertyName, const Any& aValue)
+ virtual void SAL_CALL setPropertyValue(const ::rtl::OUString& aPropertyName, const Any& aValue)
throw( UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException );
- virtual Any SAL_CALL getPropertyValue(const OUString& aPropertyName)
+ virtual Any SAL_CALL getPropertyValue(const ::rtl::OUString& aPropertyName)
throw( UnknownPropertyException, WrappedTargetException, RuntimeException );
- virtual void SAL_CALL addPropertyChangeListener(const OUString& aPropertyName, const Reference<XPropertyChangeListener>& aListener)
+ virtual void SAL_CALL addPropertyChangeListener(const ::rtl::OUString& aPropertyName, const Reference<XPropertyChangeListener>& aListener)
throw( UnknownPropertyException, WrappedTargetException, RuntimeException );
- virtual void SAL_CALL removePropertyChangeListener(const OUString& aPropertyName, const Reference<XPropertyChangeListener>& aListener)
+ virtual void SAL_CALL removePropertyChangeListener(const ::rtl::OUString& aPropertyName, const Reference<XPropertyChangeListener>& aListener)
throw( UnknownPropertyException, WrappedTargetException, RuntimeException );
- virtual void SAL_CALL addVetoableChangeListener(const OUString& aPropertyName, const Reference<XVetoableChangeListener>& aListener)
+ virtual void SAL_CALL addVetoableChangeListener(const ::rtl::OUString& aPropertyName, const Reference<XVetoableChangeListener>& aListener)
throw( UnknownPropertyException, WrappedTargetException, RuntimeException );
- virtual void SAL_CALL removeVetoableChangeListener(const OUString& aPropertyName, const Reference<XVetoableChangeListener>& aListener)
+ virtual void SAL_CALL removeVetoableChangeListener(const ::rtl::OUString& aPropertyName, const Reference<XVetoableChangeListener>& aListener)
throw( UnknownPropertyException, WrappedTargetException, RuntimeException );
// Methoden von XFastPropertySet
@@ -762,25 +842,25 @@ public:
// Methoden von XPropertySetInfo
virtual Sequence< Property > SAL_CALL getProperties(void) throw( RuntimeException );
- virtual Property SAL_CALL getPropertyByName(const OUString& Name) throw( RuntimeException );
- virtual sal_Bool SAL_CALL hasPropertyByName(const OUString& Name) throw( RuntimeException );
+ virtual Property SAL_CALL getPropertyByName(const ::rtl::OUString& Name) throw( RuntimeException );
+ virtual sal_Bool SAL_CALL hasPropertyByName(const ::rtl::OUString& Name) throw( RuntimeException );
// Methoden von XElementAccess
virtual Type SAL_CALL getElementType(void) throw( RuntimeException );
virtual sal_Bool SAL_CALL hasElements(void) throw( RuntimeException );
// Methoden von XNameAccess
- virtual Any SAL_CALL getByName(const OUString& Name)
+ virtual Any SAL_CALL getByName(const ::rtl::OUString& Name)
throw( NoSuchElementException, WrappedTargetException, RuntimeException );
- virtual Sequence<OUString> SAL_CALL getElementNames(void) throw( RuntimeException );
- virtual sal_Bool SAL_CALL hasByName(const OUString& Name) throw( RuntimeException );
+ virtual Sequence< ::rtl::OUString > SAL_CALL getElementNames(void) throw( RuntimeException );
+ virtual sal_Bool SAL_CALL hasByName(const ::rtl::OUString& Name) throw( RuntimeException );
// Methoden von XNameContainer
- virtual void SAL_CALL insertByName(const OUString& Name, const Any& Element)
+ virtual void SAL_CALL insertByName(const ::rtl::OUString& Name, const Any& Element)
throw( IllegalArgumentException, ElementExistException, WrappedTargetException, RuntimeException );
- virtual void SAL_CALL replaceByName(const OUString& Name, const Any& Element)
+ virtual void SAL_CALL replaceByName(const ::rtl::OUString& Name, const Any& Element)
throw( IllegalArgumentException, NoSuchElementException, WrappedTargetException, RuntimeException );
- virtual void SAL_CALL removeByName(const OUString& Name)
+ virtual void SAL_CALL removeByName(const ::rtl::OUString& Name)
throw( NoSuchElementException, WrappedTargetException, RuntimeException );
// Methoden von XIndexAccess
@@ -809,9 +889,10 @@ public:
throw( IllegalArgumentException, ArrayIndexOutOfBoundsException, RuntimeException );
};
-ImplIntrospectionAdapter::ImplIntrospectionAdapter(const Any& obj,
+ImplIntrospectionAdapter::ImplIntrospectionAdapter( ImplIntrospectionAccess* pAccess_,
+ const Any& obj,
rtl::Reference< IntrospectionAccessStatic_Impl > const & pStaticImpl_ )
- : mrInspectedObject( obj ), mpStaticImpl( pStaticImpl_ )
+ : mpAccess( pAccess_), mrInspectedObject( obj ), mpStaticImpl( pStaticImpl_ )
{
// Objekt als Interfaceholen
TypeClass eType = mrInspectedObject.getValueType().getTypeClass();
@@ -850,7 +931,7 @@ Any SAL_CALL ImplIntrospectionAdapter::queryInterface( const Type& rType )
|| ( mxObjNameContainer.is() && (aRet = ::cppu::queryInterface( rType, static_cast< XNameContainer* >( this ) ) ).hasValue() )
|| ( mxObjIndexAccess.is() && (aRet = ::cppu::queryInterface( rType, static_cast< XIndexAccess* >( this ) ) ).hasValue() )
|| ( mxObjIndexContainer.is() && (aRet = ::cppu::queryInterface( rType, static_cast< XIndexContainer* >( this ) ) ).hasValue() )
- || ( mxObjEnumerationAccess .is() && (aRet = ::cppu::queryInterface( rType, static_cast< XEnumerationAccess* >( this ) ) ).hasValue() )
+ || ( mxObjEnumerationAccess .is() && (aRet = ::cppu::queryInterface( rType, static_cast< XEnumerationAccess* >( this ) ) ).hasValue() )
|| ( mxObjIdlArray.is() && (aRet = ::cppu::queryInterface( rType, static_cast< XIdlArray* >( this ) ) ).hasValue() )
)
{
@@ -860,83 +941,6 @@ Any SAL_CALL ImplIntrospectionAdapter::queryInterface( const Type& rType )
}
-//*******************************
-//*** ImplIntrospectionAccess ***
-//*******************************
-
-// Neue Impl-Klasse im Rahmen der Introspection-Umstellung auf Instanz-gebundene
-// Introspection mit Property-Zugriff ueber XPropertySet. Die alte Klasse
-// ImplIntrospectionAccess lebt als IntrospectionAccessStatic_Impl
-class ImplIntrospectionAccess : IntrospectionAccessHelper
-{
- friend class ImplIntrospection;
-
- // Untersuchtes Objekt
- Any maInspectedObject;
-
- // Als Interface
- Reference<XInterface> mxIface;
-
- // Statische Daten der Introspection
- rtl::Reference< IntrospectionAccessStatic_Impl > mpStaticImpl;
-
- // Adapter-Implementation
- rtl::Reference< ImplIntrospectionAdapter > mpAdapter;
-
- // Letzte Sequence, die bei getProperties geliefert wurde (Optimierung)
- Sequence<Property> maLastPropertySeq;
- sal_Int32 mnLastPropertyConcept;
-
- // Letzte Sequence, die bei getMethods geliefert wurde (Optimierung)
- Sequence<Reference<XIdlMethod> > maLastMethodSeq;
- sal_Int32 mnLastMethodConcept;
-
-public:
- ImplIntrospectionAccess( const Any& obj, rtl::Reference< IntrospectionAccessStatic_Impl > const & pStaticImpl_ );
-
- // Methoden von XIntrospectionAccess
- virtual sal_Int32 SAL_CALL getSuppliedMethodConcepts(void)
- throw( RuntimeException );
- virtual sal_Int32 SAL_CALL getSuppliedPropertyConcepts(void)
- throw( RuntimeException );
- virtual Property SAL_CALL getProperty(const OUString& Name, sal_Int32 PropertyConcepts)
- throw( NoSuchElementException, RuntimeException );
- virtual sal_Bool SAL_CALL hasProperty(const OUString& Name, sal_Int32 PropertyConcepts)
- throw( RuntimeException );
- virtual Sequence< Property > SAL_CALL getProperties(sal_Int32 PropertyConcepts)
- throw( RuntimeException );
- virtual Reference<XIdlMethod> SAL_CALL getMethod(const OUString& Name, sal_Int32 MethodConcepts)
- throw( NoSuchMethodException, RuntimeException );
- virtual sal_Bool SAL_CALL hasMethod(const OUString& Name, sal_Int32 MethodConcepts)
- throw( RuntimeException );
- virtual Sequence< Reference<XIdlMethod> > SAL_CALL getMethods(sal_Int32 MethodConcepts)
- throw( RuntimeException );
- virtual Sequence< Type > SAL_CALL getSupportedListeners(void)
- throw( RuntimeException );
- using OWeakObject::queryAdapter;
- virtual Reference<XInterface> SAL_CALL queryAdapter( const Type& rType )
- throw( IllegalTypeException, RuntimeException );
-
- // Methoden von XMaterialHolder
- virtual Any SAL_CALL getMaterial(void) throw(RuntimeException);
-
- // Methoden von XExactName
- virtual OUString SAL_CALL getExactName( const OUString& rApproximateName ) throw( RuntimeException );
-};
-
-ImplIntrospectionAccess::ImplIntrospectionAccess
- ( const Any& obj, rtl::Reference< IntrospectionAccessStatic_Impl > const & pStaticImpl_ )
- : maInspectedObject( obj ), mpStaticImpl( pStaticImpl_ )
-{
- // Objekt als Interface merken, wenn moeglich
- TypeClass eType = maInspectedObject.getValueType().getTypeClass();
- if( eType == TypeClass_INTERFACE )
- mxIface = *(Reference<XInterface>*)maInspectedObject.getValue();
-
- mnLastPropertyConcept = -1;
- mnLastMethodConcept = -1;
-}
-
//***************************************************
//*** Implementation von ImplIntrospectionAdapter ***
//***************************************************
@@ -948,19 +952,19 @@ Reference<XPropertySetInfo> ImplIntrospectionAdapter::getPropertySetInfo(void)
return (XPropertySetInfo *)this;
}
-void ImplIntrospectionAdapter::setPropertyValue(const OUString& aPropertyName, const Any& aValue)
+void ImplIntrospectionAdapter::setPropertyValue(const ::rtl::OUString& aPropertyName, const Any& aValue)
throw( UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException )
{
mpStaticImpl->setPropertyValue( mrInspectedObject, aPropertyName, aValue );
}
-Any ImplIntrospectionAdapter::getPropertyValue(const OUString& aPropertyName)
+Any ImplIntrospectionAdapter::getPropertyValue(const ::rtl::OUString& aPropertyName)
throw( UnknownPropertyException, WrappedTargetException, RuntimeException )
{
return mpStaticImpl->getPropertyValue( mrInspectedObject, aPropertyName );
}
-void ImplIntrospectionAdapter::addPropertyChangeListener(const OUString& aPropertyName, const Reference<XPropertyChangeListener>& aListener)
+void ImplIntrospectionAdapter::addPropertyChangeListener(const ::rtl::OUString& aPropertyName, const Reference<XPropertyChangeListener>& aListener)
throw( UnknownPropertyException, WrappedTargetException, RuntimeException )
{
if( mxIface.is() )
@@ -973,7 +977,7 @@ void ImplIntrospectionAdapter::addPropertyChangeListener(const OUString& aProper
}
}
-void ImplIntrospectionAdapter::removePropertyChangeListener(const OUString& aPropertyName, const Reference<XPropertyChangeListener>& aListener)
+void ImplIntrospectionAdapter::removePropertyChangeListener(const ::rtl::OUString& aPropertyName, const Reference<XPropertyChangeListener>& aListener)
throw( UnknownPropertyException, WrappedTargetException, RuntimeException )
{
if( mxIface.is() )
@@ -986,7 +990,7 @@ void ImplIntrospectionAdapter::removePropertyChangeListener(const OUString& aPro
}
}
-void ImplIntrospectionAdapter::addVetoableChangeListener(const OUString& aPropertyName, const Reference<XVetoableChangeListener>& aListener)
+void ImplIntrospectionAdapter::addVetoableChangeListener(const ::rtl::OUString& aPropertyName, const Reference<XVetoableChangeListener>& aListener)
throw( UnknownPropertyException, WrappedTargetException, RuntimeException )
{
if( mxIface.is() )
@@ -999,7 +1003,7 @@ void ImplIntrospectionAdapter::addVetoableChangeListener(const OUString& aProper
}
}
-void ImplIntrospectionAdapter::removeVetoableChangeListener(const OUString& aPropertyName, const Reference<XVetoableChangeListener>& aListener)
+void ImplIntrospectionAdapter::removeVetoableChangeListener(const ::rtl::OUString& aPropertyName, const Reference<XVetoableChangeListener>& aListener)
throw( UnknownPropertyException, WrappedTargetException, RuntimeException )
{
if( mxIface.is() )
@@ -1030,54 +1034,16 @@ Sequence< Property > ImplIntrospectionAdapter::getProperties(void) throw( Runtim
return mpStaticImpl->getProperties();
}
-namespace
-{
- Property getPropertyImpl(IntrospectionAccessStatic_Impl *pStaticImpl, const OUString& Name, sal_Int32 PropertyConcepts)
- throw( NoSuchElementException, RuntimeException )
- {
- Property aRet;
- sal_Int32 i = pStaticImpl->getPropertyIndex( Name );
- sal_Bool bFound = sal_False;
- if( i != -1 )
- {
- sal_Int32 nConcept = pStaticImpl->getPropertyConcepts().getConstArray()[ i ];
- if( (PropertyConcepts & nConcept) != 0 )
- {
- const Property* pProps = pStaticImpl->getProperties().getConstArray();
- aRet = pProps[ i ];
- bFound = sal_True;
- }
- }
- if( !bFound )
- throw NoSuchElementException() ;
- return aRet;
- }
-
- sal_Bool hasPropertyImpl(IntrospectionAccessStatic_Impl *pStaticImpl, const OUString& Name, sal_Int32 PropertyConcepts)
- throw( RuntimeException )
- {
- sal_Int32 i = pStaticImpl->getPropertyIndex( Name );
- sal_Bool bRet = sal_False;
- if( i != -1 )
- {
- sal_Int32 nConcept = pStaticImpl->getPropertyConcepts().getConstArray()[ i ];
- if( (PropertyConcepts & nConcept) != 0 )
- bRet = sal_True;
- }
- return bRet;
- }
-}
-
-Property ImplIntrospectionAdapter::getPropertyByName(const OUString& Name)
+Property ImplIntrospectionAdapter::getPropertyByName(const ::rtl::OUString& Name)
throw( RuntimeException )
{
- return getPropertyImpl(mpStaticImpl.get(), Name, PropertyConcept::ALL);
+ return mpAccess->getProperty( Name, PropertyConcept::ALL );
}
-sal_Bool ImplIntrospectionAdapter::hasPropertyByName(const OUString& Name)
+sal_Bool ImplIntrospectionAdapter::hasPropertyByName(const ::rtl::OUString& Name)
throw( RuntimeException )
{
- return hasPropertyImpl(mpStaticImpl.get(), Name, PropertyConcept::ALL);
+ return mpAccess->hasProperty( Name, PropertyConcept::ALL );
}
// Methoden von XElementAccess
@@ -1092,38 +1058,38 @@ sal_Bool ImplIntrospectionAdapter::hasElements(void) throw( RuntimeException )
}
// Methoden von XNameAccess
-Any ImplIntrospectionAdapter::getByName(const OUString& Name)
+Any ImplIntrospectionAdapter::getByName(const ::rtl::OUString& Name)
throw( NoSuchElementException, WrappedTargetException, RuntimeException )
{
return mxObjNameAccess->getByName( Name );
}
-Sequence< OUString > ImplIntrospectionAdapter::getElementNames(void)
+Sequence< ::rtl::OUString > ImplIntrospectionAdapter::getElementNames(void)
throw( RuntimeException )
{
return mxObjNameAccess->getElementNames();
}
-sal_Bool ImplIntrospectionAdapter::hasByName(const OUString& Name)
+sal_Bool ImplIntrospectionAdapter::hasByName(const ::rtl::OUString& Name)
throw( RuntimeException )
{
return mxObjNameAccess->hasByName( Name );
}
// Methoden von XNameContainer
-void ImplIntrospectionAdapter::insertByName(const OUString& Name, const Any& Element)
+void ImplIntrospectionAdapter::insertByName(const ::rtl::OUString& Name, const Any& Element)
throw( IllegalArgumentException, ElementExistException, WrappedTargetException, RuntimeException )
{
mxObjNameContainer->insertByName( Name, Element );
}
-void ImplIntrospectionAdapter::replaceByName(const OUString& Name, const Any& Element)
+void ImplIntrospectionAdapter::replaceByName(const ::rtl::OUString& Name, const Any& Element)
throw( IllegalArgumentException, NoSuchElementException, WrappedTargetException, RuntimeException )
{
mxObjNameContainer->replaceByName( Name, Element );
}
-void ImplIntrospectionAdapter::removeByName(const OUString& Name)
+void ImplIntrospectionAdapter::removeByName(const ::rtl::OUString& Name)
throw( NoSuchElementException, WrappedTargetException, RuntimeException )
{
mxObjNameContainer->removeByName( Name );
@@ -1202,7 +1168,7 @@ void ImplIntrospectionAdapter::set(Any& array, sal_Int32 index, const Any& value
sal_Int32 ImplIntrospectionAccess::getSuppliedMethodConcepts(void)
throw( RuntimeException )
{
- return MethodConcept::DANGEROUS |
+ return MethodConcept::DANGEROUS |
PROPERTY |
LISTENER |
ENUMERATION |
@@ -1213,29 +1179,52 @@ sal_Int32 ImplIntrospectionAccess::getSuppliedMethodConcepts(void)
sal_Int32 ImplIntrospectionAccess::getSuppliedPropertyConcepts(void)
throw( RuntimeException )
{
- return PropertyConcept::DANGEROUS |
+ return PropertyConcept::DANGEROUS |
PROPERTYSET |
ATTRIBUTES |
METHODS;
}
-Property ImplIntrospectionAccess::getProperty(const OUString& Name, sal_Int32 PropertyConcepts)
+Property ImplIntrospectionAccess::getProperty(const ::rtl::OUString& Name, sal_Int32 PropertyConcepts)
throw( NoSuchElementException, RuntimeException )
{
- return getPropertyImpl(mpStaticImpl.get(), Name, PropertyConcepts);
+ Property aRet;
+ sal_Int32 i = mpStaticImpl->getPropertyIndex( Name );
+ sal_Bool bFound = sal_False;
+ if( i != -1 )
+ {
+ sal_Int32 nConcept = mpStaticImpl->getPropertyConcepts().getConstArray()[ i ];
+ if( (PropertyConcepts & nConcept) != 0 )
+ {
+ const Property* pProps = mpStaticImpl->getProperties().getConstArray();
+ aRet = pProps[ i ];
+ bFound = sal_True;
+ }
+ }
+ if( !bFound )
+ throw NoSuchElementException() ;
+ return aRet;
}
-sal_Bool ImplIntrospectionAccess::hasProperty(const OUString& Name, sal_Int32 PropertyConcepts)
+sal_Bool ImplIntrospectionAccess::hasProperty(const ::rtl::OUString& Name, sal_Int32 PropertyConcepts)
throw( RuntimeException )
{
- return hasPropertyImpl(mpStaticImpl.get(), Name, PropertyConcepts);
+ sal_Int32 i = mpStaticImpl->getPropertyIndex( Name );
+ sal_Bool bRet = sal_False;
+ if( i != -1 )
+ {
+ sal_Int32 nConcept = mpStaticImpl->getPropertyConcepts().getConstArray()[ i ];
+ if( (PropertyConcepts & nConcept) != 0 )
+ bRet = sal_True;
+ }
+ return bRet;
}
Sequence< Property > ImplIntrospectionAccess::getProperties(sal_Int32 PropertyConcepts)
throw( RuntimeException )
{
// Wenn alle unterstuetzten Konzepte gefordert werden, Sequence einfach durchreichen
- sal_Int32 nAllSupportedMask = PROPERTYSET |
+ sal_Int32 nAllSupportedMask = PROPERTYSET |
ATTRIBUTES |
METHODS;
if( ( PropertyConcepts & nAllSupportedMask ) == nAllSupportedMask )
@@ -1254,7 +1243,7 @@ Sequence< Property > ImplIntrospectionAccess::getProperties(sal_Int32 PropertyCo
// Es gibt zur Zeit keine DANGEROUS-Properties
// if( PropertyConcepts & DANGEROUS )
- // nCount += mpStaticImpl->mnDangerousPropCount;
+ // nCount += mpStaticImpl->mnDangerousPropCount;
if( PropertyConcepts & PROPERTYSET )
nCount += mpStaticImpl->mnPropertySetPropCount;
if( PropertyConcepts & ATTRIBUTES )
@@ -1288,7 +1277,7 @@ Sequence< Property > ImplIntrospectionAccess::getProperties(sal_Int32 PropertyCo
return maLastPropertySeq;
}
-Reference<XIdlMethod> ImplIntrospectionAccess::getMethod(const OUString& Name, sal_Int32 MethodConcepts)
+Reference<XIdlMethod> ImplIntrospectionAccess::getMethod(const ::rtl::OUString& Name, sal_Int32 MethodConcepts)
throw( NoSuchMethodException, RuntimeException )
{
Reference<XIdlMethod> xRet;
@@ -1308,7 +1297,7 @@ Reference<XIdlMethod> ImplIntrospectionAccess::getMethod(const OUString& Name, s
return xRet;
}
-sal_Bool ImplIntrospectionAccess::hasMethod(const OUString& Name, sal_Int32 MethodConcepts)
+sal_Bool ImplIntrospectionAccess::hasMethod(const ::rtl::OUString& Name, sal_Int32 MethodConcepts)
throw( RuntimeException )
{
sal_Int32 i = mpStaticImpl->getMethodIndex( Name );
@@ -1328,7 +1317,7 @@ Sequence< Reference<XIdlMethod> > ImplIntrospectionAccess::getMethods(sal_Int32
ImplIntrospectionAccess* pThis = (ImplIntrospectionAccess*)this; // const umgehen
// Wenn alle unterstuetzten Konzepte gefordert werden, Sequence einfach durchreichen
- sal_Int32 nAllSupportedMask = MethodConcept::DANGEROUS |
+ sal_Int32 nAllSupportedMask = MethodConcept::DANGEROUS |
PROPERTY |
LISTENER |
ENUMERATION |
@@ -1412,17 +1401,15 @@ Reference<XInterface> SAL_CALL ImplIntrospectionAccess::queryAdapter( const Type
throw( IllegalTypeException, RuntimeException )
{
// Gibt es schon einen Adapter?
- if( !mpAdapter.is() )
+ Reference< XInterface > xAdapter( maAdapter );
+ if( !xAdapter.is() )
{
- ((ImplIntrospectionAccess*)this)->mpAdapter =
- new ImplIntrospectionAdapter( maInspectedObject, mpStaticImpl );
+ xAdapter = *( new ImplIntrospectionAdapter( this, maInspectedObject, mpStaticImpl ) );
+ maAdapter = xAdapter;
}
Reference<XInterface> xRet;
- Any aIfaceAny( mpAdapter->queryInterface( rType ) );
- if( aIfaceAny.hasValue() )
- xRet = *(Reference<XInterface>*)aIfaceAny.getValue();
-
+ xAdapter->queryInterface( rType ) >>= xRet;
return xRet;
}
@@ -1432,20 +1419,20 @@ Any ImplIntrospectionAccess::getMaterial(void) throw(RuntimeException)
return maInspectedObject;
}
-// Hilfs-Funktion zur LowerCase-Wandlung eines OUString
-OUString toLower( OUString aUStr )
+// Hilfs-Funktion zur LowerCase-Wandlung eines ::rtl::OUString
+::rtl::OUString toLower( ::rtl::OUString aUStr )
{
// Tabelle fuer XExactName pflegen
::rtl::OUString aOWStr( aUStr.getStr() );
::rtl::OUString aOWLowerStr = aOWStr.toAsciiLowerCase();
- OUString aLowerUStr( aOWLowerStr.getStr() );
+ ::rtl::OUString aLowerUStr( aOWLowerStr.getStr() );
return aLowerUStr;
}
// Methoden von XExactName
-OUString ImplIntrospectionAccess::getExactName( const OUString& rApproximateName ) throw( RuntimeException )
+::rtl::OUString ImplIntrospectionAccess::getExactName( const ::rtl::OUString& rApproximateName ) throw( RuntimeException )
{
- OUString aRetStr;
+ ::rtl::OUString aRetStr;
LowerToExactNameMap::iterator aIt =
mpStaticImpl->maLowerToExactNameMap.find( toLower( rApproximateName ) );
if( !( aIt == mpStaticImpl->maLowerToExactNameMap.end() ) )
@@ -1459,9 +1446,9 @@ OUString ImplIntrospectionAccess::getExactName( const OUString& rApproximateName
struct hashIntrospectionKey_Impl
{
Sequence< Reference<XIdlClass> > aIdlClasses;
- Reference<XPropertySetInfo> xPropInfo;
+ Reference<XPropertySetInfo> xPropInfo;
Reference<XIdlClass> xImplClass;
- sal_Int32 nHitCount;
+ sal_Int32 nHitCount;
void IncHitCount() const { ((hashIntrospectionKey_Impl*)this)->nHitCount++; }
hashIntrospectionKey_Impl() : nHitCount( 0 ) {}
@@ -1521,9 +1508,9 @@ IntrospectionAccessCacheMap;
// For XTypeProvider
struct hashTypeProviderKey_Impl
{
- Reference<XPropertySetInfo> xPropInfo;
+ Reference<XPropertySetInfo> xPropInfo;
Sequence< sal_Int8 > maImpIdSeq;
- sal_Int32 nHitCount;
+ sal_Int32 nHitCount;
void IncHitCount() const { ((hashTypeProviderKey_Impl*)this)->nHitCount++; }
hashTypeProviderKey_Impl() : nHitCount( 0 ) {}
@@ -1605,7 +1592,7 @@ TypeProviderAccessCacheMap;
struct OIntrospectionMutex
{
- Mutex m_mutex;
+ Mutex m_mutex;
};
class ImplIntrospection : public XIntrospection
@@ -1645,20 +1632,20 @@ public:
ImplIntrospection( const Reference<XMultiServiceFactory> & rXSMgr );
// Methoden von XInterface
- virtual Any SAL_CALL queryInterface( const Type& rType ) throw( RuntimeException );
+ virtual Any SAL_CALL queryInterface( const Type& rType ) throw( RuntimeException );
virtual void SAL_CALL acquire() throw() { OComponentHelper::acquire(); }
virtual void SAL_CALL release() throw() { OComponentHelper::release(); }
// XTypeProvider
Sequence< Type > SAL_CALL getTypes( ) throw( RuntimeException );
- Sequence<sal_Int8> SAL_CALL getImplementationId( ) throw( RuntimeException );
+ Sequence<sal_Int8> SAL_CALL getImplementationId( ) throw( RuntimeException );
// XServiceInfo
- OUString SAL_CALL getImplementationName() throw();
- sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw();
- Sequence< OUString > SAL_CALL getSupportedServiceNames(void) throw();
- static OUString SAL_CALL getImplementationName_Static( );
- static Sequence< OUString > SAL_CALL getSupportedServiceNames_Static(void) throw();
+ ::rtl::OUString SAL_CALL getImplementationName() throw();
+ sal_Bool SAL_CALL supportsService(const ::rtl::OUString& ServiceName) throw();
+ Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw();
+ static ::rtl::OUString SAL_CALL getImplementationName_Static( );
+ static Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames_Static(void) throw();
// Methoden von XIntrospection
virtual Reference<XIntrospectionAccess> SAL_CALL inspect(const Any& aToInspectObj)
@@ -1672,10 +1659,10 @@ protected:
enum MethodType
{
STANDARD_METHOD, // normale Methode, kein Bezug zu Properties oder Listenern
- GETSET_METHOD, // gehoert zu einer get/set-Property
+ GETSET_METHOD, // gehoert zu einer get/set-Property
ADD_LISTENER_METHOD, // add-Methode einer Listener-Schnittstelle
- REMOVE_LISTENER_METHOD, // remove-Methode einer Listener-Schnittstelle
- INVALID_METHOD // Methode, deren Klasse nicht beruecksichtigt wird, z.B. XPropertySet
+ REMOVE_LISTENER_METHOD, // remove-Methode einer Listener-Schnittstelle
+ INVALID_METHOD // Methode, deren Klasse nicht beruecksichtigt wird, z.B. XPropertySet
};
// Ctor
@@ -1689,39 +1676,39 @@ ImplIntrospection::ImplIntrospection( const Reference<XMultiServiceFactory> & rX
mpTypeProviderCache = NULL;
// 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( ::rtl::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;
+ ::rtl::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;
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/singletons/com.sun.star.reflection.theCoreReflection") ) ) >>= mxCoreReflection;
OSL_ENSURE( mxCoreReflection.is(), "### CoreReflection singleton not accessible!?" );
}
}
if (! mxCoreReflection.is())
{
throw DeploymentException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("/singletons/com.sun.star.reflection.theCoreReflection singleton not accessible") ),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/singletons/com.sun.star.reflection.theCoreReflection singleton not accessible") ),
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")) );
- mxNameAccessClass = mxCoreReflection->forName( OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.container.XNameAccess")) );
- mxIndexContainerClass = mxCoreReflection->forName( OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.container.XIndexContainer")) );
- mxIndexAccessClass = mxCoreReflection->forName( OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.container.XIndexAccess")) );
- mxEnumerationAccessClass = mxCoreReflection->forName( OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.container.XEnumerationAccess")) );
- mxInterfaceClass = mxCoreReflection->forName( OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.XInterface")) );
- mxAggregationClass = mxCoreReflection->forName( OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.XAggregation")) );
+ mxElementAccessClass = mxCoreReflection->forName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.container.XElementAccess")) );
+ mxNameContainerClass = mxCoreReflection->forName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.container.XNameContainer")) );
+ mxNameAccessClass = mxCoreReflection->forName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.container.XNameAccess")) );
+ mxIndexContainerClass = mxCoreReflection->forName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.container.XIndexContainer")) );
+ mxIndexAccessClass = mxCoreReflection->forName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.container.XIndexAccess")) );
+ mxEnumerationAccessClass = mxCoreReflection->forName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.container.XEnumerationAccess")) );
+ mxInterfaceClass = mxCoreReflection->forName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.XInterface")) );
+ mxAggregationClass = mxCoreReflection->forName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.XAggregation")) );
mbDisposed = sal_False;
}
@@ -1800,16 +1787,16 @@ Sequence< sal_Int8 > ImplIntrospection::getImplementationId()
// XServiceInfo
-OUString ImplIntrospection::getImplementationName() throw()
+::rtl::OUString ImplIntrospection::getImplementationName() throw()
{
return getImplementationName_Static();
}
// XServiceInfo
-sal_Bool ImplIntrospection::supportsService(const OUString& ServiceName) throw()
+sal_Bool ImplIntrospection::supportsService(const ::rtl::OUString& ServiceName) throw()
{
- Sequence< OUString > aSNL = getSupportedServiceNames();
- const OUString * pArray = aSNL.getConstArray();
+ Sequence< ::rtl::OUString > aSNL = getSupportedServiceNames();
+ const ::rtl::OUString * pArray = aSNL.getConstArray();
for( sal_Int32 i = 0; i < aSNL.getLength(); i++ )
if( pArray[i] == ServiceName )
return sal_True;
@@ -1817,23 +1804,23 @@ sal_Bool ImplIntrospection::supportsService(const OUString& ServiceName) throw()
}
// XServiceInfo
-Sequence< OUString > ImplIntrospection::getSupportedServiceNames(void) throw()
+Sequence< ::rtl::OUString > ImplIntrospection::getSupportedServiceNames(void) throw()
{
return getSupportedServiceNames_Static();
}
//*************************************************************************
// Helper XServiceInfo
-OUString ImplIntrospection::getImplementationName_Static( )
+::rtl::OUString ImplIntrospection::getImplementationName_Static( )
{
- return OUString(RTL_CONSTASCII_USTRINGPARAM(IMPLEMENTATION_NAME));
+ return ::rtl::OUString::createFromAscii( IMPLEMENTATION_NAME );
}
// ORegistryServiceManager_Static
-Sequence< OUString > ImplIntrospection::getSupportedServiceNames_Static(void) throw()
+Sequence< ::rtl::OUString > ImplIntrospection::getSupportedServiceNames_Static(void) throw()
{
- Sequence< OUString > aSNS( 1 );
- aSNS.getArray()[0] = OUString(RTL_CONSTASCII_USTRINGPARAM(SERVICE_NAME));
+ Sequence< ::rtl::OUString > aSNS( 1 );
+ aSNS.getArray()[0] = ::rtl::OUString::createFromAscii( SERVICE_NAME );
return aSNS;
}
@@ -1913,10 +1900,10 @@ Reference<XIdlClass> TypeToIdlClass( const Type& rType, const Reference< XMultiS
rType.getDescription( &pTD );
if( pTD )
{
- OUString sOWName( pTD->pTypeName );
+ ::rtl::OUString sOWName( pTD->pTypeName );
if( !xRefl.is() )
{
- xRefl = Reference< XIdlReflection >( xMgr->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.CoreReflection")) ), UNO_QUERY );
+ xRefl = Reference< XIdlReflection >( xMgr->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.CoreReflection")) ), UNO_QUERY );
OSL_ENSURE( xRefl.is(), "### no corereflection!" );
}
xRetClass = xRefl->forName( sOWName );
@@ -1963,10 +1950,10 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect(
Sequence< Type > SupportedTypesSeq;
Reference<XTypeProvider> xTypeProvider;
Reference<XIdlClass> xImplClass;
- Reference<XPropertySetInfo> xPropSetInfo;
- Reference<XPropertySet> xPropSet;
+ Reference<XPropertySetInfo> xPropSetInfo;
+ Reference<XPropertySet> xPropSet;
- // Bei Interfaces XTypeProvider- und PropertySet-Interface anfordern
+ // Look for interfaces XTypeProvider and PropertySet
if( eType == TypeClass_INTERFACE )
{
xTypeProvider = Reference<XTypeProvider>::query( x );
@@ -2055,7 +2042,7 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect(
else if( xImplClass.is() )
{
// cache only, if the descriptor class is set
- hashIntrospectionKey_Impl aKeySeq( SupportedClassSeq, xPropSetInfo, xImplClass );
+ hashIntrospectionKey_Impl aKeySeq( SupportedClassSeq, xPropSetInfo, xImplClass );
IntrospectionAccessCacheMap::iterator aIt = aCache.find( aKeySeq );
if( aIt == aCache.end() )
@@ -2162,7 +2149,7 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect(
pAccess->mnPropertySetPropCount++;
// Namen in Hashtable eintragen, wenn nicht schon bekannt
- OUString aPropName = rProp.Name;
+ ::rtl::OUString aPropName = rProp.Name;
// Haben wir den Namen schon?
IntrospectionNameMap::iterator aIt = rPropNameMap.find( aPropName );
@@ -2177,11 +2164,9 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect(
else
{
OSL_FAIL(
- (OString("Introspection: Property \"") +
- OUStringToOString(
- aPropName, RTL_TEXTENCODING_UTF8) +
- OString("\" found more than once in PropertySet")).
- getStr());
+ ( ::rtl::OString( "Introspection: Property \"" ) +
+ ::rtl::OUStringToOString( aPropName, RTL_TEXTENCODING_UTF8 ) +
+ ::rtl::OString( "\" found more than once in PropertySet" ) ).getStr() );
}
// Count pflegen
@@ -2200,8 +2185,8 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect(
// (das darf nur einmal erfolgen, initial zulassen)
sal_Bool bXInterfaceIsInvalid = sal_False;
- // Flag, ob die XInterface-Methoden schon erfasst wurden. Wenn sal_True,
- // wird bXInterfaceIsInvalid am Ende der Iface-Schleife aktiviert und
+ // Flag, ob die XInterface-Methoden schon erfasst wurden. Wenn sal_True,
+ // wird bXInterfaceIsInvalid am Ende der Iface-Schleife aktiviert und
// XInterface-Methoden werden danach abgeklemmt.
sal_Bool bFoundXInterface = sal_False;
@@ -2225,8 +2210,8 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect(
{
const Reference<XIdlClass>& rxIfaceClass = pParamArray[j];
- // Pruefen, ob das Interface schon beruecksichtigt wurde.
- XInterface* pIface = (static_cast< XInterface* >(rxIfaceClass.get()) );
+ // Pruefen, ob das Interface schon beruecksichtigt wurde.
+ XInterface* pIface = ( static_cast< XInterface* >( rxIfaceClass.get() ) );
if( aCheckedInterfacesMap.count( pIface ) > 0 )
{
// Kennen wir schon
@@ -2258,31 +2243,23 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect(
// In eigenes Property-Array eintragen
Property& rProp = pAllPropArray[ rPropCount ];
- OUString aFieldName = xField->getName();
+ ::rtl::OUString aFieldName = xField->getName();
rProp.Name = aFieldName;
rProp.Handle = rPropCount;
Type aFieldType( xPropType->getTypeClass(), xPropType->getName() );
rProp.Type = aFieldType;
FieldAccessMode eAccessMode = xField->getAccessMode();
- rProp.Attributes = (eAccessMode == FieldAccessMode_READONLY ||
- eAccessMode == FieldAccessMode_CONST)
+ rProp.Attributes = (eAccessMode == FieldAccessMode_READONLY ||
+ eAccessMode == FieldAccessMode_CONST)
? READONLY : 0;
// Namen in Hashtable eintragen
- OUString aPropName = rProp.Name;
+ ::rtl::OUString aPropName = rProp.Name;
// Haben wir den Namen schon?
IntrospectionNameMap::iterator aIt = rPropNameMap.find( aPropName );
if( !( aIt == rPropNameMap.end() ) )
- {
- /* TODO
- OSL_TRACE(
- String( "Introspection: Property \"" ) +
- OOUStringToString( aPropName, CHARSET_SYSTEM ) +
- String( "\" found more than once" ) );
- */
continue;
- }
// Neuer Eintrag in die Hashtable
rPropNameMap[ aPropName ] = rPropCount;
@@ -2291,7 +2268,7 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect(
rLowerToExactNameMap[ toLower( aPropName ) ] = aPropName;
// Field merken
- pAccess->checkInterfaceArraySize( pAccess->aInterfaceSeq1,
+ pAccess->checkInterfaceArraySize( pAccess->aInterfaceSeq1,
pInterfaces1, rPropCount );
pInterfaces1[ rPropCount ] = xField;
@@ -2318,8 +2295,8 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect(
// 3. a) get/set- und Listener-Methoden suchen
- // Feld fuer Infos ueber die Methoden anlegen, damit spaeter leicht die Methoden
- // gefunden werden koennen, die nicht im Zusammenhang mit Properties oder Listenern
+ // Feld fuer Infos ueber die Methoden anlegen, damit spaeter leicht die Methoden
+ // gefunden werden koennen, die nicht im Zusammenhang mit Properties oder Listenern
// stehen. NEU: auch MethodConceptArray initialisieren
MethodType* pMethodTypes = new MethodType[ nSourceMethodCount ];
sal_Int32* pLocalMethodConcepts = new sal_Int32[ nSourceMethodCount ];
@@ -2329,9 +2306,9 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect(
pLocalMethodConcepts[ i ] = 0;
}
- OUString aMethName;
- OUString aPropName;
- OUString aStartStr;
+ ::rtl::OUString aMethName;
+ ::rtl::OUString aPropName;
+ ::rtl::OUString aStartStr;
for( i = 0 ; i < nSourceMethodCount ; i++ )
{
// Methode ansprechen
@@ -2342,7 +2319,7 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect(
aMethName = rxMethod_i->getName();
// Methoden katalogisieren
- // Alle (?) Methoden von XInterface filtern, damit z.B. nicht
+ // Alle (?) Methoden von XInterface filtern, damit z.B. nicht
// vom Scripting aus acquire oder release gerufen werden kann
if( rxMethod_i->getDeclaringClass()->equals( mxInterfaceClass ) )
{
@@ -2356,7 +2333,7 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect(
}
else
{
- if( aMethName != "queryInterface" )
+ if( aMethName != ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("queryInterface")) )
{
rMethodConcept_i |= MethodConcept::DANGEROUS;
continue;
@@ -2365,7 +2342,7 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect(
}
else if( rxMethod_i->getDeclaringClass()->equals( mxAggregationClass ) )
{
- if ( aMethName == "setDelegator" )
+ if( aMethName == "setDelegator" )
{
rMethodConcept_i |= MethodConcept::DANGEROUS;
continue;
@@ -2398,7 +2375,7 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect(
// Ist es eine get-Methode?
aStartStr = aMethName.copy( 0, 3 );
- if ( aStartStr == "get" )
+ if( aStartStr == "get" )
{
// Namen der potentiellen Property
aPropName = aMethName.copy( 3 );
@@ -2415,8 +2392,8 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect(
if( !( aIt == rPropNameMap.end() ) )
{
/* TODO
- OSL_TRACE(
- String( "Introspection: Property \"" ) +
+ OSL_TRACE(
+ String( "Introspection: Property \"" ) +
OOUStringToString( aPropName, CHARSET_SYSTEM ) +
String( "\" found more than once" ) );
*/
@@ -2447,7 +2424,7 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect(
rLowerToExactNameMap[ toLower( aPropName ) ] = aPropName;
// get-Methode merken
- pAccess->checkInterfaceArraySize( pAccess->aInterfaceSeq1,
+ pAccess->checkInterfaceArraySize( pAccess->aInterfaceSeq1,
pInterfaces1, rPropCount );
pInterfaces1[ rPropCount ] = rxMethod_i;
@@ -2468,15 +2445,15 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect(
continue;
// Name holen und auswerten
- OUString aMethName2 = rxMethod_k->getName();
- OUString aStartStr2 = aMethName2.copy( 0, 3 );
- // ACHTUNG: Wegen SDL-Bug NICHT != bei OUString verwenden !!!
- if( aStartStr2 != "set" )
+ ::rtl::OUString aMethName2 = rxMethod_k->getName();
+ ::rtl::OUString aStartStr2 = aMethName2.copy( 0, 3 );
+ // ACHTUNG: Wegen SDL-Bug NICHT != bei ::rtl::OUString verwenden !!!
+ if( !( aStartStr2 == "set" ) )
continue;
// Ist es denn der gleiche Name?
- OUString aPropName2 = aMethName2.copy( 3 );
- // ACHTUNG: Wegen SDL-Bug NICHT != bei OUString verwenden !!!
+ ::rtl::OUString aPropName2 = aMethName2.copy( 3 );
+ // ACHTUNG: Wegen SDL-Bug NICHT != bei ::rtl::OUString verwenden !!!
if( !( aPropName == aPropName2 ) )
continue;
@@ -2508,7 +2485,7 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect(
rProp.Attributes &= ~READONLY;
// set-Methode merken
- pAccess->checkInterfaceArraySize( pAccess->aInterfaceSeq2,
+ pAccess->checkInterfaceArraySize( pAccess->aInterfaceSeq2,
pInterfaces2, rPropCount );
pInterfaces2[ rPropCount ] = rxMethod_k;
}
@@ -2519,22 +2496,22 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect(
}
// Ist es eine addListener-Methode?
- else if ( aStartStr == "add" )
+ else if( aStartStr == "add" )
{
- OUString aListenerStr( RTL_CONSTASCII_USTRINGPARAM("Listener" ) );
+ ::rtl::OUString aListenerStr( "Listener" );
// Namen der potentiellen Property
sal_Int32 nStrLen = aMethName.getLength();
sal_Int32 nCopyLen = nStrLen - aListenerStr.getLength();
- OUString aEndStr = aMethName.copy( nCopyLen > 0 ? nCopyLen : 0 );
+ ::rtl::OUString aEndStr = aMethName.copy( nCopyLen > 0 ? nCopyLen : 0 );
// Endet das Teil auf Listener?
- // ACHTUNG: Wegen SDL-Bug NICHT != bei OUString verwenden !!!
+ // ACHTUNG: Wegen SDL-Bug NICHT != bei ::rtl::OUString verwenden !!!
if( !( aEndStr == aListenerStr ) )
continue;
// Welcher Listener?
- OUString aListenerName = aMethName.copy( 3, nStrLen - aListenerStr.getLength() - 3 );
+ ::rtl::OUString aListenerName = aMethName.copy( 3, nStrLen - aListenerStr.getLength() - 3 );
// TODO: Hier koennten noch genauere Pruefungen vorgenommen werden
// - Rueckgabe-Typ
@@ -2553,21 +2530,21 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect(
continue;
// Name holen und auswerten
- OUString aMethName2 = rxMethod_k->getName();
+ ::rtl::OUString aMethName2 = rxMethod_k->getName();
sal_Int32 nNameLen = aMethName2.getLength();
sal_Int32 nCopyLen2 = (nNameLen < 6) ? nNameLen : 6;
- OUString aStartStr2 = aMethName2.copy( 0, nCopyLen2 );
- OUString aRemoveStr( RTL_CONSTASCII_USTRINGPARAM("remove" ) );
- // ACHTUNG: Wegen SDL-Bug NICHT != bei OUString verwenden !!!
+ ::rtl::OUString aStartStr2 = aMethName2.copy( 0, nCopyLen2 );
+ ::rtl::OUString aRemoveStr( RTL_CONSTASCII_USTRINGPARAM("remove" ) );
+ // ACHTUNG: Wegen SDL-Bug NICHT != bei ::rtl::OUString verwenden !!!
if( !( aStartStr2 == aRemoveStr ) )
continue;
// Ist es denn der gleiche Listener?
if( aMethName2.getLength() - aRemoveStr.getLength() <= aListenerStr.getLength() )
continue;
- OUString aListenerName2 = aMethName2.copy
- ( 6, aMethName2.getLength() - aRemoveStr.getLength() - aListenerStr.getLength() );
- // ACHTUNG: Wegen SDL-Bug NICHT != bei OUString verwenden !!!
+ ::rtl::OUString aListenerName2 = aMethName2.copy
+ ( 6, aMethName2.getLength() - aRemoveStr.getLength() - aListenerStr.getLength() );
+ // ACHTUNG: Wegen SDL-Bug NICHT != bei ::rtl::OUString verwenden !!!
if( !( aListenerName == aListenerName2 ) )
continue;
@@ -2608,7 +2585,7 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect(
// Ist es eine set-Methode ohne zugehoerige get-Methode?
aStartStr = aMethName.copy( 0, 3 );
- if ( aStartStr == "set" )
+ if( aStartStr == "set" )
{
// Namen der potentiellen Property
aPropName = aMethName.copy( 3 );
@@ -2633,8 +2610,8 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect(
if( !( aIt == rPropNameMap.end() ) )
{
/* TODO:
- OSL_TRACE(
- String( "Introspection: Property \"" ) +
+ OSL_TRACE(
+ String( "Introspection: Property \"" ) +
OOUStringToString( aPropName, CHARSET_SYSTEM ) +
String( "\" found more than once" ) );
*/
@@ -2656,7 +2633,7 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect(
rProp.Name = aPropName;
rProp.Handle = rPropCount;
rProp.Type = Type( xGetRetType->getTypeClass(), xGetRetType->getName() );
- rProp.Attributes = 0; // PROPERTY_WRITEONLY ???
+ rProp.Attributes = 0; // PROPERTY_WRITEONLY ???
// Neuer Eintrag in die Hashtable
rPropNameMap[ aPropName ] = rPropCount;
@@ -2665,7 +2642,7 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect(
rLowerToExactNameMap[ toLower( aPropName ) ] = aPropName;
// set-Methode merken
- pAccess->checkInterfaceArraySize( pAccess->aInterfaceSeq2,
+ pAccess->checkInterfaceArraySize( pAccess->aInterfaceSeq2,
pInterfaces2, rPropCount );
pInterfaces2[ rPropCount ] = rxMethod_i;
@@ -2716,7 +2693,7 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect(
const Reference<XIdlMethod>& rxMethod = pSourceMethods[i];
// Namen in Hashtable eintragen, wenn nicht schon bekannt
- OUString aMethName2 = rxMethod->getName();
+ ::rtl::OUString aMethName2 = rxMethod->getName();
IntrospectionNameMap::iterator aIt = rMethodNameMap.find( aMethName2 );
if( aIt == rMethodNameMap.end() )
{
@@ -2771,7 +2748,7 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect(
const Reference<XIdlClass>& rxClass = pParamArray2[k];
// Sind wir von einem Listener abgeleitet?
- if( rxClass->equals( xEventListenerClass ) ||
+ if( rxClass->equals( xEventListenerClass ) ||
isDerivedFrom( rxClass, xEventListenerClass ) )
{
xListenerClass = rxClass;
@@ -2790,7 +2767,7 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect(
}
}
- // Wenn in diesem Durchlauf XInterface-Methoden
+ // Wenn in diesem Durchlauf XInterface-Methoden
// dabei waren, diese zukuenftig ignorieren
if( bFoundXInterface )
bXInterfaceIsInvalid = sal_True;
@@ -2849,7 +2826,7 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect(
{
Reference<XIdlField> xField = pFields[i];
Reference<XIdlClass> xPropType = xField->getType();
- OUString aPropName = xField->getName();
+ ::rtl::OUString aPropName = xField->getName();
// Ist die PropertySequence gross genug?
pAccess->checkPropertyArraysSize
@@ -2922,7 +2899,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
{
Reference< XSingleServiceFactory > xFactory( createOneInstanceFactory(
reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
- OUString::createFromAscii( pImplName ),
+ ::rtl::OUString::createFromAscii( pImplName ),
stoc_inspect::ImplIntrospection_CreateInstance,
stoc_inspect::ImplIntrospection::getSupportedServiceNames_Static() ) );