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
This commit is contained in:
Rüdiger Timm
2008-06-06 12:26:40 +00:00
parent 4e9cc1bae0
commit d6f572ef81

View File

@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite * OpenOffice.org - a multi-platform office productivity suite
* *
* $RCSfile: VTable.cxx,v $ * $RCSfile: VTable.cxx,v $
* $Revision: 1.21 $ * $Revision: 1.22 $
* *
* This file is part of OpenOffice.org. * This file is part of OpenOffice.org.
* *
@@ -211,10 +211,14 @@ Reference< XIndexAccess > SAL_CALL OTable::getKeys( ) throw(RuntimeException)
::osl::MutexGuard aGuard(m_aMutex); ::osl::MutexGuard aGuard(m_aMutex);
checkDisposed(OTableDescriptor_BASE::rBHelper.bDisposed); checkDisposed(OTableDescriptor_BASE::rBHelper.bDisposed);
Reference< XIndexAccess > xKeys;
try try
{ {
if(!m_pKeys)
refreshKeys(); refreshKeys();
xKeys = m_pKeys;
if(!isNew())
m_pKeys = NULL;
} }
catch( const RuntimeException& ) catch( const RuntimeException& )
{ {
@@ -226,7 +230,7 @@ Reference< XIndexAccess > SAL_CALL OTable::getKeys( ) throw(RuntimeException)
// allowed // allowed
} }
return m_pKeys; return xKeys;
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
cppu::IPropertyArrayHelper* OTable::createArrayHelper( sal_Int32 /*_nId*/ ) const cppu::IPropertyArrayHelper* OTable::createArrayHelper( sal_Int32 /*_nId*/ ) const