diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-01-11 11:21:46 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-01-11 13:55:14 +0100 |
commit | 70519a43e0d89a6b5d89859a6851f8c757c6b0c7 (patch) | |
tree | bc1f4a6b6510e3bff75e9dc54eb71e2fa6cfc3c8 /basic | |
parent | tdf#120993 update Add fields icon in colibre (diff) | |
download | core-70519a43e0d89a6b5d89859a6851f8c757c6b0c7.tar.gz core-70519a43e0d89a6b5d89859a6851f8c757c6b0c7.zip |
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 'basic')
-rw-r--r-- | basic/source/comp/codegen.cxx | 3 | ||||
-rw-r--r-- | basic/source/runtime/runtime.cxx | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/basic/source/comp/codegen.cxx b/basic/source/comp/codegen.cxx index 6daa6dde378d..eeb610bbed99 100644 --- a/basic/source/comp/codegen.cxx +++ b/basic/source/comp/codegen.cxx @@ -25,6 +25,7 @@ #include <cstddef> #include <limits> #include <algorithm> +#include <string_view> #include <osl/diagnose.h> #include <com/sun/star/script/ModuleType.hpp> @@ -212,7 +213,7 @@ void SbiCodeGen::Save() { aIfaceProcName.append(aPropPrefix); } - aIfaceProcName.appendCopy(aPureProcName, rIfaceName.getLength() + 1 ); + aIfaceProcName.append(std::u16string_view(aPureProcName).substr(rIfaceName.getLength() + 1) ); aIfaceName = rIfaceName; nPassCount = 2; break; diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx index c8d3ccbd5699..ea0d9ae69379 100644 --- a/basic/source/runtime/runtime.cxx +++ b/basic/source/runtime/runtime.cxx @@ -20,7 +20,7 @@ #include <stdlib.h> #include <algorithm> - +#include <string_view> #include <unordered_map> #include <com/sun/star/beans/XPropertySet.hpp> @@ -2050,7 +2050,7 @@ void SbiRuntime::StepRSET() } else { - aNewStr.appendCopy(aRefValString, 0, nVarStrLen); + aNewStr.append(std::u16string_view(aRefValString).substr(0, nVarStrLen)); } refVar->PutString(aNewStr.makeStringAndClear()); |