diff options
-rw-r--r-- | lib/xmlgraphics-commons-svn-trunk.jar | bin | 628756 -> 628816 bytes | |||
-rw-r--r-- | src/java/org/apache/fop/ResourceEventProducer.java | 8 | ||||
-rw-r--r-- | src/java/org/apache/fop/ResourceEventProducer.xml | 1 | ||||
-rw-r--r-- | src/java/org/apache/fop/render/intermediate/AbstractIFPainter.java | 7 |
4 files changed, 16 insertions, 0 deletions
diff --git a/lib/xmlgraphics-commons-svn-trunk.jar b/lib/xmlgraphics-commons-svn-trunk.jar Binary files differindex 91648b9ff..453ba2e66 100644 --- a/lib/xmlgraphics-commons-svn-trunk.jar +++ b/lib/xmlgraphics-commons-svn-trunk.jar diff --git a/src/java/org/apache/fop/ResourceEventProducer.java b/src/java/org/apache/fop/ResourceEventProducer.java index 926b7c92b..18293ff06 100644 --- a/src/java/org/apache/fop/ResourceEventProducer.java +++ b/src/java/org/apache/fop/ResourceEventProducer.java @@ -152,4 +152,12 @@ public interface ResourceEventProducer extends EventProducer { * @event.severity ERROR */ void catalogResolverNotCreated(Object source, String message); + + /** + * Warning in an image. + * @param source the event source + * @param message warning + * @event.severity WARN + */ + void imageWarning(Object source, String message); } diff --git a/src/java/org/apache/fop/ResourceEventProducer.xml b/src/java/org/apache/fop/ResourceEventProducer.xml index 0ea34af2c..d9b337dae 100644 --- a/src/java/org/apache/fop/ResourceEventProducer.xml +++ b/src/java/org/apache/fop/ResourceEventProducer.xml @@ -20,6 +20,7 @@ <message key="locator">[ (See position {loc})| (See {#gatherContextInfo})| (No context info available)]</message> <message key="imageNotFound">Image not found.[ URI: {uri}.]{{locator}}</message> <message key="imageError">Image not available.[ URI: {uri}.] Reason:[ {reason}][ {e}]{{locator}}</message> + <message key="imageWarning">Image warning.[ URI: {uri}.] Reason:[ {message}][ {e}]{{locator}}</message> <message key="imageIOError">I/O error while loading image.[ URI: {uri}.][ Reason: {ioe}]{{locator}}</message> <message key="ifoNoIntrinsicSize">The intrinsic dimensions of an instream-foreign-object could not be determined.{{locator}}</message> <message key="uriError">Error while handling URI: {uri}. Reason: {e}{{locator}}</message> diff --git a/src/java/org/apache/fop/render/intermediate/AbstractIFPainter.java b/src/java/org/apache/fop/render/intermediate/AbstractIFPainter.java index 2205aea4c..12dd46c20 100644 --- a/src/java/org/apache/fop/render/intermediate/AbstractIFPainter.java +++ b/src/java/org/apache/fop/render/intermediate/AbstractIFPainter.java @@ -155,10 +155,17 @@ public abstract class AbstractIFPainter<T extends IFDocumentHandler> implements context.putHints(hints); ImageFlavor[] flavors = imageHandlerRegistry.getSupportedFlavors(context); + info.getCustomObjects().put("warningincustomobject", true); org.apache.xmlgraphics.image.loader.Image img = manager.getImage( info, flavors, hints, sessionContext); + if (info.getCustomObjects().get("warning") != null) { + ResourceEventProducer eventProducer = ResourceEventProducer.Provider.get( + getUserAgent().getEventBroadcaster()); + eventProducer.imageWarning(this, (String)info.getCustomObjects().get("warning")); + } + try { drawImage(img, rect, context); } catch (IOException ioe) { |