summaryrefslogtreecommitdiff
path: root/formula
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2010-04-12 17:59:48 +0200
committerJens-Heiner Rechtien <hr@openoffice.org>2010-04-12 17:59:48 +0200
commit85be421723682608a87451e8cb6bbb2ab593cade (patch)
tree9a379cbda03d6e8a9b9ad8c5254ef9202d2dcf88 /formula
parenta001605a190749900d3e09aa864ce56925ff848e (diff)
parentb0e452f926bab7223aa2f7d46e6d563ec392d4c8 (diff)
CWS-TOOLING: integrate CWS dr74
Diffstat (limited to 'formula')
-rw-r--r--formula/inc/formula/errorcodes.hxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/formula/inc/formula/errorcodes.hxx b/formula/inc/formula/errorcodes.hxx
index 2d8d9d18b71b..f9b04e012fab 100644
--- a/formula/inc/formula/errorcodes.hxx
+++ b/formula/inc/formula/errorcodes.hxx
@@ -83,9 +83,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;
}