From cc8bc8265e565bf981eefc73529e252264c03713 Mon Sep 17 00:00:00 2001 From: Vladimir Glazounov Date: Thu, 9 Oct 2003 09:23:58 +0000 Subject: 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. --- .../registry_tdprovider/rdbtdp_tdenumeration.cxx | 47 ++++++++++++++++++++-- 1 file changed, 44 insertions(+), 3 deletions(-) (limited to 'stoc/source') 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 @@ -316,6 +316,47 @@ TypeDescriptionEnumerationImpl::nextTypeDescription() static_cast< cppu::OWeakObject * >( this ) ); } +//========================================================================= +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() { @@ -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; -- cgit