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

2003-07-27 Thread pietsch
pietsch 2003/07/27 13:09:24

  Modified:src/org/apache/fop/fo Tag: fop-0_20_2-maintain FObj.java
   src/org/apache/fop/fo/flow Tag: fop-0_20_2-maintain
TableRow.java
  Log:
  Better error messages if table cells don't fit available
  columns for any reason.
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.20.2.10 +13 -1 xml-fop/src/org/apache/fop/fo/Attic/FObj.java
  
  Index: FObj.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/Attic/FObj.java,v
  retrieving revision 1.20.2.9
  retrieving revision 1.20.2.10
  diff -u -r1.20.2.9 -r1.20.2.10
  --- FObj.java 11 Apr 2003 00:24:37 -  1.20.2.9
  +++ FObj.java 27 Jul 2003 20:09:23 -  1.20.2.10
  @@ -91,6 +91,18 @@
   setWritingMode();
   }
   
  +public String getSystemId() {
  +return systemId;
  +}
  +  
  +public int getLine() {
  +return line;
  +}
  +  
  +public int getColumn() {
  +return column;
  +}
  +  
   protected PropertyManager makePropertyManager(PropertyList propertyList) {
   return new PropertyManager(propertyList);
   }
  
  
  
  No   revision
  
  
  No   revision
  
  
  1.51.2.13 +10 -9 xml-fop/src/org/apache/fop/fo/flow/Attic/TableRow.java
  
  Index: TableRow.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/Attic/TableRow.java,v
  retrieving revision 1.51.2.12
  retrieving revision 1.51.2.13
  diff -u -r1.51.2.12 -r1.51.2.13
  --- TableRow.java 20 Jul 2003 20:49:28 -  1.51.2.12
  +++ TableRow.java 27 Jul 2003 20:09:23 -  1.51.2.13
  @@ -501,7 +501,7 @@
* Before starting layout for the first time, initialize information
* about spanning rows, empty cells and spanning columns.
*/
  -private void initCellArray() {
  +private void initCellArray() throws FOPException {
   cellArray = new CellArray(rowSpanMgr, columns.size());
   int colNum = 1;
   for (int i = 0; i children.size(); i++) {
  @@ -519,30 +519,31 @@
   // cell.setColumnNumber(colNum);
   // If cellColNum off the end, this cell is in limbo!
   if (colNum  1) {
  -// ERROR!!!
  -continue;
  +throw new FOPException(Cell (#+i+) implicitely positioned 
beyond number of columns, cell.getSystemId(), cell.getLine(), cell.getColumn());
   } else
   cellColNum = colNum;
   } else if (cellColNum  columns.size()) {
  -// Explicit specification out of range!
  -// Skip it and print an ERROR MESSAGE
  +// Explicit colomn number specification out of range, skip it.
  +log.error( +systemId+':'+cell.getLine()+':'+cell.getColumn()+: 
Cell (#+ i +) explicitely positioned beyond number of columns, dropped);
   continue;
   }
   // see if it fits and doesn't overwrite anything
   if (cellColNum + numCols - 1  columns.size()) {
  -// MESSAGE: TOO MANY COLUMNS SPANNED!
  +// Too many columns spanned.
  +log.error( +systemId+':'+cell.getLine()+':'+cell.getColumn()+: 
Cell (#+i+) spans columns beyond available number, clipped);
   numCols = columns.size() - cellColNum + 1;
   }
   // Check for overwriting other cells (returns false)
   if (cellArray.storeCell(cell, cellColNum, numCols) == false) {
  -// Print out some kind of warning message.
  +log.error( +systemId+':'+cell.getLine()+':'+cell.getColumn()+: 
Cell +(#+i+) overwrites other cells);
   }
   if (cellColNum  colNum) {
   // Cells are initialized as empty already
   colNum = cellColNum;
   } else if (cellColNum  colNum) {
  -// MESSAGE ? cells out of order?
  +// Cells out of order
   colNum = cellColNum;// CR to the letter!
  +log.debug( +systemId+':'+line+':'+column+: Cell positioned out 
of order);
   }
   int cellWidth = getCellWidth(cellColNum, numCols);
   cell.setWidth(cellWidth);
  
  
  

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



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

2002-09-26 Thread pietsch

pietsch 2002/09/26 15:17:59

  Modified:src/org/apache/fop/fo/flow Tag: fop-0_20_2-maintain
TableRow.java
  Log:
  Moved table row ID creation so that the ID will always be created
  if the row layout restarts.
  PR: 12876
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.51.2.6  +3 -6  xml-fop/src/org/apache/fop/fo/flow/TableRow.java
  
  Index: TableRow.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/TableRow.java,v
  retrieving revision 1.51.2.5
  retrieving revision 1.51.2.6
  diff -u -r1.51.2.5 -r1.51.2.6
  --- TableRow.java 26 Sep 2002 21:09:19 -  1.51.2.5
  +++ TableRow.java 26 Sep 2002 22:17:58 -  1.51.2.6
  @@ -209,8 +209,6 @@
   }
   
   public Status layout(Area area) throws FOPException {
  -boolean configID = false;
  -
   if (this.marker == BREAK_AFTER) {
   return new Status(Status.OK);
   }
  @@ -226,9 +224,9 @@
   initCellArray();
   // check to make sure this row hasn't been partially
   // laid out yet (with an id created already)
  -area.getIDReferences().createID(id);
  -configID = true;
   }
  +// create ID also in case the row has been reset
  +area.getIDReferences().createID(id);
   
   this.marker = 0;
   int breakStatus = propMgr.checkBreakBefore(area);
  @@ -236,7 +234,6 @@
   return new Status(breakStatus);
   }
   
  -// if (marker == 0  configID) {
   if (marker == 0) {// KDL: need to do this if thrown or if split?
   // configure id
   area.getIDReferences().configureID(id, area);
  
  
  

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




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

2001-07-11 Thread klease

klease  01/07/11 14:27:40

  Modified:src/org/apache/fop/fo/flow TableRow.java
  Log:
  Fix spanning bug; use height property
  
  Revision  ChangesPath
  1.46  +6 -5  xml-fop/src/org/apache/fop/fo/flow/TableRow.java
  
  Index: TableRow.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/TableRow.java,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- TableRow.java 2001/07/04 21:16:02 1.45
  +++ TableRow.java 2001/07/11 21:27:36 1.46
  @@ -1,4 +1,4 @@
  -/*-- $Id: TableRow.java,v 1.45 2001/07/04 21:16:02 klease Exp $ --
  +/*-- $Id: TableRow.java,v 1.46 2001/07/11 21:27:36 klease Exp $ --
* Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
* For details on use and redistribution please refer to the
* LICENSE file included with these sources.
  @@ -43,7 +43,7 @@
   
   int widthOfCellsSoFar = 0;
   int largestCellHeight = 0;
  -
  +int minHeight = 0; // force row height
   Vector columns;
   
   AreaContainer areaContainer;
  @@ -81,8 +81,8 @@
   * Otherwise return value = input value.
   */
   int getNextFreeCell(int colNum) {
  -for (int i=colNum-1; icells.length; i++) {
  -if (cells[i] == null) return i+1;
  +for (int i=colNum-1; istates.length; i++) {
  +if (states[i] == EMPTY) return i+1;
   }
   return -1;
   }
  @@ -194,6 +194,7 @@
this.keepWithPrevious = getKeepValue(keep-with-previous.within-column);
   
this.id = this.properties.get(id).getString();
  + this.minHeight = this.properties.get(height).getLength().mvalue();
setup = true;
   }
   
  @@ -264,7 +265,7 @@
areaContainer.setAbsoluteHeight(area.getAbsoluteHeight());
areaContainer.setIDReferences(area.getIDReferences());
   
  - largestCellHeight = 0;
  + largestCellHeight = minHeight;
   
// Flag indicaing whether any cell didn't fit in available space
boolean someCellDidNotLayoutCompletely = false;
  
  
  

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