summaryrefslogtreecommitdiff
path: root/stoc/source
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2004-06-04 01:33:08 +0000
committerOliver Bolte <obo@openoffice.org>2004-06-04 01:33:08 +0000
commit7aaea761f568dc8c393c8ac7cc74fef910a2169d (patch)
treee9104221f4fb9b1cc4e7b088e0d4cc8e7cb89837 /stoc/source
parent14425cca49ac02e0842b57a182476688f13cf400 (diff)
INTEGRATION: CWS sb18 (1.8.4); FILE MERGED
2004/04/14 07:59:27 sb 1.8.4.1: #i21150# Added support for polymorphic struct types.
Diffstat (limited to 'stoc/source')
-rw-r--r--stoc/source/registry_tdprovider/tdcomp.cxx43
1 files changed, 33 insertions, 10 deletions
diff --git a/stoc/source/registry_tdprovider/tdcomp.cxx b/stoc/source/registry_tdprovider/tdcomp.cxx
index e66e3a5f5607..36c30fd9e589 100644
--- a/stoc/source/registry_tdprovider/tdcomp.cxx
+++ b/stoc/source/registry_tdprovider/tdcomp.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: tdcomp.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: rt $ $Date: 2004-03-30 16:15:57 $
+ * last change: $Author: obo $ $Date: 2004-06-04 02:33:08 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -118,6 +118,25 @@ Reference< XTypeDescription > CompoundTypeDescriptionImpl::getBaseType()
return _xBaseTD;
}
//__________________________________________________________________________________________________
+
+namespace {
+
+class TypeParameter: public WeakImplHelper1< XTypeDescription > {
+public:
+ explicit TypeParameter(OUString const & name): m_name(name) {}
+
+ virtual TypeClass SAL_CALL getTypeClass() throw (RuntimeException)
+ { return TypeClass_UNKNOWN; }
+
+ virtual OUString SAL_CALL getName() throw (RuntimeException)
+ { return m_name; }
+
+private:
+ OUString m_name;
+};
+
+}
+
Sequence< Reference< XTypeDescription > > CompoundTypeDescriptionImpl::getMemberTypes()
throw(::com::sun::star::uno::RuntimeException)
{
@@ -134,16 +153,20 @@ Sequence< Reference< XTypeDescription > > CompoundTypeDescriptionImpl::getMember
while (nFields--)
{
- try
- {
- _xTDMgr->getByHierarchicalName(
- aReader.getFieldTypeName( nFields ).replace( '/', '.' ) )
- >>= pMembers[nFields];
- }
- catch (NoSuchElementException &)
+ if ((aReader.getFieldFlags(nFields) & RT_ACCESS_PARAMETERIZED_TYPE)
+ != 0)
{
+ pMembers[nFields] = new TypeParameter(
+ aReader.getFieldTypeName(nFields));
+ } else {
+ try {
+ _xTDMgr->getByHierarchicalName(
+ aReader.getFieldTypeName(nFields).replace('/', '.'))
+ >>= pMembers[nFields];
+ } catch (NoSuchElementException &) {}
+ OSL_ENSURE(
+ pMembers[nFields].is(), "### compound member unknown!");
}
- OSL_ENSURE( pMembers[nFields].is(), "### compound member unknown!" );
}
ClearableMutexGuard aGuard( getMutex() );