summaryrefslogtreecommitdiff
path: root/sal/rtl
diff options
context:
space:
mode:
authorStephan Bergmann <sb@openoffice.org>2002-11-05 10:01:37 +0000
committerStephan Bergmann <sb@openoffice.org>2002-11-05 10:01:37 +0000
commit8aad2d272598d001db027d8a35d350acbbc6be24 (patch)
tree2c765eef9895839f53bc991b72a968978c1288f6 /sal/rtl
parentde738294dc040136f37f4552ffd6d05deadce0a7 (diff)
#103888# Fixed/clarified printing of exponent.
Diffstat (limited to 'sal/rtl')
-rw-r--r--sal/rtl/source/math.cxx8
-rw-r--r--sal/rtl/source/string.c6
-rw-r--r--sal/rtl/source/ustring.c8
3 files changed, 12 insertions, 10 deletions
diff --git a/sal/rtl/source/math.cxx b/sal/rtl/source/math.cxx
index 8a32dc774..b4f90436e 100644
--- a/sal/rtl/source/math.cxx
+++ b/sal/rtl/source/math.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: math.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: sb $ $Date: 2002-11-05 10:47:49 $
+ * last change: $Author: sb $ $Date: 2002-11-05 11:01:37 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -486,7 +486,9 @@ inline void doubleToString(StringT ** pResult,
p--;
}
- // print the exponent (dreistellig)
+ // Print the exponent ('E', followed by '+' or '-', followed by exactly
+ // three digits). The code in rtl_[u]str_valueOf{Float|Double} relies on
+ // this format.
if( eFormat == rtl_math_StringFormat_E )
{
if ( p == pBuf )
diff --git a/sal/rtl/source/string.c b/sal/rtl/source/string.c
index c64623fd7..3034ad1aa 100644
--- a/sal/rtl/source/string.c
+++ b/sal/rtl/source/string.c
@@ -2,9 +2,9 @@
*
* $RCSfile: string.c,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: sb $ $Date: 2002-11-04 15:36:32 $
+ * last change: $Author: sb $ $Date: 2002-11-05 11:01:36 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -120,7 +120,7 @@ sal_Int32 SAL_CALL rtl_str_valueOfFloat(sal_Char * pStr, float f)
sal_Int32 nLen;
rtl_math_doubleToString(
&pResult, 0, 0, f, rtl_math_StringFormat_G,
- RTL_STR_MAX_VALUEOFFLOAT - RTL_CONSTASCII_LENGTH("-x.E-xx"), '.', 0, 0,
+ RTL_STR_MAX_VALUEOFFLOAT - RTL_CONSTASCII_LENGTH("-x.E-xxx"), '.', 0, 0,
sal_True);
nLen = pResult->length;
OSL_ASSERT(nLen < RTL_STR_MAX_VALUEOFFLOAT);
diff --git a/sal/rtl/source/ustring.c b/sal/rtl/source/ustring.c
index a08118866..45333329e 100644
--- a/sal/rtl/source/ustring.c
+++ b/sal/rtl/source/ustring.c
@@ -2,9 +2,9 @@
*
* $RCSfile: ustring.c,v $
*
- * $Revision: 1.15 $
+ * $Revision: 1.16 $
*
- * last change: $Author: sb $ $Date: 2002-11-04 15:36:36 $
+ * last change: $Author: sb $ $Date: 2002-11-05 11:01:37 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -120,8 +120,8 @@ sal_Int32 SAL_CALL rtl_ustr_valueOfFloat(sal_Unicode * pStr, float f)
sal_Int32 nLen;
rtl_math_doubleToUString(
&pResult, 0, 0, f, rtl_math_StringFormat_G,
- RTL_USTR_MAX_VALUEOFFLOAT - RTL_CONSTASCII_LENGTH("-x.E-xx"), '.', 0, 0,
- sal_True);
+ RTL_USTR_MAX_VALUEOFFLOAT - RTL_CONSTASCII_LENGTH("-x.E-xxx"), '.', 0,
+ 0, sal_True);
nLen = pResult->length;
OSL_ASSERT(nLen < RTL_USTR_MAX_VALUEOFFLOAT);
rtl_copyMemory(pStr, pResult->buffer, (nLen + 1) * sizeof(sal_Unicode));