summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorOcke Janssen <oj@openoffice.org>2000-11-22 07:50:33 +0000
committerOcke Janssen <oj@openoffice.org>2000-11-22 07:50:33 +0000
commit294c10929e53439bedfad42d1022eaa735baab74 (patch)
treea7e37af6aaf14bf18503658fa60b7e2905c8ec38 /comphelper
parentc3931c70a94deef471cf50e0a7b3a233bce7604e (diff)
initialize the values with zero
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/misc/types.cxx33
1 files changed, 27 insertions, 6 deletions
diff --git a/comphelper/source/misc/types.cxx b/comphelper/source/misc/types.cxx
index c58973c69d14..7b4f864d4b7b 100644
--- a/comphelper/source/misc/types.cxx
+++ b/comphelper/source/misc/types.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: types.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: fs $ $Date: 2000-11-19 15:19:50 $
+ * last change: $Author: oj $ $Date: 2000-11-22 08:50:33 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -111,32 +111,49 @@ using namespace ::com::sun::star::lang;
//------------------------------------------------------------------------------
sal_Int32 getINT32(const Any& _rAny)
{
- sal_Int32 nReturn;
+ sal_Int32 nReturn = 0;
+#ifdef DEBUG
+ OSL_ENSHURE(_rAny >>= nReturn,"stream any failed!");
+#else
_rAny >>= nReturn;
+#endif
+
return nReturn;
}
//------------------------------------------------------------------------------
sal_Int16 getINT16(const Any& _rAny)
{
- sal_Int16 nReturn;
+ sal_Int16 nReturn = 0;
+#ifdef DEBUG
+ OSL_ENSHURE(_rAny >>= nReturn,"stream any failed!");
+#else
_rAny >>= nReturn;
+#endif
return nReturn;
}
//------------------------------------------------------------------------------
double getDouble(const Any& _rAny)
{
- double nReturn;
+ double nReturn = 0.0;
+#ifdef DEBUG
+ OSL_ENSHURE(_rAny >>= nReturn,"stream any failed!");
+#else
_rAny >>= nReturn;
+#endif
return nReturn;
}
//------------------------------------------------------------------------------
float getFloat(const Any& _rAny)
{
- float nReturn;
+ float nReturn = 0.0;
+#ifdef DEBUG
+ OSL_ENSHURE(_rAny >>= nReturn,"stream any failed!");
+#else
_rAny >>= nReturn;
+#endif
return nReturn;
}
@@ -144,7 +161,11 @@ float getFloat(const Any& _rAny)
::rtl::OUString getString(const Any& _rAny)
{
::rtl::OUString nReturn;
+#ifdef DEBUG
+ OSL_ENSHURE(_rAny >>= nReturn,"stream any failed!");
+#else
_rAny >>= nReturn;
+#endif
return nReturn;
}