aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/publish-snapshot.yml40
-rw-r--r--NOTICE2
-rw-r--r--README15
-rw-r--r--fop-core/pom.xml2
-rw-r--r--fop-core/src/main/codegen/unicode/java/org/apache/fop/hyphenation/UnicodeClasses.java12
-rw-r--r--fop-core/src/main/java/org/apache/fop/accessibility/Accessibility.java2
-rw-r--r--fop-core/src/main/java/org/apache/fop/accessibility/fo/FO2StructureTreeConverter.java19
-rw-r--r--fop-core/src/main/java/org/apache/fop/accessibility/fo/StructureTreeEventTrigger.java9
-rw-r--r--fop-core/src/main/java/org/apache/fop/afp/fonts/CharacterSetBuilder.java2
-rw-r--r--fop-core/src/main/java/org/apache/fop/afp/modca/Registry.java2
-rw-r--r--fop-core/src/main/java/org/apache/fop/apps/FOUserAgent.java24
-rw-r--r--fop-core/src/main/java/org/apache/fop/apps/FopConfParser.java18
-rw-r--r--fop-core/src/main/java/org/apache/fop/apps/FopFactory.java8
-rw-r--r--fop-core/src/main/java/org/apache/fop/apps/FopFactoryBuilder.java47
-rw-r--r--fop-core/src/main/java/org/apache/fop/apps/FopFactoryConfig.java10
-rw-r--r--fop-core/src/main/java/org/apache/fop/area/LineArea.java2
-rw-r--r--fop-core/src/main/java/org/apache/fop/datatypes/URISpecification.java12
-rw-r--r--fop-core/src/main/java/org/apache/fop/fo/DelegatingFOEventHandler.java9
-rw-r--r--fop-core/src/main/java/org/apache/fop/fo/FOEventHandler.java7
-rw-r--r--fop-core/src/main/java/org/apache/fop/fo/XMLWhiteSpaceHandler.java2
-rw-r--r--fop-core/src/main/java/org/apache/fop/fo/extensions/xmp/XMPContentHandlerFactory.java2
-rw-r--r--fop-core/src/main/java/org/apache/fop/fo/flow/Character.java2
-rw-r--r--fop-core/src/main/java/org/apache/fop/fo/flow/Marker.java2
-rw-r--r--fop-core/src/main/java/org/apache/fop/fo/flow/table/TableAndCaption.java63
-rw-r--r--fop-core/src/main/java/org/apache/fop/fo/flow/table/TableCaption.java55
-rw-r--r--fop-core/src/main/java/org/apache/fop/fonts/autodetect/FontFileFinder.java6
-rw-r--r--fop-core/src/main/java/org/apache/fop/fonts/truetype/FontFileReader.java6
-rw-r--r--fop-core/src/main/java/org/apache/fop/fonts/truetype/OTFFile.java3
-rw-r--r--fop-core/src/main/java/org/apache/fop/fonts/truetype/OTFSubSetFile.java7
-rw-r--r--fop-core/src/main/java/org/apache/fop/fonts/truetype/SVGGlyphData.java4
-rw-r--r--fop-core/src/main/java/org/apache/fop/hyphenation/PatternParser.java3
-rw-r--r--fop-core/src/main/java/org/apache/fop/hyphenation/SerializeHyphPattern.java7
-rw-r--r--fop-core/src/main/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java2
-rw-r--r--fop-core/src/main/java/org/apache/fop/layoutmgr/LayoutManagerMapping.java18
-rw-r--r--fop-core/src/main/java/org/apache/fop/layoutmgr/PageBreaker.java9
-rw-r--r--fop-core/src/main/java/org/apache/fop/layoutmgr/RestartAtLM.java8
-rw-r--r--fop-core/src/main/java/org/apache/fop/layoutmgr/inline/LeafNodeLayoutManager.java2
-rw-r--r--fop-core/src/main/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java2
-rw-r--r--fop-core/src/main/java/org/apache/fop/layoutmgr/inline/LineLayoutPossibilities.java2
-rw-r--r--fop-core/src/main/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java2
-rw-r--r--fop-core/src/main/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java2
-rw-r--r--fop-core/src/main/java/org/apache/fop/layoutmgr/table/TableAndCaptionLayoutManager.java451
-rw-r--r--fop-core/src/main/java/org/apache/fop/layoutmgr/table/TableCaptionLayoutManager.java409
-rw-r--r--fop-core/src/main/java/org/apache/fop/pdf/PDFDocument.java27
-rw-r--r--fop-core/src/main/java/org/apache/fop/pdf/PDFEncoding.java2
-rw-r--r--fop-core/src/main/java/org/apache/fop/pdf/PDFEncryptionJCE.java44
-rw-r--r--fop-core/src/main/java/org/apache/fop/pdf/PDFLinearization.java3
-rw-r--r--fop-core/src/main/java/org/apache/fop/pdf/PDFLink.java8
-rw-r--r--fop-core/src/main/java/org/apache/fop/pdf/PDFMergeFontsParams.java (renamed from fop-core/src/test/java/org/apache/fop/BasicPDFTranscoderTestCase.java)22
-rw-r--r--fop-core/src/main/java/org/apache/fop/pdf/PDFSignature.java11
-rw-r--r--fop-core/src/main/java/org/apache/fop/pdf/PDFStructElem.java3
-rw-r--r--fop-core/src/main/java/org/apache/fop/pdf/PDFText.java17
-rw-r--r--fop-core/src/main/java/org/apache/fop/render/awt/viewer/PreviewPanel.java2
-rw-r--r--fop-core/src/main/java/org/apache/fop/render/intermediate/IFContext.java4
-rw-r--r--fop-core/src/main/java/org/apache/fop/render/intermediate/extensions/AbstractAction.java4
-rw-r--r--fop-core/src/main/java/org/apache/fop/render/intermediate/extensions/URIAction.java22
-rw-r--r--fop-core/src/main/java/org/apache/fop/render/pdf/ImageRawPNGAdapter.java21
-rw-r--r--fop-core/src/main/java/org/apache/fop/render/pdf/PDFRendererConfig.java15
-rw-r--r--fop-core/src/main/java/org/apache/fop/render/pdf/PDFRendererOption.java2
-rw-r--r--fop-core/src/main/java/org/apache/fop/render/pdf/PDFRendererOptionsConfig.java5
-rw-r--r--fop-core/src/main/java/org/apache/fop/render/pdf/PDFRenderingUtil.java5
-rw-r--r--fop-core/src/main/java/org/apache/fop/render/pdf/PDFStructureTreeBuilder.java75
-rw-r--r--fop-core/src/main/java/org/apache/fop/render/pdf/PageSequenceStructElem.java5
-rw-r--r--fop-core/src/main/java/org/apache/fop/render/pdf/TableStructElem.java3
-rw-r--r--fop-core/src/main/java/org/apache/fop/render/ps/PSBatikFlowTextElementBridge.java2
-rw-r--r--fop-core/src/main/java/org/apache/fop/render/ps/PSSVGFlowRootElementBridge.java2
-rw-r--r--fop-core/src/main/java/org/apache/fop/render/rtf/RTFHandler.java5
-rw-r--r--fop-core/src/main/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfFile.java7
-rw-r--r--fop-core/src/main/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfListItem.java2
-rw-r--r--fop-core/src/main/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTextrun.java4
-rw-r--r--fop-core/src/main/java/org/apache/fop/render/txt/TXTStream.java5
-rw-r--r--fop-core/src/main/java/org/apache/fop/render/txt/TxtRendererConfig.java3
-rw-r--r--fop-core/src/main/java/org/apache/fop/svg/AbstractFOPTranscoder.java2
-rw-r--r--fop-core/src/main/java/org/apache/fop/tools/anttasks/FileCompare.java7
-rw-r--r--fop-core/src/main/java/org/apache/fop/util/AbstractPaintingState.java2
-rw-r--r--fop-core/src/test/java/org/apache/fop/accessibility/fo/FO2StructureTreeConverterTestCase.java4
-rw-r--r--fop-core/src/test/java/org/apache/fop/afp/fonts/OutlineFontTestCase.java5
-rw-r--r--fop-core/src/test/java/org/apache/fop/apps/FopConfBuilder.java12
-rw-r--r--fop-core/src/test/java/org/apache/fop/apps/FopConfParserTestCase.java10
-rw-r--r--fop-core/src/test/java/org/apache/fop/apps/MutableConfig.java8
-rw-r--r--fop-core/src/test/java/org/apache/fop/apps/PDFRendererConfBuilder.java6
-rw-r--r--fop-core/src/test/java/org/apache/fop/complexscripts/scripts/arabic/GenerateArabicTestData.java4
-rw-r--r--fop-core/src/test/java/org/apache/fop/fo/flow/table/UnimplementedWarningNeutralizer.java38
-rw-r--r--fop-core/src/test/java/org/apache/fop/fo/properties/CommonAccessibilityHolderTestCase.java5
-rw-r--r--fop-core/src/test/java/org/apache/fop/fonts/autodetect/FontFileFinderTestCase.java23
-rw-r--r--fop-core/src/test/java/org/apache/fop/intermediate/TestAssistant.java10
-rw-r--r--fop-core/src/test/java/org/apache/fop/pdf/PDFEncryptionJCETestCase.java7
-rw-r--r--fop-core/src/test/java/org/apache/fop/pdf/PDFFactoryTestCase.java65
-rw-r--r--fop-core/src/test/java/org/apache/fop/pdf/PDFStructureTreeTestCase.java33
-rw-r--r--fop-core/src/test/java/org/apache/fop/render/afp/AFPParser.java3
-rw-r--r--fop-core/src/test/java/org/apache/fop/render/intermediate/URIActionTestCase.java8
-rw-r--r--fop-core/src/test/java/org/apache/fop/render/pdf/PDFRendererConfigParserTestCase.java9
-rw-r--r--fop-core/src/test/java/org/apache/fop/render/pdf/PDFStructureTreeTestCase.java92
-rw-r--r--fop-core/src/test/java/org/apache/fop/render/ps/ImageHandlingTestCase.java3
-rw-r--r--fop-core/src/test/java/org/apache/fop/render/ps/svg/GradientTestCase.java4
-rw-r--r--fop-core/src/test/java/org/apache/fop/svg/AbstractBasicTranscoderTest.java (renamed from fop-core/src/test/java/org/apache/fop/AbstractBasicTranscoderTest.java)2
-rw-r--r--fop-core/src/test/java/org/apache/fop/svg/BasicPDFTranscoderTestCase.java55
-rw-r--r--fop-core/src/test/java/org/apache/fop/svg/BasicPSTranscoderTestCase.java (renamed from fop-core/src/test/java/org/apache/fop/BasicPSTranscoderTestCase.java)2
-rw-r--r--fop-core/src/test/java/org/apache/fop/svg/BasicTranscoderTestSuite.java (renamed from fop-core/src/test/java/org/apache/fop/BasicTranscoderTestSuite.java)2
-rw-r--r--fop-core/src/tools/resources/findbugs/exclusions.xml43
-rw-r--r--fop-events/pom.xml2
-rw-r--r--fop-sandbox/pom.xml2
-rw-r--r--fop-sandbox/src/main/java/org/apache/fop/render/mif/MIFElement.java9
-rw-r--r--fop-sandbox/src/main/java/org/apache/fop/render/mif/MIFFile.java5
-rw-r--r--fop-sandbox/src/main/java/org/apache/fop/render/svg/SVGRenderer.java3
-rw-r--r--fop-sandbox/src/tools/resources/findbugs/exclusions.xml6
-rw-r--r--fop-servlet/pom.xml2
-rw-r--r--fop-transcoder-allinone/pom.xml2
-rw-r--r--fop-transcoder-allinone/src/tools/resources/assembly/assembly.xml6
-rw-r--r--fop-transcoder/pom.xml2
-rw-r--r--fop-util/pom.xml2
-rw-r--r--fop/build.xml9
-rw-r--r--fop/pom.xml2
-rw-r--r--fop/releasedist.xml2
-rw-r--r--fop/test/layoutengine/standard-testcases/flow_changing-ipd_7.xml4
-rw-r--r--fop/test/layoutengine/standard-testcases/flow_changing-ipd_7_legacy.xml72
-rw-r--r--fop/test/layoutengine/standard-testcases/flow_changing-ipd_invalid-position.xml74
-rw-r--r--fop/test/layoutengine/standard-testcases/flow_changing-ipd_invalid-position_1.xml75
-rwxr-xr-xfop/test/layoutengine/standard-testcases/flow_changing-ipd_last-page_15.xml3
-rw-r--r--fop/test/layoutengine/standard-testcases/page-sequence_two-column_last-page_7.xml1465
-rw-r--r--fop/test/layoutengine/standard-testcases/page-sequence_two-column_last-page_8.xml1062
-rw-r--r--fop/test/layoutengine/standard-testcases/page-sequence_two-column_last-page_9.xml1187
-rw-r--r--fop/test/layoutengine/standard-testcases/table_and_caption.xml75
-rw-r--r--fop/test/layoutengine/standard-testcases/table_and_caption_multicolumn.xml98
-rw-r--r--fop/test/layoutengine/standard-testcases/table_and_caption_multipage.xml98
-rw-r--r--pom.xml12
126 files changed, 5747 insertions, 637 deletions
diff --git a/.github/workflows/publish-snapshot.yml b/.github/workflows/publish-snapshot.yml
new file mode 100644
index 000000000..6fc292f6d
--- /dev/null
+++ b/.github/workflows/publish-snapshot.yml
@@ -0,0 +1,40 @@
+# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
+# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
+
+# This workflow uses actions that are not certified by GitHub.
+# They are provided by a third-party and are governed by
+# separate terms of service, privacy policy, and support
+# documentation.
+
+name: Publish Snapshot
+
+on:
+ push:
+ branches: ["main"]
+
+jobs:
+ build:
+ name: Publish Snapshot with Java ${{ matrix.jdk }} ${{ matrix.os }}
+ runs-on: ${{ matrix.os }}
+ strategy:
+ fail-fast: false
+ matrix:
+ jdk: ['8']
+ os: [ubuntu-latest]
+
+ steps:
+ - uses: actions/checkout@v4
+ - name: Set up JDK ${{ matrix.jdk }}
+ uses: actions/setup-java@v4
+ with:
+ java-version: ${{ matrix.jdk }}
+ distribution: 'temurin'
+ cache: maven
+ server-id: apache.snapshots.https
+ server-username: NEXUS_USER
+ server-password: NEXUS_PW
+ - name: Deploy
+ run: mvn -B deploy -DskipTests
+ env:
+ NEXUS_USER: ${{ secrets.NEXUS_USER }}
+ NEXUS_PW: ${{ secrets.NEXUS_PW }}
diff --git a/NOTICE b/NOTICE
index 54d4b2290..775e58c2f 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,5 +1,5 @@
Apache FOP
-Copyright 1999-2024 The Apache Software Foundation
+Copyright 1999-2025 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
diff --git a/README b/README
index 40e507942..ada7cf71c 100644
--- a/README
+++ b/README
@@ -107,6 +107,21 @@ under the ./fop sub-directory.
RELEASE NOTES
==============================================================================
+Version 2.11
+============
+
+Major Changes in Version 2.11
+-----------------------------
+
+* Upgrade to PDFBox 3
+* Add support for PDF object streams
+* Add option to lazy load fonts for PNG/TIFF/PCL output
+* Add option to combine AFP page groups
+* Add option to convert image to CMYK
+* Add option for static content structure element per page
+
+This release also contains a number of bug fixes.
+
Version 2.10
============
diff --git a/fop-core/pom.xml b/fop-core/pom.xml
index b8f4f73a7..9d0877f41 100644
--- a/fop-core/pom.xml
+++ b/fop-core/pom.xml
@@ -10,7 +10,7 @@
<parent>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>fop-parent</artifactId>
- <version>2.10.0-SNAPSHOT</version>
+ <version>2.11.0-SNAPSHOT</version>
</parent>
<properties>
diff --git a/fop-core/src/main/codegen/unicode/java/org/apache/fop/hyphenation/UnicodeClasses.java b/fop-core/src/main/codegen/unicode/java/org/apache/fop/hyphenation/UnicodeClasses.java
index df25831ea..7550bbabc 100644
--- a/fop-core/src/main/codegen/unicode/java/org/apache/fop/hyphenation/UnicodeClasses.java
+++ b/fop-core/src/main/codegen/unicode/java/org/apache/fop/hyphenation/UnicodeClasses.java
@@ -87,7 +87,7 @@ public final class UnicodeClasses {
}
f.createNewFile();
FileOutputStream fw = new FileOutputStream(f);
- OutputStreamWriter ow = new OutputStreamWriter(fw, "utf-8");
+ OutputStreamWriter ow = new OutputStreamWriter(fw, StandardCharsets.UTF_8);
int maxChar;
maxChar = Character.MAX_VALUE;
@@ -189,7 +189,7 @@ public final class UnicodeClasses {
}
f.createNewFile();
FileOutputStream fw = new FileOutputStream(f);
- OutputStreamWriter ow = new OutputStreamWriter(fw, "utf-8");
+ OutputStreamWriter ow = new OutputStreamWriter(fw, StandardCharsets.UTF_8);
URI inuri = unidata.resolve("Blocks.txt");
InputStream inis = null;
@@ -199,7 +199,7 @@ public final class UnicodeClasses {
} else if (scheme.equals("http")) {
inis = inuri.toURL().openStream();
}
- InputStreamReader insr = new InputStreamReader(inis, "utf-8");
+ InputStreamReader insr = new InputStreamReader(inis, StandardCharsets.UTF_8);
BufferedReader inbr = new BufferedReader(insr);
Map blocks = new HashMap();
for (String line = inbr.readLine(); line != null; line = inbr.readLine()) {
@@ -221,7 +221,7 @@ public final class UnicodeClasses {
} else if (scheme.equals("http")) {
inis = inuri.toURL().openStream();
}
- insr = new InputStreamReader(inis, "utf-8");
+ insr = new InputStreamReader(inis, StandardCharsets.UTF_8);
inbr = new BufferedReader(insr);
int maxChar;
maxChar = Character.MAX_VALUE;
@@ -306,10 +306,10 @@ public final class UnicodeClasses {
}
f.createNewFile();
FileOutputStream fw = new FileOutputStream(f);
- OutputStreamWriter ow = new OutputStreamWriter(fw, "utf-8");
+ OutputStreamWriter ow = new OutputStreamWriter(fw, StandardCharsets.UTF_8);
FileInputStream inis = new FileInputStream(in);
- InputStreamReader insr = new InputStreamReader(inis, "utf-8");
+ InputStreamReader insr = new InputStreamReader(inis, StandardCharsets.UTF_8);
BufferedReader inbr = new BufferedReader(insr);
ow.write("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n");
diff --git a/fop-core/src/main/java/org/apache/fop/accessibility/Accessibility.java b/fop-core/src/main/java/org/apache/fop/accessibility/Accessibility.java
index 8a28a94d6..5f4dfd727 100644
--- a/fop-core/src/main/java/org/apache/fop/accessibility/Accessibility.java
+++ b/fop-core/src/main/java/org/apache/fop/accessibility/Accessibility.java
@@ -31,6 +31,8 @@ public final class Accessibility {
/** Constant string for the rendering options key to suppress empty tags from structure tree. */
public static final String KEEP_EMPTY_TAGS = "keep-empty-tags";
+ public static final String STATIC_REGION_PER_PAGE = "static-region-per-page";
+
/**
* The value to be set on the 'role' property for the element and its descendants to
* be considered as artifacts.
diff --git a/fop-core/src/main/java/org/apache/fop/accessibility/fo/FO2StructureTreeConverter.java b/fop-core/src/main/java/org/apache/fop/accessibility/fo/FO2StructureTreeConverter.java
index d20e4d37a..3ba4babb7 100644
--- a/fop-core/src/main/java/org/apache/fop/accessibility/fo/FO2StructureTreeConverter.java
+++ b/fop-core/src/main/java/org/apache/fop/accessibility/fo/FO2StructureTreeConverter.java
@@ -54,6 +54,7 @@ import org.apache.fop.fo.flow.RetrieveTableMarker;
import org.apache.fop.fo.flow.Wrapper;
import org.apache.fop.fo.flow.table.Table;
import org.apache.fop.fo.flow.table.TableBody;
+import org.apache.fop.fo.flow.table.TableCaption;
import org.apache.fop.fo.flow.table.TableCell;
import org.apache.fop.fo.flow.table.TableColumn;
import org.apache.fop.fo.flow.table.TableFooter;
@@ -358,6 +359,24 @@ public class FO2StructureTreeConverter extends DelegatingFOEventHandler {
super.endTable(tbl);
}
+ public void startTableCaption(final TableCaption tableCaption) {
+ startContent(new Event(this) {
+ public void run() {
+ eventHandler.startTableCaption(tableCaption);
+ }
+ }, true);
+ super.startTableCaption(tableCaption);
+ }
+
+ public void endTableCaption(final TableCaption tableCaption) {
+ endContent(new Event(this) {
+ public void run() {
+ eventHandler.endTableCaption(tableCaption);
+ }
+ });
+ super.endTableCaption(tableCaption);
+ }
+
@Override
public void startColumn(final TableColumn tc) {
startContent(new Event(this) {
diff --git a/fop-core/src/main/java/org/apache/fop/accessibility/fo/StructureTreeEventTrigger.java b/fop-core/src/main/java/org/apache/fop/accessibility/fo/StructureTreeEventTrigger.java
index 8def8a4d4..160a0236e 100644
--- a/fop-core/src/main/java/org/apache/fop/accessibility/fo/StructureTreeEventTrigger.java
+++ b/fop-core/src/main/java/org/apache/fop/accessibility/fo/StructureTreeEventTrigger.java
@@ -58,6 +58,7 @@ import org.apache.fop.fo.flow.RetrieveTableMarker;
import org.apache.fop.fo.flow.Wrapper;
import org.apache.fop.fo.flow.table.Table;
import org.apache.fop.fo.flow.table.TableBody;
+import org.apache.fop.fo.flow.table.TableCaption;
import org.apache.fop.fo.flow.table.TableCell;
import org.apache.fop.fo.flow.table.TableFooter;
import org.apache.fop.fo.flow.table.TableHeader;
@@ -258,6 +259,14 @@ class StructureTreeEventTrigger extends FOEventHandler {
tables.pop();
}
+ public void startTableCaption(TableCaption tableCaption) {
+ startElement(tableCaption);
+ }
+
+ public void endTableCaption(TableCaption tableCaption) {
+ endElement(tableCaption);
+ }
+
@Override
public void startHeader(TableHeader header) {
inTableHeader.push(Boolean.TRUE);
diff --git a/fop-core/src/main/java/org/apache/fop/afp/fonts/CharacterSetBuilder.java b/fop-core/src/main/java/org/apache/fop/afp/fonts/CharacterSetBuilder.java
index 4174f31d8..4c4db49b5 100644
--- a/fop-core/src/main/java/org/apache/fop/afp/fonts/CharacterSetBuilder.java
+++ b/fop-core/src/main/java/org/apache/fop/afp/fonts/CharacterSetBuilder.java
@@ -621,7 +621,7 @@ public abstract class CharacterSetBuilder {
}
}
- private class FontControl {
+ private static class FontControl {
private int dpi;
private int unitsPerEm;
diff --git a/fop-core/src/main/java/org/apache/fop/afp/modca/Registry.java b/fop-core/src/main/java/org/apache/fop/afp/modca/Registry.java
index fe0a42790..45cd85284 100644
--- a/fop-core/src/main/java/org/apache/fop/afp/modca/Registry.java
+++ b/fop-core/src/main/java/org/apache/fop/afp/modca/Registry.java
@@ -209,7 +209,7 @@ public final class Registry {
/**
* Encapsulates a MOD:CA Registry Object Type entry
*/
- public class ObjectType {
+ public static class ObjectType {
private final byte componentId;
private final byte[] oid;
private final String name;
diff --git a/fop-core/src/main/java/org/apache/fop/apps/FOUserAgent.java b/fop-core/src/main/java/org/apache/fop/apps/FOUserAgent.java
index bdaf0c023..32d11475f 100644
--- a/fop-core/src/main/java/org/apache/fop/apps/FOUserAgent.java
+++ b/fop-core/src/main/java/org/apache/fop/apps/FOUserAgent.java
@@ -149,6 +149,7 @@ public class FOUserAgent {
this.resourceResolver = resourceResolver;
setTargetResolution(factory.getTargetResolution());
setAccessibility(factory.isAccessibilityEnabled());
+ setStaticRegionsPerPageForAccessibility(factory.isStaticRegionsPerPageForAccessibility());
setKeepEmptyTags(factory.isKeepEmptyTags());
imageSessionContext = new AbstractImageSessionContext(factory.getFallbackResolver()) {
@@ -539,6 +540,16 @@ public class FOUserAgent {
}
/**
+ * Are invalid positions to be allowed when breaking text?
+ *
+ * @return if invalid break positions are to be allowed
+ * @see FopFactory#isLegacyInvalidBreakPosition()
+ */
+ public boolean isLegacyInvalidBreakPosition() {
+ return factory.isLegacyInvalidBreakPosition();
+ }
+
+ /**
* @return true if the indent inheritance should be broken when crossing reference area
* boundaries (for more info, see the javadoc for the relative member variable)
* @see FopFactory#isBreakIndentInheritanceOnReferenceAreaBoundary()
@@ -727,6 +738,19 @@ public class FOUserAgent {
}
}
+ public void setStaticRegionsPerPageForAccessibility(boolean staticRegionsPerPageForAccessibility) {
+ getRendererOptions().put(Accessibility.STATIC_REGION_PER_PAGE, staticRegionsPerPageForAccessibility);
+ }
+
+ public boolean isStaticRegionsPerPageForAccessibility() {
+ Boolean enabled = (Boolean)getRendererOptions().get(Accessibility.STATIC_REGION_PER_PAGE);
+ if (enabled != null) {
+ return enabled;
+ } else {
+ return false;
+ }
+ }
+
/**
* Sets the document's structure tree event handler, for use by accessible
* output formats.
diff --git a/fop-core/src/main/java/org/apache/fop/apps/FopConfParser.java b/fop-core/src/main/java/org/apache/fop/apps/FopConfParser.java
index f86bc4276..c610f766a 100644
--- a/fop-core/src/main/java/org/apache/fop/apps/FopConfParser.java
+++ b/fop-core/src/main/java/org/apache/fop/apps/FopConfParser.java
@@ -63,8 +63,10 @@ public class FopConfParser {
private static final String LEGACY_SKIP_PAGE_POSITION_ONLY = "legacy-skip-page-position-only";
private static final String LEGACY_LAST_PAGE_CHANGE_IPD = "legacy-last-page-change-ipd";
private static final String LEGACY_FO_WRAPPER = "legacy-fo-wrapper";
+ private static final String LEGACY_INVALID_BREAK_POSITION = "legacy-invalid-break-position";
private static final Log LOG = LogFactory.getLog(FopConfParser.class);
+ private static final String ACCESSIBILITY = "accessibility";
private final FopFactoryBuilder fopFactoryBuilder;
@@ -195,11 +197,13 @@ public class FopConfParser {
}
}
- if (cfg.getChild("accessibility", false) != null) {
+ if (cfg.getChild(ACCESSIBILITY, false) != null) {
try {
- fopFactoryBuilder.setAccessibility(cfg.getChild("accessibility").getValueAsBoolean());
+ fopFactoryBuilder.setAccessibility(cfg.getChild(ACCESSIBILITY).getValueAsBoolean());
+ fopFactoryBuilder.setStaticRegionsPerPageForAccessibility(
+ cfg.getChild(ACCESSIBILITY).getAttributeAsBoolean(Accessibility.STATIC_REGION_PER_PAGE, false));
fopFactoryBuilder.setKeepEmptyTags(
- cfg.getChild("accessibility").getAttributeAsBoolean(Accessibility.KEEP_EMPTY_TAGS, true));
+ cfg.getChild(ACCESSIBILITY).getAttributeAsBoolean(Accessibility.KEEP_EMPTY_TAGS, true));
} catch (ConfigurationException e) {
LogUtil.handleException(LOG, e, false);
}
@@ -327,6 +331,14 @@ public class FopConfParser {
LogUtil.handleException(LOG, e, false);
}
}
+ if (cfg.getChild(LEGACY_INVALID_BREAK_POSITION, false) != null) {
+ try {
+ fopFactoryBuilder.setLegacyInvalidBreakPosition(
+ cfg.getChild(LEGACY_INVALID_BREAK_POSITION).getValueAsBoolean());
+ } catch (ConfigurationException e) {
+ LogUtil.handleException(LOG, e, strict);
+ }
+ }
// configure font manager
new FontManagerConfigurator(cfg, baseURI, fopFactoryBuilder.getBaseURI(), resourceResolver)
diff --git a/fop-core/src/main/java/org/apache/fop/apps/FopFactory.java b/fop-core/src/main/java/org/apache/fop/apps/FopFactory.java
index 7f89b854c..7befef58d 100644
--- a/fop-core/src/main/java/org/apache/fop/apps/FopFactory.java
+++ b/fop-core/src/main/java/org/apache/fop/apps/FopFactory.java
@@ -256,6 +256,10 @@ public final class FopFactory implements ImageContext {
return config.isLegacyFoWrapper();
}
+ public boolean isLegacyInvalidBreakPosition() {
+ return config.isLegacyInvalidBreakPosition();
+ }
+
/**
* Returns a new {@link Fop} instance. FOP will be configured with a default user agent
* instance. Use this factory method if your output type requires an output stream.
@@ -377,6 +381,10 @@ public final class FopFactory implements ImageContext {
return config.isAccessibilityEnabled();
}
+ boolean isStaticRegionsPerPageForAccessibility() {
+ return config.isStaticRegionsPerPageForAccessibility();
+ }
+
boolean isKeepEmptyTags() {
return config.isKeepEmptyTags();
}
diff --git a/fop-core/src/main/java/org/apache/fop/apps/FopFactoryBuilder.java b/fop-core/src/main/java/org/apache/fop/apps/FopFactoryBuilder.java
index 68c2dc3eb..243bc8570 100644
--- a/fop-core/src/main/java/org/apache/fop/apps/FopFactoryBuilder.java
+++ b/fop-core/src/main/java/org/apache/fop/apps/FopFactoryBuilder.java
@@ -162,6 +162,11 @@ public final class FopFactoryBuilder {
return this;
}
+ public FopFactoryBuilder setStaticRegionsPerPageForAccessibility(boolean staticRegionsPerPageForAccessibility) {
+ fopFactoryConfigBuilder.setStaticRegionsPerPageForAccessibility(staticRegionsPerPageForAccessibility);
+ return this;
+ }
+
public FopFactoryBuilder setKeepEmptyTags(boolean b) {
fopFactoryConfigBuilder.setKeepEmptyTags(b);
return this;
@@ -370,6 +375,11 @@ public final class FopFactoryBuilder {
return this;
}
+ public FopFactoryBuilder setLegacyInvalidBreakPosition(boolean value) {
+ fopFactoryConfigBuilder.setLegacyInvalidBreakPosition(value);
+ return this;
+ }
+
public static class FopFactoryConfigImpl implements FopFactoryConfig {
private final EnvironmentProfile enviro;
@@ -378,6 +388,8 @@ public final class FopFactoryBuilder {
private boolean accessibility;
+ private boolean staticRegionsPerPageForAccessibility;
+
private boolean keepEmptyTags = true;
private LayoutManagerMaker layoutManagerMaker;
@@ -422,6 +434,8 @@ public final class FopFactoryBuilder {
private boolean legacyFoWrapper;
+ private boolean legacyInvalidBreakPosition = FopFactoryConfig.DEFAULT_LEGACY_INVALID_BREAK_POSITION;
+
private static final class ImageContextImpl implements ImageContext {
private final FopFactoryConfig config;
@@ -446,6 +460,10 @@ public final class FopFactoryBuilder {
return accessibility;
}
+ public boolean isStaticRegionsPerPageForAccessibility() {
+ return staticRegionsPerPageForAccessibility;
+ }
+
public boolean isKeepEmptyTags() {
return keepEmptyTags;
}
@@ -562,6 +580,10 @@ public final class FopFactoryBuilder {
return legacyFoWrapper;
}
+ public boolean isLegacyInvalidBreakPosition() {
+ return legacyInvalidBreakPosition;
+ }
+
public Map<String, String> getHyphenationPatternNames() {
return hyphPatNames;
}
@@ -574,6 +596,9 @@ public final class FopFactoryBuilder {
private interface FopFactoryConfigBuilder {
void setAccessibility(boolean enableAccessibility);
+
+ void setStaticRegionsPerPageForAccessibility(boolean staticRegionsPerPageForAccessibility);
+
void setKeepEmptyTags(boolean b);
void setLayoutManagerMakerOverride(LayoutManagerMaker lmMaker);
@@ -586,6 +611,8 @@ public final class FopFactoryBuilder {
void setStrictUserConfigValidation(boolean validateStrictly);
+ void setLegacyInvalidBreakPosition(boolean invalidBreakPosition);
+
void setBreakIndentInheritanceOnReferenceAreaBoundary(boolean value);
void setSourceResolution(float dpi);
@@ -633,6 +660,11 @@ public final class FopFactoryBuilder {
public void setAccessibility(boolean enableAccessibility) {
throwIllegalStateException();
}
+
+ public void setStaticRegionsPerPageForAccessibility(boolean staticRegionsPerPageForAccessibility) {
+ throwIllegalStateException();
+ }
+
public void setKeepEmptyTags(boolean b) {
throwIllegalStateException();
}
@@ -658,6 +690,10 @@ public final class FopFactoryBuilder {
throwIllegalStateException();
}
+ public void setLegacyInvalidBreakPosition(boolean ignoreInvalidBreakPosition) {
+ throwIllegalStateException();
+ }
+
public void setBreakIndentInheritanceOnReferenceAreaBoundary(
boolean value) {
throwIllegalStateException();
@@ -740,6 +776,10 @@ public final class FopFactoryBuilder {
config.accessibility = enableAccessibility;
}
+ public void setStaticRegionsPerPageForAccessibility(boolean staticRegionsPerPageForAccessibility) {
+ config.staticRegionsPerPageForAccessibility = staticRegionsPerPageForAccessibility;
+ }
+
public void setKeepEmptyTags(boolean b) {
config.keepEmptyTags = b;
}
@@ -765,8 +805,7 @@ public final class FopFactoryBuilder {
config.hasStrictUserValidation = validateStrictly;
}
- public void setBreakIndentInheritanceOnReferenceAreaBoundary(
- boolean value) {
+ public void setBreakIndentInheritanceOnReferenceAreaBoundary(boolean value) {
config.breakIndentInheritanceOnReferenceBoundary = value;
}
@@ -834,6 +873,10 @@ public final class FopFactoryBuilder {
public void setLegacyFoWrapper(boolean b) {
config.legacyFoWrapper = b;
}
+
+ public void setLegacyInvalidBreakPosition(boolean legacyInvalidBreakPosition) {
+ config.legacyInvalidBreakPosition = legacyInvalidBreakPosition;
+ }
}
}
diff --git a/fop-core/src/main/java/org/apache/fop/apps/FopFactoryConfig.java b/fop-core/src/main/java/org/apache/fop/apps/FopFactoryConfig.java
index 586966dc4..6f62f17e3 100644
--- a/fop-core/src/main/java/org/apache/fop/apps/FopFactoryConfig.java
+++ b/fop-core/src/main/java/org/apache/fop/apps/FopFactoryConfig.java
@@ -40,6 +40,11 @@ import org.apache.fop.layoutmgr.LayoutManagerMaker;
// part of the API. Why would a user care how the internal objects are passed around? They shouldn't.
public interface FopFactoryConfig {
+ /**
+ * Defines if FOP should allow breaks at positions deemed invalid
+ */
+ boolean DEFAULT_LEGACY_INVALID_BREAK_POSITION = false;
+
/** Defines if FOP should use an alternative rule to determine text indents */
boolean DEFAULT_BREAK_INDENT_INHERITANCE = false;
@@ -67,6 +72,9 @@ public interface FopFactoryConfig {
* @return true if accessibility features have been requested
*/
boolean isAccessibilityEnabled();
+
+ boolean isStaticRegionsPerPageForAccessibility();
+
boolean isKeepEmptyTags();
/**
@@ -175,6 +183,8 @@ public interface FopFactoryConfig {
boolean isLegacyFoWrapper();
+ boolean isLegacyInvalidBreakPosition();
+
/** @return the hyphenation pattern names */
Map<String, String> getHyphenationPatternNames();
diff --git a/fop-core/src/main/java/org/apache/fop/area/LineArea.java b/fop-core/src/main/java/org/apache/fop/area/LineArea.java
index f659c2d78..3c1ae5217 100644
--- a/fop-core/src/main/java/org/apache/fop/area/LineArea.java
+++ b/fop-core/src/main/java/org/apache/fop/area/LineArea.java
@@ -44,7 +44,7 @@ public class LineArea extends Area {
* page-number or a page-number-citation is resolved
*/
// @SuppressFBWarnings("SE_INNER_CLASS")
- private final class LineAdjustingInfo implements Serializable {
+ private static final class LineAdjustingInfo implements Serializable {
private static final long serialVersionUID = -6103629976229458273L;
diff --git a/fop-core/src/main/java/org/apache/fop/datatypes/URISpecification.java b/fop-core/src/main/java/org/apache/fop/datatypes/URISpecification.java
index b82dbee97..3e56bdd13 100644
--- a/fop-core/src/main/java/org/apache/fop/datatypes/URISpecification.java
+++ b/fop-core/src/main/java/org/apache/fop/datatypes/URISpecification.java
@@ -19,7 +19,7 @@
package org.apache.fop.datatypes;
-import java.io.UnsupportedEncodingException;
+import java.nio.charset.StandardCharsets;
/**
@@ -130,13 +130,9 @@ public final class URISpecification {
//Note: this may not be accurate for some very special cases.
sb.append(ch);
} else {
- try {
- byte[] utf8 = Character.toString(ch).getBytes("UTF-8");
- for (byte anUtf8 : utf8) {
- appendEscape(sb, anUtf8);
- }
- } catch (UnsupportedEncodingException e) {
- throw new Error("Incompatible JVM. UTF-8 not supported.");
+ byte[] utf8 = Character.toString(ch).getBytes(StandardCharsets.UTF_8);
+ for (byte anUtf8 : utf8) {
+ appendEscape(sb, anUtf8);
}
}
}
diff --git a/fop-core/src/main/java/org/apache/fop/fo/DelegatingFOEventHandler.java b/fop-core/src/main/java/org/apache/fop/fo/DelegatingFOEventHandler.java
index 4cf6ddd15..2e240fe35 100644
--- a/fop-core/src/main/java/org/apache/fop/fo/DelegatingFOEventHandler.java
+++ b/fop-core/src/main/java/org/apache/fop/fo/DelegatingFOEventHandler.java
@@ -46,6 +46,7 @@ import org.apache.fop.fo.flow.RetrieveTableMarker;
import org.apache.fop.fo.flow.Wrapper;
import org.apache.fop.fo.flow.table.Table;
import org.apache.fop.fo.flow.table.TableBody;
+import org.apache.fop.fo.flow.table.TableCaption;
import org.apache.fop.fo.flow.table.TableCell;
import org.apache.fop.fo.flow.table.TableColumn;
import org.apache.fop.fo.flow.table.TableFooter;
@@ -204,6 +205,14 @@ public abstract class DelegatingFOEventHandler extends FOEventHandler {
delegate.endTable(tbl);
}
+ public void startTableCaption(TableCaption tableCaption) {
+ delegate.startTableCaption(tableCaption);
+ }
+
+ public void endTableCaption(TableCaption tableCaption) {
+ delegate.endTableCaption(tableCaption);
+ }
+
@Override
public void startColumn(TableColumn tc) {
delegate.startColumn(tc);
diff --git a/fop-core/src/main/java/org/apache/fop/fo/FOEventHandler.java b/fop-core/src/main/java/org/apache/fop/fo/FOEventHandler.java
index 0be90dd04..1f1611fb4 100644
--- a/fop-core/src/main/java/org/apache/fop/fo/FOEventHandler.java
+++ b/fop-core/src/main/java/org/apache/fop/fo/FOEventHandler.java
@@ -46,6 +46,7 @@ import org.apache.fop.fo.flow.RetrieveTableMarker;
import org.apache.fop.fo.flow.Wrapper;
import org.apache.fop.fo.flow.table.Table;
import org.apache.fop.fo.flow.table.TableBody;
+import org.apache.fop.fo.flow.table.TableCaption;
import org.apache.fop.fo.flow.table.TableCell;
import org.apache.fop.fo.flow.table.TableColumn;
import org.apache.fop.fo.flow.table.TableFooter;
@@ -283,6 +284,12 @@ public abstract class FOEventHandler {
public void endTable(Table tbl) {
}
+ public void startTableCaption(TableCaption tableCaption) {
+ }
+
+ public void endTableCaption(TableCaption tableCaption) {
+ }
+
/**
*
* @param tc TableColumn that is starting;
diff --git a/fop-core/src/main/java/org/apache/fop/fo/XMLWhiteSpaceHandler.java b/fop-core/src/main/java/org/apache/fop/fo/XMLWhiteSpaceHandler.java
index 8bd28caf5..4b3b14dcf 100644
--- a/fop-core/src/main/java/org/apache/fop/fo/XMLWhiteSpaceHandler.java
+++ b/fop-core/src/main/java/org/apache/fop/fo/XMLWhiteSpaceHandler.java
@@ -439,7 +439,7 @@ public class XMLWhiteSpaceHandler {
* with an iterator that starts at the first white-space
* character in the sequence of trailing white-space
*/
- private class PendingInline {
+ private static class PendingInline {
protected CharIterator firstTrailingWhiteSpace;
PendingInline(CharIterator firstTrailingWhiteSpace) {
diff --git a/fop-core/src/main/java/org/apache/fop/fo/extensions/xmp/XMPContentHandlerFactory.java b/fop-core/src/main/java/org/apache/fop/fo/extensions/xmp/XMPContentHandlerFactory.java
index fd64f1a98..9021945c3 100644
--- a/fop-core/src/main/java/org/apache/fop/fo/extensions/xmp/XMPContentHandlerFactory.java
+++ b/fop-core/src/main/java/org/apache/fop/fo/extensions/xmp/XMPContentHandlerFactory.java
@@ -48,7 +48,7 @@ public class XMPContentHandlerFactory implements ContentHandlerFactory {
/**
* Local subclass of XMPHandler that implements ObjectSource for FOP integration.
*/
- private class FOPXMPHandler extends XMPHandler implements ObjectSource {
+ private static class FOPXMPHandler extends XMPHandler implements ObjectSource {
private ObjectBuiltListener obListener;
diff --git a/fop-core/src/main/java/org/apache/fop/fo/flow/Character.java b/fop-core/src/main/java/org/apache/fop/fo/flow/Character.java
index c075d8b7e..3a3a0f830 100644
--- a/fop-core/src/main/java/org/apache/fop/fo/flow/Character.java
+++ b/fop-core/src/main/java/org/apache/fop/fo/flow/Character.java
@@ -249,7 +249,7 @@ public class Character extends FObj implements StructureTreeElementHolder {
return ranges;
}
- private class FOCharIterator extends CharIterator {
+ private static class FOCharIterator extends CharIterator {
private boolean bFirst = true;
private Character foChar;
diff --git a/fop-core/src/main/java/org/apache/fop/fo/flow/Marker.java b/fop-core/src/main/java/org/apache/fop/fo/flow/Marker.java
index 1233da615..01e52337e 100644
--- a/fop-core/src/main/java/org/apache/fop/fo/flow/Marker.java
+++ b/fop-core/src/main/java/org/apache/fop/fo/flow/Marker.java
@@ -156,7 +156,7 @@ public class Marker extends FObjMixed {
* specified properties/attributes as bundles of name-value-namespace
* strings
*/
- protected class MarkerPropertyList extends PropertyList
+ protected static class MarkerPropertyList extends PropertyList
implements Attributes {
/** the array of attributes **/
diff --git a/fop-core/src/main/java/org/apache/fop/fo/flow/table/TableAndCaption.java b/fop-core/src/main/java/org/apache/fop/fo/flow/table/TableAndCaption.java
index b7c7adc91..35ec4c617 100644
--- a/fop-core/src/main/java/org/apache/fop/fo/flow/table/TableAndCaption.java
+++ b/fop-core/src/main/java/org/apache/fop/fo/flow/table/TableAndCaption.java
@@ -19,7 +19,6 @@
package org.apache.fop.fo.flow.table;
-// XML
import org.xml.sax.Locator;
import org.apache.fop.apps.FOPException;
@@ -29,6 +28,8 @@ import org.apache.fop.fo.PropertyList;
import org.apache.fop.fo.ValidationException;
import org.apache.fop.fo.properties.CommonAccessibility;
import org.apache.fop.fo.properties.CommonAccessibilityHolder;
+import org.apache.fop.fo.properties.CommonBorderPaddingBackground;
+import org.apache.fop.fo.properties.KeepProperty;
/**
* Class modelling the <a href="http://www.w3.org/TR/xsl/#fo_table-and-caption">
@@ -37,25 +38,13 @@ import org.apache.fop.fo.properties.CommonAccessibilityHolder;
*/
public class TableAndCaption extends FObj implements CommonAccessibilityHolder {
+ private static final String TABLE_CAPTION = "fo:table-caption";
+ private static final String TABLE = "fo:table";
private CommonAccessibility commonAccessibility;
-
- // The value of properties relevant for fo:table-and-caption.
- // Unused but valid items, commented out for performance:
- // private CommonAural commonAural;
- // private CommonBorderPaddingBackground commonBorderPaddingBackground;
- // private CommonMarginBlock commonMarginBlock;
- // private CommonRelativePosition commonRelativePosition;
- // private int breakAfter;
- // private int breakBefore;
- // private int captionSide;
- // private int intrusionDisplace;
- // private KeepProperty keepTogether;
- // private KeepProperty keepWithNext;
- // private KeepProperty keepWithPrevious;
- // private int textAlign;
- // End of property values
-
- static boolean notImplementedWarningGiven;
+ private CommonBorderPaddingBackground commonBorderPaddingBackground;
+ private KeepProperty keepTogether;
+ private KeepProperty keepWithNext;
+ private KeepProperty keepWithPrevious;
/** used for FO validation */
private boolean tableCaptionFound;
@@ -68,19 +57,16 @@ public class TableAndCaption extends FObj implements CommonAccessibilityHolder {
*/
public TableAndCaption(FONode parent) {
super(parent);
-
- if (!notImplementedWarningGiven) {
- getFOValidationEventProducer().unimplementedFeature(this, getName(),
- "fo:table-and-caption", getLocator());
- // @SuppressFBWarnings("ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD")
- notImplementedWarningGiven = true;
- }
}
@Override
public void bind(PropertyList pList) throws FOPException {
super.bind(pList);
commonAccessibility = CommonAccessibility.getInstance(pList);
+ keepTogether = pList.get(PR_KEEP_TOGETHER).getKeep();
+ keepWithNext = pList.get(PR_KEEP_WITH_NEXT).getKeep();
+ keepWithPrevious = pList.get(PR_KEEP_WITH_PREVIOUS).getKeep();
+ commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps();
}
/**
@@ -104,21 +90,21 @@ public class TableAndCaption extends FObj implements CommonAccessibilityHolder {
if (FO_URI.equals(nsURI)) {
if (localName.equals("marker")) {
if (tableCaptionFound) {
- nodesOutOfOrderError(loc, "fo:marker", "fo:table-caption");
+ nodesOutOfOrderError(loc, "fo:marker", TABLE_CAPTION);
} else if (tableFound) {
- nodesOutOfOrderError(loc, "fo:marker", "fo:table");
+ nodesOutOfOrderError(loc, "fo:marker", TABLE);
}
} else if (localName.equals("table-caption")) {
if (tableCaptionFound) {
- tooManyNodesError(loc, "fo:table-caption");
+ tooManyNodesError(loc, TABLE_CAPTION);
} else if (tableFound) {
- nodesOutOfOrderError(loc, "fo:table-caption", "fo:table");
+ nodesOutOfOrderError(loc, TABLE_CAPTION, TABLE);
} else {
tableCaptionFound = true;
}
} else if (localName.equals("table")) {
if (tableFound) {
- tooManyNodesError(loc, "fo:table");
+ tooManyNodesError(loc, TABLE);
} else {
tableFound = true;
}
@@ -146,5 +132,20 @@ public class TableAndCaption extends FObj implements CommonAccessibilityHolder {
return commonAccessibility;
}
+ public KeepProperty getKeepTogether() {
+ return keepTogether;
+ }
+
+ public KeepProperty getKeepWithNext() {
+ return keepWithNext;
+ }
+
+ public KeepProperty getKeepWithPrevious() {
+ return keepWithPrevious;
+ }
+
+ public CommonBorderPaddingBackground getCommonBorderPaddingBackground() {
+ return commonBorderPaddingBackground;
+ }
}
diff --git a/fop-core/src/main/java/org/apache/fop/fo/flow/table/TableCaption.java b/fop-core/src/main/java/org/apache/fop/fo/flow/table/TableCaption.java
index 5ecce65af..5ca8c51de 100644
--- a/fop-core/src/main/java/org/apache/fop/fo/flow/table/TableCaption.java
+++ b/fop-core/src/main/java/org/apache/fop/fo/flow/table/TableCaption.java
@@ -19,17 +19,19 @@
package org.apache.fop.fo.flow.table;
-// XML
import org.xml.sax.Locator;
import org.apache.fop.apps.FOPException;
+import org.apache.fop.fo.Constants;
import org.apache.fop.fo.FONode;
import org.apache.fop.fo.FObj;
import org.apache.fop.fo.PropertyList;
import org.apache.fop.fo.ValidationException;
import org.apache.fop.fo.properties.CommonAccessibility;
import org.apache.fop.fo.properties.CommonAccessibilityHolder;
-
+import org.apache.fop.fo.properties.EnumProperty;
+import org.apache.fop.fo.properties.KeepProperty;
+import org.apache.fop.fo.properties.Property;
/**
* Class modelling the <a href="http://www.w3.org/TR/xsl/#fo_table-caption">
@@ -38,24 +40,13 @@ import org.apache.fop.fo.properties.CommonAccessibilityHolder;
public class TableCaption extends FObj implements CommonAccessibilityHolder {
private CommonAccessibility commonAccessibility;
-
- // The value of properties relevant for fo:table-caption.
- // Unused but valid items, commented out for performance:
- // private CommonAural commonAural;
- // private CommonRelativePosition commonRelativePosition;
- // private LengthRangeProperty blockProgressionDimension;
- // private Length height;
- // private LengthRangeProperty inlineProgressionDimension;
- // private int intrusionDisplace;
- // private KeepProperty keepTogether;
- // private Length width;
- // End of property values
+ private KeepProperty keepTogether;
+ private KeepProperty keepWithNext;
+ private KeepProperty keepWithPrevious;
/** used for FO validation */
private boolean blockItemFound;
- static boolean notImplementedWarningGiven;
-
/**
* Create a TableCaption instance with the given {@link FONode}
* as parent.
@@ -63,19 +54,25 @@ public class TableCaption extends FObj implements CommonAccessibilityHolder {
*/
public TableCaption(FONode parent) {
super(parent);
-
- if (!notImplementedWarningGiven) {
- getFOValidationEventProducer().unimplementedFeature(this, getName(),
- "fo:table-caption", getLocator());
- // @SuppressFBWarnings("ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD")
- notImplementedWarningGiven = true;
- }
}
/** {@inheritDoc} */
public void bind(PropertyList pList) throws FOPException {
super.bind(pList);
commonAccessibility = CommonAccessibility.getInstance(pList);
+ keepTogether = pList.get(PR_KEEP_TOGETHER).getKeep();
+ Property keepWithNextProp = pList.get(PR_KEEP_WITH_NEXT);
+ if (keepWithNextProp instanceof KeepProperty) {
+ ((KeepProperty)keepWithNextProp).setWithinPage(
+ EnumProperty.getInstance(Constants.EN_ALWAYS, "ALWAYS"), true);
+ }
+ keepWithNext = keepWithNextProp.getKeep();
+ keepWithPrevious = pList.get(PR_KEEP_WITH_PREVIOUS).getKeep();
+ }
+
+ public void startOfNode() throws FOPException {
+ super.startOfNode();
+ getFOEventHandler().startTableCaption(this);
}
/** {@inheritDoc} */
@@ -83,6 +80,7 @@ public class TableCaption extends FObj implements CommonAccessibilityHolder {
if (firstChild == null) {
missingChildElementError("marker* (%block;)");
}
+ getFOEventHandler().endTableCaption(this);
}
/**
@@ -122,5 +120,16 @@ public class TableCaption extends FObj implements CommonAccessibilityHolder {
return commonAccessibility;
}
+ public KeepProperty getKeepTogether() {
+ return keepTogether;
+ }
+
+ public KeepProperty getKeepWithNext() {
+ return keepWithNext;
+ }
+
+ public KeepProperty getKeepWithPrevious() {
+ return keepWithPrevious;
+ }
}
diff --git a/fop-core/src/main/java/org/apache/fop/fonts/autodetect/FontFileFinder.java b/fop-core/src/main/java/org/apache/fop/fonts/autodetect/FontFileFinder.java
index e7902e993..3095d4910 100644
--- a/fop-core/src/main/java/org/apache/fop/fonts/autodetect/FontFileFinder.java
+++ b/fop-core/src/main/java/org/apache/fop/fonts/autodetect/FontFileFinder.java
@@ -172,7 +172,11 @@ public class FontFileFinder extends DirectoryWalker implements FontFinder {
public List<URL> find(File directory) throws IOException {
List<URL> results = new java.util.ArrayList<>();
if (!directory.isDirectory()) {
- eventListener.fontDirectoryNotFound(this, directory.getAbsolutePath());
+ if (eventListener != null) {
+ eventListener.fontDirectoryNotFound(this, directory.getAbsolutePath());
+ } else {
+ log.warn("Font directory not found: " + directory.getAbsolutePath());
+ }
} else {
walkDirectory(directory, results);
}
diff --git a/fop-core/src/main/java/org/apache/fop/fonts/truetype/FontFileReader.java b/fop-core/src/main/java/org/apache/fop/fonts/truetype/FontFileReader.java
index 790e885bc..5e85e926a 100644
--- a/fop-core/src/main/java/org/apache/fop/fonts/truetype/FontFileReader.java
+++ b/fop-core/src/main/java/org/apache/fop/fonts/truetype/FontFileReader.java
@@ -21,6 +21,7 @@ package org.apache.fop.fonts.truetype;
import java.io.IOException;
import java.io.InputStream;
+import java.nio.charset.StandardCharsets;
import org.apache.commons.io.IOUtils;
@@ -292,9 +293,8 @@ public class FontFileReader {
byte[] tmp = new byte[len];
System.arraycopy(file, current, tmp, 0, len);
current += len;
- final String encoding;
- encoding = "UTF-16BE"; //Use this for all known encoding IDs for now
- return new String(tmp, encoding);
+ //Use this for all known encoding IDs for now
+ return new String(tmp, StandardCharsets.UTF_16BE);
}
/**
diff --git a/fop-core/src/main/java/org/apache/fop/fonts/truetype/OTFFile.java b/fop-core/src/main/java/org/apache/fop/fonts/truetype/OTFFile.java
index befbb9453..dd548ff56 100644
--- a/fop-core/src/main/java/org/apache/fop/fonts/truetype/OTFFile.java
+++ b/fop-core/src/main/java/org/apache/fop/fonts/truetype/OTFFile.java
@@ -20,6 +20,7 @@
package org.apache.fop.fonts.truetype;
import java.io.IOException;
+import java.nio.charset.StandardCharsets;
import java.util.List;
import org.apache.fontbox.cff.CFFFont;
@@ -131,7 +132,7 @@ public class OTFFile extends OpenFont {
input.readShort(); //rangeShift
for (int q = 0; q < numTables; q++) {
- String tagName = new String(input.readBytes(4));
+ String tagName = new String(input.readBytes(4), StandardCharsets.UTF_8);
readLong(input); //Checksum
long offset = readLong(input);
long length = readLong(input);
diff --git a/fop-core/src/main/java/org/apache/fop/fonts/truetype/OTFSubSetFile.java b/fop-core/src/main/java/org/apache/fop/fonts/truetype/OTFSubSetFile.java
index 2ea2ed823..40185abed 100644
--- a/fop-core/src/main/java/org/apache/fop/fonts/truetype/OTFSubSetFile.java
+++ b/fop-core/src/main/java/org/apache/fop/fonts/truetype/OTFSubSetFile.java
@@ -24,6 +24,7 @@ import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.Field;
+import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
@@ -203,7 +204,7 @@ public class OTFSubSetFile extends OTFSubSetWriter {
writeBytes(cffReader.getHeader());
//Name Index
- writeIndex(Arrays.asList(embedFontName.getBytes("UTF-8")));
+ writeIndex(Arrays.asList(embedFontName.getBytes(StandardCharsets.UTF_8)));
Offsets offsets = new Offsets();
@@ -355,7 +356,7 @@ public class OTFSubSetFile extends OTFSubSetWriter {
int sidAStringIndex = stringIndexData.size() + 390;
int sidB = dictEntry.getOperands().get(1).intValue();
if (sidB > 390) {
- stringIndexData.add("Identity".getBytes("UTF-8"));
+ stringIndexData.add("Identity".getBytes(StandardCharsets.UTF_8));
}
int sidBStringIndex = stringIndexData.size() + 390;
byte[] cidEntryByteData = dictEntry.getByteData();
@@ -407,7 +408,7 @@ public class OTFSubSetFile extends OTFSubSetWriter {
if (index < cffReader.getStringIndex().getNumObjects()) {
byte[] value = cffReader.getStringIndex().getValue(index);
if (mbFont != null) {
- mbFont.mapUsedGlyphName(v, new String(value, "UTF-8"));
+ mbFont.mapUsedGlyphName(v, new String(value, StandardCharsets.UTF_8));
}
gidToSID.put(v, stringIndexData.size() + 391);
stringIndexData.add(value);
diff --git a/fop-core/src/main/java/org/apache/fop/fonts/truetype/SVGGlyphData.java b/fop-core/src/main/java/org/apache/fop/fonts/truetype/SVGGlyphData.java
index d018f5bf2..9bc248331 100644
--- a/fop-core/src/main/java/org/apache/fop/fonts/truetype/SVGGlyphData.java
+++ b/fop-core/src/main/java/org/apache/fop/fonts/truetype/SVGGlyphData.java
@@ -22,6 +22,7 @@ import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.StringReader;
import java.io.StringWriter;
+import java.nio.charset.StandardCharsets;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
@@ -54,7 +55,8 @@ public class SVGGlyphData {
public String getDataURL(int height) {
try {
String modifiedSVG = updateTransform(svg, height);
- return DataURLUtil.createDataURL(new ByteArrayInputStream(modifiedSVG.getBytes("UTF-8")), "image/svg");
+ return DataURLUtil.createDataURL(
+ new ByteArrayInputStream(modifiedSVG.getBytes(StandardCharsets.UTF_8)), "image/svg");
} catch (IOException | TransformerException | SAXException | ParserConfigurationException e) {
throw new RuntimeException(e);
}
diff --git a/fop-core/src/main/java/org/apache/fop/hyphenation/PatternParser.java b/fop-core/src/main/java/org/apache/fop/hyphenation/PatternParser.java
index 6bf3391e6..4a8a30086 100644
--- a/fop-core/src/main/java/org/apache/fop/hyphenation/PatternParser.java
+++ b/fop-core/src/main/java/org/apache/fop/hyphenation/PatternParser.java
@@ -26,6 +26,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.PrintStream;
import java.net.MalformedURLException;
+import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import javax.xml.parsers.SAXParserFactory;
@@ -489,7 +490,7 @@ public class PatternParser extends DefaultHandler implements PatternConsumer {
PrintStream p = null;
if (args.length > 1) {
FileOutputStream f = new FileOutputStream(args[1]);
- p = new PrintStream(f, false, "utf-8");
+ p = new PrintStream(f, false, StandardCharsets.UTF_8.name());
pp.setTestOut(p);
}
pp.parse(args[0]);
diff --git a/fop-core/src/main/java/org/apache/fop/hyphenation/SerializeHyphPattern.java b/fop-core/src/main/java/org/apache/fop/hyphenation/SerializeHyphPattern.java
index 8d51edf25..e3cd7bbed 100644
--- a/fop-core/src/main/java/org/apache/fop/hyphenation/SerializeHyphPattern.java
+++ b/fop-core/src/main/java/org/apache/fop/hyphenation/SerializeHyphPattern.java
@@ -74,13 +74,10 @@ public class SerializeHyphPattern {
if (startProcess) {
HyphenationTree hTree = buildPatternFile(infile);
// serialize class
- try {
- // @SuppressFBWarnings("OS_OPEN_STREAM_EXCEPTION_PATH")
- ObjectOutputStream out = new ObjectOutputStream(
+ try (ObjectOutputStream out = new ObjectOutputStream(
new java.io.BufferedOutputStream(
- new java.io.FileOutputStream(outfile)));
+ new java.io.FileOutputStream(outfile)))) {
out.writeObject(hTree);
- out.close();
} catch (IOException ioe) {
System.err.println("Can't write compiled pattern file: "
+ outfile);
diff --git a/fop-core/src/main/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java b/fop-core/src/main/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java
index 7fc5c09c0..6e9293579 100644
--- a/fop-core/src/main/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java
+++ b/fop-core/src/main/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java
@@ -581,7 +581,7 @@ public class BlockContainerLayoutManager extends SpacedBorderedPaddedBlockLayout
rect, relDims);
}
- private class BlockContainerPosition extends NonLeafPosition {
+ private static class BlockContainerPosition extends NonLeafPosition {
private BlockContainerBreaker breaker;
diff --git a/fop-core/src/main/java/org/apache/fop/layoutmgr/LayoutManagerMapping.java b/fop-core/src/main/java/org/apache/fop/layoutmgr/LayoutManagerMapping.java
index 8be8b5803..d4feedf82 100644
--- a/fop-core/src/main/java/org/apache/fop/layoutmgr/LayoutManagerMapping.java
+++ b/fop-core/src/main/java/org/apache/fop/layoutmgr/LayoutManagerMapping.java
@@ -62,7 +62,9 @@ import org.apache.fop.fo.flow.RetrieveMarker;
import org.apache.fop.fo.flow.RetrieveTableMarker;
import org.apache.fop.fo.flow.Wrapper;
import org.apache.fop.fo.flow.table.Table;
+import org.apache.fop.fo.flow.table.TableAndCaption;
import org.apache.fop.fo.flow.table.TableBody;
+import org.apache.fop.fo.flow.table.TableCaption;
import org.apache.fop.fo.flow.table.TableCell;
import org.apache.fop.fo.flow.table.TableColumn;
import org.apache.fop.fo.flow.table.TableFooter;
@@ -91,6 +93,8 @@ import org.apache.fop.layoutmgr.inline.TextLayoutManager;
import org.apache.fop.layoutmgr.inline.WrapperLayoutManager;
import org.apache.fop.layoutmgr.list.ListBlockLayoutManager;
import org.apache.fop.layoutmgr.list.ListItemLayoutManager;
+import org.apache.fop.layoutmgr.table.TableAndCaptionLayoutManager;
+import org.apache.fop.layoutmgr.table.TableCaptionLayoutManager;
import org.apache.fop.layoutmgr.table.TableLayoutManager;
import org.apache.fop.util.CharUtilities;
@@ -143,6 +147,8 @@ public class LayoutManagerMapping implements LayoutManagerMaker {
new PageNumberCitationLayoutManagerMaker());
registerMaker(PageNumberCitationLast.class,
new PageNumberCitationLastLayoutManagerMaker());
+ registerMaker(TableAndCaption.class, new TableAndCaptionManagerMaker());
+ registerMaker(TableCaption.class, new TableCaptionManagerMaker());
registerMaker(Table.class, new TableLayoutManagerMaker());
registerMaker(TableBody.class, new Maker());
registerMaker(TableColumn.class, new Maker());
@@ -458,6 +464,18 @@ public class LayoutManagerMapping implements LayoutManagerMaker {
}
}
+ public class TableAndCaptionManagerMaker extends Maker {
+ public void make(FONode node, List layoutManagers, FOUserAgent userAgent) {
+ layoutManagers.add(new TableAndCaptionLayoutManager((TableAndCaption)node));
+ }
+ }
+
+ public class TableCaptionManagerMaker extends Maker {
+ public void make(FONode node, List layoutManagers, FOUserAgent userAgent) {
+ layoutManagers.add(new TableCaptionLayoutManager((TableCaption)node));
+ }
+ }
+
public class MultiSwitchLayoutManagerMaker extends Maker {
@Override
diff --git a/fop-core/src/main/java/org/apache/fop/layoutmgr/PageBreaker.java b/fop-core/src/main/java/org/apache/fop/layoutmgr/PageBreaker.java
index fddd6c3c6..fc6e05835 100644
--- a/fop-core/src/main/java/org/apache/fop/layoutmgr/PageBreaker.java
+++ b/fop-core/src/main/java/org/apache/fop/layoutmgr/PageBreaker.java
@@ -475,12 +475,17 @@ public class PageBreaker extends AbstractBreaker {
//Replace last page
pslm.setCurrentPage(pageProvider.getPage(false, currentPageNum));
} else {
+ if (optimalPageCount > pslm.getCurrentPV().getBodyRegion().getMainReference().getColumnCount()) {
+ setLastPageIndex(currentPageNum + 2);
+ } else {
+ setLastPageIndex(currentPageNum + 1);
+ }
//Last page-master cannot hold the content.
//Add areas now...
addAreas(alg, restartPoint, partCount - restartPoint, originalList, effectiveList);
- if (!ipdChange) {
- //...and add a blank last page
+ if (!ipdChange && pslm.currentPageNum == currentPageNum) {
setLastPageIndex(currentPageNum + 1);
+ //...and add a blank last page
pslm.setCurrentPage(pslm.makeNewPage(true));
}
return;
diff --git a/fop-core/src/main/java/org/apache/fop/layoutmgr/RestartAtLM.java b/fop-core/src/main/java/org/apache/fop/layoutmgr/RestartAtLM.java
index 4a0fcd885..647c9968f 100644
--- a/fop-core/src/main/java/org/apache/fop/layoutmgr/RestartAtLM.java
+++ b/fop-core/src/main/java/org/apache/fop/layoutmgr/RestartAtLM.java
@@ -100,10 +100,18 @@ class RestartAtLM {
position = position.getPosition();
}
if (position.getPosition() == null) {
+ if (!breaker.getPageProvider().foUserAgent.isLegacyInvalidBreakPosition()) {
+ breaker.firstElementsForRestart = new LinkedList<>();
+ breaker.positionAtBreak = new LeafPosition(surroundingLM, positionIndex + 1);
+
+ return surroundingLM;
+ }
+
if (!position.getLM().getFObj().isForceKeepTogether()) {
position.getLM().getFObj().setForceKeepTogether(true);
invalidPosition = true;
}
+
return null;
}
restartAtLM = position.getPosition().getLM();
diff --git a/fop-core/src/main/java/org/apache/fop/layoutmgr/inline/LeafNodeLayoutManager.java b/fop-core/src/main/java/org/apache/fop/layoutmgr/inline/LeafNodeLayoutManager.java
index ce35a38ee..0c728517c 100644
--- a/fop-core/src/main/java/org/apache/fop/layoutmgr/inline/LeafNodeLayoutManager.java
+++ b/fop-core/src/main/java/org/apache/fop/layoutmgr/inline/LeafNodeLayoutManager.java
@@ -73,7 +73,7 @@ public abstract class LeafNodeLayoutManager extends AbstractLayoutManager
/**
* Store information about the inline area
*/
- protected class AreaInfo {
+ protected static class AreaInfo {
/** letter space count */
protected short letterSpaces;
/** ipd of area */
diff --git a/fop-core/src/main/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java b/fop-core/src/main/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java
index 25b68842c..66f92a7f4 100644
--- a/fop-core/src/main/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java
+++ b/fop-core/src/main/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java
@@ -182,7 +182,7 @@ public class LineLayoutManager extends InlineStackingLayoutManager
* which was the first element in the paragraph
* returned by each LM.
*/
- private final class Update {
+ private static final class Update {
private final InlineLevelLayoutManager inlineLM;
private final int firstIndex;
diff --git a/fop-core/src/main/java/org/apache/fop/layoutmgr/inline/LineLayoutPossibilities.java b/fop-core/src/main/java/org/apache/fop/layoutmgr/inline/LineLayoutPossibilities.java
index 75aa3467a..5f0373629 100644
--- a/fop-core/src/main/java/org/apache/fop/layoutmgr/inline/LineLayoutPossibilities.java
+++ b/fop-core/src/main/java/org/apache/fop/layoutmgr/inline/LineLayoutPossibilities.java
@@ -32,7 +32,7 @@ public class LineLayoutPossibilities {
/** logger instance */
private static final Log LOG = LogFactory.getLog(LineLayoutPossibilities.class);
- private final class Possibility {
+ private static final class Possibility {
private int lineCount;
private double demerits;
private List<LineLayoutManager.LineBreakPosition> breakPositions;
diff --git a/fop-core/src/main/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java b/fop-core/src/main/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java
index a96e5706e..6fdc69749 100644
--- a/fop-core/src/main/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java
+++ b/fop-core/src/main/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java
@@ -69,7 +69,7 @@ public class TextLayoutManager extends LeafNodeLayoutManager {
/**
* this class stores information about changes in vecAreaInfo which are not yet applied
*/
- private final class PendingChange {
+ private static final class PendingChange {
private final GlyphMapping mapping;
private final int index;
diff --git a/fop-core/src/main/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java b/fop-core/src/main/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java
index bc54fa1da..49e2d7562 100644
--- a/fop-core/src/main/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java
+++ b/fop-core/src/main/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java
@@ -85,7 +85,7 @@ public class ListItemLayoutManager extends SpacedBorderedPaddedBlockLayoutManage
private Keep keepWithNextPendingOnLabel;
private Keep keepWithNextPendingOnBody;
- public class ListItemPosition extends Position {
+ public static class ListItemPosition extends Position {
private int labelFirstIndex;
private int labelLastIndex;
private int bodyFirstIndex;
diff --git a/fop-core/src/main/java/org/apache/fop/layoutmgr/table/TableAndCaptionLayoutManager.java b/fop-core/src/main/java/org/apache/fop/layoutmgr/table/TableAndCaptionLayoutManager.java
index 1d8cb890c..2f974c2ac 100644
--- a/fop-core/src/main/java/org/apache/fop/layoutmgr/table/TableAndCaptionLayoutManager.java
+++ b/fop-core/src/main/java/org/apache/fop/layoutmgr/table/TableAndCaptionLayoutManager.java
@@ -19,13 +19,33 @@
package org.apache.fop.layoutmgr.table;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Stack;
+
import org.apache.fop.area.Area;
import org.apache.fop.area.Block;
+import org.apache.fop.area.LineArea;
+import org.apache.fop.fo.FONode;
import org.apache.fop.fo.flow.table.TableAndCaption;
-import org.apache.fop.layoutmgr.BlockStackingLayoutManager;
-import org.apache.fop.layoutmgr.Keep;
+import org.apache.fop.fo.properties.CommonBorderPaddingBackground;
+import org.apache.fop.fo.properties.KeepProperty;
+import org.apache.fop.layoutmgr.BreakOpportunity;
+import org.apache.fop.layoutmgr.KnuthElement;
+import org.apache.fop.layoutmgr.KnuthPossPosIter;
+import org.apache.fop.layoutmgr.LMiter;
import org.apache.fop.layoutmgr.LayoutContext;
+import org.apache.fop.layoutmgr.LayoutManager;
+import org.apache.fop.layoutmgr.ListElement;
+import org.apache.fop.layoutmgr.NonLeafPosition;
+import org.apache.fop.layoutmgr.Position;
import org.apache.fop.layoutmgr.PositionIterator;
+import org.apache.fop.layoutmgr.SpacedBorderedPaddedBlockLayoutManager;
+import org.apache.fop.layoutmgr.TraitSetter;
+import org.apache.fop.traits.MinOptMax;
/**
* LayoutManager for a table-and-caption FO.
@@ -35,130 +55,255 @@ import org.apache.fop.layoutmgr.PositionIterator;
* The caption blocks have an implicit keep with the table.
* TODO Implement getNextKnuthElements()
*/
-public class TableAndCaptionLayoutManager extends BlockStackingLayoutManager {
-
+public class TableAndCaptionLayoutManager extends SpacedBorderedPaddedBlockLayoutManager implements BreakOpportunity {
private Block curBlockArea;
+ /** Iterator over the child layout managers. */
+ private ProxyLMiter proxyLMiter;
+
/**
* Create a new table and caption layout manager.
- * @param node table-and-caption FO
+ * @param tableAndCaption the block FO object to create the layout manager for.
*/
- public TableAndCaptionLayoutManager(TableAndCaption node) {
- super(node);
+ public TableAndCaptionLayoutManager(TableAndCaption tableAndCaption) {
+ super(tableAndCaption);
+ proxyLMiter = new ProxyLMiter();
}
- /**
- * Returns the table-and-caption formatting object.
- * @return the table-and-caption formatting object
- */
- public TableAndCaption getTableAndCaptionFO() {
- return (TableAndCaption)this.fobj;
+ @Override
+ protected CommonBorderPaddingBackground getCommonBorderPaddingBackground() {
+ return getTableAndCaptionFO().getCommonBorderPaddingBackground();
+ }
+
+ public List<ListElement> getNextKnuthElements(LayoutContext context, int alignment) {
+ return getNextKnuthElements(context, alignment, null, null, null);
+ }
+
+ public List<ListElement> getNextKnuthElements(LayoutContext context, int alignment, Stack lmStack,
+ Position restartPosition, LayoutManager restartAtLM) {
+ resetSpaces();
+ return super.getNextKnuthElements(context, alignment, lmStack, restartPosition, restartAtLM);
+ }
+
+ private void resetSpaces() {
+ this.discardBorderBefore = false;
+ this.discardBorderAfter = false;
+ this.discardPaddingBefore = false;
+ this.discardPaddingAfter = false;
+ this.effSpaceBefore = null;
+ this.effSpaceAfter = null;
}
/**
- * Get the next break possibility.
- *
- * @param context the layout context for getting breaks
- * @return the next break possibility
+ * Proxy iterator for Block LM.
+ * This iterator creates and holds the complete list
+ * of child LMs.
+ * It uses fobjIter as its base iterator.
+ * Block LM's createNextChildLMs uses this iterator
+ * as its base iterator.
*/
- /*
- public BreakPoss getNextBreakPoss(LayoutContext context) {
- LayoutManager curLM; // currently active LM
-
- MinOptMax stackSize = new MinOptMax();
- // if starting add space before
- // stackSize.add(spaceBefore);
- BreakPoss lastPos = null;
-
- // if there is a caption then get the side and work out when
- // to handle it
-
- while ((curLM = getChildLM()) != null) {
- // Make break positions and return blocks!
- // Set up a LayoutContext
- int ipd = context.getRefIPD();
- BreakPoss bp;
-
- LayoutContext childLC = LayoutContext.newInstance();
- // if line layout manager then set stack limit to ipd
- // line LM actually generates a LineArea which is a block
- childLC.setStackLimit(
- MinOptMax.subtract(context.getStackLimit(),
- stackSize));
- childLC.setRefIPD(ipd);
-
- boolean over = false;
- while (!curLM.isFinished()) {
- if ((bp = curLM.getNextBreakPoss(childLC)) != null) {
- if (stackSize.opt + bp.getStackingSize().opt > context.getStackLimit().max) {
- // reset to last break
- if (lastPos != null) {
- LayoutManager lm = lastPos.getLayoutManager();
- lm.resetPosition(lastPos.getPosition());
- if (lm != curLM) {
- curLM.resetPosition(null);
- }
- } else {
- curLM.resetPosition(null);
- }
- over = true;
- break;
- }
- stackSize.add(bp.getStackingSize());
- lastPos = bp;
- childBreaks.add(bp);
-
- if (bp.nextBreakOverflows()) {
- over = true;
- break;
- }
-
- childLC.setStackLimit(MinOptMax.subtract(
- context.getStackLimit(), stackSize));
- }
+ protected class ProxyLMiter extends LMiter {
+
+ /**
+ * Constructs a proxy iterator for Block LM.
+ */
+ public ProxyLMiter() {
+ super(TableAndCaptionLayoutManager.this);
+ listLMs = new ArrayList<>(10);
+ }
+
+ /**
+ * @return true if there are more child lms
+ */
+ public boolean hasNext() {
+ return (curPos < listLMs.size()) || createNextChildLMs(curPos);
+ }
+
+ /**
+ * @param pos ...
+ * @return true if new child lms were added
+ */
+ protected boolean createNextChildLMs(int pos) {
+ List<LayoutManager> newLMs = createChildLMs(pos + 1 - listLMs.size());
+ if (newLMs != null) {
+ listLMs.addAll(newLMs);
}
- BreakPoss breakPoss = new BreakPoss(
- new LeafPosition(this, childBreaks.size() - 1));
- if (over) {
- breakPoss.setFlag(BreakPoss.NEXT_OVERFLOWS, true);
+ return pos < listLMs.size();
+ }
+ }
+
+ public boolean createNextChildLMs(int pos) {
+ while (proxyLMiter.hasNext()) {
+ LayoutManager lm = proxyLMiter.next();
+ addChildLM(lm);
+ if (pos < childLMs.size()) {
+ return true;
}
- breakPoss.setStackingSize(stackSize);
- return breakPoss;
}
- setFinished(true);
- return null;
- }*/
+ return false;
+ }
- /**
- * Add the areas.
- *
- * @param parentIter the position iterator
- * @param layoutContext the layout context for adding areas
- */
- public void addAreas(PositionIterator parentIter,
- LayoutContext layoutContext) {
+ public KeepProperty getKeepTogetherProperty() {
+ return getTableAndCaptionFO().getKeepTogether();
+ }
+
+ public KeepProperty getKeepWithPreviousProperty() {
+ return getTableAndCaptionFO().getKeepWithPrevious();
+ }
+
+ public KeepProperty getKeepWithNextProperty() {
+ return getTableAndCaptionFO().getKeepWithNext();
+ }
+
+ public void addAreas(PositionIterator parentIter, LayoutContext layoutContext) {
getParentArea(null);
- addId();
- /* TODO: Reimplement using Knuth approach
+ // if this will create the first block area in a page
+ // and display-align is after or center, add space before
+ if (layoutContext.getSpaceBefore() > 0) {
+ addBlockSpacing(0.0, MinOptMax.getInstance(layoutContext.getSpaceBefore()));
+ }
+
LayoutManager childLM;
- int iStartPos = 0;
- LayoutContext lc = LayoutContext.newInstance();
+ LayoutManager lastLM = null;
+ LayoutContext lc = LayoutContext.offspringOf(layoutContext);
+ lc.setSpaceAdjust(layoutContext.getSpaceAdjust());
+ // set space after in the LayoutContext for children
+ if (layoutContext.getSpaceAfter() > 0) {
+ lc.setSpaceAfter(layoutContext.getSpaceAfter());
+ }
+ PositionIterator childPosIter;
+
+ // "unwrap" the NonLeafPositions stored in parentIter
+ // and put them in a new list;
+ LinkedList<Position> positionList = new LinkedList<>();
+ Position pos;
+ boolean spaceBefore = false;
+ boolean spaceAfter = false;
+ Position firstPos = null;
+ Position lastPos = null;
while (parentIter.hasNext()) {
- LeafPosition lfp = (LeafPosition) parentIter.next();
- // Add the block areas to Area
- PositionIterator breakPosIter = new BreakPossPosIter(
- childBreaks, iStartPos, lfp.getLeafPos() + 1);
- iStartPos = lfp.getLeafPos() + 1;
- while ((childLM = breakPosIter.getNextChildLM()) != null) {
- childLM.addAreas(breakPosIter, lc);
+ pos = parentIter.next();
+ if (pos.getIndex() >= 0) {
+ if (firstPos == null) {
+ firstPos = pos;
+ }
+ lastPos = pos;
+ }
+ Position innerPosition = pos;
+ if (pos instanceof NonLeafPosition) {
+ //Not all elements are wrapped
+ innerPosition = pos.getPosition();
+ }
+ if (innerPosition == null) {
+ // pos was created by this BlockLM and was inside an element
+ // representing space before or after
+ // this means the space was not discarded
+ if (positionList.isEmpty()) {
+ // pos was in the element representing space-before
+ spaceBefore = true;
+ } else {
+ // pos was in the element representing space-after
+ spaceAfter = true;
+ }
+ } else if (innerPosition.getLM() == this
+ && !(innerPosition instanceof MappingPosition)) {
+ // pos was created by this BlockLM and was inside a penalty
+ // allowing or forbidding a page break
+ // nothing to do
+ } else {
+ // innerPosition was created by another LM
+ positionList.add(innerPosition);
+ lastLM = innerPosition.getLM();
+ }
+ }
+
+ addId();
+
+ registerMarkers(true, isFirst(firstPos), isLast(lastPos));
+
+ if (bpUnit == 0) {
+ // the Positions in positionList were inside the elements
+ // created by the LineLM
+ childPosIter = new StackingIter(positionList.listIterator());
+ } else {
+ // the Positions in positionList were inside the elements
+ // created by the BlockLM in the createUnitElements() method
+ LinkedList<KnuthElement> splitList = new LinkedList<>();
+ int splitLength = 0;
+ int iFirst = ((MappingPosition) positionList.getFirst()).getFirstIndex();
+ int iLast = ((MappingPosition) positionList.getLast()).getLastIndex();
+ // copy from storedList to splitList all the elements from
+ // iFirst to iLast
+ ListIterator<KnuthElement> storedListIterator = storedList.listIterator(iFirst);
+ while (storedListIterator.nextIndex() <= iLast) {
+ KnuthElement element = storedListIterator.next();
+ // some elements in storedList (i.e. penalty items) were created
+ // by this BlockLM, and must be ignored
+ if (element.getLayoutManager() != this) {
+ splitList.add(element);
+ splitLength += element.getWidth();
+ lastLM = element.getLayoutManager();
+ }
}
- }*/
+ // add space before and / or after the paragraph
+ // to reach a multiple of bpUnit
+ if (spaceBefore && spaceAfter) {
+ adjustedSpaceBefore = (neededUnits(splitLength
+ + foSpaceBefore.getMin()
+ + foSpaceAfter.getMin())
+ * bpUnit - splitLength) / 2;
+ adjustedSpaceAfter = neededUnits(splitLength
+ + foSpaceBefore.getMin()
+ + foSpaceAfter.getMin())
+ * bpUnit - splitLength - adjustedSpaceBefore;
+ } else if (spaceBefore) {
+ adjustedSpaceBefore = neededUnits(splitLength
+ + foSpaceBefore.getMin())
+ * bpUnit - splitLength;
+ } else {
+ adjustedSpaceAfter = neededUnits(splitLength
+ + foSpaceAfter.getMin())
+ * bpUnit - splitLength;
+ }
+ childPosIter = new KnuthPossPosIter(splitList, 0, splitList
+ .size());
+ }
+ while ((childLM = childPosIter.getNextChildLM()) != null) {
+ // set last area flag
+ lc.setFlags(LayoutContext.LAST_AREA,
+ (layoutContext.isLastArea() && childLM == lastLM));
+ lc.setStackLimitBP(layoutContext.getStackLimitBP());
+ // Add the line areas to Area
+ childLM.addAreas(childPosIter, lc);
+ }
+
+ registerMarkers(false, isFirst(firstPos), isLast(lastPos));
+
+ TraitSetter.addSpaceBeforeAfter(curBlockArea, layoutContext.getSpaceAdjust(),
+ effSpaceBefore, effSpaceAfter);
flush();
- //childBreaks.clear();
curBlockArea = null;
+ resetSpaces();
+
+ //Notify end of block layout manager to the PSLM
+ checkEndOfLayout(lastPos);
+ }
+
+ private static class StackingIter extends PositionIterator {
+ public StackingIter(Iterator parentIter) {
+ super(parentIter);
+ }
+
+ protected LayoutManager getLM(Object nextObj) {
+ return ((Position) nextObj).getLM();
+ }
+
+ protected Position getPos(Object nextObj) {
+ return ((Position) nextObj);
+ }
}
/**
@@ -170,54 +315,98 @@ public class TableAndCaptionLayoutManager extends BlockStackingLayoutManager {
* Finally, based on the dimensions of the parent area, it initializes
* its own area. This includes setting the content IPD and the maximum
* BPD.
- *
- * @param childArea the child area to locate the parent
- * @return the area for this table and caption
+ * @param childArea area to get the parent area for
+ * @return the parent area
*/
public Area getParentArea(Area childArea) {
if (curBlockArea == null) {
curBlockArea = new Block();
- curBlockArea.setChangeBarList(getChangeBarList());
- // Set up dimensions
+ curBlockArea.setIPD(super.getContentAreaIPD());
+
+ curBlockArea.setBidiLevel(getTableAndCaptionFO().getBidiLevelRecursive());
+
// Must get dimensions from parent area
- Area parentArea = parentLayoutManager.getParentArea(curBlockArea);
- int referenceIPD = parentArea.getIPD();
- curBlockArea.setIPD(referenceIPD);
- curBlockArea.setBidiLevel(getTableAndCaptionFO().getBidiLevel());
- // Get reference IPD from parentArea
+ //Don't optimize this line away. It can have ugly side-effects.
+ parentLayoutManager.getParentArea(curBlockArea);
+
+ // set traits
+ TraitSetter.setProducerID(curBlockArea, getTableAndCaptionFO().getId());
+ TraitSetter.addBorders(curBlockArea,
+ getCommonBorderPaddingBackground(),
+ discardBorderBefore, discardBorderAfter, false, false, this);
+ TraitSetter.addPadding(curBlockArea,
+ getCommonBorderPaddingBackground(),
+ discardPaddingBefore, discardPaddingAfter, false, false, this);
+ TraitSetter.addMargins(curBlockArea,
+ getCommonBorderPaddingBackground(),
+ startIndent, endIndent,
+ this);
+ TraitSetter.setLayer(curBlockArea, getTableAndCaptionFO().getLayer());
+ curBlockArea.setLocation(FONode.getLocatorString(getTableAndCaptionFO().getLocator()));
setCurrentArea(curBlockArea); // ??? for generic operations
}
return curBlockArea;
}
+ public void addChildArea(Area childArea) {
+ if (curBlockArea != null) {
+ if (childArea instanceof LineArea) {
+ curBlockArea.addLineArea((LineArea) childArea);
+ } else {
+ curBlockArea.addBlock((Block) childArea);
+ }
+ }
+ }
+
/**
- * Add the child to the current area.
- *
- * @param childArea the area to add
+ * Force current area to be added to parent area.
+ * {@inheritDoc}
*/
- public void addChildArea(Area childArea) {
+ protected void flush() {
+ if (curBlockArea != null) {
+ TraitSetter.addBackground(curBlockArea, getTableAndCaptionFO().getCommonBorderPaddingBackground(), this);
+ super.flush();
+ }
+ }
+
+ /**
+ * Returns the table-and-caption formatting object.
+ * @return the table-and-caption formatting object
+ */
+ protected TableAndCaption getTableAndCaptionFO() {
+ return (TableAndCaption) fobj;
+ }
+
+ // --------- Property Resolution related functions --------- //
+
+ /**
+ * Returns the IPD of the content area
+ * @return the IPD of the content area
+ */
+ public int getContentAreaIPD() {
if (curBlockArea != null) {
- curBlockArea.addBlock((Block) childArea);
+ return curBlockArea.getIPD();
}
+ return super.getContentAreaIPD();
}
- /** {@inheritDoc} */
- public Keep getKeepWithNext() {
- return Keep.KEEP_AUTO;
- /* TODO Complete me!
- return KeepUtil.getCombinedBlockLevelKeepStrength(
- getTableAndCaptionFO().getKeepWithNext());
- */
+ /**
+ * Returns the BPD of the content area
+ * @return the BPD of the content area
+ */
+ public int getContentAreaBPD() {
+ if (curBlockArea != null) {
+ return curBlockArea.getBPD();
+ }
+ return -1;
}
- /** {@inheritDoc} */
- public Keep getKeepWithPrevious() {
- return Keep.KEEP_AUTO;
- /* TODO Complete me!
- return KeepUtil.getCombinedBlockLevelKeepStrength(
- getTableAndCaptionFO().getKeepWithPrevious());
- */
+ public boolean getGeneratesBlockArea() {
+ return true;
}
+ public boolean isRestartable() {
+ return true;
+ }
}
diff --git a/fop-core/src/main/java/org/apache/fop/layoutmgr/table/TableCaptionLayoutManager.java b/fop-core/src/main/java/org/apache/fop/layoutmgr/table/TableCaptionLayoutManager.java
index a89519425..fc19f6d87 100644
--- a/fop-core/src/main/java/org/apache/fop/layoutmgr/table/TableCaptionLayoutManager.java
+++ b/fop-core/src/main/java/org/apache/fop/layoutmgr/table/TableCaptionLayoutManager.java
@@ -19,142 +19,265 @@
package org.apache.fop.layoutmgr.table;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.ListIterator;
+
import org.apache.fop.area.Area;
import org.apache.fop.area.Block;
+import org.apache.fop.area.LineArea;
+import org.apache.fop.fo.FONode;
import org.apache.fop.fo.flow.table.TableCaption;
+import org.apache.fop.fo.properties.KeepProperty;
import org.apache.fop.layoutmgr.BlockStackingLayoutManager;
-import org.apache.fop.layoutmgr.Keep;
+import org.apache.fop.layoutmgr.BreakOpportunity;
+import org.apache.fop.layoutmgr.KnuthElement;
+import org.apache.fop.layoutmgr.KnuthPossPosIter;
+import org.apache.fop.layoutmgr.LMiter;
import org.apache.fop.layoutmgr.LayoutContext;
+import org.apache.fop.layoutmgr.LayoutManager;
+import org.apache.fop.layoutmgr.ListElement;
+import org.apache.fop.layoutmgr.NonLeafPosition;
+import org.apache.fop.layoutmgr.Position;
import org.apache.fop.layoutmgr.PositionIterator;
+import org.apache.fop.layoutmgr.TraitSetter;
+import org.apache.fop.traits.MinOptMax;
/**
* LayoutManager for a table-caption FO.
- * The table caption contains blocks that are placed beside the
- * table.
+ * A table caption consists of a table caption.
+ * The caption contains blocks that are positioned next to the
+ * table on the caption side.
+ * The caption blocks have an implicit keep with the table.
* TODO Implement getNextKnuthElements()
*/
-public class TableCaptionLayoutManager extends BlockStackingLayoutManager {
-
+public class TableCaptionLayoutManager extends BlockStackingLayoutManager implements BreakOpportunity {
private Block curBlockArea;
+ /** Iterator over the child layout managers. */
+ private ProxyLMiter proxyLMiter;
+
/**
- * Create a new Caption layout manager.
- * @param node table-caption FO
+ * Create a new table caption layout manager.
+ * @param tableCaption the block FO object to create the layout manager for.
*/
- public TableCaptionLayoutManager(TableCaption node) {
- super(node);
+ public TableCaptionLayoutManager(TableCaption tableCaption) {
+ super(tableCaption);
+ proxyLMiter = new ProxyLMiter();
}
- /** @return the table-caption FO */
- public TableCaption getTableCaptionFO() {
- return (TableCaption)this.fobj;
+ public List<ListElement> getNextKnuthElements(LayoutContext context, int alignment) {
+ return getNextKnuthElements(context, alignment, null, null, null);
}
/**
- * Get the next break position for the caption.
- *
- * @param context the layout context for finding breaks
- * @return the next break possibility
+ * Proxy iterator for Block LM.
+ * This iterator creates and holds the complete list
+ * of child LMs.
+ * It uses fobjIter as its base iterator.
+ * Block LM's createNextChildLMs uses this iterator
+ * as its base iterator.
*/
- /*
- public BreakPoss getNextBreakPoss(LayoutContext context) {
- LayoutManager curLM; // currently active LM
-
- MinOptMax stackSize = new MinOptMax();
- // if starting add space before
- // stackSize.add(spaceBefore);
- BreakPoss lastPos = null;
-
- // if there is a caption then get the side and work out when
- // to handle it
-
- while ((curLM = getChildLM()) != null) {
- // Make break positions and return blocks!
- // Set up a LayoutContext
- int ipd = context.getRefIPD();
- BreakPoss bp;
-
- LayoutContext childLC = LayoutContext.newInstance();
- // if line layout manager then set stack limit to ipd
- // line LM actually generates a LineArea which is a block
- childLC.setStackLimit(
- MinOptMax.subtract(context.getStackLimit(),
- stackSize));
- childLC.setRefIPD(ipd);
-
- boolean over = false;
-
- while (!curLM.isFinished()) {
- if ((bp = curLM.getNextBreakPoss(childLC)) != null) {
- if (stackSize.opt + bp.getStackingSize().opt > context.getStackLimit().max) {
- // reset to last break
- if (lastPos != null) {
- LayoutManager lm = lastPos.getLayoutManager();
- lm.resetPosition(lastPos.getPosition());
- if (lm != curLM) {
- curLM.resetPosition(null);
- }
- } else {
- curLM.resetPosition(null);
- }
- over = true;
- break;
- }
- stackSize.add(bp.getStackingSize());
- lastPos = bp;
- childBreaks.add(bp);
-
- if (bp.nextBreakOverflows()) {
- over = true;
- break;
- }
-
- childLC.setStackLimit(MinOptMax.subtract(
- context.getStackLimit(), stackSize));
- }
+ protected class ProxyLMiter extends LMiter {
+
+ /**
+ * Constructs a proxy iterator for Block LM.
+ */
+ public ProxyLMiter() {
+ super(TableCaptionLayoutManager.this);
+ listLMs = new ArrayList<>(10);
+ }
+
+ /**
+ * @return true if there are more child lms
+ */
+ public boolean hasNext() {
+ return (curPos < listLMs.size()) || createNextChildLMs(curPos);
+ }
+
+ /**
+ * @param pos ...
+ * @return true if new child lms were added
+ */
+ protected boolean createNextChildLMs(int pos) {
+ List<LayoutManager> newLMs = createChildLMs(pos + 1 - listLMs.size());
+ if (newLMs != null) {
+ listLMs.addAll(newLMs);
}
- BreakPoss breakPoss = new BreakPoss(
- new LeafPosition(this, childBreaks.size() - 1));
- if (over) {
- breakPoss.setFlag(BreakPoss.NEXT_OVERFLOWS, true);
+ return pos < listLMs.size();
+ }
+ }
+
+ public boolean createNextChildLMs(int pos) {
+ while (proxyLMiter.hasNext()) {
+ LayoutManager lm = proxyLMiter.next();
+ addChildLM(lm);
+ if (pos < childLMs.size()) {
+ return true;
}
- breakPoss.setStackingSize(stackSize);
- return breakPoss;
}
- setFinished(true);
- return null;
- }*/
+ return false;
+ }
- /**
- * Add the areas to the parent.
- *
- * @param parentIter the position iterator of the breaks
- * @param layoutContext the layout context for adding areas
- */
- public void addAreas(PositionIterator parentIter,
- LayoutContext layoutContext) {
+ public KeepProperty getKeepTogetherProperty() {
+ return getTableCaptionFO().getKeepTogether();
+ }
+
+ public KeepProperty getKeepWithPreviousProperty() {
+ return getTableCaptionFO().getKeepWithPrevious();
+ }
+
+ public KeepProperty getKeepWithNextProperty() {
+ return getTableCaptionFO().getKeepWithNext();
+ }
+
+ public void addAreas(PositionIterator parentIter, LayoutContext layoutContext) {
getParentArea(null);
- addId();
- /* TODO: Reimplement using Knuth approach
+ // if this will create the first block area in a page
+ // and display-align is after or center, add space before
+ if (layoutContext.getSpaceBefore() > 0) {
+ addBlockSpacing(0.0, MinOptMax.getInstance(layoutContext.getSpaceBefore()));
+ }
+
LayoutManager childLM;
- int iStartPos = 0;
- LayoutContext lc = LayoutContext.newInstance();
+ LayoutManager lastLM = null;
+ LayoutContext lc = LayoutContext.offspringOf(layoutContext);
+ lc.setSpaceAdjust(layoutContext.getSpaceAdjust());
+ // set space after in the LayoutContext for children
+ if (layoutContext.getSpaceAfter() > 0) {
+ lc.setSpaceAfter(layoutContext.getSpaceAfter());
+ }
+ PositionIterator childPosIter;
+
+ // "unwrap" the NonLeafPositions stored in parentIter
+ // and put them in a new list;
+ LinkedList<Position> positionList = new LinkedList<>();
+ Position pos;
+ boolean spaceBefore = false;
+ boolean spaceAfter = false;
+ Position firstPos = null;
+ Position lastPos = null;
while (parentIter.hasNext()) {
- LeafPosition lfp = (LeafPosition) parentIter.next();
- // Add the block areas to Area
- PositionIterator breakPosIter = new BreakPossPosIter(
- childBreaks, iStartPos, lfp.getLeafPos() + 1);
- iStartPos = lfp.getLeafPos() + 1;
- while ((childLM = breakPosIter.getNextChildLM()) != null) {
- childLM.addAreas(breakPosIter, lc);
+ pos = parentIter.next();
+ if (pos.getIndex() >= 0) {
+ if (firstPos == null) {
+ firstPos = pos;
+ }
+ lastPos = pos;
+ }
+ Position innerPosition = pos;
+ if (pos instanceof NonLeafPosition) {
+ //Not all elements are wrapped
+ innerPosition = pos.getPosition();
+ }
+ if (innerPosition == null) {
+ // pos was created by this BlockLM and was inside an element
+ // representing space before or after
+ // this means the space was not discarded
+ if (positionList.isEmpty()) {
+ // pos was in the element representing space-before
+ spaceBefore = true;
+ } else {
+ // pos was in the element representing space-after
+ spaceAfter = true;
+ }
+ } else if (innerPosition.getLM() == this
+ && !(innerPosition instanceof MappingPosition)) {
+ // pos was created by this BlockLM and was inside a penalty
+ // allowing or forbidding a page break
+ // nothing to do
+ } else {
+ // innerPosition was created by another LM
+ positionList.add(innerPosition);
+ lastLM = innerPosition.getLM();
+ }
+ }
+
+ addId();
+
+ registerMarkers(true, isFirst(firstPos), isLast(lastPos));
+
+ if (bpUnit == 0) {
+ // the Positions in positionList were inside the elements
+ // created by the LineLM
+ childPosIter = new StackingIter(positionList.listIterator());
+ } else {
+ // the Positions in positionList were inside the elements
+ // created by the BlockLM in the createUnitElements() method
+ LinkedList<KnuthElement> splitList = new LinkedList<>();
+ int splitLength = 0;
+ int iFirst = ((MappingPosition) positionList.getFirst()).getFirstIndex();
+ int iLast = ((MappingPosition) positionList.getLast()).getLastIndex();
+ // copy from storedList to splitList all the elements from
+ // iFirst to iLast
+ ListIterator<KnuthElement> storedListIterator = storedList.listIterator(iFirst);
+ while (storedListIterator.nextIndex() <= iLast) {
+ KnuthElement element = storedListIterator.next();
+ // some elements in storedList (i.e. penalty items) were created
+ // by this BlockLM, and must be ignored
+ if (element.getLayoutManager() != this) {
+ splitList.add(element);
+ splitLength += element.getWidth();
+ lastLM = element.getLayoutManager();
+ }
+ }
+ // add space before and / or after the paragraph
+ // to reach a multiple of bpUnit
+ if (spaceBefore && spaceAfter) {
+ adjustedSpaceBefore = (neededUnits(splitLength
+ + foSpaceBefore.getMin()
+ + foSpaceAfter.getMin())
+ * bpUnit - splitLength) / 2;
+ adjustedSpaceAfter = neededUnits(splitLength
+ + foSpaceBefore.getMin()
+ + foSpaceAfter.getMin())
+ * bpUnit - splitLength - adjustedSpaceBefore;
+ } else if (spaceBefore) {
+ adjustedSpaceBefore = neededUnits(splitLength
+ + foSpaceBefore.getMin())
+ * bpUnit - splitLength;
+ } else {
+ adjustedSpaceAfter = neededUnits(splitLength
+ + foSpaceAfter.getMin())
+ * bpUnit - splitLength;
}
- }*/
+ childPosIter = new KnuthPossPosIter(splitList, 0, splitList
+ .size());
+ }
+
+ while ((childLM = childPosIter.getNextChildLM()) != null) {
+ // set last area flag
+ lc.setFlags(LayoutContext.LAST_AREA,
+ (layoutContext.isLastArea() && childLM == lastLM));
+ lc.setStackLimitBP(layoutContext.getStackLimitBP());
+ // Add the line areas to Area
+ childLM.addAreas(childPosIter, lc);
+ }
+ registerMarkers(false, isFirst(firstPos), isLast(lastPos));
flush();
- //childBreaks.clear();
curBlockArea = null;
+
+ //Notify end of block layout manager to the PSLM
+ checkEndOfLayout(lastPos);
+ }
+
+ private static class StackingIter extends PositionIterator {
+ public StackingIter(Iterator parentIter) {
+ super(parentIter);
+ }
+
+ protected LayoutManager getLM(Object nextObj) {
+ return ((Position) nextObj).getLM();
+ }
+
+ protected Position getPos(Object nextObj) {
+ return ((Position) nextObj);
+ }
}
/**
@@ -166,55 +289,77 @@ public class TableCaptionLayoutManager extends BlockStackingLayoutManager {
* Finally, based on the dimensions of the parent area, it initializes
* its own area. This includes setting the content IPD and the maximum
* BPD.
- *
- * @param childArea the child area
- * @return the parent area from this caption
+ * @param childArea area to get the parent area for
+ * @return the parent area
*/
public Area getParentArea(Area childArea) {
if (curBlockArea == null) {
curBlockArea = new Block();
- curBlockArea.setChangeBarList(getChangeBarList());
- // Set up dimensions
+ curBlockArea.setIPD(super.getContentAreaIPD());
+
+ curBlockArea.setBidiLevel(getTableCaptionFO().getBidiLevelRecursive());
+
// Must get dimensions from parent area
- Area parentArea = parentLayoutManager.getParentArea(curBlockArea);
- int referenceIPD = parentArea.getIPD();
- curBlockArea.setIPD(referenceIPD);
- curBlockArea.setBidiLevel(getTableCaptionFO().getBidiLevel());
- // Get reference IPD from parentArea
+ //Don't optimize this line away. It can have ugly side-effects.
+ parentLayoutManager.getParentArea(curBlockArea);
+
+ // set traits
+ TraitSetter.setProducerID(curBlockArea, getTableCaptionFO().getId());
+ TraitSetter.setLayer(curBlockArea, getTableCaptionFO().getLayer());
+ curBlockArea.setLocation(FONode.getLocatorString(getTableCaptionFO().getLocator()));
setCurrentArea(curBlockArea); // ??? for generic operations
}
return curBlockArea;
}
- /**
- * Add the child to the caption area.
- *
- * @param childArea the child area to add
- */
public void addChildArea(Area childArea) {
if (curBlockArea != null) {
+ if (childArea instanceof LineArea) {
+ curBlockArea.addLineArea((LineArea) childArea);
+ } else {
curBlockArea.addBlock((Block) childArea);
+ }
}
}
- /** {@inheritDoc} */
- public Keep getKeepWithNext() {
- return Keep.KEEP_AUTO;
- /* TODO Complete me!
- return KeepUtil.getCombinedBlockLevelKeepStrength(
- getTableCaptionFO().getKeepWithNext());
- */
+ /**
+ * Returns the table-caption formatting object.
+ * @return the table-caption formatting object
+ */
+ protected TableCaption getTableCaptionFO() {
+ return (TableCaption) fobj;
}
- /** {@inheritDoc} */
- public Keep getKeepWithPrevious() {
- return Keep.KEEP_AUTO;
- /* TODO Complete me!
- return KeepUtil.getCombinedBlockLevelKeepStrength(
- getTableCaptionFO().getKeepWithPrevious());
- */
+ // --------- Property Resolution related functions --------- //
+
+ /**
+ * Returns the IPD of the content area
+ * @return the IPD of the content area
+ */
+ public int getContentAreaIPD() {
+ if (curBlockArea != null) {
+ return curBlockArea.getIPD();
+ }
+ return super.getContentAreaIPD();
}
-}
+ /**
+ * Returns the BPD of the content area
+ * @return the BPD of the content area
+ */
+ public int getContentAreaBPD() {
+ if (curBlockArea != null) {
+ return curBlockArea.getBPD();
+ }
+ return -1;
+ }
+ public boolean getGeneratesBlockArea() {
+ return true;
+ }
+
+ public boolean isRestartable() {
+ return true;
+ }
+}
diff --git a/fop-core/src/main/java/org/apache/fop/pdf/PDFDocument.java b/fop-core/src/main/java/org/apache/fop/pdf/PDFDocument.java
index 8f4ce7347..ee4db6ec1 100644
--- a/fop-core/src/main/java/org/apache/fop/pdf/PDFDocument.java
+++ b/fop-core/src/main/java/org/apache/fop/pdf/PDFDocument.java
@@ -23,6 +23,7 @@ package org.apache.fop.pdf;
import java.io.IOException;
import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
+import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
@@ -177,7 +178,9 @@ public class PDFDocument {
private boolean accessibilityEnabled;
- private boolean mergeFontsEnabled;
+ private boolean staticRegionsPerPageForAccessibility;
+
+ private PDFMergeFontsParams mergeFontsParams;
private boolean mergeFormFieldsEnabled;
@@ -845,13 +848,13 @@ public class PDFDocument {
}
try {
MessageDigest md = MessageDigest.getInstance("MD5");
- byte[] thedigest = md.digest(key.getBytes("UTF-8"));
+ byte[] thedigest = md.digest(key.getBytes(StandardCharsets.UTF_8));
StringBuilder hex = new StringBuilder();
for (byte b : thedigest) {
hex.append(String.format("%02x", b));
}
return hex.toString();
- } catch (NoSuchAlgorithmException | UnsupportedEncodingException e) {
+ } catch (NoSuchAlgorithmException e) {
throw new RuntimeException(e);
}
}
@@ -995,6 +998,14 @@ public class PDFDocument {
this.accessibilityEnabled = enableAccessibility;
}
+ public void setStaticRegionsPerPageForAccessibility(boolean staticRegionsPerPageForAccessibility) {
+ this.staticRegionsPerPageForAccessibility = staticRegionsPerPageForAccessibility;
+ }
+
+ public boolean isStaticRegionsPerPageForAccessibility() {
+ return staticRegionsPerPageForAccessibility;
+ }
+
/**
*
*/
@@ -1219,13 +1230,13 @@ public class PDFDocument {
return trailerDictionary;
}
- public boolean isMergeFontsEnabled() {
- return mergeFontsEnabled;
+ public PDFMergeFontsParams getMergeFontsParams() {
+ return mergeFontsParams;
}
- public void setMergeFontsEnabled(boolean mergeFontsEnabled) {
- this.mergeFontsEnabled = mergeFontsEnabled;
- if (mergeFontsEnabled) {
+ public void setMergeFontsParams(PDFMergeFontsParams mergeFontsParams) {
+ this.mergeFontsParams = mergeFontsParams;
+ if (mergeFontsParams != null) {
getResources().createFontsAsObj();
}
}
diff --git a/fop-core/src/main/java/org/apache/fop/pdf/PDFEncoding.java b/fop-core/src/main/java/org/apache/fop/pdf/PDFEncoding.java
index 64fd6f866..4bd1ac57e 100644
--- a/fop-core/src/main/java/org/apache/fop/pdf/PDFEncoding.java
+++ b/fop-core/src/main/java/org/apache/fop/pdf/PDFEncoding.java
@@ -146,7 +146,7 @@ public class PDFEncoding extends PDFDictionary {
/**
* Builder class for constructing the Differences array.
*/
- public class DifferencesBuilder {
+ public static class DifferencesBuilder {
private int currentCode = -1;
diff --git a/fop-core/src/main/java/org/apache/fop/pdf/PDFEncryptionJCE.java b/fop-core/src/main/java/org/apache/fop/pdf/PDFEncryptionJCE.java
index edebbb23a..7517646e5 100644
--- a/fop-core/src/main/java/org/apache/fop/pdf/PDFEncryptionJCE.java
+++ b/fop-core/src/main/java/org/apache/fop/pdf/PDFEncryptionJCE.java
@@ -21,7 +21,7 @@ package org.apache.fop.pdf;
import java.io.IOException;
import java.io.OutputStream;
-import java.io.UnsupportedEncodingException;
+import java.nio.charset.StandardCharsets;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.MessageDigest;
@@ -332,19 +332,15 @@ public final class PDFEncryptionJCE extends PDFObject implements PDFEncryption {
protected byte[] preparePassword(String password) {
int finalLength = 32;
byte[] preparedPassword = new byte[finalLength];
- try {
- byte[] passwordBytes = password.getBytes("UTF-8");
- if (passwordBytes.length >= finalLength) {
- System.arraycopy(passwordBytes, 0, preparedPassword, 0, finalLength);
- } else {
- System.arraycopy(passwordBytes, 0, preparedPassword, 0, passwordBytes.length);
- System.arraycopy(padding, 0, preparedPassword, passwordBytes.length, finalLength
- - passwordBytes.length);
- }
- return preparedPassword;
- } catch (UnsupportedEncodingException e) {
- throw new UnsupportedOperationException(e);
+ byte[] passwordBytes = password.getBytes(StandardCharsets.UTF_8);
+ if (passwordBytes.length >= finalLength) {
+ System.arraycopy(passwordBytes, 0, preparedPassword, 0, finalLength);
+ } else {
+ System.arraycopy(passwordBytes, 0, preparedPassword, 0, passwordBytes.length);
+ System.arraycopy(padding, 0, preparedPassword, passwordBytes.length, finalLength
+ - passwordBytes.length);
}
+ return preparedPassword;
}
void run() {
@@ -548,20 +544,16 @@ public final class PDFEncryptionJCE extends PDFObject implements PDFEncryption {
protected byte[] preparePassword(String password) {
byte[] passwordBytes;
byte[] preparedPassword;
- try {
- // the password needs to be normalized first but we are bypassing that step for now
- passwordBytes = password.getBytes("UTF-8");
- if (passwordBytes.length > 127) {
- preparedPassword = new byte[127];
- System.arraycopy(passwordBytes, 0, preparedPassword, 0, 127);
- } else {
- preparedPassword = new byte[passwordBytes.length];
- System.arraycopy(passwordBytes, 0, preparedPassword, 0, passwordBytes.length);
- }
- return preparedPassword;
- } catch (UnsupportedEncodingException e) {
- throw new UnsupportedOperationException(e.getMessage());
+ // the password needs to be normalized first but we are bypassing that step for now
+ passwordBytes = password.getBytes(StandardCharsets.UTF_8);
+ if (passwordBytes.length > 127) {
+ preparedPassword = new byte[127];
+ System.arraycopy(passwordBytes, 0, preparedPassword, 0, 127);
+ } else {
+ preparedPassword = new byte[passwordBytes.length];
+ System.arraycopy(passwordBytes, 0, preparedPassword, 0, passwordBytes.length);
}
+ return preparedPassword;
}
/**
diff --git a/fop-core/src/main/java/org/apache/fop/pdf/PDFLinearization.java b/fop-core/src/main/java/org/apache/fop/pdf/PDFLinearization.java
index f071c6250..dc294b307 100644
--- a/fop-core/src/main/java/org/apache/fop/pdf/PDFLinearization.java
+++ b/fop-core/src/main/java/org/apache/fop/pdf/PDFLinearization.java
@@ -21,6 +21,7 @@ package org.apache.fop.pdf;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStream;
+import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
@@ -312,7 +313,7 @@ public class PDFLinearization {
private static void writePadding(int padding, OutputStream stream) throws IOException {
for (int i = 0; i < padding; i++) {
- stream.write(" ".getBytes("UTF-8"));
+ stream.write(" ".getBytes(StandardCharsets.UTF_8));
}
}
diff --git a/fop-core/src/main/java/org/apache/fop/pdf/PDFLink.java b/fop-core/src/main/java/org/apache/fop/pdf/PDFLink.java
index e0426a454..766520632 100644
--- a/fop-core/src/main/java/org/apache/fop/pdf/PDFLink.java
+++ b/fop-core/src/main/java/org/apache/fop/pdf/PDFLink.java
@@ -21,6 +21,7 @@ package org.apache.fop.pdf;
// Java
import java.awt.geom.Rectangle2D;
+import java.nio.charset.StandardCharsets;
import java.util.Set;
/**
@@ -103,7 +104,12 @@ public class PDFLink extends PDFObject {
if (action instanceof PDFUri) {
String altText = ((PDFUri) action).getAltText();
if (altText != null && !altText.isEmpty()) {
- dict += "/Contents " + PDFText.escapeText(altText) + "\n";
+ if (getDocumentSafely().isEncryptionActive()) {
+ altText = new String(encodeText(altText), StandardCharsets.ISO_8859_1);
+ } else {
+ altText = PDFText.escapeText(altText);
+ }
+ dict += "/Contents " + altText + "\n";
}
}
dict += fFlag + "\n>>";
diff --git a/fop-core/src/test/java/org/apache/fop/BasicPDFTranscoderTestCase.java b/fop-core/src/main/java/org/apache/fop/pdf/PDFMergeFontsParams.java
index 0f20a1967..0d576ba69 100644
--- a/fop-core/src/test/java/org/apache/fop/BasicPDFTranscoderTestCase.java
+++ b/fop-core/src/main/java/org/apache/fop/pdf/PDFMergeFontsParams.java
@@ -16,22 +16,16 @@
*/
/* $Id$ */
+package org.apache.fop.pdf;
-package org.apache.fop;
+public class PDFMergeFontsParams {
+ private boolean remapSingleByteFontEnabled;
-import org.apache.batik.transcoder.Transcoder;
-
-import org.apache.fop.svg.PDFTranscoder;
-
-/**
- * Basic runtime test for the PDF transcoder. It is used to verify that
- * nothing obvious is broken after compiling.
- */
-public class BasicPDFTranscoderTestCase extends AbstractBasicTranscoderTest {
-
- @Override
- protected Transcoder createTranscoder() {
- return new PDFTranscoder();
+ public PDFMergeFontsParams(boolean remapSingleByteFontEnabled) {
+ this.remapSingleByteFontEnabled = remapSingleByteFontEnabled;
}
+ public boolean isRemapSingleByteFontEnabled() {
+ return remapSingleByteFontEnabled;
+ }
}
diff --git a/fop-core/src/main/java/org/apache/fop/pdf/PDFSignature.java b/fop-core/src/main/java/org/apache/fop/pdf/PDFSignature.java
index f5384be53..bdcc07bc0 100644
--- a/fop-core/src/main/java/org/apache/fop/pdf/PDFSignature.java
+++ b/fop-core/src/main/java/org/apache/fop/pdf/PDFSignature.java
@@ -25,6 +25,7 @@ import java.io.InputStream;
import java.io.OutputStream;
import java.net.URI;
import java.net.URISyntaxException;
+import java.nio.charset.StandardCharsets;
import java.security.GeneralSecurityException;
import java.security.KeyStore;
import java.security.PrivateKey;
@@ -208,8 +209,8 @@ public class PDFSignature {
.replace("\0", " ");
try (OutputStream editedPDF = getTempOS()) {
IOUtils.copyLarge(pdfIS, editedPDF, 0, startOfContents);
- editedPDF.write(byteRange.getBytes("UTF-8"));
- editedPDF.write(byteRangePadding.getBytes("UTF-8"));
+ editedPDF.write(byteRange.getBytes(StandardCharsets.UTF_8));
+ editedPDF.write(byteRangePadding.getBytes(StandardCharsets.UTF_8));
IOUtils.copyLarge(pdfIS, editedPDF, offsetToPDFEnd - startOfContents, Long.MAX_VALUE);
}
pdfIS.reset();
@@ -219,10 +220,10 @@ public class PDFSignature {
String signedHexPadding = new String(new char[SIZE_OF_CONTENTS - (signed.length * 2)])
.replace("\0", "0");
String signedHex = "<" + PDFText.toHex(signed, false) + signedHexPadding + ">";
- os.write(signedHex.getBytes("UTF-8"));
+ os.write(signedHex.getBytes(StandardCharsets.UTF_8));
}
- os.write(byteRange.getBytes("UTF-8"));
- os.write(byteRangePadding.getBytes("UTF-8"));
+ os.write(byteRange.getBytes(StandardCharsets.UTF_8));
+ os.write(byteRangePadding.getBytes(StandardCharsets.UTF_8));
IOUtils.copyLarge(pdfIS, os, offsetToPDFEnd - startOfContents, Long.MAX_VALUE);
}
}
diff --git a/fop-core/src/main/java/org/apache/fop/pdf/PDFStructElem.java b/fop-core/src/main/java/org/apache/fop/pdf/PDFStructElem.java
index cc299fa1d..838703a77 100644
--- a/fop-core/src/main/java/org/apache/fop/pdf/PDFStructElem.java
+++ b/fop-core/src/main/java/org/apache/fop/pdf/PDFStructElem.java
@@ -267,6 +267,9 @@ public class PDFStructElem extends StructureHierarchyMember implements Structure
}
public int output(OutputStream stream) throws IOException {
+ if (structureType == StandardStructureTypes.InlineLevelStructure.NOTE) {
+ put("ID", "Note ID " + getObjectNumber().getNumber());
+ }
if (getDocument() != null && getDocument().getProfile().getPDFUAMode().isEnabled()) {
if (entries.containsKey("Alt") && "".equals(get("Alt"))) {
put("Alt", "No alternate text specified");
diff --git a/fop-core/src/main/java/org/apache/fop/pdf/PDFText.java b/fop-core/src/main/java/org/apache/fop/pdf/PDFText.java
index 749bf5a30..d088f355f 100644
--- a/fop-core/src/main/java/org/apache/fop/pdf/PDFText.java
+++ b/fop-core/src/main/java/org/apache/fop/pdf/PDFText.java
@@ -21,6 +21,7 @@ package org.apache.fop.pdf;
import java.io.ByteArrayOutputStream;
+import java.nio.charset.StandardCharsets;
import java.util.Locale;
import org.apache.fop.util.CharUtilities;
@@ -99,12 +100,7 @@ public class PDFText extends PDFObject {
}
if (hexMode) {
- final byte[] uniBytes;
- try {
- uniBytes = text.getBytes("UTF-16");
- } catch (java.io.UnsupportedEncodingException uee) {
- throw new RuntimeException("Incompatible VM", uee);
- }
+ final byte[] uniBytes = text.getBytes(StandardCharsets.UTF_16);
return toHex(uniBytes);
} else {
final StringBuffer result = new StringBuffer(text.length() * 2);
@@ -192,13 +188,8 @@ public class PDFText extends PDFObject {
*/
public static final String toUnicodeHex(char c) {
final StringBuffer buf = new StringBuffer(4);
- final byte[] uniBytes;
- try {
- final char[] a = {c};
- uniBytes = new String(a).getBytes("UTF-16BE");
- } catch (java.io.UnsupportedEncodingException uee) {
- throw new RuntimeException("Incompatible VM", uee);
- }
+ final char[] a = {c};
+ final byte[] uniBytes = new String(a).getBytes(StandardCharsets.UTF_16BE);
for (byte uniByte : uniBytes) {
buf.append(DIGITS[(uniByte >>> 4) & 0x0F]);
diff --git a/fop-core/src/main/java/org/apache/fop/render/awt/viewer/PreviewPanel.java b/fop-core/src/main/java/org/apache/fop/render/awt/viewer/PreviewPanel.java
index 93cc29e4f..97abb9565 100644
--- a/fop-core/src/main/java/org/apache/fop/render/awt/viewer/PreviewPanel.java
+++ b/fop-core/src/main/java/org/apache/fop/render/awt/viewer/PreviewPanel.java
@@ -279,7 +279,7 @@ public class PreviewPanel extends JPanel {
/**
* Allows any mouse drag on the page area to scroll the display window.
*/
- private class ViewportScroller implements MouseListener, MouseMotionListener {
+ private static class ViewportScroller implements MouseListener, MouseMotionListener {
/** The viewport to be scrolled */
private final JViewport viewport;
/** Starting position of a mouse drag - X co-ordinate */
diff --git a/fop-core/src/main/java/org/apache/fop/render/intermediate/IFContext.java b/fop-core/src/main/java/org/apache/fop/render/intermediate/IFContext.java
index 9c414174c..abc047cf4 100644
--- a/fop-core/src/main/java/org/apache/fop/render/intermediate/IFContext.java
+++ b/fop-core/src/main/java/org/apache/fop/render/intermediate/IFContext.java
@@ -28,6 +28,7 @@ import org.apache.xmlgraphics.util.QName;
import org.apache.fop.accessibility.StructureTreeElement;
import org.apache.fop.apps.FOUserAgent;
import org.apache.fop.fo.Constants;
+import org.apache.fop.render.pdf.PDFStructureTreeBuilder;
/**
* This class provides a context object that is valid for a single processing run to create
@@ -168,6 +169,9 @@ public class IFContext implements PageIndexContext {
* @see #setStructureTreeElement(StructureTreeElement)
*/
public StructureTreeElement getStructureTreeElement() {
+ if (structureTreeElement instanceof PDFStructureTreeBuilder.Factory) {
+ return ((PDFStructureTreeBuilder.Factory)structureTreeElement).createStructureElement(pageNumber);
+ }
return this.structureTreeElement;
}
diff --git a/fop-core/src/main/java/org/apache/fop/render/intermediate/extensions/AbstractAction.java b/fop-core/src/main/java/org/apache/fop/render/intermediate/extensions/AbstractAction.java
index a2595d320..17b0b40bd 100644
--- a/fop-core/src/main/java/org/apache/fop/render/intermediate/extensions/AbstractAction.java
+++ b/fop-core/src/main/java/org/apache/fop/render/intermediate/extensions/AbstractAction.java
@@ -22,6 +22,7 @@ package org.apache.fop.render.intermediate.extensions;
import org.apache.xmlgraphics.util.XMLizable;
import org.apache.fop.accessibility.StructureTreeElement;
+import org.apache.fop.render.pdf.PDFStructureTreeBuilder;
/**
* Abstract base class for document actions, like "go-to" actions with absolute page coordinates.
@@ -60,6 +61,9 @@ public abstract class AbstractAction implements XMLizable {
* @return the reference to the structure element
*/
public StructureTreeElement getStructureTreeElement() {
+ if (structureTreeElement instanceof PDFStructureTreeBuilder.Factory) {
+ return ((PDFStructureTreeBuilder.Factory)structureTreeElement).createStructureElement();
+ }
return structureTreeElement;
}
diff --git a/fop-core/src/main/java/org/apache/fop/render/intermediate/extensions/URIAction.java b/fop-core/src/main/java/org/apache/fop/render/intermediate/extensions/URIAction.java
index 9a4960bb9..db920cc7c 100644
--- a/fop-core/src/main/java/org/apache/fop/render/intermediate/extensions/URIAction.java
+++ b/fop-core/src/main/java/org/apache/fop/render/intermediate/extensions/URIAction.java
@@ -19,6 +19,10 @@
package org.apache.fop.render.intermediate.extensions;
+import java.nio.charset.StandardCharsets;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+
import org.xml.sax.ContentHandler;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.AttributesImpl;
@@ -47,7 +51,23 @@ public class URIAction extends AbstractAction implements DocumentNavigationExten
this.uri = uri;
this.newWindow = newWindow;
this.altText = altText;
- setID(getIDPrefix() + (uri + newWindow).hashCode());
+ setID(createID(getIDPrefix(), uri + newWindow));
+ }
+
+ private String createID(String idPrefix, String url) {
+ try {
+ MessageDigest md = MessageDigest.getInstance("MD5");
+ byte[] thedigest = md.digest(url.getBytes(StandardCharsets.UTF_8));
+
+ StringBuilder hex = new StringBuilder();
+ for (byte b : thedigest) {
+ hex.append(String.format("%02x", b));
+ }
+
+ return idPrefix + hex;
+ } catch (NoSuchAlgorithmException e) {
+ throw new RuntimeException("MD5 algorithm not found", e);
+ }
}
/**
diff --git a/fop-core/src/main/java/org/apache/fop/render/pdf/ImageRawPNGAdapter.java b/fop-core/src/main/java/org/apache/fop/render/pdf/ImageRawPNGAdapter.java
index 8a4258bfc..8704c5e5d 100644
--- a/fop-core/src/main/java/org/apache/fop/render/pdf/ImageRawPNGAdapter.java
+++ b/fop-core/src/main/java/org/apache/fop/render/pdf/ImageRawPNGAdapter.java
@@ -118,11 +118,12 @@ public class ImageRawPNGAdapter extends AbstractImageAdapter {
// here we need to inflate the PNG pixel data, which includes alpha, separate the alpha channel
// and then deflate it back again
ByteArrayOutputStream baos = new ByteArrayOutputStream();
- BufferedOutputStream dos = new BufferedOutputStream(new DeflaterOutputStream(baos, new Deflater()));
- InputStream in = ((ImageRawStream) image).createInputStream();
- try {
- InflaterInputStream infStream = new InflaterInputStream(in, new Inflater());
- DataInputStream dataStream = new DataInputStream(infStream);
+ InputStream in = null;
+ DataInputStream dataStream = null;
+ try (BufferedOutputStream dos = new BufferedOutputStream(
+ new DeflaterOutputStream(baos, new Deflater()))) {
+ in = ((ImageRawStream) image).createInputStream();
+ dataStream = new DataInputStream(new InflaterInputStream(in, new Inflater()));
// offset is the byte offset of the alpha component
int offset = numberOfInterleavedComponents - 1; // 1 for GA, 3 for RGBA
int numColumns = image.getSize().getWidthPx();
@@ -139,11 +140,11 @@ public class ImageRawPNGAdapter extends AbstractImageAdapter {
}
offset = numberOfInterleavedComponents - 1;
}
- dos.close();
} catch (IOException e) {
- throw new RuntimeException("Error processing transparency channel:", e);
+ throw new RuntimeException("Error processing transparency channel: " + getKey(), e);
} finally {
IOUtils.closeQuietly(in);
+ IOUtils.closeQuietly(dataStream);
}
// set up alpha channel compression
FlateFilter transFlate;
@@ -211,6 +212,7 @@ public class ImageRawPNGAdapter extends AbstractImageAdapter {
public void outputContents(OutputStream out) throws IOException {
InputStream in = ((ImageRawStream) image).createInputStream();
+ DataInputStream dataStream = null;
try {
if (numberOfInterleavedComponents == 1 || numberOfInterleavedComponents == 3) {
// means we have Gray, RGB, or Palette
@@ -220,8 +222,8 @@ public class ImageRawPNGAdapter extends AbstractImageAdapter {
// TODO: since we have alpha here do this when the alpha channel is extracted
int numBytes = numberOfInterleavedComponents - 1; // 1 for Gray, 3 for RGB
int numColumns = image.getSize().getWidthPx();
- InflaterInputStream infStream = new InflaterInputStream(in, new Inflater());
- DataInputStream dataStream = new DataInputStream(infStream);
+ dataStream = new DataInputStream(new InflaterInputStream(in, new Inflater()));
+
int offset = 0;
int bytesPerRow = numberOfInterleavedComponents * numColumns;
int filter;
@@ -242,6 +244,7 @@ public class ImageRawPNGAdapter extends AbstractImageAdapter {
}
} finally {
IOUtils.closeQuietly(in);
+ IOUtils.closeQuietly(dataStream);
}
}
diff --git a/fop-core/src/main/java/org/apache/fop/render/pdf/PDFRendererConfig.java b/fop-core/src/main/java/org/apache/fop/render/pdf/PDFRendererConfig.java
index 358cbab21..d9a55b272 100644
--- a/fop-core/src/main/java/org/apache/fop/render/pdf/PDFRendererConfig.java
+++ b/fop-core/src/main/java/org/apache/fop/render/pdf/PDFRendererConfig.java
@@ -38,6 +38,7 @@ import org.apache.fop.fonts.DefaultFontConfig.DefaultFontConfigParser;
import org.apache.fop.fonts.FontEventAdapter;
import org.apache.fop.pdf.PDFEncryptionParams;
import org.apache.fop.pdf.PDFFilterList;
+import org.apache.fop.pdf.PDFMergeFontsParams;
import org.apache.fop.pdf.PDFSignParams;
import org.apache.fop.render.RendererConfig;
import org.apache.fop.render.RendererConfigOption;
@@ -152,7 +153,7 @@ public final class PDFRendererConfig implements RendererConfig {
configureEncryptionParams(cfg, userAgent, strict);
parseAndPut(OUTPUT_PROFILE, cfg);
parseAndPut(DISABLE_SRGB_COLORSPACE, cfg);
- parseAndPut(MERGE_FONTS, cfg);
+ configureMergeFontsParams(cfg);
parseAndPut(MERGE_FORM_FIELDS, cfg);
parseAndPut(LINEARIZATION, cfg);
parseAndPut(FORM_XOBJECT, cfg);
@@ -164,6 +165,18 @@ public final class PDFRendererConfig implements RendererConfig {
}
}
+ private void configureMergeFontsParams(Configuration cfg) throws ConfigurationException {
+ Configuration mergeFontsCfd = cfg.getChild(MERGE_FONTS.getName(), false);
+ if (mergeFontsCfd != null) {
+ Boolean enabled = (Boolean) MERGE_FONTS.parse(mergeFontsCfd.getValue());
+ if (enabled) {
+ boolean remapSingleByteFont = mergeFontsCfd.getAttributeAsBoolean("remap-singlebyte-font", true);
+ PDFMergeFontsParams mergeFontsParams = new PDFMergeFontsParams(remapSingleByteFont);
+ configOptions.put(MERGE_FONTS, mergeFontsParams);
+ }
+ }
+ }
+
private void configureSignParams(Configuration cfg) throws FOPException {
Configuration signCfd = cfg.getChild(PDFSignOption.SIGN_PARAMS, false);
if (signCfd != null) {
diff --git a/fop-core/src/main/java/org/apache/fop/render/pdf/PDFRendererOption.java b/fop-core/src/main/java/org/apache/fop/render/pdf/PDFRendererOption.java
index 20b97772a..88fab954a 100644
--- a/fop-core/src/main/java/org/apache/fop/render/pdf/PDFRendererOption.java
+++ b/fop-core/src/main/java/org/apache/fop/render/pdf/PDFRendererOption.java
@@ -81,7 +81,7 @@ public enum PDFRendererOption implements RendererConfigOption {
return Boolean.valueOf(value);
}
},
- MERGE_FONTS("merge-fonts", false) {
+ MERGE_FONTS("merge-fonts", null) {
@Override
Boolean deserialize(String value) {
return Boolean.valueOf(value);
diff --git a/fop-core/src/main/java/org/apache/fop/render/pdf/PDFRendererOptionsConfig.java b/fop-core/src/main/java/org/apache/fop/render/pdf/PDFRendererOptionsConfig.java
index 4ebd2da48..d5b41c4fb 100644
--- a/fop-core/src/main/java/org/apache/fop/render/pdf/PDFRendererOptionsConfig.java
+++ b/fop-core/src/main/java/org/apache/fop/render/pdf/PDFRendererOptionsConfig.java
@@ -26,6 +26,7 @@ import java.util.Map;
import org.apache.fop.pdf.PDFAMode;
import org.apache.fop.pdf.PDFEncryptionParams;
+import org.apache.fop.pdf.PDFMergeFontsParams;
import org.apache.fop.pdf.PDFSignParams;
import org.apache.fop.pdf.PDFUAMode;
import org.apache.fop.pdf.PDFVTMode;
@@ -143,8 +144,8 @@ public final class PDFRendererOptionsConfig {
return (Version) properties.get(VERSION);
}
- public Boolean getMergeFontsEnabled() {
- return (Boolean)properties.get(MERGE_FONTS);
+ public PDFMergeFontsParams getMergeFontsParams() {
+ return (PDFMergeFontsParams)properties.get(MERGE_FONTS);
}
public Boolean getMergeFormFieldsEnabled() {
diff --git a/fop-core/src/main/java/org/apache/fop/render/pdf/PDFRenderingUtil.java b/fop-core/src/main/java/org/apache/fop/render/pdf/PDFRenderingUtil.java
index 5d565cb47..857e9bd82 100644
--- a/fop-core/src/main/java/org/apache/fop/render/pdf/PDFRenderingUtil.java
+++ b/fop-core/src/main/java/org/apache/fop/render/pdf/PDFRenderingUtil.java
@@ -630,8 +630,9 @@ class PDFRenderingUtil {
addPDFA1OutputIntent();
}
- this.pdfDoc.enableAccessibility(userAgent.isAccessibilityEnabled());
- pdfDoc.setMergeFontsEnabled(rendererConfig.getMergeFontsEnabled());
+ pdfDoc.enableAccessibility(userAgent.isAccessibilityEnabled());
+ pdfDoc.setStaticRegionsPerPageForAccessibility(userAgent.isStaticRegionsPerPageForAccessibility());
+ pdfDoc.setMergeFontsParams(rendererConfig.getMergeFontsParams());
pdfDoc.setMergeFormFieldsEnabled(rendererConfig.getMergeFormFieldsEnabled());
pdfDoc.setLinearizationEnabled(rendererConfig.getLinearizationEnabled());
pdfDoc.setFormXObjectEnabled(rendererConfig.getFormXObjectEnabled());
diff --git a/fop-core/src/main/java/org/apache/fop/render/pdf/PDFStructureTreeBuilder.java b/fop-core/src/main/java/org/apache/fop/render/pdf/PDFStructureTreeBuilder.java
index 790f97468..4080b5bb1 100644
--- a/fop-core/src/main/java/org/apache/fop/render/pdf/PDFStructureTreeBuilder.java
+++ b/fop-core/src/main/java/org/apache/fop/render/pdf/PDFStructureTreeBuilder.java
@@ -94,8 +94,8 @@ public class PDFStructureTreeBuilder implements StructureTreeEventHandler {
addBuilder("basic-link", new LinkBuilder());
// Out-of-Line Formatting Objects
addBuilder("float", StandardStructureTypes.Grouping.DIV);
- addBuilder("footnote", StandardStructureTypes.InlineLevelStructure.NOTE);
- addBuilder("footnote-body", StandardStructureTypes.Grouping.SECT);
+ addBuilder("footnote", StandardStructureTypes.InlineLevelStructure.REFERENCE);
+ addBuilder("footnote-body", StandardStructureTypes.InlineLevelStructure.NOTE);
// Other Formatting Objects
addBuilder("wrapper", StandardStructureTypes.InlineLevelStructure.SPAN);
addBuilder("marker", StandardStructureTypes.Grouping.PRIVATE);
@@ -128,7 +128,7 @@ public class PDFStructureTreeBuilder implements StructureTreeEventHandler {
this.defaultStructureType = structureType;
}
- public final PDFStructElem build(StructureHierarchyMember parent, Attributes attributes,
+ public PDFStructElem build(StructureHierarchyMember parent, Attributes attributes,
PDFFactory pdfFactory, EventBroadcaster eventBroadcaster) {
String role = attributes.getValue(ROLE);
StructureType structureType;
@@ -196,6 +196,17 @@ public class PDFStructureTreeBuilder implements StructureTreeEventHandler {
((PageSequenceStructElem) parent).addContent(flowName, kid);
}
+ public PDFStructElem build(StructureHierarchyMember parent, Attributes attributes,
+ PDFFactory pdfFactory, EventBroadcaster eventBroadcaster) {
+ if (pdfFactory.getDocument().isStaticRegionsPerPageForAccessibility()) {
+ PageSequenceStructElem pageSequenceStructElem = (PageSequenceStructElem) parent;
+ if (pageSequenceStructElem.sect == null) {
+ pageSequenceStructElem.sect = super.build(parent, attributes, pdfFactory, eventBroadcaster);
+ }
+ return pageSequenceStructElem.sect;
+ }
+ return super.build(parent, attributes, pdfFactory, eventBroadcaster);
+ }
}
private static class LanguageHolderBuilder extends DefaultStructureElementBuilder {
@@ -339,7 +350,7 @@ public class PDFStructureTreeBuilder implements StructureTreeEventHandler {
private EventBroadcaster eventBroadcaster;
- private LinkedList<PDFStructElem> ancestors = new LinkedList<PDFStructElem>();
+ private LinkedList<StructureTreeElement> ancestors = new LinkedList<>();
private PDFStructElem rootStructureElement;
@@ -374,7 +385,7 @@ public class PDFStructureTreeBuilder implements StructureTreeEventHandler {
}
public void startPageSequence(Locale language, String role) {
- ancestors = new LinkedList<PDFStructElem>();
+ ancestors = new LinkedList<>();
AttributesImpl attributes = new AttributesImpl();
attributes.addAttribute("", ROLE, ROLE, XMLUtil.CDATA, role);
PDFStructElem structElem = createStructureElement("page-sequence",
@@ -392,14 +403,60 @@ public class PDFStructureTreeBuilder implements StructureTreeEventHandler {
if (!isPDFA1Safe(name)) {
return null;
}
- assert parent == null || parent instanceof PDFStructElem;
- PDFStructElem parentElem = parent == null ? ancestors.getFirst() : (PDFStructElem) parent;
- PDFStructElem structElem = createStructureElement(name, parentElem, attributes,
- pdfFactory, eventBroadcaster);
+ StructureTreeElement parentElem;
+ if (parent == null) {
+ parentElem = ancestors.getFirst();
+ } else {
+ parentElem = parent;
+ }
+ StructureTreeElement structElem;
+ if (pdfFactory.getDocument().isStaticRegionsPerPageForAccessibility()) {
+ structElem = new Factory(name, parentElem, attributes);
+ } else {
+ structElem = createStructureElement(
+ name, (PDFStructElem)parentElem, attributes, pdfFactory, eventBroadcaster);
+ }
ancestors.addFirst(structElem);
return structElem;
}
+ public class Factory implements StructureTreeElement {
+ private String name;
+ private StructureTreeElement parentElem;
+ private Attributes attributes;
+ private PDFStructElem cache;
+ private int cachePage = -1;
+
+ Factory(String name, StructureTreeElement parentElem, Attributes attributes) {
+ this.name = name;
+ this.parentElem = parentElem;
+ this.attributes = new AttributesImpl(attributes);
+ }
+
+ public PDFStructElem createStructureElement() {
+ if (cache != null) {
+ return cache;
+ }
+ return createStructureElement(1);
+ }
+
+ public PDFStructElem createStructureElement(int pageNumber) {
+ if (cachePage == pageNumber) {
+ return cache;
+ }
+ StructureHierarchyMember parent;
+ if (parentElem instanceof Factory) {
+ parent = ((Factory) parentElem).createStructureElement(pageNumber);
+ } else {
+ parent = (StructureHierarchyMember) parentElem;
+ }
+ cache = PDFStructureTreeBuilder.createStructureElement(
+ name, parent, attributes, pdfFactory, eventBroadcaster);
+ cachePage = pageNumber;
+ return cache;
+ }
+ }
+
public void endNode(String name) {
if (isPDFA1Safe(name)) {
ancestors.removeFirst();
diff --git a/fop-core/src/main/java/org/apache/fop/render/pdf/PageSequenceStructElem.java b/fop-core/src/main/java/org/apache/fop/render/pdf/PageSequenceStructElem.java
index 2024270ae..57af3c782 100644
--- a/fop-core/src/main/java/org/apache/fop/render/pdf/PageSequenceStructElem.java
+++ b/fop-core/src/main/java/org/apache/fop/render/pdf/PageSequenceStructElem.java
@@ -40,6 +40,8 @@ public class PageSequenceStructElem extends PDFStructElem {
private List<PDFStructElem> footnoteSeparator = new ArrayList<PDFStructElem>();
+ protected PDFStructElem sect;
+
PageSequenceStructElem(PDFObject parent, StructureType structureType) {
super(parent, structureType);
}
@@ -62,7 +64,6 @@ public class PageSequenceStructElem extends PDFStructElem {
@Override
protected boolean attachKids() {
- assert !kids.isEmpty();
PDFArray k = new PDFArray();
addRegions(k, regionBefores);
addRegions(k, regionStarts);
@@ -75,7 +76,7 @@ public class PageSequenceStructElem extends PDFStructElem {
}
private void addRegions(PDFArray k, List<? extends PDFObject> regions) {
- if (!regions.isEmpty()) {
+ if (regions != null && !regions.isEmpty()) {
for (PDFObject kid : regions) {
k.add(kid);
}
diff --git a/fop-core/src/main/java/org/apache/fop/render/pdf/TableStructElem.java b/fop-core/src/main/java/org/apache/fop/render/pdf/TableStructElem.java
index 0df8baade..f79cda300 100644
--- a/fop-core/src/main/java/org/apache/fop/render/pdf/TableStructElem.java
+++ b/fop-core/src/main/java/org/apache/fop/render/pdf/TableStructElem.java
@@ -39,9 +39,8 @@ class TableStructElem extends PDFStructElem {
@Override
protected boolean attachKids() {
- assert !kids.isEmpty();
if (tableFooter != null) {
- kids.add(tableFooter);
+ addKid(tableFooter);
}
return super.attachKids();
}
diff --git a/fop-core/src/main/java/org/apache/fop/render/ps/PSBatikFlowTextElementBridge.java b/fop-core/src/main/java/org/apache/fop/render/ps/PSBatikFlowTextElementBridge.java
index a09f55bec..41467a975 100644
--- a/fop-core/src/main/java/org/apache/fop/render/ps/PSBatikFlowTextElementBridge.java
+++ b/fop-core/src/main/java/org/apache/fop/render/ps/PSBatikFlowTextElementBridge.java
@@ -64,7 +64,7 @@ public class PSBatikFlowTextElementBridge extends BatikFlowTextElementBridge {
return this.textPainter;
}
- private class PSFlowExtTextPainter extends PSTextPainter {
+ private static class PSFlowExtTextPainter extends PSTextPainter {
/**
* Main constructor
diff --git a/fop-core/src/main/java/org/apache/fop/render/ps/PSSVGFlowRootElementBridge.java b/fop-core/src/main/java/org/apache/fop/render/ps/PSSVGFlowRootElementBridge.java
index df9e22053..3e33183a0 100644
--- a/fop-core/src/main/java/org/apache/fop/render/ps/PSSVGFlowRootElementBridge.java
+++ b/fop-core/src/main/java/org/apache/fop/render/ps/PSSVGFlowRootElementBridge.java
@@ -64,7 +64,7 @@ public class PSSVGFlowRootElementBridge extends SVGFlowRootElementBridge {
return this.textPainter;
}
- private class PSFlowTextPainter extends PSTextPainter {
+ private static class PSFlowTextPainter extends PSTextPainter {
/**
* Main constructor
diff --git a/fop-core/src/main/java/org/apache/fop/render/rtf/RTFHandler.java b/fop-core/src/main/java/org/apache/fop/render/rtf/RTFHandler.java
index 3a2d80d5e..08960172a 100644
--- a/fop-core/src/main/java/org/apache/fop/render/rtf/RTFHandler.java
+++ b/fop-core/src/main/java/org/apache/fop/render/rtf/RTFHandler.java
@@ -28,6 +28,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
+import java.nio.charset.StandardCharsets;
import java.util.Iterator;
import java.util.Map;
@@ -186,7 +187,7 @@ public class RTFHandler extends FOEventHandler {
public void startDocument() throws SAXException {
// TODO sections should be created
try {
- rtfFile = new RtfFile(new OutputStreamWriter(os));
+ rtfFile = new RtfFile(new OutputStreamWriter(os, StandardCharsets.UTF_8));
docArea = rtfFile.startDocumentArea();
} catch (IOException ioe) {
// TODO could we throw Exception in all FOEventHandler events?
@@ -1002,7 +1003,7 @@ public class RTFHandler extends FOEventHandler {
RtfListItem item
= (RtfListItem)builderContext.getContainer(RtfListItem.class, true, this);
- RtfListItemLabel label = item.new RtfListItemLabel(item);
+ RtfListItemLabel label = new RtfListItem.RtfListItemLabel(item);
builderContext.pushContainer(label);
} catch (IOException ioe) {
handleIOTrouble(ioe);
diff --git a/fop-core/src/main/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfFile.java b/fop-core/src/main/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfFile.java
index 2c4e0807a..3c9906f73 100644
--- a/fop-core/src/main/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfFile.java
+++ b/fop-core/src/main/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfFile.java
@@ -27,10 +27,11 @@ package org.apache.fop.render.rtf.rtflib.rtfdoc;
*/
import java.io.BufferedWriter;
-import java.io.FileWriter;
+import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.Writer;
+import java.nio.charset.StandardCharsets;
import org.apache.fop.render.rtf.rtflib.exceptions.RtfStructureException;
@@ -234,10 +235,10 @@ extends RtfContainer {
if (args.length != 0) {
final String outFile = args[0];
System.err.println("Outputting RTF to file '" + outFile + "'");
- w = new BufferedWriter(new FileWriter(outFile));
+ w = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outFile), StandardCharsets.UTF_8));
} else {
System.err.println("Outputting RTF code to standard output");
- w = new BufferedWriter(new OutputStreamWriter(System.out));
+ w = new BufferedWriter(new OutputStreamWriter(System.out, StandardCharsets.UTF_8));
}
final RtfFile f = new RtfFile(w);
diff --git a/fop-core/src/main/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfListItem.java b/fop-core/src/main/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfListItem.java
index 0b365bb15..23f9f4a1f 100644
--- a/fop-core/src/main/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfListItem.java
+++ b/fop-core/src/main/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfListItem.java
@@ -64,7 +64,7 @@ public class RtfListItem extends RtfContainer
/**
* special RtfTextrun that is used as list item label
*/
- public class RtfListItemLabel extends RtfTextrun implements IRtfTextrunContainer {
+ public static class RtfListItemLabel extends RtfTextrun implements IRtfTextrunContainer {
private RtfListItem rtfListItem;
diff --git a/fop-core/src/main/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTextrun.java b/fop-core/src/main/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTextrun.java
index 9758ab0b4..d034cabd8 100644
--- a/fop-core/src/main/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTextrun.java
+++ b/fop-core/src/main/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTextrun.java
@@ -61,7 +61,7 @@ public class RtfTextrun extends RtfContainer {
private RtfSpaceManager rtfSpaceManager = new RtfSpaceManager();
/** Class which represents the opening of a RTF group mark.*/
- private class RtfOpenGroupMark extends RtfElement {
+ private static class RtfOpenGroupMark extends RtfElement {
RtfOpenGroupMark(RtfContainer parent, Writer w, RtfAttributes attr)
throws IOException {
@@ -86,7 +86,7 @@ public class RtfTextrun extends RtfContainer {
}
/** Class which represents the closing of a RTF group mark.*/
- private class RtfCloseGroupMark extends RtfElement {
+ private static class RtfCloseGroupMark extends RtfElement {
private int breakType = BREAK_NONE;
RtfCloseGroupMark(RtfContainer parent, Writer w, int breakType)
diff --git a/fop-core/src/main/java/org/apache/fop/render/txt/TXTStream.java b/fop-core/src/main/java/org/apache/fop/render/txt/TXTStream.java
index 44a237b34..85639e29c 100644
--- a/fop-core/src/main/java/org/apache/fop/render/txt/TXTStream.java
+++ b/fop-core/src/main/java/org/apache/fop/render/txt/TXTStream.java
@@ -21,13 +21,14 @@ package org.apache.fop.render.txt;
import java.io.IOException;
import java.io.OutputStream;
+import java.nio.charset.StandardCharsets;
/**
* Helper class for text streams.
*/
public class TXTStream {
- private static final String DEFAULT_ENCODING = "UTF-8";
+ private static final String DEFAULT_ENCODING = StandardCharsets.UTF_8.name();
private OutputStream out;
private boolean doOutput = true;
@@ -68,7 +69,7 @@ public class TXTStream {
/**
* Set the encoding for the text stream.
- * @param encoding the encoding, if null, "UTF-8" is chosen as default
+ * @param encoding the encoding, if null, StandardCharsets.UTF_8 is chosen as default
*/
public void setEncoding(String encoding) {
if (encoding != null) {
diff --git a/fop-core/src/main/java/org/apache/fop/render/txt/TxtRendererConfig.java b/fop-core/src/main/java/org/apache/fop/render/txt/TxtRendererConfig.java
index 76128d42b..a8afffc06 100644
--- a/fop-core/src/main/java/org/apache/fop/render/txt/TxtRendererConfig.java
+++ b/fop-core/src/main/java/org/apache/fop/render/txt/TxtRendererConfig.java
@@ -19,6 +19,7 @@
package org.apache.fop.render.txt;
+import java.nio.charset.StandardCharsets;
import java.util.EnumMap;
import org.apache.fop.apps.FOPException;
@@ -37,7 +38,7 @@ import org.apache.fop.render.RendererConfigOption;
public final class TxtRendererConfig implements RendererConfig {
public enum TxtRendererOption implements RendererConfigOption {
- ENCODING("encoding", "UTF-8");
+ ENCODING("encoding", StandardCharsets.UTF_8.name());
private final String name;
private final Object defaultValue;
diff --git a/fop-core/src/main/java/org/apache/fop/svg/AbstractFOPTranscoder.java b/fop-core/src/main/java/org/apache/fop/svg/AbstractFOPTranscoder.java
index 2aca0cd96..3ac9e9d62 100644
--- a/fop-core/src/main/java/org/apache/fop/svg/AbstractFOPTranscoder.java
+++ b/fop-core/src/main/java/org/apache/fop/svg/AbstractFOPTranscoder.java
@@ -160,9 +160,9 @@ public abstract class AbstractFOPTranscoder extends SVGAbstractTranscoder implem
if (autoFonts) {
DefaultConfiguration c = new DefaultConfiguration("cfg");
DefaultConfiguration fonts = new DefaultConfiguration("fonts");
- c.addChild(fonts);
DefaultConfiguration autodetect = new DefaultConfiguration("auto-detect");
fonts.addChild(autodetect);
+ c.addChild(fonts);
effCfg = c;
}
}
diff --git a/fop-core/src/main/java/org/apache/fop/tools/anttasks/FileCompare.java b/fop-core/src/main/java/org/apache/fop/tools/anttasks/FileCompare.java
index 931f02819..c27b4d087 100644
--- a/fop-core/src/main/java/org/apache/fop/tools/anttasks/FileCompare.java
+++ b/fop-core/src/main/java/org/apache/fop/tools/anttasks/FileCompare.java
@@ -21,8 +21,11 @@ package org.apache.fop.tools.anttasks;
import java.io.BufferedInputStream;
import java.io.File;
+import java.io.FileOutputStream;
import java.io.IOException;
+import java.io.OutputStreamWriter;
import java.io.PrintWriter;
+import java.nio.charset.StandardCharsets;
import java.text.DateFormat;
import java.util.Date;
import java.util.List;
@@ -170,8 +173,8 @@ public class FileCompare {
File oldFile;
File newFile;
try {
- PrintWriter results
- = new PrintWriter(new java.io.FileWriter("results.html"), true);
+ PrintWriter results = new PrintWriter(new OutputStreamWriter(new FileOutputStream("results.html"),
+ StandardCharsets.UTF_8));
this.writeHeader(results);
for (String aFilenameList : filenameList) {
oldFile = new File(referenceDirectory + aFilenameList);
diff --git a/fop-core/src/main/java/org/apache/fop/util/AbstractPaintingState.java b/fop-core/src/main/java/org/apache/fop/util/AbstractPaintingState.java
index 8368383ba..b2d9f92de 100644
--- a/fop-core/src/main/java/org/apache/fop/util/AbstractPaintingState.java
+++ b/fop-core/src/main/java/org/apache/fop/util/AbstractPaintingState.java
@@ -385,7 +385,7 @@ public abstract class AbstractPaintingState implements Cloneable, Serializable {
* A stack implementation which holds state objects
*/
// @SuppressFBWarnings("SE_INNER_CLASS")
- public class StateStack<E> extends java.util.Stack<E> {
+ public static class StateStack<E> extends java.util.Stack<E> {
private static final long serialVersionUID = 4897178211223823041L;
diff --git a/fop-core/src/test/java/org/apache/fop/accessibility/fo/FO2StructureTreeConverterTestCase.java b/fop-core/src/test/java/org/apache/fop/accessibility/fo/FO2StructureTreeConverterTestCase.java
index 57443e15d..e604e5619 100644
--- a/fop-core/src/test/java/org/apache/fop/accessibility/fo/FO2StructureTreeConverterTestCase.java
+++ b/fop-core/src/test/java/org/apache/fop/accessibility/fo/FO2StructureTreeConverterTestCase.java
@@ -26,6 +26,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.StringWriter;
+import java.nio.charset.StandardCharsets;
import javax.xml.transform.Result;
import javax.xml.transform.Source;
@@ -183,7 +184,8 @@ public class FO2StructureTreeConverterTestCase {
@Test
public void testRemoveTableHeader() throws Exception {
keepEmptyTags = false;
- String fo = IOUtils.toString(getResource("table-artifact.fo"), "utf8").replace("role=\"artifact\"", "");
+ String fo = IOUtils.toString(getResource("table-artifact.fo"), StandardCharsets.UTF_8)
+ .replace("role=\"artifact\"", "");
compare(fo, "<structure-tree-sequence>\n"
+ "<structure-tree xmlns=\"http://xmlgraphics.apache.org/fop/intermediate\" "
+ "xmlns:foi=\"http://xmlgraphics.apache.org/fop/internal\" "
diff --git a/fop-core/src/test/java/org/apache/fop/afp/fonts/OutlineFontTestCase.java b/fop-core/src/test/java/org/apache/fop/afp/fonts/OutlineFontTestCase.java
index f4c64d9f0..3c696164f 100644
--- a/fop-core/src/test/java/org/apache/fop/afp/fonts/OutlineFontTestCase.java
+++ b/fop-core/src/test/java/org/apache/fop/afp/fonts/OutlineFontTestCase.java
@@ -18,6 +18,8 @@
/* $Id$ */
package org.apache.fop.afp.fonts;
+import java.nio.charset.StandardCharsets;
+
import org.junit.Assert;
import org.junit.Test;
@@ -33,7 +35,8 @@ public class OutlineFontTestCase {
}
public static CharacterSet getCharacterSet() {
- CharacterSet characterSet = new CharacterSet("00000000", "utf-8", CharacterSetType.SINGLE_BYTE, "", null, null);
+ CharacterSet characterSet = new CharacterSet("00000000", StandardCharsets.UTF_8.name(),
+ CharacterSetType.SINGLE_BYTE, "", null, null);
characterSet.addCharacterSetOrientation(new CharacterSetOrientation(0, 0, 0, 0));
return characterSet;
}
diff --git a/fop-core/src/test/java/org/apache/fop/apps/FopConfBuilder.java b/fop-core/src/test/java/org/apache/fop/apps/FopConfBuilder.java
index f8a3d2822..c337aa715 100644
--- a/fop-core/src/test/java/org/apache/fop/apps/FopConfBuilder.java
+++ b/fop-core/src/test/java/org/apache/fop/apps/FopConfBuilder.java
@@ -24,8 +24,8 @@ import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
-import java.io.UnsupportedEncodingException;
import java.lang.reflect.InvocationTargetException;
+import java.nio.charset.StandardCharsets;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
@@ -138,9 +138,11 @@ public class FopConfBuilder implements FontConfigurator<FopConfBuilder> {
* @param setAccessibility true to enable accessibility features
* @return <b>this</b>
*/
- public FopConfBuilder setAccessibility(boolean setAccessibility, boolean keepEmptyTags) {
+ public FopConfBuilder setAccessibility(boolean setAccessibility, boolean keepEmptyTags,
+ boolean staticRegionsPerPage) {
Element el = fopConfDOM.createElement(Accessibility.ACCESSIBILITY);
el.setAttribute(Accessibility.KEEP_EMPTY_TAGS, String.valueOf(keepEmptyTags));
+ el.setAttribute(Accessibility.STATIC_REGION_PER_PAGE, String.valueOf(staticRegionsPerPage));
el.appendChild(fopConfDOM.createTextNode(String.valueOf(setAccessibility)));
root.appendChild(el);
return this;
@@ -307,13 +309,11 @@ public class FopConfBuilder implements FontConfigurator<FopConfBuilder> {
transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "no");
transformer.setOutputProperty(OutputKeys.METHOD, "xml");
transformer.setOutputProperty(OutputKeys.INDENT, "yes");
- transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
+ transformer.setOutputProperty(OutputKeys.ENCODING, StandardCharsets.UTF_8.name());
transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4");
try {
transformer.transform(new DOMSource(fopConfDOM),
- new StreamResult(new OutputStreamWriter(out, "UTF-8")));
- } catch (UnsupportedEncodingException e) {
- throw new RuntimeException(e);
+ new StreamResult(new OutputStreamWriter(out, StandardCharsets.UTF_8)));
} catch (TransformerException e) {
throw new RuntimeException(e);
}
diff --git a/fop-core/src/test/java/org/apache/fop/apps/FopConfParserTestCase.java b/fop-core/src/test/java/org/apache/fop/apps/FopConfParserTestCase.java
index f60d67296..4748cbacc 100644
--- a/fop-core/src/test/java/org/apache/fop/apps/FopConfParserTestCase.java
+++ b/fop-core/src/test/java/org/apache/fop/apps/FopConfParserTestCase.java
@@ -89,17 +89,23 @@ public class FopConfParserTestCase {
@Test
public void testAccessibility() {
- builder.setAccessibility(false, true);
+ builder.setAccessibility(false, true, false);
assertFalse(buildFactory().isAccessibilityEnabled());
}
@Test
public void testAccessibilityKeepEmptyTags() {
- builder.setAccessibility(true, false);
+ builder.setAccessibility(true, false, false);
assertFalse(buildFactory().isKeepEmptyTags());
}
@Test
+ public void testStaticRegionsPerPageForAccessibility() {
+ builder.setAccessibility(true, false, true);
+ assertTrue(buildFactory().isStaticRegionsPerPageForAccessibility());
+ }
+
+ @Test
public void testSourceResolution() {
float srcRes = 123.456f;
builder.setSourceResolution(srcRes);
diff --git a/fop-core/src/test/java/org/apache/fop/apps/MutableConfig.java b/fop-core/src/test/java/org/apache/fop/apps/MutableConfig.java
index 4cc39dc6e..319bdda12 100644
--- a/fop-core/src/test/java/org/apache/fop/apps/MutableConfig.java
+++ b/fop-core/src/test/java/org/apache/fop/apps/MutableConfig.java
@@ -53,6 +53,10 @@ public final class MutableConfig implements FopFactoryConfig {
}
+ public boolean isStaticRegionsPerPageForAccessibility() {
+ return delegate.isStaticRegionsPerPageForAccessibility();
+ }
+
public boolean isKeepEmptyTags() {
return delegate.isKeepEmptyTags();
}
@@ -77,6 +81,10 @@ public final class MutableConfig implements FopFactoryConfig {
return delegate.validateUserConfigStrictly();
}
+ public boolean isLegacyInvalidBreakPosition() {
+ return delegate.isLegacyInvalidBreakPosition();
+ }
+
public boolean isBreakIndentInheritanceOnReferenceAreaBoundary() {
return setBreakInheritance;
}
diff --git a/fop-core/src/test/java/org/apache/fop/apps/PDFRendererConfBuilder.java b/fop-core/src/test/java/org/apache/fop/apps/PDFRendererConfBuilder.java
index 273d97633..07d30b21a 100644
--- a/fop-core/src/test/java/org/apache/fop/apps/PDFRendererConfBuilder.java
+++ b/fop-core/src/test/java/org/apache/fop/apps/PDFRendererConfBuilder.java
@@ -32,6 +32,7 @@ import static org.apache.fop.render.pdf.PDFEncryptionOption.USER_PASSWORD;
import static org.apache.fop.render.pdf.PDFRendererOption.DISABLE_SRGB_COLORSPACE;
import static org.apache.fop.render.pdf.PDFRendererOption.FILTER_LIST;
import static org.apache.fop.render.pdf.PDFRendererOption.FORM_XOBJECT;
+import static org.apache.fop.render.pdf.PDFRendererOption.MERGE_FONTS;
import static org.apache.fop.render.pdf.PDFRendererOption.MERGE_FORM_FIELDS;
import static org.apache.fop.render.pdf.PDFRendererOption.OUTPUT_PROFILE;
import static org.apache.fop.render.pdf.PDFRendererOption.PDF_A_MODE;
@@ -105,6 +106,11 @@ public final class PDFRendererConfBuilder extends RendererConfBuilder {
return this;
}
+ public PDFRendererConfBuilder setMergeFontsEnabled(boolean b) {
+ createTextElement(MERGE_FONTS, String.valueOf(b));
+ return this;
+ }
+
public final class EncryptionParamsBuilder {
private final Element el;
diff --git a/fop-core/src/test/java/org/apache/fop/complexscripts/scripts/arabic/GenerateArabicTestData.java b/fop-core/src/test/java/org/apache/fop/complexscripts/scripts/arabic/GenerateArabicTestData.java
index 9c2cd78e0..837ad8025 100644
--- a/fop-core/src/test/java/org/apache/fop/complexscripts/scripts/arabic/GenerateArabicTestData.java
+++ b/fop-core/src/test/java/org/apache/fop/complexscripts/scripts/arabic/GenerateArabicTestData.java
@@ -28,7 +28,7 @@ import java.io.InputStreamReader;
import java.io.LineNumberReader;
import java.io.ObjectOutputStream;
import java.nio.IntBuffer;
-import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
@@ -104,7 +104,7 @@ public final class GenerateArabicTestData implements ArabicWordFormsConstants {
FileInputStream fis = null;
try {
fis = new FileInputStream(spn);
- LineNumberReader lr = new LineNumberReader(new InputStreamReader(fis, Charset.forName("UTF-8")));
+ LineNumberReader lr = new LineNumberReader(new InputStreamReader(fis, StandardCharsets.UTF_8));
String wf;
while ((wf = lr.readLine()) != null) {
GlyphSequence igs = tf.mapCharsToGlyphs(wf);
diff --git a/fop-core/src/test/java/org/apache/fop/fo/flow/table/UnimplementedWarningNeutralizer.java b/fop-core/src/test/java/org/apache/fop/fo/flow/table/UnimplementedWarningNeutralizer.java
deleted file mode 100644
index 1a5e38291..000000000
--- a/fop-core/src/test/java/org/apache/fop/fo/flow/table/UnimplementedWarningNeutralizer.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * 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$ */
-
-package org.apache.fop.fo.flow.table;
-
-/**
- * This class aims at easing testing, by preventing the event notification system from
- * getting in the way just to issue an Unimplemented Feature warning.
- */
-public final class UnimplementedWarningNeutralizer {
-
- private UnimplementedWarningNeutralizer() { }
-
- /**
- * Neutralizes Unimplemented Feature events from the {@link TableAndCaption} and
- * {@link TableCaption} classes.
- */
- public static void neutralizeUnimplementedWarning() {
- TableAndCaption.notImplementedWarningGiven = true;
- TableCaption.notImplementedWarningGiven = true;
- }
-}
diff --git a/fop-core/src/test/java/org/apache/fop/fo/properties/CommonAccessibilityHolderTestCase.java b/fop-core/src/test/java/org/apache/fop/fo/properties/CommonAccessibilityHolderTestCase.java
index 81ebc2f41..008ab0580 100644
--- a/fop-core/src/test/java/org/apache/fop/fo/properties/CommonAccessibilityHolderTestCase.java
+++ b/fop-core/src/test/java/org/apache/fop/fo/properties/CommonAccessibilityHolderTestCase.java
@@ -34,7 +34,6 @@ import org.apache.fop.fo.FONode;
import org.apache.fop.fo.FONodeMocks;
import org.apache.fop.fo.PropertyList;
import org.apache.fop.fo.expr.PropertyException;
-import org.apache.fop.fo.flow.table.UnimplementedWarningNeutralizer;
/**
* This tests that all the FONodes that implement CommonAccessibilityHolder correctly configure
@@ -50,10 +49,6 @@ public class CommonAccessibilityHolderTestCase {
private final String sourceDocument = "source document";
static {
- /* This triggers 'unimplemented feature' FO validation events so that the event system is
- * not triggered when testing, avoiding extra convoluted dependency stubbing. */
- UnimplementedWarningNeutralizer.neutralizeUnimplementedWarning();
-
IMPLEMENTATIONS.add(org.apache.fop.fo.flow.BasicLink.class);
IMPLEMENTATIONS.add(org.apache.fop.fo.flow.Block.class);
IMPLEMENTATIONS.add(org.apache.fop.fo.pagination.bookmarks.Bookmark.class);
diff --git a/fop-core/src/test/java/org/apache/fop/fonts/autodetect/FontFileFinderTestCase.java b/fop-core/src/test/java/org/apache/fop/fonts/autodetect/FontFileFinderTestCase.java
index b9782e672..ab9e587d2 100644
--- a/fop-core/src/test/java/org/apache/fop/fonts/autodetect/FontFileFinderTestCase.java
+++ b/fop-core/src/test/java/org/apache/fop/fonts/autodetect/FontFileFinderTestCase.java
@@ -29,12 +29,15 @@ import java.nio.file.spi.FileSystemProvider;
import org.junit.Test;
+import static org.junit.Assert.fail;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
+import org.apache.fop.fonts.FontEventListener;
+
public class FontFileFinderTestCase {
@Test
@@ -63,6 +66,26 @@ public class FontFileFinderTestCase {
verify(linkDirectory.toPath(), times(2)).toRealPath();
}
+ @Test
+ public void testNullEventListener() throws IOException {
+ FontFileFinder finder = new FontFileFinder(null);
+ try {
+ finder.find(new File(""));
+ } catch (NullPointerException e) {
+ fail("Should not throw NullPointerException when event listener is null");
+ }
+ }
+
+ @Test
+ public void testValidEventListener() throws IOException {
+ FontEventListener mockListener = mock(FontEventListener.class);
+ FontFileFinder finder = new FontFileFinder(mockListener);
+
+ finder.find(new File(""));
+
+ verify(mockListener, times(1)).fontDirectoryNotFound(any(), any());
+ }
+
private File createMockDirectory(String path) throws IOException {
Path mockRealPath = mock(Path.class);
when(mockRealPath.toString()).thenReturn(path);
diff --git a/fop-core/src/test/java/org/apache/fop/intermediate/TestAssistant.java b/fop-core/src/test/java/org/apache/fop/intermediate/TestAssistant.java
index 66939cfcc..33d11ddc5 100644
--- a/fop-core/src/test/java/org/apache/fop/intermediate/TestAssistant.java
+++ b/fop-core/src/test/java/org/apache/fop/intermediate/TestAssistant.java
@@ -129,6 +129,7 @@ public class TestAssistant {
builder.setLegacySkipPagePositionOnly(isLegacySkipPagePositionOnly(testDoc));
builder.setLegacyLastPageChangeIPD(isLegacyLastPageChangeIPD(testDoc));
builder.setLegacyFoWrapper(isLegacyFoWrapper(testDoc));
+ builder.setLegacyInvalidBreakPosition(isLegacyInvalidBreakPosition(testDoc));
return builder.build();
}
@@ -209,6 +210,15 @@ public class TestAssistant {
}
}
+ private boolean isLegacyInvalidBreakPosition(Document testDoc) {
+ try {
+ String s = eval(testDoc, "/testcase/cfg/legacy-invalid-break-position");
+ return "true".equalsIgnoreCase(s);
+ } catch (XPathExpressionException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
/**
* Loads a test case into a DOM document.
* @param testFile the test file
diff --git a/fop-core/src/test/java/org/apache/fop/pdf/PDFEncryptionJCETestCase.java b/fop-core/src/test/java/org/apache/fop/pdf/PDFEncryptionJCETestCase.java
index 18d15c384..d3345a893 100644
--- a/fop-core/src/test/java/org/apache/fop/pdf/PDFEncryptionJCETestCase.java
+++ b/fop-core/src/test/java/org/apache/fop/pdf/PDFEncryptionJCETestCase.java
@@ -22,6 +22,7 @@ package org.apache.fop.pdf;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
+import java.nio.charset.StandardCharsets;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.MessageDigest;
@@ -460,7 +461,7 @@ public class PDFEncryptionJCETestCase {
IllegalBlockSizeException, BadPaddingException {
MessageDigest sha256 = MessageDigest.getInstance("SHA-256");
String dataText = "Test data to encrypt.";
- byte[] data = dataText.getBytes("UTF-8");
+ byte[] data = dataText.getBytes(StandardCharsets.UTF_8);
PDFEncryptionParams params = new PDFEncryptionParams();
params.setEncryptionLengthInBits(256);
params.setUserPassword("userpassword");
@@ -486,7 +487,7 @@ public class PDFEncryptionJCETestCase {
byte[] userKeySalt = new byte[8];
System.arraycopy(u, 32, userValSalt, 0, 8);
System.arraycopy(u, 40, userKeySalt, 0, 8);
- byte[] uPassBytes = params.getUserPassword().getBytes("UTF-8");
+ byte[] uPassBytes = params.getUserPassword().getBytes(StandardCharsets.UTF_8);
byte[] testUPass = new byte[uPassBytes.length + 8];
System.arraycopy(uPassBytes, 0, testUPass, 0, uPassBytes.length);
System.arraycopy(userValSalt, 0, testUPass, uPassBytes.length, 8);
@@ -501,7 +502,7 @@ public class PDFEncryptionJCETestCase {
byte[] ownerKeySalt = new byte[8];
System.arraycopy(o, 32, ownerValSalt, 0, 8);
System.arraycopy(o, 40, ownerKeySalt, 0, 8);
- byte[] oPassBytes = params.getOwnerPassword().getBytes("UTF-8");
+ byte[] oPassBytes = params.getOwnerPassword().getBytes(StandardCharsets.UTF_8);
byte[] testOPass = new byte[oPassBytes.length + 8 + 48];
System.arraycopy(oPassBytes, 0, testOPass, 0, oPassBytes.length);
System.arraycopy(ownerValSalt, 0, testOPass, oPassBytes.length, 8);
diff --git a/fop-core/src/test/java/org/apache/fop/pdf/PDFFactoryTestCase.java b/fop-core/src/test/java/org/apache/fop/pdf/PDFFactoryTestCase.java
index 9aeef7807..baa39d830 100644
--- a/fop-core/src/test/java/org/apache/fop/pdf/PDFFactoryTestCase.java
+++ b/fop-core/src/test/java/org/apache/fop/pdf/PDFFactoryTestCase.java
@@ -27,9 +27,11 @@ import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URI;
+import java.nio.charset.StandardCharsets;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
@@ -283,14 +285,69 @@ public class PDFFactoryTestCase {
}
@Test
- public void testLinkAltText() throws IOException {
+ public void testNullLinkAltText() throws IOException {
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ defaultLinkAltText(bos, false, null);
+
+ assertFalse("If the alt text is null, it should not be added to the dictionary",
+ bos.toString().contains("/Contents"));
+
+ defaultLinkAltText(bos, false, null);
+ assertFalse("If the alt text is null, it should not be added to the dictionary",
+ bos.toString().contains("/Contents"));
+ }
+
+ @Test
+ public void testEmptyLinkAltText() throws IOException {
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ defaultLinkAltText(bos, false, "");
+
+ assertFalse("If the alt text is empty, it should not be added to the dictionary",
+ bos.toString().contains("/Contents"));
+
+ defaultLinkAltText(bos, false, "");
+ assertFalse("If the alt text is empty, it should not be added to the dictionary",
+ bos.toString().contains("/Contents"));
+ }
+
+ @Test
+ public void testValidLinkAltText() throws IOException {
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+
+ String altText = defaultLinkAltText(bos, false, "b");
+ assertTrue("Alt Text must not use the encryption",
+ bos.toString().contains("/Contents (" + altText + ")"));
+
+ String encryptedAltText = defaultLinkAltText(bos, true, "b");
+ assertTrue("Alt Text must use the encryption",
+ bos.toString().contains("/Contents " + encryptedAltText));
+ }
+
+ private String defaultLinkAltText(ByteArrayOutputStream bos, boolean useEncryption, String originalAltText)
+ throws IOException {
PDFDocument doc = new PDFDocument("");
+ if (useEncryption) {
+ doc.setEncryption(new PDFEncryptionParams("", "", true, true, true, true, true));
+ }
+
PDFFactory pdfFactory = new PDFFactory(doc);
- PDFAction action = pdfFactory.getExternalAction("a", false, "b");
+ PDFAction action = pdfFactory.getExternalAction("a", false, originalAltText);
+ action.setObjectNumber(1);
+ action.setDocument(doc);
+
PDFLink link = pdfFactory.makeLink(new Rectangle(), "a", 0, 0);
link.setAction(action);
- ByteArrayOutputStream bos = new ByteArrayOutputStream();
+
link.output(bos);
- assertTrue(bos.toString().contains("/Contents (b)"));
+ if (useEncryption && originalAltText != null && !originalAltText.isEmpty()) {
+ ByteArrayOutputStream encryptedAltTextBos = new ByteArrayOutputStream();
+ String encryptedAltText = new String(link.encodeText(((PDFUri) action).getAltText()),
+ StandardCharsets.ISO_8859_1);
+ encryptedAltTextBos.write(PDFDocument.encode(encryptedAltText));
+
+ return encryptedAltTextBos.toString();
+ } else {
+ return originalAltText;
+ }
}
}
diff --git a/fop-core/src/test/java/org/apache/fop/pdf/PDFStructureTreeTestCase.java b/fop-core/src/test/java/org/apache/fop/pdf/PDFStructureTreeTestCase.java
index d66159fd2..eb36357cf 100644
--- a/fop-core/src/test/java/org/apache/fop/pdf/PDFStructureTreeTestCase.java
+++ b/fop-core/src/test/java/org/apache/fop/pdf/PDFStructureTreeTestCase.java
@@ -21,7 +21,7 @@ package org.apache.fop.pdf;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
-import java.io.IOException;
+import java.nio.charset.StandardCharsets;
import javax.xml.transform.Result;
import javax.xml.transform.Source;
@@ -79,16 +79,43 @@ public class PDFStructureTreeTestCase {
}
private ByteArrayOutputStream foToOutput(String fo)
- throws IOException, SAXException, TransformerException {
+ throws SAXException, TransformerException {
FopFactory fopFactory = FopFactory.newInstance(new File(".").toURI());
FOUserAgent userAgent = fopFactory.newFOUserAgent();
userAgent.setAccessibility(true);
ByteArrayOutputStream bos = new ByteArrayOutputStream();
Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, userAgent, bos);
Transformer transformer = TransformerFactory.newInstance().newTransformer();
- Source src = new StreamSource(new ByteArrayInputStream(fo.getBytes("UTF-8")));
+ Source src = new StreamSource(new ByteArrayInputStream(fo.getBytes(StandardCharsets.UTF_8)));
Result res = new SAXResult(fop.getDefaultHandler());
transformer.transform(src, res);
return bos;
}
+
+ @Test
+ public void testFootnote() throws Exception {
+ String fo = "<fo:root xmlns:fo=\"http://www.w3.org/1999/XSL/Format\">\n"
+ + " <fo:layout-master-set>\n"
+ + " <fo:simple-page-master master-name=\"simple\" page-height=\"27.9cm\" page-width=\"21.6cm\">\n"
+ + " <fo:region-body />\n"
+ + " </fo:simple-page-master>\n"
+ + " </fo:layout-master-set>\n"
+ + " <fo:page-sequence master-reference=\"simple\">\n"
+ + " <fo:flow flow-name=\"xsl-region-body\">\n"
+ + " <fo:block>Text<fo:footnote>\n"
+ + " <fo:inline>1</fo:inline>\n"
+ + " <fo:footnote-body>\n"
+ + " <fo:block>footnote</fo:block>\n"
+ + " </fo:footnote-body>\n"
+ + " </fo:footnote>\n"
+ + " </fo:block>\n"
+ + " </fo:flow>\n"
+ + " </fo:page-sequence>\n"
+ + "</fo:root>\n";
+ ByteArrayOutputStream bos = foToOutput(fo);
+ String pdf = bos.toString();
+ Assert.assertTrue(pdf.contains("/ID (Note ID "));
+ Assert.assertTrue(pdf.contains("/S /Note"));
+ Assert.assertTrue(pdf.contains("/S /Reference"));
+ }
}
diff --git a/fop-core/src/test/java/org/apache/fop/render/afp/AFPParser.java b/fop-core/src/test/java/org/apache/fop/render/afp/AFPParser.java
index e3705271a..747a88ea5 100644
--- a/fop-core/src/test/java/org/apache/fop/render/afp/AFPParser.java
+++ b/fop-core/src/test/java/org/apache/fop/render/afp/AFPParser.java
@@ -21,6 +21,7 @@ package org.apache.fop.render.afp;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
+import java.nio.charset.StandardCharsets;
import java.util.HashMap;
import java.util.Map;
@@ -90,7 +91,7 @@ public class AFPParser {
} else if ("TRN".equals(PTOCA_MAP.get(functionType))) {
byte[] data = new byte[len - 2];
bis.read(data);
- sb.append(" " + new String(data, "UTF-16BE"));
+ sb.append(" " + new String(data, StandardCharsets.UTF_16BE));
} else {
bis.skip(len - 2);
}
diff --git a/fop-core/src/test/java/org/apache/fop/render/intermediate/URIActionTestCase.java b/fop-core/src/test/java/org/apache/fop/render/intermediate/URIActionTestCase.java
index 42675f8a0..44eff68a5 100644
--- a/fop-core/src/test/java/org/apache/fop/render/intermediate/URIActionTestCase.java
+++ b/fop-core/src/test/java/org/apache/fop/render/intermediate/URIActionTestCase.java
@@ -32,4 +32,12 @@ public class URIActionTestCase {
Assert.assertEquals(action.getID(), action2.getID());
Assert.assertFalse(action.getID().equals(action3.getID()));
}
+
+ @Test
+ public void testIdEdgeCase() {
+ URIAction action = new URIAction("19", true, null);
+ URIAction action2 = new URIAction("0X", true, null);
+ Assert.assertNotEquals("We can't use the hashcode for the ids as some strings have the same hashcode",
+ action.getID(), action2.getID());
+ }
}
diff --git a/fop-core/src/test/java/org/apache/fop/render/pdf/PDFRendererConfigParserTestCase.java b/fop-core/src/test/java/org/apache/fop/render/pdf/PDFRendererConfigParserTestCase.java
index e7d7a5c59..210d10909 100644
--- a/fop-core/src/test/java/org/apache/fop/render/pdf/PDFRendererConfigParserTestCase.java
+++ b/fop-core/src/test/java/org/apache/fop/render/pdf/PDFRendererConfigParserTestCase.java
@@ -25,6 +25,7 @@ import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import org.apache.fop.apps.AbstractRendererConfigParserTester;
@@ -232,4 +233,12 @@ public class PDFRendererConfigParserTestCase
parseConfig(createRenderer().setMergeFormFieldsEnabled(true));
assertTrue(conf.getConfigOptions().getMergeFormFieldsEnabled());
}
+
+ @Test
+ public void testMergeFonts() throws Exception {
+ parseConfig(createRenderer());
+ assertNull(conf.getConfigOptions().getMergeFontsParams());
+ parseConfig(createRenderer().setMergeFontsEnabled(true));
+ assertTrue(conf.getConfigOptions().getMergeFontsParams().isRemapSingleByteFontEnabled());
+ }
}
diff --git a/fop-core/src/test/java/org/apache/fop/render/pdf/PDFStructureTreeTestCase.java b/fop-core/src/test/java/org/apache/fop/render/pdf/PDFStructureTreeTestCase.java
new file mode 100644
index 000000000..d62b1436a
--- /dev/null
+++ b/fop-core/src/test/java/org/apache/fop/render/pdf/PDFStructureTreeTestCase.java
@@ -0,0 +1,92 @@
+/*
+ * 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$ */
+package org.apache.fop.render.pdf;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.util.Collection;
+
+import javax.xml.transform.Result;
+import javax.xml.transform.Source;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.sax.SAXResult;
+import javax.xml.transform.stream.StreamSource;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import org.apache.fop.apps.FOUserAgent;
+import org.apache.fop.apps.Fop;
+import org.apache.fop.apps.FopFactory;
+import org.apache.fop.pdf.PDFLinearizationTestCase;
+
+public class PDFStructureTreeTestCase {
+ @Test
+ public void testStaticRegionPerPage() throws Exception {
+ ByteArrayOutputStream bos = foToOutput("<fo:root xmlns:fo=\"http://www.w3.org/1999/XSL/Format\">\n"
+ + " <fo:layout-master-set>\n"
+ + " <fo:simple-page-master master-name=\"simple\" page-width=\"8.5in\" page-height=\"11in\">\n"
+ + " <fo:region-body/>\n"
+ + " <fo:region-after region-name=\"Footer\" extent=\"1in\"/>\n"
+ + " </fo:simple-page-master>\n"
+ + " </fo:layout-master-set>\n"
+ + " <fo:page-sequence master-reference=\"simple\">\n"
+ + " <fo:static-content flow-name=\"Footer\">\n"
+ + " <fo:block>footer</fo:block>\n"
+ + " </fo:static-content>\n"
+ + " <fo:flow flow-name=\"xsl-region-body\">\n"
+ + " <fo:block>test</fo:block> \n"
+ + " <fo:block break-before=\"page\">test2</fo:block>\n"
+ + " </fo:flow>\n"
+ + " </fo:page-sequence>\n"
+ + "</fo:root>\n");
+
+ Collection<StringBuilder> objs =
+ PDFLinearizationTestCase.readObjs(new ByteArrayInputStream(bos.toByteArray())).values();
+ int count = 0;
+ for (StringBuilder sb : objs) {
+ String obj = sb.toString();
+ if (obj.contains("/Type /MCR")) {
+ Assert.assertEquals(obj, obj.split("/Pg ").length, 2);
+ count++;
+ }
+ }
+ Assert.assertEquals(count, 4);
+ }
+
+ private ByteArrayOutputStream foToOutput(String fo) throws Exception {
+ FopFactory fopFactory = getFopFactory();
+ FOUserAgent userAgent = fopFactory.newFOUserAgent();
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ Fop fop = fopFactory.newFop("application/pdf", userAgent, bos);
+ Transformer transformer = TransformerFactory.newInstance().newTransformer();
+ Source src = new StreamSource(new ByteArrayInputStream(fo.getBytes()));
+ Result res = new SAXResult(fop.getDefaultHandler());
+ transformer.transform(src, res);
+ return bos;
+ }
+
+ private FopFactory getFopFactory() throws Exception {
+ String fopxconf =
+ "<fop version=\"1.0\"><accessibility static-region-per-page=\"true\">true</accessibility></fop>";
+ return FopFactory.newInstance(new File(".").toURI(), new ByteArrayInputStream(fopxconf.getBytes()));
+ }
+}
diff --git a/fop-core/src/test/java/org/apache/fop/render/ps/ImageHandlingTestCase.java b/fop-core/src/test/java/org/apache/fop/render/ps/ImageHandlingTestCase.java
index c8baf8ad7..b702e1264 100644
--- a/fop-core/src/test/java/org/apache/fop/render/ps/ImageHandlingTestCase.java
+++ b/fop-core/src/test/java/org/apache/fop/render/ps/ImageHandlingTestCase.java
@@ -24,6 +24,7 @@ import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
+import java.nio.charset.StandardCharsets;
import org.junit.Test;
@@ -184,7 +185,7 @@ public class ImageHandlingTestCase extends AbstractPostScriptTest {
+ "rotate=\"30 30 0 15\">Hello SVG with FOP</text>\n"
+ "</svg>";
SAXSVGDocumentFactory factory = new SAXSVGDocumentFactory(null);
- Document doc = factory.createDocument(null, IOUtils.toInputStream(svg, "utf-8"));
+ Document doc = factory.createDocument(null, IOUtils.toInputStream(svg, StandardCharsets.UTF_8));
ByteArrayOutputStream bos = new ByteArrayOutputStream();
new PSImageHandlerSVG().handleImage(
new PSRenderingContext(ua, new PSGenerator(bos), new FontInfo()),
diff --git a/fop-core/src/test/java/org/apache/fop/render/ps/svg/GradientTestCase.java b/fop-core/src/test/java/org/apache/fop/render/ps/svg/GradientTestCase.java
index 80e40dbfd..1b7ad1962 100644
--- a/fop-core/src/test/java/org/apache/fop/render/ps/svg/GradientTestCase.java
+++ b/fop-core/src/test/java/org/apache/fop/render/ps/svg/GradientTestCase.java
@@ -22,6 +22,7 @@ package org.apache.fop.render.ps.svg;
import java.awt.Color;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
+import java.nio.charset.StandardCharsets;
import org.junit.Test;
@@ -68,7 +69,8 @@ public class GradientTestCase {
svgGraphics2D.setGraphicContext(new GraphicContext());
svgGraphics2D.translate(100, 100);
svgGraphics2D.applyPaint(gradient, true);
- String expected = IOUtils.toString(getClass().getResourceAsStream(expectedResourceName), "utf-8");
+ String expected = IOUtils.toString(
+ getClass().getResourceAsStream(expectedResourceName), StandardCharsets.UTF_8);
assertEquals(expected.replace("\r", ""), out.toString());
}
diff --git a/fop-core/src/test/java/org/apache/fop/AbstractBasicTranscoderTest.java b/fop-core/src/test/java/org/apache/fop/svg/AbstractBasicTranscoderTest.java
index 7a40b353a..f7abc1d5f 100644
--- a/fop-core/src/test/java/org/apache/fop/AbstractBasicTranscoderTest.java
+++ b/fop-core/src/test/java/org/apache/fop/svg/AbstractBasicTranscoderTest.java
@@ -17,7 +17,7 @@
/* $Id$ */
-package org.apache.fop;
+package org.apache.fop.svg;
import java.io.File;
import java.io.InputStream;
diff --git a/fop-core/src/test/java/org/apache/fop/svg/BasicPDFTranscoderTestCase.java b/fop-core/src/test/java/org/apache/fop/svg/BasicPDFTranscoderTestCase.java
new file mode 100644
index 000000000..14b1cda89
--- /dev/null
+++ b/fop-core/src/test/java/org/apache/fop/svg/BasicPDFTranscoderTestCase.java
@@ -0,0 +1,55 @@
+/*
+ * 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$ */
+
+package org.apache.fop.svg;
+
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.batik.transcoder.Transcoder;
+
+import org.apache.fop.configuration.Configuration;
+
+/**
+ * Basic runtime test for the PDF transcoder. It is used to verify that
+ * nothing obvious is broken after compiling.
+ */
+public class BasicPDFTranscoderTestCase extends AbstractBasicTranscoderTest {
+
+ @Override
+ protected Transcoder createTranscoder() {
+ return new PDFTranscoder();
+ }
+
+ @Test
+ public void testFontAutoDetect() {
+ //Create transcoder
+ PDFTranscoder transcoder = (PDFTranscoder) createTranscoder();
+
+ Configuration effectiveConfiguration = transcoder.getEffectiveConfiguration();
+ Configuration autoDetectConf = effectiveConfiguration.getChild("fonts").getChild("auto-detect");
+
+ assertEquals("The auto-detect conf must be added to it's parent (fonts) "
+ + "before the parent (fonts) is added to cfg",
+ "DefaultConfiguration",
+ autoDetectConf.getClass().getSimpleName());
+ }
+
+}
diff --git a/fop-core/src/test/java/org/apache/fop/BasicPSTranscoderTestCase.java b/fop-core/src/test/java/org/apache/fop/svg/BasicPSTranscoderTestCase.java
index 2d6fc0d81..658da9cf9 100644
--- a/fop-core/src/test/java/org/apache/fop/BasicPSTranscoderTestCase.java
+++ b/fop-core/src/test/java/org/apache/fop/svg/BasicPSTranscoderTestCase.java
@@ -17,7 +17,7 @@
/* $Id$ */
-package org.apache.fop;
+package org.apache.fop.svg;
import org.apache.batik.transcoder.Transcoder;
diff --git a/fop-core/src/test/java/org/apache/fop/BasicTranscoderTestSuite.java b/fop-core/src/test/java/org/apache/fop/svg/BasicTranscoderTestSuite.java
index a372f737a..97c0be595 100644
--- a/fop-core/src/test/java/org/apache/fop/BasicTranscoderTestSuite.java
+++ b/fop-core/src/test/java/org/apache/fop/svg/BasicTranscoderTestSuite.java
@@ -17,7 +17,7 @@
/* $Id$ */
-package org.apache.fop;
+package org.apache.fop.svg;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
diff --git a/fop-core/src/tools/resources/findbugs/exclusions.xml b/fop-core/src/tools/resources/findbugs/exclusions.xml
index a0ff65e68..fb801d102 100644
--- a/fop-core/src/tools/resources/findbugs/exclusions.xml
+++ b/fop-core/src/tools/resources/findbugs/exclusions.xml
@@ -163,14 +163,6 @@
</Or>
</Match>
<Match>
- <!-- class only used when building? -->
- <Bug pattern="OS_OPEN_STREAM_EXCEPTION_PATH"/>
- <And>
- <Class name="org.apache.fop.hyphenation.SerializeHyphPattern"/>
- <Method name="serializeFile"/>
- </And>
- </Match>
- <Match>
<Bug pattern="DM_EXIT"/>
<Or>
<And>
@@ -240,14 +232,6 @@
</Or>
</Match>
<Match>
- <Bug pattern="OS_OPEN_STREAM_EXCEPTION_PATH"/>
- <!-- TODO - fix potential file descriptor leak -->
- <And>
- <Class name="org.apache.fop.hyphenation.SerializeHyphPattern"/>
- <Method name="serializeFile"/>
- </And>
- </Match>
- <Match>
<Bug pattern="SE_INNER_CLASS"/>
<Or>
<Class name="org.apache.fop.afp.AFPPaintingState$AFPData"/>
@@ -301,17 +285,6 @@
<!-- Properties not yet implemented -->
<Class name="org.apache.fop.fo.properties.CommonAural"/>
</Match>
- <Match>
- <Class name="org.apache.fop.render.pdf.ImageRawPNGAdapter"/>
- <Or>
- <Method name="outputContents"/>
- <Method name="setup"/>
- </Or>
- <Or>
- <Bug pattern="OS_OPEN_STREAM"/>
- <Bug pattern="OS_OPEN_STREAM_EXCEPTION_PATH"/>
- </Or>
- </Match>
<!-- END - APPROVED EXCLUSIONS -->
<!-- START - TEMPORARY (UNAPPROVED) EXCLUSIONS -->
@@ -332,18 +305,6 @@
<Bug pattern="DM_CONVERT_CASE"/>
</Match>
<Match>
- <!-- 17 warnings -->
- <Bug pattern="DM_DEFAULT_ENCODING"/>
- </Match>
- <Match>
- <!-- 20 warnings -->
- <Bug pattern="DM_FP_NUMBER_CTOR"/>
- </Match>
- <Match>
- <!-- 88 warnings -->
- <Bug pattern="DM_NUMBER_CTOR"/>
- </Match>
- <Match>
<!-- 84 warnings -->
<Bug pattern="EI_EXPOSE_REP"/>
</Match>
@@ -388,10 +349,6 @@
<Bug pattern="SE_BAD_FIELD"/>
</Match>
<Match>
- <!-- 21 warnings -->
- <Bug pattern="SIC_INNER_SHOULD_BE_STATIC"/>
- </Match>
- <Match>
<!-- 20 warnings -->
<Bug pattern="SIC_INNER_SHOULD_BE_STATIC_ANON"/>
</Match>
diff --git a/fop-events/pom.xml b/fop-events/pom.xml
index 8ca329584..6c07294b9 100644
--- a/fop-events/pom.xml
+++ b/fop-events/pom.xml
@@ -10,7 +10,7 @@
<parent>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>fop-parent</artifactId>
- <version>2.10.0-SNAPSHOT</version>
+ <version>2.11.0-SNAPSHOT</version>
</parent>
<dependencies>
diff --git a/fop-sandbox/pom.xml b/fop-sandbox/pom.xml
index c91327821..c879b111b 100644
--- a/fop-sandbox/pom.xml
+++ b/fop-sandbox/pom.xml
@@ -10,7 +10,7 @@
<parent>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>fop-parent</artifactId>
- <version>2.10.0-SNAPSHOT</version>
+ <version>2.11.0-SNAPSHOT</version>
</parent>
<dependencies>
diff --git a/fop-sandbox/src/main/java/org/apache/fop/render/mif/MIFElement.java b/fop-sandbox/src/main/java/org/apache/fop/render/mif/MIFElement.java
index 93f7c1d8d..08a1b664f 100644
--- a/fop-sandbox/src/main/java/org/apache/fop/render/mif/MIFElement.java
+++ b/fop-sandbox/src/main/java/org/apache/fop/render/mif/MIFElement.java
@@ -22,6 +22,7 @@ package org.apache.fop.render.mif;
// Java
import java.io.IOException;
import java.io.OutputStream;
+import java.nio.charset.StandardCharsets;
import java.util.Iterator;
import java.util.List;
@@ -89,9 +90,9 @@ public class MIFElement {
}
String indentStr = sb.toString();
if (!started) {
- os.write((indentStr + "<" + name).getBytes());
+ os.write((indentStr + "<" + name).getBytes(StandardCharsets.UTF_8));
if (valueElements != null) {
- os.write(("\n").getBytes());
+ os.write(("\n").getBytes(StandardCharsets.UTF_8));
}
started = true;
}
@@ -110,9 +111,9 @@ public class MIFElement {
if (!finish || !done) {
return false;
}
- os.write((indentStr + "> # end of " + name + "\n").getBytes());
+ os.write((indentStr + "> # end of " + name + "\n").getBytes(StandardCharsets.UTF_8));
} else {
- os.write((" " + valueStr + ">\n").getBytes());
+ os.write((" " + valueStr + ">\n").getBytes(StandardCharsets.UTF_8));
}
finished = true;
return true;
diff --git a/fop-sandbox/src/main/java/org/apache/fop/render/mif/MIFFile.java b/fop-sandbox/src/main/java/org/apache/fop/render/mif/MIFFile.java
index c727b2998..1a2b3e599 100644
--- a/fop-sandbox/src/main/java/org/apache/fop/render/mif/MIFFile.java
+++ b/fop-sandbox/src/main/java/org/apache/fop/render/mif/MIFFile.java
@@ -22,6 +22,7 @@ package org.apache.fop.render.mif;
// Java
import java.io.IOException;
import java.io.OutputStream;
+import java.nio.charset.StandardCharsets;
import java.util.Iterator;
import java.util.List;
@@ -130,7 +131,7 @@ public class MIFFile extends MIFElement {
}
if (!started) {
- os.write(("<MIFFile 5.00> # Generated by FOP\n"/* + getVersion()*/).getBytes());
+ os.write(("<MIFFile 5.00> # Generated by FOP\n"/* + getVersion()*/).getBytes(StandardCharsets.UTF_8));
started = true;
}
boolean done = true;
@@ -146,7 +147,7 @@ public class MIFFile extends MIFElement {
}
}
if (done && finish) {
- os.write(("# end of MIFFile").getBytes());
+ os.write(("# end of MIFFile").getBytes(StandardCharsets.UTF_8));
}
}
diff --git a/fop-sandbox/src/main/java/org/apache/fop/render/svg/SVGRenderer.java b/fop-sandbox/src/main/java/org/apache/fop/render/svg/SVGRenderer.java
index 9cbc1662d..9800eb766 100644
--- a/fop-sandbox/src/main/java/org/apache/fop/render/svg/SVGRenderer.java
+++ b/fop-sandbox/src/main/java/org/apache/fop/render/svg/SVGRenderer.java
@@ -25,6 +25,7 @@ import java.awt.geom.Rectangle2D;
import java.io.IOException;
import java.io.OutputStream;
import java.io.Writer;
+import java.nio.charset.StandardCharsets;
import org.w3c.dom.DOMImplementation;
import org.w3c.dom.Document;
@@ -148,7 +149,7 @@ public class SVGRenderer extends Java2DRenderer {
return;
}
try {
- Writer writer = new java.io.OutputStreamWriter(out, "UTF-8");
+ Writer writer = new java.io.OutputStreamWriter(out, StandardCharsets.UTF_8.name());
this.svgGenerator.stream(writer, useCSS);
} finally {
if (out != this.firstOutputStream) {
diff --git a/fop-sandbox/src/tools/resources/findbugs/exclusions.xml b/fop-sandbox/src/tools/resources/findbugs/exclusions.xml
index 325065e13..a7a45b4cd 100644
--- a/fop-sandbox/src/tools/resources/findbugs/exclusions.xml
+++ b/fop-sandbox/src/tools/resources/findbugs/exclusions.xml
@@ -73,12 +73,6 @@
<Bug pattern="DM_CONVERT_CASE"/>
</Match>
<Match>
- <Bug pattern="DM_FP_NUMBER_CTOR"/>
- </Match>
- <Match>
- <Bug pattern="DM_NUMBER_CTOR"/>
- </Match>
- <Match>
<Bug pattern="EI_EXPOSE_REP2"/>
</Match>
<Match>
diff --git a/fop-servlet/pom.xml b/fop-servlet/pom.xml
index 512d01fc5..2144bd5e5 100644
--- a/fop-servlet/pom.xml
+++ b/fop-servlet/pom.xml
@@ -11,7 +11,7 @@
<parent>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>fop-parent</artifactId>
- <version>2.10.0-SNAPSHOT</version>
+ <version>2.11.0-SNAPSHOT</version>
</parent>
<dependencies>
diff --git a/fop-transcoder-allinone/pom.xml b/fop-transcoder-allinone/pom.xml
index 8a3a4f863..1f4736e0c 100644
--- a/fop-transcoder-allinone/pom.xml
+++ b/fop-transcoder-allinone/pom.xml
@@ -10,7 +10,7 @@
<parent>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>fop-parent</artifactId>
- <version>2.10.0-SNAPSHOT</version>
+ <version>2.11.0-SNAPSHOT</version>
</parent>
<dependencies>
diff --git a/fop-transcoder-allinone/src/tools/resources/assembly/assembly.xml b/fop-transcoder-allinone/src/tools/resources/assembly/assembly.xml
index 13d8ce403..7edc187dd 100644
--- a/fop-transcoder-allinone/src/tools/resources/assembly/assembly.xml
+++ b/fop-transcoder-allinone/src/tools/resources/assembly/assembly.xml
@@ -22,11 +22,7 @@
<unpack>true</unpack>
<unpackOptions>
<includes>
- <include>org/apache/commons/io/*.class</include>
- <include>org/apache/commons/io/filefilter/*.class</include>
- <include>org/apache/commons/io/output/*.class</include>
- <include>org/apache/commons/io/input/*.class</include>
- <include>org/apache/commons/io/function/*.class</include>
+ <include>org/apache/commons/io/**</include>
<include>org/apache/commons/logging/**</include>
<include>org/apache/fop/Version.class</include>
<include>org/apache/fop/accessibility/StructureTreeElement.class</include>
diff --git a/fop-transcoder/pom.xml b/fop-transcoder/pom.xml
index f5f926f4c..ca7006454 100644
--- a/fop-transcoder/pom.xml
+++ b/fop-transcoder/pom.xml
@@ -10,7 +10,7 @@
<parent>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>fop-parent</artifactId>
- <version>2.10.0-SNAPSHOT</version>
+ <version>2.11.0-SNAPSHOT</version>
</parent>
<dependencies>
diff --git a/fop-util/pom.xml b/fop-util/pom.xml
index dfced8806..173cd792d 100644
--- a/fop-util/pom.xml
+++ b/fop-util/pom.xml
@@ -10,7 +10,7 @@
<parent>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>fop-parent</artifactId>
- <version>2.10.0-SNAPSHOT</version>
+ <version>2.11.0-SNAPSHOT</version>
</parent>
<dependencies>
diff --git a/fop/build.xml b/fop/build.xml
index c514c9593..49ae78eda 100644
--- a/fop/build.xml
+++ b/fop/build.xml
@@ -89,8 +89,8 @@ list of possible build targets.
<property name="Name" value="Apache FOP"/>
<property name="name" value="fop"/>
<property name="NAME" value="FOP"/>
- <property name="version" value="2.10.0-SNAPSHOT"/>
- <property name="year" value="1999-2024"/>
+ <property name="version" value="2.11.0-SNAPSHOT"/>
+ <property name="year" value="1999-2025"/>
<property name="javac.debug" value="on"/>
<property name="javac.optimize" value="off"/>
<property name="javac.deprecation" value="on"/>
@@ -696,7 +696,8 @@ list of possible build targets.
<include name="fop-transcoder.jar"/>
</fileset>
</path>
- <junit-run classpath="transcoder-classpath" title="basic functionality for fop-transcoder.jar" testsuite="org.apache.fop.BasicTranscoderTestSuite" outfile="TEST-transcoder"/>
+ <junit-run classpath="transcoder-classpath" title="basic functionality for fop-transcoder.jar"
+ testsuite="org.apache.fop.svg.BasicTranscoderTestSuite" outfile="TEST-transcoder"/>
<echo message="Running basic functionality tests for fop-transcoder-allinone.jar"/>
<!-- These are the same tests as in the block above but testing the "allinone" JAR
instead. Please don't add any additional paths other than the test classes, the
@@ -716,7 +717,7 @@ list of possible build targets.
<include name="batik*.jar"/>
</fileset>
</path>
- <junit-run classpath="transcoder-all-classpath" title="basic functionality for fop-transcoder-allinone.jar" testsuite="org.apache.fop.BasicTranscoderTestSuite" outfile="TEST-transcoder-allinone"/>
+ <junit-run classpath="transcoder-all-classpath" title="basic functionality for fop-transcoder-allinone.jar" testsuite="org.apache.fop.svg.BasicTranscoderTestSuite" outfile="TEST-transcoder-allinone"/>
</target>
<target name="hyphenation-present" depends="junit-compile" if="junit.present">
<condition property="hyphenation.present">
diff --git a/fop/pom.xml b/fop/pom.xml
index 52192b5ee..e992716a6 100644
--- a/fop/pom.xml
+++ b/fop/pom.xml
@@ -10,7 +10,7 @@
<parent>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>fop-parent</artifactId>
- <version>2.10.0-SNAPSHOT</version>
+ <version>2.11.0-SNAPSHOT</version>
</parent>
<dependencies>
diff --git a/fop/releasedist.xml b/fop/releasedist.xml
index 61f89cecf..1af703aae 100644
--- a/fop/releasedist.xml
+++ b/fop/releasedist.xml
@@ -18,7 +18,7 @@
<project basedir="." name="fop">
<property name="name" value="fop"/>
- <property name="version" value="2.10.0-SNAPSHOT"/>
+ <property name="version" value="2.11.0-SNAPSHOT"/>
<property name="dist.bin.dir" value="${basedir}/dist-bin"/>
<property name="dist.src.dir" value="${basedir}/dist-src"/>
<property name="dist.bin.result.dir" value="${dist.bin.dir}/${name}-${version}"/>
diff --git a/fop/test/layoutengine/standard-testcases/flow_changing-ipd_7.xml b/fop/test/layoutengine/standard-testcases/flow_changing-ipd_7.xml
index 9da3cd033..9ad4595c7 100644
--- a/fop/test/layoutengine/standard-testcases/flow_changing-ipd_7.xml
+++ b/fop/test/layoutengine/standard-testcases/flow_changing-ipd_7.xml
@@ -56,7 +56,7 @@
</fo:root>
</fo>
<checks>
- <eval expected="4" xpath="count(//pageViewport)" />
- <eval expected="Call" xpath="//pageViewport[3]//word[1]" />
+ <eval expected="3" xpath="count(//pageViewport)"/>
+ <eval expected="Call" xpath="//pageViewport[2]//word[1]"/>
</checks>
</testcase>
diff --git a/fop/test/layoutengine/standard-testcases/flow_changing-ipd_7_legacy.xml b/fop/test/layoutengine/standard-testcases/flow_changing-ipd_7_legacy.xml
new file mode 100644
index 000000000..6e3f62b2c
--- /dev/null
+++ b/fop/test/layoutengine/standard-testcases/flow_changing-ipd_7_legacy.xml
@@ -0,0 +1,72 @@
+<?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 a list can be relaid out when a change in ipd happens across pages, while using the
+ legacy invalid break position handling.
+ </p>
+ </info>
+ <cfg>
+ <legacy-invalid-break-position>true</legacy-invalid-break-position>
+ </cfg>
+ <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 master-name="PageFront" page-width="8.5in" page-height="11in" margin-bottom="0in"
+ margin-right="0in" margin-top="0in" margin-left="0in">
+ <fo:region-body margin-bottom="1in" margin-right="3.1in" margin-top="4.5in" margin-left="1in"
+ region-name="letterPageBody"/>
+ </fo:simple-page-master>
+ <fo:simple-page-master master-name="PageRest" page-width="8.5in" page-height="11in" margin-bottom="0in"
+ margin-right="0in" margin-top="0in" margin-left="0in">
+ <fo:region-body margin-bottom="1in" margin-right="1in" margin-top="1in" margin-left="1in"
+ region-name="letterPageBody"/>
+ </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_sequence6" initial-page-number="auto"
+ master-reference="LetterPages">
+ <fo:flow flow-name="letterPageBody">
+ <fo:block>
+ <fo:block>
+ <fo:inline>
+ <fo:leader/>
+ <fo:block break-before="page"/>Call if you need us
+ </fo:inline>
+ </fo:block>
+ <fo:block>
+ <fo:block break-before="page"/>
+ </fo:block>
+ </fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+ </fo:root>
+ </fo>
+ <checks>
+ <eval expected="4" xpath="count(//pageViewport)"/>
+ <eval expected="Call" xpath="//pageViewport[3]//word[1]"/>
+ </checks>
+</testcase>
diff --git a/fop/test/layoutengine/standard-testcases/flow_changing-ipd_invalid-position.xml b/fop/test/layoutengine/standard-testcases/flow_changing-ipd_invalid-position.xml
new file mode 100644
index 000000000..af5adc44a
--- /dev/null
+++ b/fop/test/layoutengine/standard-testcases/flow_changing-ipd_invalid-position.xml
@@ -0,0 +1,74 @@
+<?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 an invalid break position does not cause pages to be duplicated.
+ </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-bottom="8mm" master-name="PageFront" page-width="210mm"
+ page-height="297mm" margin-right="20mm" margin-top="15mm" margin-left="20mm">
+ <fo:region-body margin-right="58mm" margin-top="35mm" margin-bottom="20mm" margin-left="0mm"
+ region-name="PageBody"/>
+ </fo:simple-page-master>
+ <fo:simple-page-master margin-bottom="8mm" master-name="PageRest" page-width="210mm" page-height="297mm"
+ margin-right="20mm" margin-top="15mm" margin-left="20mm">
+ <fo:region-body margin-bottom="0mm" margin-top="0mm" margin-right="0mm" margin-left="0mm"
+ region-name="PageBody"/>
+ </fo:simple-page-master>
+ <fo:simple-page-master margin-bottom="8mm" master-name="PageLast" page-width="210mm" page-height="297mm"
+ margin-right="20mm" margin-top="15mm" margin-left="20mm">
+ <fo:region-body margin-bottom="0mm" margin-top="0mm" margin-right="0mm" margin-left="0mm"
+ region-name="PageBody"/>
+ </fo:simple-page-master>
+ <fo:page-sequence-master master-name="LetterPages">
+ <fo:repeatable-page-master-alternatives>
+ <fo:conditional-page-master-reference page-position="rest" master-reference="PageFront"/>
+ <fo:conditional-page-master-reference page-position="first" master-reference="PageRest"/>
+ <fo:conditional-page-master-reference page-position="last" master-reference="PageLast"/>
+ </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">
+ <fo:flow flow-name="PageBody">
+ <fo:block page-break-after="always">test</fo:block>
+ <fo:block line-height="210mm">test2</fo:block>
+ <fo:block font-size="9pt" line-height="11pt">
+ <fo:inline>Step 2 – Finance
+ <fo:block/>
+ </fo:inline>
+ If there is any Hire Purchase (HP) / Finance agreement associated with this vehicle, please
+ contact the finance company to provide your authorisation for Bank Box to liaise with them in
+ order to obtain the early settlement figure.
+ </fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+ </fo:root>
+ </fo>
+ <checks>
+ <eval expected="3" xpath="count(//pageViewport)"/>
+ <eval expected="test" xpath="//pageViewport[1]//lineArea[1]//text[1]/word[1]"/>
+ <eval expected="test2" xpath="//pageViewport[2]//lineArea[1]//text[1]/word[1]"/>
+ <eval expected="Step 2 – Finance" xpath="//pageViewport[2]//block[2]//lineArea[1]"/>
+ <eval expected="If" xpath="//pageViewport[3]//lineArea[1]//text[1]/word[1]"/>
+ </checks>
+</testcase>
diff --git a/fop/test/layoutengine/standard-testcases/flow_changing-ipd_invalid-position_1.xml b/fop/test/layoutengine/standard-testcases/flow_changing-ipd_invalid-position_1.xml
new file mode 100644
index 000000000..468808186
--- /dev/null
+++ b/fop/test/layoutengine/standard-testcases/flow_changing-ipd_invalid-position_1.xml
@@ -0,0 +1,75 @@
+<?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 a non empty block inside an inline does not cause a NPE.
+ </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-bottom="8mm" master-name="PageFront" page-width="210mm"
+ page-height="297mm" margin-right="20mm" margin-top="15mm" margin-left="20mm">
+ <fo:region-body margin-right="58mm" margin-top="35mm" margin-bottom="20mm" margin-left="0mm"
+ region-name="PageBody"/>
+ </fo:simple-page-master>
+ <fo:simple-page-master margin-bottom="8mm" master-name="PageRest" page-width="210mm" page-height="297mm"
+ margin-right="20mm" margin-top="15mm" margin-left="20mm">
+ <fo:region-body margin-bottom="0mm" margin-top="0mm" margin-right="0mm" margin-left="0mm"
+ region-name="PageBody"/>
+ </fo:simple-page-master>
+ <fo:simple-page-master margin-bottom="8mm" master-name="PageLast" page-width="210mm" page-height="297mm"
+ margin-right="20mm" margin-top="15mm" margin-left="20mm">
+ <fo:region-body margin-bottom="0mm" margin-top="0mm" margin-right="0mm" margin-left="0mm"
+ region-name="PageBody"/>
+ </fo:simple-page-master>
+ <fo:page-sequence-master master-name="LetterPages">
+ <fo:repeatable-page-master-alternatives>
+ <fo:conditional-page-master-reference page-position="rest" master-reference="PageFront"/>
+ <fo:conditional-page-master-reference page-position="first" master-reference="PageRest"/>
+ <fo:conditional-page-master-reference page-position="last" master-reference="PageLast"/>
+ </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">
+ <fo:flow flow-name="PageBody">
+ <fo:block page-break-after="always">test</fo:block>
+ <fo:block line-height="210mm">test2</fo:block>
+ <fo:block font-size="9pt" line-height="11pt">
+ <fo:inline>Step 2 – Finance
+ <fo:block>non empty block</fo:block>
+ </fo:inline>
+ If there is any Hire Purchase (HP) / Finance agreement associated with this vehicle, please
+ contact the finance company to provide your authorisation for Bank Box to liaise with them in
+ order to obtain the early settlement figure.
+ </fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+ </fo:root>
+ </fo>
+ <checks>
+ <eval expected="3" xpath="count(//pageViewport)"/>
+ <eval expected="test" xpath="//pageViewport[1]//lineArea[1]//text[1]/word[1]"/>
+ <eval expected="test2" xpath="//pageViewport[2]//lineArea[1]//text[1]/word[1]"/>
+ <eval expected="Step 2 – Finance" xpath="//pageViewport[2]//block[2]//lineArea[1]"/>
+ <eval expected="non empty block" xpath="//pageViewport[2]//block[2]//lineArea[2]"/>
+ <eval expected="If" xpath="//pageViewport[3]//lineArea[1]//text[1]/word[1]"/>
+ </checks>
+</testcase>
diff --git a/fop/test/layoutengine/standard-testcases/flow_changing-ipd_last-page_15.xml b/fop/test/layoutengine/standard-testcases/flow_changing-ipd_last-page_15.xml
index 6640fdb42..73f2658a7 100755
--- a/fop/test/layoutengine/standard-testcases/flow_changing-ipd_last-page_15.xml
+++ b/fop/test/layoutengine/standard-testcases/flow_changing-ipd_last-page_15.xml
@@ -55,7 +55,8 @@
</fo>
<checks>
<eval expected="test" xpath="//pageViewport[1]//lineArea[1]//text[1]/word[1]"/>
- <eval expected="Step" xpath="//pageViewport[2]//lineArea[1]//text[1]/word[1]"/>
+ <eval expected="Step 2 – Finance" xpath="//pageViewport[1]//block[2]//lineArea[1]"/>
+ <eval expected="If" xpath="//pageViewport[2]//lineArea[1]//text[1]/word[1]"/>
<eval expected="2" xpath="count(//pageViewport)"/>
</checks>
</testcase>
diff --git a/fop/test/layoutengine/standard-testcases/page-sequence_two-column_last-page_7.xml b/fop/test/layoutengine/standard-testcases/page-sequence_two-column_last-page_7.xml
new file mode 100644
index 000000000..ca07447b9
--- /dev/null
+++ b/fop/test/layoutengine/standard-testcases/page-sequence_two-column_last-page_7.xml
@@ -0,0 +1,1465 @@
+<?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>
+ Test case: last content spans all columns and does not fit on last page, and there is not even
+ space left to fit any part of it after switching to last-page master.
+ </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="0.5in" margin-left="0.5in" margin-top="0.35in" margin-bottom="0.25in" master-name="PageFirst" page-width="8.5in" page-height="11in">
+ <fo:region-body margin-top="0.85in" column-count="2" column-gap="0.3in" margin-bottom="1in" region-name="PageBody"/>
+ </fo:simple-page-master>
+ <fo:simple-page-master master-name="PageRestEven" margin-right="0.5in" margin-left="0.5in" margin-top="0.35in" margin-bottom="0.25in" page-width="8.5in" page-height="11in">
+ <fo:region-body margin-top="0.5in" column-gap="0.3in" column-count="2" margin-bottom="1in" region-name="PageBody"/>
+ </fo:simple-page-master>
+ <fo:simple-page-master master-name="PageRestOdd" margin-right="0.5in" margin-left="0.5in" margin-top="0.35in" margin-bottom="0.25in" page-width="8.5in" page-height="11in">
+ <fo:region-body margin-top="0.5in" column-gap="0.3in" column-count="2" margin-bottom="1in" region-name="PageBody"/>
+ </fo:simple-page-master>
+ <fo:simple-page-master master-name="PageLastEven" page-width="8.5in" page-height="11in" margin-bottom="0.25in" margin-right="0.5in" margin-top="0.35in" margin-left="0.5in">
+ <fo:region-body margin-top="0.5in" column-gap="0.3in" column-count="2" margin-bottom="2.5in" region-name="PageBody" background-color="yellow"/>
+ </fo:simple-page-master>
+ <fo:simple-page-master master-name="PageLastOdd" page-width="8.5in" page-height="11in" margin-bottom="0.25in" margin-right="0.5in" margin-top="0.35in" margin-left="0.5in">
+ <fo:region-body margin-top="0.5in" column-gap="0.3in" column-count="2" margin-bottom="2.5in" region-name="PageBody" background-color="gray"/>
+ </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="PageFirst"/>
+ <fo:conditional-page-master-reference odd-or-even="odd" page-position="rest" master-reference="PageRestOdd"/>
+ <fo:conditional-page-master-reference odd-or-even="even" page-position="rest" master-reference="PageRestEven"/>
+ <fo:conditional-page-master-reference odd-or-even="even" page-position="last" master-reference="PageLastEven"/>
+ <fo:conditional-page-master-reference odd-or-even="odd" page-position="last" master-reference="PageLastOdd"/>
+ </fo:repeatable-page-master-alternatives>
+ </fo:page-sequence-master>
+ </fo:layout-master-set>
+ <fo:page-sequence format="1" id="th_default_sequence1" initial-page-number="auto" force-page-count="auto" master-reference="LetterPages">
+ <fo:flow flow-name="PageBody">
+ <fo:block-container span="all">
+ <fo:block>
+ <fo:block font-size="16pt" line-height="17pt" text-align="center">
+ <fo:inline font-weight="bold">LOSS PAYABLE PROVISIONS</fo:inline>
+ </fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:leader/>
+ </fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:leader/>
+ </fo:block>
+ <fo:block font-size="10pt" line-height="11pt">This endorsement modifies insurance provided under the following:</fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:leader/>
+ </fo:block>
+ <fo:block font-size="10pt" line-height="11pt" margin-left="0.25in" text-align="left">BUILDERS' RISK COVERAGE FORM<fo:block/>BUILDING AND PERSONAL PROPERTY COVERAGE FORM<fo:block/>CONDOMINIUM ASSOCIATION COVERAGE FORM<fo:block/>CONDOMINIUM COMMERCIAL UNIT-OWNERS COVERAGE FORM<fo:block/>STANDARD PROPERTY POLICY</fo:block>
+ <fo:block font-size="10pt" line-height="11pt" margin-left="0.25in">
+ <fo:leader/>
+ </fo:block>
+ </fo:block>
+ </fo:block-container>
+ <fo:block-container>
+ <fo:block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" font-weight="bold">
+ <fo:block>A.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" text-align="justify" start-indent="0.25in" space-after="4pt">
+ <fo:block>When this endorsement is attached to the Standard Property Policy <fo:inline font-weight="bold">CP 00 99,</fo:inline> the term Coverage Part in this endorsement is replaced by the term Policy. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" font-weight="bold">
+ <fo:block>B.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" text-align="justify" start-indent="0.25in" space-after="4pt">
+ <fo:block>Nothing in this endorsement increases the applicable Limit of Insurance. We will not pay any Loss Payee more than their financial interest in the Covered Property, and we will not pay more than the applicable Limit of Insurance on the Covered Property.</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" font-weight="bold">
+ <fo:block>C.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" text-align="justify" start-indent="0.25in" space-after="4pt">
+ <fo:block>The following is added to the<fo:inline font-weight="bold"> Loss Payment</fo:inline> Loss Condition, as indicated in the Declarations or in the Schedule:</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" font-weight="bold" start-indent="0.25in">
+ <fo:block>1.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" text-align="justify" start-indent="0.5in">
+ <fo:block>
+ <fo:inline font-weight="bold">Loss Payable Clause</fo:inline>
+ </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:block font-size="10pt" line-height="10pt" margin-left="0.5in">For Covered Property in which both you and a Loss Payee shown in the Schedule or in the Declarations have an insurable interest, we will: </fo:block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" font-weight="bold" start-indent="0.5in">
+ <fo:block>a.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" text-align="justify" start-indent="0.75in">
+ <fo:block>Adjust losses with you; and</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" font-weight="bold" start-indent="0.5in">
+ <fo:block>b.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" text-align="justify" start-indent="0.75in">
+ <fo:block>Pay any claim for loss or damage jointly to you and the Loss Payee, as<fo:inline font-weight="bold"> </fo:inline>interests may appear</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" font-weight="bold" start-indent="0.25in">
+ <fo:block>2.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" text-align="justify" start-indent="0.5in">
+ <fo:block>
+ <fo:inline font-weight="bold">Lender's Loss Payable Clause</fo:inline>
+ </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" font-weight="bold" start-indent="0.5in">
+ <fo:block>a.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" text-align="justify" start-indent="0.75in">
+ <fo:block>The Loss Payee shown in the Schedule or in the Declarations is a creditor, including a mortgageholder or trustee, whose interest in Covered Property is established by such written instruments as<fo:inline font-weight="bold">:</fo:inline>
+ </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" font-weight="bold" start-indent="0.75in">
+ <fo:block>(1)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" text-align="justify" start-indent="1in">
+ <fo:block>Warehouse receipts; </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" font-weight="bold" start-indent="0.75in">
+ <fo:block>(2)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" text-align="justify" start-indent="1in">
+ <fo:block>A contract for deed;</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" font-weight="bold" start-indent="0.75in">
+ <fo:block>(3)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" text-align="justify" start-indent="1in">
+ <fo:block>Bills of lading; </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" font-weight="bold" start-indent="0.75in">
+ <fo:block>(4)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" text-align="justify" start-indent="1in">
+ <fo:block>Financing statements; or </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" font-weight="bold" start-indent="0.75in">
+ <fo:block>(5)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" text-align="justify" start-indent="1in">
+ <fo:block>Mortgages, deeds of trust, or security agreements. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" font-weight="bold" start-indent="0.5in">
+ <fo:block>b.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" text-align="justify" start-indent="0.75in">
+ <fo:block>For Covered Property in which both you and a Loss Payee have an insurable interest<fo:inline font-weight="bold">:</fo:inline>
+ </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" font-weight="bold" start-indent="0.75in">
+ <fo:block>(1)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" text-align="justify" start-indent="1in">
+ <fo:block>We will pay for covered loss or damage to each Loss Payee in their order of precedence, as interests may appear. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" font-weight="bold" start-indent="0.75in">
+ <fo:block>(2)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" text-align="justify" start-indent="1in">
+ <fo:block>The Loss Payee has the right to receive loss payment even if the Loss Payee has started foreclosure or similar action on the Covered Property. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" font-weight="bold" start-indent="0.75in">
+ <fo:block>(3)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" text-align="justify" start-indent="1in">
+ <fo:block>If we deny your claim because of your acts or because you have failed to comply with the terms of the Coverage Part, the Loss Payee will still have the right to receive loss payment if the Loss Payee:</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" font-weight="bold" start-indent="1in">
+ <fo:block>(a)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" text-align="justify" start-indent="1.25in">
+ <fo:block>Pays any premium due under this Coverage Part at our request if you have failed to do so; </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" font-weight="bold" start-indent="1in">
+ <fo:block>(b)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" text-align="justify" start-indent="1.25in">
+ <fo:block>Submits a signed, sworn proof of loss within 60 days after receiving notice from us of your failure to do so; and </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" font-weight="bold" start-indent="1in">
+ <fo:block>(c)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" text-align="justify" start-indent="1.25in">
+ <fo:block>Has notified us of any change in ownership, occupancy or substantial change in risk known to the Loss Payee. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:block font-size="10pt" line-height="10pt" margin-left="1in">All of the terms of this Coverage Part will then apply directly to the Loss Payee. </fo:block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" font-weight="bold" start-indent="0.75in">
+ <fo:block>(4)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" text-align="justify" start-indent="1in">
+ <fo:block>If we pay the Loss Payee for any loss or damage and deny payment to you because of your acts or because you have failed to comply with the terms of this Coverage Part:</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" font-weight="bold" start-indent="1in">
+ <fo:block>(a)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" text-align="justify" start-indent="1.25in">
+ <fo:block>The Loss Payee's rights will be transferred to us to the extent of the amount we pay; and </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" font-weight="bold" start-indent="1in">
+ <fo:block>(b)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" text-align="justify" start-indent="1.25in">
+ <fo:block>The Loss Payee's rights to recover the full amount of the Loss Payee's claim will not be impaired. At our option, we may pay to the Loss Payee the whole principal on the debt plus any accrued interest. In this event, you will pay your remaining debt to us. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" font-weight="bold" start-indent="0.5in">
+ <fo:block>c.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" text-align="justify" start-indent="0.75in">
+ <fo:block>If we cancel this policy, we will give written notice to the Loss Payee at least: </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" font-weight="bold" start-indent="0.75in">
+ <fo:block>(1)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" text-align="justify" start-indent="1in">
+ <fo:block>10 days before the effective date of cancellation if we cancel for your nonpayment of premium; or </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" font-weight="bold" start-indent="0.75in">
+ <fo:block>(2)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" text-align="justify" start-indent="1in">
+ <fo:block>30 days before the effective date of cancellation if we cancel for any other reason. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" font-weight="bold" start-indent="0.5in">
+ <fo:block>d.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" text-align="justify" start-indent="0.75in">
+ <fo:block>If we elect not to renew this policy, we will give written notice to the Loss Payee at least 10 days before the expiration date of this policy. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" font-weight="bold" start-indent="0.25in">
+ <fo:block>3.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" text-align="justify" start-indent="0.5in">
+ <fo:block>
+ <fo:inline font-weight="bold">Contract Of Sale Clause</fo:inline>
+ </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" font-weight="bold" start-indent="0.5in">
+ <fo:block>a.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" text-align="justify" start-indent="0.75in">
+ <fo:block>The Loss Payee shown in the Schedule or in the Declarations is a person or organization you have entered into a contract with for the sale of Covered Property. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" font-weight="bold" start-indent="0.5in">
+ <fo:block>b.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" text-align="justify" start-indent="0.75in">
+ <fo:block>For Covered Property in which both you and the Loss Payee have an insurable interest, we will: </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" font-weight="bold" start-indent="0.75in">
+ <fo:block>(1)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" text-align="justify" start-indent="1in">
+ <fo:block>Adjust losses with you; and </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" font-weight="bold" start-indent="0.75in">
+ <fo:block>(2)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" text-align="justify" start-indent="1in">
+ <fo:block>Pay any claim for loss or damage jointly to you and the Loss Payee, as interests may appear.</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" font-weight="bold" start-indent="0.5in">
+ <fo:block>c.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" text-align="justify" start-indent="0.75in">
+ <fo:block>The following is added to the <fo:inline font-weight="bold">Other Insurance</fo:inline> Condition: </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:block font-size="10pt" line-height="10pt" margin-left="0.5in" fox:tab-stops="end space 24pt start space 30pt" text-align="left">
+ <fo:inline font-weight="bold">For Covered Property that is the subject of a contract of sale, the word "you" includes the Loss Payee</fo:inline>.</fo:block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" font-weight="bold" start-indent="0.25in">
+ <fo:block>4.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" text-align="justify" start-indent="0.5in">
+ <fo:block>
+ <fo:inline font-weight="bold">Building Owner Loss Payable Clause</fo:inline>
+ </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" font-weight="bold" start-indent="0.5in">
+ <fo:block>a.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" text-align="justify" start-indent="0.75in">
+ <fo:block>The Loss Payee shown in the Schedule or in the Declarations is the owner of the described building in which you are a tenant. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" font-weight="bold" start-indent="0.5in">
+ <fo:block>b.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" text-align="justify" start-indent="0.75in">
+ <fo:block>We will adjust losses to the described building with the Loss Payee. Any loss payment made to the Loss Payee will satisfy your claims against us for the owner's property. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" font-weight="bold" start-indent="0.5in">
+ <fo:block>c.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" text-align="justify" start-indent="0.75in">
+ <fo:block>We will adjust losses to tenants' improvements and betterments with you, unless the lease provides otherwise.</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:leader/>
+ </fo:block>
+ </fo:block>
+ </fo:block-container>
+ <fo:block-container span="all">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:leader/>
+ </fo:block>
+ <fo:table border-collapse="separate" table-layout="fixed" width="100%">
+ <fo:table-column column-width="proportional-column-width(100)" column-number="1"/>
+ <fo:table-body>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px">
+ <fo:block>
+ <fo:block text-align="center">
+ <fo:inline font-weight="bold">SCHEDULE</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:leader/>
+ </fo:block>
+ <fo:table border-collapse="separate" table-layout="fixed" width="100%">
+ <fo:table-column column-width="proportional-column-width(23.45)" column-number="1"/>
+ <fo:table-column column-width="proportional-column-width(9.88333333333333)" column-number="2"/>
+ <fo:table-column column-width="proportional-column-width(24.22)" column-number="3"/>
+ <fo:table-column column-width="proportional-column-width(9.11333333333334)" column-number="4"/>
+ <fo:table-column column-width="proportional-column-width(24.61)" column-number="5"/>
+ <fo:table-column column-width="proportional-column-width(8.72333333333333)" column-number="6"/>
+ <fo:table-body>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-left-style="solid" border-right-width="1pt" border-left-color="black" border-top-color="black" border-right-color="black" border-left-width="1pt" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Location Number:</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">1</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Building Number:</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">10</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Applicable Clause<fo:block/>(Enter C.1., C.2., C.3., or C.4.):</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">PreviousEmployer</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="2" border-top-width="1pt" border-left-style="solid" border-left-color="black" border-top-color="black" border-left-width="1pt" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Description Of Property:</fo:inline>
+ </fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:leader/>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="4" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:leader/>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="2" border-left-style="solid" border-left-color="black" border-left-width="1pt">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Loss Payee Name:</fo:inline>
+ </fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:leader/>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="4" border-right-style="solid" border-right-width="1pt" border-right-color="black">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">John Bacon</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="2" border-left-style="solid" border-left-color="black" border-left-width="1pt">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Loss Payee Address:</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="4" border-right-style="solid" border-right-width="1pt" border-right-color="black">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">jbacon@a.com</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:table border-collapse="separate" table-layout="fixed" width="100%">
+ <fo:table-column column-width="proportional-column-width(23.45)" column-number="1"/>
+ <fo:table-column column-width="proportional-column-width(9.88333333333333)" column-number="2"/>
+ <fo:table-column column-width="proportional-column-width(24.22)" column-number="3"/>
+ <fo:table-column column-width="proportional-column-width(9.11333333333334)" column-number="4"/>
+ <fo:table-column column-width="proportional-column-width(24.61)" column-number="5"/>
+ <fo:table-column column-width="proportional-column-width(8.72333333333333)" column-number="6"/>
+ <fo:table-body>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-left-style="solid" border-right-width="1pt" border-left-color="black" border-top-color="black" border-right-color="black" border-left-width="1pt" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Location Number:</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">2</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Building Number:</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">10</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Applicable Clause<fo:block/>(Enter C.1., C.2., C.3., or C.4.):</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">Personal</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="2" border-top-width="1pt" border-left-style="solid" border-left-color="black" border-top-color="black" border-left-width="1pt" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Description Of Property:</fo:inline>
+ </fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:leader/>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="4" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:leader/>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="2" border-left-style="solid" border-left-color="black" border-left-width="1pt">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Loss Payee Name:</fo:inline>
+ </fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:leader/>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="4" border-right-style="solid" border-right-width="1pt" border-right-color="black">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">Sarah S</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="2" border-left-style="solid" border-left-color="black" border-left-width="1pt">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Loss Payee Address:</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="4" border-right-style="solid" border-right-width="1pt" border-right-color="black">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">s@hotmail.com</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:table border-collapse="separate" table-layout="fixed" width="100%">
+ <fo:table-column column-width="proportional-column-width(23.45)" column-number="1"/>
+ <fo:table-column column-width="proportional-column-width(9.88333333333333)" column-number="2"/>
+ <fo:table-column column-width="proportional-column-width(24.22)" column-number="3"/>
+ <fo:table-column column-width="proportional-column-width(9.11333333333334)" column-number="4"/>
+ <fo:table-column column-width="proportional-column-width(24.61)" column-number="5"/>
+ <fo:table-column column-width="proportional-column-width(8.72333333333333)" column-number="6"/>
+ <fo:table-body>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-left-style="solid" border-right-width="1pt" border-left-color="black" border-top-color="black" border-right-color="black" border-left-width="1pt" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Location Number:</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">3</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Building Number:</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">10</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Applicable Clause<fo:block/>(Enter C.1., C.2., C.3., or C.4.):</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">PreviousEmployer</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="2" border-top-width="1pt" border-left-style="solid" border-left-color="black" border-top-color="black" border-left-width="1pt" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Description Of Property:</fo:inline>
+ </fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:leader/>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="4" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:leader/>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="2" border-left-style="solid" border-left-color="black" border-left-width="1pt">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Loss Payee Name:</fo:inline>
+ </fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:leader/>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="4" border-right-style="solid" border-right-width="1pt" border-right-color="black">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">John Bacon</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="2" border-left-style="solid" border-left-color="black" border-left-width="1pt">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Loss Payee Address:</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="4" border-right-style="solid" border-right-width="1pt" border-right-color="black">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">jbacon@a.com</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:table border-collapse="separate" table-layout="fixed" width="100%">
+ <fo:table-column column-width="proportional-column-width(23.45)" column-number="1"/>
+ <fo:table-column column-width="proportional-column-width(9.88333333333333)" column-number="2"/>
+ <fo:table-column column-width="proportional-column-width(24.22)" column-number="3"/>
+ <fo:table-column column-width="proportional-column-width(9.11333333333334)" column-number="4"/>
+ <fo:table-column column-width="proportional-column-width(24.61)" column-number="5"/>
+ <fo:table-column column-width="proportional-column-width(8.72333333333333)" column-number="6"/>
+ <fo:table-body>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-left-style="solid" border-right-width="1pt" border-left-color="black" border-top-color="black" border-right-color="black" border-left-width="1pt" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Location Number:</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">4</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Building Number:</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">10</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Applicable Clause<fo:block/>(Enter C.1., C.2., C.3., or C.4.):</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">Personal</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="2" border-top-width="1pt" border-left-style="solid" border-left-color="black" border-top-color="black" border-left-width="1pt" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Description Of Property:</fo:inline>
+ </fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:leader/>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="4" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:leader/>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="2" border-left-style="solid" border-left-color="black" border-left-width="1pt">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Loss Payee Name:</fo:inline>
+ </fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:leader/>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="4" border-right-style="solid" border-right-width="1pt" border-right-color="black">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">Sarah S</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="2" border-left-style="solid" border-left-color="black" border-left-width="1pt">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Loss Payee Address:</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="4" border-right-style="solid" border-right-width="1pt" border-right-color="black">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">s@hotmail.com</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:table border-collapse="separate" table-layout="fixed" width="100%">
+ <fo:table-column column-width="proportional-column-width(23.45)" column-number="1"/>
+ <fo:table-column column-width="proportional-column-width(9.88333333333333)" column-number="2"/>
+ <fo:table-column column-width="proportional-column-width(24.22)" column-number="3"/>
+ <fo:table-column column-width="proportional-column-width(9.11333333333334)" column-number="4"/>
+ <fo:table-column column-width="proportional-column-width(24.61)" column-number="5"/>
+ <fo:table-column column-width="proportional-column-width(8.72333333333333)" column-number="6"/>
+ <fo:table-body>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-left-style="solid" border-right-width="1pt" border-left-color="black" border-top-color="black" border-right-color="black" border-left-width="1pt" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Location Number:</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">5</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Building Number:</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">10</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Applicable Clause<fo:block/>(Enter C.1., C.2., C.3., or C.4.):</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">PreviousEmployer</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="2" border-top-width="1pt" border-left-style="solid" border-left-color="black" border-top-color="black" border-left-width="1pt" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Description Of Property:</fo:inline>
+ </fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:leader/>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="4" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:leader/>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="2" border-left-style="solid" border-left-color="black" border-left-width="1pt">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Loss Payee Name:</fo:inline>
+ </fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:leader/>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="4" border-right-style="solid" border-right-width="1pt" border-right-color="black">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">John Bacon</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="2" border-left-style="solid" border-left-color="black" border-left-width="1pt">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Loss Payee Address:</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="4" border-right-style="solid" border-right-width="1pt" border-right-color="black">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">jbacon@a.com</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:table border-collapse="separate" table-layout="fixed" width="100%">
+ <fo:table-column column-width="proportional-column-width(23.45)" column-number="1"/>
+ <fo:table-column column-width="proportional-column-width(9.88333333333333)" column-number="2"/>
+ <fo:table-column column-width="proportional-column-width(24.22)" column-number="3"/>
+ <fo:table-column column-width="proportional-column-width(9.11333333333334)" column-number="4"/>
+ <fo:table-column column-width="proportional-column-width(24.61)" column-number="5"/>
+ <fo:table-column column-width="proportional-column-width(8.72333333333333)" column-number="6"/>
+ <fo:table-body>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-left-style="solid" border-right-width="1pt" border-left-color="black" border-top-color="black" border-right-color="black" border-left-width="1pt" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Location Number:</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">6</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Building Number:</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">10</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Applicable Clause<fo:block/>(Enter C.1., C.2., C.3., or C.4.):</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">Personal</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="2" border-top-width="1pt" border-left-style="solid" border-left-color="black" border-top-color="black" border-left-width="1pt" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Description Of Property:</fo:inline>
+ </fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:leader/>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="4" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:leader/>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="2" border-left-style="solid" border-left-color="black" border-left-width="1pt">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Loss Payee Name:</fo:inline>
+ </fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:leader/>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="4" border-right-style="solid" border-right-width="1pt" border-right-color="black">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">Sarah S</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="2" border-left-style="solid" border-left-color="black" border-left-width="1pt">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Loss Payee Address:</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="4" border-right-style="solid" border-right-width="1pt" border-right-color="black">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">s@hotmail.com</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:table border-collapse="separate" table-layout="fixed" width="100%">
+ <fo:table-column column-width="proportional-column-width(23.45)" column-number="1"/>
+ <fo:table-column column-width="proportional-column-width(9.88333333333333)" column-number="2"/>
+ <fo:table-column column-width="proportional-column-width(24.22)" column-number="3"/>
+ <fo:table-column column-width="proportional-column-width(9.11333333333334)" column-number="4"/>
+ <fo:table-column column-width="proportional-column-width(24.61)" column-number="5"/>
+ <fo:table-column column-width="proportional-column-width(8.72333333333333)" column-number="6"/>
+ <fo:table-body>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-left-style="solid" border-right-width="1pt" border-left-color="black" border-top-color="black" border-right-color="black" border-left-width="1pt" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Location Number:</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">7</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Building Number:</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">10</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Applicable Clause<fo:block/>(Enter C.1., C.2., C.3., or C.4.):</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">PreviousEmployer</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="2" border-top-width="1pt" border-left-style="solid" border-left-color="black" border-top-color="black" border-left-width="1pt" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Description Of Property:</fo:inline>
+ </fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:leader/>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="4" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:leader/>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="2" border-left-style="solid" border-left-color="black" border-left-width="1pt">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Loss Payee Name:</fo:inline>
+ </fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:leader/>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="4" border-right-style="solid" border-right-width="1pt" border-right-color="black">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">John Bacon</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="2" border-left-style="solid" border-left-color="black" border-left-width="1pt">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Loss Payee Address:</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="4" border-right-style="solid" border-right-width="1pt" border-right-color="black">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">jbacon@a.com</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:table border-collapse="separate" table-layout="fixed" width="100%">
+ <fo:table-column column-width="proportional-column-width(23.45)" column-number="1"/>
+ <fo:table-column column-width="proportional-column-width(9.88333333333333)" column-number="2"/>
+ <fo:table-column column-width="proportional-column-width(24.22)" column-number="3"/>
+ <fo:table-column column-width="proportional-column-width(9.11333333333334)" column-number="4"/>
+ <fo:table-column column-width="proportional-column-width(24.61)" column-number="5"/>
+ <fo:table-column column-width="proportional-column-width(8.72333333333333)" column-number="6"/>
+ <fo:table-body>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-left-style="solid" border-right-width="1pt" border-left-color="black" border-top-color="black" border-right-color="black" border-left-width="1pt" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Location Number:</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">8</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Building Number:</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">10</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Applicable Clause<fo:block/>(Enter C.1., C.2., C.3., or C.4.):</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">Personal</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="2" border-top-width="1pt" border-left-style="solid" border-left-color="black" border-top-color="black" border-left-width="1pt" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Description Of Property:</fo:inline>
+ </fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:leader/>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="4" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:leader/>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="2" border-left-style="solid" border-left-color="black" border-left-width="1pt">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Loss Payee Name:</fo:inline>
+ </fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:leader/>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="4" border-right-style="solid" border-right-width="1pt" border-right-color="black">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">Sarah S</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="2" border-left-style="solid" border-left-color="black" border-left-width="1pt">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Loss Payee Address:</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="4" border-right-style="solid" border-right-width="1pt" border-right-color="black">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">s@hotmail.com</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:table border-collapse="separate" table-layout="fixed" width="100%">
+ <fo:table-column column-width="proportional-column-width(23.45)" column-number="1"/>
+ <fo:table-column column-width="proportional-column-width(9.88333333333333)" column-number="2"/>
+ <fo:table-column column-width="proportional-column-width(24.22)" column-number="3"/>
+ <fo:table-column column-width="proportional-column-width(9.11333333333334)" column-number="4"/>
+ <fo:table-column column-width="proportional-column-width(24.61)" column-number="5"/>
+ <fo:table-column column-width="proportional-column-width(8.72333333333333)" column-number="6"/>
+ <fo:table-body>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-left-style="solid" border-right-width="1pt" border-left-color="black" border-top-color="black" border-right-color="black" border-left-width="1pt" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Location Number:</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">9</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Building Number:</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">10</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Applicable Clause<fo:block/>(Enter C.1., C.2., C.3., or C.4.):</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">PreviousEmployer</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="2" border-top-width="1pt" border-left-style="solid" border-left-color="black" border-top-color="black" border-left-width="1pt" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Description Of Property:</fo:inline>
+ </fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:leader/>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="4" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:leader/>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="2" border-left-style="solid" border-left-color="black" border-left-width="1pt">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Loss Payee Name:</fo:inline>
+ </fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:leader/>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="4" border-right-style="solid" border-right-width="1pt" border-right-color="black">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">John Bacon</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="2" border-left-style="solid" border-left-color="black" border-left-width="1pt">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Loss Payee Address:</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="4" border-right-style="solid" border-right-width="1pt" border-right-color="black">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">jbacon@a.com</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:table border-collapse="separate" table-layout="fixed" width="100%">
+ <fo:table-column column-width="proportional-column-width(23.45)" column-number="1"/>
+ <fo:table-column column-width="proportional-column-width(9.88333333333333)" column-number="2"/>
+ <fo:table-column column-width="proportional-column-width(24.22)" column-number="3"/>
+ <fo:table-column column-width="proportional-column-width(9.11333333333334)" column-number="4"/>
+ <fo:table-column column-width="proportional-column-width(24.61)" column-number="5"/>
+ <fo:table-column column-width="proportional-column-width(8.72333333333333)" column-number="6"/>
+ <fo:table-body>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-left-style="solid" border-right-width="1pt" border-left-color="black" border-top-color="black" border-right-color="black" border-left-width="1pt" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Location Number:</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">10</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Building Number:</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">10</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Applicable Clause<fo:block/>(Enter C.1., C.2., C.3., or C.4.):</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">Personal</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="2" border-top-width="1pt" border-left-style="solid" border-left-color="black" border-top-color="black" border-left-width="1pt" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Description Of Property:</fo:inline>
+ </fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:leader/>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="4" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:leader/>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="2" border-left-style="solid" border-left-color="black" border-left-width="1pt">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Loss Payee Name:</fo:inline>
+ </fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:leader/>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="4" border-right-style="solid" border-right-width="1pt" border-right-color="black">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">Sarah S</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="2" border-left-style="solid" border-left-color="black" border-left-width="1pt">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline font-weight="bold">Loss Payee Address:</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" number-columns-spanned="4" border-right-style="solid" border-right-width="1pt" border-right-color="black">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">s@hotmail.com</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:table border-collapse="separate" table-layout="fixed" width="100%">
+ <fo:table-column column-width="proportional-column-width(100)" column-number="1"/>
+ <fo:table-body>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" border-collapse="collapse" padding="5px" border-right-style="solid" border-bottom-color="black" border-top-width="1pt" border-left-style="solid" border-right-width="1pt" border-bottom-width="1pt" border-left-color="black" border-top-color="black" border-bottom-style="solid" border-right-color="black" border-left-width="1pt" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">Information required to complete this Schedule, if not shown above, will be shown in the Declarations.</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ </fo:block>
+ </fo:block-container>
+ </fo:flow>
+ </fo:page-sequence>
+ </fo:root>
+ </fo>
+ <checks>
+ <eval expected="4" xpath="count(//pageViewport)"/>
+ <eval expected="LOSS" xpath="//pageViewport[1]//word"/>
+ <eval expected="(2)" xpath="//pageViewport[2]//word"/>
+ <eval expected="(Enter" xpath="//pageViewport[3]//word"/>
+ <eval expected="Loss" xpath="//pageViewport[4]//word"/>
+ <eval expected="PageFirst" xpath="//pageViewport[1]/@simple-page-master-name"/>
+ <eval expected="PageRestEven" xpath="//pageViewport[2]/@simple-page-master-name"/>
+ <eval expected="PageRestOdd" xpath="//pageViewport[3]/@simple-page-master-name"/>
+ <eval expected="PageLastEven" xpath="//pageViewport[4]/@simple-page-master-name"/>
+ </checks>
+</testcase>
diff --git a/fop/test/layoutengine/standard-testcases/page-sequence_two-column_last-page_8.xml b/fop/test/layoutengine/standard-testcases/page-sequence_two-column_last-page_8.xml
new file mode 100644
index 000000000..86b9ad03d
--- /dev/null
+++ b/fop/test/layoutengine/standard-testcases/page-sequence_two-column_last-page_8.xml
@@ -0,0 +1,1062 @@
+<?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>
+ Test case: last content spans all columns and does not fit on last page, and there is not even
+ space left to fit any part of it after switching to last-page master.
+ </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="0.5in" margin-left="0.5in" margin-top="0.35in" margin-bottom="0.25in" master-name="PageFirst" page-width="8.5in" page-height="11in">
+ <fo:region-body margin-top="0.85in" column-count="2" column-gap="0.3in" margin-bottom="1in" region-name="PageBody" background-color="yellow"/>
+ </fo:simple-page-master>
+ <fo:simple-page-master master-name="PageRestEven" margin-right="0.5in" margin-left="0.5in" margin-top="0.35in" margin-bottom="0.25in" page-width="8.5in" page-height="11in">
+ <fo:region-body margin-top="0.5in" column-gap="0.3in" column-count="2" margin-bottom="1in" region-name="PageBody" background-color="orange"/>
+ </fo:simple-page-master>
+ <fo:simple-page-master master-name="PageRestOdd" margin-right="0.5in" margin-left="0.5in" margin-top="0.35in" margin-bottom="0.25in" page-width="8.5in" page-height="11in">
+ <fo:region-body margin-top="0.5in" column-gap="0.3in" column-count="2" margin-bottom="1in" region-name="PageBody" background-color="pink"/>
+ </fo:simple-page-master>
+ <fo:simple-page-master master-name="PageLastEven" page-width="8.5in" page-height="11in" margin-bottom="0.25in" margin-right="0.5in" margin-top="0.35in" margin-left="0.5in">
+ <fo:region-body margin-top="0.5in" column-gap="0.3in" column-count="2" margin-bottom="2.5in" region-name="PageBody" background-color="blue"/>
+ </fo:simple-page-master>
+ <fo:simple-page-master master-name="PageLastOdd" page-width="8.5in" page-height="11in" margin-bottom="0.25in" margin-right="0.5in" margin-top="0.35in" margin-left="0.5in">
+ <fo:region-body margin-top="0.5in" column-gap="0.3in" column-count="2" margin-bottom="2.5in" region-name="PageBody" background-color="green"/>
+ </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="PageFirst"/>
+ <fo:conditional-page-master-reference odd-or-even="odd" page-position="rest" master-reference="PageRestOdd"/>
+ <fo:conditional-page-master-reference odd-or-even="even" page-position="rest" master-reference="PageRestEven"/>
+ <fo:conditional-page-master-reference odd-or-even="even" page-position="last" master-reference="PageLastEven"/>
+ <fo:conditional-page-master-reference odd-or-even="odd" page-position="last" master-reference="PageLastOdd"/>
+ </fo:repeatable-page-master-alternatives>
+ </fo:page-sequence-master>
+ </fo:layout-master-set>
+ <fo:page-sequence format="1" id="th_default_sequence1" initial-page-number="auto" force-page-count="auto" master-reference="LetterPages">
+ <fo:flow flow-name="PageBody">
+ <fo:block-container span="all">
+ <fo:block>
+ <fo:block font-size="16pt" line-height="17pt">
+ <fo:inline>LOSS PAYABLE PROVISIONS</fo:inline>
+ </fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:leader/>
+ </fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:leader/>
+ </fo:block>
+ <fo:block font-size="10pt" line-height="11pt">This endorsement modifies insurance provided under the following:</fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:leader/>
+ </fo:block>
+ <fo:block font-size="10pt" line-height="11pt" margin-left="0.25in" text-align="left">BUILDERS' RISK COVERAGE FORM<fo:block/>BUILDING AND PERSONAL PROPERTY COVERAGE FORM<fo:block/>CONDOMINIUM ASSOCIATION COVERAGE FORM<fo:block/>CONDOMINIUM COMMERCIAL UNIT-OWNERS COVERAGE FORM<fo:block/>STANDARD PROPERTY POLICY</fo:block>
+ <fo:block font-size="10pt" line-height="11pt" margin-left="0.25in">
+ <fo:leader/>
+ </fo:block>
+ </fo:block>
+ </fo:block-container>
+ <fo:block-container>
+ <fo:block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt">
+ <fo:block>A.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.25in" space-after="4pt">
+ <fo:block>When this endorsement is attached to the Standard Property Policy <fo:inline>CP 00 99,</fo:inline> the term Coverage Part in this endorsement is replaced by the term Policy. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt">
+ <fo:block>B.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.25in" space-after="4pt">
+ <fo:block>Nothing in this endorsement increases the applicable Limit of Insurance. We will not pay any Loss Payee more than their financial interest in the Covered Property, and we will not pay more than the applicable Limit of Insurance on the Covered Property.</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt">
+ <fo:block>C.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.25in" space-after="4pt">
+ <fo:block>The following is added to the<fo:inline> Loss Payment</fo:inline> Loss Condition, as indicated in the Declarations or in the Schedule:</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.25in">
+ <fo:block>1.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>
+ <fo:inline>Loss Payable Clause</fo:inline>
+ </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:block font-size="10pt" line-height="10pt" margin-left="0.5in">For Covered Property in which both you and a Loss Payee shown in the Schedule or in the Declarations have an insurable interest, we will: </fo:block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>a.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>Adjust losses with you; and</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>b.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>Pay any claim for loss or damage jointly to you and the Loss Payee, as<fo:inline> </fo:inline>interests may appear</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.25in">
+ <fo:block>2.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>
+ <fo:inline>Lender's Loss Payable Clause</fo:inline>
+ </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>a.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>The Loss Payee shown in the Schedule or in the Declarations is a creditor, including a mortgageholder or trustee, whose interest in Covered Property is established by such written instruments as<fo:inline>:</fo:inline>
+ </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(1)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>Warehouse receipts; </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(2)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>A contract for deed;</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(3)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>Bills of lading; </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(4)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>Financing statements; or </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(5)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>Mortgages, deeds of trust, or security agreements. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>b.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>For Covered Property in which both you and a Loss Payee have an insurable interest<fo:inline>:</fo:inline>
+ </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(1)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>We will pay for covered loss or damage to each Loss Payee in their order of precedence, as interests may appear. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(2)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>The Loss Payee has the right to receive loss payment even if the Loss Payee has started foreclosure or similar action on the Covered Property. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(3)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>If we deny your claim because of your acts or because you have failed to comply with the terms of the Coverage Part, the Loss Payee will still have the right to receive loss payment if the Loss Payee:</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>(a)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1.25in">
+ <fo:block>Pays any premium due under this Coverage Part at our request if you have failed to do so; </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>(b)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1.25in">
+ <fo:block>Submits a signed, sworn proof of loss within 60 days after receiving notice from us of your failure to do so; and </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>(c)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1.25in">
+ <fo:block>Has notified us of any change in ownership, occupancy or substantial change in risk known to the Loss Payee. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:block font-size="10pt" line-height="10pt" margin-left="1in">All of the terms of this Coverage Part will then apply directly to the Loss Payee. </fo:block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(4)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>If we pay the Loss Payee for any loss or damage and deny payment to you because of your acts or because you have failed to comply with the terms of this Coverage Part:</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>(a)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1.25in">
+ <fo:block>The Loss Payee's rights will be transferred to us to the extent of the amount we pay; and </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>(b)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1.25in">
+ <fo:block>The Loss Payee's rights to recover the full amount of the Loss Payee's claim will not be impaired. At our option, we may pay to the Loss Payee the whole principal on the debt plus any accrued interest. In this event, you will pay your remaining debt to us. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>c.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>If we cancel this policy, we will give written notice to the Loss Payee at least: </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(1)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>10 days before the effective date of cancellation if we cancel for your nonpayment of premium; or </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(2)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>30 days before the effective date of cancellation if we cancel for any other reason. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>d.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>If we elect not to renew this policy, we will give written notice to the Loss Payee at least 10 days before the expiration date of this policy. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.25in">
+ <fo:block>3.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>
+ <fo:inline>Contract Of Sale Clause</fo:inline>
+ </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>a.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>The Loss Payee shown in the Schedule or in the Declarations is a person or organization you have entered into a contract with for the sale of Covered Property. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>b.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>For Covered Property in which both you and the Loss Payee have an insurable interest, we will: </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(1)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>Adjust losses with you; and </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(2)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>Pay any claim for loss or damage jointly to you and the Loss Payee, as interests may appear.</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>c.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>The following is added to the <fo:inline>Other Insurance</fo:inline> Condition: </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:block font-size="10pt" line-height="10pt" margin-left="0.5in" text-align="left">For Covered Property that is the subject of a contract of sale, the word "you" includes the Loss Payee.</fo:block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.25in">
+ <fo:block>4.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>
+ <fo:inline>Building Owner Loss Payable Clause</fo:inline>
+ </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>a.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>The Loss Payee shown in the Schedule or in the Declarations is the owner of the described building in which you are a tenant. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>b.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>We will adjust losses to the described building with the Loss Payee. Any loss payment made to the Loss Payee will satisfy your claims against us for the owner's property. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>c.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>We will adjust losses to tenants' improvements and betterments with you, unless the lease provides otherwise.</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+
+ </fo:block>
+ </fo:block-container>
+ <fo:block-container span="all">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:leader/>
+ </fo:block>
+ <fo:table border-collapse="separate" table-layout="fixed" width="100%">
+ <fo:table-column column-width="proportional-column-width(100)" column-number="1"/>
+ <fo:table-body>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" white-space="normal" border-collapse="collapse" white-space-collapse="false" padding="5px">
+ <fo:block>
+ <fo:block>
+ <fo:inline>SCHEDULE</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:leader/>
+ </fo:block>
+ <fo:table border-collapse="separate" table-layout="fixed" width="100%">
+ <fo:table-column column-width="proportional-column-width(23.45)" column-number="1"/>
+ <fo:table-column column-width="proportional-column-width(9.88333333333333)" column-number="2"/>
+ <fo:table-column column-width="proportional-column-width(24.22)" column-number="3"/>
+ <fo:table-column column-width="proportional-column-width(9.11333333333334)" column-number="4"/>
+ <fo:table-column column-width="proportional-column-width(24.61)" column-number="5"/>
+ <fo:table-column column-width="proportional-column-width(8.72333333333333)" column-number="6"/>
+ <fo:table-body>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" white-space="normal" border-collapse="collapse" white-space-collapse="false" padding="5px" border-right-style="solid" border-top-width="1pt" border-left-style="solid" border-right-width="1pt" border-left-color="black" border-top-color="black" border-right-color="black" border-left-width="1pt" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline>Location Number:</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" white-space="normal" border-collapse="collapse" white-space-collapse="false" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">001</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" white-space="normal" border-collapse="collapse" white-space-collapse="false" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline>Building Number:</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" white-space="normal" border-collapse="collapse" white-space-collapse="false" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">1</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" white-space="normal" border-collapse="collapse" white-space-collapse="false" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline>Applicable Clause<fo:block/>(Enter C.1., C.2., C.3., or C.4.):</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" white-space="normal" border-collapse="collapse" white-space-collapse="false" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">C.1., C.2., C.3., C.4.</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" white-space="normal" border-collapse="collapse" white-space-collapse="false" padding="5px" number-columns-spanned="2" border-top-width="1pt" border-left-style="solid" border-left-color="black" border-top-color="black" border-left-width="1pt" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline>Description Of Property:</fo:inline>
+ </fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:leader/>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" white-space="normal" border-collapse="collapse" white-space-collapse="false" padding="5px" number-columns-spanned="4" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">Prop1</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" white-space="normal" border-collapse="collapse" white-space-collapse="false" padding="5px" number-columns-spanned="2" border-left-style="solid" border-left-color="black" border-left-width="1pt">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline>Loss Payee Name:</fo:inline>
+ </fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:leader/>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" white-space="normal" border-collapse="collapse" white-space-collapse="false" padding="5px" number-columns-spanned="4" border-right-style="solid" border-right-width="1pt" border-right-color="black">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">Payee1</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" white-space="normal" border-collapse="collapse" white-space-collapse="false" padding="5px" number-columns-spanned="2" border-left-style="solid" border-left-color="black" border-left-width="1pt">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline>Loss Payee Address:</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" white-space="normal" border-collapse="collapse" white-space-collapse="false" padding="5px" number-columns-spanned="4" border-right-style="solid" border-right-width="1pt" border-right-color="black">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">Add1</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:table border-collapse="separate" table-layout="fixed" width="100%">
+ <fo:table-column column-width="proportional-column-width(23.45)" column-number="1"/>
+ <fo:table-column column-width="proportional-column-width(9.88333333333333)" column-number="2"/>
+ <fo:table-column column-width="proportional-column-width(24.22)" column-number="3"/>
+ <fo:table-column column-width="proportional-column-width(9.11333333333334)" column-number="4"/>
+ <fo:table-column column-width="proportional-column-width(24.61)" column-number="5"/>
+ <fo:table-column column-width="proportional-column-width(8.72333333333333)" column-number="6"/>
+ <fo:table-body>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" white-space="normal" border-collapse="collapse" white-space-collapse="false" padding="5px" border-right-style="solid" border-top-width="1pt" border-left-style="solid" border-right-width="1pt" border-left-color="black" border-top-color="black" border-right-color="black" border-left-width="1pt" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline>Location Number:</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" white-space="normal" border-collapse="collapse" white-space-collapse="false" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">001</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" white-space="normal" border-collapse="collapse" white-space-collapse="false" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline>Building Number:</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" white-space="normal" border-collapse="collapse" white-space-collapse="false" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">1</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" white-space="normal" border-collapse="collapse" white-space-collapse="false" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline>Applicable Clause<fo:block/>(Enter C.1., C.2., C.3., or C.4.):</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" white-space="normal" border-collapse="collapse" white-space-collapse="false" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">C.2., C.3.</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" white-space="normal" border-collapse="collapse" white-space-collapse="false" padding="5px" number-columns-spanned="2" border-top-width="1pt" border-left-style="solid" border-left-color="black" border-top-color="black" border-left-width="1pt" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline>Description Of Property:</fo:inline>
+ </fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:leader/>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" white-space="normal" border-collapse="collapse" white-space-collapse="false" padding="5px" number-columns-spanned="4" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">Prop2</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" white-space="normal" border-collapse="collapse" white-space-collapse="false" padding="5px" number-columns-spanned="2" border-left-style="solid" border-left-color="black" border-left-width="1pt">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline>Loss Payee Name:</fo:inline>
+ </fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:leader/>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" white-space="normal" border-collapse="collapse" white-space-collapse="false" padding="5px" number-columns-spanned="4" border-right-style="solid" border-right-width="1pt" border-right-color="black">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">Payee2</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" white-space="normal" border-collapse="collapse" white-space-collapse="false" padding="5px" number-columns-spanned="2" border-left-style="solid" border-left-color="black" border-left-width="1pt">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline>Loss Payee Address:</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" white-space="normal" border-collapse="collapse" white-space-collapse="false" padding="5px" number-columns-spanned="4" border-right-style="solid" border-right-width="1pt" border-right-color="black">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">Add2</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:table border-collapse="separate" table-layout="fixed" width="100%">
+ <fo:table-column column-width="proportional-column-width(23.45)" column-number="1"/>
+ <fo:table-column column-width="proportional-column-width(9.88333333333333)" column-number="2"/>
+ <fo:table-column column-width="proportional-column-width(24.22)" column-number="3"/>
+ <fo:table-column column-width="proportional-column-width(9.11333333333334)" column-number="4"/>
+ <fo:table-column column-width="proportional-column-width(24.61)" column-number="5"/>
+ <fo:table-column column-width="proportional-column-width(8.72333333333333)" column-number="6"/>
+ <fo:table-body>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" white-space="normal" border-collapse="collapse" white-space-collapse="false" padding="5px" border-right-style="solid" border-top-width="1pt" border-left-style="solid" border-right-width="1pt" border-left-color="black" border-top-color="black" border-right-color="black" border-left-width="1pt" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline>Location Number:</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" white-space="normal" border-collapse="collapse" white-space-collapse="false" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">001</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" white-space="normal" border-collapse="collapse" white-space-collapse="false" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline>Building Number:</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" white-space="normal" border-collapse="collapse" white-space-collapse="false" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">2</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" white-space="normal" border-collapse="collapse" white-space-collapse="false" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline>Applicable Clause<fo:block/>(Enter C.1., C.2., C.3., or C.4.):</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" white-space="normal" border-collapse="collapse" white-space-collapse="false" padding="5px" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">C.3., C.4.</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" white-space="normal" border-collapse="collapse" white-space-collapse="false" padding="5px" number-columns-spanned="2" border-top-width="1pt" border-left-style="solid" border-left-color="black" border-top-color="black" border-left-width="1pt" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline>Description Of Property:</fo:inline>
+ </fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:leader/>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" white-space="normal" border-collapse="collapse" white-space-collapse="false" padding="5px" number-columns-spanned="4" border-right-style="solid" border-top-width="1pt" border-right-width="1pt" border-top-color="black" border-right-color="black" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">Prop1</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" white-space="normal" border-collapse="collapse" white-space-collapse="false" padding="5px" number-columns-spanned="2" border-left-style="solid" border-left-color="black" border-left-width="1pt">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline>Loss Payee Name:</fo:inline>
+ </fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:leader/>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" white-space="normal" border-collapse="collapse" white-space-collapse="false" padding="5px" number-columns-spanned="4" border-right-style="solid" border-right-width="1pt" border-right-color="black">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">Payee1</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" white-space="normal" border-collapse="collapse" white-space-collapse="false" padding="5px" number-columns-spanned="2" border-left-style="solid" border-left-color="black" border-left-width="1pt">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:inline>Loss Payee Address:</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" white-space="normal" border-collapse="collapse" white-space-collapse="false" padding="5px" number-columns-spanned="4" border-right-style="solid" border-right-width="1pt" border-right-color="black">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">Add1</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:table border-collapse="separate" table-layout="fixed" width="100%">
+ <fo:table-column column-width="proportional-column-width(100)" column-number="1"/>
+ <fo:table-body>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" white-space="normal" border-collapse="collapse" white-space-collapse="false" padding="5px" border-right-style="solid" border-bottom-color="black" border-top-width="1pt" border-left-style="solid" border-right-width="1pt" border-bottom-width="1pt" border-left-color="black" border-top-color="black" border-bottom-style="solid" border-right-color="black" border-left-width="1pt" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">Information required to complete this Schedule, if not shown above, will be shown in the Declarations.</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt">
+ <fo:block>A.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.25in" space-after="4pt">
+ <fo:block>When this endorsement is attached to the Standard Property Policy <fo:inline>CP 00 99,</fo:inline> the term Coverage Part in this endorsement is replaced by the term Policy. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt">
+ <fo:block>B.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.25in" space-after="4pt">
+ <fo:block>Nothing in this endorsement increases the applicable Limit of Insurance. We will not pay any Loss Payee more than their financial interest in the Covered Property, and we will not pay more than the applicable Limit of Insurance on the Covered Property.</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt">
+ <fo:block>C.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.25in" space-after="4pt">
+ <fo:block>The following is added to the<fo:inline> Loss Payment</fo:inline> Loss Condition, as indicated in the Declarations or in the Schedule:</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.25in">
+ <fo:block>1.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>
+ <fo:inline>Loss Payable Clause</fo:inline>
+ </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:block font-size="10pt" line-height="10pt" margin-left="0.5in">For Covered Property in which both you and a Loss Payee shown in the Schedule or in the Declarations have an insurable interest, we will: </fo:block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>a.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>Adjust losses with you; and</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>b.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>Pay any claim for loss or damage jointly to you and the Loss Payee, as<fo:inline> </fo:inline>interests may appear</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.25in">
+ <fo:block>2.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>
+ <fo:inline>Lender's Loss Payable Clause</fo:inline>
+ </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>a.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>The Loss Payee shown in the Schedule or in the Declarations is a creditor, including a mortgageholder or trustee, whose interest in Covered Property is established by such written instruments as<fo:inline>:</fo:inline>
+ </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(1)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>Warehouse receipts; </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(2)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>A contract for deed;</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(3)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>Bills of lading; </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(4)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>Financing statements; or </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(5)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>Mortgages, deeds of trust, or security agreements. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>b.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>For Covered Property in which both you and a Loss Payee have an insurable interest<fo:inline>:</fo:inline>
+ </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(1)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>We will pay for covered loss or damage to each Loss Payee in their order of precedence, as interests may appear. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(2)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>The Loss Payee has the right to receive loss payment even if the Loss Payee has started foreclosure or similar action on the Covered Property. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(3)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>If we deny your claim because of your acts or because you have failed to comply with the terms of the Coverage Part, the Loss Payee will still have the right to receive loss payment if the Loss Payee:</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>(a)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1.25in">
+ <fo:block>Pays any premium due under this Coverage Part at our request if you have failed to do so; </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>(b)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1.25in">
+ <fo:block>Submits a signed, sworn proof of loss within 60 days after receiving notice from us of your failure to do so; and </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>(c)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1.25in">
+ <fo:block>Has notified us of any change in ownership, occupancy or substantial change in risk known to the Loss Payee. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:block font-size="10pt" line-height="10pt" margin-left="1in">All of the terms of this Coverage Part will then apply directly to the Loss Payee. </fo:block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(4)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>If we pay the Loss Payee for any loss or damage and deny payment to you because of your acts or because you have failed to comply with the terms of this Coverage Part:</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>(a)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1.25in">
+ <fo:block>The Loss Payee's rights will be transferred to us to the extent of the amount we pay; and </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>(b)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1.25in">
+ <fo:block>The Loss Payee's rights to recover the full amount of the Loss Payee's claim will not be impaired. At our option, we may pay to the Loss Payee the whole principal on the debt plus any accrued interest. In this event, you will pay your remaining debt to us. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>c.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>If we cancel this policy, we will give written notice to the Loss Payee at least: </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(1)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>10 days before the effective date of cancellation if we cancel for your nonpayment of premium; or </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(2)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>30 days before the effective date of cancellation if we cancel for any other reason. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>d.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>If we elect not to renew this policy, we will give written notice to the Loss Payee at least 10 days before the expiration date of this policy. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.25in">
+ <fo:block>3.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>
+ <fo:inline>Contract Of Sale Clause</fo:inline>
+ </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>a.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>The Loss Payee shown in the Schedule or in the Declarations is a person or organization you have entered into a contract with for the sale of Covered Property. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>b.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>For Covered Property in which both you and the Loss Payee have an insurable interest, we will: </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(1)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>Adjust losses with you; and </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ </fo:block>
+ </fo:block-container>
+ </fo:flow>
+ </fo:page-sequence>
+ </fo:root>
+ </fo>
+ <checks>
+ <eval expected="4" xpath="count(//pageViewport)"/>
+ <eval expected="LOSS" xpath="//pageViewport[1]//word"/>
+ <eval expected="(2)" xpath="//pageViewport[2]//word"/>
+ <eval expected="Information" xpath="//pageViewport[3]//word"/>
+ <eval expected="a." xpath="//pageViewport[4]//word"/>
+ <eval expected="PageFirst" xpath="//pageViewport[1]/@simple-page-master-name"/>
+ <eval expected="PageRestEven" xpath="//pageViewport[2]/@simple-page-master-name"/>
+ <eval expected="PageRestOdd" xpath="//pageViewport[3]/@simple-page-master-name"/>
+ <eval expected="PageLastEven" xpath="//pageViewport[4]/@simple-page-master-name"/>
+ </checks>
+</testcase>
diff --git a/fop/test/layoutengine/standard-testcases/page-sequence_two-column_last-page_9.xml b/fop/test/layoutengine/standard-testcases/page-sequence_two-column_last-page_9.xml
new file mode 100644
index 000000000..aa4ab9f56
--- /dev/null
+++ b/fop/test/layoutengine/standard-testcases/page-sequence_two-column_last-page_9.xml
@@ -0,0 +1,1187 @@
+<?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>
+ Test case: last content spans all columns and does not fit on last page, and there is not even
+ space left to fit any part of it after switching to last-page master.
+ </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="0.5in" margin-left="0.5in" margin-top="0.35in" margin-bottom="0.25in" master-name="PageFirst" page-width="8.5in" page-height="11in">
+ <fo:region-body margin-top="0.85in" column-count="2" column-gap="0.3in" margin-bottom="1in" region-name="PageBody" background-color="red"/>
+ </fo:simple-page-master>
+ <fo:simple-page-master master-name="PageRestEven" margin-right="0.5in" margin-left="0.5in" margin-top="0.35in" margin-bottom="0.25in" page-width="8.5in" page-height="11in">
+ <fo:region-body margin-top="0.5in" column-gap="0.3in" column-count="2" margin-bottom="1in" region-name="PageBody" background-color="yellow"/>
+ </fo:simple-page-master>
+ <fo:simple-page-master master-name="PageRestOdd" margin-right="0.5in" margin-left="0.5in" margin-top="0.35in" margin-bottom="0.25in" page-width="8.5in" page-height="11in">
+ <fo:region-body margin-top="0.5in" column-gap="0.3in" column-count="2" margin-bottom="1in" region-name="PageBody" background-color="green"/>
+ </fo:simple-page-master>
+ <fo:simple-page-master master-name="PageLastEven" page-width="8.5in" page-height="11in" margin-bottom="0.25in" margin-right="0.5in" margin-top="0.35in" margin-left="0.5in">
+ <fo:region-body column-count="2" margin-top="0.5in" column-gap="0.3in" margin-bottom="2.5in" region-name="PageBody" background-color="orange"/>
+ </fo:simple-page-master>
+ <fo:simple-page-master master-name="PageLastOdd" page-width="8.5in" page-height="11in" margin-bottom="0.25in" margin-right="0.5in" margin-top="0.35in" margin-left="0.5in">
+ <fo:region-body margin-top="0.5in" column-gap="0.3in" column-count="2" margin-bottom="2.5in" region-name="PageBody" background-color="pink"/>
+ </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="PageFirst"/>
+ <fo:conditional-page-master-reference odd-or-even="odd" page-position="rest" master-reference="PageRestOdd"/>
+ <fo:conditional-page-master-reference odd-or-even="even" page-position="rest" master-reference="PageRestEven"/>
+ <fo:conditional-page-master-reference odd-or-even="even" page-position="last" master-reference="PageLastEven"/>
+ <fo:conditional-page-master-reference odd-or-even="odd" page-position="last" master-reference="PageLastOdd"/>
+ </fo:repeatable-page-master-alternatives>
+ </fo:page-sequence-master>
+ </fo:layout-master-set>
+ <fo:page-sequence format="1" id="th_default_sequence1" initial-page-number="auto" force-page-count="auto" master-reference="LetterPages">
+ <fo:flow flow-name="PageBody">
+ <fo:block-container>
+ <fo:block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt">
+ <fo:block>A.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.25in" space-after="4pt">
+ <fo:block>When this endorsement is attached to the Standard Property Policy <fo:inline>CP 00 99,</fo:inline> the term Coverage Part in this endorsement is replaced by the term Policy. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt">
+ <fo:block>B.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.25in" space-after="4pt">
+ <fo:block>Nothing in this endorsement increases the applicable Limit of Insurance. We will not pay any Loss Payee more than their financial interest in the Covered Property, and we will not pay more than the applicable Limit of Insurance on the Covered Property.</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt">
+ <fo:block>C.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.25in" space-after="4pt">
+ <fo:block>The following is added to the<fo:inline> Loss Payment</fo:inline> Loss Condition, as indicated in the Declarations or in the Schedule:</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.25in">
+ <fo:block>1.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>
+ <fo:inline>Loss Payable Clause</fo:inline>
+ </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:block font-size="10pt" line-height="10pt" margin-left="0.5in">For Covered Property in which both you and a Loss Payee shown in the Schedule or in the Declarations have an insurable interest, we will: </fo:block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>a.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>Adjust losses with you; and</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>b.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>Pay any claim for loss or damage jointly to you and the Loss Payee, as<fo:inline> </fo:inline>interests may appear</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.25in">
+ <fo:block>2.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>
+ <fo:inline>Lender's Loss Payable Clause</fo:inline>
+ </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>a.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>The Loss Payee shown in the Schedule or in the Declarations is a creditor, including a mortgageholder or trustee, whose interest in Covered Property is established by such written instruments as<fo:inline>:</fo:inline>
+ </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(1)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>Warehouse receipts; </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(2)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>A contract for deed;</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(3)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>Bills of lading; </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(4)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>Financing statements; or </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(5)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>Mortgages, deeds of trust, or security agreements. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>b.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>For Covered Property in which both you and a Loss Payee have an insurable interest<fo:inline>:</fo:inline>
+ </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(1)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>We will pay for covered loss or damage to each Loss Payee in their order of precedence, as interests may appear. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(2)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>The Loss Payee has the right to receive loss payment even if the Loss Payee has started foreclosure or similar action on the Covered Property. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(3)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>If we deny your claim because of your acts or because you have failed to comply with the terms of the Coverage Part, the Loss Payee will still have the right to receive loss payment if the Loss Payee:</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>(a)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1.25in">
+ <fo:block>Pays any premium due under this Coverage Part at our request if you have failed to do so; </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>(b)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1.25in">
+ <fo:block>Submits a signed, sworn proof of loss within 60 days after receiving notice from us of your failure to do so; and </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>(c)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1.25in">
+ <fo:block>Has notified us of any change in ownership, occupancy or substantial change in risk known to the Loss Payee. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:block font-size="10pt" line-height="10pt" margin-left="1in">All of the terms of this Coverage Part will then apply directly to the Loss Payee. </fo:block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(4)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>If we pay the Loss Payee for any loss or damage and deny payment to you because of your acts or because you have failed to comply with the terms of this Coverage Part:</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>(a)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1.25in">
+ <fo:block>The Loss Payee's rights will be transferred to us to the extent of the amount we pay; and </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>(b)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1.25in">
+ <fo:block>The Loss Payee's rights to recover the full amount of the Loss Payee's claim will not be impaired. At our option, we may pay to the Loss Payee the whole principal on the debt plus any accrued interest. In this event, you will pay your remaining debt to us. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>c.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>If we cancel this policy, we will give written notice to the Loss Payee at least: </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(1)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>10 days before the effective date of cancellation if we cancel for your nonpayment of premium; or </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(2)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>30 days before the effective date of cancellation if we cancel for any other reason. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>d.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>If we elect not to renew this policy, we will give written notice to the Loss Payee at least 10 days before the expiration date of this policy. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.25in">
+ <fo:block>3.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>
+ <fo:inline>Contract Of Sale Clause</fo:inline>
+ </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>a.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>The Loss Payee shown in the Schedule or in the Declarations is a person or organization you have entered into a contract with for the sale of Covered Property. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>b.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>For Covered Property in which both you and the Loss Payee have an insurable interest, we will: </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(1)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>Adjust losses with you; and </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(2)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>Pay any claim for loss or damage jointly to you and the Loss Payee, as interests may appear.</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>c.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>The following is added to the <fo:inline>Other Insurance</fo:inline> Condition: </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:block font-size="10pt" line-height="10pt" margin-left="0.5in" fox:tab-stops="end space 24pt start space 30pt" text-align="left">For Covered Property that is the subject of a contract of sale, the word "you" includes the Loss Payee.</fo:block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.25in">
+ <fo:block>4.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>
+ <fo:inline>Building Owner Loss Payable Clause</fo:inline>
+ </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>a.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>The Loss Payee shown in the Schedule or in the Declarations is the owner of the described building in which you are a tenant. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>b.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>We will adjust losses to the described building with the Loss Payee. Any loss payment made to the Loss Payee will satisfy your claims against us for the owner's property. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>c.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>We will adjust losses to tenants' improvements and betterments with you, unless the lease provides otherwise.</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:leader/>
+ </fo:block>
+ </fo:block>
+ </fo:block-container>
+ <fo:block-container span="all">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:leader/>
+ </fo:block>
+ <fo:table border-collapse="separate" table-layout="fixed" width="100%">
+ <fo:table-column column-width="proportional-column-width(100)" column-number="1"/>
+ <fo:table-body>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" white-space="normal" border-collapse="collapse" white-space-collapse="false" padding="5px">
+ <fo:block>
+ <fo:block text-align="center">
+ <fo:inline>SCHEDULE</fo:inline>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:leader/>
+ </fo:block>
+ <fo:table border-collapse="separate" table-layout="fixed" width="100%">
+ <fo:table-column column-width="proportional-column-width(100)" column-number="1"/>
+ <fo:table-body>
+ <fo:table-row>
+ <fo:table-cell padding-top="2pt" padding-left="2pt" white-space="normal" border-collapse="collapse" white-space-collapse="false" padding="5px" border-right-style="solid" border-bottom-color="black" border-top-width="1pt" border-left-style="solid" border-right-width="1pt" border-bottom-width="1pt" border-left-color="black" border-top-color="black" border-bottom-style="solid" border-right-color="black" border-left-width="1pt" border-top-style="solid">
+ <fo:block>
+ <fo:block font-size="10pt" line-height="11pt">Information required to complete this Schedule, if not shown above, will be shown in the Declarations.</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt">
+ <fo:block>A.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.25in" space-after="4pt">
+ <fo:block>When this endorsement is attached to the Standard Property Policy <fo:inline>CP 00 99,</fo:inline> the term Coverage Part in this endorsement is replaced by the term Policy. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt">
+ <fo:block>B.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.25in" space-after="4pt">
+ <fo:block>Nothing in this endorsement increases the applicable Limit of Insurance. We will not pay any Loss Payee more than their financial interest in the Covered Property, and we will not pay more than the applicable Limit of Insurance on the Covered Property.</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt">
+ <fo:block>C.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.25in" space-after="4pt">
+ <fo:block>The following is added to the<fo:inline> Loss Payment</fo:inline> Loss Condition, as indicated in the Declarations or in the Schedule:</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.25in">
+ <fo:block>1.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>
+ <fo:inline>Loss Payable Clause</fo:inline>
+ </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:block font-size="10pt" line-height="10pt" margin-left="0.5in">For Covered Property in which both you and a Loss Payee shown in the Schedule or in the Declarations have an insurable interest, we will: </fo:block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>a.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>Adjust losses with you; and</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>b.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>Pay any claim for loss or damage jointly to you and the Loss Payee, as<fo:inline> </fo:inline>interests may appear</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.25in">
+ <fo:block>2.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>
+ <fo:inline>Lender's Loss Payable Clause</fo:inline>
+ </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>a.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>The Loss Payee shown in the Schedule or in the Declarations is a creditor, including a mortgageholder or trustee, whose interest in Covered Property is established by such written instruments as<fo:inline>:</fo:inline>
+ </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(1)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>Warehouse receipts; </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(2)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>A contract for deed;</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(3)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>Bills of lading; </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(4)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>Financing statements; or </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(5)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>Mortgages, deeds of trust, or security agreements. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>b.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>For Covered Property in which both you and a Loss Payee have an insurable interest<fo:inline>:</fo:inline>
+ </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(1)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>We will pay for covered loss or damage to each Loss Payee in their order of precedence, as interests may appear. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(2)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>The Loss Payee has the right to receive loss payment even if the Loss Payee has started foreclosure or similar action on the Covered Property. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(3)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>If we deny your claim because of your acts or because you have failed to comply with the terms of the Coverage Part, the Loss Payee will still have the right to receive loss payment if the Loss Payee:</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>(a)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1.25in">
+ <fo:block>Pays any premium due under this Coverage Part at our request if you have failed to do so; </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>(b)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1.25in">
+ <fo:block>Submits a signed, sworn proof of loss within 60 days after receiving notice from us of your failure to do so; and </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>(c)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1.25in">
+ <fo:block>Has notified us of any change in ownership, occupancy or substantial change in risk known to the Loss Payee. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:block font-size="10pt" line-height="10pt" margin-left="1in">All of the terms of this Coverage Part will then apply directly to the Loss Payee. </fo:block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(4)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>If we pay the Loss Payee for any loss or damage and deny payment to you because of your acts or because you have failed to comply with the terms of this Coverage Part:</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>(a)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1.25in">
+ <fo:block>The Loss Payee's rights will be transferred to us to the extent of the amount we pay; and </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>(b)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1.25in">
+ <fo:block>The Loss Payee's rights to recover the full amount of the Loss Payee's claim will not be impaired. At our option, we may pay to the Loss Payee the whole principal on the debt plus any accrued interest. In this event, you will pay your remaining debt to us. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>c.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>If we cancel this policy, we will give written notice to the Loss Payee at least: </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(1)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>10 days before the effective date of cancellation if we cancel for your nonpayment of premium; or </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(2)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>30 days before the effective date of cancellation if we cancel for any other reason. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>d.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>If we elect not to renew this policy, we will give written notice to the Loss Payee at least 10 days before the expiration date of this policy. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.25in">
+ <fo:block>3.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>
+ <fo:inline>Contract Of Sale Clause</fo:inline>
+ </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>a.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>The Loss Payee shown in the Schedule or in the Declarations is a person or organization you have entered into a contract with for the sale of Covered Property. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>b.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>For Covered Property in which both you and the Loss Payee have an insurable interest, we will: </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(1)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>Adjust losses with you; and </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(2)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>Pay any claim for loss or damage jointly to you and the Loss Payee, as interests may appear.</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>c.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>The following is added to the <fo:inline>Other Insurance</fo:inline> Condition: </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:block font-size="10pt" line-height="10pt" margin-left="0.5in" fox:tab-stops="end space 24pt start space 30pt" text-align="left">For Covered Property that is the subject of a contract of sale, the word "you" includes the Loss Payee</fo:block>
+ <fo:block font-size="10pt" line-height="10pt" margin-left="0.5in" fox:tab-stops="end space 24pt start space 30pt">
+ <fo:leader/>
+ </fo:block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.25in">
+ <fo:block>4.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>
+ <fo:inline>Building Owner Loss Payable Clause</fo:inline>
+ </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>a.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>The Loss Payee shown in the Schedule or in the Declarations is the owner of the described building in which you are a tenant. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>b.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>We will adjust losses to the described building with the Loss Payee. Any loss payment made to the Loss Payee will satisfy your claims against us for the owner's property. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>c.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>We will adjust losses to tenants' improvements and betterments with you, unless the lease provides otherwise.</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:block font-size="10pt" line-height="11pt">
+ <fo:leader/>
+ </fo:block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt">
+ <fo:block>A.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.25in" space-after="4pt">
+ <fo:block>When this endorsement is attached to the Standard Property Policy <fo:inline>CP 00 99,</fo:inline> the term Coverage Part in this endorsement is replaced by the term Policy. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt">
+ <fo:block>B.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.25in" space-after="4pt">
+ <fo:block>Nothing in this endorsement increases the applicable Limit of Insurance. We will not pay any Loss Payee more than their financial interest in the Covered Property, and we will not pay more than the applicable Limit of Insurance on the Covered Property.</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt">
+ <fo:block>C.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.25in" space-after="4pt">
+ <fo:block>The following is added to the<fo:inline> Loss Payment</fo:inline> Loss Condition, as indicated in the Declarations or in the Schedule:</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.25in">
+ <fo:block>1.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>
+ <fo:inline>Loss Payable Clause</fo:inline>
+ </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:block font-size="10pt" line-height="10pt" margin-left="0.5in">For Covered Property in which both you and a Loss Payee shown in the Schedule or in the Declarations have an insurable interest, we will: </fo:block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>a.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>Adjust losses with you; and</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>b.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>Pay any claim for loss or damage jointly to you and the Loss Payee, as<fo:inline> </fo:inline>interests may appear</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.25in">
+ <fo:block>2.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>
+ <fo:inline>Lender's Loss Payable Clause</fo:inline>
+ </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>a.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>The Loss Payee shown in the Schedule or in the Declarations is a creditor, including a mortgageholder or trustee, whose interest in Covered Property is established by such written instruments as<fo:inline>:</fo:inline>
+ </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(1)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>Warehouse receipts; </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(2)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>A contract for deed;</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(3)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>Bills of lading; </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(4)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>Financing statements; or </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(5)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>Mortgages, deeds of trust, or security agreements. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>b.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>For Covered Property in which both you and a Loss Payee have an insurable interest<fo:inline>:</fo:inline>
+ </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(1)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>We will pay for covered loss or damage to each Loss Payee in their order of precedence, as interests may appear. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(2)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>The Loss Payee has the right to receive loss payment even if the Loss Payee has started foreclosure or similar action on the Covered Property. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(3)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>If we deny your claim because of your acts or because you have failed to comply with the terms of the Coverage Part, the Loss Payee will still have the right to receive loss payment if the Loss Payee:</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>(a)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1.25in">
+ <fo:block>Pays any premium due under this Coverage Part at our request if you have failed to do so; </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>(b)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1.25in">
+ <fo:block>Submits a signed, sworn proof of loss within 60 days after receiving notice from us of your failure to do so; and </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>(c)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1.25in">
+ <fo:block>Has notified us of any change in ownership, occupancy or substantial change in risk known to the Loss Payee. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:block font-size="10pt" line-height="10pt" margin-left="1in">All of the terms of this Coverage Part will then apply directly to the Loss Payee. </fo:block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(4)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>If we pay the Loss Payee for any loss or damage and deny payment to you because of your acts or because you have failed to comply with the terms of this Coverage Part:</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>(a)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1.25in">
+ <fo:block>The Loss Payee's rights will be transferred to us to the extent of the amount we pay; and </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>(b)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1.25in">
+ <fo:block>The Loss Payee's rights to recover the full amount of the Loss Payee's claim will not be impaired. At our option, we may pay to the Loss Payee the whole principal on the debt plus any accrued interest. In this event, you will pay your remaining debt to us. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>c.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>If we cancel this policy, we will give written notice to the Loss Payee at least: </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(1)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>10 days before the effective date of cancellation if we cancel for your nonpayment of premium; or </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(2)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>30 days before the effective date of cancellation if we cancel for any other reason. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>d.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>If we elect not to renew this policy, we will give written notice to the Loss Payee at least 10 days before the expiration date of this policy. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.25in">
+ <fo:block>3.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>
+ <fo:inline>Contract Of Sale Clause</fo:inline>
+ </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>a.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>The Loss Payee shown in the Schedule or in the Declarations is a person or organization you have entered into a contract with for the sale of Covered Property. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>b.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>For Covered Property in which both you and the Loss Payee have an insurable interest, we will: </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(1)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>Adjust losses with you; and </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>(2)</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="1in">
+ <fo:block>Pay any claim for loss or damage jointly to you and the Loss Payee, as interests may appear.</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>c.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>The following is added to the <fo:inline>Other Insurance</fo:inline> Condition: </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:block font-size="10pt" line-height="10pt" margin-left="0.5in" fox:tab-stops="end space 24pt start space 30pt" text-align="left">For Covered Property that is the subject of a contract of sale, the word "you" includes the Loss Payee</fo:block>
+ <fo:block font-size="10pt" line-height="10pt" margin-left="0.5in" fox:tab-stops="end space 24pt start space 30pt">
+ <fo:leader/>
+ </fo:block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.25in">
+ <fo:block>4.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>
+ <fo:inline>Building Owner Loss Payable Clause</fo:inline>
+ </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block font-size="10pt" line-height="11pt">
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>a.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>The Loss Payee shown in the Schedule or in the Declarations is the owner of the described building in which you are a tenant. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>b.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>We will adjust losses to the described building with the Loss Payee. Any loss payment made to the Loss Payee will satisfy your claims against us for the owner's property. </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>c.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>We will adjust losses to tenants' improvements and betterments with you, unless the lease provides otherwise.</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>d.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>abc</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="4pt" space-after="4pt">
+ <fo:list-item-label font-size="10pt" space-before="4pt" start-indent="0.5in">
+ <fo:block>e.</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body font-size="10pt" space-before="4pt" start-indent="0.75in">
+ <fo:block>abad</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ </fo:block>
+ </fo:block-container>
+ </fo:flow>
+ </fo:page-sequence>
+ </fo:root>
+ </fo>
+ <checks>
+ <eval expected="5" xpath="count(//pageViewport)"/>
+ <eval expected="A." xpath="//pageViewport[1]//word"/>
+ <eval expected="c." xpath="//pageViewport[2]//word"/>
+ <eval expected="(a)" xpath="//pageViewport[3]//word"/>
+ <eval expected="(1)" xpath="//pageViewport[4]//word"/>
+ <eval expected="PageFirst" xpath="//pageViewport[1]/@simple-page-master-name"/>
+ <eval expected="PageRestEven" xpath="//pageViewport[2]/@simple-page-master-name"/>
+ <eval expected="PageRestOdd" xpath="//pageViewport[3]/@simple-page-master-name"/>
+ <eval expected="PageRestEven" xpath="//pageViewport[4]/@simple-page-master-name"/>
+ <eval expected="PageLastOdd" xpath="//pageViewport[5]/@simple-page-master-name"/>
+ </checks>
+</testcase>
diff --git a/fop/test/layoutengine/standard-testcases/table_and_caption.xml b/fop/test/layoutengine/standard-testcases/table_and_caption.xml
new file mode 100644
index 000000000..e5bdf1e50
--- /dev/null
+++ b/fop/test/layoutengine/standard-testcases/table_and_caption.xml
@@ -0,0 +1,75 @@
+<?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 table with a caption
+ </p>
+ </info>
+ <fo>
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="simple" page-height="27.9cm" page-width="21.6cm">
+ <fo:region-body margin="1cm"/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+ <fo:page-sequence master-reference="simple">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:table-and-caption border="solid 0.5mm black">
+ <fo:table-caption>
+ <fo:block text-align="center">test</fo:block>
+ </fo:table-caption>
+ <fo:table table-layout="fixed" width="100%">
+ <fo:table-column column-width="proportional-column-width(50)"/>
+ <fo:table-column column-width="proportional-column-width(50)"/>
+ <fo:table-header>
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block>header1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block>header2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-header>
+ <fo:table-body>
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block>cell1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block>cell2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ </fo:table-and-caption>
+ </fo:flow>
+ </fo:page-sequence>
+ </fo:root>
+ </fo>
+ <checks>
+ <eval expected="test" xpath="//block/block[1]//word"/>
+ <eval expected="header1" xpath="//block/block[2]/block[1]/block//word"/>
+ <eval expected="header2" xpath="//block/block[2]/block[2]/block//word"/>
+ <eval expected="cell1" xpath="//block/block[2]/block[3]/block//word"/>
+ <eval expected="cell2" xpath="//block/block[2]/block[4]/block//word"/>
+ <eval expected="(solid,#000000,1417)" xpath="//block/@border-start"/>
+ </checks>
+</testcase>
diff --git a/fop/test/layoutengine/standard-testcases/table_and_caption_multicolumn.xml b/fop/test/layoutengine/standard-testcases/table_and_caption_multicolumn.xml
new file mode 100644
index 000000000..fecebe494
--- /dev/null
+++ b/fop/test/layoutengine/standard-testcases/table_and_caption_multicolumn.xml
@@ -0,0 +1,98 @@
+<?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 table with a caption
+ </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 master-name="simple" page-height="10cm" page-width="21.6cm">
+ <fo:region-body margin="1cm" column-count="2"/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+ <fo:page-sequence master-reference="simple">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block font-size="40pt">test test test test test test test test test test test test </fo:block>
+ <fo:table-and-caption border="solid 0.5mm black" font-size="35pt">
+ <fo:table-caption>
+ <fo:block text-align="center">caption</fo:block>
+ </fo:table-caption>
+ <fo:table table-layout="fixed" width="100%">
+ <fo:table-column column-width="proportional-column-width(50)"/>
+ <fo:table-column column-width="proportional-column-width(50)"/>
+ <fo:table-header>
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block>header1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block>header2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-header>
+ <fo:table-body>
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block>cell1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block>cell2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block>cell1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block>cell2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block>cell1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block>cell2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block>cell1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block>cell2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ </fo:table-and-caption>
+ </fo:flow>
+ </fo:page-sequence>
+ </fo:root>
+ </fo>
+ <checks>
+ <eval expected="2" xpath="count(//pageViewport)"/>
+ <eval expected="test" xpath="//pageViewport[1]//flow[1]//word"/>
+ <eval expected="caption" xpath="//pageViewport[1]//flow[2]//word"/>
+ <eval expected="header1" xpath="//pageViewport[2]//word"/>
+ </checks>
+</testcase>
diff --git a/fop/test/layoutengine/standard-testcases/table_and_caption_multipage.xml b/fop/test/layoutengine/standard-testcases/table_and_caption_multipage.xml
new file mode 100644
index 000000000..c4552bcc6
--- /dev/null
+++ b/fop/test/layoutengine/standard-testcases/table_and_caption_multipage.xml
@@ -0,0 +1,98 @@
+<?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 table with a caption
+ </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 master-name="simple" page-height="10cm" page-width="21.6cm">
+ <fo:region-body margin="1cm"/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+ <fo:page-sequence master-reference="simple">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block font-size="40pt">test test test test test test test test test test test test </fo:block>
+ <fo:table-and-caption border="solid 0.5mm black" font-size="40pt">
+ <fo:table-caption>
+ <fo:block text-align="center">caption</fo:block>
+ </fo:table-caption>
+ <fo:table table-layout="fixed" width="100%">
+ <fo:table-column column-width="proportional-column-width(50)"/>
+ <fo:table-column column-width="proportional-column-width(50)"/>
+ <fo:table-header>
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block>header1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block>header2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-header>
+ <fo:table-body>
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block>cell1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block>cell2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block>cell1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block>cell2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block>cell1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block>cell2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block>cell1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block>cell2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ </fo:table-and-caption>
+ </fo:flow>
+ </fo:page-sequence>
+ </fo:root>
+ </fo>
+ <checks>
+ <eval expected="3" xpath="count(//pageViewport)"/>
+ <eval expected="test" xpath="//pageViewport[1]//word"/>
+ <eval expected="caption" xpath="//pageViewport[2]//word"/>
+ <eval expected="header1" xpath="//pageViewport[3]//word"/>
+ </checks>
+</testcase>
diff --git a/pom.xml b/pom.xml
index 02c032e96..b6078eccf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>fop-parent</artifactId>
- <version>2.10.0-SNAPSHOT</version>
+ <version>2.11.0-SNAPSHOT</version>
<name>Apache FOP Parent</name>
<description>XML Graphics Format Object Processor</description>
<packaging>pom</packaging>
@@ -30,7 +30,7 @@
<surefire.plugin.version>2.18.1</surefire.plugin.version>
<war.plugin.version>3.3.2</war.plugin.version>
<xml.plugin.version>1.0.1</xml.plugin.version>
- <xmlgraphics.commons.version>2.10.0-SNAPSHOT</xmlgraphics.commons.version>
+ <xmlgraphics.commons.version>2.11.0-SNAPSHOT</xmlgraphics.commons.version>
<xmlunit.version>1.2</xmlunit.version>
<jdk.path>${env.JAVA_HOME}</jdk.path>
</properties>
@@ -183,10 +183,10 @@
</repositories>
<distributionManagement>
- <site>
- <id>${project.artifactId}-site</id>
- <url>${project.baseUri}</url>
- </site>
+ <snapshotRepository>
+ <id>apache.snapshots.https</id>
+ <url>https://repository.apache.org/content/repositories/snapshots</url>
+ </snapshotRepository>
</distributionManagement>
</project>