aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Steiner <ssteiner@apache.org>2021-11-05 13:46:18 +0000
committerSimon Steiner <ssteiner@apache.org>2021-11-05 13:46:18 +0000
commit704da0a306539eb5902c2e9385d84f5c47bcb3d8 (patch)
tree8b731e86b00f005be090ac967b7118d925cfa0ef
parent1eb14b70fce3c735dd61f3fe8f8bd9e2c83ca4ed (diff)
downloadxmlgraphics-fop-704da0a306539eb5902c2e9385d84f5c47bcb3d8.tar.gz
xmlgraphics-fop-704da0a306539eb5902c2e9385d84f5c47bcb3d8.zip
FOP-3032: Embed pdf into afp using unique type
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1894760 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--fop-core/src/main/java/org/apache/fop/render/afp/AFPImageHandlerRawStream.java2
-rw-r--r--fop-core/src/test/java/org/apache/fop/render/afp/AFPImageHandlerRawStreamTestCase.java8
-rw-r--r--fop/lib/xmlgraphics-commons-svn-trunk.jarbin674612 -> 674647 bytes
3 files changed, 5 insertions, 5 deletions
diff --git a/fop-core/src/main/java/org/apache/fop/render/afp/AFPImageHandlerRawStream.java b/fop-core/src/main/java/org/apache/fop/render/afp/AFPImageHandlerRawStream.java
index 36e5a9db2..cc072e318 100644
--- a/fop-core/src/main/java/org/apache/fop/render/afp/AFPImageHandlerRawStream.java
+++ b/fop-core/src/main/java/org/apache/fop/render/afp/AFPImageHandlerRawStream.java
@@ -44,7 +44,7 @@ public class AFPImageHandlerRawStream extends AbstractAFPImageHandlerRawStream {
ImageFlavor.RAW_JPEG,
ImageFlavor.RAW_TIFF,
ImageFlavor.RAW_EPS,
- ImageFlavor.RAW
+ ImageFlavor.RAW_PDF
};
/** logging instance */
diff --git a/fop-core/src/test/java/org/apache/fop/render/afp/AFPImageHandlerRawStreamTestCase.java b/fop-core/src/test/java/org/apache/fop/render/afp/AFPImageHandlerRawStreamTestCase.java
index 9a9ea8558..36460ae0d 100644
--- a/fop-core/src/test/java/org/apache/fop/render/afp/AFPImageHandlerRawStreamTestCase.java
+++ b/fop-core/src/test/java/org/apache/fop/render/afp/AFPImageHandlerRawStreamTestCase.java
@@ -19,16 +19,15 @@
package org.apache.fop.render.afp;
import java.io.InputStream;
+import java.util.Arrays;
import org.junit.Assert;
import org.junit.Test;
import org.apache.xmlgraphics.image.loader.ImageFlavor;
-import org.apache.xmlgraphics.image.loader.MimeEnabledImageFlavor;
import org.apache.xmlgraphics.image.loader.impl.ImageRawStream;
import org.apache.fop.afp.AFPPaintingState;
-import org.apache.fop.apps.MimeConstants;
public class AFPImageHandlerRawStreamTestCase {
@Test
@@ -36,8 +35,9 @@ public class AFPImageHandlerRawStreamTestCase {
AFPPaintingState state = new AFPPaintingState();
state.setNativeImagesSupported(true);
AFPRenderingContext context = new AFPRenderingContext(null, null, state, null, null);
- MimeEnabledImageFlavor flavor = new MimeEnabledImageFlavor(ImageFlavor.RAW, MimeConstants.MIME_PDF);
- ImageRawStream stream = new ImageRawStream(null, flavor, (InputStream) null);
+ ImageRawStream stream = new ImageRawStream(null, ImageFlavor.RAW_PDF, (InputStream) null);
Assert.assertTrue(new AFPImageHandlerRawStream().isCompatible(context, stream));
+ Assert.assertFalse(Arrays.asList(
+ new AFPImageHandlerRawStream().getSupportedImageFlavors()).contains(ImageFlavor.RAW));
}
}
diff --git a/fop/lib/xmlgraphics-commons-svn-trunk.jar b/fop/lib/xmlgraphics-commons-svn-trunk.jar
index 3cdc9a723..542966f5f 100644
--- a/fop/lib/xmlgraphics-commons-svn-trunk.jar
+++ b/fop/lib/xmlgraphics-commons-svn-trunk.jar
Binary files differ