From: Jeremias Maerki Date: Thu, 5 Jan 2006 10:24:18 +0000 (+0000) Subject: Bugzilla #38132: X-Git-Tag: fop-0_92-beta~225 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=49ee2648a31a64069ca7bfdf7d4a97a9cd0ce5f2;p=xmlgraphics-fop.git Bugzilla #38132: Bugfix: Certain border styles could lead to a NullPointerException. inset and groove are now mapped to RTF's "engrave", outset and ridge to "emboss". If no mapping can be found the "solid" style is used. Before null was returned which was the cause for the NPE. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@366148 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/render/rtf/BorderAttributesConverter.java b/src/java/org/apache/fop/render/rtf/BorderAttributesConverter.java index 54119c09f..43adc449f 100644 --- a/src/java/org/apache/fop/render/rtf/BorderAttributesConverter.java +++ b/src/java/org/apache/fop/render/rtf/BorderAttributesConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 1999-2005 The Apache Software Foundation. + * Copyright 1999-2006 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -101,6 +101,14 @@ public class BorderAttributesConverter { return IBorderAttributes.BORDER_DOTTED; } else if (iBorderStyle == Constants.EN_DASHED) { return IBorderAttributes.BORDER_DASH; + } else if (iBorderStyle == Constants.EN_GROOVE) { + return IBorderAttributes.BORDER_ENGRAVE; + } else if (iBorderStyle == Constants.EN_RIDGE) { + return IBorderAttributes.BORDER_EMBOSS; + } else if (iBorderStyle == Constants.EN_INSET) { + return IBorderAttributes.BORDER_ENGRAVE; + } else if (iBorderStyle == Constants.EN_OUTSET) { + return IBorderAttributes.BORDER_EMBOSS; /* } else if (iBorderStyle==Constants value.equals("hairline")) { return IBorderAttributes.BORDER_HAIRLINE;*/ /* } else if (iBorderStyle==Constant value.equals("dot-dash")) { @@ -120,7 +128,7 @@ public class BorderAttributesConverter { } else if (iBorderStyle==Constant value.equals("engrave")) { return IBorderAttributes.BORDER_ENGRAVE;*/ } else { - return null; + return IBorderAttributes.BORDER_SINGLE_THICKNESS; } } diff --git a/status.xml b/status.xml index 403c91bc2..a0a333cb0 100644 --- a/status.xml +++ b/status.xml @@ -27,6 +27,9 @@ + + Bugfix: Certain border styles could lead to a NullPointerException. + Bugfix: Space was not adjusted if the space was on a nested block. This could lead to content overflowing the bottom of a page.