From d6f572ef81943d388a0231e25d504ba04124e87b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=BCdiger=20Timm?= Date: Fri, 6 Jun 2008 12:26:40 +0000 Subject: [PATCH] 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 --- connectivity/source/sdbcx/VTable.cxx | 12 ++++++++---- 1 file 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