cvs commit: xml-fop/examples/fo/tables background.fo borders.fo break.fo headfoot.fo keep.fo omit.fo space.fo widowsorphans.fo

2004-10-10 Thread bckfnn
bckfnn  2004/10/10 13:08:14

  Modified:examples/fo/tables background.fo borders.fo break.fo
headfoot.fo keep.fo omit.fo space.fo
widowsorphans.fo
  Log:
  Pass validation.
  
  Revision  ChangesPath
  1.4   +1 -1  xml-fop/examples/fo/tables/background.fo
  
  Index: background.fo
  ===
  RCS file: /home/cvs/xml-fop/examples/fo/tables/background.fo,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- background.fo 22 Feb 2004 13:37:07 -  1.3
  +++ background.fo 10 Oct 2004 20:08:14 -  1.4
  @@ -8,8 +8,8 @@
 margin-top=1cm
 page-width=21cm
 page-height=29.7cm
  -  fo:region-before extent=1cm/
 fo:region-body margin-top=1cm/
  +  fo:region-before extent=1cm/
 fo:region-after extent=1.5cm/
   /fo:simple-page-master
 /fo:layout-master-set
  
  
  
  1.6   +1 -1  xml-fop/examples/fo/tables/borders.fo
  
  Index: borders.fo
  ===
  RCS file: /home/cvs/xml-fop/examples/fo/tables/borders.fo,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- borders.fo22 Feb 2004 13:37:07 -  1.5
  +++ borders.fo10 Oct 2004 20:08:14 -  1.6
  @@ -8,8 +8,8 @@
 margin-top=1cm
 page-width=21cm
 page-height=29.7cm
  -  fo:region-before extent=1cm/
 fo:region-body margin-top=1cm/
  +  fo:region-before extent=1cm/
 fo:region-after extent=1.5cm/
   /fo:simple-page-master
 /fo:layout-master-set
  
  
  
  1.4   +1 -1  xml-fop/examples/fo/tables/break.fo
  
  Index: break.fo
  ===
  RCS file: /home/cvs/xml-fop/examples/fo/tables/break.fo,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- break.fo  22 Feb 2004 13:37:07 -  1.3
  +++ break.fo  10 Oct 2004 20:08:14 -  1.4
  @@ -8,8 +8,8 @@
 margin-top=1cm
 page-width=21cm
 page-height=17cm
  -  fo:region-before extent=1cm/
 fo:region-body margin-top=1cm/
  +  fo:region-before extent=1cm/
 fo:region-after extent=1.5cm/
   /fo:simple-page-master
 /fo:layout-master-set
  
  
  
  1.4   +1 -1  xml-fop/examples/fo/tables/headfoot.fo
  
  Index: headfoot.fo
  ===
  RCS file: /home/cvs/xml-fop/examples/fo/tables/headfoot.fo,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- headfoot.fo   22 Feb 2004 13:37:07 -  1.3
  +++ headfoot.fo   10 Oct 2004 20:08:14 -  1.4
  @@ -8,8 +8,8 @@
 margin-top=1cm
 page-width=21cm
 page-height=29.7cm
  -  fo:region-before extent=7cm/
 fo:region-body margin-top=7cm/
  +  fo:region-before extent=7cm/
 fo:region-after extent=1.5cm/
   /fo:simple-page-master
 /fo:layout-master-set
  
  
  
  1.4   +1 -1  xml-fop/examples/fo/tables/keep.fo
  
  Index: keep.fo
  ===
  RCS file: /home/cvs/xml-fop/examples/fo/tables/keep.fo,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- keep.fo   22 Feb 2004 13:37:07 -  1.3
  +++ keep.fo   10 Oct 2004 20:08:14 -  1.4
  @@ -8,8 +8,8 @@
 margin-top=1cm
 page-width=21cm
 page-height=17cm
  -  fo:region-before extent=1cm/
 fo:region-body margin-top=1cm/
  +  fo:region-before extent=1cm/
 fo:region-after extent=1.5cm/
   /fo:simple-page-master
 /fo:layout-master-set
  
  
  
  1.4   +1 -1  xml-fop/examples/fo/tables/omit.fo
  
  Index: omit.fo
  ===
  RCS file: /home/cvs/xml-fop/examples/fo/tables/omit.fo,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- omit.fo   22 Feb 2004 13:37:07 -  1.3
  +++ omit.fo   10 Oct 2004 20:08:14 -  1.4
  @@ -8,8 +8,8 @@
 margin-top=1cm
 page-width=21cm
 page-height=29.7cm
  -  fo:region-before extent=7cm/
 fo:region-body margin-top=7cm/
  +  fo:region-before extent=7cm/
 fo:region-after extent=1.5cm/
   /fo:simple-page-master
 /fo:layout-master-set
  
  
  
  1.4   +1 -1  xml-fop/examples/fo/tables/space.fo
  
  Index: space.fo
  ===
  RCS file: /home/cvs/xml-fop/examples/fo/tables/space.fo,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- space.fo  22 Feb 2004 13:37:07 -  1.3
  +++ space.fo  10 Oct 2004 20:08:14 -  

cvs commit: xml-fop/examples/fo/markers hide.fo

2004-10-10 Thread bckfnn
bckfnn  2004/10/10 13:09:31

  Modified:examples/fo/markers hide.fo
  Log:
  Pass validation.
  
  Revision  ChangesPath
  1.4   +1 -1  xml-fop/examples/fo/markers/hide.fo
  
  Index: hide.fo
  ===
  RCS file: /home/cvs/xml-fop/examples/fo/markers/hide.fo,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- hide.fo   22 Feb 2004 13:37:06 -  1.3
  +++ hide.fo   10 Oct 2004 20:09:31 -  1.4
  @@ -8,8 +8,8 @@
 margin-top=1cm
 page-width=21cm
 page-height=29.7cm
  -  fo:region-before extent=1cm/
 fo:region-body margin-top=1cm/
  +  fo:region-before extent=1cm/
 fo:region-after extent=1.5cm/
   /fo:simple-page-master
 /fo:layout-master-set
  
  
  

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



cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr RetrieveMarkerLayoutManager.java

2004-10-10 Thread bckfnn
bckfnn  2004/10/10 13:24:16

  Modified:src/java/org/apache/fop/layoutmgr
RetrieveMarkerLayoutManager.java
  Log:
  Fix regression for fo:retrieve-marker.
  
  Revision  ChangesPath
  1.11  +11 -1 
xml-fop/src/java/org/apache/fop/layoutmgr/RetrieveMarkerLayoutManager.java
  
  Index: RetrieveMarkerLayoutManager.java
  ===
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/RetrieveMarkerLayoutManager.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- RetrieveMarkerLayoutManager.java  7 Sep 2004 20:47:11 -   1.10
  +++ RetrieveMarkerLayoutManager.java  10 Oct 2004 20:24:16 -  1.11
  @@ -20,6 +20,7 @@
   
   import java.util.ArrayList;
   import java.util.List;
  +import java.util.LinkedList;
   
   import org.apache.fop.area.Area;
   import org.apache.fop.fo.flow.Marker;
  @@ -62,6 +63,15 @@
   return replaceLM.getNextBreakPoss(context);
   }
   
  +public LinkedList getNextKnuthElements(LayoutContext context,
  +int alignment) {
  +loadLM();
  +if (replaceLM == null) {
  +return null;
  +}
  +return replaceLM.getNextKnuthElements(context, alignment);
  +}
  +
   public void addAreas(PositionIterator parentIter,
LayoutContext layoutContext) {
   
  @@ -96,7 +106,7 @@
   List list = new ArrayList();
   Marker marker = retrieveMarker(name, position, boundary);
   if (marker != null) {
  -marker.addLayoutManager(markerLMList);
  +marker.addLayoutManager(list);
   if (list.size()  0) {
   replaceLM =  (LayoutManager)list.get(0);
   replaceLM.setParent(this);
  
  
  

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



cvs commit: xml-fop/src/java/org/apache/fop/fo/properties IndentPropertyMaker.java

2004-10-10 Thread bckfnn
bckfnn  2004/10/10 14:06:15

  Modified:src/java/org/apache/fop/fo/properties
IndentPropertyMaker.java
  Log:
  Fully implement the 5.3.2 rules for calculating indent values.
  
  Revision  ChangesPath
  1.8   +23 -9 
xml-fop/src/java/org/apache/fop/fo/properties/IndentPropertyMaker.java
  
  Index: IndentPropertyMaker.java
  ===
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/fo/properties/IndentPropertyMaker.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- IndentPropertyMaker.java  22 Sep 2004 19:19:36 -  1.7
  +++ IndentPropertyMaker.java  10 Oct 2004 21:06:15 -  1.8
  @@ -69,20 +69,33 @@
* @see CorrespondingPropertyMaker#compute(PropertyList)
*/
   public Property compute(PropertyList propertyList) throws FOPException {
  -// TODO: bckfnn reenable
  -if (propertyList.getExplicitOrShorthand(
  -propertyList.getWritingMode(lr_tb, rl_tb, tb_rl)) == null) {
  -return null;
  -}
  +PropertyList pList = getWMPropertyList(propertyList);
   // Calculate the values as described in 5.3.2.
   try {
  +int marginProp = pList.getWritingMode(lr_tb, rl_tb, tb_rl);
  +Numeric margin;
  +//  Calculate the absolute margin.
  +if (propertyList.getExplicitOrShorthand(marginProp) == null) {
  +Property indent = propertyList.getExplicit(baseMaker.propId);
  +if (indent == null) {
  +margin = new FixedLength(0);
  +} else {
  +margin = 
propertyList.getExplicit(baseMaker.propId).getNumeric();
  +margin = NumericOp.subtraction(margin, 
propertyList.getInherited(baseMaker.propId).getNumeric());
  +}
  +margin = NumericOp.subtraction(margin, 
getCorresponding(paddingCorresponding, propertyList).getNumeric());
  +margin = NumericOp.subtraction(margin, 
getCorresponding(borderWidthCorresponding, propertyList).getNumeric());
  +} else {
  +margin = propertyList.get(marginProp).getNumeric();
  +}
  +
   Numeric v = new FixedLength(0);
   if (!propertyList.getFObj().generatesReferenceAreas()) {
   // The inherited_value_of([start|end]-indent)
  -v = NumericOp.addition(v, 
propertyList.getInherited(this.baseMaker.propId).getNumeric());
  +v = NumericOp.addition(v, 
propertyList.getInherited(baseMaker.propId).getNumeric());
   }
   // The corresponding absolute margin-[right|left}.
  -v = NumericOp.addition(v, 
propertyList.get(propertyList.getWritingMode(lr_tb, rl_tb, tb_rl)).getNumeric());
  +v = NumericOp.addition(v, margin);
   v = NumericOp.addition(v, getCorresponding(paddingCorresponding, 
propertyList).getNumeric());
   v = NumericOp.addition(v, getCorresponding(borderWidthCorresponding, 
propertyList).getNumeric());
   return (Property) v;
  @@ -94,7 +107,8 @@
   }
   
   private Property getCorresponding(int[] corresponding, PropertyList 
propertyList) {
  -int wmcorr = propertyList.getWritingMode(corresponding[0], 
corresponding[1], corresponding[2]);
  +PropertyList pList = getWMPropertyList(propertyList);
  +int wmcorr = pList.getWritingMode(corresponding[0], corresponding[1], 
corresponding[2]);
   return propertyList.get(wmcorr);
   }
   }
  
  
  

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



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

2004-10-10 Thread bckfnn
bckfnn  2004/10/10 14:08:16

  Modified:src/java/org/apache/fop/fo/pagination RegionBody.java
  Log:
  Simplify the calculation of the viewport. Now that indents are
  calculated correctly, we can just use them without doing any lookup
  of absolute margins.
  
  Revision  ChangesPath
  1.30  +2 -33 xml-fop/src/java/org/apache/fop/fo/pagination/RegionBody.java
  
  Index: RegionBody.java
  ===
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/pagination/RegionBody.java,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- RegionBody.java   7 Sep 2004 20:47:10 -   1.29
  +++ RegionBody.java   10 Oct 2004 21:08:16 -  1.30
  @@ -25,11 +25,7 @@
   import org.apache.fop.datatypes.ColorType;
   import org.apache.fop.datatypes.FODimension;
   import org.apache.fop.fo.FONode;
  -import org.apache.fop.fo.FObj;
  -import org.apache.fop.fo.PropertyList;
   import org.apache.fop.fo.properties.CommonMarginBlock;
  -import org.apache.fop.fo.properties.Property;
  -import org.apache.fop.fo.FOPropertyMapping;
   
   /**
* The fo:region-body element.
  @@ -57,36 +53,9 @@
   * set but indent is explicitly set, it will return that.
   */
   CommonMarginBlock mProps = propMgr.getMarginProps();
  -int start = getRelMargin(PropertyList.START, PR_START_INDENT);
  -Rectangle vpRect;
  -if (this.wm == WritingMode.LR_TB || this.wm == WritingMode.RL_TB) {
  -vpRect = new Rectangle(start, mProps.spaceBefore,
  -reldims.ipd - start
  -- getRelMargin(PropertyList.END, PR_END_INDENT),
  +return new Rectangle(mProps.startIndent, mProps.spaceBefore,
  +reldims.ipd - mProps.startIndent - mProps.endIndent,
   reldims.bpd - mProps.spaceBefore - mProps.spaceAfter);
  -} else {
  -vpRect = new Rectangle(start, mProps.spaceBefore,
  -reldims.bpd - mProps.spaceBefore - mProps.spaceAfter,
  -reldims.ipd - start
  -- getRelMargin(PropertyList.END, PR_END_INDENT));
  -}
  -return vpRect;
  -}
  -
  -/**
  - * Get the relative margin using parent's writing mode, not own
  - * writing mode.
  - */
  -private int getRelMargin(int reldir, int relPropId) {
  -FObj parent = (FObj) getParent();
  -String sPropName = margin-
  -+ parent.getPropertyList().getAbsoluteWritingMode(reldir);
  -int propId = FOPropertyMapping.getPropertyId(sPropName);
  -Property prop = propertyList.getExplicitOrShorthand(propId);
  -if (prop == null) {
  -prop = propertyList.getExplicitOrShorthand(relPropId);
  -}
  -return ((prop != null) ? prop.getLength().getValue() : 0);
   }
   
   /**
  
  
  

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



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

2004-10-10 Thread bckfnn
bckfnn  2004/10/10 14:12:06

  Modified:src/java/org/apache/fop/fo FOPropertyMapping.java
  Log:
  Calculations of indents must use the writing-mode of the parent. See
  4.2.3:
  
  
  For purposes of this definition, the content-rectangle of an area uses
  the inline-progression-direction and block-progression-direction of that
  area; but the border-rectangle, padding-rectangle, and
  allocation-rectangle use the directions of its parent area.
  
  
  Revision  ChangesPath
  1.27  +3 -1  xml-fop/src/java/org/apache/fop/fo/FOPropertyMapping.java
  
  Index: FOPropertyMapping.java
  ===
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FOPropertyMapping.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- FOPropertyMapping.java28 Sep 2004 19:43:39 -  1.26
  +++ FOPropertyMapping.java10 Oct 2004 21:12:06 -  1.27
  @@ -1211,6 +1211,7 @@
   m.setDefault(0pt);
   IndentPropertyMaker sCorr = new IndentPropertyMaker(m);
   sCorr.setCorresponding(PR_MARGIN_LEFT, PR_MARGIN_RIGHT, PR_MARGIN_TOP);
  +sCorr.setUseParent(true);
   sCorr.setRelative(true);
   sCorr.setPaddingCorresponding(new int[] {
PR_PADDING_LEFT, PR_PADDING_RIGHT, PR_PADDING_TOP 
  @@ -1226,6 +1227,7 @@
   m.setDefault(0pt);
   IndentPropertyMaker eCorr = new IndentPropertyMaker(m);
   eCorr.setCorresponding(PR_MARGIN_RIGHT, PR_MARGIN_LEFT, PR_MARGIN_BOTTOM);
  +eCorr.setUseParent(true);
   eCorr.setRelative(true);
   eCorr.setPaddingCorresponding(new int[] {
   PR_PADDING_RIGHT, PR_PADDING_LEFT, PR_PADDING_BOTTOM 
  
  
  

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