Commit Graph

1992 Commits

Author SHA1 Message Date
PJ Fanning
7dad60e9d4 update getCellType to return CellType enum instead of int
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808718 13f79535-47bb-0310-9956-ffa450edef68
2017-09-18 13:58:55 +00:00
PJ Fanning
4a4c428b6b update getCellType to return CellType enum instead of int
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808703 13f79535-47bb-0310-9956-ffa450edef68
2017-09-18 13:38:07 +00:00
PJ Fanning
d4486af6de update getCellType to return CellType enum instead of int
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808700 13f79535-47bb-0310-9956-ffa450edef68
2017-09-18 13:26:16 +00:00
Dominik Stadler
71cfb659a1 Remove deprecated methods from NPOIFSFileSystem/OPOIFSFileSystem
IntelliJ warnings/suggestions

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808622 13f79535-47bb-0310-9956-ffa450edef68
2017-09-17 11:08:45 +00:00
Dominik Stadler
b644047b70 Various code cleanups, "final" for static methods is useless, for-loops, simplify boolean conditions, try-with-resource, javadoc, ...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808620 13f79535-47bb-0310-9956-ffa450edef68
2017-09-17 11:08:23 +00:00
Dominik Stadler
1f4344a048 Fix some compiler warnings
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808523 13f79535-47bb-0310-9956-ffa450edef68
2017-09-16 08:29:28 +00:00
Dominik Stadler
2600c60fb5 Use Integer.compare() where possible
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808522 13f79535-47bb-0310-9956-ffa450edef68
2017-09-16 08:29:20 +00:00
Dominik Stadler
8b564f1185 Fix some warnings in unit tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808521 13f79535-47bb-0310-9956-ffa450edef68
2017-09-16 08:29:06 +00:00
Dominik Stadler
5341a131de Remove unnecessary local variables
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808518 13f79535-47bb-0310-9956-ffa450edef68
2017-09-16 08:28:38 +00:00
Dominik Stadler
7937da6a10 Remove unnecessary type arguments (Java 8)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808516 13f79535-47bb-0310-9956-ffa450edef68
2017-09-16 08:27:23 +00:00
Dominik Stadler
d4070f05e7 Remove unnecessary type arguments
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808515 13f79535-47bb-0310-9956-ffa450edef68
2017-09-16 08:24:05 +00:00
Dominik Stadler
87f5a0c7cd Remove unused imports
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808513 13f79535-47bb-0310-9956-ffa450edef68
2017-09-16 08:23:48 +00:00
Dominik Stadler
8ca329e08b Remove unnecessary casts and toString() calls
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808512 13f79535-47bb-0310-9956-ffa450edef68
2017-09-16 08:23:30 +00:00
Dominik Stadler
0ce7fff0be Remove unnecessary semicolons
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808511 13f79535-47bb-0310-9956-ffa450edef68
2017-09-16 08:23:15 +00:00
Dominik Stadler
f27cb3354d Remove unnecessary initialization of members
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808510 13f79535-47bb-0310-9956-ffa450edef68
2017-09-16 08:22:59 +00:00
Dominik Stadler
e57e73fe38 Let IntelliJ cleanup some code-warnings across the whole code-base: unnecessary casts
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808508 13f79535-47bb-0310-9956-ffa450edef68
2017-09-16 08:21:28 +00:00
Dominik Stadler
445852e773 Tried to reproduce bug 61300, but could not.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808502 13f79535-47bb-0310-9956-ffa450edef68
2017-09-16 08:20:25 +00:00
PJ Fanning
8f53bd94a6 remove some deprecated code slated for removal in 3.18
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808455 13f79535-47bb-0310-9956-ffa450edef68
2017-09-15 12:29:35 +00:00
PJ Fanning
7863d0b312 remove deprecated inner classes from HSFColor
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808432 13f79535-47bb-0310-9956-ffa450edef68
2017-09-15 08:29:31 +00:00
PJ Fanning
19d58f3657 remove some deprecated code slated for removal in 3.18
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808403 13f79535-47bb-0310-9956-ffa450edef68
2017-09-14 23:44:47 +00:00
PJ Fanning
4d1907b447 remove some deprecated code slated for removal in 3.18
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808402 13f79535-47bb-0310-9956-ffa450edef68
2017-09-14 23:09:08 +00:00
PJ Fanning
18e53b3bef add missing licenses on test classes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808315 13f79535-47bb-0310-9956-ffa450edef68
2017-09-14 07:21:33 +00:00
Tim Allison
4852228f3f 60279 -- back off to brute-force search for macro content if offset information is not correct
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808301 13f79535-47bb-0310-9956-ffa450edef68
2017-09-14 02:22:55 +00:00
PJ Fanning
5ef2f1636c Numeric Array Formula and Matrix Function [from Bob95132] This closes #69
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808297 13f79535-47bb-0310-9956-ffa450edef68
2017-09-13 23:54:36 +00:00
Dominik Stadler
20fa8328f4 Verify that bug 61294 is fixed now, add some more coverage for IOUtils in general
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1806162 13f79535-47bb-0310-9956-ffa450edef68
2017-08-25 11:51:18 +00:00
Dominik Stadler
2108f82449 Fix 60384 and 60709: When shifting with merged regions we should correctly check if the region is moved along or needs to be removed because it is not fully kept via the shifting. This was broken by the fix for bug 59740, now additional unit tests ensure that it works better.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1805518 13f79535-47bb-0310-9956-ffa450edef68
2017-08-19 16:31:45 +00:00
Andreas Beeker
6f341568b6 #61381 - PushbackInputStreams passed to ZipHelper may not hold 8 bytes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1804854 13f79535-47bb-0310-9956-ffa450edef68
2017-08-11 20:47:48 +00:00
Dominik Stadler
b3ad734de1 Assert on the contents of the byte-array to see if the problem happens during writing the data or reading it back in
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1803614 13f79535-47bb-0310-9956-ffa450edef68
2017-08-01 06:26:44 +00:00
Andreas Beeker
ff2bcdf62d #61363 - Unify escher shape id allocation
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1803483 13f79535-47bb-0310-9956-ffa450edef68
2017-07-30 23:11:36 +00:00
Dominik Stadler
cc0294d58b Refactor test somewhat to make it easier to see what it actually verifies
Check some more to see why it fails sometimes in CI, e.g. on node qnode1

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1802817 13f79535-47bb-0310-9956-ffa450edef68
2017-07-24 14:16:34 +00:00
PJ Fanning
810d03f499 javadoc: replace invalid self enclosing elements
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1802110 13f79535-47bb-0310-9956-ffa450edef68
2017-07-17 08:24:24 +00:00
PJ Fanning
9b3812d027 some javadoc fixes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1802035 13f79535-47bb-0310-9956-ffa450edef68
2017-07-15 22:31:09 +00:00
Tim Allison
408e236553 bug 61300 -- prevent really long (infinite?) loop on corrupt file
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1801989 13f79535-47bb-0310-9956-ffa450edef68
2017-07-14 20:47:40 +00:00
Tim Allison
2398bb7a60 clean up whitespace and indents
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1801969 13f79535-47bb-0310-9956-ffa450edef68
2017-07-14 14:19:21 +00:00
Tim Allison
b0b3ad66ba avoid using non-ascii in unit tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1801968 13f79535-47bb-0310-9956-ffa450edef68
2017-07-14 14:17:55 +00:00
Tim Allison
93b1f0664c bug 61286/bug 61287 -- allow WriteProtectRecord to have 2 bytes, and allow for HeaderFooter to be empty.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1801966 13f79535-47bb-0310-9956-ffa450edef68
2017-07-14 13:54:06 +00:00
Tim Allison
c7db66a30d bug 61294 -- cleaned up based on PJ Fanning's code review. Went with a copy/paste from commons-io.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1801952 13f79535-47bb-0310-9956-ffa450edef68
2017-07-14 12:48:28 +00:00
Tim Allison
278a235b08 bug 61294 -- prevent infinite loop in IOUtils' skipFully.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1801844 13f79535-47bb-0310-9956-ffa450edef68
2017-07-13 16:20:28 +00:00
Javen O'Neal
08a624f172 github #43: fix roundUp and roundDown.
Thanks to @FishMeat on github for the patch.
This closes #43 on github.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1801798 13f79535-47bb-0310-9956-ffa450edef68
2017-07-13 03:35:06 +00:00
Nick Burch
05c7c16308 #61266 Test for old unsupported MS Write WRI files, and give a more helpful exception if found, plus unit tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1801376 13f79535-47bb-0310-9956-ffa450edef68
2017-07-09 16:26:33 +00:00
PJ Fanning
cfc7aa4315 [Bug 58975] add test case for new function args default of 255
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1801307 13f79535-47bb-0310-9956-ffa450edef68
2017-07-08 18:15:49 +00:00
PJ Fanning
23567cd3a0 [github-25] support excel number trailing comma format - Thabks to Luca Martini for proving the patch
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800975 13f79535-47bb-0310-9956-ffa450edef68
2017-07-06 07:56:57 +00:00
PJ Fanning
a0aa8807b5 [Bug 58975] do not cast numberOfOperands to byte in AbstractFunctionPtg
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800949 13f79535-47bb-0310-9956-ffa450edef68
2017-07-05 22:56:32 +00:00
PJ Fanning
86f7d0b896 [Bug 60422] fix data formatter issue with specific format in German locale
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800713 13f79535-47bb-0310-9956-ffa450edef68
2017-07-03 20:56:02 +00:00
PJ Fanning
e02f6e038f Remove check for jdk1.5 in test because POI now only supports jre1.6 and up
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800696 13f79535-47bb-0310-9956-ffa450edef68
2017-07-03 16:16:35 +00:00
PJ Fanning
0aa4406a08 add test case for date formatting using different locales
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800558 13f79535-47bb-0310-9956-ffa450edef68
2017-07-02 12:29:37 +00:00
Andreas Beeker
a09a3398cc #61243 - Refactor and unify toString/toXml in DDF
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800452 13f79535-47bb-0310-9956-ffa450edef68
2017-06-30 20:21:33 +00:00
PJ Fanning
ee70c9a8fb Remove more deprecated code (especially from Spreadsheet Cell classes)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800375 13f79535-47bb-0310-9956-ffa450edef68
2017-06-30 11:48:23 +00:00
PJ Fanning
1281127420 remove deprecated org.apache.poi.hssf.record.RecordFormatException
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800249 13f79535-47bb-0310-9956-ffa450edef68
2017-06-29 08:37:02 +00:00
PJ Fanning
657784ce1a Remove old XSSFWorkbook wb.xssfSheetIterator method
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800248 13f79535-47bb-0310-9956-ffa450edef68
2017-06-29 08:15:50 +00:00
PJ Fanning
5c65b55bd4 Ensure SpreadsheetVersion is set for AreaReferences
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800208 13f79535-47bb-0310-9956-ffa450edef68
2017-06-28 22:11:26 +00:00
PJ Fanning
4209a1b2da Remove some deprecated *SSF APIs
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800147 13f79535-47bb-0310-9956-ffa450edef68
2017-06-28 10:34:37 +00:00
PJ Fanning
03d4e52bc0 expand StaxHelper
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1799772 13f79535-47bb-0310-9956-ffa450edef68
2017-06-24 13:53:47 +00:00
PJ Fanning
eee5205d0c [Bug 60422] Fix forbidden-api build issue
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1799723 13f79535-47bb-0310-9956-ffa450edef68
2017-06-24 00:37:03 +00:00
PJ Fanning
c1cc93a2ef [Bug 60422] Tidy up test case
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1799722 13f79535-47bb-0310-9956-ffa450edef68
2017-06-24 00:15:20 +00:00
PJ Fanning
66b39c70ad Bug 60422 add testtestcase with current LocaleUtil workaround
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1799721 13f79535-47bb-0310-9956-ffa450edef68
2017-06-23 23:42:25 +00:00
Tim Allison
649280df8c bug 61045 -- allow for (and log!) extra bytes in FormatRecord.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1799360 13f79535-47bb-0310-9956-ffa450edef68
2017-06-20 18:11:34 +00:00
Javen O'Neal
4d692223bb whitespace
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1799303 13f79535-47bb-0310-9956-ffa450edef68
2017-06-20 05:51:48 +00:00
Javen O'Neal
5de40d3261 bug 52063: support 2-argument LOOKUP(lookup_value, array) function in Excel
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1799302 13f79535-47bb-0310-9956-ffa450edef68
2017-06-20 05:47:56 +00:00
Dominik Stadler
2095c92402 Improve error message if we encounter invalid/unexpected files in integration tests
Adjust some tests slightly

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1799178 13f79535-47bb-0310-9956-ffa450edef68
2017-06-19 11:05:20 +00:00
Dominik Stadler
05570364db Move one testcase with incorrect source location
remove some junit dependencies in example-code
build: do not pass junit-jar to normal compile targets to avoid introducing it as dependency again 
Reformat code, fix warnings, ...

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1798202 13f79535-47bb-0310-9956-ffa450edef68
2017-06-09 12:49:01 +00:00
Andreas Beeker
efccafd898 fix eclipse resource leak warnings
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1797043 13f79535-47bb-0310-9956-ffa450edef68
2017-05-31 14:10:18 +00:00
Greg Woolsey
479b45ced9 Bug 60898 - XSSFColor's getARGB() method returns a wrong color value when a workbook has a custom indexed color
Missed this test.  As part of the work I noticed the Enum was missing some values defined in the OOXML spec, so I added them.

I've updated the test to reflect that those values are no longer invalid.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1796360 13f79535-47bb-0310-9956-ffa450edef68
2017-05-26 23:37:04 +00:00
Dominik Stadler
d868026959 Bug 61063: Add a RefListEval to handle UnionPtg and implement it for Rank(), may be missing for other functions where ArrayEval is currently handled
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1795963 13f79535-47bb-0310-9956-ffa450edef68
2017-05-23 21:13:02 +00:00
Javen O'Neal
7881d05743 github-55: document that CellReference#isRowWithinRange(String rowNum, SpreadsheetVersion ss) expects rowNum to be parseable as an integer
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1795681 13f79535-47bb-0310-9956-ffa450edef68
2017-05-20 21:04:14 +00:00
Javen O'Neal
0b767886bf replace "String.indexOf(String) >= 1" with "String.contains(String)"
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1795296 13f79535-47bb-0310-9956-ffa450edef68
2017-05-16 10:53:15 +00:00
Javen O'Neal
be5106a1d7 github-43: add disabled unit test showing a problem with ROUNDUP(3987*0.2, 2). Thanks to @FishMeat.
https://github.com/apache/poi/pull/43

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1795265 13f79535-47bb-0310-9956-ffa450edef68
2017-05-16 03:04:12 +00:00
Andreas Beeker
90dca20bd2 #52117 - Invalid "last printed" summary field value - added helper method to identify undefined dates
HPSF: fixed uid listing in Section.toString()
HPSF: moved timestamp based "utility" methods to Filetime class
HPSF: preserve original datastream for unchanged property sets

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1795123 13f79535-47bb-0310-9956-ffa450edef68
2017-05-14 22:25:33 +00:00
Andreas Beeker
76dbb5a1eb HPSF: Change CustomProperties to delegate
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1793699 13f79535-47bb-0310-9956-ffa450edef68
2017-05-03 19:18:45 +00:00
Andreas Beeker
3a1771ced1 HPSF: Enable new number types in VariantSupport
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1793598 13f79535-47bb-0310-9956-ffa450edef68
2017-05-02 23:28:00 +00:00
Andreas Beeker
456b33a837 Fix hpsf javadocs and code issues
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1793596 13f79535-47bb-0310-9956-ffa450edef68
2017-05-02 23:27:27 +00:00
Dominik Stadler
fa39402871 60325: Add commented out test that reproduces the performance issue
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1793251 13f79535-47bb-0310-9956-ffa450edef68
2017-04-30 09:12:36 +00:00
Javen O'Neal
e39ae9cd30 bug 61034: Call to XSSFReader.getSheetsData() returns duplicate sheets.
Thanks to Mauricio Eastmond for the Excel test file and unit test.
Thanks to Sebastian Wikalinski for isolating the problem and providing a patch.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1793223 13f79535-47bb-0310-9956-ffa450edef68
2017-04-29 17:27:17 +00:00
Tim Allison
5f567f29a1 bug 61049 fix ordering of builtin formulas
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1792918 13f79535-47bb-0310-9956-ffa450edef68
2017-04-27 16:18:25 +00:00
Javen O'Neal
3c2a6b38bb Use assertContains instead of assertTrue(text.contains) for better error messages on failure
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1792009 13f79535-47bb-0310-9956-ffa450edef68
2017-04-20 01:28:40 +00:00
Javen O'Neal
3cbf4740b1 Use assertContains instead of assertTrue(text.contains) for better error messages on failure
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1792007 13f79535-47bb-0310-9956-ffa450edef68
2017-04-19 23:51:03 +00:00
Greg Woolsey
6e0a5916b5 Fix bug #61007
Revert to previous "expected" test results even though they don't match excel for a specific case, to accommodate tighter logic about which format patterns to send to CellFormat vs. handle directly in DataFormatter.

Send what was checked previously plus only multi-segment conditional range formats.  Allows existing tests to pass plus the new test with the case for these conditional formats.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1791964 13f79535-47bb-0310-9956-ffa450edef68
2017-04-19 20:04:46 +00:00
Greg Woolsey
d1b92fe2d8 Fix bug #61007
use CellFormat for all format strings containing multiple parts (";" delimited) and update unit test to expect the same values as Excel.  Also added tests for the failing formats.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1791949 13f79535-47bb-0310-9956-ffa450edef68
2017-04-19 18:10:52 +00:00
Dominik Stadler
511c2544a8 Let IntelliJ cleanup some code-warnings across the whole code-base: unnecessary toString or semicolon
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1791720 13f79535-47bb-0310-9956-ffa450edef68
2017-04-17 20:13:52 +00:00
Javen O'Neal
dc29c94460 roll back to hamcrest-core
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1791570 13f79535-47bb-0310-9956-ffa450edef68
2017-04-16 06:10:23 +00:00
Javen O'Neal
ef8c9329cf change from hamcrest-core-1.3 to hamcrest-all-1.3
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1791444 13f79535-47bb-0310-9956-ffa450edef68
2017-04-15 03:19:27 +00:00
Javen O'Neal
e7ca1594da use hamcrest matchers to reduce custom code
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1791443 13f79535-47bb-0310-9956-ffa450edef68
2017-04-15 02:50:46 +00:00
Javen O'Neal
7977026f96 use assertStartsWith and assertEndsWith for better unit test error messages
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1791440 13f79535-47bb-0310-9956-ffa450edef68
2017-04-15 02:19:24 +00:00
Tim Allison
1bfd5f6585 bug 50955 and bug 60953 improve Big5 reader; ensure one character
per byte pair

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1790172 13f79535-47bb-0310-9956-ffa450edef68
2017-04-05 01:45:55 +00:00
Dominik Stadler
abc3d37adc Add tests from bug 45353 to show that this now works fine
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1786432 13f79535-47bb-0310-9956-ffa450edef68
2017-03-10 20:14:00 +00:00
Javen O'Neal
bb6e94851f add helper functions to make it easier to see which scenarios are being tested
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1784231 13f79535-47bb-0310-9956-ffa450edef68
2017-02-24 05:07:10 +00:00
Javen O'Neal
7fcaaa9479 bug 59893: close open resources to prevent leaks
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1783362 13f79535-47bb-0310-9956-ffa450edef68
2017-02-17 09:53:49 +00:00
Javen O'Neal
85a30f16cf convert from junit3 to junit4
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1783360 13f79535-47bb-0310-9956-ffa450edef68
2017-02-17 09:37:00 +00:00
Javen O'Neal
1584310ac5 bug 59893: more unrelated changes from Andi
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1783353 13f79535-47bb-0310-9956-ffa450edef68
2017-02-17 09:08:21 +00:00
Greg Woolsey
7dfa32c28b Bug #56822 fix COUNTIFS()
includes unit test from the issue.  Verified unit test results in Excel vs. incorrect previous POI results.  Test passes new code, as do existing tests.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1783037 13f79535-47bb-0310-9956-ffa450edef68
2017-02-14 22:05:49 +00:00
Andreas Beeker
faaa94d20a escape unicode chars
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1782568 13f79535-47bb-0310-9956-ffa450edef68
2017-02-11 09:49:52 +00:00
Nick Burch
fc31afbb86 Use long for the dummy stream, to permit >2gb streams
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1782470 13f79535-47bb-0310-9956-ffa450edef68
2017-02-10 13:51:33 +00:00
Nick Burch
16a825ccf5 Update the big file test to use POIFSFileSystem.create(File), and tweak javadocs
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1782454 13f79535-47bb-0310-9956-ffa450edef68
2017-02-10 11:43:01 +00:00
Nick Burch
eeae830d19 Start on a unit test for #60670, work required to get it passing
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1782380 13f79535-47bb-0310-9956-ffa450edef68
2017-02-09 19:29:51 +00:00
Javen O'Neal
0f09e9eae2 bug 59227: parse dates formatted in Japanese or Chinese. Change javac source encoding from ASCII to UTF-8 (same as build.gradle). Patch from jzhao. This closes #48 on Github.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1782119 13f79535-47bb-0310-9956-ffa450edef68
2017-02-08 08:29:18 +00:00
Javen O'Neal
28999738a9 Convert all *.java files to use native end of line character(s)
$ dos2unix `find -name *.java`
$ svn propset svn:eol-style native `find -name *.java`


git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1782114 13f79535-47bb-0310-9956-ffa450edef68
2017-02-08 07:47:30 +00:00
Dominik Stadler
db600cf0b4 Adjust expected font-size in tests, XSSF seems to use slightly larger fonts on some machines
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1780479 13f79535-47bb-0310-9956-ffa450edef68
2017-01-26 20:59:49 +00:00
Dominik Stadler
37b53744c0 Move test to base-test-class to run it for (S)XSSF as well
Also had to increase the numbers a bit as it fails locally for me otherwise

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1780454 13f79535-47bb-0310-9956-ffa450edef68
2017-01-26 19:58:52 +00:00
Dominik Stadler
560a33620a IntelliJ warnings, Javadoc, Formatting
Changes for the RecordFormatException deprecation

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1780453 13f79535-47bb-0310-9956-ffa450edef68
2017-01-26 19:58:46 +00:00
Dominik Stadler
797ea00d09 Bug 60031: Enhance test some more
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1780450 13f79535-47bb-0310-9956-ffa450edef68
2017-01-26 19:58:18 +00:00
Andreas Beeker
4a5f7765bb fix eclipse warnings - close resources
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1779869 13f79535-47bb-0310-9956-ffa450edef68
2017-01-23 00:31:27 +00:00
Andreas Beeker
c48a0cf334 #59836 - Tracker: Replace primitives with enums
preparation for removing those many HSSFColor subclasses with an enum

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1779866 13f79535-47bb-0310-9956-ffa450edef68
2017-01-22 22:01:22 +00:00
Javen O'Neal
93eb933aa6 fix assert message typo
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1779567 13f79535-47bb-0310-9956-ffa450edef68
2017-01-20 05:40:49 +00:00
Javen O'Neal
6aa7fe54e9 fix copy-paste typo in unit test found by Andrzej Witecki
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1779565 13f79535-47bb-0310-9956-ffa450edef68
2017-01-20 05:37:12 +00:00
Javen O'Neal
9def800cd4 bug 60031: DataFormatter parses months incorrectly when put at the end of date segment. Thanks to Andrzej Witecki
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1779564 13f79535-47bb-0310-9956-ffa450edef68
2017-01-20 05:35:57 +00:00
Javen O'Neal
c46e7d03f3 remove unused imports
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1779563 13f79535-47bb-0310-9956-ffa450edef68
2017-01-20 05:04:57 +00:00
Javen O'Neal
2f648842cd bug 60605: replace Workbook.SHEET_STATE_VERY_HIDDEN with SheetVisibility.VERY_HIDDEN
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1779562 13f79535-47bb-0310-9956-ffa450edef68
2017-01-20 05:00:29 +00:00
Javen O'Neal
dfd906aa9b bug 60605: remove code for enforcing rule that active sheet cannot be hidden
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1779561 13f79535-47bb-0310-9956-ffa450edef68
2017-01-20 04:55:06 +00:00
Javen O'Neal
15be6fb336 bug 60605: convert Workbook.SHEET_STATE_* to SheetVisibility enum
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1779558 13f79535-47bb-0310-9956-ffa450edef68
2017-01-20 04:23:42 +00:00
Javen O'Neal
70cc2bce03 bug 60601: unlink hyperlinks from a sheet if all hyperlinks have been removed. Patch from Joachim Piketz
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1779426 13f79535-47bb-0310-9956-ffa450edef68
2017-01-19 07:44:25 +00:00
Andreas Beeker
75c630f976 fix eclipse warnings / close resources in tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1778958 13f79535-47bb-0310-9956-ffa450edef68
2017-01-16 01:18:46 +00:00
Andreas Beeker
a7706b3fdf fix eclipse warnings - close resources / type generics
cleanup sources - add parenthesis to statements

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1778955 13f79535-47bb-0310-9956-ffa450edef68
2017-01-15 23:08:47 +00:00
Javen O'Neal
726fe10074 bug 60260: parse unicode sheet names
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1778418 13f79535-47bb-0310-9956-ffa450edef68
2017-01-12 10:39:26 +00:00
Javen O'Neal
42c5a08dfb add unit tests for MAPIMessage.get*Body()
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1777463 13f79535-47bb-0310-9956-ffa450edef68
2017-01-05 12:46:28 +00:00
Dominik Stadler
102c0d2173 Bug 60219: FormulaParser can't parse external references when sheet name is quoted
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1776796 13f79535-47bb-0310-9956-ffa450edef68
2016-12-31 16:53:16 +00:00
Dominik Stadler
36406ad3a1 Ensure streams are closed always, reformat code somewhat
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1776647 13f79535-47bb-0310-9956-ffa450edef68
2016-12-30 22:12:06 +00:00
Dominik Stadler
6f616d0a51 Bug 60369: Adjust pattern to better handle non-ASCII characters in Month-names which can appear since Java 8
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1776646 13f79535-47bb-0310-9956-ffa450edef68
2016-12-30 22:11:55 +00:00
Dominik Stadler
8def7307d9 Bug 60452: WorkdayCalculator calculateWorkdays does return wrong value for same day input
deprecate unused method isNonWorkday

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1776588 13f79535-47bb-0310-9956-ffa450edef68
2016-12-30 15:05:14 +00:00
Andreas Beeker
6a8332a173 eclipse warnings - raw list access
close resources

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1773906 13f79535-47bb-0310-9956-ffa450edef68
2016-12-13 00:31:23 +00:00
Andreas Beeker
128001186b eclipse warnings - raw list access
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1773905 13f79535-47bb-0310-9956-ffa450edef68
2016-12-13 00:30:24 +00:00
Andreas Beeker
fae46faf29 remove unused class
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1773904 13f79535-47bb-0310-9956-ffa450edef68
2016-12-13 00:29:03 +00:00
Dominik Stadler
230453d76e Adjust toString() of ExternalNameRecord
Fix some IntelliJ warnings
 Reformat TextPieceTable

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1773776 13f79535-47bb-0310-9956-ffa450edef68
2016-12-12 11:41:07 +00:00
Dominik Stadler
17311852ce Revert "Local test to run one of the multi-file tests on only one file"
This reverts commit 6582ca62b000143b96823509ad7bb8d444cabee3.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1773689 13f79535-47bb-0310-9956-ffa450edef68
2016-12-11 21:15:37 +00:00
Dominik Stadler
5cf4143fcc Revert "Adjust local test class run with Gradle-Build as well"
This reverts commit 76be95541fa6ac22bf0746d864404a84868ab1c6.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1773663 13f79535-47bb-0310-9956-ffa450edef68
2016-12-11 21:13:51 +00:00
Dominik Stadler
8003ad78f4 Adjust local test class run with Gradle-Build as well
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1773661 13f79535-47bb-0310-9956-ffa450edef68
2016-12-11 21:00:00 +00:00
Dominik Stadler
54778bfac6 Local test to run one of the multi-file tests on only one file
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1773635 13f79535-47bb-0310-9956-ffa450edef68
2016-12-11 20:58:12 +00:00
Dominik Stadler
2e364ee85d Exclude new BIFF5 file in some unit tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1773605 13f79535-47bb-0310-9956-ffa450edef68
2016-12-11 20:56:03 +00:00
Nick Burch
30d64fda8c Recursive delete unit test based on users@ query - working fine already
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1772894 13f79535-47bb-0310-9956-ffa450edef68
2016-12-06 13:52:46 +00:00
Andreas Beeker
75dc015766 SonarCube fix - make members private
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1772585 13f79535-47bb-0310-9956-ffa450edef68
2016-12-04 23:49:49 +00:00
Andreas Beeker
656f28ba81 SonarCube fix - make members private
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1772291 13f79535-47bb-0310-9956-ffa450edef68
2016-12-01 23:46:27 +00:00
Andreas Beeker
6ea58e94bc #60331 - Remove deprecated classes - deprecate Mutable* property classes
sonarcube fix - make protected attributes private

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1771640 13f79535-47bb-0310-9956-ffa450edef68
2016-11-27 20:19:18 +00:00
Dominik Stadler
aba5d21295 Fix newly introduced Sonar issues and allow text to be null
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1771563 13f79535-47bb-0310-9956-ffa450edef68
2016-11-27 11:06:57 +00:00
Dominik Stadler
be1aa45b25 Bug 60370: Encode some special characters when setting title/text for validation text-boxes, for now all characters below 32, more can be added if necessary.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1771396 13f79535-47bb-0310-9956-ffa450edef68
2016-11-25 22:07:59 +00:00
Dominik Stadler
e2b22e51f7 Bug 59200: Check for actual Excel limits on data validation title/text
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1771254 13f79535-47bb-0310-9956-ffa450edef68
2016-11-25 08:55:52 +00:00
Dominik Stadler
57fa4c1869 Pull up one more test into BaseTestConditionalFormatting
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1768590 13f79535-47bb-0310-9956-ffa450edef68
2016-11-07 21:32:18 +00:00
Dominik Stadler
76a0c6378e Add setFormattingRanges() to interface ConditionalFormatting, closes #42
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1768588 13f79535-47bb-0310-9956-ffa450edef68
2016-11-07 21:32:04 +00:00
Javen O'Neal
a3f001b7ae bug 60331: remove deprecated FormulaShifter.createForRowShift(). Require SpreadsheetVersion.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1767728 13f79535-47bb-0310-9956-ffa450edef68
2016-11-02 16:37:12 +00:00
Dominik Stadler
0610a20d87 Fix some IDE warnings, JavaDoc, ...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1766063 13f79535-47bb-0310-9956-ffa450edef68
2016-10-21 16:31:37 +00:00
Dominik Stadler
d0d5334386 Exclude new BIFF5 file in some unit tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1765876 13f79535-47bb-0310-9956-ffa450edef68
2016-10-20 20:31:57 +00:00
Dominik Stadler
f2c9dbec3f Add some missing close() calls
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1765875 13f79535-47bb-0310-9956-ffa450edef68
2016-10-20 20:31:50 +00:00
Tim Allison
9fd46e3174 BUG-60284 -- need to update dev tests <face_palm/>
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1765859 13f79535-47bb-0310-9956-ffa450edef68
2016-10-20 18:39:47 +00:00
Tim Allison
d233f7c348 BUG-60284 -- throw EncryptedDocumentException for password protected OldExcel files
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1765829 13f79535-47bb-0310-9956-ffa450edef68
2016-10-20 15:13:16 +00:00
Javen O'Neal
a1ec4334cf Eclipse automated refactor/cleanup: add final modifier to private fields to unit tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1765739 13f79535-47bb-0310-9956-ffa450edef68
2016-10-20 02:21:14 +00:00
Javen O'Neal
96d35e0b8e Eclipse automated refactor/cleanup: convert for loops to for-each loops
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1765736 13f79535-47bb-0310-9956-ffa450edef68
2016-10-20 01:54:56 +00:00
Andreas Beeker
54122c2233 remove *_dump directory
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1765734 13f79535-47bb-0310-9956-ffa450edef68
2016-10-19 23:43:42 +00:00
Javen O'Neal
5d3d50b9d1 add StringUtil.count, inspired by Apache Commons Lang StringUtils#countMatches and Python's str.count(substr)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1765730 13f79535-47bb-0310-9956-ffa450edef68
2016-10-19 23:04:16 +00:00
Javen O'Neal
4b01accdb3 Eclipse automated refactor/cleanup: convert for loops to for-each loops
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1765728 13f79535-47bb-0310-9956-ffa450edef68
2016-10-19 22:28:07 +00:00
Javen O'Neal
c5dddf7fac Eclipse automated refactor/cleanup: add missing @Override and @Deprecated annotations
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1765726 13f79535-47bb-0310-9956-ffa450edef68
2016-10-19 21:52:31 +00:00
Tim Allison
5958cb4840 BUG-59302 --add minimal support for VBAMacro extraction to HSLF; credit to Andreas Beeker for this patch. Problems are mine.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1765696 13f79535-47bb-0310-9956-ffa450edef68
2016-10-19 18:44:46 +00:00
Javen O'Neal
9cad5aff09 reenable unit test for bug 58648 that passes now
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1765548 13f79535-47bb-0310-9956-ffa450edef68
2016-10-19 08:03:57 +00:00