summaryrefslogtreecommitdiff
path: root/cui/source/options/optpath.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-07-28 11:28:52 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-07-28 17:22:52 +0200
commitd407304544cdb2edc3cbdb4e56d49f3ceda79c38 (patch)
tree765668628540687b669d67b14d824adb893c1308 /cui/source/options/optpath.cxx
parentfa87224130a4ab6c4b79f993cc990adc4be0465b (diff)
loplugin:stringloop cui,dbaccess
Change-Id: I32b63d2435d36b869823ea022ebd7f8347a46ea0 Reviewed-on: https://gerrit.libreoffice.org/58211 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui/source/options/optpath.cxx')
-rw-r--r--cui/source/options/optpath.cxx20
1 files changed, 10 insertions, 10 deletions
diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx
index cca312d78608..24f167b94bba 100644
--- a/cui/source/options/optpath.cxx
+++ b/cui/source/options/optpath.cxx
@@ -147,24 +147,23 @@ static OUString getCfgName_Impl( sal_uInt16 _nHandle )
static OUString Convert_Impl( const OUString& rValue )
{
- OUString aReturn;
if (rValue.isEmpty())
- return aReturn;
+ return OUString();
sal_Int32 nPos = 0;
-
+ OUStringBuffer aReturn;
for (;;)
{
OUString aValue = rValue.getToken( 0, MULTIPATH_DELIMITER, nPos );
INetURLObject aObj( aValue );
if ( aObj.GetProtocol() == INetProtocol::File )
- aReturn += aObj.PathToFileName();
+ aReturn.append(aObj.PathToFileName());
if ( nPos < 0 )
break;
- aReturn += OUStringLiteral1(MULTIPATH_DELIMITER);
+ aReturn.append(MULTIPATH_DELIMITER);
}
- return aReturn;
+ return aReturn.makeStringAndClear();
}
// functions -------------------------------------------------------------
@@ -438,7 +437,8 @@ IMPL_LINK_NOARG(SvxPathTabPage, StandardHdl_Impl, Button*, void)
}
while ( nOldPos >= 0 );
- OUString sUserPath, sWritablePath;
+ OUString sWritablePath;
+ OUStringBuffer sUserPath;
if ( !sTemp.isEmpty() )
{
sal_Int32 nNextPos = 0;
@@ -452,13 +452,13 @@ IMPL_LINK_NOARG(SvxPathTabPage, StandardHdl_Impl, Button*, void)
break;
}
if ( !sUserPath.isEmpty() )
- sUserPath += OUStringLiteral1(MULTIPATH_DELIMITER);
- sUserPath += sToken;
+ sUserPath.append(MULTIPATH_DELIMITER);
+ sUserPath.append(sToken);
}
}
pPathBox->SetEntryText( Convert_Impl( sTemp ), pEntry, 1 );
pPathImpl->eState = SfxItemState::SET;
- pPathImpl->sUserPath = sUserPath;
+ pPathImpl->sUserPath = sUserPath.makeStringAndClear();
pPathImpl->sWritablePath = sWritablePath;
}
pEntry = pPathBox->NextSelected( pEntry );