Author: vhennebert
Date: Wed Jul 22 11:12:15 2009
New Revision: 796666
URL: http://svn.apache.org/viewvc?rev=796666&view=rev
Log:
Bugfix: make sure all of the children elements are re-laid out after an IPD
change
Removed cast into BlockLM now that the special getNextKnuthElements has been
defined in LayoutManager
Modified:
xmlgraphics/fop/branches/Temp_ChangingIPDHack/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java
xmlgraphics/fop/branches/Temp_ChangingIPDHack/test/layoutengine/standard-testcases/flow_changing-ipd_3.xml
Modified:
xmlgraphics/fop/branches/Temp_ChangingIPDHack/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ChangingIPDHack/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java?rev=796666&r1=796665&r2=796666&view=diff
==============================================================================
---
xmlgraphics/fop/branches/Temp_ChangingIPDHack/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java
(original)
+++
xmlgraphics/fop/branches/Temp_ChangingIPDHack/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java
Wed Jul 22 11:12:15 2009
@@ -396,6 +396,7 @@
assert restartAtLM != null && restartAtLM.getParent() == this;
currentChildLM = restartAtLM;
currentChildLM.reset();
+ setCurrentChildLM(currentChildLM);
childrenElements = getNextChildElements(currentChildLM, context,
childLC,
alignment);
@@ -570,11 +571,9 @@
if (childLM instanceof LineLayoutManager) {
return ((LineLayoutManager)
childLM).getNextKnuthElements(childLC, alignment,
(LeafPosition) restartPosition);
- } else if (childLM instanceof BlockLayoutManager) {
- return ((BlockLayoutManager)
childLM).getNextKnuthElements(childLC, alignment,
- lmStack, restartPosition, restartAtLM);
} else {
- throw new UnsupportedOperationException("TODO: layout manager
not restartable");
+ return childLM.getNextKnuthElements(childLC, alignment,
+ lmStack, restartPosition, restartAtLM);
}
}
}
Modified:
xmlgraphics/fop/branches/Temp_ChangingIPDHack/test/layoutengine/standard-testcases/flow_changing-ipd_3.xml
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ChangingIPDHack/test/layoutengine/standard-testcases/flow_changing-ipd_3.xml?rev=796666&r1=796665&r2=796666&view=diff
==============================================================================
---
xmlgraphics/fop/branches/Temp_ChangingIPDHack/test/layoutengine/standard-testcases/flow_changing-ipd_3.xml
(original)
+++
xmlgraphics/fop/branches/Temp_ChangingIPDHack/test/layoutengine/standard-testcases/flow_changing-ipd_3.xml
Wed Jul 22 11:12:15 2009
@@ -74,9 +74,13 @@
<checks>
<eval expected="face."
xpath="//pageViewport[1]//flow/block/block[3]/lineArea[4]/text/word[position()=last()]"/>
<eval expected="12000"
xpath="//pageViewport[2]//flow/block/block[1]/@space-before"/>
+ <eval expected="500000"
xpath="//pageViewport[2]//flow/block/block[1]/@ipd"/>
+ <eval expected="500000"
xpath="//pageViewport[2]//flow/block/block[1]/lineArea[1]/@ipd"/>
<eval expected="(solid,#000000,1000)"
xpath="//pageViewport[2]//flow/block/block[1]/@border-before"/>
- <eval expected="In"
xpath="//pageViewport[1]//flow/block/block[1]/lineArea[1]/text/word[1]"/>
- <eval expected="olden"
xpath="//pageViewport[1]//flow/block/block[1]/lineArea[1]/text/word[2]"/>
+ <eval expected="In"
xpath="//pageViewport[2]//flow/block/block[1]/lineArea[1]/text/word[1]"/>
+ <eval expected="olden"
xpath="//pageViewport[2]//flow/block/block[1]/lineArea[1]/text/word[2]"/>
+ <eval expected="500000"
xpath="//pageViewport[2]//flow/block/block[2]/@ipd"/>
+ <eval expected="500000"
xpath="//pageViewport[2]//flow/block/block[2]/lineArea[1]/@ipd"/>
</checks>
</testcase>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]