summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-07-28 18:01:28 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-07-29 12:14:22 +0200
commite593b623dad9456d3452c4c537479596bcd0b00b (patch)
treed9d21031cdd75df25749de8c6ae5b9c0afb1c196 /extensions
parenta612d738a8c909e18ed89675432ca42b376ef624 (diff)
loplugin:stringloop in various
Change-Id: Ic2436c6d94729211cd5bc72fee18af228381e4a3 Reviewed-on: https://gerrit.libreoffice.org/58250 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/abpilot/datasourcehandling.cxx3
-rw-r--r--extensions/source/propctrlr/standardcontrol.cxx8
-rw-r--r--extensions/source/propctrlr/stringrepresentation.cxx9
3 files changed, 10 insertions, 10 deletions
diff --git a/extensions/source/abpilot/datasourcehandling.cxx b/extensions/source/abpilot/datasourcehandling.cxx
index 0923e9902943..847518e1301a 100644
--- a/extensions/source/abpilot/datasourcehandling.cxx
+++ b/extensions/source/abpilot/datasourcehandling.cxx
@@ -229,8 +229,7 @@ namespace abp
sal_Int32 nPostfix = 1;
while ( ( m_pImpl->aDataSourceNames.end() != aPos ) && ( nPostfix < 65535 ) )
{ // there already is a data source with this name
- sCheck = _rDataSourceName;
- sCheck += OUString::number( nPostfix++ );
+ sCheck = _rDataSourceName + OUString::number( nPostfix++ );
aPos = m_pImpl->aDataSourceNames.find( sCheck );
}
diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx
index 4bd7c2055d47..f6bd2718c35e 100644
--- a/extensions/source/propctrlr/standardcontrol.cxx
+++ b/extensions/source/propctrlr/standardcontrol.cxx
@@ -1063,16 +1063,16 @@ namespace pcr
OUString lcl_convertListToMultiLine( const StlSyntaxSequence< OUString >& _rStrings )
{
- OUString sMultiLineText;
+ OUStringBuffer sMultiLineText;
for ( StlSyntaxSequence< OUString >::const_iterator item = _rStrings.begin();
item != _rStrings.end();
)
{
- sMultiLineText += *item;
+ sMultiLineText.append(*item);
if ( ++item != _rStrings.end() )
- sMultiLineText += "\n";
+ sMultiLineText.append("\n");
}
- return sMultiLineText;
+ return sMultiLineText.makeStringAndClear();
}
diff --git a/extensions/source/propctrlr/stringrepresentation.cxx b/extensions/source/propctrlr/stringrepresentation.cxx
index 90ba6e5cbc58..40cc301bc8ed 100644
--- a/extensions/source/propctrlr/stringrepresentation.cxx
+++ b/extensions/source/propctrlr/stringrepresentation.cxx
@@ -36,6 +36,7 @@
#include <com/sun/star/util/Time.hpp>
#include <connectivity/dbconversion.hxx>
#include <osl/diagnose.h>
+#include <rtl/ustrbuf.hxx>
#include <strings.hrc>
#include <yesno.hrc>
#include "pcrservices.hxx"
@@ -331,7 +332,7 @@ namespace
template < class ElementType, class Transformer >
OUString composeSequenceElements( const Sequence< ElementType >& _rElements, const Transformer& _rTransformer )
{
- OUString sCompose;
+ OUStringBuffer sCompose;
// loop through the elements and concatenate the string representations of the integers
// (separated by a line break)
@@ -339,12 +340,12 @@ namespace
const ElementType* pElementsEnd = pElements + _rElements.getLength();
for ( ; pElements != pElementsEnd; ++pElements )
{
- sCompose += OUString( _rTransformer( *pElements ) );
+ sCompose.append( OUString( _rTransformer( *pElements ) ) );
if ( pElements != pElementsEnd )
- sCompose += "\n";
+ sCompose.append("\n");
}
- return sCompose;
+ return sCompose.makeStringAndClear();
}
template < class ElementType, class Transformer >