summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Reischenbacher <matthias@apache.org>2018-10-04 19:10:32 +0000
committerMatthias Reischenbacher <matthias@apache.org>2018-10-04 19:10:32 +0000
commit54c5070a0e728c48874e3d9a394098b341e8f5d3 (patch)
tree7e3d9715752f89ad18f02aa5766618ba8901619f
parentde08f4cf070c9b1a26c3010ad2a293293b5bca64 (diff)
downloadxmlgraphics-fop-54c5070a0e728c48874e3d9a394098b341e8f5d3.tar.gz
xmlgraphics-fop-54c5070a0e728c48874e3d9a394098b341e8f5d3.zip
FOP-2818: fix color spaces of parent pdf resources member getting lost
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1842844 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--fop-core/src/main/java/org/apache/fop/pdf/PDFResources.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/fop-core/src/main/java/org/apache/fop/pdf/PDFResources.java b/fop-core/src/main/java/org/apache/fop/pdf/PDFResources.java
index 96d45a13a..e269ad361 100644
--- a/fop-core/src/main/java/org/apache/fop/pdf/PDFResources.java
+++ b/fop-core/src/main/java/org/apache/fop/pdf/PDFResources.java
@@ -298,8 +298,13 @@ public class PDFResources extends PDFDictionary {
put("ExtGState", dict);
}
- if (!this.colorSpaces.isEmpty()) {
+ if (!this.colorSpaces.isEmpty() || (parent != null && !parent.colorSpaces.isEmpty())) {
PDFDictionary dict = new PDFDictionary(this);
+ if (parent != null) {
+ for (PDFColorSpace colorSpace : parent.colorSpaces.values()) {
+ dict.put(colorSpace.getName(), colorSpace);
+ }
+ }
for (PDFColorSpace colorSpace : colorSpaces.values()) {
dict.put(colorSpace.getName(), colorSpace);
}