From: Javen O'Neal Date: Sun, 29 Nov 2015 11:47:27 +0000 (+0000) Subject: make SXSSFRow._style private, add getRowStyleIndex() in its place X-Git-Tag: REL_3_14_BETA1~60 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5c9373e4378937a37d0e0a48b66ff865582cb361;p=poi.git make SXSSFRow._style private, add getRowStyleIndex() in its place git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1717042 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFRow.java b/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFRow.java index 52e9443cb1..cbf3bad804 100644 --- a/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFRow.java +++ b/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFRow.java @@ -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 null. diff --git a/src/ooxml/java/org/apache/poi/xssf/streaming/SheetDataWriter.java b/src/ooxml/java/org/apache/poi/xssf/streaming/SheetDataWriter.java index 70bdef842e..992dc07918 100644 --- a/src/ooxml/java/org/apache/poi/xssf/streaming/SheetDataWriter.java +++ b/src/ooxml/java/org/apache/poi/xssf/streaming/SheetDataWriter.java @@ -161,7 +161,7 @@ public class SheetDataWriter { if (row.getZeroHeight()) _out.write(" hidden=\"true\""); if (row.isFormatted()) { - _out.write(" s=\"" + row._style + "\""); + _out.write(" s=\"" + row.getRowStyleIndex() + "\""); _out.write(" customFormat=\"1\""); } if (row.getOutlineLevel() != 0) {