Browse Source

Fix for adding absolutely positioned block without children.


git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198386 13f79535-47bb-0310-9956-ffa450edef68
pull/30/head
Jeremias Maerki 19 years ago
parent
commit
73340321ef
1 changed files with 14 additions and 8 deletions
  1. 14
    8
      src/java/org/apache/fop/render/AbstractRenderer.java

+ 14
- 8
src/java/org/apache/fop/render/AbstractRenderer.java View File

*/ */
protected void renderBlock(Block block) { protected void renderBlock(Block block) {
List children = block.getChildAreas(); List children = block.getChildAreas();
if (children == null) {
handleBlockTraits(block);
// simply move position
currentBPPosition += block.getAllocBPD();
} else if (block instanceof BlockViewport) {
renderBlockViewport((BlockViewport) block, children);
if (block instanceof BlockViewport) {
if (children != null) {
renderBlockViewport((BlockViewport) block, children);
} else {
handleBlockTraits(block);
// simply move position
currentBPPosition += block.getAllocBPD();
}
} else { } else {
// save position and offset // save position and offset
int saveIP = currentIPPosition; int saveIP = currentIPPosition;


handleBlockTraits(block); handleBlockTraits(block);


renderBlocks(block, children);
if (children != null) {
renderBlocks(block, children);
}


// absolute blocks do not effect the layout // absolute blocks do not effect the layout
currentBPPosition = saveBP; currentBPPosition = saveBP;


handleBlockTraits(block); handleBlockTraits(block);


renderBlocks(block, children);
if (children != null) {
renderBlocks(block, children);
}


// stacked and relative blocks effect stacking // stacked and relative blocks effect stacking
currentIPPosition = saveIP; currentIPPosition = saveIP;

Loading…
Cancel
Save