]> source.dussan.org Git - poi.git/commitdiff
make SXSSFRow._style private, add getRowStyleIndex() in its place
authorJaven O'Neal <onealj@apache.org>
Sun, 29 Nov 2015 11:47:27 +0000 (11:47 +0000)
committerJaven O'Neal <onealj@apache.org>
Sun, 29 Nov 2015 11:47:27 +0000 (11:47 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1717042 13f79535-47bb-0310-9956-ffa450edef68

src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFRow.java
src/ooxml/java/org/apache/poi/xssf/streaming/SheetDataWriter.java

index 52e9443cb1a3ca7ff54f035e37cd48034436971f..cbf3bad804571e87dbe193eee4e614ffda9f98f3 100644 (file)
@@ -25,6 +25,7 @@ import org.apache.poi.ss.usermodel.Cell;
 import org.apache.poi.ss.usermodel.CellStyle;
 import org.apache.poi.ss.usermodel.Row;
 import org.apache.poi.ss.usermodel.Sheet;
+import org.apache.poi.util.Internal;
 
 /**
  * Streaming version of XSSFRow implementing the "BigGridDemo" strategy.
@@ -36,7 +37,7 @@ public class SXSSFRow implements Row
     SXSSFSheet _sheet;
     SXSSFCell[] _cells;
     int _maxColumn=-1;
-    short _style=-1;
+    private short _style=-1;
     short _height=-1;
     boolean _zHeight = false;
     int _outlineLevel = 0;   // Outlining level of the row, when outlining is on
@@ -404,6 +405,11 @@ public class SXSSFRow implements Row
        return getSheet().getWorkbook().getCellStyleAt(_style);
     }
     
+    @Internal
+    /*package*/ int getRowStyleIndex() {
+        return _style;
+    }
+    
     /**
      * Applies a whole-row cell styling to the row.
      * The row style can be cleared by passing in <code>null</code>.
index 70bdef842ecfe21cb68385e3a3e06a1c6c841e4c..992dc0791879a7b43db8edb07b8650aaf8e4d8fe 100644 (file)
@@ -161,7 +161,7 @@ public class SheetDataWriter {
         if (row.getZeroHeight())\r
             _out.write(" hidden=\"true\"");\r
         if (row.isFormatted()) {\r
-            _out.write(" s=\"" + row._style + "\"");\r
+            _out.write(" s=\"" + row.getRowStyleIndex() + "\"");\r
             _out.write(" customFormat=\"1\"");\r
         }\r
         if (row.getOutlineLevel() != 0) {\r