[Libreoffice-commits] core.git: codemaker/source connectivity/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Sat Apr 13 06:06:34 UTC 2019


 codemaker/source/cppumaker/cppuoptions.cxx                      |    3 +--
 codemaker/source/javamaker/javaoptions.cxx                      |    3 +--
 connectivity/source/commontools/RowFunctionParser.cxx           |    4 +---
 connectivity/source/commontools/TIndexes.cxx                    |    6 ++----
 connectivity/source/commontools/TTableHelper.cxx                |    3 +--
 connectivity/source/commontools/dbtools2.cxx                    |    6 ++----
 connectivity/source/drivers/evoab2/NStatement.cxx               |    3 +--
 connectivity/source/drivers/file/FDatabaseMetaData.cxx          |    3 +--
 connectivity/source/drivers/firebird/DatabaseMetaData.cxx       |    3 +--
 connectivity/source/drivers/firebird/StatementCommonBase.cxx    |    4 +---
 connectivity/source/drivers/jdbc/Timestamp.cxx                  |    9 +++------
 connectivity/source/drivers/mork/MorkParser.cxx                 |    6 ++----
 connectivity/source/drivers/mysql_jdbc/YDriver.cxx              |    3 +--
 connectivity/source/drivers/mysqlc/mysqlc_connection.cxx        |    6 ++----
 connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx |    3 +--
 connectivity/source/drivers/odbc/OResultSet.cxx                 |    3 +--
 connectivity/source/drivers/odbc/OTools.cxx                     |    6 ++----
 connectivity/source/drivers/postgresql/pq_xindex.cxx            |    8 ++------
 connectivity/source/drivers/postgresql/pq_xkey.cxx              |    8 ++------
 connectivity/source/drivers/postgresql/pq_xtable.cxx            |    8 ++------
 connectivity/source/drivers/postgresql/pq_xuser.cxx             |    4 +---
 connectivity/source/drivers/postgresql/pq_xview.cxx             |    4 +---
 22 files changed, 32 insertions(+), 74 deletions(-)

New commits:
commit ad4c8fed1b1b95fb502a011bb5fce5b8cb9d840d
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Apr 11 14:38:08 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Apr 13 08:06:01 2019 +0200

    loplugin:sequentialassign in codemaker..connectivity
    
    Change-Id: I9776431ebce95a88ae42715aaba2ddc28fb52471
    Reviewed-on: https://gerrit.libreoffice.org/70642
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/codemaker/source/cppumaker/cppuoptions.cxx b/codemaker/source/cppumaker/cppuoptions.cxx
index d9077dc43d7e..054e810ca084 100644
--- a/codemaker/source/cppumaker/cppuoptions.cxx
+++ b/codemaker/source/cppumaker/cppuoptions.cxx
@@ -124,8 +124,7 @@ bool CppuOptions::initOptions(int ac, char* av[], bool bCmdFile)
 
                     if (m_options.count("-T") > 0)
                     {
-                        OString tmp(m_options["-T"]);
-                        tmp = tmp + ";" + s;
+                        OString tmp = m_options["-T"] + ";" + s;
                         m_options["-T"] = tmp;
                     }
                     else
diff --git a/codemaker/source/javamaker/javaoptions.cxx b/codemaker/source/javamaker/javaoptions.cxx
index 2d583e51ac3f..6338e9472aa0 100644
--- a/codemaker/source/javamaker/javaoptions.cxx
+++ b/codemaker/source/javamaker/javaoptions.cxx
@@ -116,8 +116,7 @@ bool JavaOptions::initOptions(int ac, char* av[], bool bCmdFile)
 
                     if (m_options.count("-T") > 0)
                     {
-                        OString tmp(m_options["-T"]);
-                        tmp = tmp + ";" + s;
+                        OString tmp = m_options["-T"] + ";" + s;
                         m_options["-T"] = tmp;
                     } else
                     {
diff --git a/connectivity/source/commontools/RowFunctionParser.cxx b/connectivity/source/commontools/RowFunctionParser.cxx
index 0bf991deabd1..e93e7b01e424 100644
--- a/connectivity/source/commontools/RowFunctionParser.cxx
+++ b/connectivity/source/commontools/RowFunctionParser.cxx
@@ -411,11 +411,9 @@ std::shared_ptr<ExpressionNode> const & FunctionParser::parseFunction( const OUS
     StringIteratorT aStart( rAsciiFunction.getStr() );
     StringIteratorT aEnd( rAsciiFunction.getStr()+rAsciiFunction.getLength() );
 
-    ParserContextSharedPtr pContext;
-
     // static parser context, because the actual
     // Spirit parser is also a static object
-    pContext = getParserContext();
+    ParserContextSharedPtr pContext = getParserContext();
 
     ExpressionGrammar aExpressionGrammer( pContext );
 
diff --git a/connectivity/source/commontools/TIndexes.cxx b/connectivity/source/commontools/TIndexes.cxx
index 218bd441e907..a40d2c7fa5de 100644
--- a/connectivity/source/commontools/TIndexes.cxx
+++ b/connectivity/source/commontools/TIndexes.cxx
@@ -149,9 +149,8 @@ sdbcx::ObjectType OIndexesHelper::appendObject( const OUString& _rForName, const
 
         OUString aCatalog,aSchema,aTable;
         dbtools::qualifiedNameComponents(m_pTable->getMetaData(),m_pTable->getName(),aCatalog,aSchema,aTable,::dbtools::EComposeRule::InDataManipulation);
-        OUString aComposedName;
 
-        aComposedName = dbtools::composeTableName(m_pTable->getMetaData(),aCatalog,aSchema,aTable, true, ::dbtools::EComposeRule::InIndexDefinitions);
+        OUString aComposedName = dbtools::composeTableName(m_pTable->getMetaData(),aCatalog,aSchema,aTable, true, ::dbtools::EComposeRule::InIndexDefinitions);
         if (!_rForName.isEmpty() )
         {
             aSql.append( ::dbtools::quoteName( aQuote, _rForName ) );
@@ -231,8 +230,7 @@ void OIndexesHelper::dropObject(sal_Int32 /*_nPos*/,const OUString& _sElementNam
             OUString aSql( "DROP INDEX " );
 
             OUString aComposedName = dbtools::composeTableName( m_pTable->getMetaData(), m_pTable, ::dbtools::EComposeRule::InIndexDefinitions, true );
-            OUString sIndexName;
-            sIndexName = dbtools::composeTableName( m_pTable->getMetaData(), OUString(), aSchema, aName, true, ::dbtools::EComposeRule::InIndexDefinitions );
+            OUString sIndexName = dbtools::composeTableName( m_pTable->getMetaData(), OUString(), aSchema, aName, true, ::dbtools::EComposeRule::InIndexDefinitions );
 
             aSql += sIndexName + " ON " + aComposedName;
 
diff --git a/connectivity/source/commontools/TTableHelper.cxx b/connectivity/source/commontools/TTableHelper.cxx
index 9b380a673525..f9e91f180763 100644
--- a/connectivity/source/commontools/TTableHelper.cxx
+++ b/connectivity/source/commontools/TTableHelper.cxx
@@ -544,8 +544,7 @@ void SAL_CALL OTableHelper::alterColumnByIndex( sal_Int32 index, const Reference
 
 OUString SAL_CALL OTableHelper::getName()
 {
-    OUString sComposedName;
-    sComposedName = ::dbtools::composeTableName(getMetaData(),m_CatalogName,m_SchemaName,m_Name,false,::dbtools::EComposeRule::InDataManipulation);
+    OUString sComposedName = ::dbtools::composeTableName(getMetaData(),m_CatalogName,m_SchemaName,m_Name,false,::dbtools::EComposeRule::InDataManipulation);
     return sComposedName;
 }
 
diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx
index 39b1a7c2f373..bba4cd65bc33 100644
--- a/connectivity/source/commontools/dbtools2.cxx
+++ b/connectivity/source/commontools/dbtools2.cxx
@@ -436,8 +436,7 @@ namespace
                     {
                         const OUString sQuote = xMetaData->getIdentifierQuoteString();
                         OUString sQuotedName  = ::dbtools::quoteName(sQuote,_rName);
-                        OUString sComposedName;
-                        sComposedName = composeTableNameForSelect(_xConnection, getString( _aCatalog ), _aSchema, _aTable );
+                        OUString sComposedName = composeTableNameForSelect(_xConnection, getString( _aCatalog ), _aSchema, _aTable );
 
                         ColumnInformationMap aInfo(_bCase);
                         collectColumnInformation(_xConnection,sComposedName,sQuotedName,aInfo);
@@ -538,8 +537,7 @@ Reference<XPropertySet> createSDBCXColumn(const Reference<XPropertySet>& _xTable
         return xProp;
 
     ::dbtools::OPropertyMap& rPropMap = OMetaConnection::getPropMap();
-    Any aCatalog;
-    aCatalog = _xTable->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_CATALOGNAME));
+    Any aCatalog = _xTable->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_CATALOGNAME));
     OUString sCatalog;
     aCatalog >>= sCatalog;
 
diff --git a/connectivity/source/drivers/evoab2/NStatement.cxx b/connectivity/source/drivers/evoab2/NStatement.cxx
index b2c5fdb46c1c..ab44ad948a2f 100644
--- a/connectivity/source/drivers/evoab2/NStatement.cxx
+++ b/connectivity/source/drivers/evoab2/NStatement.cxx
@@ -358,8 +358,7 @@ EBookQuery *OCommonStatement::whereAnalysis( const OSQLParseNode* parseTree )
 
         const sal_Unicode WILDCARD = '%';
 
-        OUString aMatchString;
-        aMatchString = pAtom->getTokenValue();
+        OUString aMatchString = pAtom->getTokenValue();
 
         // Determine where '%' character is...
         if( aMatchString == OUStringLiteral1(WILDCARD) )
diff --git a/connectivity/source/drivers/file/FDatabaseMetaData.cxx b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
index 500a3034ec94..07dc4ed1e57c 100644
--- a/connectivity/source/drivers/file/FDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
@@ -202,8 +202,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables(
     pInfo[ 0 ].Ascending   = true;
 
     Reference < XAnyCompareFactory > xFactory;
-    Reference< XDynamicResultSet > xDynamicResultSet;
-    xDynamicResultSet = xSRSFac->createSortedDynamicResultSet( xContent, aSortInfo, xFactory );
+    Reference< XDynamicResultSet > xDynamicResultSet = xSRSFac->createSortedDynamicResultSet( xContent, aSortInfo, xFactory );
     Reference<XResultSet> xResultSet = xDynamicResultSet->getStaticResultSet();
 
     Reference<XRow> xRow(xResultSet,UNO_QUERY);
diff --git a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx
index f9d5c282a565..f9bd2a2546df 100644
--- a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx
+++ b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx
@@ -1469,9 +1469,8 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getImportedKeys(
     uno::Reference< XResultSet > xResultSet = pResultSet;
 
     uno::Reference< XStatement > statement = m_pConnection->createStatement();
-    OUString sSQL;
 
-    sSQL = "SELECT "
+    OUString sSQL = "SELECT "
            "RDB$REF_CONSTRAINTS.RDB$UPDATE_RULE, " // 1 update rule
            "RDB$REF_CONSTRAINTS.RDB$DELETE_RULE, " // 2 delete rule
            "RDB$REF_CONSTRAINTS.RDB$CONST_NAME_UQ, " // 3 primary or unique key name
diff --git a/connectivity/source/drivers/firebird/StatementCommonBase.cxx b/connectivity/source/drivers/firebird/StatementCommonBase.cxx
index 2bd91c5356cf..e7994cd21cad 100644
--- a/connectivity/source/drivers/firebird/StatementCommonBase.cxx
+++ b/connectivity/source/drivers/firebird/StatementCommonBase.cxx
@@ -138,9 +138,7 @@ void OStatementCommonBase::prepareAndDescribeStatement(const OUString& sql,
         pOutSqlda->sqln = 10;
     }
 
-    ISC_STATUS aErr = 0;
-
-    aErr = isc_dsql_allocate_statement(m_statusVector,
+    ISC_STATUS aErr = isc_dsql_allocate_statement(m_statusVector,
                                        &m_pConnection->getDBHandle(),
                                        &m_aStatementHandle);
 
diff --git a/connectivity/source/drivers/jdbc/Timestamp.cxx b/connectivity/source/drivers/jdbc/Timestamp.cxx
index 7d13a5065734..9338956377ec 100644
--- a/connectivity/source/drivers/jdbc/Timestamp.cxx
+++ b/connectivity/source/drivers/jdbc/Timestamp.cxx
@@ -35,8 +35,7 @@ java_sql_Date::java_sql_Date( const css::util::Date& _rOut ) : java_util_Date( n
         return;
     jvalue args[1];
     // Convert parameters
-    OUString sDateStr;
-    sDateStr = ::dbtools::DBTypeConversion::toDateString(_rOut);
+    OUString sDateStr = ::dbtools::DBTypeConversion::toDateString(_rOut);
     args[0].l = convertwchar_tToJavaString(t.pEnv,sDateStr);
 
     // Turn of Java-Call for the constructor
@@ -103,9 +102,8 @@ java_sql_Time::java_sql_Time( const css::util::Time& _rOut ): java_util_Date( nu
         return;
     jvalue args[1];
     // Convert parameters
-    OUString sDateStr;
     // java.sql.Time supports only whole seconds...
-    sDateStr = ::dbtools::DBTypeConversion::toTimeStringS(_rOut);
+    OUString sDateStr = ::dbtools::DBTypeConversion::toTimeStringS(_rOut);
     args[0].l = convertwchar_tToJavaString(t.pEnv,sDateStr);
 
     // Turn off Java-Call for the constructor
@@ -159,8 +157,7 @@ java_sql_Timestamp::java_sql_Timestamp(const css::util::DateTime& _rOut)
         return;
     jvalue args[1];
     // Convert parameters
-    OUString sDateStr;
-    sDateStr = ::dbtools::DBTypeConversion::toDateTimeString(_rOut);
+    OUString sDateStr = ::dbtools::DBTypeConversion::toDateTimeString(_rOut);
 
     args[0].l = convertwchar_tToJavaString(t.pEnv,sDateStr);
 
diff --git a/connectivity/source/drivers/mork/MorkParser.cxx b/connectivity/source/drivers/mork/MorkParser.cxx
index 60fec845815f..4d4c9a3bf6db 100644
--- a/connectivity/source/drivers/mork/MorkParser.cxx
+++ b/connectivity/source/drivers/mork/MorkParser.cxx
@@ -542,8 +542,7 @@ void MorkParser::parseMeta( char c )
 
 MorkTableMap *MorkParser::getTables( int TableScope )
 {
-    TableScopeMap::Map::iterator iter;
-    iter = mork_.map.find( TableScope );
+    TableScopeMap::Map::iterator iter = mork_.map.find( TableScope );
 
     if ( iter == mork_.map.end() )
     {
@@ -555,8 +554,7 @@ MorkTableMap *MorkParser::getTables( int TableScope )
 
 MorkRowMap *MorkParser::getRows( int RowScope, RowScopeMap *table )
 {
-    RowScopeMap::Map::iterator iter;
-    iter = table->map.find( RowScope );
+    RowScopeMap::Map::iterator iter = table->map.find( RowScope );
 
     if ( iter == table->map.end() )
     {
diff --git a/connectivity/source/drivers/mysql_jdbc/YDriver.cxx b/connectivity/source/drivers/mysql_jdbc/YDriver.cxx
index 1f6b595cec03..77906f6f3551 100644
--- a/connectivity/source/drivers/mysql_jdbc/YDriver.cxx
+++ b/connectivity/source/drivers/mysql_jdbc/YDriver.cxx
@@ -225,8 +225,7 @@ Reference<XConnection> SAL_CALL ODriverDelegator::connect(const OUString& url,
     Reference<XConnection> xConnection;
     if (acceptsURL(url))
     {
-        Reference<XDriver> xDriver;
-        xDriver = loadDriver(url, info);
+        Reference<XDriver> xDriver = loadDriver(url, info);
         if (xDriver.is())
         {
             OUString sCuttedUrl = transformUrl(url);
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_connection.cxx b/connectivity/source/drivers/mysqlc/mysqlc_connection.cxx
index dfe71b4d35a6..74613a733a3a 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_connection.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_connection.cxx
@@ -223,9 +223,8 @@ Reference<XStatement> SAL_CALL OConnection::createStatement()
     checkDisposed(OConnection_BASE::rBHelper.bDisposed);
 
     // create a statement
-    Reference<XStatement> xReturn;
     // the statement can only be executed once
-    xReturn = new OStatement(this);
+    Reference<XStatement> xReturn = new OStatement(this);
     m_aStatements.push_back(WeakReferenceHelper(xReturn));
 
     return xReturn;
@@ -246,8 +245,7 @@ Reference<XPreparedStatement> SAL_CALL OConnection::prepareStatement(const OUStr
         mysqlc_sdbc_driver::throwSQLExceptionWithMsg(mysql_error(&m_mysql), nErrorNum, *this,
                                                      getConnectionEncoding());
 
-    Reference<XPreparedStatement> xStatement;
-    xStatement = new OPreparedStatement(this, pStmt);
+    Reference<XPreparedStatement> xStatement = new OPreparedStatement(this, pStmt);
     m_aStatements.push_back(WeakReferenceHelper(xStatement));
     return xStatement;
 }
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx b/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx
index 9c04c75a6c06..e8c2fcda8a69 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx
@@ -219,8 +219,7 @@ Reference<XResultSet> SAL_CALL OPreparedStatement::executeQuery()
                                                      *this, m_xConnection->getConnectionEncoding());
     }
 
-    Reference<XResultSet> xResultSet;
-    xResultSet = new OPreparedResultSet(*m_xConnection, this, m_pStmt);
+    Reference<XResultSet> xResultSet = new OPreparedResultSet(*m_xConnection, this, m_pStmt);
     return xResultSet;
 }
 
diff --git a/connectivity/source/drivers/odbc/OResultSet.cxx b/connectivity/source/drivers/odbc/OResultSet.cxx
index ea89c75de684..8b5d7b82e477 100644
--- a/connectivity/source/drivers/odbc/OResultSet.cxx
+++ b/connectivity/source/drivers/odbc/OResultSet.cxx
@@ -1779,8 +1779,7 @@ void OResultSet::fillNeededData(SQLRETURN _nRet)
                 case DataType::LONGVARCHAR:
                 case DataType::CLOB:
                 {
-                    OUString sRet;
-                    sRet = m_aRow[nColumnIndex].getString();
+                    OUString sRet = m_aRow[nColumnIndex].getString();
                     OString aString(OUStringToOString(sRet,m_nTextEncoding));
                     N3SQLPutData (m_aStatementHandle, static_cast<SQLPOINTER>(const_cast<char *>(aString.getStr())), aString.getLength());
                     break;
diff --git a/connectivity/source/drivers/odbc/OTools.cxx b/connectivity/source/drivers/odbc/OTools.cxx
index b9d866ccc261..499abe791115 100644
--- a/connectivity/source/drivers/odbc/OTools.cxx
+++ b/connectivity/source/drivers/odbc/OTools.cxx
@@ -258,8 +258,7 @@ void OTools::bindValue( OConnection const * _pConnection,
                     /* see https://msdn.microsoft.com/en-us/library/ms716238%28v=vs.85%29.aspx
                      * for an explanation of that apparently weird cast */
                     _pData = reinterpret_cast<void*>(static_cast<uintptr_t>(columnIndex));
-                    sal_Int32 nLen = 0;
-                    nLen = static_cast<const css::uno::Sequence< sal_Int8 > *>(_pValue)->getLength();
+                    sal_Int32 nLen = static_cast<const css::uno::Sequence< sal_Int8 > *>(_pValue)->getLength();
                     *pLen = static_cast<SQLLEN>(SQL_LEN_DATA_AT_EXEC(nLen));
                 }
                     break;
@@ -268,8 +267,7 @@ void OTools::bindValue( OConnection const * _pConnection,
                     /* see https://msdn.microsoft.com/en-us/library/ms716238%28v=vs.85%29.aspx
                      * for an explanation of that apparently weird cast */
                     _pData = reinterpret_cast<void*>(static_cast<uintptr_t>(columnIndex));
-                    sal_Int32 nLen = 0;
-                    nLen = static_cast<OUString const *>(_pValue)->getLength();
+                    sal_Int32 nLen = static_cast<OUString const *>(_pValue)->getLength();
                     *pLen = static_cast<SQLLEN>(SQL_LEN_DATA_AT_EXEC(nLen));
                 }   break;
                 case SQL_DATE:
diff --git a/connectivity/source/drivers/postgresql/pq_xindex.cxx b/connectivity/source/drivers/postgresql/pq_xindex.cxx
index f906fe158b4b..825950014a2c 100644
--- a/connectivity/source/drivers/postgresql/pq_xindex.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xindex.cxx
@@ -113,9 +113,7 @@ Sequence< sal_Int8> Index::getImplementationId()
 
 Any Index::queryInterface( const Type & reqType )
 {
-    Any ret;
-
-    ret = ReflectionBase::queryInterface( reqType );
+    Any ret = ReflectionBase::queryInterface( reqType );
     if( ! ret.hasValue() )
         ret = ::cppu::queryInterface(
             reqType,
@@ -177,9 +175,7 @@ Sequence< sal_Int8> IndexDescriptor::getImplementationId()
 
 Any IndexDescriptor::queryInterface( const Type & reqType )
 {
-    Any ret;
-
-    ret = ReflectionBase::queryInterface( reqType );
+    Any ret = ReflectionBase::queryInterface( reqType );
     if( ! ret.hasValue() )
         ret = ::cppu::queryInterface(
             reqType,
diff --git a/connectivity/source/drivers/postgresql/pq_xkey.cxx b/connectivity/source/drivers/postgresql/pq_xkey.cxx
index 0f27449a32e2..67ba1d5cc18e 100644
--- a/connectivity/source/drivers/postgresql/pq_xkey.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xkey.cxx
@@ -115,9 +115,7 @@ Sequence< sal_Int8> Key::getImplementationId()
 
 Any Key::queryInterface( const Type & reqType )
 {
-    Any ret;
-
-    ret = ReflectionBase::queryInterface( reqType );
+    Any ret = ReflectionBase::queryInterface( reqType );
     if( ! ret.hasValue() )
         ret = ::cppu::queryInterface(
             reqType,
@@ -174,9 +172,7 @@ Sequence< sal_Int8> KeyDescriptor::getImplementationId()
 
 Any KeyDescriptor::queryInterface( const Type & reqType )
 {
-    Any ret;
-
-    ret = ReflectionBase::queryInterface( reqType );
+    Any ret = ReflectionBase::queryInterface( reqType );
     if( ! ret.hasValue() )
         ret = ::cppu::queryInterface(
             reqType,
diff --git a/connectivity/source/drivers/postgresql/pq_xtable.cxx b/connectivity/source/drivers/postgresql/pq_xtable.cxx
index 8c1c8f792d8e..bdc7ac719dcb 100644
--- a/connectivity/source/drivers/postgresql/pq_xtable.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xtable.cxx
@@ -278,9 +278,7 @@ Sequence< sal_Int8> Table::getImplementationId()
 
 Any Table::queryInterface( const Type & reqType )
 {
-    Any ret;
-
-    ret = ReflectionBase::queryInterface( reqType );
+    Any ret = ReflectionBase::queryInterface( reqType );
     if( ! ret.hasValue() )
         ret = ::cppu::queryInterface(
             reqType,
@@ -373,9 +371,7 @@ Sequence< sal_Int8> TableDescriptor::getImplementationId()
 
 Any TableDescriptor::queryInterface( const Type & reqType )
 {
-    Any ret;
-
-    ret = ReflectionBase::queryInterface( reqType );
+    Any ret = ReflectionBase::queryInterface( reqType );
     if( ! ret.hasValue() )
         ret = ::cppu::queryInterface(
             reqType,
diff --git a/connectivity/source/drivers/postgresql/pq_xuser.cxx b/connectivity/source/drivers/postgresql/pq_xuser.cxx
index 46d527f8bd73..e37d71ea062a 100644
--- a/connectivity/source/drivers/postgresql/pq_xuser.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xuser.cxx
@@ -96,9 +96,7 @@ Sequence< sal_Int8> User::getImplementationId()
 
 Any User::queryInterface( const Type & reqType )
 {
-    Any ret;
-
-    ret = ReflectionBase::queryInterface( reqType );
+    Any ret = ReflectionBase::queryInterface( reqType );
     if( ! ret.hasValue() )
         ret = ::cppu::queryInterface(
             reqType,
diff --git a/connectivity/source/drivers/postgresql/pq_xview.cxx b/connectivity/source/drivers/postgresql/pq_xview.cxx
index 6256c5b79704..97d2b0548493 100644
--- a/connectivity/source/drivers/postgresql/pq_xview.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xview.cxx
@@ -168,9 +168,7 @@ Sequence< sal_Int8> View::getImplementationId()
 
 Any View::queryInterface( const Type & reqType )
 {
-    Any ret;
-
-    ret = ReflectionBase::queryInterface( reqType );
+    Any ret = ReflectionBase::queryInterface( reqType );
     if( ! ret.hasValue() )
         ret = ::cppu::queryInterface(
             reqType,


More information about the Libreoffice-commits mailing list