diff options
Diffstat (limited to 'chart2/source/inc/CommonFunctors.hxx')
-rw-r--r-- | chart2/source/inc/CommonFunctors.hxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/chart2/source/inc/CommonFunctors.hxx b/chart2/source/inc/CommonFunctors.hxx index 1c4a76efd229..2ec4efa41b8c 100644 --- a/chart2/source/inc/CommonFunctors.hxx +++ b/chart2/source/inc/CommonFunctors.hxx @@ -100,8 +100,11 @@ struct OOO_DLLPUBLIC_CHARTTOOLS AnyToString : public ::std::unary_function< ::co ::com::sun::star::uno::TypeClass eClass( rAny.getValueType().getTypeClass() ); if( eClass == ::com::sun::star::uno::TypeClass_DOUBLE ) { + const double* pDouble = reinterpret_cast< const double * >( rAny.getValue() ); + if( ::rtl::math::isNan(*pDouble) ) + return ::rtl::OUString(); return ::rtl::math::doubleToUString( - * reinterpret_cast< const double * >( rAny.getValue() ), + * pDouble, rtl_math_StringFormat_Automatic, -1, // use maximum decimal places available sal_Char( '.' ), // decimal separator |