]> source.dussan.org Git - xmlgraphics-fop.git/commit
PDFNumber.doubleOut() rewritten using java.text.DecimalFormat.
authorJeremias Maerki <jeremias@apache.org>
Thu, 1 Sep 2005 10:06:53 +0000 (10:06 +0000)
committerJeremias Maerki <jeremias@apache.org>
Thu, 1 Sep 2005 10:06:53 +0000 (10:06 +0000)
commit64701bbb87a25012aa34fe9147c0938668e4f510
treea7f74c5ed3a55f34f8f55a4bd1983b199ac170ad
parentfef8b4d45d17ce2636eff96a4ef248531f8b568f
PDFNumber.doubleOut() rewritten using java.text.DecimalFormat.
This fixes a bug of doubleOut() not recognizing the scientific format sometimes returned by Double.toString(double).
This change may result in slightly different value being written to the PDF stream. The former doubleOut contained specific code to do special rounding where the new method using DecimalFormat implicitly uses the BigDecimal.ROUND_HALF_EVEN strategy when rounding. These different values hopefully won't make a big visual difference. They don't in my tests.

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@265688 13f79535-47bb-0310-9956-ffa450edef68
src/java/org/apache/fop/pdf/PDFNumber.java
test/java/org/apache/fop/UtilityCodeTestSuite.java
test/java/org/apache/fop/util/PDFNumberTestCase.java [new file with mode: 0644]