diff options
author | Noel Grandin <noel@peralex.com> | 2015-11-02 15:04:05 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-11-02 15:04:05 +0200 |
commit | c7e36de2389bc60036160f4c13e5c4f7fd3673c1 (patch) | |
tree | fc892c037dcfe50239cf84a5a26547715730f75d /connectivity | |
parent | 7408498de37be05159f84cf0c8116313d3c196df (diff) |
loplugin:stringconstant
Change-Id: I736e0d63ed891aee1582844aff25b9bdacab8db9
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/commontools/TTableHelper.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/commontools/dbtools.cxx | 9 | ||||
-rw-r--r-- | connectivity/source/commontools/dbtools2.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/calc/CCatalog.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/calc/CConnection.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/dbase/DCatalog.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/file/FCatalog.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/file/FTable.cxx | 2 | ||||
-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/hsqldb/HConnection.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/hsqldb/HDriver.cxx | 8 | ||||
-rw-r--r-- | connectivity/source/drivers/hsqldb/HUser.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/mork/MCatalog.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/mysql/YCatalog.cxx | 6 | ||||
-rw-r--r-- | connectivity/source/drivers/mysql/YUser.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/manager/mdrivermanager.cxx | 2 |
17 files changed, 26 insertions, 29 deletions
diff --git a/connectivity/source/commontools/TTableHelper.cxx b/connectivity/source/commontools/TTableHelper.cxx index d54dffe67a06..b33f6bf49f0d 100644 --- a/connectivity/source/commontools/TTableHelper.cxx +++ b/connectivity/source/commontools/TTableHelper.cxx @@ -271,7 +271,7 @@ void OTableHelper::refreshColumns() aCatalog, m_SchemaName, m_Name, - OUString("%") + "%" ) ); // collect the column names, together with their ordinal position diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx index 3380879e2876..553d29191b9c 100644 --- a/connectivity/source/commontools/dbtools.cxx +++ b/connectivity/source/commontools/dbtools.cxx @@ -439,7 +439,7 @@ SharedConnection lcl_connectRowSet(const Reference< XRowSet>& _rxRowSet, const R } else xRowSetProps->setPropertyValue( - OUString( "ActiveConnection" ), + "ActiveConnection", makeAny( xConnection.getTyped() ) ); } @@ -655,7 +655,7 @@ Reference< XNameAccess > getFieldsByCommandDescriptor( const Reference< XConnect // Now set the filter to a dummy restriction which will result in an empty // result set. - xComposer->setFilter( OUString( "0=1" ) ); + xComposer->setFilter( "0=1" ); sStatementToExecute = xComposer->getQuery( ); } } @@ -678,10 +678,7 @@ Reference< XNameAccess > getFieldsByCommandDescriptor( const Reference< XConnect try { if ( xStatementProps.is() ) - xStatementProps->setPropertyValue( - OUString( "MaxRows" ), - makeAny( sal_Int32( 0 ) ) - ); + xStatementProps->setPropertyValue( "MaxRows", makeAny( sal_Int32( 0 ) ) ); } catch( const Exception& ) { diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx index c59a5513e491..e8fc4fc05e00 100644 --- a/connectivity/source/commontools/dbtools2.cxx +++ b/connectivity/source/commontools/dbtools2.cxx @@ -751,7 +751,7 @@ sal_Int32 getTablePrivileges(const Reference< XDatabaseMetaData>& _xMetaData, // Some drivers put a table privilege as soon as any column has the privilege, // some drivers only if all columns have the privilege. // To unify the situation, collect column privileges here, too. - Reference< XResultSet > xColumnPrivileges = _xMetaData->getColumnPrivileges(aVal, _sSchema, _sTable, OUString("%")); + Reference< XResultSet > xColumnPrivileges = _xMetaData->getColumnPrivileges(aVal, _sSchema, _sTable, "%"); Reference< XRow > xColumnCurrentRow(xColumnPrivileges, UNO_QUERY); if ( xColumnCurrentRow.is() ) { diff --git a/connectivity/source/drivers/calc/CCatalog.cxx b/connectivity/source/drivers/calc/CCatalog.cxx index 36b3bfc23566..203e8709751b 100644 --- a/connectivity/source/drivers/calc/CCatalog.cxx +++ b/connectivity/source/drivers/calc/CCatalog.cxx @@ -42,7 +42,7 @@ void OCalcCatalog::refreshTables() Sequence< OUString > aTypes; OCalcConnection::ODocHolder aDocHolder(static_cast<OCalcConnection*>(m_pConnection)); Reference< XResultSet > xResult = m_xMetaData->getTables(Any(), - OUString("%"),OUString("%"),aTypes); + "%", "%", aTypes); if(xResult.is()) { diff --git a/connectivity/source/drivers/calc/CConnection.cxx b/connectivity/source/drivers/calc/CConnection.cxx index 71a3c9748ffa..245aefcf9a1c 100644 --- a/connectivity/source/drivers/calc/CConnection.cxx +++ b/connectivity/source/drivers/calc/CConnection.cxx @@ -131,7 +131,7 @@ Reference< XSpreadsheetDocument> OCalcConnection::acquireDoc() try { xComponent = xDesktop->loadComponentFromURL( - m_aFileName, OUString("_blank"), 0, aArgs ); + m_aFileName, "_blank", 0, aArgs ); } catch( const Exception& ) { diff --git a/connectivity/source/drivers/dbase/DCatalog.cxx b/connectivity/source/drivers/dbase/DCatalog.cxx index 4ff0d83c65c2..0c107885edb5 100644 --- a/connectivity/source/drivers/dbase/DCatalog.cxx +++ b/connectivity/source/drivers/dbase/DCatalog.cxx @@ -41,7 +41,7 @@ void ODbaseCatalog::refreshTables() TStringVector aVector; Sequence< OUString > aTypes; Reference< XResultSet > xResult = m_xMetaData->getTables(Any(), - OUString("%"),OUString("%"),aTypes); + "%", "%", aTypes); if(xResult.is()) { diff --git a/connectivity/source/drivers/file/FCatalog.cxx b/connectivity/source/drivers/file/FCatalog.cxx index 24cc23086efd..9d9564ba7de1 100644 --- a/connectivity/source/drivers/file/FCatalog.cxx +++ b/connectivity/source/drivers/file/FCatalog.cxx @@ -56,7 +56,7 @@ void OFileCatalog::refreshTables() TStringVector aVector; Sequence< OUString > aTypes; Reference< XResultSet > xResult = m_xMetaData->getTables(Any(), - OUString("%"),OUString("%"),aTypes); + "%", "%", aTypes); fillNames(xResult,aVector); if(m_pTables) diff --git a/connectivity/source/drivers/file/FTable.cxx b/connectivity/source/drivers/file/FTable.cxx index 0ef5189eeb95..666e902f934d 100644 --- a/connectivity/source/drivers/file/FTable.cxx +++ b/connectivity/source/drivers/file/FTable.cxx @@ -80,7 +80,7 @@ void OFileTable::refreshColumns() { TStringVector aVector; Reference< XResultSet > xResult = m_pConnection->getMetaData()->getColumns(Any(), - m_SchemaName,m_Name, OUString("%")); + m_SchemaName,m_Name, "%"); if(xResult.is()) { diff --git a/connectivity/source/drivers/flat/ECatalog.cxx b/connectivity/source/drivers/flat/ECatalog.cxx index b686c40458e8..1b3e227be816 100644 --- a/connectivity/source/drivers/flat/ECatalog.cxx +++ b/connectivity/source/drivers/flat/ECatalog.cxx @@ -42,7 +42,7 @@ void OFlatCatalog::refreshTables() TStringVector aVector; Sequence< OUString > aTypes; Reference< XResultSet > xResult = m_xMetaData->getTables(Any(), - OUString("%"),OUString("%"),aTypes); + "%", "%", aTypes); if(xResult.is()) { diff --git a/connectivity/source/drivers/hsqldb/HCatalog.cxx b/connectivity/source/drivers/hsqldb/HCatalog.cxx index 09e55a238e4a..d02033edcc86 100644 --- a/connectivity/source/drivers/hsqldb/HCatalog.cxx +++ b/connectivity/source/drivers/hsqldb/HCatalog.cxx @@ -44,8 +44,8 @@ OHCatalog::OHCatalog(const Reference< XConnection >& _xConnection) : sdbcx::OCat void OHCatalog::refreshObjects(const Sequence< OUString >& _sKindOfObject,TStringVector& _rNames) { Reference< XResultSet > xResult = m_xMetaData->getTables(Any(), - OUString("%"), - OUString("%"), + "%", + "%", _sKindOfObject); fillNames(xResult,_rNames); } @@ -108,7 +108,7 @@ void OHCatalog::refreshUsers() { TStringVector aVector; Reference< XStatement > xStmt = m_xConnection->createStatement( ); - Reference< XResultSet > xResult = xStmt->executeQuery(OUString("select User from hsqldb.user group by User")); + Reference< XResultSet > xResult = xStmt->executeQuery("select User from hsqldb.user group by User"); if ( xResult.is() ) { Reference< XRow > xRow(xResult,UNO_QUERY); diff --git a/connectivity/source/drivers/hsqldb/HConnection.cxx b/connectivity/source/drivers/hsqldb/HConnection.cxx index 89bf6b5a1ac5..2a3c68a06467 100644 --- a/connectivity/source/drivers/hsqldb/HConnection.cxx +++ b/connectivity/source/drivers/hsqldb/HConnection.cxx @@ -155,7 +155,7 @@ namespace connectivity { namespace hsqldb if ( !m_bReadOnly ) { Reference< XStatement > xStmt( m_xConnection->createStatement(), UNO_QUERY_THROW ); - xStmt->execute( OUString( "CHECKPOINT DEFRAG" ) ); + xStmt->execute( "CHECKPOINT DEFRAG" ); } } catch(const Exception& ) diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx index 2e4c7560a28d..ade5ae0d74cf 100644 --- a/connectivity/source/drivers/hsqldb/HDriver.cxx +++ b/connectivity/source/drivers/hsqldb/HDriver.cxx @@ -536,12 +536,12 @@ namespace connectivity Reference<XStatement> xStmt = _xConnection->createStatement(); if ( xStmt.is() ) { - Reference<XResultSet> xRes(xStmt->executeQuery(OUString("SELECT COUNT(*) FROM INFORMATION_SCHEMA.SYSTEM_SESSIONS WHERE USER_NAME ='SA'")),UNO_QUERY); + Reference<XResultSet> xRes(xStmt->executeQuery("SELECT COUNT(*) FROM INFORMATION_SCHEMA.SYSTEM_SESSIONS WHERE USER_NAME ='SA'"), UNO_QUERY); Reference<XRow> xRow(xRes,UNO_QUERY); if ( xRow.is() && xRes->next() ) bLastOne = xRow->getInt(1) == 1; if ( bLastOne ) - xStmt->execute(OUString("SHUTDOWN")); + xStmt->execute("SHUTDOWN"); } } } @@ -652,7 +652,7 @@ namespace connectivity Reference< XStatement> xStmt = xConnection->createStatement(); OSL_ENSURE( xStmt.is(), "ODriverDelegator::preCommit: no statement!" ); if ( xStmt.is() ) - xStmt->execute( OUString( "SET WRITE_DELAY 0" ) ); + xStmt->execute( "SET WRITE_DELAY 0" ); bool bPreviousAutoCommit = xConnection->getAutoCommit(); xConnection->setAutoCommit( sal_False ); @@ -660,7 +660,7 @@ namespace connectivity xConnection->setAutoCommit( bPreviousAutoCommit ); if ( xStmt.is() ) - xStmt->execute( OUString( "SET WRITE_DELAY 60" ) ); + xStmt->execute( "SET WRITE_DELAY 60" ); } } catch(Exception&) diff --git a/connectivity/source/drivers/hsqldb/HUser.cxx b/connectivity/source/drivers/hsqldb/HUser.cxx index 25e0ccd8ee6b..7a45a51892fa 100644 --- a/connectivity/source/drivers/hsqldb/HUser.cxx +++ b/connectivity/source/drivers/hsqldb/HUser.cxx @@ -112,7 +112,7 @@ void OHSQLUser::findPrivilegesAndGrantPrivileges(const OUString& objName, sal_In Any aCatalog; if ( !sCatalog.isEmpty() ) aCatalog <<= sCatalog; - xRes = xMeta->getColumnPrivileges(aCatalog,sSchema,sTable,OUString("%")); + xRes = xMeta->getColumnPrivileges(aCatalog,sSchema,sTable,"%"); } break; } diff --git a/connectivity/source/drivers/mork/MCatalog.cxx b/connectivity/source/drivers/mork/MCatalog.cxx index 88d4c2065730..9a4e935854bb 100644 --- a/connectivity/source/drivers/mork/MCatalog.cxx +++ b/connectivity/source/drivers/mork/MCatalog.cxx @@ -53,7 +53,7 @@ void OCatalog::refreshTables() Sequence< OUString > aTypes(1); aTypes[0] = "%"; Reference< XResultSet > xResult = m_xMetaData->getTables(Any(), - OUString("%"),OUString("%"),aTypes); + "%", "%", aTypes); if(xResult.is()) { diff --git a/connectivity/source/drivers/mysql/YCatalog.cxx b/connectivity/source/drivers/mysql/YCatalog.cxx index 78016434d66d..ab79da8582d1 100644 --- a/connectivity/source/drivers/mysql/YCatalog.cxx +++ b/connectivity/source/drivers/mysql/YCatalog.cxx @@ -45,8 +45,8 @@ OMySQLCatalog::OMySQLCatalog(const Reference< XConnection >& _xConnection) : OCa void OMySQLCatalog::refreshObjects(const Sequence< OUString >& _sKindOfObject,TStringVector& _rNames) { Reference< XResultSet > xResult = m_xMetaData->getTables(Any(), - OUString("%"), - OUString("%"), + "%", + "%", _sKindOfObject); fillNames(xResult,_rNames); } @@ -100,7 +100,7 @@ void OMySQLCatalog::refreshUsers() { TStringVector aVector; Reference< XStatement > xStmt = m_xConnection->createStatement( ); - Reference< XResultSet > xResult = xStmt->executeQuery(OUString("SELECT grantee FROM information_schema.user_privileges GROUP BY grantee")); + Reference< XResultSet > xResult = xStmt->executeQuery("SELECT grantee FROM information_schema.user_privileges GROUP BY grantee"); if ( xResult.is() ) { Reference< XRow > xRow(xResult,UNO_QUERY); diff --git a/connectivity/source/drivers/mysql/YUser.cxx b/connectivity/source/drivers/mysql/YUser.cxx index 6c9a4660720a..2e57ff22ec0e 100644 --- a/connectivity/source/drivers/mysql/YUser.cxx +++ b/connectivity/source/drivers/mysql/YUser.cxx @@ -112,7 +112,7 @@ void OMySQLUser::findPrivilegesAndGrantPrivileges(const OUString& objName, sal_I Any aCatalog; if ( !sCatalog.isEmpty() ) aCatalog <<= sCatalog; - xRes = xMeta->getColumnPrivileges(aCatalog,sSchema,sTable,OUString("%")); + xRes = xMeta->getColumnPrivileges(aCatalog,sSchema,sTable, "%"); } break; } diff --git a/connectivity/source/manager/mdrivermanager.cxx b/connectivity/source/manager/mdrivermanager.cxx index a9fec0564e10..cddcf29630d8 100644 --- a/connectivity/source/manager/mdrivermanager.cxx +++ b/connectivity/source/manager/mdrivermanager.cxx @@ -47,7 +47,7 @@ using namespace ::com::sun::star::container; using namespace ::com::sun::star::logging; using namespace ::osl; -#define SERVICE_SDBC_DRIVER OUString("com.sun.star.sdbc.Driver") +#define SERVICE_SDBC_DRIVER "com.sun.star.sdbc.Driver" void throwNoSuchElementException() throw(NoSuchElementException) { |