From adbd5aac98fc107156ee108092ab25cf502c1491 Mon Sep 17 00:00:00 2001 From: Mehdi Houshmand Date: Wed, 18 Jul 2012 09:12:10 +0000 Subject: [PATCH] Bugzilla#53563: Removed a method call that could cause a java.awt.HeadlessException in PCLGraphics2D (brought it inline with PDF/PS/AFP-Graphics2D classes) git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1362823 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/render/pcl/PCLGraphics2D.java | 5 ++--- status.xml | 4 ++++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/java/org/apache/fop/render/pcl/PCLGraphics2D.java b/src/java/org/apache/fop/render/pcl/PCLGraphics2D.java index 3fc988110..0fbf86c2c 100644 --- a/src/java/org/apache/fop/render/pcl/PCLGraphics2D.java +++ b/src/java/org/apache/fop/render/pcl/PCLGraphics2D.java @@ -25,7 +25,6 @@ import java.awt.Dimension; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.GraphicsConfiguration; -import java.awt.GraphicsEnvironment; import java.awt.Image; import java.awt.Paint; import java.awt.Shape; @@ -44,6 +43,7 @@ import java.text.AttributedCharacterIterator; import org.apache.xmlgraphics.java2d.AbstractGraphics2D; import org.apache.xmlgraphics.java2d.GraphicContext; +import org.apache.xmlgraphics.java2d.GraphicsConfigurationWithTransparency; import org.apache.xmlgraphics.util.UnitConv; /** @@ -127,8 +127,7 @@ public class PCLGraphics2D extends AbstractGraphics2D { /** {@inheritDoc} */ public GraphicsConfiguration getDeviceConfiguration() { - return GraphicsEnvironment.getLocalGraphicsEnvironment() - .getDefaultScreenDevice().getDefaultConfiguration(); + return new GraphicsConfigurationWithTransparency(); } /** diff --git a/status.xml b/status.xml index 05b8694d2..c5448e477 100644 --- a/status.xml +++ b/status.xml @@ -63,6 +63,10 @@ documents. Example: the fix of marks layering will be such a case when it's done. --> + + Removed a method call to the java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice() + that could (in a headless environment) throw a java.awt.HeadlessException + When PDF accessibility is enabled, treat repeated table headings as artifacts. This allows screen readers to read the header only once at the beginning of the table and the footer -- 2.39.5