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 vh...@apache.org on 2008/07/25 12:56:32 UTC
svn commit: r679758 [20/34] - in
/xmlgraphics/fop/branches/Temp_AFPGOCAResources: ./
examples/embedding/java/embedding/ examples/embedding/java/embedding/events/
examples/embedding/java/embedding/intermediate/
examples/embedding/java/embedding/model/ e...
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/RowPainter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/RowPainter.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/RowPainter.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/RowPainter.java Fri Jul 25 03:55:49 2008
@@ -107,7 +107,7 @@
/**
* Signals that the end of the current table part is reached.
- *
+ *
* @param lastInBody true if the part is the last table-body element to be displayed
* on the current page. In which case all the cells must be flushed even if they
* aren't finished, plus the proper collapsed borders must be selected (trailing
@@ -118,7 +118,7 @@
*/
void endTablePart(boolean lastInBody, boolean lastOnPage) {
addAreasAndFlushRow(lastInBody, lastOnPage);
-
+
if (tablePartBackground != null) {
TableLayoutManager tableLM = tclm.getTableLM();
for (Iterator iter = tablePartBackgroundAreas.iterator(); iter.hasNext();) {
@@ -139,7 +139,7 @@
/**
* Records the fragment of row represented by the given position. If it belongs to
* another (grid) row than the current one, that latter is painted and flushed first.
- *
+ *
* @param tcpos a position representing the row fragment
*/
void handleTableContentPosition(TableContentPosition tcpos) {
@@ -173,7 +173,7 @@
firstCellParts[colIndex] = cellPart;
cellHeights[colIndex] = cellPart.getBorderPaddingBefore(firstCellOnPage[colIndex]);
} else {
- assert firstCellParts[colIndex].pgu == cellPart.pgu;
+ assert firstCellParts[colIndex].pgu == cellPart.pgu;
cellHeights[colIndex] += cellPart.getConditionalBeforeContentLength();
}
cellHeights[colIndex] += cellPart.getLength();
@@ -185,7 +185,7 @@
* Creates the areas corresponding to the last row. That is, an area with background
* for the row, plus areas for all the cells that finish on the row (not spanning over
* further rows).
- *
+ *
* @param lastInPart true if the row is the last from its table part to be displayed
* on the current page. In which case all the cells must be flushed even if they
* aren't finished, plus the proper collapsed borders must be selected (trailing
@@ -204,7 +204,7 @@
// Need to compute the actual row height first
int actualRowHeight = 0;
for (int i = 0; i < colCount; i++) {
- GridUnit currentGU = currentRow.getGridUnit(i);
+ GridUnit currentGU = currentRow.getGridUnit(i);
if (!currentGU.isEmpty() && currentGU.getColSpanIndex() == 0
&& (lastInPart || currentGU.isLastGridUnitRowSpan())
&& firstCellParts[i] != null) {
@@ -396,7 +396,7 @@
* set when the areas for the cell are created since at that moment this bpd is yet
* unknown. So they will instead be set in
* {@link #addAreasAndFlushRow(boolean, boolean)}.
- *
+ *
* @param backgroundArea the block of the cell's dimensions that will hold the part
* background
*/
@@ -407,7 +407,7 @@
/**
* Records the y-offset of the row with the given index.
- *
+ *
* @param rowIndex index of the row
* @param offset y-offset of the row on the page
*/
@@ -419,7 +419,7 @@
* considered as finished, since it contains no cell ending on this row. Thus no
* TableContentPosition will be created for this row. Thus its index will never be
* recorded by the #handleTableContentPosition method.
- *
+ *
* The offset of such a row is the same as the next non-empty row. It's needed
* to correctly offset blocks for cells starting on this row. Hence the loop
* below.
@@ -431,7 +431,7 @@
/**
* Returns the offset of the row with the given index.
- *
+ *
* @param rowIndex index of the row
* @return its y-offset on the page
*/
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/TableAndCaptionLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/TableAndCaptionLayoutManager.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/TableAndCaptionLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/TableAndCaptionLayoutManager.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.layoutmgr.table;
import org.apache.fop.area.Area;
@@ -55,7 +55,7 @@
public TableAndCaption getTableAndCaptionFO() {
return (TableAndCaption)this.fobj;
}
-
+
/**
* Get the next break possibility.
*
@@ -199,7 +199,7 @@
curBlockArea.addBlock((Block) childArea);
}
}
-
+
/** {@inheritDoc} */
public int getKeepTogetherStrength() {
int strength = KEEP_AUTO;
@@ -209,8 +209,8 @@
*/
strength = Math.max(strength, getParentKeepTogetherStrength());
return strength;
- }
-
+ }
+
/** {@inheritDoc} */
public int getKeepWithNextStrength() {
return KEEP_AUTO;
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/TableCaptionLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/TableCaptionLayoutManager.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/TableCaptionLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/TableCaptionLayoutManager.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.layoutmgr.table;
import org.apache.fop.area.Area;
@@ -50,7 +50,7 @@
public TableCaption getTableCaptionFO() {
return (TableCaption)this.fobj;
}
-
+
/**
* Get the next break position for the caption.
*
@@ -195,7 +195,7 @@
curBlockArea.addBlock((Block) childArea);
}
}
-
+
/** {@inheritDoc} */
public int getKeepTogetherStrength() {
int strength = KEEP_AUTO;
@@ -208,7 +208,7 @@
strength = Math.max(strength, getParentKeepTogetherStrength());
return strength;
}
-
+
/** {@inheritDoc} */
public int getKeepWithNextStrength() {
return KEEP_AUTO;
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -240,7 +240,7 @@
/**
* Sets the total height of this cell on the current page. That is, the cell's bpd
* plus before and after borders and paddings, plus the table's border-separation.
- *
+ *
* @param h the height of cell
*/
public void setTotalHeight(int h) {
@@ -250,12 +250,12 @@
/**
* Add the areas for the break points. The cell contains block stacking layout
* managers that add block areas.
- *
+ *
* <p>In the collapsing-border model, the borders of a cell that spans over several
* rows or columns are drawn separately for each grid unit. Therefore we must know the
* height of each grid row spanned over by the cell. Also, if the cell is broken over
* two pages we must know which spanned grid rows are present on the current page.</p>
- *
+ *
* @param parentIter the iterator of the break positions
* @param layoutContext the layout context for adding the areas
* @param spannedGridRowHeights in collapsing-border model for a spanning cell, height
@@ -296,7 +296,7 @@
CommonBorderPaddingBackground padding = primaryGridUnit.getCell()
.getCommonBorderPaddingBackground();
- int paddingRectBPD = totalHeight - borderBeforeWidth - borderAfterWidth;
+ int paddingRectBPD = totalHeight - borderBeforeWidth - borderAfterWidth;
int cellBPD = paddingRectBPD;
cellBPD -= padding.getPaddingBefore(borderBeforeWhich == ConditionalBorder.REST, this);
cellBPD -= padding.getPaddingAfter(borderAfterWhich == ConditionalBorder.REST, this);
@@ -488,7 +488,7 @@
CommonBorderPaddingBackground padding = getTableCell().getCommonBorderPaddingBackground();
int paddingStart = padding.getPaddingStart(false, this);
int paddingEnd = padding.getPaddingEnd(false, this);
-
+
Block block = new Block();
TraitSetter.setProducerID(block, getTable().getId());
block.setPositioning(Block.ABSOLUTE);
@@ -567,7 +567,7 @@
strength = Math.max(strength, getParentKeepTogetherStrength());
return strength;
}
-
+
/** {@inheritDoc} */
public int getKeepWithNextStrength() {
return KEEP_AUTO; //TODO FIX ME (table-cell has no keep-with-next!)
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java Fri Jul 25 03:55:49 2008
@@ -69,9 +69,9 @@
private int startXOffset;
private int usedBPD;
-
+
private TableStepper stepper;
-
+
/**
* Main constructor
* @param parent Parent layout manager
@@ -88,19 +88,19 @@
}
stepper = new TableStepper(this);
}
-
+
/**
* @return the table layout manager
*/
TableLayoutManager getTableLM() {
return this.tableLM;
}
-
+
/** @return true if the table uses the separate border model. */
boolean isSeparateBorderModel() {
return getTableLM().getTable().isSeparateBorderModel();
}
-
+
/**
* @return the column setup of this table
*/
@@ -142,14 +142,14 @@
this.headerNetHeight
= ElementListUtils.calcContentLength(this.headerList);
if (log.isDebugEnabled()) {
- log.debug("==> Header: "
+ log.debug("==> Header: "
+ headerNetHeight + " - " + this.headerList);
}
TableHeaderFooterPosition pos = new TableHeaderFooterPosition(
getTableLM(), true, this.headerList);
KnuthBox box = new KnuthBox(headerNetHeight, pos, false);
if (getTableLM().getTable().omitHeaderAtBreak()) {
- //We can simply add the table header at the start
+ //We can simply add the table header at the start
//of the whole list
headerAsFirst = box;
} else {
@@ -162,7 +162,7 @@
this.footerNetHeight
= ElementListUtils.calcContentLength(this.footerList);
if (log.isDebugEnabled()) {
- log.debug("==> Footer: "
+ log.debug("==> Footer: "
+ footerNetHeight + " - " + this.footerList);
}
//We can simply add the table footer at the end of the whole list
@@ -195,17 +195,17 @@
}
return returnList;
}
-
+
/**
* Creates Knuth elements by iterating over a TableRowIterator.
* @param iter TableRowIterator instance to fetch rows from
* @param context Active LayoutContext
* @param alignment alignment indicator
- * @param bodyType Indicates what kind of body is being processed
+ * @param bodyType Indicates what kind of body is being processed
* (BODY, HEADER or FOOTER)
* @return An element list
*/
- private LinkedList getKnuthElementsForRowIterator(TableRowIterator iter,
+ private LinkedList getKnuthElementsForRowIterator(TableRowIterator iter,
LayoutContext context, int alignment, int bodyType) {
LinkedList returnList = new LinkedList();
EffRow[] rowGroup = iter.getNextRowGroup();
@@ -225,12 +225,12 @@
returnList.addAll(nextRowGroupElems);
while ((rowGroup = iter.getNextRowGroup()) != null) {
rowGroupLM = new RowGroupLayoutManager(getTableLM(), rowGroup, stepper);
-
+
//Note previous pending keep-with-next and clear the strength
//(as the layout context is reused)
int keepWithNextPending = context.getKeepWithNextPending();
context.clearKeepWithNextPending();
-
+
//Get elements for next row group
nextRowGroupElems = rowGroupLM.getNextKnuthElements(context, alignment, bodyType);
/*
@@ -238,13 +238,13 @@
* group) may be used to represent the break between the two row groups.
* Its penalty value and break class must just be overridden by the
* characteristics of the keep or break between the two.
- *
+ *
* However, we mustn't forget that if the after border of the last row of
* the row group is thicker in the normal case than in the trailing case,
* an additional glue will be appended to the element list. So we may have
* to go two steps backwards in the list.
*/
-
+
//Determine keep constraints
int penaltyStrength = BlockLevelLayoutManager.KEEP_AUTO;
penaltyStrength = Math.max(penaltyStrength, keepWithNextPending);
@@ -252,7 +252,7 @@
context.clearKeepWithPreviousPending();
penaltyStrength = Math.max(penaltyStrength, getTableLM().getKeepTogetherStrength());
int penaltyValue = KeepUtil.getPenaltyForKeep(penaltyStrength);
-
+
breakBetween = BreakUtil.compareBreakClasses(breakBetween,
context.getBreakBefore());
if (breakBetween != Constants.EN_AUTO) {
@@ -291,16 +291,16 @@
context.setBreakBefore(breakBefore);
//fox:widow-content-limit
- int widowContentLimit = getTableLM().getTable().getWidowContentLimit().getValue();
+ int widowContentLimit = getTableLM().getTable().getWidowContentLimit().getValue();
if (widowContentLimit != 0 && bodyType == TableRowIterator.BODY) {
ElementListUtils.removeLegalBreaks(returnList, widowContentLimit);
}
//fox:orphan-content-limit
- int orphanContentLimit = getTableLM().getTable().getOrphanContentLimit().getValue();
+ int orphanContentLimit = getTableLM().getTable().getOrphanContentLimit().getValue();
if (orphanContentLimit != 0 && bodyType == TableRowIterator.BODY) {
ElementListUtils.removeLegalBreaksFromEnd(returnList, orphanContentLimit);
}
-
+
return returnList;
}
@@ -313,7 +313,7 @@
int col = gu.getColIndex();
return startXOffset + getTableLM().getColumns().getXOffset(col + 1, getTableLM());
}
-
+
/**
* Adds the areas generated by this layout manager to the area tree.
* @param parentIter the position iterator
@@ -358,7 +358,7 @@
}
} else if (pos instanceof TableHFPenaltyPosition) {
//ignore for now, see special handling below if break is at a penalty
- //Only if the last position in this part/page us such a position it will be used
+ //Only if the last position in this part/page us such a position it will be used
} else if (pos instanceof TableContentPosition) {
tablePositions.add(pos);
} else {
@@ -376,23 +376,23 @@
headerElements = penaltyPos.headerElements;
}
if (penaltyPos.footerElements != null) {
- footerElements = penaltyPos.footerElements;
+ footerElements = penaltyPos.footerElements;
}
}
Map markers = getTableLM().getTable().getMarkers();
if (markers != null) {
- getTableLM().getCurrentPV().addMarkers(markers,
+ getTableLM().getCurrentPV().addMarkers(markers,
true, getTableLM().isFirst(firstPos), getTableLM().isLast(lastCheckPos));
}
-
+
if (headerElements != null) {
//header positions for the last part are the second-to-last element and need to
//be handled first before all other TableContentPositions
addHeaderFooterAreas(headerElements, tableLM.getTable().getTableHeader(), painter,
false);
}
-
+
if (tablePositions.isEmpty()) {
// TODO make sure this actually never happens
log.error("tablePositions empty."
@@ -407,11 +407,11 @@
addHeaderFooterAreas(footerElements, tableLM.getTable().getTableFooter(), painter,
true);
}
-
+
this.usedBPD += painter.getAccumulatedBPD();
if (markers != null) {
- getTableLM().getCurrentPV().addMarkers(markers,
+ getTableLM().getCurrentPV().addMarkers(markers,
false, getTableLM().isFirst(firstPos), getTableLM().isLast(lastCheckPos));
}
}
@@ -435,7 +435,7 @@
/**
* Iterates over the positions corresponding to the table's body (which may contain
* several table-body elements!) and adds the corresponding areas.
- *
+ *
* @param iterator iterator over TableContentPosition elements. Those positions
* correspond to the elements of the body present on the current page
* @param painter
@@ -472,13 +472,13 @@
*/
private void addTablePartAreas(List positions, RowPainter painter, TablePart body,
boolean isFirstPos, boolean isLastPos, boolean lastInBody, boolean lastOnPage) {
- getTableLM().getCurrentPV().addMarkers(body.getMarkers(),
+ getTableLM().getCurrentPV().addMarkers(body.getMarkers(),
true, isFirstPos, isLastPos);
painter.startTablePart(body);
for (Iterator iter = positions.iterator(); iter.hasNext();) {
painter.handleTableContentPosition((TableContentPosition) iter.next());
}
- getTableLM().getCurrentPV().addMarkers(body.getMarkers(),
+ getTableLM().getCurrentPV().addMarkers(body.getMarkers(),
false, isFirstPos, isLastPos);
painter.endTablePart(lastInBody, lastOnPage);
}
@@ -501,7 +501,7 @@
// --------- Property Resolution related functions --------- //
/**
- * {@inheritDoc}
+ * {@inheritDoc}
*/
public int getBaseLength(int lengthBase, FObj fobj) {
return tableLM.getBaseLength(lengthBase, fobj);
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/TableContentPosition.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/TableContentPosition.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/TableContentPosition.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/TableContentPosition.java Fri Jul 25 03:55:49 2008
@@ -64,7 +64,7 @@
* Sets the row corresponding to this position if it starts a new page. In which case,
* if the delay mechanism is on, this is the delayed row that starts the page, and not
* the current row being extended.
- *
+ *
* @param newPageRow the row that will start the page if this position is the first
* one on that page
*/
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java Fri Jul 25 03:55:49 2008
@@ -59,15 +59,15 @@
* The table then creates areas for the columns, bodies and rows
* the render background.
*/
-public class TableLayoutManager extends BlockStackingLayoutManager
+public class TableLayoutManager extends BlockStackingLayoutManager
implements ConditionalElementListener {
/**
* logging instance
*/
private static Log log = LogFactory.getLog(TableLayoutManager.class);
-
- private TableContentLayoutManager contentLM;
+
+ private TableContentLayoutManager contentLM;
private ColumnSetup columns = null;
private Block curBlockArea;
@@ -81,7 +81,7 @@
private boolean discardPaddingAfter;
private MinOptMax effSpaceBefore;
private MinOptMax effSpaceAfter;
-
+
private int halfBorderSeparationBPD;
private int halfBorderSeparationIPD;
@@ -90,7 +90,7 @@
/**
* Temporary holder of column background informations for a table-cell's area.
- *
+ *
* @see TableLayoutManager#registerColumnBackgroundArea(TableColumn, Block, int)
*/
private static final class ColumnBackgroundInfo {
@@ -118,14 +118,14 @@
public Table getTable() {
return (Table)this.fobj;
}
-
+
/**
* @return the column setup for this table.
*/
public ColumnSetup getColumns() {
return this.columns;
}
-
+
/** {@inheritDoc} */
public void initialize() {
foSpaceBefore = new SpaceVal(
@@ -133,8 +133,8 @@
foSpaceAfter = new SpaceVal(
getTable().getCommonMarginBlock().spaceAfter, this).getSpace();
startIndent = getTable().getCommonMarginBlock().startIndent.getValue(this);
- endIndent = getTable().getCommonMarginBlock().endIndent.getValue(this);
-
+ endIndent = getTable().getCommonMarginBlock().endIndent.getValue(this);
+
if (getTable().isSeparateBorderModel()) {
this.halfBorderSeparationBPD = getTable().getBorderSeparation().getBPD().getLength()
.getValue(this) / 2;
@@ -144,23 +144,23 @@
this.halfBorderSeparationBPD = 0;
this.halfBorderSeparationIPD = 0;
}
-
- if (!getTable().isAutoLayout()
- && getTable().getInlineProgressionDimension().getOptimum(this).getEnum()
+
+ if (!getTable().isAutoLayout()
+ && getTable().getInlineProgressionDimension().getOptimum(this).getEnum()
!= EN_AUTO) {
autoLayout = false;
}
}
private void resetSpaces() {
- this.discardBorderBefore = false;
- this.discardBorderAfter = false;
- this.discardPaddingBefore = false;
+ this.discardBorderBefore = false;
+ this.discardBorderAfter = false;
+ this.discardPaddingBefore = false;
this.discardPaddingAfter = false;
this.effSpaceBefore = null;
this.effSpaceAfter = null;
}
-
+
/**
* @return half the value of border-separation.block-progression-dimension, or 0 if
* border-collapse="collapse".
@@ -179,7 +179,7 @@
/** {@inheritDoc} */
public List getNextKnuthElements(LayoutContext context, int alignment) {
-
+
List returnList = new LinkedList();
/*
@@ -201,7 +201,7 @@
int sumOfColumns = columns.getSumOfColumnWidths(this);
if (!autoLayout && sumOfColumns > getContentAreaIPD()) {
log.debug(FONode.decorateWithContextInfo(
- "The sum of all column widths is larger than the specified table width.",
+ "The sum of all column widths is larger than the specified table width.",
getTable()));
updateContentAreaIPDwithOverconstrainedAdjust(sumOfColumns);
}
@@ -213,7 +213,7 @@
getContentAreaIPD(), context.getRefIPD(),
getTable().getLocator());
}
-
+
/* initialize unit to determine computed values
* for proportional-column-width()
*/
@@ -224,7 +224,7 @@
if (!firstVisibleMarkServed) {
addKnuthElementsForSpaceBefore(returnList, alignment);
}
-
+
if (getTable().isSeparateBorderModel()) {
addKnuthElementsForBorderPaddingBefore(returnList, !firstVisibleMarkServed);
firstVisibleMarkServed = true;
@@ -279,7 +279,7 @@
int breakAfter = BreakUtil.compareBreakClasses(getTable().getBreakAfter(),
childLC.getBreakAfter());
if (breakAfter != Constants.EN_AUTO) {
- returnList.add(new BreakElement(getAuxiliaryPosition(),
+ returnList.add(new BreakElement(getAuxiliaryPosition(),
0, -KnuthElement.INFINITE, breakAfter, context));
}
@@ -295,7 +295,7 @@
* be known. The traits can't then be set when the areas for the cell are created
* since at that moment this bpd is yet unknown. So they will instead be set in
* TableLM's {@link #addAreas(PositionIterator, LayoutContext)} method.
- *
+ *
* @param column the table-column element from which the cell gets background
* informations
* @param backgroundArea the block of the cell's dimensions that will hold the column
@@ -329,7 +329,7 @@
}
int startXOffset = getTable().getCommonMarginBlock().startIndent.getValue(this);
-
+
// add column, body then row areas
// BPD of the table, i.e., height of its content; table's borders and paddings not counted
@@ -357,30 +357,30 @@
}
if (getTable().isSeparateBorderModel()) {
- TraitSetter.addBorders(curBlockArea,
- getTable().getCommonBorderPaddingBackground(),
+ TraitSetter.addBorders(curBlockArea,
+ getTable().getCommonBorderPaddingBackground(),
discardBorderBefore, discardBorderAfter, false, false, this);
- TraitSetter.addPadding(curBlockArea,
- getTable().getCommonBorderPaddingBackground(),
+ TraitSetter.addPadding(curBlockArea,
+ getTable().getCommonBorderPaddingBackground(),
discardPaddingBefore, discardPaddingAfter, false, false, this);
}
- TraitSetter.addBackground(curBlockArea,
+ TraitSetter.addBackground(curBlockArea,
getTable().getCommonBorderPaddingBackground(),
this);
TraitSetter.addMargins(curBlockArea,
- getTable().getCommonBorderPaddingBackground(),
+ getTable().getCommonBorderPaddingBackground(),
startIndent, endIndent,
this);
- TraitSetter.addBreaks(curBlockArea,
+ TraitSetter.addBreaks(curBlockArea,
getTable().getBreakBefore(), getTable().getBreakAfter());
- TraitSetter.addSpaceBeforeAfter(curBlockArea, layoutContext.getSpaceAdjust(),
+ TraitSetter.addSpaceBeforeAfter(curBlockArea, layoutContext.getSpaceAdjust(),
effSpaceBefore, effSpaceAfter);
flush();
resetSpaces();
curBlockArea = null;
-
+
notifyEndOfLayout();
}
@@ -403,11 +403,11 @@
// Set up dimensions
// Must get dimensions from parent area
/*Area parentArea =*/ parentLM.getParentArea(curBlockArea);
-
+
TraitSetter.setProducerID(curBlockArea, getTable().getId());
curBlockArea.setIPD(getContentAreaIPD());
-
+
setCurrentArea(curBlockArea);
}
return curBlockArea;
@@ -426,7 +426,7 @@
/**
* Adds the given area to this layout manager's area, without updating the used bpd.
- *
+ *
* @param background an area
*/
void addBackgroundArea(Block background) {
@@ -442,7 +442,7 @@
/** {@inheritDoc} */
public void discardSpace(KnuthGlue spaceGlue) {
// TODO Auto-generated method stub
-
+
}
/** {@inheritDoc} */
@@ -451,7 +451,7 @@
strength = Math.max(strength, getParentKeepTogetherStrength());
return strength;
}
-
+
/** {@inheritDoc} */
public int getKeepWithNextStrength() {
return KeepUtil.getCombinedBlockLevelKeepStrength(getTable().getKeepWithNext());
@@ -465,7 +465,7 @@
// --------- Property Resolution related functions --------- //
/**
- * {@inheritDoc}
+ * {@inheritDoc}
*/
public int getBaseLength(int lengthBase, FObj fobj) {
// Special handler for TableColumn width specifications
@@ -488,18 +488,18 @@
}
}
}
-
+
/** {@inheritDoc} */
public void notifySpace(RelSide side, MinOptMax effectiveLength) {
if (RelSide.BEFORE == side) {
if (log.isDebugEnabled()) {
- log.debug(this + ": Space " + side + ", "
+ log.debug(this + ": Space " + side + ", "
+ this.effSpaceBefore + "-> " + effectiveLength);
}
this.effSpaceBefore = effectiveLength;
} else {
if (log.isDebugEnabled()) {
- log.debug(this + ": Space " + side + ", "
+ log.debug(this + ": Space " + side + ", "
+ this.effSpaceAfter + "-> " + effectiveLength);
}
this.effSpaceAfter = effectiveLength;
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/TableStepper.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/TableStepper.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/TableStepper.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/TableStepper.java Fri Jul 25 03:55:49 2008
@@ -83,7 +83,7 @@
/**
* Flag used to produce an infinite penalty if the height of the current row is
* smaller than the first step for that row (may happen with row-spanning cells).
- *
+ *
* @see #considerRowLastStep(int)
*/
private boolean rowHeightSmallerThanFirstStep;
@@ -107,7 +107,7 @@
/**
* Initializes the fields of this instance to handle a new row group.
- *
+ *
* @param rows the new row group to handle
*/
private void setup(EffRow[] rows) {
@@ -151,7 +151,7 @@
/**
* Creates ActiveCell instances for cells starting on the row at the given index.
- *
+ *
* @param activeCellList the list that will hold the active cells
* @param rowIndex the index of the row from which cells must be activated
*/
@@ -289,7 +289,7 @@
/**
* Returns the first step for the current row group.
- *
+ *
* @return the first step for the current row group
*/
private int getFirstStep() {
@@ -302,7 +302,7 @@
/**
* Returns the next break possibility.
- *
+ *
* @return the next step
*/
private int getNextStep() {
@@ -342,7 +342,7 @@
/**
* Computes the minimal necessary step to make the next row fit. That is, so such as
* cell on the next row can contribute some content.
- *
+ *
* @param cells the cells occupying the next row (may include cells starting on
* previous rows and spanning over this one)
*/
@@ -355,7 +355,7 @@
/**
* Computes the next minimal step.
- *
+ *
* @return the minimal step from the active cells, < 0 if there is no such step
*/
private int computeMinStep() {
@@ -379,7 +379,7 @@
/**
* Signals the first step to the active cells, to allow them to add more content to
* the step if possible.
- *
+ *
* @see ActiveCell#signalRowFirstStep(int)
*/
private void signalRowFirstStep() {
@@ -391,7 +391,7 @@
/**
* Signals the next selected step to the active cells.
- *
+ *
* @param step the next step
*/
private void signalNextStep(int step) {
@@ -416,7 +416,7 @@
* infinite penalty for this step. This will prevent the breaking algorithm from
* choosing this break, but still allow to create the appropriate TableContentPosition
* for the cells ending on the current row.</p>
- *
+ *
* @param step the next step
* @return the updated step if any
*/
@@ -445,7 +445,7 @@
}
for (Iterator iter = activeCells.iterator(); iter.hasNext();) {
ActiveCell activeCell = (ActiveCell) iter.next();
- activeCell.endRow(activeRowIndex);
+ activeCell.endRow(activeRowIndex);
if (!activeCell.endsOnRow(activeRowIndex)) {
activeCell.signalRowLastStep(maxStep);
}
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/ASCII85Filter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/ASCII85Filter.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/ASCII85Filter.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/ASCII85Filter.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.pdf;
import java.io.OutputStream;
@@ -46,7 +46,7 @@
public boolean isASCIIFilter() {
return true;
}
-
+
/**
* Get the decode parameters.
*
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/ASCIIHexFilter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/ASCIIHexFilter.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/ASCIIHexFilter.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/ASCIIHexFilter.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.pdf;
import java.io.OutputStream;
@@ -29,7 +29,7 @@
* This filter converts a pdf stream to ASCII hex data.
*/
public class ASCIIHexFilter extends PDFFilter {
-
+
/**
* Get the name of this filter.
*
@@ -45,7 +45,7 @@
public boolean isASCIIFilter() {
return true;
}
-
+
/**
* Get the decode params.
*
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/AbstractPDFStream.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/AbstractPDFStream.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/AbstractPDFStream.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/AbstractPDFStream.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.pdf;
import java.io.IOException;
@@ -43,13 +43,13 @@
}
/**
- * Sets up the default filters for this stream if they haven't been set
+ * Sets up the default filters for this stream if they haven't been set
* from outside.
*/
protected void setupFilterList() {
if (!getFilterList().isInitialized()) {
getFilterList().addDefaultFilters(
- getDocumentSafely().getFilterMap(),
+ getDocumentSafely().getFilterMap(),
PDFFilterList.DEFAULT_FILTER);
}
prepareImplicitFilters();
@@ -78,18 +78,18 @@
/**
* Returns a value that hints at the size of the encoded stream. This is
* used to optimize buffer allocation so fewer buffer reallocations are
- * necessary.
+ * necessary.
* @return an estimated size (0 if no hint can be given)
* @throws IOException in case of an I/O problem
*/
protected abstract int getSizeHint() throws IOException;
-
+
/**
* Sends the raw stream data to the target OutputStream.
* @param out OutputStream to write to
* @throws IOException In case of an I/O problem
*/
- protected abstract void outputRawStreamData(OutputStream out)
+ protected abstract void outputRawStreamData(OutputStream out)
throws IOException;
/**
@@ -104,10 +104,10 @@
byte[] p = encode("stream\n");
out.write(p);
length += p.length;
-
+
encodedStream.outputContents(out);
length += encodedStream.getSize();
-
+
p = encode("\nendstream");
out.write(p);
length += p.length;
@@ -147,7 +147,7 @@
byte[] buf = encode("stream\n");
out.write(buf);
bytesWritten += buf.length;
-
+
//Stream contents
CloseBlockerOutputStream cbout = new CloseBlockerOutputStream(out);
CountingOutputStream cout = new CountingOutputStream(cbout);
@@ -156,12 +156,12 @@
filteredOutput.close();
refLength.setNumber(new Integer(cout.getCount()));
bytesWritten += cout.getCount();
-
+
//Stream trailer
buf = encode("\nendstream");
out.write(buf);
bytesWritten += buf.length;
-
+
return bytesWritten;
}
@@ -177,7 +177,7 @@
Writer writer = PDFDocument.getWriterFor(cout);
writer.write(getObjectID());
//int length = 0;
-
+
StreamCache encodedStream = null;
PDFNumber refLength = null;
final Object lengthEntry;
@@ -189,10 +189,10 @@
encodedStream = encodeStream();
lengthEntry = new Integer(encodedStream.getSize() + 1);
}
-
+
populateStreamDict(lengthEntry);
writeDictionary(cout, writer);
-
+
//Send encoded stream to target OutputStream
writer.flush();
if (encodedStream == null) {
@@ -201,7 +201,7 @@
outputStreamData(encodedStream, cout);
encodedStream.clear(); //Encoded stream can now be discarded
}
-
+
writer.write("\nendobj\n");
writer.flush();
return cout.getCount();
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/AlphaRasterImage.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/AlphaRasterImage.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/AlphaRasterImage.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/AlphaRasterImage.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.pdf;
import java.awt.image.DataBuffer;
@@ -33,7 +33,7 @@
* PDFImage implementation for alpha channel "images".
*/
public class AlphaRasterImage implements PDFImage {
-
+
private int bitsPerComponent;
private PDFDeviceColorSpace colorSpace;
private Raster alpha;
@@ -117,7 +117,7 @@
public String getSoftMask() {
return null;
}
-
+
/** {@inheritDoc} */
public PDFReference getSoftMaskReference() {
return null;
@@ -127,12 +127,12 @@
public boolean isInverted() {
return false;
}
-
+
/** {@inheritDoc} */
public void outputContents(OutputStream out) throws IOException {
int w = getWidth();
int h = getHeight();
-
+
//Check Raster
int nbands = alpha.getNumBands();
if (nbands != 1) {
@@ -171,7 +171,7 @@
}
}
-
+
/** {@inheritDoc} */
public void populateXObjectDictionary(PDFDictionary dict) {
//nop
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/BitmapImage.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/BitmapImage.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/BitmapImage.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/BitmapImage.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.pdf;
import java.io.IOException;
@@ -170,12 +170,12 @@
public boolean isInverted() {
return false;
}
-
+
/** {@inheritDoc} */
public void outputContents(OutputStream out) throws IOException {
out.write(bitmaps);
}
-
+
/** {@inheritDoc} */
public void populateXObjectDictionary(PDFDictionary dict) {
//nop
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/CCFFilter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/CCFFilter.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/CCFFilter.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/CCFFilter.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.pdf;
/**
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/CMapBuilder.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/CMapBuilder.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/CMapBuilder.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/CMapBuilder.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,22 +16,22 @@
*/
/* $Id$ */
-
+
package org.apache.fop.pdf;
import java.io.IOException;
import java.io.Writer;
public class CMapBuilder {
-
+
protected String name;
protected Writer writer;
-
+
public CMapBuilder(Writer writer, String name) {
this.writer = writer;
this.name = name;
}
-
+
/**
* Writes the CMap to a Writer.
* @throws IOException if an I/O error occurs
@@ -51,7 +51,7 @@
writeStreamAfterComments();
writeUseCMap();
}
-
+
protected void writePreStream() throws IOException {
// writer.write("/Type /CMap\n");
// writer.write(sysInfo.toPDFString());
@@ -86,7 +86,7 @@
writer.write(" def\n");
writer.write("end def\n");
}
-
+
protected void writeCIDSystemInfo() throws IOException {
writeCIDSystemInfo("Adobe", "Identity", 0);
}
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/DCTFilter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/DCTFilter.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/DCTFilter.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/DCTFilter.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.pdf;
/**
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/FlateFilter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/FlateFilter.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/FlateFilter.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/FlateFilter.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.pdf;
import java.io.IOException;
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/InMemoryStreamCache.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/InMemoryStreamCache.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/InMemoryStreamCache.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/InMemoryStreamCache.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.pdf;
import java.io.ByteArrayOutputStream;
@@ -72,7 +72,7 @@
public void write(byte[] data) throws IOException {
getOutputStream().write(data);
}
-
+
/**
* Outputs the cached bytes to the given stream.
* @param out the output stream to write to
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/NullFilter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/NullFilter.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/NullFilter.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/NullFilter.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.pdf;
import java.io.IOException;
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFAMode.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFAMode.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFAMode.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFAMode.java Fri Jul 25 03:55:49 2008
@@ -28,7 +28,7 @@
public static final PDFAMode PDFA_1A = new PDFAMode("PDF/A-1a");
/** PDF/A-1b enabled */
public static final PDFAMode PDFA_1B = new PDFAMode("PDF/A-1b");
-
+
private String name;
/**
@@ -43,13 +43,13 @@
public String getName() {
return this.name;
}
-
+
/** @return true if this mode obey the restrictions established by PDF/A-1b. */
public boolean isPDFA1LevelB() {
return (this != DISABLED);
//PDF/A-1a is a superset of PDF/A-1b!
}
-
+
/**
* Returns the mode enum object given a String.
* @param s the string
@@ -64,10 +64,10 @@
return DISABLED;
}
}
-
+
/** {@inheritDoc} */
public String toString() {
return name;
}
-
+
}
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFAction.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFAction.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFAction.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFAction.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.pdf;
/**
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFAnnotList.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFAnnotList.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFAnnotList.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFAnnotList.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.pdf;
// Java
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFArray.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFArray.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFArray.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFArray.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.pdf;
import java.io.IOException;
@@ -88,10 +88,10 @@
public PDFArray(PDFObject parent, Collection values) {
/* generic creation of PDF object */
super(parent);
-
+
this.values.addAll(values);
}
-
+
/**
* Create the array object
* @param parent the array's parent if any
@@ -100,12 +100,12 @@
public PDFArray(PDFObject parent, Object[] values) {
/* generic creation of PDF object */
super(parent);
-
+
for (int i = 0, c = values.length; i < c; i++) {
this.values.add(values[i]);
}
}
-
+
/**
* Returns the length of the array
* @return the length of the array
@@ -113,7 +113,7 @@
public int length() {
return this.values.size();
}
-
+
/**
* Sets an entry at a given location.
* @param index the index of the value to set
@@ -122,7 +122,7 @@
public void set(int index, Object obj) {
this.values.set(index, obj);
}
-
+
/**
* Sets an entry at a given location.
* @param index the index of the value to set
@@ -131,7 +131,7 @@
public void set(int index, double value) {
this.values.set(index, new Double(value));
}
-
+
/**
* Gets an entry at a given location.
* @param index the index of the value to set
@@ -140,7 +140,7 @@
public Object get(int index) {
return this.values.get(index);
}
-
+
/**
* Adds a new value to the array.
* @param obj the value
@@ -154,7 +154,7 @@
}
this.values.add(obj);
}
-
+
/**
* Adds a new value to the array.
* @param value the value
@@ -162,7 +162,7 @@
public void add(double value) {
this.values.add(new Double(value));
}
-
+
/** {@inheritDoc} */
protected int output(OutputStream stream) throws IOException {
CountingOutputStream cout = new CountingOutputStream(stream);
@@ -170,7 +170,7 @@
if (hasObjectNumber()) {
writer.write(getObjectID());
}
-
+
writer.write('[');
for (int i = 0; i < values.size(); i++) {
if (i > 0) {
@@ -180,13 +180,13 @@
formatObject(obj, cout, writer);
}
writer.write(']');
-
+
if (hasObjectNumber()) {
writer.write("\nendobj\n");
}
-
+
writer.flush();
return cout.getCount();
}
-
+
}
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFCIDFont.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFCIDFont.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFCIDFont.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFCIDFont.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.pdf;
import org.apache.fop.fonts.CIDFontType;
@@ -60,8 +60,8 @@
int[] w, String registry, String ordering,
int supplement, PDFCIDFontDescriptor descriptor) {
- this(basefont, cidtype, dw,
- new PDFWArray(w),
+ this(basefont, cidtype, dw,
+ new PDFWArray(w),
new PDFCIDSystemInfo(registry, ordering, supplement),
descriptor);
}
@@ -79,8 +79,8 @@
int[] w, PDFCIDSystemInfo systemInfo,
PDFCIDFontDescriptor descriptor) {
- this(basefont, cidtype, dw,
- new PDFWArray(w),
+ this(basefont, cidtype, dw,
+ new PDFWArray(w),
systemInfo,
descriptor);
}
@@ -189,7 +189,7 @@
} else if (cidFontType == CIDFontType.CIDTYPE2) {
return cidFontType.getName();
} else {
- throw new IllegalArgumentException("Unsupported CID font type: "
+ throw new IllegalArgumentException("Unsupported CID font type: "
+ cidFontType.getName());
}
}
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFCIDFontDescriptor.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFCIDFontDescriptor.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFCIDFontDescriptor.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFCIDFontDescriptor.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.pdf;
// based on work by Takayuki Takeuchi
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFCIDSystemInfo.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFCIDSystemInfo.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFCIDSystemInfo.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFCIDSystemInfo.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.pdf;
// based on work by Takayuki Takeuchi
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFCMap.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFCMap.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFCMap.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFCMap.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.pdf;
import java.io.IOException;
@@ -421,7 +421,7 @@
protected CMapBuilder createCMapBuilder(Writer writer) {
return new CMapBuilder(writer, this.name);
}
-
+
/** {@inheritDoc} */
protected int output(OutputStream stream) throws IOException {
CMapBuilder builder = createCMapBuilder(getBufferWriter());
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFCharProcs.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFCharProcs.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFCharProcs.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFCharProcs.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,11 +16,11 @@
*/
/* $Id$ */
-
+
package org.apache.fop.pdf;
import java.util.Map;
-import java.util.HashMap;
+import java.util.HashMap;
/**
* class representing a /CharProcs dictionary for Type3 fonts.
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFColor.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFColor.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFColor.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFColor.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.pdf;
import java.awt.Color;
@@ -44,11 +44,11 @@
private double magenta = -1.0;
private double yellow = -1.0;
private double black = -1.0;
-
+
// TODO - It would probably be better to reorganize PDFPathPaint/PDFColor/PDFColorSpace
- // class hierarchy. However, at this early stages of my FOP understanding, I can
- // not really oversee the consequences of such a switch (nor whether it would be
- // appropriate).
+ // class hierarchy. However, at this early stages of my FOP understanding, I can
+ // not really oversee the consequences of such a switch (nor whether it would be
+ // appropriate).
private ColorExt colorExt = null;
/**
@@ -66,24 +66,24 @@
this.green = theGreen;
this.blue = theBlue;
}
-
+
/**
* Create PDFColor for the given document and based on the java.awt.Color object
- *
- * In case the java.awt.Color is an instance of the ColorExt class a PDFICCStream is added to
+ *
+ * In case the java.awt.Color is an instance of the ColorExt class a PDFICCStream is added to
* the PDFDocument that is being created
- *
+ *
* @param pdfDoc PDFDocument that is being created
* @param col Color object from which to create this PDFColor
*/
public PDFColor(PDFDocument pdfDoc, Color col) {
this(col);
// TODO - 1) There is a potential conflict when FOP and Batik elements use the same color
- // profile name for different profiles.
- // 2) In case the same color profile is used with different names it will be
+ // profile name for different profiles.
+ // 2) In case the same color profile is used with different names it will be
// included multiple times in the PDF
//
- if (colorExt != null
+ if (colorExt != null
&& pdfDoc.getResources().getColorSpace(colorExt.getIccProfileName()) == null) {
PDFICCStream pdfIccStream = new PDFICCStream();
ColorSpace ceCs = colorExt.getOrigColorSpace();
@@ -98,17 +98,17 @@
pdfDoc.getFactory().makeICCBasedColorSpace(
null, colorExt.getIccProfileName(), pdfIccStream);
if (log.isInfoEnabled()) {
- log.info("Adding PDFICCStream " + colorExt.getIccProfileName()
+ log.info("Adding PDFICCStream " + colorExt.getIccProfileName()
+ " for " + colorExt.getIccProfileSrc());
}
}
}
-
+
/**
* Create a PDF color from a java.awt.Color object.
- *
+ *
* Different Color objects are handled differently. Cases recognized are.
- *
+ *
* 1. CMYK color
* 2. ColorExt color
* 3. 'Normal' java.awt.Color (RGB case assumed)
@@ -120,12 +120,12 @@
ColorExt ce = null;
if (col instanceof ColorExt) {
ce = (ColorExt)col;
- cs = ce.getOrigColorSpace();
+ cs = ce.getOrigColorSpace();
}
if (cs != null && cs instanceof CMYKColorSpace) {
// CMYK case
this.colorSpace = new PDFDeviceColorSpace(PDFDeviceColorSpace.DEVICE_CMYK);
- float[] cmyk = (ce == null
+ float[] cmyk = (ce == null
? col.getColorComponents(null)
: ce.getOriginalColorComponents());
this.cyan = cmyk[0];
@@ -151,7 +151,7 @@
this.blue = comps[2];
}
}
-
+
/**
* Create a PDF color with int values ranging from 0 to 255
*
@@ -239,11 +239,11 @@
return (this.blue);
}
- /**
+ /**
* Get the red integer component.
- *
- * @return the red integer value
- */
+ *
+ * @return the red integer value
+ */
public int red255() {
return (int)(this.red * 255d);
}
@@ -251,7 +251,7 @@
/**
* Get the green integer component.
*
- * @return the green integer value
+ * @return the green integer value
*/
public int green255() {
return (int)(this.green * 255d);
@@ -260,7 +260,7 @@
/**
* Get the blue integer component.
*
- * @return the blue integer value
+ * @return the blue integer value
*/
public int blue255() {
return (int)(this.blue * 255d);
@@ -269,7 +269,7 @@
/**
* Get the cyan component.
*
- * @return the cyan double value
+ * @return the cyan double value
*/
public double cyan() {
return (this.cyan);
@@ -278,7 +278,7 @@
/**
* Get the magenta component.
*
- * @return the magenta double value
+ * @return the magenta double value
*/
public double magenta() {
return (this.magenta);
@@ -287,7 +287,7 @@
/**
* Get the yellow component.
*
- * @return the yellow double value
+ * @return the yellow double value
*/
public double yellow() {
return (this.yellow);
@@ -296,7 +296,7 @@
/**
* Get the black component.
*
- * @return the black double value
+ * @return the black double value
*/
public double black() {
return (this.black);
@@ -553,7 +553,7 @@
}
PDFColor color = (PDFColor)obj;
- if (color.red == this.red
+ if (color.red == this.red
&& color.green == this.green
&& color.blue == this.blue) {
return true;
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFColorSpace.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFColorSpace.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFColorSpace.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFColorSpace.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,14 +16,14 @@
*/
/* $Id$ */
-
+
package org.apache.fop.pdf;
/**
* PDF Color space.
*/
public interface PDFColorSpace {
-
+
/**
* Get the number of color components for this colorspace
* @return the number of components
@@ -32,18 +32,18 @@
/** @return the name of the color space */
String getName();
-
+
/**
- * @return true if the color space is a device-dependent color space (like DeviceRGB,
+ * @return true if the color space is a device-dependent color space (like DeviceRGB,
* DeviceCMYK and DeviceGray)
*/
boolean isDeviceColorSpace();
-
+
/** @return true if the color space is an RGB color space */
boolean isRGBColorSpace();
/** @return true if the color space is an CMYK color space */
boolean isCMYKColorSpace();
/** @return true if the color space is an Gray color space */
boolean isGrayColorSpace();
-
+
}
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFConformanceException.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFConformanceException.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFConformanceException.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFConformanceException.java Fri Jul 25 03:55:49 2008
@@ -33,7 +33,7 @@
public PDFConformanceException() {
super();
}
-
+
/**
* Constructs an PDFConformanceException with the specified detail
* message. A detail message is a String that describes this particular
@@ -43,5 +43,5 @@
public PDFConformanceException(String message) {
super(message);
}
-
+
}
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFDestination.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFDestination.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFDestination.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFDestination.java Fri Jul 25 03:55:49 2008
@@ -55,15 +55,15 @@
protected int output(OutputStream stream) throws IOException {
CountingOutputStream cout = new CountingOutputStream(stream);
Writer writer = PDFDocument.getWriterFor(cout);
-
+
formatObject(getIDRef(), cout, writer);
writer.write(' ');
formatObject(goToReference, cout, writer);
-
+
writer.flush();
return cout.getCount();
}
-
+
/**
* Sets the GoToReference in the associated DestinationData object.
*
@@ -120,7 +120,7 @@
if (dest.getIDRef().equals(this.getIDRef())) {
return true;
}
-
+
return false;
}
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFDeviceColorSpace.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFDeviceColorSpace.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFDeviceColorSpace.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFDeviceColorSpace.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,14 +16,14 @@
*/
/* $Id$ */
-
+
package org.apache.fop.pdf;
/**
* Represents a device-specific color space. Used for mapping DeviceRGB, DeviceCMYK and DeviceGray.
*/
public class PDFDeviceColorSpace implements PDFColorSpace {
-
+
private int numComponents;
/**
@@ -136,5 +136,5 @@
public boolean isGrayColorSpace() {
return getColorSpace() == DEVICE_GRAY;
}
-
+
}
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFDictionary.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFDictionary.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFDictionary.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFDictionary.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.pdf;
import java.io.IOException;
@@ -32,7 +32,7 @@
* Class representing a PDF dictionary object
*/
public class PDFDictionary extends PDFObject {
-
+
/**
* the entry map
*/
@@ -43,7 +43,7 @@
* "entries", always make sure you adjust this list accordingly.
*/
protected List order = new java.util.ArrayList();
-
+
/**
* Create a new dictionary object.
*/
@@ -76,7 +76,7 @@
}
this.entries.put(name, value);
}
-
+
/**
* Puts a new name/value pair.
* @param name the name
@@ -88,7 +88,7 @@
}
this.entries.put(name, new Integer(value));
}
-
+
/**
* Returns the value given a name.
* @param name the name of the value
@@ -97,7 +97,7 @@
public Object get(String name) {
return this.entries.get(name);
}
-
+
/** {@inheritDoc} */
protected int output(OutputStream stream) throws IOException {
CountingOutputStream cout = new CountingOutputStream(stream);
@@ -105,17 +105,17 @@
if (hasObjectNumber()) {
writer.write(getObjectID());
}
-
+
writeDictionary(cout, writer);
if (hasObjectNumber()) {
writer.write("\nendobj\n");
}
-
+
writer.flush();
return cout.getCount();
}
-
+
/**
* Writes the contents of the dictionary to a StringBuffer.
* @param out the OutputStream (for binary content)
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org