summaryrefslogtreecommitdiff
path: root/connectivity/source/commontools
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity/source/commontools')
-rw-r--r--connectivity/source/commontools/TTableHelper.cxx3
-rw-r--r--connectivity/source/commontools/dbtools2.cxx10
2 files changed, 6 insertions, 7 deletions
diff --git a/connectivity/source/commontools/TTableHelper.cxx b/connectivity/source/commontools/TTableHelper.cxx
index 6c7cd5f5aafc..92447c8e94db 100644
--- a/connectivity/source/commontools/TTableHelper.cxx
+++ b/connectivity/source/commontools/TTableHelper.cxx
@@ -448,12 +448,11 @@ void OTableHelper::refreshIndexes()
if(xResult.is())
{
Reference< XRow > xRow(xResult,UNO_QUERY);
- OUString aName;
OUString sCatalogSep = getMetaData()->getCatalogSeparator();
OUString sPreviousRoundName;
while( xResult->next() )
{
- aName = xRow->getString(5);
+ OUString aName = xRow->getString(5);
if(!aName.isEmpty())
aName += sCatalogSep;
aName += xRow->getString(6);
diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx
index 5faf1146e67e..cd09553e06df 100644
--- a/connectivity/source/commontools/dbtools2.cxx
+++ b/connectivity/source/commontools/dbtools2.cxx
@@ -251,20 +251,20 @@ namespace
::dbtools::OPropertyMap& rPropMap = OMetaConnection::getPropMap();
const OUString sQuote(_xMetaData->getIdentifierQuoteString());
- OUString sSql( " (" );
+ OUStringBuffer sSql( " (" );
Reference< XPropertySet > xColProp;
sal_Int32 nColCount = _xColumns->getCount();
for(sal_Int32 i=0;i<nColCount;++i)
{
if ( (_xColumns->getByIndex(i) >>= xColProp) && xColProp.is() )
- sSql += ::dbtools::quoteName(sQuote,::comphelper::getString(xColProp->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_NAME))))
- + ",";
+ sSql.append( ::dbtools::quoteName(sQuote,::comphelper::getString(xColProp->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_NAME)))) )
+ .append(",");
}
if ( nColCount )
- sSql = sSql.replaceAt(sSql.getLength()-1, 1, ")");
- return sSql;
+ sSql[sSql.getLength()-1] = ')';
+ return sSql.makeStringAndClear();
}
}