diff options
author | Jeremias Maerki <jeremias@apache.org> | 2006-01-05 10:24:18 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2006-01-05 10:24:18 +0000 |
commit | 49ee2648a31a64069ca7bfdf7d4a97a9cd0ce5f2 (patch) | |
tree | a2a96b49b6bda2554509ddcf0097da39fd99d31d /src/java/org/apache | |
parent | 589fb02d05d68cd16e197972648265ac4dc82fed (diff) | |
download | xmlgraphics-fop-49ee2648a31a64069ca7bfdf7d4a97a9cd0ce5f2.tar.gz xmlgraphics-fop-49ee2648a31a64069ca7bfdf7d4a97a9cd0ce5f2.zip |
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
Diffstat (limited to 'src/java/org/apache')
-rw-r--r-- | src/java/org/apache/fop/render/rtf/BorderAttributesConverter.java | 12 |
1 files changed, 10 insertions, 2 deletions
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; } } |