Commits

Anonymous committed 7e758f0

fs34b: make compile on Solaris

  • Participants
  • Parent commits 5282caa

Comments (0)

Files changed (1)

File stoc/source/inspect/introspection.cxx

 
 
 //*******************************
-//*** ImplIntrospectionAdapter ***
-//*******************************
-
-// 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 ImplIntrospectionAdapter : 
-	public XPropertySet, public XFastPropertySet, public XPropertySetInfo, 
-	public XNameContainer, public XIndexContainer,
-	public XEnumerationAccess, public  XIdlArray,
-	public OWeakObject
-{
-	// Parent-Objekt
-    ::rtl::Reference< ImplIntrospectionAccess > mpAccess;
-
-	// Untersuchtes Objekt
-	const Any& mrInspectedObject;
-    
-	// Statische Daten der Introspection
-	IntrospectionAccessStatic_Impl* mpStaticImpl;
-
-	// Objekt als Interface
-	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<XIdlArray>			mxObjIdlArray;
-
-public:
-	ImplIntrospectionAdapter( ImplIntrospectionAccess* pAccess_, 
-		const Any& obj, IntrospectionAccessStatic_Impl* pStaticImpl_ );
-	~ImplIntrospectionAdapter();
-
-	// Methoden von XInterface
-    virtual Any SAL_CALL queryInterface( const Type& rType ) throw( RuntimeException );
-	virtual void		SAL_CALL acquire() throw() { OWeakObject::acquire(); }
-	virtual void		SAL_CALL release() throw() { OWeakObject::release(); }
-
-	// Methoden von XPropertySet
-	virtual Reference<XPropertySetInfo> SAL_CALL getPropertySetInfo() throw( RuntimeException );
-    virtual void SAL_CALL setPropertyValue(const ::rtl::OUString& aPropertyName, const Any& aValue)
-		throw( UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException );
-    virtual Any SAL_CALL getPropertyValue(const ::rtl::OUString& aPropertyName)
-		throw( UnknownPropertyException, WrappedTargetException, RuntimeException );
-    virtual void SAL_CALL addPropertyChangeListener(const ::rtl::OUString& aPropertyName, const Reference<XPropertyChangeListener>& aListener) 
-		throw( UnknownPropertyException, WrappedTargetException, RuntimeException );
-    virtual void SAL_CALL removePropertyChangeListener(const ::rtl::OUString& aPropertyName, const Reference<XPropertyChangeListener>& aListener) 
-		throw( UnknownPropertyException, WrappedTargetException, RuntimeException );
-    virtual void SAL_CALL addVetoableChangeListener(const ::rtl::OUString& aPropertyName, const Reference<XVetoableChangeListener>& aListener) 
-		throw( UnknownPropertyException, WrappedTargetException, RuntimeException );
-    virtual void SAL_CALL removeVetoableChangeListener(const ::rtl::OUString& aPropertyName, const Reference<XVetoableChangeListener>& aListener) 
-		throw( UnknownPropertyException, WrappedTargetException, RuntimeException );
-
-	// Methoden von XFastPropertySet
-	virtual void SAL_CALL setFastPropertyValue(sal_Int32 nHandle, const Any& aValue)
-		throw( UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException );
-	virtual Any SAL_CALL getFastPropertyValue(sal_Int32 nHandle)
-		throw( UnknownPropertyException, WrappedTargetException, RuntimeException );
-
-	// Methoden von XPropertySetInfo
-	virtual Sequence< Property > SAL_CALL getProperties(void) 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 ::rtl::OUString& Name)
-		throw( NoSuchElementException, WrappedTargetException, 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 ::rtl::OUString& Name, const Any& Element)
-		throw( IllegalArgumentException, ElementExistException, WrappedTargetException, RuntimeException );
-	virtual void SAL_CALL replaceByName(const ::rtl::OUString& Name, const Any& Element)
-		throw( IllegalArgumentException, NoSuchElementException, WrappedTargetException, RuntimeException );
-	virtual void SAL_CALL removeByName(const ::rtl::OUString& Name)
-		throw( NoSuchElementException, WrappedTargetException, RuntimeException );
-
-	// Methoden von XIndexAccess
-    virtual sal_Int32 SAL_CALL getCount(void) throw( RuntimeException );
-    virtual Any SAL_CALL getByIndex(sal_Int32 Index)
-		throw( IndexOutOfBoundsException, WrappedTargetException, RuntimeException );
-
-	// Methoden von XIndexContainer
-	virtual void SAL_CALL insertByIndex(sal_Int32 Index, const Any& Element) 
-		throw( IllegalArgumentException, IndexOutOfBoundsException, WrappedTargetException, RuntimeException );
-	virtual void SAL_CALL replaceByIndex(sal_Int32 Index, const Any& Element)
-		throw( IllegalArgumentException, IndexOutOfBoundsException, WrappedTargetException, RuntimeException );
-	virtual void SAL_CALL removeByIndex(sal_Int32 Index)
-		throw( IndexOutOfBoundsException, WrappedTargetException, RuntimeException );
-
-	// Methoden von XEnumerationAccess
-	virtual Reference<XEnumeration> SAL_CALL createEnumeration(void) throw( RuntimeException );
-
-	// Methoden von XIdlArray
-	virtual void SAL_CALL realloc(Any& array, sal_Int32 length)
-		throw( IllegalArgumentException, RuntimeException );
-	virtual sal_Int32 SAL_CALL getLen(const Any& array) throw( IllegalArgumentException, RuntimeException );
-	virtual Any SAL_CALL get(const Any& array, sal_Int32 index)
-		throw( IllegalArgumentException, ArrayIndexOutOfBoundsException, RuntimeException );
-	virtual void SAL_CALL set(Any& array, sal_Int32 index, const Any& value)
-		throw( IllegalArgumentException, ArrayIndexOutOfBoundsException, RuntimeException );
-};
-
-ImplIntrospectionAdapter::ImplIntrospectionAdapter( ImplIntrospectionAccess* pAccess_, 
-	const Any& obj, IntrospectionAccessStatic_Impl* pStaticImpl_ )
-		: mpAccess( pAccess_), mrInspectedObject( obj ), mpStaticImpl( pStaticImpl_ )
-{
-	mpStaticImpl->acquire();
-
-	// Objekt als Interfaceholen
-	TypeClass eType = mrInspectedObject.getValueType().getTypeClass();
-	if( eType == TypeClass_INTERFACE )
-	{
-		mxIface = *( Reference< XInterface >*)mrInspectedObject.getValue();
-
-		mxObjElementAccess = Reference<XElementAccess>::query( mxIface );
-		mxObjNameAccess = Reference<XNameAccess>::query( mxIface );
-		mxObjNameContainer = Reference<XNameContainer>::query( mxIface );
-		mxObjIndexAccess = Reference<XIndexAccess>::query( mxIface );
-		mxObjIndexContainer = Reference<XIndexContainer>::query( mxIface );
-		mxObjEnumerationAccess = Reference<XEnumerationAccess>::query( mxIface );
-		mxObjIdlArray = Reference<XIdlArray>::query( mxIface );
-	}
-}
-
-ImplIntrospectionAdapter::~ImplIntrospectionAdapter()
-{
-	mpStaticImpl->release();
-}
-
-// Methoden von XInterface
-Any SAL_CALL ImplIntrospectionAdapter::queryInterface( const Type& rType ) 
-	throw( RuntimeException )
-{
-	Any aRet( ::cppu::queryInterface(
-		rType,
-		static_cast< XPropertySet * >( this ),
-		static_cast< XFastPropertySet * >( this ),
-		static_cast< XPropertySetInfo * >( this ) ) );
-	if( !aRet.hasValue() )
-		aRet = OWeakObject::queryInterface( rType );
-
-	if( !aRet.hasValue() )
-	{
-		// Wrapper fuer die Objekt-Interfaces
-		if(   ( mxObjElementAccess.is() && (aRet = ::cppu::queryInterface
-					( rType, static_cast< XElementAccess* >( static_cast< XNameAccess* >( this ) ) ) ).hasValue() )
-			|| ( mxObjNameAccess.is() && (aRet = ::cppu::queryInterface( rType, static_cast< XNameAccess* >( this ) ) ).hasValue() )
-			|| ( 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() )
-			|| ( mxObjIdlArray.is() && (aRet = ::cppu::queryInterface( rType, static_cast< XIdlArray* >( this ) ) ).hasValue() ) 
-		  )
-		{
-		}
-	}
-	return aRet;
-}
-
-
-//*******************************
 //*** ImplIntrospectionAccess ***
 //*******************************
 
 }
 
 
+//*******************************
+//*** ImplIntrospectionAdapter ***
+//*******************************
+
+// 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 ImplIntrospectionAdapter : 
+	public XPropertySet, public XFastPropertySet, public XPropertySetInfo, 
+	public XNameContainer, public XIndexContainer,
+	public XEnumerationAccess, public  XIdlArray,
+	public OWeakObject
+{
+	// Parent-Objekt
+    ::rtl::Reference< ImplIntrospectionAccess > mpAccess;
+
+	// Untersuchtes Objekt
+	const Any& mrInspectedObject;
+    
+	// Statische Daten der Introspection
+	IntrospectionAccessStatic_Impl* mpStaticImpl;
+
+	// Objekt als Interface
+	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<XIdlArray>			mxObjIdlArray;
+
+public:
+	ImplIntrospectionAdapter( ImplIntrospectionAccess* pAccess_, 
+		const Any& obj, IntrospectionAccessStatic_Impl* pStaticImpl_ );
+	~ImplIntrospectionAdapter();
+
+	// Methoden von XInterface
+    virtual Any SAL_CALL queryInterface( const Type& rType ) throw( RuntimeException );
+	virtual void		SAL_CALL acquire() throw() { OWeakObject::acquire(); }
+	virtual void		SAL_CALL release() throw() { OWeakObject::release(); }
+
+	// Methoden von XPropertySet
+	virtual Reference<XPropertySetInfo> SAL_CALL getPropertySetInfo() throw( RuntimeException );
+    virtual void SAL_CALL setPropertyValue(const ::rtl::OUString& aPropertyName, const Any& aValue)
+		throw( UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException );
+    virtual Any SAL_CALL getPropertyValue(const ::rtl::OUString& aPropertyName)
+		throw( UnknownPropertyException, WrappedTargetException, RuntimeException );
+    virtual void SAL_CALL addPropertyChangeListener(const ::rtl::OUString& aPropertyName, const Reference<XPropertyChangeListener>& aListener) 
+		throw( UnknownPropertyException, WrappedTargetException, RuntimeException );
+    virtual void SAL_CALL removePropertyChangeListener(const ::rtl::OUString& aPropertyName, const Reference<XPropertyChangeListener>& aListener) 
+		throw( UnknownPropertyException, WrappedTargetException, RuntimeException );
+    virtual void SAL_CALL addVetoableChangeListener(const ::rtl::OUString& aPropertyName, const Reference<XVetoableChangeListener>& aListener) 
+		throw( UnknownPropertyException, WrappedTargetException, RuntimeException );
+    virtual void SAL_CALL removeVetoableChangeListener(const ::rtl::OUString& aPropertyName, const Reference<XVetoableChangeListener>& aListener) 
+		throw( UnknownPropertyException, WrappedTargetException, RuntimeException );
+
+	// Methoden von XFastPropertySet
+	virtual void SAL_CALL setFastPropertyValue(sal_Int32 nHandle, const Any& aValue)
+		throw( UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException );
+	virtual Any SAL_CALL getFastPropertyValue(sal_Int32 nHandle)
+		throw( UnknownPropertyException, WrappedTargetException, RuntimeException );
+
+	// Methoden von XPropertySetInfo
+	virtual Sequence< Property > SAL_CALL getProperties(void) 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 ::rtl::OUString& Name)
+		throw( NoSuchElementException, WrappedTargetException, 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 ::rtl::OUString& Name, const Any& Element)
+		throw( IllegalArgumentException, ElementExistException, WrappedTargetException, RuntimeException );
+	virtual void SAL_CALL replaceByName(const ::rtl::OUString& Name, const Any& Element)
+		throw( IllegalArgumentException, NoSuchElementException, WrappedTargetException, RuntimeException );
+	virtual void SAL_CALL removeByName(const ::rtl::OUString& Name)
+		throw( NoSuchElementException, WrappedTargetException, RuntimeException );
+
+	// Methoden von XIndexAccess
+    virtual sal_Int32 SAL_CALL getCount(void) throw( RuntimeException );
+    virtual Any SAL_CALL getByIndex(sal_Int32 Index)
+		throw( IndexOutOfBoundsException, WrappedTargetException, RuntimeException );
+
+	// Methoden von XIndexContainer
+	virtual void SAL_CALL insertByIndex(sal_Int32 Index, const Any& Element) 
+		throw( IllegalArgumentException, IndexOutOfBoundsException, WrappedTargetException, RuntimeException );
+	virtual void SAL_CALL replaceByIndex(sal_Int32 Index, const Any& Element)
+		throw( IllegalArgumentException, IndexOutOfBoundsException, WrappedTargetException, RuntimeException );
+	virtual void SAL_CALL removeByIndex(sal_Int32 Index)
+		throw( IndexOutOfBoundsException, WrappedTargetException, RuntimeException );
+
+	// Methoden von XEnumerationAccess
+	virtual Reference<XEnumeration> SAL_CALL createEnumeration(void) throw( RuntimeException );
+
+	// Methoden von XIdlArray
+	virtual void SAL_CALL realloc(Any& array, sal_Int32 length)
+		throw( IllegalArgumentException, RuntimeException );
+	virtual sal_Int32 SAL_CALL getLen(const Any& array) throw( IllegalArgumentException, RuntimeException );
+	virtual Any SAL_CALL get(const Any& array, sal_Int32 index)
+		throw( IllegalArgumentException, ArrayIndexOutOfBoundsException, RuntimeException );
+	virtual void SAL_CALL set(Any& array, sal_Int32 index, const Any& value)
+		throw( IllegalArgumentException, ArrayIndexOutOfBoundsException, RuntimeException );
+};
+
+ImplIntrospectionAdapter::ImplIntrospectionAdapter( ImplIntrospectionAccess* pAccess_, 
+	const Any& obj, IntrospectionAccessStatic_Impl* pStaticImpl_ )
+		: mpAccess( pAccess_), mrInspectedObject( obj ), mpStaticImpl( pStaticImpl_ )
+{
+	mpStaticImpl->acquire();
+
+	// Objekt als Interfaceholen
+	TypeClass eType = mrInspectedObject.getValueType().getTypeClass();
+	if( eType == TypeClass_INTERFACE )
+	{
+		mxIface = *( Reference< XInterface >*)mrInspectedObject.getValue();
+
+		mxObjElementAccess = Reference<XElementAccess>::query( mxIface );
+		mxObjNameAccess = Reference<XNameAccess>::query( mxIface );
+		mxObjNameContainer = Reference<XNameContainer>::query( mxIface );
+		mxObjIndexAccess = Reference<XIndexAccess>::query( mxIface );
+		mxObjIndexContainer = Reference<XIndexContainer>::query( mxIface );
+		mxObjEnumerationAccess = Reference<XEnumerationAccess>::query( mxIface );
+		mxObjIdlArray = Reference<XIdlArray>::query( mxIface );
+	}
+}
+
+ImplIntrospectionAdapter::~ImplIntrospectionAdapter()
+{
+	mpStaticImpl->release();
+}
+
+// Methoden von XInterface
+Any SAL_CALL ImplIntrospectionAdapter::queryInterface( const Type& rType ) 
+	throw( RuntimeException )
+{
+	Any aRet( ::cppu::queryInterface(
+		rType,
+		static_cast< XPropertySet * >( this ),
+		static_cast< XFastPropertySet * >( this ),
+		static_cast< XPropertySetInfo * >( this ) ) );
+	if( !aRet.hasValue() )
+		aRet = OWeakObject::queryInterface( rType );
+
+	if( !aRet.hasValue() )
+	{
+		// Wrapper fuer die Objekt-Interfaces
+		if(   ( mxObjElementAccess.is() && (aRet = ::cppu::queryInterface
+					( rType, static_cast< XElementAccess* >( static_cast< XNameAccess* >( this ) ) ) ).hasValue() )
+			|| ( mxObjNameAccess.is() && (aRet = ::cppu::queryInterface( rType, static_cast< XNameAccess* >( this ) ) ).hasValue() )
+			|| ( 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() )
+			|| ( mxObjIdlArray.is() && (aRet = ::cppu::queryInterface( rType, static_cast< XIdlArray* >( this ) ) ).hasValue() ) 
+		  )
+		{
+		}
+	}
+	return aRet;
+}
+
+
 //***************************************************
 //*** Implementation von ImplIntrospectionAdapter ***
 //***************************************************