Kaydet (Commit) 03b0fd3e authored tarafından Stephan Bergmann's avatar Stephan Bergmann

loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)

Change-Id: Ia3b2020e3f58e23e87a95d1fee0c76c8aba705ea
üst 7cf6736d
......@@ -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() )
......
......@@ -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(),
......
......@@ -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(),
......
......@@ -203,7 +203,7 @@ namespace dbtools
::comphelper::getNumberFormatProperty(
m_xFormatter,
nFormatKey,
OUString( "Locale" )
"Locale"
) >>= aFormatLocale;
// valid locale
......
......@@ -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"
......
......@@ -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;
......
......@@ -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))
......
......@@ -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())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment