[Libreoffice-commits] core.git: sw/source
Eike Rathke
erack at redhat.com
Fri Jul 21 17:28:22 UTC 2017
sw/source/core/fields/flddat.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 7b0607aa7d42e3ea4c1623d65b124970abc04d79
Author: Eike Rathke <erack at redhat.com>
Date: Fri Jul 21 17:17:27 2017 +0200
Initializing Date with an arbitrary day count is nonsense
It works here because Date is ignored and only Time is returned, so just init
empty. The original value was a double date.time since null date.
Change-Id: If420769464860481416b0da172ddd2e17c13e641
diff --git a/sw/source/core/fields/flddat.cxx b/sw/source/core/fields/flddat.cxx
index a611e088eb36..a8c0b6457594 100644
--- a/sw/source/core/fields/flddat.cxx
+++ b/sw/source/core/fields/flddat.cxx
@@ -152,7 +152,7 @@ tools::Time SwDateTimeField::GetTime() const
{
double fDummy;
double fFract = modf(GetValue(), &fDummy);
- DateTime aDT(Date(static_cast<sal_Int32>(fDummy)));
+ DateTime aDT( DateTime::EMPTY );
aDT.AddTime(fFract);
return static_cast<tools::Time>(aDT);
}
More information about the Libreoffice-commits
mailing list