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 ar...@locus.apache.org on 2000/10/10 04:09:15 UTC

cvs commit: xml-fop/src/org/apache/fop/fo/pagination RegionBody.java

arved       00/10/09 19:09:15

  Modified:    src/org/apache/fop/fo/pagination Tag: fop-0_14_0_regions
                        RegionBody.java
  Log:
  region-name/multiple flow support
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.5.6.1   +27 -1     xml-fop/src/org/apache/fop/fo/pagination/RegionBody.java
  
  Index: RegionBody.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/pagination/RegionBody.java,v
  retrieving revision 1.5
  retrieving revision 1.5.6.1
  diff -u -r1.5 -r1.5.6.1
  --- RegionBody.java	1999/11/22 02:31:38	1.5
  +++ RegionBody.java	2000/10/10 02:09:14	1.5.6.1
  @@ -1,4 +1,4 @@
  -/*-- $Id: RegionBody.java,v 1.5 1999/11/22 02:31:38 jtauber Exp $ -- 
  +/*-- $Id: RegionBody.java,v 1.5.6.1 2000/10/10 02:09:14 arved Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -68,11 +68,32 @@
   	return new RegionBody.Maker();
       }	
       
  +	String regionName;
  +	
       protected RegionBody(FObj parent, PropertyList propertyList)
   	throws FOPException {
   	super(parent, propertyList);
   	this.name = "fo:region-body";
   
  +	// regions may have name, or default
  +	if (null == this.properties.get("region-name"))
  +		regionName = "xsl-region-body";
  +	else if (this.properties.get("region-name").getString().equals(""))
  +		regionName = "xsl-region-body";
  +	else
  +	{
  +		regionName = this.properties.get("region-name").getString();
  +		// check that name is OK. Not very pretty.
  +		if (regionName.equals( "xsl-region-before" ) || regionName.equals( "xsl-region-start" )
  +			|| regionName.equals( "xsl-region-end" ) || regionName.equals( "xsl-region-after" )
  +			|| regionName.equals( "xsl-before-float-separator" )
  +			|| regionName.equals( "xsl-footnote-separator" ))
  +			{
  +	    		throw new FOPException("region-name '" + regionName
  +				   + "' for fo:region-body not permitted."); 
  +			}
  +	}
  +	
   	if (parent.getName().equals("fo:simple-page-master")) {
   	    ((SimplePageMaster) parent).setRegionBody(this);
   	} else {
  @@ -97,4 +118,9 @@
   			  marginRight, allocationRectangleHeight -
   			  marginTop - marginBottom); 
       }
  +	
  +	public String getRegionName()
  +	{
  +		return regionName;
  +	}
   }