summaryrefslogtreecommitdiff
path: root/vbahelper
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-01-11 11:21:46 +0100
committerStephan Bergmann <sbergman@redhat.com>2019-01-11 13:55:14 +0100
commit70519a43e0d89a6b5d89859a6851f8c757c6b0c7 (patch)
treebc1f4a6b6510e3bff75e9dc54eb71e2fa6cfc3c8 /vbahelper
parenta0210c5c5e8fd47b55567a8b18788d57d2b7decb (diff)
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 <sbergman@redhat.com>
Diffstat (limited to 'vbahelper')
-rw-r--r--vbahelper/source/vbahelper/vbacommandbarhelper.cxx5
1 files changed, 3 insertions, 2 deletions
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 <sal/log.hxx>
#include <time.h>
#include <map>
+#include <string_view>
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);