diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-03-24 19:12:58 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-03-25 07:27:34 +0000 |
commit | 3a0c5b782001fc398740b46f2adc9e07055505d6 (patch) | |
tree | 508da0c4db6b64d4e920d58a01b37995649a6b52 /filter | |
parent | f2b027d5cdaf0e88d1fe47c4d89ef57c03b1f9b8 (diff) |
loplugin:stringadd in editeng..framework
after my patch to merge the bufferadd loplugin into stringadd
Change-Id: Ieac16a01fde6467a2f6fe47864069304a3c44e47
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149552
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/msfilter/rtfutil.cxx | 14 | ||||
-rw-r--r-- | filter/source/svg/svgwriter.cxx | 8 |
2 files changed, 9 insertions, 13 deletions
diff --git a/filter/source/msfilter/rtfutil.cxx b/filter/source/msfilter/rtfutil.cxx index 75f453c347c9..73941dc4ec1d 100644 --- a/filter/source/msfilter/rtfutil.cxx +++ b/filter/source/msfilter/rtfutil.cxx @@ -180,20 +180,17 @@ OString OutChar(sal_Unicode c, int* pUCMode, rtl_TextEncoding eDestEnc, bool* pS { if (*pUCMode != nLen) { - aBuf.append("\\uc"); - aBuf.append(nLen); + aBuf.append("\\uc" + OString::number(nLen)); // #i47831# add an additional whitespace, so that "document whitespaces" are not ignored. aBuf.append(' '); *pUCMode = nLen; } - aBuf.append("\\u"); - aBuf.append(static_cast<sal_Int32>(c)); + aBuf.append("\\u" + OString::number(static_cast<sal_Int32>(c))); } for (sal_Int32 nI = 0; nI < nLen; ++nI) { - aBuf.append("\\'"); - aBuf.append(OutHex(sConverted[nI], 2)); + aBuf.append("\\'" + OutHex(sConverted[nI], 2)); } } } @@ -222,10 +219,9 @@ OString OutString(const OUString& rStr, rtl_TextEncoding eDestEnc, bool bUnicode aBuf.append(OutChar(rStr[n], &nUCMode, eDestEnc, nullptr, bUnicode)); if (nUCMode != 1) { - aBuf.append(OOO_STRING_SVTOOLS_RTF_UC); - aBuf.append(sal_Int32(1)); aBuf.append( - " "); // #i47831# add an additional whitespace, so that "document whitespaces" are not ignored.; + OOO_STRING_SVTOOLS_RTF_UC + OString::number(sal_Int32(1)) + + " "); // #i47831# add an additional whitespace, so that "document whitespaces" are not ignored.; } return aBuf.makeStringAndClear(); } diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx index d6909bcdb070..2da8385bc4c3 100644 --- a/filter/source/svg/svgwriter.cxx +++ b/filter/source/svg/svgwriter.cxx @@ -3101,10 +3101,10 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, sal_uInt16 sz = static_cast<sal_uInt16>((pA->GetDataSize()) / 2); if (sz) { - sType.append("; "); - sType.append( - reinterpret_cast<sal_Unicode const*>(pData), - sz); + sType.append(OUString::Concat("; ") + + std::u16string_view( + reinterpret_cast<sal_Unicode const*>(pData), + sz)); } } } |