From 2f2d6c606acbb7f8fa2f864fa3229a37d7aca3fd Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Mon, 13 Jul 2020 17:45:14 +0000 Subject: [PATCH] rename internal method git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1879838 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/poi/xssf/streaming/SheetDataWriter.java | 12 ++++++------ .../poi/xssf/streaming/TestSheetDataWriter.java | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) 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 524672863f..2e8e7a7887 100644 --- a/src/ooxml/java/org/apache/poi/xssf/streaming/SheetDataWriter.java +++ b/src/ooxml/java/org/apache/poi/xssf/streaming/SheetDataWriter.java @@ -283,7 +283,7 @@ public class SheetDataWriter implements Closeable { break; } _out.write(">"); - outputQuotedString(cell.getCellFormula()); + outputEscapedString(cell.getCellFormula()); _out.write(""); switch (cell.getCachedFormulaResultType()) { case NUMERIC: @@ -298,7 +298,7 @@ public class SheetDataWriter implements Closeable { String value = cell.getStringCellValue(); if(value != null && !value.isEmpty()) { _out.write(""); - outputQuotedString(value); + outputEscapedString(value); _out.write(""); } break; @@ -311,7 +311,7 @@ public class SheetDataWriter implements Closeable { FormulaError error = FormulaError.forInt(cell.getErrorCellValue()); _out.write(">"); - outputQuotedString(error.getString()); + outputEscapedString(error.getString()); _out.write(""); break; } @@ -334,7 +334,7 @@ public class SheetDataWriter implements Closeable { writeAttribute("xml:space", "preserve"); } _out.write(">"); - outputQuotedString(cell.getStringCellValue()); + outputEscapedString(cell.getStringCellValue()); _out.write(""); } break; @@ -358,7 +358,7 @@ public class SheetDataWriter implements Closeable { writeAttribute("t", "e"); _out.write(">"); - outputQuotedString(error.getString()); + outputEscapedString(error.getString()); _out.write(""); break; } @@ -390,7 +390,7 @@ public class SheetDataWriter implements Closeable { return false; } - protected void outputQuotedString(String s) throws IOException { + protected void outputEscapedString(String s) throws IOException { if (s == null || s.length() == 0) { return; } diff --git a/src/ooxml/testcases/org/apache/poi/xssf/streaming/TestSheetDataWriter.java b/src/ooxml/testcases/org/apache/poi/xssf/streaming/TestSheetDataWriter.java index e69aacf2d5..dabd8a882d 100644 --- a/src/ooxml/testcases/org/apache/poi/xssf/streaming/TestSheetDataWriter.java +++ b/src/ooxml/testcases/org/apache/poi/xssf/streaming/TestSheetDataWriter.java @@ -58,7 +58,7 @@ public final class TestSheetDataWriter { public void testWriteUnicodeSurrogates() throws IOException { SheetDataWriter writer = new SheetDataWriter(); try { - writer.outputQuotedString(unicodeSurrogates); + writer.outputEscapedString(unicodeSurrogates); writer.close(); File file = writer.getTempFile(); try (FileInputStream is = new FileInputStream(file)) { @@ -73,7 +73,7 @@ public final class TestSheetDataWriter { public void testWriteNewLines() throws IOException { SheetDataWriter writer = new SheetDataWriter(); try { - writer.outputQuotedString("\r\n"); + writer.outputEscapedString("\r\n"); writer.close(); File file = writer.getTempFile(); try (FileInputStream is = new FileInputStream(file)) {