diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2003-10-09 09:23:58 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2003-10-09 09:23:58 +0000 |
commit | cc8bc8265e565bf981eefc73529e252264c03713 (patch) | |
tree | 1ac301b46748b7886b8f9be75b8b7fffc0a10f28 /stoc | |
parent | 43cb0f4738f1e59cf57d957b26a44d4ffcc43702 (diff) |
INTEGRATION: CWS sb8 (1.2.68); FILE MERGED
2003/10/06 09:20:26 sb 1.2.68.2: RESYNC: (1.2-1.3); FILE MERGED
2003/09/03 10:37:17 sb 1.2.68.1: #112071# Fixed comparison of RTTypeClass with com.sun.star.uno.TypeClass.
Diffstat (limited to 'stoc')
-rw-r--r-- | stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx | 47 |
1 files changed, 44 insertions, 3 deletions
diff --git a/stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx b/stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx index 07a9b9141dc5..cd469d35268a 100644 --- a/stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx +++ b/stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx @@ -2,9 +2,9 @@ * * $RCSfile: rdbtdp_tdenumeration.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: obo $ $Date: 2003-09-04 09:07:44 $ + * last change: $Author: vg $ $Date: 2003-10-09 10:23:58 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -317,6 +317,47 @@ TypeDescriptionEnumerationImpl::nextTypeDescription() } //========================================================================= +bool TypeDescriptionEnumerationImpl::match( + RTTypeClass eType1, uno::TypeClass eType2 ) +{ + switch ( eType1 ) + { + case RT_TYPE_INTERFACE: + return eType2 == uno::TypeClass_INTERFACE; + + case RT_TYPE_MODULE: + return eType2 == uno::TypeClass_MODULE; + + case RT_TYPE_STRUCT: + return eType2 == uno::TypeClass_STRUCT; + + case RT_TYPE_ENUM: + return eType2 == uno::TypeClass_ENUM; + + case RT_TYPE_EXCEPTION: + return eType2 == uno::TypeClass_EXCEPTION; + + case RT_TYPE_TYPEDEF: + return eType2 == uno::TypeClass_TYPEDEF; + + case RT_TYPE_SERVICE: + return eType2 == uno::TypeClass_SERVICE; + + case RT_TYPE_SINGLETON: + return eType2 == uno::TypeClass_SINGLETON; + + case RT_TYPE_CONSTANTS: + return eType2 == uno::TypeClass_CONSTANTS; + + case RT_TYPE_UNION: + return eType2 == uno::TypeClass_UNION; + + default: + return false; + } +} + +//========================================================================= bool TypeDescriptionEnumerationImpl::queryMore() { osl::MutexGuard aGuard( m_aMutex ); @@ -384,7 +425,7 @@ bool TypeDescriptionEnumerationImpl::queryMore() m < m_aTypes.getLength(); ++m ) { - if ( m_aTypes[ m ] == eTypeClass ) + if ( match(eTypeClass, m_aTypes[ m ]) ) { bIncludeIt = true; break; |