aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fop-core/src/main/java/org/apache/fop/accessibility/fo/FO2StructureTreeConverter.java2
-rw-r--r--fop-core/src/test/java/org/apache/fop/accessibility/fo/FO2StructureTreeConverterTestCase.java22
2 files changed, 24 insertions, 0 deletions
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 060316bce..4e2690b1c 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
@@ -604,12 +604,14 @@ public class FO2StructureTreeConverter extends DelegatingFOEventHandler {
@Override
public void image(final ExternalGraphic eg) {
+ handleStartArtifact(eg);
content(new Event(this) {
public void run() {
eventHandler.image(eg);
}
}, true);
super.image(eg);
+ handleEndArtifact(eg);
}
@Override
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 c3ae3e740..bc01abd51 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
@@ -210,6 +210,28 @@ public class FO2StructureTreeConverterTestCase {
+ "</structure-tree-sequence>");
}
+ @Test
+ public void testExternalGraphicArtifact() 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><fo:external-graphic src=\"test/resources/fop/image/logo.jpg\" role=\"artifact\"/>"
+ + "</fo:block></fo:flow>\n"
+ + " </fo:page-sequence>\n"
+ + "</fo:root>\n";
+ compare(fo, "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><structure-tree-sequence>"
+ + "<structure-tree xmlns=\"http://xmlgraphics.apache.org/fop/intermediate\" "
+ + "xmlns:foi=\"http://xmlgraphics.apache.org/fop/internal\" "
+ + "xmlns:fox=\"http://xmlgraphics.apache.org/fop/extensions\">"
+ + "<fo:flow xmlns:fo=\"http://www.w3.org/1999/XSL/Format\" flow-name=\"xsl-region-body\">"
+ + "<fo:block/></fo:flow></structure-tree></structure-tree-sequence>");
+ }
+
private void compare(final String fo, String tree) throws Exception {
foLoader = new FOLoader("") {
public InputStream getFoInputStream() {
46480/stable29 Nextcloud server, a safe home for all your data: https://github.com/nextcloud/serverwww-data
summaryrefslogtreecommitdiffstats
path: root/webpack.prod.js
blob: 02f21f80cedc644ddcf74b840e5d16a39c7d96cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24