summaryrefslogtreecommitdiff
path: root/cosv/source
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2004-11-15 12:46:46 +0000
committerOliver Bolte <obo@openoffice.org>2004-11-15 12:46:46 +0000
commitea1fd030441269c6c72b27c682a856f269ee571e (patch)
tree9e4e2ce5cde0e37c1b52dd557d31c20b402fbcf7 /cosv/source
parentceb7fe0f99d6c102b1ed6dffdc602cbc17790463 (diff)
INTEGRATION: CWS adc9 (1.9.8); FILE MERGED
2004/11/10 15:01:16 np 1.9.8.2: #i31023# 2004/11/09 16:38:51 np 1.9.8.1: #i34735# While fixing that, an error in streaming numbers with class csv::StreamStr had to be fixed.
Diffstat (limited to 'cosv/source')
-rw-r--r--cosv/source/strings/streamstr.cxx15
1 files changed, 8 insertions, 7 deletions
diff --git a/cosv/source/strings/streamstr.cxx b/cosv/source/strings/streamstr.cxx
index ce1334683d6a..c5ea2bb0e2a8 100644
--- a/cosv/source/strings/streamstr.cxx
+++ b/cosv/source/strings/streamstr.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: streamstr.cxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: rt $ $Date: 2004-07-12 15:48:01 $
+ * last change: $Author: obo $ $Date: 2004-11-15 13:46:46 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -76,9 +76,10 @@
namespace csv
{
-const uintt C_short_max_size = sizeof(short) / 2 + 1;
-const uintt C_int_max_size = sizeof(int) / 2 + 1;
-const uintt C_long_max_size = sizeof(long) / 2 + 1;
+// Maximal sizes of resulting integers in text form:
+const uintt C_short_max_size = sizeof(short) * 3;
+const uintt C_int_max_size = sizeof(int) * 3;
+const uintt C_long_max_size = sizeof(long) * 3;
inline void
@@ -687,7 +688,7 @@ StreamStr::to_lower( position_type i_nStart,
++pChange )
{
*pChange = (*pChange & char(0x80)) == '\0'
- ? cLower[*pChange]
+ ? cLower[ UINT8(*pChange) ]
: *pChange;
}
}
@@ -718,7 +719,7 @@ StreamStr::to_upper( position_type i_nStart,
++pChange )
{
*pChange = (*pChange & char(0x80)) == '\0'
- ? cUpper[*pChange]
+ ? cUpper[ UINT8(*pChange) ]
: *pChange;
}
}