diff options
author | Oliver Bolte <obo@openoffice.org> | 2004-06-04 01:33:34 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2004-06-04 01:33:34 +0000 |
commit | 198a9fcc470a142fe59798aa51b9658d835578d1 (patch) | |
tree | dafaa3c0f262e9e22e30a4088427c7015ae785e8 /stoc | |
parent | e5c5ae03a34fa56b8d22c2a5f8a9e8f0f2ec0386 (diff) |
INTEGRATION: CWS sb18 (1.14.4); FILE MERGED
2004/05/12 11:33:28 sb 1.14.4.3: #i21150# Missing includes.
2004/04/14 07:59:27 sb 1.14.4.2: #i21150# Added support for polymorphic struct types.
2004/04/08 14:35:37 sb 1.14.4.1: #i21150# Fixed UNOIDL typedef support.
Diffstat (limited to 'stoc')
-rw-r--r-- | stoc/source/registry_tdprovider/tdprovider.cxx | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/stoc/source/registry_tdprovider/tdprovider.cxx b/stoc/source/registry_tdprovider/tdprovider.cxx index f9c0ae9f8e08..04fa81f97448 100644 --- a/stoc/source/registry_tdprovider/tdprovider.cxx +++ b/stoc/source/registry_tdprovider/tdprovider.cxx @@ -2,9 +2,9 @@ * * $RCSfile: tdprovider.cxx,v $ * - * $Revision: 1.14 $ + * $Revision: 1.15 $ * - * last change: $Author: rt $ $Date: 2004-03-30 16:16:43 $ + * last change: $Author: obo $ $Date: 2004-06-04 02:33:34 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -91,6 +91,7 @@ #include <com/sun/star/registry/XRegistryKey.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/reflection/XTypeDescriptionEnumerationAccess.hpp> +#include "com/sun/star/uno/RuntimeException.hpp" #include "registry/reader.hxx" #include "registry/version.h" @@ -101,6 +102,7 @@ #ifndef _STOC_RDBTDP_TDENUMERATION_HXX #include "rdbtdp_tdenumeration.hxx" #endif +#include "structtypedescription.hxx" #define SERVICENAME "com.sun.star.reflection.TypeDescriptionProvider" #define IMPLNAME "com.sun.star.comp.stoc.RegistryTypeDescriptionProvider" @@ -435,6 +437,18 @@ static com::sun::star::uno::Reference< XInterface > SAL_CALL ProviderImpl_create //__________________________________________________________________________________________________ // global helper function + +com::sun::star::uno::Reference< XTypeDescription > resolveTypedefs( + com::sun::star::uno::Reference< XTypeDescription > const & type) +{ + com::sun::star::uno::Reference< XTypeDescription > resolved(type); + while (resolved->getTypeClass() == TypeClass_TYPEDEF) { + resolved = com::sun::star::uno::Reference< XIndirectTypeDescription >( + resolved, UNO_QUERY_THROW)->getReferencedType(); + } + return resolved; +} + com::sun::star::uno::Reference< XTypeDescription > createTypeDescription( const Sequence< sal_Int8 > & rData, const com::sun::star::uno::Reference< XHierarchicalNameAccess > & xNameAccess, @@ -493,9 +507,8 @@ com::sun::star::uno::Reference< XTypeDescription > createTypeDescription( '/', '.'); } return com::sun::star::uno::Reference< XTypeDescription >( - new CompoundTypeDescriptionImpl( - xNameAccess, TypeClass_STRUCT, aName, superTypeName, - rData)); + new stoc::registry_tdprovider::StructTypeDescription( + xNameAccess, aName, superTypeName, rData)); } case RT_TYPE_ENUM: |