You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by me...@apache.org on 2012/08/28 11:59:04 UTC

svn commit: r1378049 - in /xmlgraphics/fop/trunk: ./ src/java/org/apache/fop/afp/ src/java/org/apache/fop/afp/modca/

Author: mehdi
Date: Tue Aug 28 09:59:04 2012
New Revision: 1378049

URL: http://svn.apache.org/viewvc?rev=1378049&view=rev
Log:
Bugfix#53786: Removed the Attribute Qualifier (x80) triplet from TLEs as they aren't being properly used

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/DataStream.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/Factory.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/modca/AbstractPageObject.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/modca/PageGroup.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/modca/TagLogicalElement.java
    xmlgraphics/fop/trunk/status.xml

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/DataStream.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/DataStream.java?rev=1378049&r1=1378048&r2=1378049&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/DataStream.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/DataStream.java Tue Aug 28 09:59:04 2012
@@ -85,9 +85,6 @@ public class DataStream {
     /** The current page */
     private AbstractPageObject currentPage = null;
 
-    /** Sequence number for TLE's.*/
-    private int tleSequence = 0;
-
     /** The MO:DCA interchange set in use (default to MO:DCA-P IS/2 set) */
     private InterchangeSet interchangeSet
     = InterchangeSet.valueOf(InterchangeSet.MODCA_PRESENTATION_INTERCHANGE_SET_2);
@@ -556,7 +553,7 @@ public class DataStream {
     public void createPageTagLogicalElement(TagLogicalElement.State[] attributes) {
         for (int i = 0; i < attributes.length; i++) {
 
-            currentPage.createTagLogicalElement(attributes[i], tleSequence++);
+            currentPage.createTagLogicalElement(attributes[i]);
         }
     }
 
@@ -586,7 +583,7 @@ public class DataStream {
         TagLogicalElement.State tleState = new  TagLogicalElement.State(name, value, encoding);
         if (currentPage != null) {
 
-            currentPage.createTagLogicalElement(tleState, tleSequence++);
+            currentPage.createTagLogicalElement(tleState);
 
         } else {
             currentPageGroup.createTagLogicalElement(tleState);
@@ -637,7 +634,7 @@ public class DataStream {
      */
     public void startPageGroup() throws IOException {
         endPageGroup();
-        this.currentPageGroup = factory.createPageGroup(tleSequence);
+        this.currentPageGroup = factory.createPageGroup();
     }
 
     /**
@@ -648,7 +645,6 @@ public class DataStream {
     public void endPageGroup() throws IOException {
         if (currentPageGroup != null) {
             currentPageGroup.endPageGroup();
-            tleSequence = currentPageGroup.getTleSequence();
             document.addPageGroup(currentPageGroup);
             currentPageGroup = null;
         }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/Factory.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/Factory.java?rev=1378049&r1=1378048&r2=1378049&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/Factory.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/Factory.java Tue Aug 28 09:59:04 2012
@@ -214,13 +214,12 @@ public class Factory {
 
     /**
      * Creates a new MO:DCA {@link PageGroup}
-     * @param tleSequence current start tle sequence number within stream
      * @return a new {@link PageGroup}
      */
-    public PageGroup createPageGroup(int tleSequence) {
+    public PageGroup createPageGroup() {
         String name = PAGE_GROUP_NAME_PREFIX
         + StringUtils.lpad(String.valueOf(++pageGroupCount), '0', 5);
-        return new PageGroup(this, name, tleSequence);
+        return new PageGroup(this, name);
     }
 
     /**
@@ -375,12 +374,10 @@ public class Factory {
      * Creates a MO:DCA {@link TagLogicalElement}
      *
      * @param state the attribute state for the TLE
-     * @param tleSequence current start tle sequence number within stream*
      * @return a new {@link TagLogicalElement}
      */
-    public TagLogicalElement createTagLogicalElement(TagLogicalElement.State state,
-            int tleSequence) {
-        TagLogicalElement tle = new TagLogicalElement(state, tleSequence);
+    public TagLogicalElement createTagLogicalElement(TagLogicalElement.State state) {
+        TagLogicalElement tle = new TagLogicalElement(state);
         return tle;
     }
 

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/modca/AbstractPageObject.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/modca/AbstractPageObject.java?rev=1378049&r1=1378048&r2=1378049&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/modca/AbstractPageObject.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/modca/AbstractPageObject.java Tue Aug 28 09:59:04 2012
@@ -224,10 +224,9 @@ public abstract class AbstractPageObject
      * Creates a TagLogicalElement on the page.
      *
      * @param state the state of the TLE
-     * @param tleID the id of the TLE
      */
-    public void createTagLogicalElement(TagLogicalElement.State state, int tleID) {
-        TagLogicalElement tle = new TagLogicalElement(state, tleID);
+    public void createTagLogicalElement(TagLogicalElement.State state) {
+        TagLogicalElement tle = new TagLogicalElement(state);
         List list = getTagLogicalElements();
         list.add(tle);
     }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/modca/PageGroup.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/modca/PageGroup.java?rev=1378049&r1=1378048&r2=1378049&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/modca/PageGroup.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/modca/PageGroup.java Tue Aug 28 09:59:04 2012
@@ -36,20 +36,13 @@ import org.apache.fop.afp.Factory;
 public class PageGroup extends AbstractResourceEnvironmentGroupContainer {
 
     /**
-     * Sequence number for TLE's.
-     */
-    private int tleSequence = 0;
-
-    /**
      * Constructor for the PageGroup.
      *
      * @param factory the resource manager
      * @param name the name of the page group
-     * @param tleSequence current start tle sequence number within stream
      */
-    public PageGroup(Factory factory, String name, int tleSequence) {
+    public PageGroup(Factory factory, String name) {
         super(factory, name);
-        this.tleSequence = tleSequence;
     }
 
     /**
@@ -59,10 +52,9 @@ public class PageGroup extends AbstractR
      *              the state of the TLE
      */
     public void createTagLogicalElement(TagLogicalElement.State state) {
-        TagLogicalElement tle = factory.createTagLogicalElement(state, tleSequence);
+        TagLogicalElement tle = factory.createTagLogicalElement(state);
         if (!getTagLogicalElements().contains(tle)) {
             getTagLogicalElements().add(tle);
-            tleSequence++;
         }
     }
 
@@ -91,9 +83,4 @@ public class PageGroup extends AbstractR
     public String toString() {
         return this.getName();
     }
-
-    /** @return the TLE sequence number */
-    public int getTleSequence() {
-        return tleSequence;
-    }
 }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/modca/TagLogicalElement.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/modca/TagLogicalElement.java?rev=1378049&r1=1378048&r2=1378049&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/modca/TagLogicalElement.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/modca/TagLogicalElement.java Tue Aug 28 09:59:04 2012
@@ -53,22 +53,15 @@ public class TagLogicalElement extends A
      * the params of the TLE
      */
     private State state;
-    /**
-     * Sequence of TLE within document
-     */
-    private int tleID;
 
     /**
      * Construct a tag logical element with the name and value specified.
      *
      * @param state the state of the tag logical element
-     * @param tleID unique identifier for TLE within AFP stream
      */
 
-    public TagLogicalElement(State state, int tleID) {
+    public TagLogicalElement(State state) {
         this.state = state;
-
-        this.tleID = tleID;
     }
 
     private void setAttributeValue(String value) {
@@ -99,7 +92,6 @@ public class TagLogicalElement extends A
                 state.key);
         setAttributeValue(state.value);
         setEncoding(state.encoding);
-        setAttributeQualifier(tleID, 1);
 
         byte[] data = new byte[SF_HEADER_LENGTH];
         copySF(data, Type.ATTRIBUTE, Category.PROCESS_ELEMENT);

Modified: xmlgraphics/fop/trunk/status.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/status.xml?rev=1378049&r1=1378048&r2=1378049&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/status.xml (original)
+++ xmlgraphics/fop/trunk/status.xml Tue Aug 28 09:59:04 2012
@@ -62,6 +62,9 @@
       documents. Example: the fix of marks layering will be such a case when it's done.
     -->
     <release version="FOP Trunk" date="TBD">
+      <action context="Renderers" dev="MH" type="fix" fixes-bug="53786">
+         Removed the Attribute Qualifier on TLEs as they aren't used.
+      </action>
       <action context="Renderers" dev="MH" type="fix" fixes-bug="48954" due-to="PH">
          Support for character encoding of TLEs in AFP output
       </action>



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