basic/source/comp/sbcomp.cxx | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
New commits: commit 96520ae764f0b47fa7f8c7ca42864cffef05bdb3 Author: Arnaud Versini <arnaud.vers...@gmail.com> Date: Fri Feb 6 20:01:31 2015 +0100 Basic : Small OString usage simplification Change-Id: I6d6032b3075e98abb38859207e4a25e1a2e13e98 Reviewed-on: https://gerrit.libreoffice.org/14351 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Noel Grandin <noelgran...@gmail.com> diff --git a/basic/source/comp/sbcomp.cxx b/basic/source/comp/sbcomp.cxx index dfc0b4a..b02ca86 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; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits