ASF Bugzilla – Attachment 17403 Details for
Bug 38244
table-column and number-columns-spanned (prepatch)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
proposal for number-columns-spanned on table-column
oe (text/plain), 3.09 KB, created by
gerhard oettl
on 2006-01-12 19:33:22 UTC
(
hide
)
Description:
proposal for number-columns-spanned on table-column
Filename:
MIME Type:
Creator:
gerhard oettl
Created:
2006-01-12 19:33:22 UTC
Size:
3.09 KB
patch
obsolete
>Index: src/java/org/apache/fop/fo/flow/Table.java >=================================================================== >--- src/java/org/apache/fop/fo/flow/Table.java (Revision 368342) >+++ src/java/org/apache/fop/fo/flow/Table.java (Arbeitskopie) >@@ -243,39 +243,42 @@ > private void addColumnNode(TableColumn col) throws FOPException { > int colNumber = col.getColumnNumber(); > int colRepeat = col.getNumberColumnsRepeated(); >+ int colSpan = col.getNumberColumnsSpanned(); > if (columns == null) { > columns = new java.util.ArrayList(); > } >- if (columns.size() < colNumber) { >- //add nulls for non-occupied indices between >- //the last column up to and including the current one >- while (columns.size() < colNumber) { >- columns.add(null); >+ for (int repCount = 0; repCount < colRepeat; ++repCount) { >+ // if it is a repetition than force new column-number >+ if (repCount > 0) { >+ colNumber += colSpan; >+ //col = (TableColumn)col.clone(this, false); >+ col.forceColumnNumber(colNumber); > } >- } >- //replace the null-value with the actual column >- columns.set(colNumber - 1, col); >- if (colRepeat > 1) { >- //in case column is repeated: >- //for the time being, add the same column >- //(colRepeat - 1) times to the columns list >- //TODO: need to force the column-number > //TODO: need to make sure START/END BorderInfo > // are completely independent instances (clones?) > // = necessary for border-collapse="collapse" > // if collapsing is handled in FOTree >- for (int i = colRepeat - 1; --i >= 0;) { >- columns.add(col); >+ //add nulls for non-occupied indices between >+ //the last column up to and including the current one >+ while (columns.size() < colNumber + colSpan - 1) { >+ columns.add(null); > } >+ //replace the null-value with the actual column >+ columns.set(colNumber - 1, col); >+ // flag the column index used by this column >+ // and check for overlapping >+ for (int i = 0; i < colSpan; ++i) { >+ if (isColumnNumberUsed(colNumber + i)) { >+ throw new FOPException("Xfo:table-column overlaps in column " >+ + colNumber, locator); >+ } >+ usedColumnIndices.set(colNumber - 1 + i); >+ } > } >- //flag column indices used by this column >- for (int i = colNumber - 1; i < colNumber - 1 + colRepeat; i++) { >- usedColumnIndices.set(i); >- } >+ > //set index for the next column to use >- while (usedColumnIndices.get(columnIndex - 1)) { >- columnIndex++; >- } >+ columnIndex = colNumber + colSpan; >+ System.err.println("end addcolumn node"); > } > /** @return true of table-layout="auto" */ > public boolean isAutoLayout() {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 38244
: 17403