diff options
author | Eike Rathke <erack@redhat.com> | 2017-07-20 18:32:57 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2017-07-21 12:24:27 +0200 |
commit | fcd0361d6be8d088be12e500f0120afd7995d1ac (patch) | |
tree | 9e18c0310405d68d9151db9073cc8f6926df077d /sc/source/ui/cctrl | |
parent | 2e486daff35ab16e810bfdafb24b19bcbf2fe8cd (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 'sc/source/ui/cctrl')
-rw-r--r-- | sc/source/ui/cctrl/checklistmenu.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx index 9a04bad76bc1..b5729dc4b47d 100644 --- a/sc/source/ui/cctrl/checklistmenu.cxx +++ b/sc/source/ui/cctrl/checklistmenu.cxx @@ -1435,7 +1435,7 @@ void ScCheckListMenuWindow::addDateMember(const OUString& rsName, double nVal, b // Convert the numeric date value to a date object. Date aDate = pFormatter->GetNullDate(); - aDate += static_cast<sal_Int32>(rtl::math::approxFloor(nVal)); + aDate.AddDays(rtl::math::approxFloor(nVal)); sal_Int16 nYear = aDate.GetYear(); sal_uInt16 nMonth = aDate.GetMonth(); |