From 70519a43e0d89a6b5d89859a6851f8c757c6b0c7 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 11 Jan 2019 11:21:46 +0100 Subject: Replace OUStringBuffer::appendCopy with append(std::u16string_view) ...which is more general Change-Id: I94f28f8eda887120cf5f143b4549e0339b60e6a7 Reviewed-on: https://gerrit.libreoffice.org/66155 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- vbahelper/source/vbahelper/vbacommandbarhelper.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'vbahelper/source') diff --git a/vbahelper/source/vbahelper/vbacommandbarhelper.cxx b/vbahelper/source/vbahelper/vbacommandbarhelper.cxx index 708b59a0da41..961288463c63 100644 --- a/vbahelper/source/vbahelper/vbacommandbarhelper.cxx +++ b/vbahelper/source/vbahelper/vbacommandbarhelper.cxx @@ -33,6 +33,7 @@ #include #include #include +#include using namespace com::sun::star; using namespace ooo::vba; @@ -223,10 +224,10 @@ sal_Int32 VbaCommandBarHelper::findControlByName( const css::uno::Reference< css } else { - aBuffer.appendCopy( sLabel, 0, index ); + aBuffer.append( std::u16string_view(sLabel).substr(0, index) ); if( bMenu ) aBuffer.append( '&' ); - aBuffer.appendCopy( sLabel, index + 1 ); + aBuffer.append( std::u16string_view(sLabel).substr(index + 1) ); } OUString sNewLabel = aBuffer.makeStringAndClear(); SAL_INFO("vbahelper", "VbaCommandBarHelper::findControlByName, control name: " << sNewLabel); -- cgit