summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-11-06 09:35:06 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-11-06 09:35:06 +0100
commit03b0fd3e5f8292d63db7d8db1032c1ecc369965c (patch)
tree726aac8b459e57a2c035ad3c7623ba7f2099d430 /connectivity
parent7cf6736df809f7e74815a60152c23a448c27a1fa (diff)
loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)
Change-Id: Ia3b2020e3f58e23e87a95d1fee0c76c8aba705ea
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/commontools/TColumnsHelper.cxx2
-rw-r--r--connectivity/source/commontools/dbtools.cxx4
-rw-r--r--connectivity/source/commontools/dbtools2.cxx2
-rw-r--r--connectivity/source/commontools/predicateinput.cxx2
-rw-r--r--connectivity/source/drivers/evoab2/NStatement.cxx2
-rw-r--r--connectivity/source/drivers/mork/MResultSet.cxx4
-rw-r--r--connectivity/source/parse/sqliterator.cxx4
-rw-r--r--connectivity/source/parse/sqlnode.cxx8
8 files changed, 14 insertions, 14 deletions
diff --git a/connectivity/source/commontools/TColumnsHelper.cxx b/connectivity/source/commontools/TColumnsHelper.cxx
index cf349818fc01..3a14693a934c 100644
--- a/connectivity/source/commontools/TColumnsHelper.cxx
+++ b/connectivity/source/commontools/TColumnsHelper.cxx
@@ -93,7 +93,7 @@ sdbcx::ObjectType OColumnsHelper::createObject(const OUString& _rName)
if ( aFind == m_pImpl->m_aColumnInfo.end() ) // we have to fill it
{
OUString sComposedName = ::dbtools::composeTableNameForSelect( xConnection, m_pTable );
- collectColumnInformation(xConnection,sComposedName,OUString("*") ,m_pImpl->m_aColumnInfo);
+ collectColumnInformation(xConnection,sComposedName,"*" ,m_pImpl->m_aColumnInfo);
aFind = m_pImpl->m_aColumnInfo.find(_rName);
}
if ( aFind != m_pImpl->m_aColumnInfo.end() )
diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx
index 553d29191b9c..feed005fd073 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -1298,8 +1298,8 @@ OUString composeTableName( const Reference< XDatabaseMetaData >& _rxMetaData,
OUString composeTableNameForSelect( const Reference< XConnection >& _rxConnection,
const OUString& _rCatalog, const OUString& _rSchema, const OUString& _rName )
{
- bool bUseCatalogInSelect = isDataSourcePropertyEnabled( _rxConnection, OUString( "UseCatalogInSelect" ), true );
- bool bUseSchemaInSelect = isDataSourcePropertyEnabled( _rxConnection, OUString( "UseSchemaInSelect" ), true );
+ bool bUseCatalogInSelect = isDataSourcePropertyEnabled( _rxConnection, "UseCatalogInSelect", true );
+ bool bUseSchemaInSelect = isDataSourcePropertyEnabled( _rxConnection, "UseSchemaInSelect", true );
return impl_doComposeTableName(
_rxConnection->getMetaData(),
diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx
index e8fc4fc05e00..97dd6d7c1d80 100644
--- a/connectivity/source/commontools/dbtools2.cxx
+++ b/connectivity/source/commontools/dbtools2.cxx
@@ -552,7 +552,7 @@ Reference<XPropertySet> createSDBCXColumn(const Reference<XPropertySet>& _xTable
xProp = lcl_createSDBCXColumn(xPrimaryKeyColumns,_xConnection,aCatalog, aSchema, aTable, _rName,_rName,_bCase,_bQueryForInfo,_bIsAutoIncrement,_bIsCurrency,_nDataType);
if ( !xProp.is() )
{
- xProp = lcl_createSDBCXColumn(xPrimaryKeyColumns,_xConnection,aCatalog, aSchema, aTable, OUString("%"),_rName,_bCase,_bQueryForInfo,_bIsAutoIncrement,_bIsCurrency,_nDataType);
+ xProp = lcl_createSDBCXColumn(xPrimaryKeyColumns,_xConnection,aCatalog, aSchema, aTable, "%",_rName,_bCase,_bQueryForInfo,_bIsAutoIncrement,_bIsCurrency,_nDataType);
if ( !xProp.is() )
xProp = new connectivity::sdbcx::OColumn(_rName,
OUString(),OUString(),OUString(),
diff --git a/connectivity/source/commontools/predicateinput.cxx b/connectivity/source/commontools/predicateinput.cxx
index c8c719406181..31e563511d0d 100644
--- a/connectivity/source/commontools/predicateinput.cxx
+++ b/connectivity/source/commontools/predicateinput.cxx
@@ -203,7 +203,7 @@ namespace dbtools
::comphelper::getNumberFormatProperty(
m_xFormatter,
nFormatKey,
- OUString( "Locale" )
+ "Locale"
) >>= aFormatLocale;
// valid locale
diff --git a/connectivity/source/drivers/evoab2/NStatement.cxx b/connectivity/source/drivers/evoab2/NStatement.cxx
index 79c6a2f61d43..77569c77a193 100644
--- a/connectivity/source/drivers/evoab2/NStatement.cxx
+++ b/connectivity/source/drivers/evoab2/NStatement.cxx
@@ -372,7 +372,7 @@ EBookQuery *OCommonStatement::whereAnalysis( const OSQLParseNode* parseTree )
{
// String containing only a '%' and nothing else matches everything
pResult = createTest( aColumnName, E_BOOK_QUERY_CONTAINS,
- OUString("") );
+ "" );
}
else if( aMatchString.indexOf( WILDCARD ) == -1 )
{ // Simple string , eg. "to match" "contains in evo"
diff --git a/connectivity/source/drivers/mork/MResultSet.cxx b/connectivity/source/drivers/mork/MResultSet.cxx
index c77543be77ab..4a6561caf997 100644
--- a/connectivity/source/drivers/mork/MResultSet.cxx
+++ b/connectivity/source/drivers/mork/MResultSet.cxx
@@ -981,12 +981,12 @@ void OResultSet::analyseWhereClause( const OSQLParseNode* parseT
sal_Int32 pos;
while ( (pos = matchString.indexOf ( WILDCARD )) != -1 )
{
- matchString = matchString.replaceAt( pos, 1, OUString(".*") );
+ matchString = matchString.replaceAt( pos, 1, ".*" );
}
while ( (pos = matchString.indexOf( MATCHCHAR )) != -1 )
{
- matchString = matchString.replaceAt( pos, 1, OUString(".") );
+ matchString = matchString.replaceAt( pos, 1, "." );
}
op = MQueryOp::RegExp;
diff --git a/connectivity/source/parse/sqliterator.cxx b/connectivity/source/parse/sqliterator.cxx
index e7faecfc987a..7dd6919baa72 100644
--- a/connectivity/source/parse/sqliterator.cxx
+++ b/connectivity/source/parse/sqliterator.cxx
@@ -936,7 +936,7 @@ bool OSQLParseTreeIterator::traverseSelectColumnNames(const OSQLParseNode* pSele
if (pSelectNode->getChild(2)->isRule() && SQL_ISPUNCTUATION(pSelectNode->getChild(2)->getChild(0),"*"))
{
// SELECT * ...
- setSelectColumnName(m_aSelectColumns,OUString("*"), aEmptyString,aEmptyString);
+ setSelectColumnName(m_aSelectColumns,"*", aEmptyString,aEmptyString);
}
else if (SQL_ISRULE(pSelectNode->getChild(2),scalar_exp_commalist))
{
@@ -956,7 +956,7 @@ bool OSQLParseTreeIterator::traverseSelectColumnNames(const OSQLParseNode* pSele
// All the table's columns
OUString aTableRange;
pColumnRef->getChild(0)->parseNodeToStr( aTableRange, m_pImpl->m_xConnection, NULL, false, false );
- setSelectColumnName(m_aSelectColumns,OUString("*"), aEmptyString,aTableRange);
+ setSelectColumnName(m_aSelectColumns,"*", aEmptyString,aTableRange);
continue;
}
else if (SQL_ISRULE(pColumnRef,derived_column))
diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx
index d03f97eecbb8..ac4f62bcdd1f 100644
--- a/connectivity/source/parse/sqlnode.cxx
+++ b/connectivity/source/parse/sqlnode.cxx
@@ -741,7 +741,7 @@ void OSQLParseNode::impl_parseLikeNodeToString_throw( OUStringBuffer& rString, c
{
OUString aStr = ConvertLikeToken(pParaNode, pEscNode, rParam.bInternational);
rString.append(" ");
- rString.append(SetQuotation(aStr,OUString("\'"),OUString("\'\'")));
+ rString.append(SetQuotation(aStr,"\'","\'\'"));
}
else
pParaNode->impl_parseNodeToString_throw( rString, aNewParam, false );
@@ -1004,7 +1004,7 @@ sal_Int16 OSQLParser::buildLikeRule(OSQLParseNode* pAppend, OSQLParseNode*& pLit
sal_Int16 nScale = 0;
try
{
- Any aValue = getNumberFormatProperty( m_xFormatter, m_nFormatKey, OUString("Decimals") );
+ Any aValue = getNumberFormatProperty( m_xFormatter, m_nFormatKey, "Decimals" );
aValue >>= nScale;
}
catch( Exception& )
@@ -1092,7 +1092,7 @@ OSQLParseNode* OSQLParser::buildNode_STR_NUM(OSQLParseNode*& _pLiteral)
sal_Int16 nScale = 0;
try
{
- Any aValue = getNumberFormatProperty( m_xFormatter, m_nFormatKey, OUString("Decimals") );
+ Any aValue = getNumberFormatProperty( m_xFormatter, m_nFormatKey, "Decimals" );
aValue >>= nScale;
}
catch( Exception& )
@@ -2437,7 +2437,7 @@ void OSQLParseNode::parseLeaf(OUStringBuffer& rString, const SQLParseNodeParamet
case SQL_NODE_STRING:
if (!rString.isEmpty())
rString.append(" ");
- rString.append(SetQuotation(m_aNodeValue,OUString("\'"),OUString("\'\'")));
+ rString.append(SetQuotation(m_aNodeValue,"\'","\'\'"));
break;
case SQL_NODE_NAME:
if (!rString.isEmpty())