[Libreoffice-commits] core.git: basic/source
Arnaud Versini
arnaud.versini at gmail.com
Sat Feb 7 22:55:10 PST 2015
basic/source/comp/sbcomp.cxx | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
New commits:
commit 96520ae764f0b47fa7f8c7ca42864cffef05bdb3
Author: Arnaud Versini <arnaud.versini at 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 <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin at 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;
}
More information about the Libreoffice-commits
mailing list