diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-07 10:34:54 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-14 08:35:00 +0200 |
commit | cd66852f6dd08631a25d15a1527a647e69ab8ce3 (patch) | |
tree | 0ac1fab1d063046376e31e21d6656ee05eebb627 /basic | |
parent | Assume that EMR_SETWINDOWEXTEX wants to read signed values (diff) | |
download | core-cd66852f6dd08631a25d15a1527a647e69ab8ce3.tar.gz core-cd66852f6dd08631a25d15a1527a647e69ab8ce3.zip |
create appendCopy method in OUStringBuffer
so we can avoid temporary copies when appending a substring of an
OUString to the buffer. I would have preferred to call the method just
"append" but that results in ambiguous method errors when the callsite
is something like
sal_Int32 n;
OUStringBuffer s;
s.append(n, 10);
I'm not sure why
Change-Id: I6b5b6641fcb5b26ce2269f89ef06e03c0b6aa76f
Reviewed-on: https://gerrit.libreoffice.org/58666
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/comp/codegen.cxx | 2 | ||||
-rw-r--r-- | basic/source/runtime/runtime.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/basic/source/comp/codegen.cxx b/basic/source/comp/codegen.cxx index fc234dfa1579..7cc715f7fa8e 100644 --- a/basic/source/comp/codegen.cxx +++ b/basic/source/comp/codegen.cxx @@ -212,7 +212,7 @@ void SbiCodeGen::Save() { aIfaceProcName.append(aPropPrefix); } - aIfaceProcName.append(aPureProcName.copy( rIfaceName.getLength() + 1 )); + aIfaceProcName.appendCopy(aPureProcName, rIfaceName.getLength() + 1 ); aIfaceName = rIfaceName; nPassCount = 2; break; diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx index 9e4e632ba455..04f597846b7c 100644 --- a/basic/source/runtime/runtime.cxx +++ b/basic/source/runtime/runtime.cxx @@ -2051,7 +2051,7 @@ void SbiRuntime::StepRSET() } else { - aNewStr.append(aRefValString.copy(0, nVarStrLen)); + aNewStr.appendCopy(aRefValString, 0, nVarStrLen); } refVar->PutString(aNewStr.makeStringAndClear()); |