diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-03-30 10:42:07 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-03-30 13:36:59 +0000 |
commit | a5084d15e1b72e303e1628fbff84432036b014a9 (patch) | |
tree | 00320f981c20f361b304b4fa2153fdde71e024a2 /vcl/source/treelist | |
parent | 6ffdcbdd29f014fcce290dfdb969fb6ff66a95ed (diff) |
loplugin:stringadd in vcl
when applying my upcoming patch to also consider O[U]StringBuffer
Change-Id: I44ce7183e4b292269fac1e3d2217286bf5abe823
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149752
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/treelist')
-rw-r--r-- | vcl/source/treelist/headbar.cxx | 3 | ||||
-rw-r--r-- | vcl/source/treelist/imap2.cxx | 3 | ||||
-rw-r--r-- | vcl/source/treelist/transfer.cxx | 10 |
3 files changed, 7 insertions, 9 deletions
diff --git a/vcl/source/treelist/headbar.cxx b/vcl/source/treelist/headbar.cxx index 3bd6bbaa3120..fa17e69ff25d 100644 --- a/vcl/source/treelist/headbar.cxx +++ b/vcl/source/treelist/headbar.cxx @@ -377,8 +377,7 @@ void HeaderBar::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos if (nTxtWidth > nMaxTxtWidth) { bLeftText = true; - OUStringBuffer aBuf(pItem->maOutText); - aBuf.append("..."); + OUStringBuffer aBuf(pItem->maOutText + "..."); do { aBuf.remove(aBuf.getLength() - 3 - 1, 1); diff --git a/vcl/source/treelist/imap2.cxx b/vcl/source/treelist/imap2.cxx index f0e3c6913f47..0c3d4d8bf9e2 100644 --- a/vcl/source/treelist/imap2.cxx +++ b/vcl/source/treelist/imap2.cxx @@ -96,8 +96,7 @@ void IMapCircleObject::WriteCERN( SvStream& rOStm ) const OStringBuffer aStrBuf("circle "); AppendCERNCoords(aStrBuf, aCenter); - aStrBuf.append(nRadius); - aStrBuf.append(' '); + aStrBuf.append(OString::number(nRadius) + " "); AppendCERNURL(aStrBuf); rOStm.WriteLine(aStrBuf); diff --git a/vcl/source/treelist/transfer.cxx b/vcl/source/treelist/transfer.cxx index bef49272b7c1..1fd9df908854 100644 --- a/vcl/source/treelist/transfer.cxx +++ b/vcl/source/treelist/transfer.cxx @@ -749,11 +749,11 @@ bool TransferableHelper::SetINetBookmark( const INetBookmark& rBmk, { OString sURL(OUStringToOString(rBmk.GetURL(), eSysCSet)); OString sDesc(OUStringToOString(rBmk.GetDescription(), eSysCSet)); - OStringBuffer sOut; - sOut.append(sURL.getLength()); - sOut.append("@" + sURL); - sOut.append(sDesc.getLength()); - sOut.append("@" + sDesc); + OString sOut = + OString::number(sURL.getLength()) + + "@" + sURL + + OString::number(sDesc.getLength()) + + "@" + sDesc; Sequence< sal_Int8 > aSeq(sOut.getLength()); memcpy(aSeq.getArray(), sOut.getStr(), sOut.getLength()); |