pbwest      2002/10/06 07:01:19

  Modified:    src/org/apache/fop/fo/pagination Tag: FOP_0-20-0_Alt-Design
                        FoSinglePageMasterReference.java
                        FoSimplePageMaster.java
  Log:
  Get master-name directly from propertySet[].
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.2   +6 -8      
xml-fop/src/org/apache/fop/fo/pagination/Attic/FoSinglePageMasterReference.java
  
  Index: FoSinglePageMasterReference.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/org/apache/fop/fo/pagination/Attic/FoSinglePageMasterReference.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- FoSinglePageMasterReference.java  7 May 2002 05:50:04 -0000       1.1.2.1
  +++ FoSinglePageMasterReference.java  6 Oct 2002 14:01:19 -0000       1.1.2.2
  @@ -16,20 +16,18 @@
   import org.apache.fop.xml.XMLEvent;
   import org.apache.fop.apps.FOPException;
   import org.apache.fop.fo.expr.PropertyException;
  -import org.apache.fop.datastructs.SyncedCircularBuffer;
  +import org.apache.fop.datastructs.SyncedXmlEventsBuffer;
   
  -public class FoSinglePageMasterReference implements SubSequenceSpecifier {
  -
  -    private FOAttributes attributes
  -    private masterReference;
  +public class FoSinglePageMasterReference extends FONode {
   
       public FoSinglePageMasterReference
           (SyncedCircularBuffer xmlevents, XMLEvent event) throws FOPException {
  -        
  +     super(foTree, FObjectNames.SINGLE_PAGE_MASTER_REFERENCE, parent,
  +                                 event, FOPropertySets.SEQ_MASTER_SET);
       }
   
       public getMasterReference() {
  -        return masterReference;
  +        return getPropertyValue(PropNames.MASTER_REFERENCE);
       }
   
   }// FoSinglePageMasterReference
  
  
  
  1.1.2.6   +5 -15     
xml-fop/src/org/apache/fop/fo/pagination/Attic/FoSimplePageMaster.java
  
  Index: FoSimplePageMaster.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/org/apache/fop/fo/pagination/Attic/FoSimplePageMaster.java,v
  retrieving revision 1.1.2.5
  retrieving revision 1.1.2.6
  diff -u -r1.1.2.5 -r1.1.2.6
  --- FoSimplePageMaster.java   2 Oct 2002 15:19:59 -0000       1.1.2.5
  +++ FoSimplePageMaster.java   6 Oct 2002 14:01:19 -0000       1.1.2.6
  @@ -31,8 +31,6 @@
       private static final String tag = "$Name$";
       private static final String revision = "$Revision$";
   
  -    private String masterName;
  -
       /**
        * @param foTree the FO tree being built
        * @param parent the parent FONode of this node
  @@ -40,18 +38,10 @@
        * this node
        */
       public FoSimplePageMaster(FOTree foTree, FONode parent, XMLEvent event)
  -        throws Tree.TreeException, FOPException, PropertyException
  +        throws Tree.TreeException, FOPException
       {
           super(foTree, FObjectNames.SIMPLE_PAGE_MASTER, parent, event,
                 FOPropertySets.LAYOUT_SET);
  -        System.out.println("FOAttributes: " + event);
  -        // Check that the property has been set
  -        PropertyValue name = propertySet[PropNames.MASTER_NAME];
  -        if (name == null)
  -            throw new PropertyException("master-name property not set");
  -        if (name.getType() != PropertyValue.NCNAME)
  -            throw new PropertyException("master-name property not an NCName.");
  -        masterName = ((NCName)name).getNCName();
           // Process regions here
           XMLEvent ev = xmlevents.getEndElement(event);
       }
  @@ -59,7 +49,7 @@
       /**
        * @return a <tt>String</tt> with the "master-name" attribute value.
        */
  -    public String getMasterName() {
  -        return masterName;
  +    public String getMasterName() throws PropertyException {
  +        return ((NCName)propertySet[PropNames.MASTER_NAME]).getNCName();
       }
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to