summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2017-07-20 18:32:57 +0200
committerEike Rathke <erack@redhat.com>2017-07-21 12:24:27 +0200
commitfcd0361d6be8d088be12e500f0120afd7995d1ac (patch)
tree9e18c0310405d68d9151db9073cc8f6926df077d /xmloff
parent2e486daff35ab16e810bfdafb24b19bcbf2fe8cd (diff)
Eliminate Date::operator+=() and -=() and replace with Date::AddDays()
Clarifies code and gets rid of explicitly casting the operand to sal_Int32. Also in preparation of removing DateTime::operator+=(sal_Int32) that is confusingly similar to DateTime::operator+=(double) and just depends on type. Change-Id: I83422e2940fbb017978db9b5734b4966228af3de Reviewed-on: https://gerrit.libreoffice.org/40248 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/core/xmluconv.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmloff/source/core/xmluconv.cxx b/xmloff/source/core/xmluconv.cxx
index d65ad047c130..7aaa01c25d8e 100644
--- a/xmloff/source/core/xmluconv.cxx
+++ b/xmloff/source/core/xmluconv.cxx
@@ -321,7 +321,7 @@ void SvXMLUnitConverter::convertDateTime( OUStringBuffer& rBuffer,
double fValue = fDateTime;
sal_Int32 nValue = static_cast <sal_Int32> (::rtl::math::approxFloor (fValue));
Date aDate (aTempNullDate.Day, aTempNullDate.Month, aTempNullDate.Year);
- aDate += nValue;
+ aDate.AddDays( nValue);
fValue -= nValue;
double fCount;
if (nValue > 0)
@@ -371,7 +371,7 @@ void SvXMLUnitConverter::convertDateTime( OUStringBuffer& rBuffer,
if (fHoursValue >= 24.0)
{
fHoursValue -= 24.0;
- aDate += 1;
+ aDate.AddDays(1);
}
}
sal_Int16 nTempYear = aDate.GetYear();