aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAdrian Cumiskey <acumiskey@apache.org>2008-08-14 13:37:33 +0000
committerAdrian Cumiskey <acumiskey@apache.org>2008-08-14 13:37:33 +0000
commit39f5b053cc82f71efa6014c36c0de2f36534bd19 (patch)
treedb7e342c32dea5c7dcbba7258b110c60578fc8f3 /test
parent427e2d22a628b77cce5e7c22b32610b5ff23d8b2 (diff)
downloadxmlgraphics-fop-39f5b053cc82f71efa6014c36c0de2f36534bd19.tar.gz
xmlgraphics-fop-39f5b053cc82f71efa6014c36c0de2f36534bd19.zip
Merged revisions 685573,685785,685879,685885 via svnmerge from
https://svn.eu.apache.org/repos/asf/xmlgraphics/fop/trunk ........ r685573 | jeremias | 2008-08-13 15:34:03 +0100 (Wed, 13 Aug 2008) | 1 line Fixed border trait parsing for the area tree XML when CMYK or ICC colors were used. ........ r685785 | jeremias | 2008-08-14 07:32:52 +0100 (Thu, 14 Aug 2008) | 1 line Removed three unused classes in the traits package. ........ r685879 | jeremias | 2008-08-14 14:03:20 +0100 (Thu, 14 Aug 2008) | 2 lines Fixed the source for a NullPointerException when the content of an fo:leader with leader-pattern="use-content" collapses to zero width during layout. ........ r685885 | acumiskey | 2008-08-14 14:25:54 +0100 (Thu, 14 Aug 2008) | 1 line Moved static method lightenColor() from PrintRenderer to ColorUtil. Thats one less Renderer interface dependency to worry about :). ........ git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@685891 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test')
-rw-r--r--test/java/org/apache/fop/traits/BorderPropsTestCase.java7
-rw-r--r--test/layoutengine/standard-testcases/leader_leader-pattern_use-content.xml8
2 files changed, 15 insertions, 0 deletions
diff --git a/test/java/org/apache/fop/traits/BorderPropsTestCase.java b/test/java/org/apache/fop/traits/BorderPropsTestCase.java
index 6aea38512..0c08e05af 100644
--- a/test/java/org/apache/fop/traits/BorderPropsTestCase.java
+++ b/test/java/org/apache/fop/traits/BorderPropsTestCase.java
@@ -24,6 +24,8 @@ import java.awt.Color;
import junit.framework.TestCase;
import org.apache.fop.fo.Constants;
+import org.apache.fop.util.CMYKColorSpace;
+import org.apache.fop.util.ColorExt;
import org.apache.fop.util.ColorUtil;
/**
@@ -46,6 +48,11 @@ public class BorderPropsTestCase extends TestCase {
BorderProps b2 = BorderProps.valueOf(null, ser);
assertEquals(b1, b2);
+ float[] cmyk = new float[] {1.0f, 1.0f, 0.5f, 1.0f};
+ CMYKColorSpace cmykCs = CMYKColorSpace.getInstance();
+ float[] rgb = cmykCs.toRGB(cmyk);
+ col = ColorExt.createFromFoRgbIcc(rgb[0], rgb[1], rgb[2],
+ null, "#CMYK", cmykCs, cmyk);
b1 = new BorderProps(Constants.EN_INSET, 9999,
col, BorderProps.SEPARATE);
ser = b1.toString();
diff --git a/test/layoutengine/standard-testcases/leader_leader-pattern_use-content.xml b/test/layoutengine/standard-testcases/leader_leader-pattern_use-content.xml
index c98bd4511..2a5c72c14 100644
--- a/test/layoutengine/standard-testcases/leader_leader-pattern_use-content.xml
+++ b/test/layoutengine/standard-testcases/leader_leader-pattern_use-content.xml
@@ -69,6 +69,10 @@
</fo:instream-foreign-object></fo:leader>
Content is svg 20 x 10 which is wider than the leader-length
</fo:block>
+ <fo:block>
+ <fo:leader leader-length="36pt" leader-pattern="use-content"> </fo:leader>
+ Content is " "
+ </fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
@@ -172,5 +176,9 @@
<eval expected="0" xpath="//flow/block[7]/lineArea/inlineparent/inlineparent[1]/@offset"/>
<eval expected="20000" xpath="//flow/block[7]/lineArea/inlineparent/inlineparent[1]/viewport/@ipd"/>
<eval expected="-1384" xpath="//flow/block[7]/lineArea/inlineparent/inlineparent[1]/viewport/@offset"/>
+
+ <eval expected="11100" xpath="//flow/block[8]/lineArea/@bpd"/>
+ <eval expected="36000" xpath="//flow/block[8]/lineArea/space[1]/@ipd"/>
+ <eval expected="0" xpath="//flow/block[8]/lineArea/space[1]/@offset"/>
</checks>
</testcase>