From b3b8288f7f6c3cbb36edac2eddf0fff974c6d04a Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 27 Sep 2019 21:41:42 +0200 Subject: new loplugin:stringadd look for places where we can replace sequential additions to OUString/OString with one concatentation (i.e. +) expression, which is more efficient Change-Id: I64d91328bf64828d8328b1cad9e90953c0a75663 Reviewed-on: https://gerrit.libreoffice.org/79406 Tested-by: Jenkins Reviewed-by: Noel Grandin --- vbahelper/source/vbahelper/vbacommandbarhelper.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'vbahelper') diff --git a/vbahelper/source/vbahelper/vbacommandbarhelper.cxx b/vbahelper/source/vbahelper/vbacommandbarhelper.cxx index 014e04035be9..715923e92303 100644 --- a/vbahelper/source/vbahelper/vbacommandbarhelper.cxx +++ b/vbahelper/source/vbahelper/vbacommandbarhelper.cxx @@ -238,9 +238,7 @@ sal_Int32 VbaCommandBarHelper::findControlByName( const css::uno::Reference< css OUString VbaCommandBarHelper::generateCustomURL() { - OUString url( ITEM_TOOLBAR_URL ); - url += CUSTOM_TOOLBAR_STR; - + OUString url = OUStringLiteral(ITEM_TOOLBAR_URL) + CUSTOM_TOOLBAR_STR; // use a random number to minimize possible clash with existing custom toolbars url += OUString::number(comphelper::rng::uniform_int_distribution(0, std::numeric_limits::max()), 16); return url; -- cgit