forked from LibreOffice/core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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/17012 Tested-by: Jenkins <[email protected]> Reviewed-by: Lionel Elie Mamane <[email protected]>
- Loading branch information
1 parent
74f9d98
commit 4292805
Showing
2 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
external/jfreereport/patches/libformula-minutes_truncation.patch.1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
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 | ||
+} |