diff options
Diffstat (limited to 'connectivity/source/sdbcx')
-rw-r--r-- | connectivity/source/sdbcx/VCatalog.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/sdbcx/VTable.cxx | 9 | ||||
-rw-r--r-- | connectivity/source/sdbcx/VView.cxx | 13 |
3 files changed, 9 insertions, 15 deletions
diff --git a/connectivity/source/sdbcx/VCatalog.cxx b/connectivity/source/sdbcx/VCatalog.cxx index 8d1a41a09c2d..ccafa9b9b516 100644 --- a/connectivity/source/sdbcx/VCatalog.cxx +++ b/connectivity/source/sdbcx/VCatalog.cxx @@ -226,7 +226,7 @@ void OCatalog::fillNames(Reference< XResultSet >& _xResult,TStringVector& _rName { _rNames.push_back( buildName(xRow) ); } - xRow = NULL; + xRow.clear(); ::comphelper::disposeComponent(_xResult); } } diff --git a/connectivity/source/sdbcx/VTable.cxx b/connectivity/source/sdbcx/VTable.cxx index 05ce12f6fc72..8725dfdd02b6 100644 --- a/connectivity/source/sdbcx/VTable.cxx +++ b/connectivity/source/sdbcx/VTable.cxx @@ -215,10 +215,9 @@ Reference< XIndexAccess > SAL_CALL OTable::getKeys( ) throw(RuntimeException) try { - refreshKeys(); + if ( !m_pKeys ) + refreshKeys(); xKeys = m_pKeys; - if(!isNew()) - m_pKeys = NULL; } catch( const RuntimeException& ) { @@ -283,8 +282,8 @@ void SAL_CALL OTable::rename( const ::rtl::OUString& newName ) throw(SQLExceptio ::osl::MutexGuard aGuard(m_aMutex); checkDisposed(OTableDescriptor_BASE::rBHelper.bDisposed); - ::rtl::OUString sOldComposedName = getName(); - Reference< XDatabaseMetaData> xMetaData = getMetaData(); + const ::rtl::OUString sOldComposedName = getName(); + const Reference< XDatabaseMetaData> xMetaData = getMetaData(); if ( xMetaData.is() ) ::dbtools::qualifiedNameComponents(xMetaData,newName,m_CatalogName,m_SchemaName,m_Name,::dbtools::eInDataManipulation); else diff --git a/connectivity/source/sdbcx/VView.cxx b/connectivity/source/sdbcx/VView.cxx index e7d2b6466241..448cddc434a0 100644 --- a/connectivity/source/sdbcx/VView.cxx +++ b/connectivity/source/sdbcx/VView.cxx @@ -53,7 +53,7 @@ OView::OView(sal_Bool _bCase, sal_Int32 _CheckOption, const ::rtl::OUString& _Command, const ::rtl::OUString& _SchemaName, - const ::rtl::OUString& _CatalogName) : ODescriptor(OViewHelper::rBHelper,_bCase) + const ::rtl::OUString& _CatalogName) : ODescriptor(::comphelper::OMutexAndBroadcastHelper::m_aBHelper,_bCase) ,m_CatalogName(_CatalogName) ,m_SchemaName(_SchemaName) ,m_Command(_Command) @@ -66,7 +66,7 @@ OView::OView(sal_Bool _bCase, } // ------------------------------------------------------------------------- OView::OView(sal_Bool _bCase,const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData >& _xMetaData) - : ODescriptor(OViewHelper::rBHelper,_bCase,sal_True) + : ODescriptor(::comphelper::OMutexAndBroadcastHelper::m_aBHelper,_bCase,sal_True) ,m_xMetaData(_xMetaData) { construct(); @@ -97,17 +97,12 @@ void OView::disposing(void) // ------------------------------------------------------------------------- Sequence< Type > SAL_CALL OView::getTypes( ) throw(RuntimeException) { - Sequence< Type > aTypes(2); - aTypes.getArray()[0] = ::getCppuType(static_cast< Reference< ::com::sun::star::container::XNamed> *> (NULL)); - aTypes.getArray()[1] = ::getCppuType(static_cast< Reference< XServiceInfo> *> (NULL)); - - return ::comphelper::concatSequences(ODescriptor::getTypes(),aTypes); + return ::comphelper::concatSequences(ODescriptor::getTypes(),OView_BASE::getTypes()); } // ------------------------------------------------------------------------- Any SAL_CALL OView::queryInterface( const Type & rType ) throw(RuntimeException) { - Any aRet = ::cppu::queryInterface(rType,static_cast< ::com::sun::star::container::XNamed*> (this), - static_cast< XServiceInfo*> (this)); + Any aRet = OView_BASE::queryInterface( rType); return aRet.hasValue() ? aRet : ODescriptor::queryInterface( rType); } // ------------------------------------------------------------------------- |