diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2023-04-04 11:27:54 +0200 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2023-04-04 23:01:56 +0200 |
commit | 1e9f4de320f67d1218c710bcee1969a2324c6888 (patch) | |
tree | d07291eb0d509c443c2c7707fbe68cd173e4f244 /include/rtl/stringconcat.hxx | |
parent | c9c463af22d1c7ea75c8af2d7cf5e2c0a152e40f (diff) |
Make O(U)String::boolean also return an O(U)StringNumber
Change-Id: I184fa0e4e45662e0fac86076d1c8733a0465bb56
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149978
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'include/rtl/stringconcat.hxx')
-rw-r--r-- | include/rtl/stringconcat.hxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/rtl/stringconcat.hxx b/include/rtl/stringconcat.hxx index da32c7982792..118d93df5007 100644 --- a/include/rtl/stringconcat.hxx +++ b/include/rtl/stringconcat.hxx @@ -393,6 +393,13 @@ struct OStringNumber< double > OStringNumber(number_t d) { length = rtl_str_valueOfDouble(buf, d); } }; +template<> +struct OStringNumber< bool > + : public StringNumberBase<char, bool, RTL_STR_MAX_VALUEOFBOOLEAN> +{ + OStringNumber(number_t b) { length = rtl_str_valueOfBoolean(buf, b); } +}; + /** @internal @@ -439,6 +446,13 @@ struct OUStringNumber< double > OUStringNumber(number_t d) { length = rtl_ustr_valueOfDouble(buf, d); } }; +template<> +struct OUStringNumber< bool > + : public StringNumberBase<sal_Unicode, bool, RTL_USTR_MAX_VALUEOFBOOLEAN> +{ + OUStringNumber(number_t b) { length = rtl_ustr_valueOfBoolean(buf, b); } +}; + template< typename C, typename T, std::size_t nBufSize > struct ToStringHelper< StringNumberBase< C, T, nBufSize > > { |