Kaydet (Commit) 145eda4c authored tarafından David Ostrovsky's avatar David Ostrovsky Kaydeden (comit) Luboš Luňák

O(U)String::valueOf don't duplicate code

Change-Id: I586fca181f63999a8f2d19d600b69f6788fd61d9
Reviewed-on: https://gerrit.libreoffice.org/1992Reviewed-by: 's avatarLuboš Luňák <l.lunak@suse.cz>
Tested-by: 's avatarLuboš Luňák <l.lunak@suse.cz>
üst 535dd86d
...@@ -1540,10 +1540,7 @@ public: ...@@ -1540,10 +1540,7 @@ public:
*/ */
SAL_DEPRECATED_INTERNAL("use number()") static OString valueOf( sal_Int32 i, sal_Int16 radix = 10 ) SAL_THROW(()) SAL_DEPRECATED_INTERNAL("use number()") static OString valueOf( sal_Int32 i, sal_Int16 radix = 10 ) SAL_THROW(())
{ {
sal_Char aBuf[RTL_STR_MAX_VALUEOFINT32]; return number( i, radix );
rtl_String* pNewData = 0;
rtl_string_newFromStr_WithLength( &pNewData, aBuf, rtl_str_valueOfInt32( aBuf, i, radix ) );
return OString( pNewData, (DO_NOT_ACQUIRE*)0 );
} }
/** /**
......
...@@ -2191,10 +2191,7 @@ public: ...@@ -2191,10 +2191,7 @@ public:
*/ */
SAL_DEPRECATED_INTERNAL("use number()") static OUString valueOf( sal_Int32 i, sal_Int16 radix = 10 ) SAL_THROW(()) SAL_DEPRECATED_INTERNAL("use number()") static OUString valueOf( sal_Int32 i, sal_Int16 radix = 10 ) SAL_THROW(())
{ {
sal_Unicode aBuf[RTL_USTR_MAX_VALUEOFINT32]; return number( i, radix );
rtl_uString* pNewData = 0;
rtl_uString_newFromStr_WithLength( &pNewData, aBuf, rtl_ustr_valueOfInt32( aBuf, i, radix ) );
return OUString( pNewData, (DO_NOT_ACQUIRE*)0 );
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment