summaryrefslogtreecommitdiff
path: root/connectivity/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-12-13 11:10:10 +0200
committerNoel Grandin <noel@peralex.com>2013-12-17 11:49:04 +0200
commit8548abbac5139569818516ca198c8086f4d1fd1f (patch)
tree5bc09f193859dd63fbf2e3e602ab3b6667904e8c /connectivity/source
parent909b27df488f3c84ab8e5be9a7513a83b7c4b0c1 (diff)
Remove unnecessary use of OUString constructor in OUStringBuffer::append calls
Convert code like aStrBuffer.append(OUString(" AS ")); to aStrBuffer.append(" AS "); Change-Id: I8c1884b5a875f40f0b5e511b6ef38c6c8eeee656
Diffstat (limited to 'connectivity/source')
-rw-r--r--connectivity/source/commontools/dbtools2.cxx20
-rw-r--r--connectivity/source/parse/sqlnode.cxx2
2 files changed, 11 insertions, 11 deletions
diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx
index e208813c8d66..59f73496107f 100644
--- a/connectivity/source/commontools/dbtools2.cxx
+++ b/connectivity/source/commontools/dbtools2.cxx
@@ -156,7 +156,7 @@ OUString createStandardTypePart(const Reference< XPropertySet >& xColProp,const
OUString aDefault = ::comphelper::getString(xColProp->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_DEFAULTVALUE)));
if ( !aDefault.isEmpty() )
{
- aSql.append(OUString(" DEFAULT "));
+ aSql.append(" DEFAULT ");
aSql.append(sPreFix);
aSql.append(aDefault);
aSql.append(sPostFix);
@@ -188,7 +188,7 @@ OUString createStandardColumnPart(const Reference< XPropertySet >& xColProp,cons
aSql.append(createStandardTypePart(xColProp, _xConnection, _sCreatePattern));
if(::comphelper::getINT32(xColProp->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_ISNULLABLE))) == ColumnValue::NO_NULLS)
- aSql.append(OUString(" NOT NULL"));
+ aSql.append(" NOT NULL");
if ( bIsAutoIncrement && !sAutoIncrementValue.isEmpty())
{
@@ -221,7 +221,7 @@ OUString createStandardCreateStatement(const Reference< XPropertySet >& descript
::dbtools::throwFunctionSequenceException(_xConnection);
aSql.append(sComposedName);
- aSql.append(OUString(" ("));
+ aSql.append(" (");
// columns
Reference<XColumnsSupplier> xColumnSup(descriptor,UNO_QUERY);
@@ -301,7 +301,7 @@ OUString createStandardKeyStatement(const Reference< XPropertySet >& descriptor,
if(!xColumns.is() || !xColumns->getCount())
::dbtools::throwFunctionSequenceException(_xConnection);
- aSql.append(OUString(" PRIMARY KEY "));
+ aSql.append(" PRIMARY KEY ");
aSql.append(generateColumnNames(xColumns,xMetaData));
}
else if(nKeyType == KeyType::UNIQUE)
@@ -311,7 +311,7 @@ OUString createStandardKeyStatement(const Reference< XPropertySet >& descriptor,
if(!xColumns.is() || !xColumns->getCount())
::dbtools::throwFunctionSequenceException(_xConnection);
- aSql.append(OUString(" UNIQUE "));
+ aSql.append(" UNIQUE ");
aSql.append(generateColumnNames(xColumns,xMetaData));
}
else if(nKeyType == KeyType::FOREIGN)
@@ -323,7 +323,7 @@ OUString createStandardKeyStatement(const Reference< XPropertySet >& descriptor,
if(!xColumns.is() || !xColumns->getCount())
::dbtools::throwFunctionSequenceException(_xConnection);
- aSql.append(OUString(" FOREIGN KEY "));
+ aSql.append(" FOREIGN KEY ");
OUString sRefTable = getString(xColProp->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_REFERENCEDTABLE)));
::dbtools::qualifiedNameComponents(xMetaData,
sRefTable,
@@ -342,16 +342,16 @@ OUString createStandardKeyStatement(const Reference< XPropertySet >& descriptor,
switch(nDeleteRule)
{
case KeyRule::CASCADE:
- aSql.append(OUString(" ON DELETE CASCADE "));
+ aSql.append(" ON DELETE CASCADE ");
break;
case KeyRule::RESTRICT:
- aSql.append(OUString(" ON DELETE RESTRICT "));
+ aSql.append(" ON DELETE RESTRICT ");
break;
case KeyRule::SET_NULL:
- aSql.append(OUString(" ON DELETE SET NULL "));
+ aSql.append(" ON DELETE SET NULL ");
break;
case KeyRule::SET_DEFAULT:
- aSql.append(OUString(" ON DELETE SET DEFAULT "));
+ aSql.append(" ON DELETE SET DEFAULT ");
break;
default:
;
diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx
index c99585bd5e1e..4f56f30c1392 100644
--- a/connectivity/source/parse/sqlnode.cxx
+++ b/connectivity/source/parse/sqlnode.cxx
@@ -459,7 +459,7 @@ void OSQLParseNode::impl_parseNodeToString_throw(OUStringBuffer& rString, const
if (nCount == 2)
{
if ( rParam.aMetaData.generateASBeforeCorrelationName() )
- rString.append(OUString(" AS "));
+ rString.append(" AS ");
m_aChildren[1]->impl_parseNodeToString_throw( rString, rParam, false );
}
bHandled = true;