From 5c9373e4378937a37d0e0a48b66ff865582cb361 Mon Sep 17 00:00:00 2001 From: Javen O'Neal Date: Sun, 29 Nov 2015 11:47:27 +0000 Subject: [PATCH] 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 --- .../java/org/apache/poi/xssf/streaming/SXSSFRow.java | 8 +++++++- .../org/apache/poi/xssf/streaming/SheetDataWriter.java | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) 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) { -- 2.39.5