From 8ad0669955228b2da64ecce34ea71d761d066864 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 30 Mar 2023 10:23:07 +0200 Subject: loplugin:stringadd in test..tools when applying my upcoming patch to also consider O[U]StringBuffer Change-Id: I8619fa3280338afdfe75bdbfda6cb118d396e1c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149749 Tested-by: Jenkins Reviewed-by: Noel Grandin --- test/source/a11y/AccessibilityTools.cxx | 7 ++----- test/source/lokcallback.cxx | 6 ++---- 2 files changed, 4 insertions(+), 9 deletions(-) (limited to 'test') diff --git a/test/source/a11y/AccessibilityTools.cxx b/test/source/a11y/AccessibilityTools.cxx index b754f46d2f69..15a7cec17bc3 100644 --- a/test/source/a11y/AccessibilityTools.cxx +++ b/test/source/a11y/AccessibilityTools.cxx @@ -660,9 +660,7 @@ OUString AccessibilityTools::debugName(accessibility::XAccessibleAction* xAct) if (i > 0) r.append(", "); - r.append("description=\""); - r.append(xAct->getAccessibleActionDescription(i)); - r.append('"'); + r.append("description=\"" + xAct->getAccessibleActionDescription(i) + "\""); const auto& xKeyBinding = xAct->getAccessibleActionKeyBinding(i); if (xKeyBinding) @@ -689,8 +687,7 @@ OUString AccessibilityTools::debugName(accessibility::XAccessibleAction* xAct) r.append(""); if (keyStroke.Modifiers & awt::KeyModifier::SHIFT) r.append(""); - r.append(keyStroke.KeyChar); - r.append('"'); + r.append(OUStringChar(keyStroke.KeyChar) + "\""); } } r.append("]"); diff --git a/test/source/lokcallback.cxx b/test/source/lokcallback.cxx index 5af844f089ad..323b263b7e76 100644 --- a/test/source/lokcallback.cxx +++ b/test/source/lokcallback.cxx @@ -68,10 +68,8 @@ void TestLokCallbackWrapper::libreOfficeKitViewInvalidateTilesCallback( buf.append("EMPTY"); if (comphelper::LibreOfficeKit::isPartInInvalidation()) { - buf.append(", "); - buf.append(static_cast(nPart)); - buf.append(", "); - buf.append(static_cast(nMode)); + buf.append(", " + OString::number(static_cast(nPart)) + ", " + + OString::number(static_cast(nMode))); } callCallback(LOK_CALLBACK_INVALIDATE_TILES, buf.makeStringAndClear().getStr(), NO_VIEWID); } -- cgit