Fix inconsistent indents
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1682081 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
03805d9e20
commit
4e3011f70a
@ -731,7 +731,7 @@ public class DataFormatter {
|
|||||||
* @see #formatCellValue(Cell)
|
* @see #formatCellValue(Cell)
|
||||||
*/
|
*/
|
||||||
public String formatRawCellContents(double value, int formatIndex, String formatString) {
|
public String formatRawCellContents(double value, int formatIndex, String formatString) {
|
||||||
return formatRawCellContents(value, formatIndex, formatString, false);
|
return formatRawCellContents(value, formatIndex, formatString, false);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Formats the given raw cell value, based on the supplied
|
* Formats the given raw cell value, based on the supplied
|
||||||
@ -744,28 +744,28 @@ public class DataFormatter {
|
|||||||
if(DateUtil.isValidExcelDate(value)) {
|
if(DateUtil.isValidExcelDate(value)) {
|
||||||
Format dateFormat = getFormat(value, formatIndex, formatString);
|
Format dateFormat = getFormat(value, formatIndex, formatString);
|
||||||
if(dateFormat instanceof ExcelStyleDateFormatter) {
|
if(dateFormat instanceof ExcelStyleDateFormatter) {
|
||||||
// Hint about the raw excel value
|
// Hint about the raw excel value
|
||||||
((ExcelStyleDateFormatter)dateFormat).setDateToBeFormatted(value);
|
((ExcelStyleDateFormatter)dateFormat).setDateToBeFormatted(value);
|
||||||
}
|
}
|
||||||
Date d = DateUtil.getJavaDate(value, use1904Windowing);
|
Date d = DateUtil.getJavaDate(value, use1904Windowing);
|
||||||
return performDateFormatting(d, dateFormat);
|
return performDateFormatting(d, dateFormat);
|
||||||
}
|
}
|
||||||
// RK: Invalid dates are 255 #s.
|
// RK: Invalid dates are 255 #s.
|
||||||
if (emulateCsv) {
|
if (emulateCsv) {
|
||||||
return invalidDateTimeString;
|
return invalidDateTimeString;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// else Number
|
// else Number
|
||||||
Format numberFormat = getFormat(value, formatIndex, formatString);
|
Format numberFormat = getFormat(value, formatIndex, formatString);
|
||||||
if (numberFormat == null) {
|
if (numberFormat == null) {
|
||||||
return String.valueOf(value);
|
return String.valueOf(value);
|
||||||
}
|
}
|
||||||
// RK: This hack handles scientific notation by adding the missing + back.
|
// RK: This hack handles scientific notation by adding the missing + back.
|
||||||
String result = numberFormat.format(new Double(value));
|
String result = numberFormat.format(new Double(value));
|
||||||
if (result.contains("E") && !result.contains("E-")) {
|
if (result.contains("E") && !result.contains("E-")) {
|
||||||
result = result.replaceFirst("E", "E+");
|
result = result.replaceFirst("E", "E+");
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user