diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-23 16:55:44 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-29 07:21:16 +0100 |
commit | 53d21a31435c6fc781fe34400e18abb34a6b04d8 (patch) | |
tree | 3e16fdab650fec1f1d2e7287c08fdc5f85037336 /connectivity/source/drivers | |
parent | 97b5bf4a39f33a3e51f1aa72339a5e88d1b9e9f3 (diff) |
loplugin:useuniqueptr in OCatalog
Change-Id: Ie06456ac8971494f64711cd70fd2b32a4dce719d
Reviewed-on: https://gerrit.libreoffice.org/48740
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity/source/drivers')
-rw-r--r-- | connectivity/source/drivers/ado/ACatalog.cxx | 8 | ||||
-rw-r--r-- | connectivity/source/drivers/calc/CCatalog.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/dbase/DCatalog.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/evoab2/NCatalog.cxx | 4 | ||||
-rw-r--r-- | connectivity/source/drivers/file/FCatalog.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/firebird/Catalog.cxx | 8 | ||||
-rw-r--r-- | connectivity/source/drivers/flat/ECatalog.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/hsqldb/HCatalog.cxx | 6 | ||||
-rw-r--r-- | connectivity/source/drivers/macab/MacabCatalog.cxx | 4 | ||||
-rw-r--r-- | connectivity/source/drivers/mork/MCatalog.cxx | 4 | ||||
-rw-r--r-- | connectivity/source/drivers/mysql/YCatalog.cxx | 6 | ||||
-rw-r--r-- | connectivity/source/drivers/writer/WCatalog.cxx | 2 |
12 files changed, 25 insertions, 25 deletions
diff --git a/connectivity/source/drivers/ado/ACatalog.cxx b/connectivity/source/drivers/ado/ACatalog.cxx index cb44200f7920..5e80bedbc031 100644 --- a/connectivity/source/drivers/ado/ACatalog.cxx +++ b/connectivity/source/drivers/ado/ACatalog.cxx @@ -69,7 +69,7 @@ void OCatalog::refreshTables() if(m_pTables) m_pTables->reFill(aVector); else - m_pTables = new OTables(this,m_aMutex,aVector,aTables,m_pConnection->getMetaData()->supportsMixedCaseQuotedIdentifiers()); + m_pTables.reset( new OTables(this,m_aMutex,aVector,aTables,m_pConnection->getMetaData()->supportsMixedCaseQuotedIdentifiers()) ); } void OCatalog::refreshViews() @@ -82,7 +82,7 @@ void OCatalog::refreshViews() if(m_pViews) m_pViews->reFill(aVector); else - m_pViews = new OViews(this,m_aMutex,aVector,aViews,m_pConnection->getMetaData()->supportsMixedCaseQuotedIdentifiers()); + m_pViews.reset( new OViews(this,m_aMutex,aVector,aViews,m_pConnection->getMetaData()->supportsMixedCaseQuotedIdentifiers()) ); } void OCatalog::refreshGroups() @@ -95,7 +95,7 @@ void OCatalog::refreshGroups() if(m_pGroups) m_pGroups->reFill(aVector); else - m_pGroups = new OGroups(this,m_aMutex,aVector,aGroups,m_pConnection->getMetaData()->supportsMixedCaseQuotedIdentifiers()); + m_pGroups.reset( new OGroups(this,m_aMutex,aVector,aGroups,m_pConnection->getMetaData()->supportsMixedCaseQuotedIdentifiers()) ); } void OCatalog::refreshUsers() @@ -108,7 +108,7 @@ void OCatalog::refreshUsers() if(m_pUsers) m_pUsers->reFill(aVector); else - m_pUsers = new OUsers(this,m_aMutex,aVector,aUsers,m_pConnection->getMetaData()->supportsMixedCaseQuotedIdentifiers()); + m_pUsers.reset( new OUsers(this,m_aMutex,aVector,aUsers,m_pConnection->getMetaData()->supportsMixedCaseQuotedIdentifiers()) ); } diff --git a/connectivity/source/drivers/calc/CCatalog.cxx b/connectivity/source/drivers/calc/CCatalog.cxx index 7ac5af5398d4..6853a5f9dbc3 100644 --- a/connectivity/source/drivers/calc/CCatalog.cxx +++ b/connectivity/source/drivers/calc/CCatalog.cxx @@ -53,7 +53,7 @@ void OCalcCatalog::refreshTables() if(m_pTables) m_pTables->reFill(aVector); else - m_pTables = new OCalcTables(m_xMetaData,*this,m_aMutex,aVector); + m_pTables.reset( new OCalcTables(m_xMetaData,*this,m_aMutex,aVector) ); // this avoids that the document will be loaded a 2nd time when one table will be accessed. //if ( m_pTables && m_pTables->hasElements() ) diff --git a/connectivity/source/drivers/dbase/DCatalog.cxx b/connectivity/source/drivers/dbase/DCatalog.cxx index 8bc06bb98141..c35af1f28e62 100644 --- a/connectivity/source/drivers/dbase/DCatalog.cxx +++ b/connectivity/source/drivers/dbase/DCatalog.cxx @@ -52,7 +52,7 @@ void ODbaseCatalog::refreshTables() if(m_pTables) m_pTables->reFill(aVector); else - m_pTables = new ODbaseTables(m_xMetaData,*this,m_aMutex,aVector); + m_pTables.reset( new ODbaseTables(m_xMetaData,*this,m_aMutex,aVector) ); } diff --git a/connectivity/source/drivers/evoab2/NCatalog.cxx b/connectivity/source/drivers/evoab2/NCatalog.cxx index 1d8c2924a081..fb010b8dce5d 100644 --- a/connectivity/source/drivers/evoab2/NCatalog.cxx +++ b/connectivity/source/drivers/evoab2/NCatalog.cxx @@ -58,7 +58,7 @@ void OEvoabCatalog::refreshTables() if(m_pTables) m_pTables->reFill(aVector); else - m_pTables = new OEvoabTables(m_xMetaData,*this,m_aMutex,aVector); + m_pTables.reset( new OEvoabTables(m_xMetaData,*this,m_aMutex,aVector) ); } // XTablesSupplier Reference< XNameAccess > SAL_CALL OEvoabCatalog::getTables( ) @@ -81,7 +81,7 @@ Reference< XNameAccess > SAL_CALL OEvoabCatalog::getTables( ) // allowed } - return m_pTables; + return m_pTables.get(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/file/FCatalog.cxx b/connectivity/source/drivers/file/FCatalog.cxx index fbac414461e6..d617fdbfd774 100644 --- a/connectivity/source/drivers/file/FCatalog.cxx +++ b/connectivity/source/drivers/file/FCatalog.cxx @@ -62,7 +62,7 @@ void OFileCatalog::refreshTables() if(m_pTables) m_pTables->reFill(aVector); else - m_pTables = new OTables(m_xMetaData,*this,m_aMutex,aVector); + m_pTables.reset( new OTables(m_xMetaData,*this,m_aMutex,aVector) ); } diff --git a/connectivity/source/drivers/firebird/Catalog.cxx b/connectivity/source/drivers/firebird/Catalog.cxx index 69329af63500..c9fc63486dc4 100644 --- a/connectivity/source/drivers/firebird/Catalog.cxx +++ b/connectivity/source/drivers/firebird/Catalog.cxx @@ -43,10 +43,10 @@ void Catalog::refreshTables() fillNames(xTables, aTableNames); if (!m_pTables) - m_pTables = new Tables(m_xConnection->getMetaData(), + m_pTables.reset( new Tables(m_xConnection->getMetaData(), *this, m_aMutex, - aTableNames); + aTableNames) ); else m_pTables->reFill(aTableNames); @@ -84,10 +84,10 @@ void Catalog::refreshUsers() } if (!m_pUsers) - m_pUsers = new Users(m_xConnection->getMetaData(), + m_pUsers.reset( new Users(m_xConnection->getMetaData(), *this, m_aMutex, - aUserNames); + aUserNames) ); else m_pUsers->reFill(aUserNames); } diff --git a/connectivity/source/drivers/flat/ECatalog.cxx b/connectivity/source/drivers/flat/ECatalog.cxx index 2317722501b5..b656b29c21b8 100644 --- a/connectivity/source/drivers/flat/ECatalog.cxx +++ b/connectivity/source/drivers/flat/ECatalog.cxx @@ -53,7 +53,7 @@ void OFlatCatalog::refreshTables() if(m_pTables) m_pTables->reFill(aVector); else - m_pTables = new OFlatTables(m_xMetaData,*this,m_aMutex,aVector); + m_pTables.reset( new OFlatTables(m_xMetaData,*this,m_aMutex,aVector) ); } diff --git a/connectivity/source/drivers/hsqldb/HCatalog.cxx b/connectivity/source/drivers/hsqldb/HCatalog.cxx index a96ee12bcc8c..9824ead35dc8 100644 --- a/connectivity/source/drivers/hsqldb/HCatalog.cxx +++ b/connectivity/source/drivers/hsqldb/HCatalog.cxx @@ -63,7 +63,7 @@ void OHCatalog::refreshTables() if ( m_pTables ) m_pTables->reFill(aVector); else - m_pTables = new OTables(m_xMetaData,*this,m_aMutex,aVector); + m_pTables.reset( new OTables(m_xMetaData,*this,m_aMutex,aVector) ); } void OHCatalog::refreshViews() @@ -94,7 +94,7 @@ void OHCatalog::refreshViews() if ( m_pViews ) m_pViews->reFill(aVector); else - m_pViews = new HViews( m_xConnection, *this, m_aMutex, aVector ); + m_pViews.reset( new HViews( m_xConnection, *this, m_aMutex, aVector ) ); } void OHCatalog::refreshGroups() @@ -118,7 +118,7 @@ void OHCatalog::refreshUsers() if(m_pUsers) m_pUsers->reFill(aVector); else - m_pUsers = new OUsers(*this,m_aMutex,aVector,m_xConnection,this); + m_pUsers.reset( new OUsers(*this,m_aMutex,aVector,m_xConnection,this) ); } Any SAL_CALL OHCatalog::queryInterface( const Type & rType ) diff --git a/connectivity/source/drivers/macab/MacabCatalog.cxx b/connectivity/source/drivers/macab/MacabCatalog.cxx index 7d613d8a007d..d972bb137cc7 100644 --- a/connectivity/source/drivers/macab/MacabCatalog.cxx +++ b/connectivity/source/drivers/macab/MacabCatalog.cxx @@ -62,7 +62,7 @@ void MacabCatalog::refreshTables() if (m_pTables) m_pTables->reFill(aVector); else - m_pTables = new MacabTables(m_xMetaData,*this,m_aMutex,aVector); + m_pTables.reset( new MacabTables(m_xMetaData,*this,m_aMutex,aVector) ); } void MacabCatalog::refreshViews() @@ -105,7 +105,7 @@ Reference< XNameAccess > SAL_CALL MacabCatalog::getTables( ) // allowed } - return m_pTables; + return m_pTables.get(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/mork/MCatalog.cxx b/connectivity/source/drivers/mork/MCatalog.cxx index 0322036f7f58..80eb293a5c02 100644 --- a/connectivity/source/drivers/mork/MCatalog.cxx +++ b/connectivity/source/drivers/mork/MCatalog.cxx @@ -59,7 +59,7 @@ void OCatalog::refreshTables() if(m_pTables) m_pTables->reFill(aVector); else - m_pTables = new OTables(m_xMetaData,*this,m_aMutex,aVector); + m_pTables.reset( new OTables(m_xMetaData,*this,m_aMutex,aVector) ); } void OCatalog::refreshViews() @@ -96,7 +96,7 @@ Reference< XNameAccess > SAL_CALL OCatalog::getTables( ) // allowed } - return m_pTables; + return m_pTables.get(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/mysql/YCatalog.cxx b/connectivity/source/drivers/mysql/YCatalog.cxx index 364c4ce80607..020085c9141a 100644 --- a/connectivity/source/drivers/mysql/YCatalog.cxx +++ b/connectivity/source/drivers/mysql/YCatalog.cxx @@ -64,7 +64,7 @@ void OMySQLCatalog::refreshTables() if ( m_pTables ) m_pTables->reFill(aVector); else - m_pTables = new OTables(m_xMetaData,*this,m_aMutex,aVector); + m_pTables.reset( new OTables(m_xMetaData,*this,m_aMutex,aVector) ); } void OMySQLCatalog::refreshViews() @@ -81,7 +81,7 @@ void OMySQLCatalog::refreshViews() if ( m_pViews ) m_pViews->reFill(aVector); else - m_pViews = new OViews(m_xMetaData,*this,m_aMutex,aVector); + m_pViews.reset( new OViews(m_xMetaData,*this,m_aMutex,aVector) ); } void OMySQLCatalog::refreshGroups() @@ -105,7 +105,7 @@ void OMySQLCatalog::refreshUsers() if(m_pUsers) m_pUsers->reFill(aVector); else - m_pUsers = new OUsers(*this,m_aMutex,aVector,m_xConnection,this); + m_pUsers.reset( new OUsers(*this,m_aMutex,aVector,m_xConnection,this) ); } Any SAL_CALL OMySQLCatalog::queryInterface( const Type & rType ) diff --git a/connectivity/source/drivers/writer/WCatalog.cxx b/connectivity/source/drivers/writer/WCatalog.cxx index 36b571c24c96..ce95004cc668 100644 --- a/connectivity/source/drivers/writer/WCatalog.cxx +++ b/connectivity/source/drivers/writer/WCatalog.cxx @@ -54,7 +54,7 @@ void OWriterCatalog::refreshTables() if (m_pTables) m_pTables->reFill(aVector); else - m_pTables = new OWriterTables(m_xMetaData, *this, m_aMutex, aVector); + m_pTables.reset( new OWriterTables(m_xMetaData, *this, m_aMutex, aVector) ); } } // namespace writer |