From f0809a84b6c85a254bc23c5f55f86116d14a145d Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Mon, 11 Sep 2017 09:15:46 +0300 Subject: include/oox/export/utils.hxx: make functions constexpr Change-Id: I7606b54fb7cef831c3f9a8580260aa880c7f4db4 Reviewed-on: https://gerrit.libreoffice.org/42149 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- include/oox/export/utils.hxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include/oox') diff --git a/include/oox/export/utils.hxx b/include/oox/export/utils.hxx index d94d6c4228ae..927987115a60 100644 --- a/include/oox/export/utils.hxx +++ b/include/oox/export/utils.hxx @@ -34,7 +34,7 @@ inline OString I64S_(sal_Int64 x) { return OString::number(x); } * @return const char* literal "true" for true value, or literal "false" * for false value. */ -static inline const char* ToPsz(bool b) +static constexpr const char* ToPsz(bool b) { return b ? "true" : "false"; } @@ -42,7 +42,7 @@ static inline const char* ToPsz(bool b) /** * @return literal "1" for true value, or literal "0" for false value. */ -static inline const char* ToPsz10(bool b) +static constexpr const char* ToPsz10(bool b) { // xlsx seems to use "1" or "0" for boolean values. I wonder it ever uses // the "true" "false" variant. @@ -51,12 +51,12 @@ static inline const char* ToPsz10(bool b) #define USS(x) OUStringToOString( x, RTL_TEXTENCODING_UTF8 ).getStr() -static inline sal_Int64 PPTtoEMU( sal_Int32 nPPT ) +static constexpr sal_Int64 PPTtoEMU( sal_Int32 nPPT ) { return (sal_Int64)( (double)nPPT * 1587.5 ); } -static inline sal_Int64 TwipsToEMU( sal_Int32 nTwips ) +static constexpr sal_Int64 TwipsToEMU( sal_Int32 nTwips ) { return sal_Int64( nTwips ) * 635; } -- cgit