summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-09-20 11:19:32 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-09-20 11:19:32 +0200
commite27a0ec89f6d13be0ddf4d68b844a78f939f7bf9 (patch)
treecae63c62c39f3ab5dabb0b6c1855cee8b614c2e7 /basic
parentcf62e6c1d87bdee8021351cefaedec0796e15c90 (diff)
Related cid#1371289: Improve code to not depend on missing move assignment
Change-Id: Id254fa76cafe33a36646d517d224ba6a05406c09
Diffstat (limited to 'basic')
-rw-r--r--basic/source/runtime/runtime.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index 1fba86622b5b..6082437db846 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -2019,18 +2019,19 @@ void SbiRuntime::StepLSET()
sal_Int32 nVarStrLen = aRefVarString.getLength();
sal_Int32 nValStrLen = aRefValString.getLength();
- OUStringBuffer aNewStr;
+ OUString aNewStr;
if( nVarStrLen > nValStrLen )
{
- aNewStr.append(aRefValString);
- comphelper::string::padToLength(aNewStr, nVarStrLen, ' ');
+ OUStringBuffer buf(aRefValString);
+ comphelper::string::padToLength(buf, nVarStrLen, ' ');
+ aNewStr = buf.makeStringAndClear();
}
else
{
aNewStr = aRefValString.copy( 0, nVarStrLen );
}
- refVar->PutString(aNewStr.makeStringAndClear());
+ refVar->PutString(aNewStr);
refVar->SetFlags( n );
}
}