summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/adabas/BKeys.cxx
diff options
context:
space:
mode:
authorOcke Janssen <oj@openoffice.org>2001-10-18 12:24:06 +0000
committerOcke Janssen <oj@openoffice.org>2001-10-18 12:24:06 +0000
commit5436d2f8e4978f221079c0dc1a5e38b9570120d9 (patch)
tree495b6fa75641993eb7068e8d787646d70b27ef8c /connectivity/source/drivers/adabas/BKeys.cxx
parentf526487c8fb2815786e540773665e27caa87a291 (diff)
#93302# correct getTypes
Diffstat (limited to 'connectivity/source/drivers/adabas/BKeys.cxx')
-rw-r--r--connectivity/source/drivers/adabas/BKeys.cxx16
1 files changed, 7 insertions, 9 deletions
diff --git a/connectivity/source/drivers/adabas/BKeys.cxx b/connectivity/source/drivers/adabas/BKeys.cxx
index fca7aa2865..01ec048ab0 100644
--- a/connectivity/source/drivers/adabas/BKeys.cxx
+++ b/connectivity/source/drivers/adabas/BKeys.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: BKeys.cxx,v $
*
- * $Revision: 1.15 $
+ * $Revision: 1.16 $
*
- * last change: $Author: oj $ $Date: 2001-10-12 11:39:41 $
+ * last change: $Author: oj $ $Date: 2001-10-18 13:18:04 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -116,17 +116,15 @@ Sequence< Type > SAL_CALL OKeys::getTypes( ) throw(RuntimeException)
Type* pBegin = aTypes.getArray();
Type* pEnd = pBegin + aTypes.getLength();
- Sequence< Type > aRetType(aTypes.getLength()-1);
- sal_Int32 i=0;
+ ::std::vector<Type> aOwnTypes;
+ aOwnTypes.reserve(aTypes.getLength());
for(;pBegin != pEnd; ++pBegin)
{
if(*pBegin != ::getCppuType(static_cast< Reference<XNameAccess> *>(NULL)))
- {
- aRetType.getArray()[i++] = *pBegin;
- }
+ aOwnTypes.push_back(*pBegin);
}
-
- return aRetType;
+
+ return Sequence< Type >(aOwnTypes.begin(),aOwnTypes.size());
}
// -------------------------------------------------------------------------
Reference< XNamed > OKeys::createObject(const ::rtl::OUString& _rName)