diff options
author | Nick Burch <nick@apache.org> | 2015-10-24 23:34:47 +0000 |
---|---|---|
committer | Nick Burch <nick@apache.org> | 2015-10-24 23:34:47 +0000 |
commit | b3f68c4eb4f81cfda99bc449b922c12abf348ade (patch) | |
tree | b78e23301ec7ed5c825854abe91f8387fba4f964 /src/ooxml/testcases/org/apache/poi | |
parent | cbde002fa1356f53b382b97797229ed209ee522f (diff) | |
download | poi-b3f68c4eb4f81cfda99bc449b922c12abf348ade.tar.gz poi-b3f68c4eb4f81cfda99bc449b922c12abf348ade.zip |
#58532 For Excel cell formats with 3+ parts to them (eg +ve,-ve,0), which
DataFormatter didn't properly support, call out to the alternate CellFormat
instead for the formatting.
This also allows us to enable some disabled parts of DataFormatter unit tests
We still need to rationalise DataFormatter and CellFormatter though, so we
only have one set of cell formatting logic...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1710399 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/ooxml/testcases/org/apache/poi')
-rw-r--r-- | src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFDataFormat.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFDataFormat.java b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFDataFormat.java index 32bcaef785..d7d77d8297 100644 --- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFDataFormat.java +++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFDataFormat.java @@ -35,7 +35,7 @@ public final class TestXSSFDataFormat extends BaseTestDataFormat { /** * [Bug 49928] formatCellValue returns incorrect value for \u00a3 formatted cells */ - public void test49928(){ + public void test49928() { XSSFWorkbook wb = XSSFTestDataSamples.openSampleWorkbook("49928.xlsx"); doTest49928Core(wb); @@ -49,4 +49,12 @@ public final class TestXSSFDataFormat extends BaseTestDataFormat { assertTrue(customFmtIdx > BuiltinFormats.FIRST_USER_DEFINED_FORMAT_INDEX ); assertEquals("\u00a3##.00[Yellow]", dataFormat.getFormat(customFmtIdx)); } + + /** + * [Bug 58532] Handle formats that go numnum, numK, numM etc + */ + public void test58532() { + XSSFWorkbook wb = XSSFTestDataSamples.openSampleWorkbook("FormatKM.xlsx"); + doTest58532Core(wb); + } } |