summaryrefslogtreecommitdiff
path: root/stoc/source/registry_tdprovider/tdcomp.cxx
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
commit970ee40f59407ca11045d5f7ebc83195ce0a5393 (patch)
tree18b82f250b25206147ace38f2d6c51f1584f8c02 /stoc/source/registry_tdprovider/tdcomp.cxx
parent22c7c3e67c5cdad139df9727b94ca9afbd6b8ce8 (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/registry_tdprovider/tdcomp.cxx')
-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 ad0aee2d7..47d77c8c6 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() );