diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-08-29 11:22:25 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-08-29 11:43:50 +0100 |
commit | cbba41823a2e67add2620e4901bf0ead542c2932 (patch) | |
tree | 921e608e0b72f88d0acfe48b7953bb4c37205799 /basic/source | |
parent | 2fa8271155450894ed1716a6cce97540950518b0 (diff) |
String::Expand -> string::padToLength
Change-Id: I684e371c31ba76d2e9b563eed70449764346161b
Diffstat (limited to 'basic/source')
-rw-r--r-- | basic/source/runtime/step0.cxx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/basic/source/runtime/step0.cxx b/basic/source/runtime/step0.cxx index 667a8056a641..40d8f6982fcb 100644 --- a/basic/source/runtime/step0.cxx +++ b/basic/source/runtime/step0.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <comphelper/string.hxx> #include <vcl/msgbox.hxx> #include <tools/fsys.hxx> @@ -1305,13 +1306,13 @@ void SbiRuntime::StepPRINT() // print TOS void SbiRuntime::StepPRINTF() // print TOS in field { SbxVariableRef p = PopVar(); - String s1 = p->GetString(); - String s; + OUString s1 = p->GetString(); + OUStringBuffer s; if( p->GetType() >= SbxINTEGER && p->GetType() <= SbxDOUBLE ) - s = ' '; - s += s1; - s.Expand( 14, ' ' ); - rtl::OString aByteStr(rtl::OUStringToOString(s, osl_getThreadTextEncoding())); + s.append(' '); + s.append(s1); + comphelper::string::padToLength(s, 14, ' '); + OString aByteStr(OUStringToOString(s.makeStringAndClear(), osl_getThreadTextEncoding())); pIosys->Write( aByteStr ); Error( pIosys->GetError() ); } |