diff options
author | Arnaud Versini <arnaud.versini@gmail.com> | 2015-02-06 20:01:31 +0100 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-02-08 06:54:45 +0000 |
commit | 96520ae764f0b47fa7f8c7ca42864cffef05bdb3 (patch) | |
tree | 974e4b421b37fd310315dd4172a99642dcb0ac55 /basic | |
parent | 39e9e3ee8369eeb00025291e637f0bb2a8f87ed2 (diff) |
Basic : Small OString usage simplification
Change-Id: I6d6032b3075e98abb38859207e4a25e1a2e13e98
Reviewed-on: https://gerrit.libreoffice.org/14351
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/comp/sbcomp.cxx | 8 |
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; } |