summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2018-07-25 19:25:17 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-07-27 08:27:36 +0200
commitea7e6dd4afd7154f51c5344eb6ab1825fc92a293 (patch)
tree5c8e23a53db8bc4e42f59af9253f8598de22d059 /connectivity
parenta8ed578f92cdfbd6236c74bc118beeebf806a84b (diff)
use OUStringBuffer in some loops
Change-Id: Ib32fb5ddc04df1c090f9d7b319e4ff9be0c285f9 Reviewed-on: https://gerrit.libreoffice.org/58007 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/file/FStringFunctions.cxx6
-rw-r--r--connectivity/source/drivers/postgresql/pq_tools.cxx6
2 files changed, 6 insertions, 6 deletions
diff --git a/connectivity/source/drivers/file/FStringFunctions.cxx b/connectivity/source/drivers/file/FStringFunctions.cxx
index 596196151327..95119f650ebe 100644
--- a/connectivity/source/drivers/file/FStringFunctions.cxx
+++ b/connectivity/source/drivers/file/FStringFunctions.cxx
@@ -62,7 +62,7 @@ ORowSetValue OOp_Char::operate(const std::vector<ORowSetValue>& lhs) const
if ( lhs.empty() )
return ORowSetValue();
- OUString sRet;
+ OUStringBuffer sRet;
std::vector<ORowSetValue>::const_reverse_iterator aIter = lhs.rbegin();
std::vector<ORowSetValue>::const_reverse_iterator aEnd = lhs.rend();
for (; aIter != aEnd; ++aIter)
@@ -71,11 +71,11 @@ ORowSetValue OOp_Char::operate(const std::vector<ORowSetValue>& lhs) const
{
sal_Char c = static_cast<sal_Char>(static_cast<sal_Int32>(*aIter));
- sRet += OUString(&c,1,RTL_TEXTENCODING_ASCII_US);
+ sRet.appendAscii(&c, 1);
}
}
- return sRet;
+ return sRet.makeStringAndClear();
}
ORowSetValue OOp_Concat::operate(const std::vector<ORowSetValue>& lhs) const
diff --git a/connectivity/source/drivers/postgresql/pq_tools.cxx b/connectivity/source/drivers/postgresql/pq_tools.cxx
index 06735b570338..a3730f7ed462 100644
--- a/connectivity/source/drivers/postgresql/pq_tools.cxx
+++ b/connectivity/source/drivers/postgresql/pq_tools.cxx
@@ -858,7 +858,7 @@ css::uno::Sequence< sal_Int32 > string2intarray( const OUString & str )
std::vector< sal_Int32 > vec;
do
{
- OUString digits;
+ OUStringBuffer digits;
do
{
if(!iswspace(c))
@@ -873,10 +873,10 @@ css::uno::Sequence< sal_Int32 > string2intarray( const OUString & str )
break;
if ( start == strlen)
return ret;
- digits += OUString(&c, 1);
+ digits.append(OUString(&c, 1));
c = str.iterateCodePoints(&start);
} while ( c );
- vec.push_back( digits.toInt32() );
+ vec.push_back( digits.makeStringAndClear().toInt32() );
do
{
if(!iswspace(c))