From 4cc8b5678950041b71b525c70be3f13d48a777cc Mon Sep 17 00:00:00 2001 From: Daniel Rentz Date: Fri, 15 Jan 2010 12:00:39 +0100 Subject: dr74: migrate changes to hg --- formula/inc/formula/errorcodes.hxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'formula') diff --git a/formula/inc/formula/errorcodes.hxx b/formula/inc/formula/errorcodes.hxx index 077129eb046c..e87bef3a43e3 100644 --- a/formula/inc/formula/errorcodes.hxx +++ b/formula/inc/formula/errorcodes.hxx @@ -86,9 +86,13 @@ const USHORT NOTAVAILABLE = 0x7fff; represent an interpreter error code. */ inline double CreateDoubleError( USHORT nErr ) { - double fVal; + union + { + double fVal; + sal_math_Double smVal; + }; ::rtl::math::setNan( &fVal ); - reinterpret_cast< sal_math_Double * >(&fVal)->nan_parts.fraction_lo = nErr; + smVal.nan_parts.fraction_lo = nErr; return fVal; } -- cgit