summaryrefslogtreecommitdiff
path: root/basic/source/runtime/methods.cxx
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2017-07-18 23:23:24 +0200
committerEike Rathke <erack@redhat.com>2017-07-19 20:12:58 +0200
commit772b846c462e6465955769ed93cde046603073bb (patch)
treeec8f7a343e088feb8c42f6a57acf1ac891f71ade /basic/source/runtime/methods.cxx
parent4d783c45062d030d278c076d7817b9589fa77d91 (diff)
Change the most obvious Date+=(long)... to Date+=static_cast<sal_Int32>(...)
Simple search git grep -l 'Date.*[+-].*[(<] *long *[>)]' Since commit f5b0cc2a3690ba963b3f150886e1d5ddddee9530 Date: Sat Jul 1 16:01:15 2017 +0200 Date operators +,-,+=,-= have sal_Int32 operands instead of long. Change-Id: I2387cbceadcb056831225e4111353980d50a94d4 Reviewed-on: https://gerrit.libreoffice.org/40163 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'basic/source/runtime/methods.cxx')
-rw-r--r--basic/source/runtime/methods.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 478a59a0e1f2..92ae738a362b 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -1704,7 +1704,7 @@ sal_Int16 implGetDateDay( double aDate )
aDate -= 2.0; // standardize: 1.1.1900 => 0.0
aDate = floor( aDate );
Date aRefDate( 1, 1, 1900 );
- aRefDate += static_cast<long>(aDate);
+ aRefDate += static_cast<sal_Int32>(aDate);
sal_Int16 nRet = (sal_Int16)( aRefDate.GetDay() );
return nRet;
@@ -4674,7 +4674,7 @@ bool implDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay,
if (nAddMonths)
aCurDate.AddMonths( nAddMonths);
if (nAddDays)
- aCurDate += (long)nAddDays;
+ aCurDate += nAddDays;
}
long nDiffDays = GetDayDiff( aCurDate );