summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basic/source/comp/sbcomp.cxx8
1 files changed, 1 insertions, 7 deletions
diff --git a/basic/source/comp/sbcomp.cxx b/basic/source/comp/sbcomp.cxx
index dfc0b4a8b3e9..b02ca86eb8b3 100644
--- a/basic/source/comp/sbcomp.cxx
+++ b/basic/source/comp/sbcomp.cxx
@@ -256,8 +256,6 @@ const char* lcl_getSpaces( int nSpaceCount )
static OString lcl_toOStringSkipLeadingWhites( const OUString& aStr )
{
- static sal_Char Buffer[1000];
-
OString aOStr = OUStringToOString( OUString( aStr ), RTL_TEXTENCODING_ASCII_US );
const sal_Char* pStr = aOStr.getStr();
@@ -269,11 +267,7 @@ static OString lcl_toOStringSkipLeadingWhites( const OUString& aStr )
c = *pStr;
}
- int nLen = strlen( pStr );
- strncpy( Buffer, pStr, nLen );
- Buffer[nLen] = 0;
-
- OString aORetStr( Buffer );
+ OString aORetStr( pStr, strlen(pStr) );
return aORetStr;
}