summaryrefslogtreecommitdiff
path: root/formula/inc
diff options
context:
space:
mode:
authorDaniel Rentz <dr@openoffice.org>2010-01-15 12:00:39 +0100
committerDaniel Rentz <dr@openoffice.org>2010-01-15 12:00:39 +0100
commit47b6c64ca940fc067fe2e58e7ae43456427db080 (patch)
tree19cdc4c0e2fb8e1145ba4c9e1fcc5438b5cb17ab /formula/inc
parent7ac3cbc92e93eabfbbbf65b8ac429afc28f84b2e (diff)
dr74: migrate changes to hg
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 c15697ac91..e87bef3a43 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 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -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;
}