summaryrefslogtreecommitdiff
path: root/svtools/source/numbers
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2004-09-08 14:22:58 +0000
committerRüdiger Timm <rt@openoffice.org>2004-09-08 14:22:58 +0000
commit058ba1a2ea16f05fbfdd33e5c6a3a1782c3ab00c (patch)
tree72983c4f3f3bcf4bf07c9867afef631ae6824d80 /svtools/source/numbers
parent9c6be68aba8ffb0c5cdf885d1ebcaa6eb0b28ac9 (diff)
INTEGRATION: CWS ooo20040704 (1.58.34); FILE MERGED
2004/07/20 01:25:00 svesik 1.58.34.3: RESYNC: (1.58-1.59); FILE MERGED 2004/07/03 14:19:30 waratah 1.58.34.2: #i30874# Correct uninitiliased warnings 2004/07/02 23:59:20 waratah 1.58.34.1: #i30874# Add initial values to potentially uninitialised values
Diffstat (limited to 'svtools/source/numbers')
-rw-r--r--svtools/source/numbers/zformat.cxx25
1 files changed, 19 insertions, 6 deletions
diff --git a/svtools/source/numbers/zformat.cxx b/svtools/source/numbers/zformat.cxx
index e1177cdaebd6..1a65d5ad52d8 100644
--- a/svtools/source/numbers/zformat.cxx
+++ b/svtools/source/numbers/zformat.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: zformat.cxx,v $
*
- * $Revision: 1.59 $
+ * $Revision: 1.60 $
*
- * last change: $Author: hjs $ $Date: 2004-06-25 17:27:18 $
+ * last change: $Author: rt $ $Date: 2004-09-08 15:22:58 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1151,7 +1151,7 @@ short SvNumberformat::ImpNextSymbol(String& rString,
{
short eType = SYMBOLTYPE_FORMAT;
sal_Unicode cToken;
- sal_Unicode cLetter; // Zwischenergebnis
+ sal_Unicode cLetter = ' '; // Zwischenergebnis
xub_StrLen nLen = rString.Len();
ScanState eState = SsStart;
sSymbol.Erase();
@@ -1426,8 +1426,9 @@ NfHackConversion SvNumberformat::Load( SvStream& rStream,
rStream >> eType >> fLimit1 >> fLimit2
>> nOp1 >> nOp2 >> bStandard >> bIsUsed;
NfHackConversion eHackConversion = NF_CONVERT_NONE;
- BOOL bOldConvert;
- LanguageType eOldTmpLang, eOldNewLang;
+ BOOL bOldConvert = FALSE;
+ LanguageType eOldTmpLang = 0;
+ LanguageType eOldNewLang = 0;
if ( pHackConverter )
{ // werden nur hierbei gebraucht
bOldConvert = rScan.GetConvertMode();
@@ -2533,6 +2534,13 @@ BOOL SvNumberformat::ImpGetTimeOutput(double fNumber,
nMin = (nSeconds%3600) / 60;
nSec = nSeconds%60;
}
+ else {
+ // TODO What should these be set to?
+ nHour = 0;
+ nMin = 0;
+ nSec = 0;
+ }
+
sal_Unicode cAmPm = ' '; // a oder p
if (rInfo.nCntExp) // AM/PM
{
@@ -3045,6 +3053,11 @@ BOOL SvNumberformat::ImpGetDateTimeOutput(double fNumber,
nMin = (nSeconds%3600) / 60;
nSec = nSeconds%60;
}
+ else {
+ nHour = 0; // TODO What should these values be?
+ nMin = 0;
+ nSec = 0;
+ }
sal_Unicode cAmPm = ' '; // a oder p
if (rInfo.nCntExp) // AM/PM
{
@@ -4310,7 +4323,7 @@ void SvNumberformat::EraseComment( String& rStr )
BOOL bInString = FALSE;
BOOL bEscaped = FALSE;
BOOL bFound = FALSE;
- xub_StrLen nPos;
+ xub_StrLen nPos = 0;
while ( !bFound && *p )
{
switch ( *p )