mirror of https://github.com/apache/poi.git
rename internal method
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1879838 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
af83fda6b8
commit
2f2d6c606a
|
@ -283,7 +283,7 @@ public class SheetDataWriter implements Closeable {
|
|||
break;
|
||||
}
|
||||
_out.write("><f>");
|
||||
outputQuotedString(cell.getCellFormula());
|
||||
outputEscapedString(cell.getCellFormula());
|
||||
_out.write("</f>");
|
||||
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("<v>");
|
||||
outputQuotedString(value);
|
||||
outputEscapedString(value);
|
||||
_out.write("</v>");
|
||||
}
|
||||
break;
|
||||
|
@ -311,7 +311,7 @@ public class SheetDataWriter implements Closeable {
|
|||
FormulaError error = FormulaError.forInt(cell.getErrorCellValue());
|
||||
|
||||
_out.write("><v>");
|
||||
outputQuotedString(error.getString());
|
||||
outputEscapedString(error.getString());
|
||||
_out.write("</v>");
|
||||
break;
|
||||
}
|
||||
|
@ -334,7 +334,7 @@ public class SheetDataWriter implements Closeable {
|
|||
writeAttribute("xml:space", "preserve");
|
||||
}
|
||||
_out.write(">");
|
||||
outputQuotedString(cell.getStringCellValue());
|
||||
outputEscapedString(cell.getStringCellValue());
|
||||
_out.write("</t></is>");
|
||||
}
|
||||
break;
|
||||
|
@ -358,7 +358,7 @@ public class SheetDataWriter implements Closeable {
|
|||
|
||||
writeAttribute("t", "e");
|
||||
_out.write("><v>");
|
||||
outputQuotedString(error.getString());
|
||||
outputEscapedString(error.getString());
|
||||
_out.write("</v>");
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -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)) {
|
||||
|
|
Loading…
Reference in New Issue