diff options
author | Eike Rathke <erack@redhat.com> | 2023-06-21 10:48:40 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2023-06-21 12:48:51 +0200 |
commit | ea4f47752391cecef670cbefc9dbfc8b51182c49 (patch) | |
tree | 79ee7e82b571d941808c510ba5c271d25fdc4eb3 /sc/source/ui/docshell | |
parent | ba54ce4c65b2fcaa549ec3962604c4d5c9bd10fd (diff) |
sc: Use DateTime::Sub() instead of operator-()
Change-Id: Ib73eec1c11ced76890b8eacb0079ae336072a4c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153379
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
Diffstat (limited to 'sc/source/ui/docshell')
-rw-r--r-- | sc/source/ui/docshell/impex.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index c405fb2c45a3..970e75aadd9e 100644 --- a/sc/source/ui/docshell/impex.cxx +++ b/sc/source/ui/docshell/impex.cxx @@ -1426,8 +1426,9 @@ static bool lcl_PutString( pCalendar->setValue( i18n::CalendarFieldIndex::MILLISECOND, 0 ); if ( pCalendar->isValid() ) { - double fDiff = DateTime(pDocFormatter->GetNullDate()) - - pCalendar->getEpochStart(); + // Whole days diff. + double fDiff = DateTime::Sub( DateTime(pDocFormatter->GetNullDate()), + pCalendar->getEpochStart()); // #i14974# must use getLocalDateTime to get the same // date values as set above double fDays = pCalendar->getLocalDateTime() + fFrac; |