basic: convert StepPAD to OUString
Change-Id: I19d05f455767c973a47d0233b3af20af1ac3a20a
diff --git a/basic/source/runtime/step1.cxx b/basic/source/runtime/step1.cxx
index b5dbc33..483d912 100644
--- a/basic/source/runtime/step1.cxx
+++ b/basic/source/runtime/step1.cxx
@@ -144,15 +144,19 @@ void SbiRuntime::StepARGTYP( sal_uInt32 nOp1 )
void SbiRuntime::StepPAD( sal_uInt32 nOp1 )
{
SbxVariable* p = GetTOS();
String& s = (String&)(const String&) *p;
if (s.Len() != nOp1)
OUString s = p->GetOUString();
sal_Int32 nLen(nOp1);
if( s.getLength() != nLen )
{
rtl::OUStringBuffer aBuf(s);
sal_Int32 nLen(nOp1);
if (aBuf.getLength() > nLen)
{
comphelper::string::truncateToLength(aBuf, nLen);
}
else
{
comphelper::string::padToLength(aBuf, nLen, ' ');
}
s = aBuf.makeStringAndClear();
}
}