From b3c8c500256e67344c6b4cc91c045a04e8e65e36 Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Thu, 7 Feb 2008 15:42:03 +0000 Subject: [PATCH] Bugfix for date formatting with negative time zones in the PDF's Info object. Update of xmlgraphics-commons-1.3.jar because of a similar bug with formatting dates in XMP. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@619461 13f79535-47bb-0310-9956-ffa450edef68 --- lib/xmlgraphics-commons-1.3svn.jar | Bin 499126 -> 499250 bytes src/java/org/apache/fop/pdf/PDFObject.java | 51 +++++++++------ status.xml | 3 + .../org/apache/fop/UtilityCodeTestSuite.java | 8 ++- .../org/apache/fop/pdf/PDFObjectTestCase.java | 59 ++++++++++++++++++ 5 files changed, 98 insertions(+), 23 deletions(-) create mode 100644 test/java/org/apache/fop/pdf/PDFObjectTestCase.java diff --git a/lib/xmlgraphics-commons-1.3svn.jar b/lib/xmlgraphics-commons-1.3svn.jar index ea00555ef91e531c3f1a38900eee2e984ef8936f..0abad1c335c985b97ab52cbbdec39153e77b741c 100644 GIT binary patch delta 9944 zcmZvi2{ct-)WCc9dGDG%D)X$&bLLDL%aqKdOl2&yBEv%=RHkwgDN2+w-pAat;gHHz4tl$>~qe(=bq(SlknAMVK!S!A_Ma(>}ULtc@CR2 z)0;!)TK+ud3rjirVpI>yyUJ_YMp%~Ef7B)i^aW4(j$AA49W!+4NjiM*doY{YmMy(Y zKfhmCyZdbQyP}1SX-!_aGd(V!lLtfBZ#Zl`8EY9+Ccn{1ozW&@BCaOlXqUIO6A&|C z%gfSQeYjJK;3pEze9$xqL@pM9$<{sbN4tl$Blh%hyUV)P|U3^GA)T&gAg* zhjJ&LbUeM4uKkc2=PGx4leX2;MDWw$;*)04wl^=g^D-Q*-@$F_*CU*2F+zOCe|1jW z;TPpbePwZjy38aimj#bnNd#AU-bS7EKjWEh^Q$vIW^KM1?tDPCCN|ZT_ijwi@SRga zFXq>#Eyr{<9sD)S12dDihKc831R*VgfPE17A;J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J+d8i!dCoAc;5z~)5S;=SWw$#;$BW?!GOqQeVCqaCB0HusO(id* zFQ)pI3UA5bzC;%ARRz20@FVp>6x|+V?ldMyk>EcW&{UmM3m?;uwwLKEP6Rg*wNHax8-)8H!|w~LsdlMb&c6&aY2n+`Qoc@%*f z{7y#|aN0ojB76yV`5LA$y$CPDz1Lt)z{jk=qwKf{ry5Xz8I%>k^@c_9uTCrj>QX8& zU0nuj++G0M|Tu;+J(e;xde8_}6u0=rVklr#nq1+rjEI+=lHrFq!G0B#N)5XhN8oOPok`$LVFCG%i{_#l_ + + Bugfix for date formatting with negative time zones in the PDF's Info object. + Added an option to disable the default sRGB profile in PDF output for those who don't care about color fidelity, but care about PDF file size. diff --git a/test/java/org/apache/fop/UtilityCodeTestSuite.java b/test/java/org/apache/fop/UtilityCodeTestSuite.java index 679e16ce7..19d7d0266 100644 --- a/test/java/org/apache/fop/UtilityCodeTestSuite.java +++ b/test/java/org/apache/fop/UtilityCodeTestSuite.java @@ -19,6 +19,10 @@ package org.apache.fop; +import junit.framework.Test; +import junit.framework.TestSuite; + +import org.apache.fop.pdf.PDFObjectTestCase; import org.apache.fop.traits.BorderPropsTestCase; import org.apache.fop.traits.TraitColorTestCase; import org.apache.fop.util.DataURIResolverTestCase; @@ -26,9 +30,6 @@ import org.apache.fop.util.ElementListUtilsTestCase; import org.apache.fop.util.PDFNumberTestCase; import org.apache.fop.util.UnitConvTestCase; -import junit.framework.Test; -import junit.framework.TestSuite; - /** * Test suite for FOP's utility classes. */ @@ -43,6 +44,7 @@ public class UtilityCodeTestSuite { "Test suite for FOP's utility classes"); //$JUnit-BEGIN$ suite.addTest(new TestSuite(PDFNumberTestCase.class)); + suite.addTest(new TestSuite(PDFObjectTestCase.class)); suite.addTest(new TestSuite(UnitConvTestCase.class)); suite.addTest(new TestSuite(TraitColorTestCase.class)); suite.addTest(new TestSuite(BorderPropsTestCase.class)); diff --git a/test/java/org/apache/fop/pdf/PDFObjectTestCase.java b/test/java/org/apache/fop/pdf/PDFObjectTestCase.java new file mode 100644 index 000000000..96ac728bd --- /dev/null +++ b/test/java/org/apache/fop/pdf/PDFObjectTestCase.java @@ -0,0 +1,59 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* $Id$ */ + +package org.apache.fop.pdf; + +import java.util.Calendar; +import java.util.Date; +import java.util.Locale; +import java.util.TimeZone; + +import junit.framework.TestCase; + +/** + * Tests the PDFObject class. + */ +public class PDFObjectTestCase extends TestCase { + + /** + * Tests date/time formatting in PDFObject. + * @throws Exception if an error occurs + */ + public void testDateFormatting() throws Exception { + Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("GMT"), Locale.ENGLISH); + cal.set(2008, Calendar.FEBRUARY, 07, 15, 11, 07); + cal.set(Calendar.MILLISECOND, 0); + Date dt = cal.getTime(); + + MyPDFObject obj = new MyPDFObject(); + String s = obj.formatDateTime(dt, TimeZone.getTimeZone("GMT")); + assertEquals("D:20080207151107Z", s); + s = obj.formatDateTime(dt, TimeZone.getTimeZone("GMT+02:00")); + assertEquals("D:20080207171107+02'00'", s); + s = obj.formatDateTime(dt, TimeZone.getTimeZone("GMT+02:30")); + assertEquals("D:20080207174107+02'30'", s); + s = obj.formatDateTime(dt, TimeZone.getTimeZone("GMT-08:00")); + assertEquals("D:20080207071107-08'00'", s); + } + + private class MyPDFObject extends PDFObject { + + } + +} -- 2.39.5