xmlgraphics-fop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acumis...@apache.org
Subject svn commit: r651625 - in /xmlgraphics/fop/branches/Temp_AFPGOCAResources: ./ src/documentation/content/xdocs/ src/java/org/apache/fop/area/ src/java/org/apache/fop/fonts/autodetect/ test/layoutengine/standard-testcases/
Date Fri, 25 Apr 2008 15:13:30 GMT
Author: acumiskey
Date: Fri Apr 25 08:13:28 2008
New Revision: 651625

URL: http://svn.apache.org/viewvc?rev=651625&view=rev
Log:
Merged revisions 651577,651591,651613,651622-651623 via svnmerge from 
https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk

........
  r651577 | adelmelle | 2008-04-25 12:37:11 +0100 (Fri, 25 Apr 2008) | 1 line
  
  Correction: remove unfinished sentence...
........
  r651591 | jeremias | 2008-04-25 13:31:44 +0100 (Fri, 25 Apr 2008) | 1 line
  
  Update for advanced keeps.
........
  r651613 | adelmelle | 2008-04-25 15:13:08 +0100 (Fri, 25 Apr 2008) | 1 line
  
  Added missing file from r651575
........
  r651622 | acumiskey | 2008-04-25 15:59:49 +0100 (Fri, 25 Apr 2008) | 1 line
  
  Renamed method.
........
  r651623 | jeremias | 2008-04-25 16:03:17 +0100 (Fri, 25 Apr 2008) | 3 lines
  
  Restored Java 1.4 compatibility (Boolean.parseBoolean() is a Java 5 method).
  Simplified the ExternalLink's string representation to follow the pattern used by Trait.Background.
  Added a check to test for the effect of the show-destination property.
........

Modified:
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/   (props changed)
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/xdocs/compliance.ihtml
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/area/Area.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/area/Trait.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fonts/autodetect/FontInfoFinder.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/test/layoutengine/standard-testcases/basic-link_external-destination.xml

Propchange: xmlgraphics/fop/branches/Temp_AFPGOCAResources/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri Apr 25 08:13:28 2008
@@ -1 +1 @@
-/xmlgraphics/fop/trunk:1-651575
+/xmlgraphics/fop/trunk:1-651623

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/xdocs/compliance.ihtml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/xdocs/compliance.ihtml?rev=651625&r1=651624&r2=651625&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/xdocs/compliance.ihtml
(original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/xdocs/compliance.ihtml
Fri Apr 25 08:13:28 2008
@@ -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>

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/area/Area.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/area/Area.java?rev=651625&r1=651624&r2=651625&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/area/Area.java
(original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/area/Area.java
Fri Apr 25 08:13:28 2008
@@ -368,18 +368,6 @@
     }
 
     /**
-     * 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

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/area/Trait.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/area/Trait.java?rev=651625&r1=651624&r2=651625&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/area/Trait.java
(original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/area/Trait.java
Fri Apr 25 08:13:28 2008
@@ -461,21 +461,20 @@
          * @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);
+            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);
+                }
             }
-            int startIndex = traitValue.indexOf("dest=") + 5;
-            int endIndex = traitValue.indexOf(',', startIndex);
-            if (endIndex == -1) {
-                endIndex = traitValue.indexOf(']');
-            }
-            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 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();
         }
     }

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fonts/autodetect/FontInfoFinder.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fonts/autodetect/FontInfoFinder.java?rev=651625&r1=651624&r2=651625&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fonts/autodetect/FontInfoFinder.java
(original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fonts/autodetect/FontInfoFinder.java
Fri Apr 25 08:13:28 2008
@@ -139,7 +139,7 @@
      * @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 @@
                     }
                     continue;
                 }
-                EmbedFontInfo fi = fontInfoFromCustomFont(fontUrl, customFont, fontCache);
+                EmbedFontInfo fi = getFontInfoFromCustomFont(fontUrl, customFont, fontCache);
                 if (fi != null) {
                     embedFontInfoList.add(fi);
                 } 
@@ -260,7 +260,7 @@
                 }
                 return null;
             }
-            EmbedFontInfo fi = fontInfoFromCustomFont(fontUrl, customFont, fontCache);
+            EmbedFontInfo fi = getFontInfoFromCustomFont(fontUrl, customFont, fontCache);
             if (fi != null) {
                 return new EmbedFontInfo[] {fi};
             } else {

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/test/layoutengine/standard-testcases/basic-link_external-destination.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/test/layoutengine/standard-testcases/basic-link_external-destination.xml?rev=651625&r1=651624&r2=651625&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/test/layoutengine/standard-testcases/basic-link_external-destination.xml
(original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/test/layoutengine/standard-testcases/basic-link_external-destination.xml
Fri Apr 25 08:13:28 2008
@@ -33,12 +33,16 @@
         <fo:flow flow-name="xsl-region-body">
           <fo:block><fo:basic-link external-destination="http://xmlgraphics.apache.org/fop/">FOP</fo:basic-link></fo:block>
           <fo:block><fo:basic-link external-destination="url(http://xmlgraphics.apache.org/fop/)">FOP</fo:basic-link></fo:block>
+          <fo:block><fo:basic-link show-destination="replace" external-destination="url(http://xmlgraphics.apache.org/fop/)">FOP</fo:basic-link></fo:block>
+          <fo:block><fo:basic-link show-destination="new" external-destination="url(http://xmlgraphics.apache.org/fop/)">FOP</fo:basic-link></fo:block>
         </fo:flow>
       </fo:page-sequence>
     </fo:root>
   </fo>
   <checks>
-    <eval expected="http://xmlgraphics.apache.org/fop/" xpath="substring-before(substring-after(//flow/block[1]/lineArea/inlineparent/@external-link,'dest='),';')"/>
-    <eval expected="http://xmlgraphics.apache.org/fop/" xpath="substring-before(substring-after(//flow/block[2]/lineArea/inlineparent/@external-link,'dest='),';')"/>
+    <eval expected="http://xmlgraphics.apache.org/fop/" xpath="substring-after(//flow/block[1]/lineArea/inlineparent/@external-link,'dest=')"/>
+    <eval expected="http://xmlgraphics.apache.org/fop/" xpath="substring-after(//flow/block[2]/lineArea/inlineparent/@external-link,'dest=')"/>
+    <eval expected="false" xpath="substring-before(substring-after(//flow/block[3]/lineArea/inlineparent/@external-link,'newWindow='),
',')"/>
+    <eval expected="true" xpath="substring-before(substring-after(//flow/block[4]/lineArea/inlineparent/@external-link,'newWindow='),
',')"/>
   </checks>
 </testcase>



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org


Mime
View raw message