Related cid#1371289: Improve code to not depend on missing move assignment

Change-Id: Id254fa76cafe33a36646d517d224ba6a05406c09
This commit is contained in:
Stephan Bergmann
2016-09-20 11:19:32 +02:00
parent cf62e6c1d8
commit e27a0ec89f

View File

@@ -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 );
}
}