summaryrefslogtreecommitdiff
path: root/formula/inc
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
commitb8fe709ccc7a7829f40b7eab0e98a4f57268f15b (patch)
treec944582161e009bcbe71e4f39fe5a14967252bbb /formula/inc
parentb90b03e6d52d9627a59724125ef705181f57caf8 (diff)
parenta1531b1d2dacab9c14f92717f1220da94780ef51 (diff)
CWS-TOOLING: integrate CWS dr74
Diffstat (limited to 'formula/inc')
-rw-r--r--formula/inc/formula/errorcodes.hxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/formula/inc/formula/errorcodes.hxx b/formula/inc/formula/errorcodes.hxx
index d99971788b..f9b04e012f 100644
--- a/formula/inc/formula/errorcodes.hxx
+++ b/formula/inc/formula/errorcodes.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -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;
}