summaryrefslogtreecommitdiffstats
path: root/basic/source/runtime/methods1.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'basic/source/runtime/methods1.cxx')
-rw-r--r--basic/source/runtime/methods1.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx
index 2195a177c52e..42ea005bec82 100644
--- a/basic/source/runtime/methods1.cxx
+++ b/basic/source/runtime/methods1.cxx
@@ -682,10 +682,8 @@ RTLFUNC(Trim)
StarBASIC::Error( SbERR_BAD_ARGUMENT );
else
{
- String aStr( rPar.Get(1)->GetString() );
- aStr.EraseLeadingChars();
- aStr.EraseTrailingChars();
- rPar.Get(0)->PutString( aStr );
+ rtl::OUString aStr(comphelper::string::strip(rPar.Get(1)->GetString(), ' '));
+ rPar.Get(0)->PutString(aStr);
}
}