aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/documentation/content/xdocs/compliance.ihtml14
-rw-r--r--src/java/org/apache/fop/area/Area.java12
-rw-r--r--src/java/org/apache/fop/area/Trait.java32
-rw-r--r--src/java/org/apache/fop/fonts/autodetect/FontInfoFinder.java6
4 files changed, 27 insertions, 37 deletions
diff --git a/src/documentation/content/xdocs/compliance.ihtml b/src/documentation/content/xdocs/compliance.ihtml
index 2c1af46c3..a704ee791 100644
--- a/src/documentation/content/xdocs/compliance.ihtml
+++ b/src/documentation/content/xdocs/compliance.ihtml
@@ -4764,7 +4764,8 @@
<ul>
<li>[0.20.5] works only in table rows</li>
- <li>[0.94 and later] &lt;integer&gt; values are not supported.</li>
+ <li>[0.95 and earlier] &lt;integer&gt; values are not supported.</li>
+ <li>[Trunk] minimal support for &lt;integer&gt; value.</li>
</ul>
</td>
</tr>
@@ -4793,7 +4794,8 @@
<li>[0.94 and later] works on all implemented block-level FOs, but not on inline-level
FOs.</li>
- <li>[0.94 and later] &lt;integer&gt; values are not supported.</li>
+ <li>[0.95 and earlier] &lt;integer&gt; values are not supported.</li>
+ <li>[Trunk] minimal support for &lt;integer&gt; value.</li>
</ul>
</td>
</tr>
@@ -4824,8 +4826,10 @@
<li>[0.95] works on all implemented FOs, except list- and inline-level
FOs.</li>
-
- <li>[0.94 and later] &lt;integer&gt; values are not supported.</li>
+ <li>[Trunk] does not work on inline-level FOs.</li>
+
+ <li>[0.95 and earlier] &lt;integer&gt; values are not supported.</li>
+ <li>[Trunk] minimal support for &lt;integer&gt; value.</li>
</ul>
</td>
</tr>
@@ -5283,7 +5287,7 @@
<li>[FOP Trunk] only has effect in PDF output, for external PDF destinations (links pointing to destinations
in <i>another</i> PDF), and only works reliably when the PDF is viewed in a standalone PDF viewer.
<p>Adobe's browser plugin, for example, ignores the <code>/NewWindow</code> flag.
- <p>For links pointing to non-PDF destinations (e.g. </li>
+ </li>
</ul>
</td>
</tr>
diff --git a/src/java/org/apache/fop/area/Area.java b/src/java/org/apache/fop/area/Area.java
index 73b167b99..ff9f5c7d0 100644
--- a/src/java/org/apache/fop/area/Area.java
+++ b/src/java/org/apache/fop/area/Area.java
@@ -368,18 +368,6 @@ public class Area extends AreaTreeObject implements Serializable {
}
/**
- * Add a trait property to this area.
- *
- * @param prop the Trait to add
- */
- public void addTrait(Trait prop) {
- if (props == null) {
- props = new java.util.HashMap(20);
- }
- props.put(prop.getPropType(), prop.getData());
- }
-
- /**
* Add a trait to this area.
*
* @param traitCode the trait key
diff --git a/src/java/org/apache/fop/area/Trait.java b/src/java/org/apache/fop/area/Trait.java
index 9599d8833..e7b39ad2b 100644
--- a/src/java/org/apache/fop/area/Trait.java
+++ b/src/java/org/apache/fop/area/Trait.java
@@ -461,21 +461,20 @@ public class Trait implements Serializable {
* @return an <code>ExternalLink</code> instance corresponding to the given value
*/
protected static ExternalLink makeFromTraitValue(String traitValue) {
- if (traitValue.indexOf(ExternalLink.class.getName()) == -1
- || traitValue.indexOf("dest=") == -1) {
- throw new IllegalArgumentException(
- "Malformed trait value for Trait.ExternalLink: " + traitValue);
- }
- int startIndex = traitValue.indexOf("dest=") + 5;
- int endIndex = traitValue.indexOf(',', startIndex);
- if (endIndex == -1) {
- endIndex = traitValue.indexOf(']');
+ String dest = null;
+ boolean newWindow = false;
+ String[] values = traitValue.split(",");
+ for (int i = 0, c = values.length; i < c; i++) {
+ String v = values[i];
+ if (v.startsWith("dest=")) {
+ dest = v.substring(5);
+ } else if (v.startsWith("newWindow=")) {
+ newWindow = Boolean.valueOf(v.substring(10)).booleanValue();
+ } else {
+ throw new IllegalArgumentException(
+ "Malformed trait value for Trait.ExternalLink: " + traitValue);
+ }
}
- String dest = traitValue.substring(startIndex, endIndex);
- startIndex = traitValue.indexOf("newWindow=", endIndex) + 10;
- endIndex = traitValue.indexOf(']', startIndex);
- boolean newWindow = Boolean.parseBoolean(
- traitValue.substring(startIndex, endIndex));
return new ExternalLink(dest, newWindow);
}
@@ -502,9 +501,8 @@ public class Trait implements Serializable {
*/
public String toString() {
StringBuffer sb = new StringBuffer(64);
- sb.append(super.toString());
- sb.append("[dest=").append(this.destination);
- sb.append(",newWindow=").append(newWindow).append("]");
+ sb.append("newWindow=").append(newWindow);
+ sb.append(",dest=").append(this.destination);
return sb.toString();
}
}
diff --git a/src/java/org/apache/fop/fonts/autodetect/FontInfoFinder.java b/src/java/org/apache/fop/fonts/autodetect/FontInfoFinder.java
index ce33bc5b6..484710d1a 100644
--- a/src/java/org/apache/fop/fonts/autodetect/FontInfoFinder.java
+++ b/src/java/org/apache/fop/fonts/autodetect/FontInfoFinder.java
@@ -139,7 +139,7 @@ public class FontInfoFinder {
* @param fontCache font cache (may be null)
* @return
*/
- private EmbedFontInfo fontInfoFromCustomFont(
+ private EmbedFontInfo getFontInfoFromCustomFont(
URL fontUrl, CustomFont customFont, FontCache fontCache) {
List fontTripletList = new java.util.ArrayList();
generateTripletsFromFont(customFont, fontTripletList);
@@ -237,7 +237,7 @@ public class FontInfoFinder {
}
continue;
}
- EmbedFontInfo fi = fontInfoFromCustomFont(fontUrl, customFont, fontCache);
+ EmbedFontInfo fi = getFontInfoFromCustomFont(fontUrl, customFont, fontCache);
if (fi != null) {
embedFontInfoList.add(fi);
}
@@ -260,7 +260,7 @@ public class FontInfoFinder {
}
return null;
}
- EmbedFontInfo fi = fontInfoFromCustomFont(fontUrl, customFont, fontCache);
+ EmbedFontInfo fi = getFontInfoFromCustomFont(fontUrl, customFont, fontCache);
if (fi != null) {
return new EmbedFontInfo[] {fi};
} else {