diff options
Diffstat (limited to 'sal/inc/rtl/ustring.hxx')
-rw-r--r-- | sal/inc/rtl/ustring.hxx | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/sal/inc/rtl/ustring.hxx b/sal/inc/rtl/ustring.hxx index 8190d208ae68..7cdbb4e22d90 100644 --- a/sal/inc/rtl/ustring.hxx +++ b/sal/inc/rtl/ustring.hxx @@ -2141,9 +2141,25 @@ public: @param b a sal_Bool. @return a string with the string representation of the argument. - @deprecated there is no replacement, use 'condition ? OString( "true" ) : OString( "false" )' + @deprecated use boolean() */ - SAL_DEPRECATED_INTERNAL("write explicit condition") static OUString valueOf( sal_Bool b ) SAL_THROW(()) + SAL_DEPRECATED_INTERNAL("use boolean()") static OUString valueOf( sal_Bool b ) SAL_THROW(()) + { + return boolean(b); + } + + /** + Returns the string representation of the boolean argument. + + If the sal_Bool is true, the string "true" is returned. + If the sal_Bool is false, the string "false" is returned. + This function can't be used for language specific conversion. + + @param b a sal_Bool. + @return a string with the string representation of the argument. + @since LibreOffice 4.1 + */ + static OUString boolean( sal_Bool b ) SAL_THROW(()) { sal_Unicode aBuf[RTL_USTR_MAX_VALUEOFBOOLEAN]; rtl_uString* pNewData = 0; |