You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by je...@apache.org on 2006/01/05 11:24:24 UTC

svn commit: r366148 - in /xmlgraphics/fop/trunk: src/java/org/apache/fop/render/rtf/BorderAttributesConverter.java status.xml

Author: jeremias
Date: Thu Jan  5 02:24:18 2006
New Revision: 366148

URL: http://svn.apache.org/viewcvs?rev=366148&view=rev
Log:
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.

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/BorderAttributesConverter.java
    xmlgraphics/fop/trunk/status.xml

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/BorderAttributesConverter.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/BorderAttributesConverter.java?rev=366148&r1=366147&r2=366148&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/BorderAttributesConverter.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/BorderAttributesConverter.java Thu Jan  5 02:24:18 2006
@@ -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 @@
            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 @@
        } else if (iBorderStyle==Constant value.equals("engrave")) {
            return IBorderAttributes.BORDER_ENGRAVE;*/
        } else {
-           return null;
+           return IBorderAttributes.BORDER_SINGLE_THICKNESS;
        }
 
    }

Modified: xmlgraphics/fop/trunk/status.xml
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/status.xml?rev=366148&r1=366147&r2=366148&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/status.xml (original)
+++ xmlgraphics/fop/trunk/status.xml Thu Jan  5 02:24:18 2006
@@ -27,6 +27,9 @@
 
   <changes>
     <release version="FOP Trunk">
+      <action context="Code" dev="JM" type="fix" fixes-bug="38132">
+        Bugfix: Certain border styles could lead to a NullPointerException.
+      </action>
       <action context="Code" dev="JM" type="fix" fixes-bug="38102">
         Bugfix: Space was not adjusted if the space was on a nested block. This could
         lead to content overflowing the bottom of a page.



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org