Kaydet (Commit) 42928054 authored tarafından Julien Nabet's avatar Julien Nabet Kaydeden (comit) Lionel Elie Mamane

tdf#92693: ReportBuilder: MINUTES() rounded to nearest for fractional minutes

... instead of the correct truncation.

Thanks to Lionel for the idea of the fix and his patience for newbies like me!

Change-Id: Iae9ec9251c0beb0c1856a6573f6ff7963d216256
Reviewed-on: https://gerrit.libreoffice.org/17012Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarLionel Elie Mamane <lionel@mamane.lu>
üst 74f9d980
...@@ -18,6 +18,7 @@ $(eval $(call gb_UnpackedTarball_fix_end_of_line,jfreereport_libformula,\ ...@@ -18,6 +18,7 @@ $(eval $(call gb_UnpackedTarball_fix_end_of_line,jfreereport_libformula,\
$(eval $(call gb_UnpackedTarball_add_patches,jfreereport_libformula,\ $(eval $(call gb_UnpackedTarball_add_patches,jfreereport_libformula,\
external/jfreereport/patches/common_build.patch \ external/jfreereport/patches/common_build.patch \
external/jfreereport/patches/libformula-time-notz.patch \ external/jfreereport/patches/libformula-time-notz.patch \
external/jfreereport/patches/libformula-minutes_truncation.patch.1 \
)) ))
# vim: set noet sw=4 ts=4: # vim: set noet sw=4 ts=4:
Seulement dans jfreereport_libformula: bin
Seulement dans jfreereport_libformula: build.log
Seulement dans jfreereport_libformula: dist
diff -ur jfreereport_libformula.org/source/org/pentaho/reporting/libraries/formula/function/datetime/MinuteFunction.java jfreereport_libformula/source/org/pentaho/reporting/libraries/formula/function/datetime/MinuteFunction.java
--- jfreereport_libformula.org/source/org/pentaho/reporting/libraries/formula/function/datetime/MinuteFunction.java 2015-07-13 15:55:31.752539618 +0200
+++ jfreereport_libformula/source/org/pentaho/reporting/libraries/formula/function/datetime/MinuteFunction.java 2015-07-13 15:56:27.084394065 +0200
@@ -74,7 +74,7 @@
// Multiply the minutes with 60 to get the minutes as ints
final BigDecimal minutes = minutesFraction.multiply(MINUTES);
- final BigDecimal minutesAsInt = minutes.setScale(0, BigDecimal.ROUND_HALF_UP);
+ final BigDecimal minutesAsInt = NumberUtil.performIntRounding(minutes);
return new TypeValuePair(NumberType.GENERIC_NUMBER, minutesAsInt);
}
-}
\ Pas de fin de ligne à la fin du fichier
+}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment