aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/fo/FOPropertyMapping.java
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2006-11-13 10:08:19 +0000
committerJeremias Maerki <jeremias@apache.org>2006-11-13 10:08:19 +0000
commita625241b1f303263e20c221b6059082140603867 (patch)
tree1b93f85fff796eb8e1d90391257c409a203afdee /src/java/org/apache/fop/fo/FOPropertyMapping.java
parent3c09dd0bd232edd1c8a988dac28f2d9f6124a009 (diff)
downloadxmlgraphics-fop-a625241b1f303263e20c221b6059082140603867.tar.gz
xmlgraphics-fop-a625241b1f303263e20c221b6059082140603867.zip
Bugzilla #40729:
Support for the rgb-icc() function and for a proprietary cmyk() function (for device CMYK colors only through the PDF renderer so far). Submitted by: Peter Coppens <pc.subscriptions.at.gmail.com> Patch slightly modified to comply with our Java conventions, plus some minor editing. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@474225 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/fo/FOPropertyMapping.java')
-rw-r--r--src/java/org/apache/fop/fo/FOPropertyMapping.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/java/org/apache/fop/fo/FOPropertyMapping.java b/src/java/org/apache/fop/fo/FOPropertyMapping.java
index 2cb2da653..48a58b94a 100644
--- a/src/java/org/apache/fop/fo/FOPropertyMapping.java
+++ b/src/java/org/apache/fop/fo/FOPropertyMapping.java
@@ -22,6 +22,7 @@ package org.apache.fop.fo;
import java.util.HashMap;
import java.util.Map;
+import org.apache.fop.apps.FOUserAgent;
import org.apache.fop.datatypes.LengthBase;
import org.apache.fop.fo.expr.PropertyException;
import org.apache.fop.fo.properties.BackgroundPositionShorthandParser;
@@ -564,7 +565,9 @@ public final class FOPropertyMapping implements Constants {
Property p, PropertyList propertyList, FObj fo) throws PropertyException {
String nameval = p.getNCname();
if (nameval != null) {
- return new ColorProperty(nameval);
+ FObj fobj = (fo == null ? propertyList.getFObj() : fo);
+ FOUserAgent ua = (fobj == null ? null : fobj.getUserAgent());
+ return new ColorProperty(ua, nameval);
}
return super.convertPropertyDatatype(p, propertyList, fo);
}
@@ -1289,7 +1292,7 @@ public final class FOPropertyMapping implements Constants {
m.addEnum("mathematical", getEnumProperty(EN_MATHEMATICAL, "MATHEMATICAL"));
m.addEnum("central", getEnumProperty(EN_CENTRAL, "CENTRAL"));
m.addEnum("middle", getEnumProperty(EN_MIDDLE, "MIDDLE"));
- m.addEnum("text-after-edge", getEnumProperty(EN_TEXT_AFTER_EDGE, "TEXT_AFTER_EDGE" ));
+ m.addEnum("text-after-edge", getEnumProperty(EN_TEXT_AFTER_EDGE, "TEXT_AFTER_EDGE"));
m.addEnum("text-before-edge", getEnumProperty(EN_TEXT_BEFORE_EDGE, "TEXT_BEFORE_EDGE"));
m.setDefault("auto");
m.addShorthand(s_generics[PR_VERTICAL_ALIGN]);