summaryrefslogtreecommitdiff
path: root/sfx2/source/control/unoctitm.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-07-28 18:01:57 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-07-30 11:06:14 +0200
commit70bfdd828b01e9db0713b87645ffe39f3dc21c7e (patch)
treeb53e22d4c582e7cad6155f2c0c2536241cadb0f5 /sfx2/source/control/unoctitm.cxx
parentdead246b1955a99b66b0a69e8da3db1a61f3ab88 (diff)
loplugin:stringloop in sfx2..svx
Change-Id: Ie4ca2421f00259f974b6d94f883adfa11600b1fe Reviewed-on: https://gerrit.libreoffice.org/58251 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2/source/control/unoctitm.cxx')
-rw-r--r--sfx2/source/control/unoctitm.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 15e488fb1f87..2bf002844284 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -531,13 +531,14 @@ void UsageInfo::save()
if( file.open(osl_File_OpenFlag_Read | osl_File_OpenFlag_Write | osl_File_OpenFlag_Create) == osl::File::E_None )
{
- OString aUsageInfoMsg = "Document Type;Command;Count";
+ OStringBuffer aUsageInfoMsg("Document Type;Command;Count");
for (auto const& elem : maUsage)
- aUsageInfoMsg += "\n" + elem.first.toUtf8() + ";" + OString::number(elem.second);
+ aUsageInfoMsg.append("\n").append(elem.first.toUtf8()).append(";").append(OString::number(elem.second));
sal_uInt64 written = 0;
- file.write(aUsageInfoMsg.pData->buffer, aUsageInfoMsg.getLength(), written);
+ auto s = aUsageInfoMsg.makeStringAndClear();
+ file.write(s.getStr(), s.getLength(), written);
file.close();
}
}