From 00c4d5b6f6aa77cf223f31de9bafc87a5e198529 Mon Sep 17 00:00:00 2001 From: Mehdi Houshmand Date: Fri, 1 Jun 2012 08:13:36 +0000 Subject: [PATCH] Further clean up to PDFResources and fixed mistake in last commit git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1345007 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/pdf/PDFResources.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/java/org/apache/fop/pdf/PDFResources.java b/src/java/org/apache/fop/pdf/PDFResources.java index b731fcfae..cded7c00a 100644 --- a/src/java/org/apache/fop/pdf/PDFResources.java +++ b/src/java/org/apache/fop/pdf/PDFResources.java @@ -71,7 +71,7 @@ public class PDFResources extends PDFDictionary { protected Map colorSpaces = new LinkedHashMap(); /** Map of ICC color spaces (key: ICC profile description) */ - protected Map iccColorSpaces = new LinkedHashMap(); + protected Map iccColorSpaces = new LinkedHashMap(); /** * create a /Resources object. @@ -167,7 +167,7 @@ public class PDFResources extends PDFDictionary { PDFICCBasedColorSpace icc = (PDFICCBasedColorSpace)colorSpace; String desc = ColorProfileUtil.getICCProfileDescription( icc.getICCStream().getICCProfile()); - this.iccColorSpaces.put(desc, colorSpace); + this.iccColorSpaces.put(desc, icc); } } @@ -177,7 +177,7 @@ public class PDFResources extends PDFDictionary { * @return the requested color space or null if it wasn't found */ public PDFICCBasedColorSpace getICCColorSpaceByProfileName(String desc) { - PDFICCBasedColorSpace cs = (PDFICCBasedColorSpace)this.iccColorSpaces.get(desc); + PDFICCBasedColorSpace cs = this.iccColorSpaces.get(desc); return cs; } @@ -248,7 +248,7 @@ public class PDFResources extends PDFDictionary { if (!this.colorSpaces.isEmpty()) { PDFDictionary dict = new PDFDictionary(this); - for (PDFColorSpace colorSpace : iccColorSpaces.values()) { + for (PDFColorSpace colorSpace : colorSpaces.values()) { dict.put(colorSpace.getName(), colorSpace); } put("ColorSpace", dict); -- 2.39.5