From 9db31fc5669abd1e1f8db5e9267c91423b36f223 Mon Sep 17 00:00:00 2001 From: Luboš Luňák Date: Tue, 28 Feb 2012 13:09:46 +0100 Subject: rtl_uString_newFromAscii_WithLength() and use it in OUString --- sal/rtl/source/ustring.cxx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'sal/rtl') diff --git a/sal/rtl/source/ustring.cxx b/sal/rtl/source/ustring.cxx index 7c99758a9b6c..763d9c51e573 100644 --- a/sal/rtl/source/ustring.cxx +++ b/sal/rtl/source/ustring.cxx @@ -471,6 +471,14 @@ void SAL_CALL rtl_uString_newFromAscii( rtl_uString** ppThis, else nLen = 0; + rtl_uString_newFromAscii_WithLength( ppThis, pCharStr, nLen ); +} + +void SAL_CALL rtl_uString_newFromAscii_WithLength( rtl_uString** ppThis, + const sal_Char* pCharStr, + sal_Int32 nLen ) + SAL_THROW_EXTERN_C() +{ if ( !nLen ) { IMPL_RTL_STRINGNAME( new )( ppThis ); @@ -489,7 +497,7 @@ void SAL_CALL rtl_uString_newFromAscii( rtl_uString** ppThis, { /* Check ASCII range */ SAL_WARN_IF( ((unsigned char)*pCharStr) > 127, "rtl.string", - "rtl_uString_newFromAscii - Found char > 127" ); + "rtl_uString_newFromAscii_WithLength - Found char > 127" ); *pBuffer = *pCharStr; pBuffer++; -- cgit