dbertoni 01/07/26 22:34:17
Modified: c/src/XSLT FunctionFormatNumber.cpp
Log:
Implemented use of DecimalFormatSymbols in some cases.
Revision Changes Path
1.13 +32 -4 xml-xalan/c/src/XSLT/FunctionFormatNumber.cpp
Index: FunctionFormatNumber.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/FunctionFormatNumber.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- FunctionFormatNumber.cpp 2001/06/18 20:16:48 1.12
+++ FunctionFormatNumber.cpp 2001/07/27 05:34:17 1.13
@@ -214,11 +214,39 @@
const XalanDecimalFormatSymbols* theDFS,
XalanDOMString&
theResult)
{
- if (DoubleSupport::isNaN(theNumber) == true ||
- DoubleSupport::isNegativeInfinity(theNumber) == true ||
- DoubleSupport::isPositiveInfinity(theNumber) == true )
+ if (DoubleSupport::isNaN(theNumber) == true)
{
- DoubleToDOMString(theNumber, theResult);
+ if (theDFS != 0)
+ {
+ theResult = theDFS->getNaN();
+ }
+ else
+ {
+ DoubleToDOMString(theNumber, theResult);
+ }
+ }
+ else if (DoubleSupport::isNegativeInfinity(theNumber) == true)
+ {
+ if (theDFS != 0)
+ {
+ theResult = theDFS->getMinusSign();
+ theResult += theDFS->getInfinity();
+ }
+ else
+ {
+ DoubleToDOMString(theNumber, theResult);
+ }
+ }
+ else if (DoubleSupport::isPositiveInfinity(theNumber) == true )
+ {
+ if (theDFS != 0)
+ {
+ theResult = theDFS->getInfinity();
+ }
+ else
+ {
+ DoubleToDOMString(theNumber, theResult);
+ }
}
else
{
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]