diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2021-03-02 13:45:06 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2021-03-03 10:00:31 +0100 |
commit | 4f06d7cd74273e5691bb5a601452ea0e7eccffb3 (patch) | |
tree | 70579b220a08c8a11d790edec0bf6644b0073672 /connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx | |
parent | fd91c4937b942f7e28a1b6a30afddfb2abadfcf1 (diff) |
loplugin:refcounting (--enable-postgresql-sdbc)
Change-Id: I79a1d05be3a4e7a8e278665ff5863cdc4b182009
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111832
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx')
-rw-r--r-- | connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx b/connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx index a16d22d0cf2f..1e0039ecc6e1 100644 --- a/connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx +++ b/connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx @@ -43,6 +43,7 @@ #include <com/sun/star/sdbc/SQLException.hpp> #include <com/sun/star/sdbc/XRow.hpp> #include <cppuhelper/exc_hlp.hxx> +#include <rtl/ref.hxx> #include "pq_xcolumns.hxx" #include "pq_xindexcolumns.hxx" @@ -124,11 +125,11 @@ void IndexColumns::refresh() if( index >= m_columns.getLength() ) continue; - IndexColumn * pIndexColumn = + rtl::Reference<IndexColumn> pIndexColumn = new IndexColumn( m_xMutex, m_origin, m_pSettings ); Reference< css::beans::XPropertySet > prop = pIndexColumn; - columnMetaData2SDBCX( pIndexColumn, xRow ); + columnMetaData2SDBCX( pIndexColumn.get(), xRow ); pIndexColumn->setPropertyValue_NoBroadcast_public( st.IS_ASCENDING , makeAny( false ) ); @@ -234,12 +235,11 @@ Reference< css::container::XNameAccess > IndexColumns::create( const OUString &indexName, const Sequence< OUString > &columns ) { - IndexColumns *pIndexColumns = new IndexColumns( + rtl::Reference<IndexColumns> pIndexColumns = new IndexColumns( refMutex, origin, pSettings, schemaName, tableName, indexName, columns ); - Reference< css::container::XNameAccess > ret = pIndexColumns; pIndexColumns->refresh(); - return ret; + return pIndexColumns; } |