poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject svn commit: r1691078 - /poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFBorderFormatting.java
Date Tue, 14 Jul 2015 20:40:15 GMT
Author: nick
Date: Tue Jul 14 20:40:15 2015
New Revision: 1691078

URL: http://svn.apache.org/r1691078
Log:
Unset the border formattings when set to 0

Modified:
    poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFBorderFormatting.java

Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFBorderFormatting.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFBorderFormatting.java?rev=1691078&r1=1691077&r2=1691078&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFBorderFormatting.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFBorderFormatting.java Tue Jul 14
20:40:15 2015
@@ -95,7 +95,7 @@ public final class HSSFBorderFormatting
 
     public void setBackwardDiagonalOn(boolean on) {
         borderFormatting.setBackwardDiagonalOn(on);
-        if (on ) {
+        if (on) {
             cfRuleRecord.setTopLeftBottomRightBorderModified(on);
         }
     }
@@ -114,6 +114,9 @@ public final class HSSFBorderFormatting
         if (border != 0) {
             cfRuleRecord.setBottomLeftTopRightBorderModified(true);
             cfRuleRecord.setTopLeftBottomRightBorderModified(true);
+        } else {
+            cfRuleRecord.setBottomLeftTopRightBorderModified(false);
+            cfRuleRecord.setTopLeftBottomRightBorderModified(false);
         }
     }
 
@@ -121,6 +124,8 @@ public final class HSSFBorderFormatting
         borderFormatting.setBorderLeft(border);
         if (border != 0) {
             cfRuleRecord.setLeftBorderModified(true);
+        } else {
+            cfRuleRecord.setLeftBorderModified(false);
         }
     }
 
@@ -128,6 +133,8 @@ public final class HSSFBorderFormatting
         borderFormatting.setBorderRight(border);
         if (border != 0) {
             cfRuleRecord.setRightBorderModified(true);
+        } else {
+            cfRuleRecord.setRightBorderModified(false);
         }
     }
 
@@ -135,6 +142,8 @@ public final class HSSFBorderFormatting
         borderFormatting.setBorderTop(border);
         if (border != 0) {
             cfRuleRecord.setTopBorderModified(true);
+        } else {
+            cfRuleRecord.setTopBorderModified(false);
         }
     }
 
@@ -142,6 +151,8 @@ public final class HSSFBorderFormatting
         borderFormatting.setBottomBorderColor(color);
         if (color != 0) {
             cfRuleRecord.setBottomBorderModified(true);
+        } else {
+            cfRuleRecord.setBottomBorderModified(false);
         }
     }
 
@@ -150,12 +161,15 @@ public final class HSSFBorderFormatting
         if (color != 0) {
             cfRuleRecord.setBottomLeftTopRightBorderModified(true);
             cfRuleRecord.setTopLeftBottomRightBorderModified(true);
+        } else {
+            cfRuleRecord.setBottomLeftTopRightBorderModified(false);
+            cfRuleRecord.setTopLeftBottomRightBorderModified(false);
         }
     }
 
     public void setForwardDiagonalOn(boolean on) {
         borderFormatting.setForwardDiagonalOn(on);
-        if (on ) {
+        if (on) {
             cfRuleRecord.setBottomLeftTopRightBorderModified(on);
         }
     }
@@ -164,6 +178,8 @@ public final class HSSFBorderFormatting
         borderFormatting.setLeftBorderColor(color);
         if (color != 0) {
             cfRuleRecord.setLeftBorderModified(true);
+        } else {
+            cfRuleRecord.setLeftBorderModified(false);
         }
     }
 
@@ -171,6 +187,8 @@ public final class HSSFBorderFormatting
         borderFormatting.setRightBorderColor(color);
         if (color != 0) {
             cfRuleRecord.setRightBorderModified(true);
+        } else {
+            cfRuleRecord.setRightBorderModified(false);
         }
     }
 
@@ -178,6 +196,8 @@ public final class HSSFBorderFormatting
         borderFormatting.setTopBorderColor(color);
         if (color != 0) {
             cfRuleRecord.setTopBorderModified(true);
+        } else {
+            cfRuleRecord.setTopBorderModified(false);
         }
     }
 }



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


Mime
View raw message