[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    kspread - patch to fix bug #61350
From:       Ariya Hidayat <ariya () kde ! org>
Date:       2003-08-10 13:37:54
[Download RAW message or body]


Following is small patch to fix problem where entering "8:10" results as 
"8:10:01". Please review.


--- Temp\kspread_value_orig_0.cc	Sun Aug 10 13:32:24 2003
+++ koffice\kspread\kspread_value.cc	Sun Aug 10 13:30:16 2003
@@ -317,10 +317,10 @@ QDateTime KSpreadValue::asDateTime() con
  {
    QDateTime dt = QDate( 1899, 12, 31 );

-  double f = asFloat() - 1.0;
-  dt = dt.addDays( (int) f );
+  double f = asFloat();
    dt = dt.addSecs( (f-(int)f) * 86400 );
-
+  if( f > 1.0 ) dt = dt.addDays( (int) f-1 );
+
    return dt;
  }


_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic