Author: adelmelle
Date: Sun Feb  6 14:05:44 2011
New Revision: 1067668

URL: http://svn.apache.org/viewvc?rev=1067668&view=rev
Log:
Minor fixup: extract condition into local variable

Modified:
    
xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java

Modified: 
xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java?rev=1067668&r1=1067667&r2=1067668&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java
 (original)
+++ 
xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java
 Sun Feb  6 14:05:44 2011
@@ -249,6 +249,7 @@ public abstract class BlockStackingLayou
         referenceIPD = context.getRefIPD();
         updateContentAreaIPDwithOverconstrainedAdjust();
 
+        boolean isRestart = (lmStack != null);
         List<ListElement> contentList = new LinkedList<ListElement>();
         List<ListElement> elements = new LinkedList<ListElement>();
 
@@ -278,7 +279,7 @@ public abstract class BlockStackingLayou
         LayoutContext childLC = new LayoutContext(0);
         List<ListElement> childElements;
         LayoutManager currentChildLM;
-        if (lmStack != null) {
+        if (isRestart) {
             if (lmStack.isEmpty()) {
                 assert restartAtLM != null && restartAtLM.getParent() == this;
                 currentChildLM = restartAtLM;
@@ -342,7 +343,7 @@ public abstract class BlockStackingLayou
         }
 
         while ((currentChildLM = getChildLM()) != null) {
-            if (lmStack != null) {
+            if (isRestart) {
                 currentChildLM.reset(); // TODO won't work with forced breaks
             }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to