]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
FOP-2799: Only reduce penalty if there is a existing break
authorSimon Steiner <ssteiner@apache.org>
Wed, 20 Jun 2018 11:32:05 +0000 (11:32 +0000)
committerSimon Steiner <ssteiner@apache.org>
Wed, 20 Jun 2018 11:32:05 +0000 (11:32 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1833908 13f79535-47bb-0310-9956-ffa450edef68

fop-core/src/main/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java
fop/test/layoutengine/standard-testcases/flow_changing-ipd_list2.xml [new file with mode: 0644]
fop/test/layoutengine/standard-testcases/list-2-columns.xml [new file with mode: 0644]

index 69b78c9bc09efca30622bff53cf93d1aa1157345..9d9769a7c5571f74d6f25765b9dd2732d08f64cc 100644 (file)
@@ -448,12 +448,9 @@ public class ListItemLayoutManager extends SpacedBorderedPaddedBlockLayoutManage
                 // add the original line where the float was but without the float now
                 returnList.add(new KnuthBlockBox(boxHeight, footnoteList, stepPosition, false));
             }
-            if (originalBodyPosition != null) {
-                LayoutManager lm = originalBodyPosition.getLM();
-                if ((lm instanceof ListBlockLayoutManager || lm instanceof BlockLayoutManager)
-                        && getKeepWithPrevious().isAuto()) {
-                    stepPenalty++;
-                }
+            if (originalBodyPosition != null && getKeepWithPrevious().isAuto()
+                    && shouldWeAvoidBreak(returnList, originalBodyPosition.getLM())) {
+                stepPenalty++;
             }
             if (addedBoxHeight < totalHeight) {
                 Keep keep = keepWithNextActive.compare(getKeepTogether());
@@ -469,6 +466,26 @@ public class ListItemLayoutManager extends SpacedBorderedPaddedBlockLayoutManage
         return returnList;
     }
 
+    private boolean shouldWeAvoidBreak(List returnList, LayoutManager lm) {
+        if (lm instanceof BlockLayoutManager) {
+            return true;
+        }
+        if (lm instanceof ListBlockLayoutManager) {
+            int penaltyShootout = 0;
+            for (Object o : returnList) {
+                if (o instanceof BreakElement) {
+                    if (((BreakElement) o).getPenaltyValue() > 0) {
+                        penaltyShootout++;
+                    } else {
+                        penaltyShootout--;
+                    }
+                }
+            }
+            return penaltyShootout > 0;
+        }
+        return false;
+    }
+
     private int getNextStep(List[] elementLists, int[] start, int[] end, int[] partialHeights) {
         // backup of partial heights
         int[] backupHeights = {partialHeights[0], partialHeights[1]};
diff --git a/fop/test/layoutengine/standard-testcases/flow_changing-ipd_list2.xml b/fop/test/layoutengine/standard-testcases/flow_changing-ipd_list2.xml
new file mode 100644 (file)
index 0000000..ad06e94
--- /dev/null
@@ -0,0 +1,232 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  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.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!-- $Id$ -->
+<testcase>
+  <info>
+    <p>
+      This test checks that blocks of texts are re-laid out after a change of the flow ipd.
+    </p>
+  </info>
+  <fo>
+<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" >
+  <fo:layout-master-set>
+    <fo:simple-page-master margin-right="1in" margin-left="1in" margin-bottom="0.20in" margin-top="0.20in" page-width="8.5in" page-height="11in" master-name="PageA">
+      <fo:region-body margin-right="0in" margin-left="0in" margin-bottom="0.85in" margin-top="2.5in" region-name="Body"/>
+
+    </fo:simple-page-master>
+    <fo:simple-page-master margin-right="0.75in" margin-left="0.75in" margin-bottom="0.20in" margin-top="0.20in" page-width="8.5in" page-height="11in" master-name="PageB">
+      <fo:region-body margin-right="0in" margin-left="0in" margin-bottom="0.85in" margin-top="0.85in" region-name="Body"/>
+
+    </fo:simple-page-master>
+    <fo:page-sequence-master master-name="PageSequence">
+      <fo:repeatable-page-master-alternatives>
+        <fo:conditional-page-master-reference page-position="first" master-reference="PageA"/>
+        <fo:conditional-page-master-reference page-position="rest" master-reference="PageB"/>
+      </fo:repeatable-page-master-alternatives>
+    </fo:page-sequence-master>
+  </fo:layout-master-set>
+  <fo:page-sequence format="1" id="TH_LastPage" initial-page-number="auto" force-page-count="auto" master-reference="PageSequence">
+   
+    <fo:flow flow-name="Body">
+      <fo:block>
+      
+        <fo:list-block  font-size="12pt">
+          <fo:list-item  font-size="11pt" space-after="5px">
+            <fo:list-item-label  font-size="11pt">
+              <fo:block>4.</fo:block>
+            </fo:list-item-label>
+            <fo:list-item-body  font-size="11pt" start-indent="body-start()">
+              <fo:block>
+                <fo:inline font-weight="bold">Property Not Covered </fo:inline>
+                <fo:block/>We do not cover: <fo:list-block  font-size="12pt">
+                  <fo:list-item  font-size="11pt" space-after="5px">
+                    <fo:list-item-label  font-size="11pt">
+                      <fo:block>a.</fo:block>
+                    </fo:list-item-label>
+                    <fo:list-item-body  font-size="11pt" start-indent="body-start()">
+                      <fo:block>Articles separately described and specifically insured, regardless of the limit for which they are insured, in this or other insurance; </fo:block>
+                    </fo:list-item-body>
+                  </fo:list-item>
+                  <fo:list-item  font-size="11pt" space-after="5px">
+                    <fo:list-item-label  font-size="11pt">
+                      <fo:block>b.</fo:block>
+                    </fo:list-item-label>
+                    <fo:list-item-body  font-size="11pt" start-indent="body-start()">
+                      <fo:block>Animals, birds or fish; </fo:block>
+                    </fo:list-item-body>
+                  </fo:list-item>
+                  <fo:list-item  font-size="11pt" space-after="5px">
+                    <fo:list-item-label  font-size="11pt">
+                      <fo:block>c.</fo:block>
+                    </fo:list-item-label>
+                    <fo:list-item-body  font-size="11pt" start-indent="body-start()">
+                      <fo:block>"Motor vehicles". <fo:block/>This includes a "motor vehicle's" equipment and parts. <fo:block/>However, this Paragraph <fo:inline font-weight="bold">4.c. </fo:inline>does not apply to: <fo:list-block  font-size="12pt">
+                          <fo:list-item  font-size="11pt" space-after="5px">
+                            <fo:list-item-label  font-size="11pt">
+                              <fo:block>(1)</fo:block>
+                            </fo:list-item-label>
+                            <fo:list-item-body  font-size="11pt" start-indent="body-start()">
+                              <fo:block>Portable electronic equipment that: <fo:list-block  font-size="12pt">
+                                  <fo:list-item  font-size="11pt" space-after="5px">
+                                    <fo:list-item-label  font-size="11pt">
+                                      <fo:block>(a)</fo:block>
+                                    </fo:list-item-label>
+                                    <fo:list-item-body  font-size="11pt" start-indent="body-start()">
+                                      <fo:block>Reproduces, receives or transmits audio, visual or data signals; and </fo:block>
+                                    </fo:list-item-body>
+                                  </fo:list-item>
+                                  <fo:list-item  font-size="11pt" space-after="5px">
+                                    <fo:list-item-label  font-size="11pt">
+                                      <fo:block>(b)</fo:block>
+                                    </fo:list-item-label>
+                                    <fo:list-item-body  font-size="11pt" start-indent="body-start()">
+                                      <fo:block>Is designed so that it may be operated from a power source other than a "motor vehicle's" electrical system.</fo:block>
+                                    </fo:list-item-body>
+                                  </fo:list-item>
+                                </fo:list-block>
+                              </fo:block>
+                            </fo:list-item-body>
+                          </fo:list-item>
+                          <fo:list-item  font-size="11pt" space-after="5px">
+                            <fo:list-item-label  font-size="11pt">
+                              <fo:block>(2)</fo:block>
+                            </fo:list-item-label>
+                            <fo:list-item-body  font-size="11pt" start-indent="body-start()">
+                              <fo:block>"Motor vehicles" not required to be registered for use on public roads or property which are: <fo:list-block  font-size="12pt">
+                                  <fo:list-item  font-size="11pt" space-after="5px">
+                                    <fo:list-item-label  font-size="11pt">
+                                      <fo:block>(a)</fo:block>
+                                    </fo:list-item-label>
+                                    <fo:list-item-body  font-size="11pt" start-indent="body-start()">
+                                      <fo:block>Used solely to service a residence; or </fo:block>
+                                    </fo:list-item-body>
+                                  </fo:list-item>
+                                  <fo:list-item  font-size="11pt" space-after="5px">
+                                    <fo:list-item-label  font-size="11pt">
+                                      <fo:block>(b)</fo:block>
+                                    </fo:list-item-label>
+                                    <fo:list-item-body  font-size="11pt" start-indent="body-start()">
+                                      <fo:block>Designed to assist the handicapped; </fo:block>
+                                    </fo:list-item-body>
+                                  </fo:list-item>
+                                </fo:list-block>
+                              </fo:block>
+                            </fo:list-item-body>
+                          </fo:list-item>
+                        </fo:list-block>
+                      </fo:block>
+                    </fo:list-item-body>
+                  </fo:list-item>
+                  <fo:list-item  font-size="11pt" space-after="5px">
+                    <fo:list-item-label  font-size="11pt">
+                      <fo:block>d.</fo:block>
+                    </fo:list-item-label>
+                    <fo:list-item-body  font-size="11pt" start-indent="body-start()">
+                      <fo:block>Aircraft, meaning any contrivance used or designed for flight, including any parts whether or not attached to the aircraft. <fo:block/>We do cover model or hobby aircraft not used or designed to carry people or cargo; </fo:block>
+                    </fo:list-item-body>
+                  </fo:list-item>
+                  <fo:list-item  font-size="11pt" space-after="5px">
+                    <fo:list-item-label  font-size="11pt">
+                      <fo:block>e.</fo:block>
+                    </fo:list-item-label>
+                    <fo:list-item-body  font-size="11pt" start-indent="body-start()">
+                      <fo:block>Hovercraft and parts. Hovercraft means a self-propelled motorized ground effect vehicle and includes, but is not limited to, flarecraft and air cushion vehicles; </fo:block>
+                    </fo:list-item-body>
+                  </fo:list-item>
+                  <fo:list-item  font-size="11pt" space-after="5px">
+                    <fo:list-item-label  font-size="11pt">
+                      <fo:block>f.</fo:block>
+                    </fo:list-item-label>
+                    <fo:list-item-body  font-size="11pt" start-indent="body-start()">
+                      <fo:block>Property of roomers, boarders and other tenants, except property of roomers and boarders related to an "insured"; </fo:block>
+                    </fo:list-item-body>
+                  </fo:list-item>
+                  <fo:list-item  font-size="11pt" space-after="5px">
+                    <fo:list-item-label  font-size="11pt">
+                      <fo:block>g.</fo:block>
+                    </fo:list-item-label>
+                    <fo:list-item-body  font-size="11pt" start-indent="body-start()">
+                      <fo:block>Property in an apartment regularly rented or held for rental to others by an "insured"; </fo:block>
+                    </fo:list-item-body>
+                  </fo:list-item>
+                  <fo:list-item  font-size="11pt" space-after="5px">
+                    <fo:list-item-label  font-size="11pt">
+                      <fo:block>h.</fo:block>
+                    </fo:list-item-label>
+                    <fo:list-item-body  font-size="11pt" start-indent="body-start()">
+                      <fo:block>Property rented or held for rental to others off the "residence premises"; </fo:block>
+                    </fo:list-item-body>
+                  </fo:list-item>
+                  <fo:list-item  font-size="11pt" space-after="5px">
+                    <fo:list-item-label  font-size="11pt">
+                      <fo:block>i.</fo:block>
+                    </fo:list-item-label>
+                    <fo:list-item-body  font-size="11pt" start-indent="body-start()">
+                      <fo:block>"Business" data, including such data stored in: <fo:list-block  font-size="12pt">
+                          <fo:list-item  font-size="11pt" space-after="5px">
+                            <fo:list-item-label  font-size="11pt">
+                              <fo:block>(1)</fo:block>
+                            </fo:list-item-label>
+                            <fo:list-item-body  font-size="11pt" start-indent="body-start()">
+                              <fo:block>Books of account, drawings or other paper records; or </fo:block>
+                            </fo:list-item-body>
+                          </fo:list-item>
+                          <fo:list-item  font-size="11pt" space-after="5px">
+                            <fo:list-item-label  font-size="11pt">
+                              <fo:block>(2)</fo:block>
+                            </fo:list-item-label>
+                            <fo:list-item-body  font-size="11pt" start-indent="body-start()">
+                              <fo:block>Computers and related equipment. <fo:block/>We do cover the cost of blank recording or storage media and of prerecorded computer programs available on the retail market; </fo:block>
+                            </fo:list-item-body>
+                          </fo:list-item>
+                        </fo:list-block>
+                      </fo:block>
+                    </fo:list-item-body>
+                  </fo:list-item>
+                  <fo:list-item  font-size="11pt" space-after="5px">
+                    <fo:list-item-label  font-size="11pt">
+                      <fo:block>j.</fo:block>
+                    </fo:list-item-label>
+                    <fo:list-item-body  font-size="11pt" start-indent="body-start()">
+                      <fo:block>Credit cards, electronic fund transfer cards or access devices used solely for deposit, withdrawal or transfer of funds except as provided in <fo:inline font-weight="bold">D.6. </fo:inline>Credit Card, Electronic Fund Transfer Card Or Access Device, Forgery And Counterfeit Money under Section <fo:inline font-weight="bold">I </fo:inline>– Property Coverages; or </fo:block>
+                    </fo:list-item-body>
+                  </fo:list-item>
+                  <fo:list-item  font-size="11pt" space-after="5px">
+                    <fo:list-item-label  font-size="11pt">
+                      <fo:block>k.</fo:block>
+                    </fo:list-item-label>
+                    <fo:list-item-body  font-size="11pt" start-indent="body-start()">
+                      <fo:block>Water or steam. </fo:block>
+                    </fo:list-item-body>
+                  </fo:list-item>
+                </fo:list-block>
+              </fo:block>
+            </fo:list-item-body>
+          </fo:list-item>
+        </fo:list-block>
+    
+      </fo:block>
+    </fo:flow>
+  </fo:page-sequence>
+</fo:root>
+  </fo>
+  <checks>
+    <eval expected="4." xpath="//pageViewport[1]//flow/block//word"/>
+    <eval expected="Transfer" xpath="//pageViewport[2]//flow/block//word"/>
+  </checks>
+</testcase>
diff --git a/fop/test/layoutengine/standard-testcases/list-2-columns.xml b/fop/test/layoutengine/standard-testcases/list-2-columns.xml
new file mode 100644 (file)
index 0000000..87126c3
--- /dev/null
@@ -0,0 +1,352 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  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.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!-- $Id$ -->
+<testcase>
+  <info>
+    <p>
+      This test checks number of words in each column
+    </p>
+  </info>
+  <fo>
+<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:fox="http://xmlgraphics.apache.org/fop/extensions">
+  <fo:layout-master-set>
+    <fo:simple-page-master margin-top="0.4in" page-width="8.5in" page-height="11in" master-name="PageFront" margin-bottom="0.33in" margin-right="0.65in" margin-left="0.65in">
+      <fo:region-body margin-top="0.6in" margin-bottom="0.56in" margin-right="0in" margin-left="0in" column-gap="0.16in" column-count="2" region-name="letterPageBody"/>
+
+
+    </fo:simple-page-master>
+    <fo:simple-page-master page-width="8.5in" page-height="11in" master-name="PageRest" margin-bottom="0.33in" margin-right="0.65in" margin-top="0.49in" margin-left="0.65in">
+      <fo:region-body margin-bottom="0.5in" column-gap="0.20in" column-count="2" region-name="letterPageBody" margin-right="0in" margin-top="0in" margin-left="0in"/>
+
+    </fo:simple-page-master>
+    <fo:page-sequence-master master-name="LetterPages">
+      <fo:repeatable-page-master-alternatives>
+        <fo:conditional-page-master-reference page-position="first" master-reference="PageFront"/>
+        <fo:conditional-page-master-reference page-position="rest" master-reference="PageRest"/>
+        <fo:conditional-page-master-reference page-position="last" master-reference="PageRest"/>
+      </fo:repeatable-page-master-alternatives>
+    </fo:page-sequence-master>
+  </fo:layout-master-set>
+  <fo:page-sequence format="1" id="th_default_sequence1" master-reference="LetterPages" initial-page-number="auto" force-page-count="auto">
+    <fo:flow flow-name="letterPageBody">
+      <fo:block>
+        <fo:block>
+          <fo:block  font-size="8.5pt" font-style="normal" color="#05CC7C" font-weight="bold" space-before="0.1in" leader-pattern="dots" leader-pattern-width="inherit" leader-alignment="reference-area" text-align-last="justify">
+            <fo:basic-link internal-destination="N1003F">AGREEMENT</fo:basic-link>
+            <fo:leader width="100%" leader-pattern="use-content">.</fo:leader>
+            <fo:page-number-citation ref-id="N1003F"/>
+          </fo:block>
+          <fo:block  font-size="8.5pt" font-style="normal" color="#05CC7C" font-weight="bold" space-before="0.1in" leader-pattern="dots" leader-pattern-width="inherit" leader-alignment="reference-area" text-align-last="justify">
+            <fo:basic-link internal-destination="N100F4">DEFINITIONS</fo:basic-link>
+            <fo:leader width="100%" leader-pattern="use-content">.</fo:leader>
+            <fo:page-number-citation ref-id="N100F4"/>
+          </fo:block>
+        </fo:block>
+        <fo:block>
+          <fo:leader/>
+          <fo:block break-before="page"/>
+        </fo:block>
+        <fo:block  font-size="8.5pt" font-style="normal" color="#05CC7C" space-after="0.1in" font-weight="bold" role="H1" id="N1003F" text-align="left">AGREEMENT</fo:block>
+        <fo:block  font-size="8.5pt" font-style="normal" text-align="left">
+          <fo:inline  font-weight="bold" font-style="italic">We </fo:inline>agree to provide the insurance described in this policy:</fo:block>
+        <fo:list-block space-after="1mm" space-before="2mm">
+          <fo:list-item space-before="1mm" space-after="0.5mm">
+            <fo:list-item-label  font-size="8.5pt" start-indent="0.23in">
+              <fo:block>1.</fo:block>
+            </fo:list-item-label>
+            <fo:list-item-body  font-size="8.5pt" start-indent="0.42in">
+              <fo:block>based on <fo:inline  font-weight="bold" font-style="italic">your </fo:inline>payment of premium, in a form acceptable to <fo:inline  font-weight="bold" font-style="italic">us</fo:inline>, for the coverages <fo:inline  font-weight="bold" font-style="italic">you </fo:inline>chose;</fo:block>
+            </fo:list-item-body>
+          </fo:list-item>
+          <fo:list-item space-before="1mm" space-after="0.5mm">
+            <fo:list-item-label  font-size="8.5pt" start-indent="0.23in">
+              <fo:block>2.</fo:block>
+            </fo:list-item-label>
+            <fo:list-item-body  font-size="8.5pt" start-indent="0.42in">
+              <fo:block>based on <fo:inline  font-weight="bold" font-style="italic">your </fo:inline>compliance with all applicable provisions of this policy; and</fo:block>
+            </fo:list-item-body>
+          </fo:list-item>
+          <fo:list-item space-before="1mm" space-after="0.5mm">
+            <fo:list-item-label  font-size="8.5pt" start-indent="0.23in">
+              <fo:block>3.</fo:block>
+            </fo:list-item-label>
+            <fo:list-item-body  font-size="8.5pt" start-indent="0.42in">
+              <fo:block>based on the information <fo:inline  font-weight="bold" font-style="italic">you </fo:inline>have given <fo:inline  font-weight="bold" font-style="italic">us </fo:inline>and <fo:inline  font-weight="bold" font-style="italic">your </fo:inline>statements in this agreement.</fo:block>
+            </fo:list-item-body>
+          </fo:list-item>
+        </fo:list-block>
+        <fo:block  font-size="8.5pt" font-style="normal">
+          <fo:inline  font-weight="bold" font-style="italic">You </fo:inline>agree, by acceptance of this policy, that:</fo:block>
+        <fo:list-block space-after="1mm" space-before="2mm">
+          <fo:list-item space-before="1mm" space-after="0.5mm">
+            <fo:list-item-label  font-size="8.5pt" start-indent="0.23in">
+              <fo:block>1.</fo:block>
+            </fo:list-item-label>
+            <fo:list-item-body  font-size="8.5pt" start-indent="0.42in">
+              <fo:block>
+                <fo:inline  font-weight="bold" font-style="italic">you </fo:inline>will pay premiums when due and comply with the provisions of the policy;</fo:block>
+            </fo:list-item-body>
+          </fo:list-item>
+          <fo:list-item space-before="1mm" space-after="0.5mm">
+            <fo:list-item-label  font-size="8.5pt" start-indent="0.23in">
+              <fo:block>2.</fo:block>
+            </fo:list-item-label>
+            <fo:list-item-body  font-size="8.5pt" start-indent="0.42in">
+              <fo:block>the statements in this agreement are <fo:inline  font-weight="bold" font-style="italic">your</fo:inline>
+                <fo:inline  font-weight="bold" font-style="italic"> </fo:inline>statements and are true;</fo:block>
+            </fo:list-item-body>
+          </fo:list-item>
+          <fo:list-item space-before="1mm" space-after="0.5mm">
+            <fo:list-item-label  font-size="8.5pt" start-indent="0.23in">
+              <fo:block>3.</fo:block>
+            </fo:list-item-label>
+            <fo:list-item-body  font-size="8.5pt" start-indent="0.42in">
+              <fo:block>
+                <fo:inline  font-weight="bold" font-style="italic">we </fo:inline>insure <fo:inline  font-weight="bold" font-style="italic">you </fo:inline>on the basis <fo:inline  font-weight="bold" font-style="italic">your</fo:inline>
+                <fo:inline  font-weight="bold" font-style="italic"> </fo:inline>statements are true; and </fo:block>
+            </fo:list-item-body>
+          </fo:list-item>
+          <fo:list-item space-before="1mm" space-after="0.5mm">
+            <fo:list-item-label  font-size="8.5pt" start-indent="0.23in">
+              <fo:block>4.</fo:block>
+            </fo:list-item-label>
+            <fo:list-item-body  font-size="8.5pt" start-indent="0.42in">
+              <fo:block>this policy contains all of the agreements between <fo:inline  font-weight="bold" font-style="italic">you </fo:inline>and <fo:inline  font-weight="bold" font-style="italic">us</fo:inline>.</fo:block>
+            </fo:list-item-body>
+          </fo:list-item>
+        </fo:list-block>
+        <fo:block font-size="7.5pt" font-style="normal">
+          <fo:block>
+            <fo:block white-space-treatment="preserve" white-space-collapse="false" line-height="0.04in"> </fo:block>
+          </fo:block>
+        </fo:block>
+        <fo:block  font-size="8.5pt" font-style="normal">When <fo:inline  font-weight="bold" font-style="italic">you </fo:inline>request changes to this policy, or the information or factors used to calculate the premium for  this  policy  changes during the policy period, <fo:inline  font-weight="bold" font-style="italic">we </fo:inline>may adjust the premium in accordance with the change during the policy period and <fo:inline  font-weight="bold" font-style="italic">you </fo:inline>must pay any additional premium due within the time<fo:inline  font-weight="bold" font-style="italic"> we </fo:inline>specify.</fo:block>
+        <fo:block  font-size="8.5pt" font-style="normal" color="#05CE7C" space-after="2mm" font-weight="bold" space-before="2mm" role="H1" id="N100F4">DEFINITIONS</fo:block>
+        <fo:block  font-size="8.5pt" font-style="normal">We define the following words and phrases for use throughout the policy. These definitions apply to the singular, plural, and possessive forms of these words and phrases. Defined words and phrases are printed in bold italics.</fo:block>
+        <fo:list-block space-after="1mm" space-before="2mm">
+          <fo:list-item space-before="1mm" space-after="0.5mm">
+            <fo:list-item-label  font-size="8.5pt" start-indent="0.23in">
+              <fo:block>1</fo:block>
+            </fo:list-item-label>
+            <fo:list-item-body  font-size="8.5pt" start-indent="0.42in">
+              <fo:block>"actual cash value” means the value of the damaged part of the property at the time of loss, calculated as the estimated cost to repair or replace such property, less a deduction to account for pre-loss depreciation. For this calculation, all components of this estimated  cost including, but not limited to:<fo:list-block space-after="1mm" space-before="1mm">
+                  <fo:list-item space-after="1mm" space-before="0.5mm">
+                    <fo:list-item-label  font-size="8.5pt" start-indent="0.4in">
+                      <fo:block>a.</fo:block>
+                    </fo:list-item-label>
+                    <fo:list-item-body  font-size="8.5pt" start-indent="0.55in">
+                      <fo:block>materials, including tax; </fo:block>
+                    </fo:list-item-body>
+                  </fo:list-item>
+                  <fo:list-item space-after="1mm" space-before="0.5mm">
+                    <fo:list-item-label  font-size="8.5pt" start-indent="0.4in">
+                      <fo:block>b.</fo:block>
+                    </fo:list-item-label>
+                    <fo:list-item-body  font-size="8.5pt" start-indent="0.55in">
+                      <fo:block>labor, including tax; and</fo:block>
+                    </fo:list-item-body>
+                  </fo:list-item>
+                  <fo:list-item space-after="1mm" space-before="0.5mm">
+                    <fo:list-item-label  font-size="8.5pt" start-indent="0.4in">
+                      <fo:block>c.</fo:block>
+                    </fo:list-item-label>
+                    <fo:list-item-body  font-size="8.5pt" start-indent="0.55in">
+                      <fo:block>overhead and profit</fo:block>
+                    </fo:list-item-body>
+                  </fo:list-item>
+                </fo:list-block>
+              </fo:block>
+            </fo:list-item-body>
+          </fo:list-item>
+        </fo:list-block>
+        <fo:block  font-size="8.5pt" font-style="normal" start-indent="0.39in" space-after="1mm">are subject to depreciation.</fo:block>
+        <fo:block  font-size="8.5pt" font-style="normal" start-indent="0.39in" space-after="1mm">The depreciation deduction may include such considerations as:</fo:block>
+        <fo:list-block space-after="1mm" space-before="1mm">
+          <fo:list-item space-after="1mm" space-before="0.5mm">
+            <fo:list-item-label  font-size="8.5pt" start-indent="0.4in">
+              <fo:block/>
+            </fo:list-item-label>
+            <fo:list-item-body  font-size="8.5pt" start-indent="0.55in">
+              <fo:list-block space-after="1mm" space-before="1mm">
+                <fo:list-item space-after="1mm" space-before="0.5mm">
+                  <fo:list-item-label  font-size="8.5pt" start-indent="0.4in">
+                    <fo:block>a.</fo:block>
+                  </fo:list-item-label>
+                  <fo:list-item-body  font-size="8.5pt" start-indent="0.55in">
+                    <fo:block>age; </fo:block>
+                  </fo:list-item-body>
+                </fo:list-item>
+                <fo:list-item space-after="1mm" space-before="0.5mm">
+                  <fo:list-item-label  font-size="8.5pt" start-indent="0.4in">
+                    <fo:block>b.</fo:block>
+                  </fo:list-item-label>
+                  <fo:list-item-body  font-size="8.5pt" start-indent="0.55in">
+                    <fo:block>condition; </fo:block>
+                  </fo:list-item-body>
+                </fo:list-item>
+                <fo:list-item space-after="1mm" space-before="0.5mm">
+                  <fo:list-item-label  font-size="8.5pt" start-indent="0.4in">
+                    <fo:block>c.</fo:block>
+                  </fo:list-item-label>
+                  <fo:list-item-body  font-size="8.5pt" start-indent="0.55in">
+                    <fo:block>reduction </fo:block>
+                  </fo:list-item-body>
+                </fo:list-item>
+                <fo:list-item space-after="1mm" space-before="0.5mm">
+                  <fo:list-item-label  font-size="8.5pt" start-indent="0.4in">
+                    <fo:block>d.</fo:block>
+                  </fo:list-item-label>
+                  <fo:list-item-body  font-size="8.5pt" start-indent="0.55in">
+                    <fo:block>obsolescence; and</fo:block>
+                  </fo:list-item-body>
+                </fo:list-item>
+                <fo:list-item space-after="1mm" space-before="0.5mm">
+                  <fo:list-item-label  font-size="8.5pt" start-indent="0.4in">
+                    <fo:block>e.</fo:block>
+                  </fo:list-item-label>
+                  <fo:list-item-body  font-size="8.5pt" start-indent="0.55in">
+                    <fo:block>any pre-loss damage including wear, tear, or deterioration;<fo:block/>
+                      <fo:block/>dfhskdkdfgkdfg</fo:block>
+                  </fo:list-item-body>
+                </fo:list-item>
+              </fo:list-block>
+            </fo:list-item-body>
+          </fo:list-item>
+        </fo:list-block>
+        <fo:block  font-size="8.5pt" font-style="normal" start-indent="0.39in" space-after="1mm">of the damaged part of the property.</fo:block>
+        <fo:list-block space-after="1mm" space-before="2mm">
+          <fo:list-item space-before="1mm" space-after="0.5mm">
+            <fo:list-item-label  font-size="8.5pt" start-indent="0.23in">
+              <fo:block>2.</fo:block>
+            </fo:list-item-label>
+            <fo:list-item-body  font-size="8.5pt" start-indent="0.42in">
+              <fo:block>“bodily injury” means physical injury, sickness, or disease to a person. This includes required care, loss of services and death resulting therefrom.<fo:block>
+                  <fo:block white-space-treatment="preserve" white-space-collapse="false" line-height="0.04in"> </fo:block>
+                </fo:block>Bodily injury does not include:</fo:block>
+            </fo:list-item-body>
+          </fo:list-item>
+        </fo:list-block>
+        <fo:list-block space-after="1mm" space-before="1mm">
+          <fo:list-item space-after="1mm" space-before="0.5mm">
+            <fo:list-item-label  font-size="8.5pt" start-indent="0.4in">
+              <fo:block/>
+            </fo:list-item-label>
+            <fo:list-item-body  font-size="8.5pt" start-indent="0.55in">
+              <fo:list-block space-after="1mm" space-before="1mm">
+                <fo:list-item space-after="1mm" space-before="0.5mm">
+                  <fo:list-item-label  font-size="8.5pt" start-indent="0.4in">
+                    <fo:block>a.</fo:block>
+                  </fo:list-item-label>
+                  <fo:list-item-body  font-size="8.5pt" start-indent="0.55in">
+                    <fo:block>any of the following which are communicable: disease, bacteria, parasite, virus, or other organism, any of which are transmitted by any insured to any other person;</fo:block>
+                  </fo:list-item-body>
+                </fo:list-item>
+                <fo:list-item space-after="1mm" space-before="0.5mm">
+                  <fo:list-item-label  font-size="8.5pt" start-indent="0.4in">
+                    <fo:block>b.</fo:block>
+                  </fo:list-item-label>
+                  <fo:list-item-body  font-size="8.5pt" start-indent="0.55in">
+                    <fo:block>the actual or alleged exposure to any such disease, bacteria, parasite, virus, or other organism by any insured to any other person; or</fo:block>
+                  </fo:list-item-body>
+                </fo:list-item>
+                <fo:list-item space-after="1mm" space-before="0.5mm">
+                  <fo:list-item-label  font-size="8.5pt" start-indent="0.4in">
+                    <fo:block>c.</fo:block>
+                  </fo:list-item-label>
+                  <fo:list-item-body  font-size="8.5pt" start-indent="0.55in">
+                    <fo:block>Line item 3</fo:block>
+                  </fo:list-item-body>
+                </fo:list-item>
+                <fo:list-item space-after="1mm" space-before="0.5mm">
+                  <fo:list-item-label  font-size="8.5pt" start-indent="0.4in">
+                    <fo:block>d.</fo:block>
+                  </fo:list-item-label>
+                  <fo:list-item-body  font-size="8.5pt" start-indent="0.55in">
+                    <fo:block>Line item 4</fo:block>
+                  </fo:list-item-body>
+                </fo:list-item>
+                <fo:list-item space-after="1mm" space-before="0.5mm">
+                  <fo:list-item-label  font-size="8.5pt" start-indent="0.4in">
+                    <fo:block>e.</fo:block>
+                  </fo:list-item-label>
+                  <fo:list-item-body  font-size="8.5pt" start-indent="0.55in">
+                    <fo:block>Line item 5</fo:block>
+                  </fo:list-item-body>
+                </fo:list-item>
+                <fo:list-item space-after="1mm" space-before="0.5mm">
+                  <fo:list-item-label  font-size="8.5pt" start-indent="0.4in">
+                    <fo:block>f.</fo:block>
+                  </fo:list-item-label>
+                  <fo:list-item-body  font-size="8.5pt" start-indent="0.55in">
+                    <fo:block>Line item 6</fo:block>
+                  </fo:list-item-body>
+                </fo:list-item>
+                <fo:list-item space-after="1mm" space-before="0.5mm">
+                  <fo:list-item-label  font-size="8.5pt" start-indent="0.4in">
+                    <fo:block>g.</fo:block>
+                  </fo:list-item-label>
+                  <fo:list-item-body  font-size="8.5pt" start-indent="0.55in">
+                    <fo:block>Line item 7</fo:block>
+                  </fo:list-item-body>
+                </fo:list-item>
+                <fo:list-item space-after="1mm" space-before="0.5mm">
+                  <fo:list-item-label  font-size="8.5pt" start-indent="0.4in">
+                    <fo:block>h.</fo:block>
+                  </fo:list-item-label>
+                  <fo:list-item-body  font-size="8.5pt" start-indent="0.55in">
+                    <fo:block>Line Item 8</fo:block>
+                  </fo:list-item-body>
+                </fo:list-item>
+                <fo:list-item space-after="1mm" space-before="0.5mm">
+                  <fo:list-item-label  font-size="8.5pt" start-indent="0.4in">
+                    <fo:block>i.</fo:block>
+                  </fo:list-item-label>
+                  <fo:list-item-body  font-size="8.5pt" start-indent="0.55in">
+                    <fo:block>Line Item 9</fo:block>
+                  </fo:list-item-body>
+                </fo:list-item>
+                <fo:list-item space-after="1mm" space-before="0.5mm">
+                  <fo:list-item-label  font-size="8.5pt" start-indent="0.4in">
+                    <fo:block>j.</fo:block>
+                  </fo:list-item-label>
+                  <fo:list-item-body  font-size="8.5pt" start-indent="0.55in">
+                    <fo:block>Line Item 10</fo:block>
+                  </fo:list-item-body>
+                </fo:list-item>
+                <fo:list-item space-after="1mm" space-before="0.5mm">
+                  <fo:list-item-label  font-size="8.5pt" start-indent="0.4in">
+                    <fo:block>k.</fo:block>
+                  </fo:list-item-label>
+                  <fo:list-item-body  font-size="8.5pt" start-indent="0.55in">
+                    <fo:block>Line Item 11</fo:block>
+                  </fo:list-item-body>
+                </fo:list-item>
+              </fo:list-block>
+            </fo:list-item-body>
+          </fo:list-item>
+        </fo:list-block>
+      </fo:block>
+    </fo:flow>
+  </fo:page-sequence>
+</fo:root>
+</fo>
+  <checks>
+    <eval expected="555" xpath="count(//flow[1]//word)" />
+    <eval expected="32" xpath="count(//flow[2]//word)" />
+  </checks>
+</testcase>