summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Lippka <cl@openoffice.org>2001-02-15 16:32:58 +0000
committerChristian Lippka <cl@openoffice.org>2001-02-15 16:32:58 +0000
commit144c64b87eccaced203a4ff802f10642b77fb5c4 (patch)
treeae5f1946c242148e663f78c0e09d8f2ebf986313
parent856b3424e264527bd9d768b283f5514650265b1e (diff)
fixed a precission problem with time conversion
-rw-r--r--xmloff/source/core/xmluconv.cxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/xmloff/source/core/xmluconv.cxx b/xmloff/source/core/xmluconv.cxx
index c2e65d0263b6..2366cc84b887 100644
--- a/xmloff/source/core/xmluconv.cxx
+++ b/xmloff/source/core/xmluconv.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmluconv.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: cl $ $Date: 2001-01-30 12:25:31 $
+ * last change: $Author: cl $ $Date: 2001-02-15 17:32:58 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -686,7 +686,7 @@ void SvXMLUnitConverter::convertTime( ::rtl::OUStringBuffer& rBuffer,
double fSecsValue = SolarMath::ApproxFloor (fValue);
fValue -= fSecsValue;
double f100SecsValue;
- if (fValue > 0.0)
+ if (fValue > 0.00001)
{
String sTemp;
SolarMath::DoubleToString(sTemp, fValue, 'A', XML_MAXDIGITSCOUNT_TIME - 5, '.', sal_True);
@@ -899,7 +899,10 @@ sal_Bool SvXMLUnitConverter::convertTime( ::com::sun::star::util::DateTime& rDat
fTempTime *= 60;
double fSecsValue = SolarMath::ApproxFloor (fTempTime);
fTempTime -= fSecsValue;
- double f100SecsValue = fTempTime;
+ double f100SecsValue = 0.0;
+
+ if( fTempTime > 0.00001 )
+ f100SecsValue = fTempTime;
rDateTime.Year = 0;
rDateTime.Month = 0;