[ooo-build-commit] .: 13 commits - offapi/com sal/inc sal/osl sal/rtl
Jan Holesovsky
kendy at kemper.freedesktop.org
Wed Oct 6 07:10:53 PDT 2010
offapi/com/sun/star/sheet/DataPilotSourceDimension.idl | 8
offapi/com/sun/star/sheet/DimensionFlags.idl | 74 ++++
offapi/com/sun/star/sheet/makefile.mk | 1
sal/inc/rtl/math.h | 20 -
sal/osl/w32/signal.cxx | 2
sal/rtl/source/math.cxx | 300 +++++++++--------
6 files changed, 254 insertions(+), 151 deletions(-)
New commits:
commit 565fe5c7861c113282ad870508e3696bc4c5ddff
Merge: 9e5fb5e... 5091ea5...
Author: Jan Holesovsky <kendy at suse.cz>
Date: Wed Oct 6 16:05:00 2010 +0200
Merge branch 'master' of ssh://git.freedesktop.org/git/libreoffice/ure
commit 9e5fb5e38c2dce31725b64c359e4c5c9f8657d3b
Merge: 6f419a8... 77080c4...
Author: Jan Holesovsky <kendy at suse.cz>
Date: Wed Oct 6 14:41:56 2010 +0200
Merge branch 'master' of ssh://git.freedesktop.org/git/libreoffice/ure
commit 6f419a80e5a5557ea5c9c2826c69b454022739b8
Merge: d508c71... d3aae8d...
Author: Jan Holesovsky <kendy at suse.cz>
Date: Wed Oct 6 14:39:29 2010 +0200
Merge commit 'ooo/OOO330_m9'
commit d3aae8db768130fae8406b1d83ddda14b518c4be
Merge: f6a6e03... a1eaa1d...
Author: obo <obo at openoffice.org>
Date: Tue Sep 14 09:18:14 2010 +0200
CWS-TOOLING: integrate CWS fwk156
commit f6a6e031ff387432e8fd54791cc4a42239fa21d8
Merge: b403f8c... e3e02d8...
Author: obo <obo at openoffice.org>
Date: Tue Sep 14 09:13:16 2010 +0200
CWS-TOOLING: integrate CWS calc59
commit b403f8cb6c7a06b3ff6e8be930334fdc800d261b
Merge: b549687... c448b27...
Author: obo <obo at openoffice.org>
Date: Tue Sep 14 08:56:44 2010 +0200
CWS-TOOLING: integrate CWS dba33h
commit a1eaa1da92e9152e9e144b57db9d5f0008240378
Merge: 743f3c6... b549687...
Author: Carsten Driesner <cd at openoffice.org>
Date: Wed Sep 8 12:45:09 2010 +0200
fwk156: Merge changes
commit 743f3c6d597f3d1e8adceb7f0d4afa917e047bbb
Author: Carsten Driesner <cd at openoffice.org>
Date: Thu Sep 2 19:32:59 2010 +0200
fwk156: #i113687# Add static cast to get string for CreateProcess function
diff --git a/sal/osl/w32/signal.cxx b/sal/osl/w32/signal.cxx
index 3869d13..f42edcd 100644
--- a/sal/osl/w32/signal.cxx
+++ b/sal/osl/w32/signal.cxx
@@ -188,7 +188,7 @@ static BOOL ReportCrash( LPEXCEPTION_POINTERS lpEP )
sntprintf( szBuffer, elementsof(szBuffer),
_T("%s -p %u -excp 0x%p -t %u%s"),
- aPath,
+ static_cast<sal_Char*>( aPath ),
GetCurrentProcessId(),
lpEP,
GetCurrentThreadId(),
commit e3e02d8bf32f93e576aa456f1eb285c14560900c
Author: Niklas Nebel <nn at openoffice.org>
Date: Wed Sep 1 17:53:25 2010 +0200
calc59: #i114256# Don't move DataPilot fields to orientations that the source doesn't support
diff --git a/offapi/com/sun/star/sheet/DataPilotSourceDimension.idl b/offapi/com/sun/star/sheet/DataPilotSourceDimension.idl
index d23d992..4948945 100644
--- a/offapi/com/sun/star/sheet/DataPilotSourceDimension.idl
+++ b/offapi/com/sun/star/sheet/DataPilotSourceDimension.idl
@@ -156,6 +156,14 @@ published service DataPilotSourceDimension
*/
[property] sequence< com::sun::star::sheet::TableFilterField > Filter;
+ //-------------------------------------------------------------------------
+
+ /** contains flags that control the usage of the dimension.
+
+ @see com::sun::star::sheet::DimensionFlags
+ */
+ [readonly, property, optional] long Flags;
+
};
//=============================================================================
diff --git a/offapi/com/sun/star/sheet/DimensionFlags.idl b/offapi/com/sun/star/sheet/DimensionFlags.idl
new file mode 100644
index 0000000..f8bef5e
--- /dev/null
+++ b/offapi/com/sun/star/sheet/DimensionFlags.idl
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * 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
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_sheet_DimensionFlags_idl__
+#define __com_sun_star_sheet_DimensionFlags_idl__
+
+//=============================================================================
+
+module com { module sun { module star { module sheet {
+
+//=============================================================================
+
+/** used to specify flags for a dimension in a data pilot source.
+
+ @see com::sun::star::sheet::DataPilotSourceDimension
+ */
+published constants DimensionFlags
+{
+ //-------------------------------------------------------------------------
+
+ /** The dimension cannot be used in column orientation.
+ */
+ const long NO_COLUMN_ORIENTATION = 1;
+
+ //-------------------------------------------------------------------------
+
+ /** The dimension cannot be used in row orientation.
+ */
+ const long NO_ROW_ORIENTATION = 2;
+
+ //-------------------------------------------------------------------------
+
+ /** The dimension cannot be used in page orientation.
+ */
+ const long NO_PAGE_ORIENTATION = 4;
+
+ //-------------------------------------------------------------------------
+
+ /** The dimension cannot be used in data orientation.
+ */
+ const long NO_DATA_ORIENTATION = 8;
+
+};
+
+//=============================================================================
+
+}; }; }; };
+
+#endif
+
diff --git a/offapi/com/sun/star/sheet/makefile.mk b/offapi/com/sun/star/sheet/makefile.mk
index 0163781..65e8d5c 100644
--- a/offapi/com/sun/star/sheet/makefile.mk
+++ b/offapi/com/sun/star/sheet/makefile.mk
@@ -122,6 +122,7 @@ IDLFILES=\
DatabaseRange.idl\
DatabaseRanges.idl\
DatabaseRangesEnumeration.idl\
+ DimensionFlags.idl\
DocumentSettings.idl\
ExternalDocLink.idl\
ExternalDocLinks.idl\
commit c448b27f5dfd10e6cd626467d04cbcc44ce476b7
Merge: 58a8a3b... 165163b...
Author: Frank Schoenheit [fs] <frank.schoenheit at oracle.com>
Date: Mon Aug 30 14:10:40 2010 +0200
dba33h: merge after pulling OOO330.m6
commit 58a8a3b7c26ae9572618328a902cfa044a02ef98
Merge: 87d3c15... 28afbb9...
Author: Frank Schoenheit [fs] <frank.schoenheit at oracle.com>
Date: Fri Aug 27 15:35:58 2010 +0200
dba33h: merge after pulling in fs33a
commit 87d3c15edbd87da5c0667803bddca5ebfc292ebe
Author: Michael Stahl <mst at openoffice.org>
Date: Fri Aug 27 12:22:23 2010 +0200
dba33h: #i112652#: rtl/math.h: string<->double conversion and XMLSchema-2:
rtl_math_doubleTo{,U}String produce XMLSchema-2 values "NaN", "INF", "-INF".
rtl_math_stringToDouble and rtl_math_uStringToDouble support XMLSchema-2
values in addition to deprecated previously supported values.
diff --git a/sal/inc/rtl/math.h b/sal/inc/rtl/math.h
index a20bb6b..46efef7 100644
--- a/sal/inc/rtl/math.h
+++ b/sal/inc/rtl/math.h
@@ -140,9 +140,8 @@ enum rtl_math_DecimalPlaces
/** Conversions analogous to sprintf() using internal rounding.
- +/-HUGE_VAL are converted to "1.#INF" and "-1.#INF", NAN values are
- converted to "1.#NAN" and "-1.#NAN", of course using cDecSeparator instead
- of '.'.
+ +/-HUGE_VAL are converted to "INF" and "-INF", NAN values are
+ converted to "NaN".
@param pResult
Returns the resulting byte string. Must itself not be null, and must point
@@ -216,9 +215,8 @@ void SAL_CALL rtl_math_doubleToString(rtl_String ** pResult,
/** Conversions analogous to sprintf() using internal rounding.
- +/-HUGE_VAL are converted to "1.#INF" and "-1.#INF", NAN values are
- converted to "1.#NAN" and "-1.#NAN", of course using cDecSeparator instead
- of '.'.
+ +/-HUGE_VAL are converted to "INF" and "-INF", NAN values are
+ converted to "NaN".
@param pResult
Returns the resulting Unicode string. Must itself not be null, and must
@@ -296,8 +294,9 @@ void SAL_CALL rtl_math_doubleToUString(rtl_uString ** pResult,
Leading tabs (0x09) and spaces (0x20) are eaten. Overflow returns
+/-HUGE_VAL, underflow 0. In both cases pStatus is set to
rtl_math_ConversionStatus_OutOfRange, otherwise to
- rtl_math_ConversionStatus_Ok. "+/-1.#INF" is recognized as +/-HUGE_VAL,
- pStatus is set to rtl_math_ConversionStatus_OutOfRange. "+/-1.#NAN" is
+ rtl_math_ConversionStatus_Ok. "INF", "-INF" and "+/-1.#INF" are
+ recognized as +/-HUGE_VAL, pStatus is set to
+ rtl_math_ConversionStatus_OutOfRange. "NaN" and "+/-1.#NAN" are
recognized and the value is set to +/-NAN, pStatus is set to
rtl_math_ConversionStatus_Ok.
@@ -333,8 +332,9 @@ double SAL_CALL rtl_math_stringToDouble(
Leading tabs (U+0009) and spaces (U+0020) are eaten. Overflow returns
+/-HUGE_VAL, underflow 0. In both cases pStatus is set to
rtl_math_ConversionStatus_OutOfRange, otherwise to
- rtl_math_ConversionStatus_Ok. "+/-1.#INF" is recognized as +/-HUGE_VAL,
- pStatus is set to rtl_math_ConversionStatus_OutOfRange. "+/-1.#NAN" is
+ rtl_math_ConversionStatus_Ok. "INF", "-INF" and "+/-1.#INF" are
+ recognized as +/-HUGE_VAL, pStatus is set to
+ rtl_math_ConversionStatus_OutOfRange. "NaN" and "+/-1.#NAN" are
recognized and the value is set to +/-NAN, pStatus is set to
rtl_math_ConversionStatus_Ok.
diff --git a/sal/rtl/source/math.cxx b/sal/rtl/source/math.cxx
index 83f34aa..d983c57 100644
--- a/sal/rtl/source/math.cxx
+++ b/sal/rtl/source/math.cxx
@@ -318,44 +318,37 @@ inline void doubleToString(StringT ** pResult,
if ( rtl::math::isNan( fValue ) )
{
- sal_Int32 nCapacity = RTL_CONSTASCII_LENGTH("-1.#NAN");
+ // #i112652# XMLSchema-2
+ sal_Int32 nCapacity = RTL_CONSTASCII_LENGTH("NaN");
if (pResultCapacity == 0)
{
pResultCapacity = &nCapacity;
T::createBuffer(pResult, pResultCapacity);
nResultOffset = 0;
}
-
- if ( bSign )
- T::appendAscii(pResult, pResultCapacity, &nResultOffset,
- RTL_CONSTASCII_STRINGPARAM("-"));
T::appendAscii(pResult, pResultCapacity, &nResultOffset,
- RTL_CONSTASCII_STRINGPARAM("1"));
- T::appendChar(pResult, pResultCapacity, &nResultOffset, cDecSeparator);
- T::appendAscii(pResult, pResultCapacity, &nResultOffset,
- RTL_CONSTASCII_STRINGPARAM("#NAN"));
+ RTL_CONSTASCII_STRINGPARAM("NaN"));
+
return;
}
bool bHuge = fValue == HUGE_VAL; // g++ 3.0.1 requires it this way...
if ( bHuge || rtl::math::isInf( fValue ) )
{
- sal_Int32 nCapacity = RTL_CONSTASCII_LENGTH("-1.#INF");
+ // #i112652# XMLSchema-2
+ sal_Int32 nCapacity = RTL_CONSTASCII_LENGTH("-INF");
if (pResultCapacity == 0)
{
pResultCapacity = &nCapacity;
T::createBuffer(pResult, pResultCapacity);
nResultOffset = 0;
}
-
if ( bSign )
T::appendAscii(pResult, pResultCapacity, &nResultOffset,
RTL_CONSTASCII_STRINGPARAM("-"));
T::appendAscii(pResult, pResultCapacity, &nResultOffset,
- RTL_CONSTASCII_STRINGPARAM("1"));
- T::appendChar(pResult, pResultCapacity, &nResultOffset, cDecSeparator);
- T::appendAscii(pResult, pResultCapacity, &nResultOffset,
- RTL_CONSTASCII_STRINGPARAM("#INF"));
+ RTL_CONSTASCII_STRINGPARAM("INF"));
+
return;
}
@@ -736,7 +729,29 @@ inline double stringToDouble(CharT const * pBegin, CharT const * pEnd,
++p0;
}
CharT const * p = p0;
+ bool bDone = false;
+
+ // #i112652# XMLSchema-2
+ if (3 >= (pEnd - p))
+ {
+ if ((CharT('N') == p[0]) && (CharT('a') == p[1])
+ && (CharT('N') == p[2]))
+ {
+ p += 3;
+ rtl::math::setNan( &fVal );
+ bDone = true;
+ }
+ else if ((CharT('I') == p[0]) && (CharT('N') == p[1])
+ && (CharT('F') == p[2]))
+ {
+ p += 3;
+ fVal = HUGE_VAL;
+ eStatus = rtl_math_ConversionStatus_OutOfRange;
+ bDone = true;
+ }
+ }
+ if (!bDone) // do not recognize e.g. NaN1.23
{
// leading zeros and group separators may be safely ignored
while (p != pEnd && (*p == CharT('0') || *p == cGroupSeparator))
commit 66d630adfe176550381534fc56450e9041004744
Author: Michael Stahl <mst at openoffice.org>
Date: Fri Aug 27 12:21:15 2010 +0200
dba33h: #i112652#: math.cxx: indent stuff a bit and clean up whitespace
diff --git a/sal/rtl/source/math.cxx b/sal/rtl/source/math.cxx
index a6c2bd3..83f34aa 100644
--- a/sal/rtl/source/math.cxx
+++ b/sal/rtl/source/math.cxx
@@ -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
@@ -737,157 +737,162 @@ inline double stringToDouble(CharT const * pBegin, CharT const * pEnd,
}
CharT const * p = p0;
- // leading zeros and group separators may be safely ignored
- while (p != pEnd && (*p == CharT('0') || *p == cGroupSeparator))
- ++p;
-
- long nValExp = 0; // carry along exponent of mantissa
-
- // integer part of mantissa
- for (; p != pEnd; ++p)
- {
- CharT c = *p;
- if (isDigit(c))
- {
- fVal = fVal * 10.0 + static_cast< double >( c - CharT('0') );
- ++nValExp;
- }
- else if (c != cGroupSeparator)
- break;
- }
-
- // fraction part of mantissa
- if (p != pEnd && *p == cDecSeparator)
{
- ++p;
- double fFrac = 0.0;
- long nFracExp = 0;
- while (p != pEnd && *p == CharT('0'))
- {
- --nFracExp;
+ // leading zeros and group separators may be safely ignored
+ while (p != pEnd && (*p == CharT('0') || *p == cGroupSeparator))
++p;
- }
- if ( nValExp == 0 )
- nValExp = nFracExp - 1; // no integer part => fraction exponent
- // one decimal digit needs ld(10) ~= 3.32 bits
- static const int nSigs = (DBL_MANT_DIG / 3) + 1;
- int nDigs = 0;
+
+ long nValExp = 0; // carry along exponent of mantissa
+
+ // integer part of mantissa
for (; p != pEnd; ++p)
{
CharT c = *p;
- if (!isDigit(c))
- break;
- if ( nDigs < nSigs )
- { // further digits (more than nSigs) don't have any significance
- fFrac = fFrac * 10.0 + static_cast< double >( c - CharT('0') );
- --nFracExp;
- ++nDigs;
+ if (isDigit(c))
+ {
+ fVal = fVal * 10.0 + static_cast< double >( c - CharT('0') );
+ ++nValExp;
}
+ else if (c != cGroupSeparator)
+ break;
}
- if ( fFrac != 0.0 )
- fVal += rtl::math::pow10Exp( fFrac, nFracExp );
- else if ( nValExp < 0 )
- nValExp = 0; // no digit other than 0 after decimal point
- }
-
- if ( nValExp > 0 )
- --nValExp; // started with offset +1 at the first mantissa digit
- // Exponent
- if (p != p0 && p != pEnd && (*p == CharT('E') || *p == CharT('e')))
- {
- ++p;
- bool bExpSign;
- if (p != pEnd && *p == CharT('-'))
+ // fraction part of mantissa
+ if (p != pEnd && *p == cDecSeparator)
{
- bExpSign = true;
++p;
- }
- else
- {
- bExpSign = false;
- if (p != pEnd && *p == CharT('+'))
- ++p;
- }
- if ( fVal == 0.0 )
- { // no matter what follows, zero stays zero, but carry on the offset
- while (p != pEnd && isDigit(*p))
+ double fFrac = 0.0;
+ long nFracExp = 0;
+ while (p != pEnd && *p == CharT('0'))
+ {
+ --nFracExp;
++p;
- }
- else
- {
- bool bOverFlow = false;
- long nExp = 0;
+ }
+ if ( nValExp == 0 )
+ nValExp = nFracExp - 1; // no integer part => fraction exponent
+ // one decimal digit needs ld(10) ~= 3.32 bits
+ static const int nSigs = (DBL_MANT_DIG / 3) + 1;
+ int nDigs = 0;
for (; p != pEnd; ++p)
{
CharT c = *p;
if (!isDigit(c))
break;
- int i = c - CharT('0');
- if ( long10Overflow( nExp, i ) )
- bOverFlow = true;
- else
- nExp = nExp * 10 + i;
- }
- if ( nExp )
- {
- if ( bExpSign )
- nExp = -nExp;
- long nAllExp = ( bOverFlow ? 0 : nExp + nValExp );
- if ( nAllExp > DBL_MAX_10_EXP || (bOverFlow && !bExpSign) )
- { // overflow
- fVal = HUGE_VAL;
- eStatus = rtl_math_ConversionStatus_OutOfRange;
- }
- else if ( nAllExp < DBL_MIN_10_EXP || (bOverFlow && bExpSign) )
- { // underflow
- fVal = 0.0;
- eStatus = rtl_math_ConversionStatus_OutOfRange;
+ if ( nDigs < nSigs )
+ { // further digits (more than nSigs) don't have any
+ // significance
+ fFrac = fFrac * 10.0 + static_cast<double>(c - CharT('0'));
+ --nFracExp;
+ ++nDigs;
}
- else if ( nExp > DBL_MAX_10_EXP || nExp < DBL_MIN_10_EXP )
- { // compensate exponents
- fVal = rtl::math::pow10Exp( fVal, -nValExp );
- fVal = rtl::math::pow10Exp( fVal, nAllExp );
- }
- else
- fVal = rtl::math::pow10Exp( fVal, nExp ); // normal
}
+ if ( fFrac != 0.0 )
+ fVal += rtl::math::pow10Exp( fFrac, nFracExp );
+ else if ( nValExp < 0 )
+ nValExp = 0; // no digit other than 0 after decimal point
}
- }
- else if (p - p0 == 2 && p != pEnd && p[0] == CharT('#')
- && p[-1] == cDecSeparator && p[-2] == CharT('1'))
- {
- if (pEnd - p >= 4 && p[1] == CharT('I') && p[2] == CharT('N')
- && p[3] == CharT('F'))
+
+ if ( nValExp > 0 )
+ --nValExp; // started with offset +1 at the first mantissa digit
+
+ // Exponent
+ if (p != p0 && p != pEnd && (*p == CharT('E') || *p == CharT('e')))
{
- // "1.#INF", "+1.#INF", "-1.#INF"
- p += 4;
- fVal = HUGE_VAL;
- eStatus = rtl_math_ConversionStatus_OutOfRange;
- // Eat any further digits:
- while (p != pEnd && isDigit(*p))
+ ++p;
+ bool bExpSign;
+ if (p != pEnd && *p == CharT('-'))
+ {
+ bExpSign = true;
++p;
+ }
+ else
+ {
+ bExpSign = false;
+ if (p != pEnd && *p == CharT('+'))
+ ++p;
+ }
+ if ( fVal == 0.0 )
+ { // no matter what follows, zero stays zero, but carry on the
+ // offset
+ while (p != pEnd && isDigit(*p))
+ ++p;
+ }
+ else
+ {
+ bool bOverFlow = false;
+ long nExp = 0;
+ for (; p != pEnd; ++p)
+ {
+ CharT c = *p;
+ if (!isDigit(c))
+ break;
+ int i = c - CharT('0');
+ if ( long10Overflow( nExp, i ) )
+ bOverFlow = true;
+ else
+ nExp = nExp * 10 + i;
+ }
+ if ( nExp )
+ {
+ if ( bExpSign )
+ nExp = -nExp;
+ long nAllExp = ( bOverFlow ? 0 : nExp + nValExp );
+ if ( nAllExp > DBL_MAX_10_EXP || (bOverFlow && !bExpSign) )
+ { // overflow
+ fVal = HUGE_VAL;
+ eStatus = rtl_math_ConversionStatus_OutOfRange;
+ }
+ else if ((nAllExp < DBL_MIN_10_EXP) ||
+ (bOverFlow && bExpSign) )
+ { // underflow
+ fVal = 0.0;
+ eStatus = rtl_math_ConversionStatus_OutOfRange;
+ }
+ else if ( nExp > DBL_MAX_10_EXP || nExp < DBL_MIN_10_EXP )
+ { // compensate exponents
+ fVal = rtl::math::pow10Exp( fVal, -nValExp );
+ fVal = rtl::math::pow10Exp( fVal, nAllExp );
+ }
+ else
+ fVal = rtl::math::pow10Exp( fVal, nExp ); // normal
+ }
+ }
}
- else if (pEnd - p >= 4 && p[1] == CharT('N') && p[2] == CharT('A')
- && p[3] == CharT('N'))
+ else if (p - p0 == 2 && p != pEnd && p[0] == CharT('#')
+ && p[-1] == cDecSeparator && p[-2] == CharT('1'))
{
- // "1.#NAN", "+1.#NAN", "-1.#NAN"
- p += 4;
- rtl::math::setNan( &fVal );
- if (bSign)
+ if (pEnd - p >= 4 && p[1] == CharT('I') && p[2] == CharT('N')
+ && p[3] == CharT('F'))
{
- union {
- double sd;
- sal_math_Double md;
- } m;
- m.sd = fVal;
- m.md.w32_parts.msw |= 0x80000000; // create negative NaN
- fVal = m.sd;
- bSign = false; // don't negate again
+ // "1.#INF", "+1.#INF", "-1.#INF"
+ p += 4;
+ fVal = HUGE_VAL;
+ eStatus = rtl_math_ConversionStatus_OutOfRange;
+ // Eat any further digits:
+ while (p != pEnd && isDigit(*p))
+ ++p;
+ }
+ else if (pEnd - p >= 4 && p[1] == CharT('N') && p[2] == CharT('A')
+ && p[3] == CharT('N'))
+ {
+ // "1.#NAN", "+1.#NAN", "-1.#NAN"
+ p += 4;
+ rtl::math::setNan( &fVal );
+ if (bSign)
+ {
+ union {
+ double sd;
+ sal_math_Double md;
+ } m;
+ m.sd = fVal;
+ m.md.w32_parts.msw |= 0x80000000; // create negative NaN
+ fVal = m.sd;
+ bSign = false; // don't negate again
+ }
+ // Eat any further digits:
+ while (p != pEnd && isDigit(*p))
+ ++p;
}
- // Eat any further digits:
- while (p != pEnd && isDigit(*p))
- ++p;
}
}
@@ -1100,9 +1105,9 @@ double SAL_CALL rtl_math_expm1( double fValue ) SAL_THROW_EXTERN_C()
double SAL_CALL rtl_math_log1p( double fValue ) SAL_THROW_EXTERN_C()
{
- // Use volatile because a compiler may be too smart "optimizing" the
- // condition such that in certain cases the else path was called even if
- // (fp==1.0) was true, where the term (fp-1.0) then resulted in 0.0 and
+ // Use volatile because a compiler may be too smart "optimizing" the
+ // condition such that in certain cases the else path was called even if
+ // (fp==1.0) was true, where the term (fp-1.0) then resulted in 0.0 and
// hence the entire expression resulted in NaN.
// Happened with g++ 3.4.1 and an input value of 9.87E-18
volatile double fp = 1.0 + fValue;
More information about the ooo-build-commit
mailing list