summaryrefslogtreecommitdiff
path: root/connectivity/source/sdbcx
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2008-06-06 12:26:40 +0000
committerRüdiger Timm <rt@openoffice.org>2008-06-06 12:26:40 +0000
commitd6f572ef81943d388a0231e25d504ba04124e87b (patch)
tree5cb6503a5708c476c58513d3a0f1a9c2f17117e1 /connectivity/source/sdbcx
parent4e9cc1bae029b9ca471621b75590833afe0c5a37 (diff)
INTEGRATION: CWS dba30c (1.21.10); FILE MERGED
2008/05/09 07:07:16 oj 1.21.10.2: #i87131# collect keys only once, getKeys always refetch the keys 2008/05/05 10:57:51 oj 1.21.10.1: #i87131# collect keys only once, getKeys always refetch the keys
Diffstat (limited to 'connectivity/source/sdbcx')
-rw-r--r--connectivity/source/sdbcx/VTable.cxx12
1 files changed, 8 insertions, 4 deletions
diff --git a/connectivity/source/sdbcx/VTable.cxx b/connectivity/source/sdbcx/VTable.cxx
index bc232e665869..05ce12f6fc72 100644
--- a/connectivity/source/sdbcx/VTable.cxx
+++ b/connectivity/source/sdbcx/VTable.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: VTable.cxx,v $
- * $Revision: 1.21 $
+ * $Revision: 1.22 $
*
* This file is part of OpenOffice.org.
*
@@ -211,10 +211,14 @@ Reference< XIndexAccess > SAL_CALL OTable::getKeys( ) throw(RuntimeException)
::osl::MutexGuard aGuard(m_aMutex);
checkDisposed(OTableDescriptor_BASE::rBHelper.bDisposed);
+ Reference< XIndexAccess > xKeys;
+
try
{
- if(!m_pKeys)
- refreshKeys();
+ refreshKeys();
+ xKeys = m_pKeys;
+ if(!isNew())
+ m_pKeys = NULL;
}
catch( const RuntimeException& )
{
@@ -226,7 +230,7 @@ Reference< XIndexAccess > SAL_CALL OTable::getKeys( ) throw(RuntimeException)
// allowed
}
- return m_pKeys;
+ return xKeys;
}
// -----------------------------------------------------------------------------
cppu::IPropertyArrayHelper* OTable::createArrayHelper( sal_Int32 /*_nId*/ ) const