Commit Graph

1642 Commits

Author SHA1 Message Date
Dominik Stadler a79dfd18e4 Adjust test to pass forbidden-apis-check
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1727693 13f79535-47bb-0310-9956-ffa450edef68
2016-01-30 11:02:54 +00:00
Dominik Stadler 68997de5f0 Make OldExcelExtractor Closeable to be able to free up resources if getText() was not called
Allow Excel files which have an entry "Workbook" instead of "Book" like other classes do
Add some more unit tests to cover more of the code

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1727653 13f79535-47bb-0310-9956-ffa450edef68
2016-01-29 22:09:03 +00:00
Dominik Stadler 2ac89a2dc9 Rename test-source file to actual class name to avoid constant recompilations on 'compile-main'
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1725336 13f79535-47bb-0310-9956-ffa450edef68
2016-01-18 20:16:38 +00:00
Javen O'Neal 51e4b32498 add @Override annotations to ITestDataProviders
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1725040 13f79535-47bb-0310-9956-ffa450edef68
2016-01-16 22:03:58 +00:00
Javen O'Neal 276e95e43f bug 58879: add SpreadsheetVersion to Workbook interface
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1725039 13f79535-47bb-0310-9956-ffa450edef68
2016-01-16 22:01:33 +00:00
Dominik Stadler bdef6e1c52 Regression in version 3.14-beta1: three or four-part formats with locale id cause exceptions when formatting instead of falling back to other formatting
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1724488 13f79535-47bb-0310-9956-ffa450edef68
2016-01-13 19:46:17 +00:00
Dominik Stadler 8793846bc6 Bug 58829: Remove some useages of printStackTrace() and some other minor cleanups
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1724445 13f79535-47bb-0310-9956-ffa450edef68
2016-01-13 15:59:38 +00:00
Dominik Stadler 8cf781c31b Rework test to not catch exception, junit does a good job of handling unexpected exceptions itself, StringBuffer replacing, code duplication
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1724368 13f79535-47bb-0310-9956-ffa450edef68
2016-01-13 08:16:15 +00:00
Dominik Stadler 0fe35af294 Undo changes to file in assertCloseDoesNotModifyFile to not have dirty files after running tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1722756 13f79535-47bb-0310-9956-ffa450edef68
2016-01-03 21:37:52 +00:00
Dominik Stadler f54452a0e7 Try to reproduce bug 52258 and add more checks to integration tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1722755 13f79535-47bb-0310-9956-ffa450edef68
2016-01-03 21:23:09 +00:00
Dominik Stadler c4c9ac0ccf bug 58043: provide some compatibility between HSSF and XSSF in regards to values for CellStyle.setRotation(). Also adjust JavaDoc to mention the remaining things to note
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1722716 13f79535-47bb-0310-9956-ffa450edef68
2016-01-03 13:28:17 +00:00
Javen O'Neal bc6a4a20d4 re-throw errors we aren't looking for
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1722708 13f79535-47bb-0310-9956-ffa450edef68
2016-01-03 09:48:05 +00:00
Javen O'Neal 4f6a75b701 bug 58779: check if SlideShowFactory.create() modifies the file being read when the slideshow is closed.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1722707 13f79535-47bb-0310-9956-ffa450edef68
2016-01-03 09:16:59 +00:00
Javen O'Neal 2cf06902d5 whitespace
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1722696 13f79535-47bb-0310-9956-ffa450edef68
2016-01-03 01:34:33 +00:00
Javen O'Neal 87ec46ff34 test XSLF SlideShowFactory creation methods individually for more granular unit test results
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1722695 13f79535-47bb-0310-9956-ffa450edef68
2016-01-03 01:26:29 +00:00
Javen O'Neal d747590977 rearrange unit tests into more, smaller functions
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1722667 13f79535-47bb-0310-9956-ffa450edef68
2016-01-02 21:20:43 +00:00
Javen O'Neal 347881ef1e bug 58633 comment 5 and comment 6: add unit test coverage for CellUtil.java; throw exception of Cell does not belong to workbook for some methods
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1722618 13f79535-47bb-0310-9956-ffa450edef68
2016-01-02 11:11:33 +00:00
asf-sync-process de7807c8a7 bug 58633: Set multiple CellStyle properties at once. Patch from Mark Murphy.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1722607 13f79535-47bb-0310-9956-ffa450edef68
2016-01-02 04:29:34 +00:00
Dominik Stadler a6957b5c91 Some more unit tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1722501 13f79535-47bb-0310-9956-ffa450edef68
2016-01-01 16:27:35 +00:00
Dominik Stadler 8589924b22 Bug 58746: Fix missing adjustment of formulas when sheet-ordering is changed.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1722410 13f79535-47bb-0310-9956-ffa450edef68
2015-12-30 20:31:44 +00:00
Dominik Stadler b4ac21a810 Eclipse warnings
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1722406 13f79535-47bb-0310-9956-ffa450edef68
2015-12-30 20:31:13 +00:00
Javen O'Neal 7980a6b457 whitespace
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1722070 13f79535-47bb-0310-9956-ffa450edef68
2015-12-29 07:38:31 +00:00
Javen O'Neal a50f45e4c2 bug 58775: use short for data format index, int for cell style index
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1721930 13f79535-47bb-0310-9956-ffa450edef68
2015-12-28 14:50:54 +00:00
Javen O'Neal 9bdfcc4be6 bug 58775: add unit test to test for non-built-in data formats
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1721900 13f79535-47bb-0310-9956-ffa450edef68
2015-12-28 12:10:12 +00:00
Dominik Stadler 0a3370347e Fix freeing resources in some tests and dev-tools so we can run unit-tests with enabled file-leak-detector
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1721468 13f79535-47bb-0310-9956-ffa450edef68
2015-12-22 22:35:59 +00:00
Andreas Beeker 3e8b58e356 fix forbidden apis issues
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1719778 13f79535-47bb-0310-9956-ffa450edef68
2015-12-13 09:51:22 +00:00
Javen O'Neal dedb924183 bug 56454: shiftRows incorrectly handle merged regions that do not contain column 0. Add failing unit test from Jörg Selbach.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1718217 13f79535-47bb-0310-9956-ffa450edef68
2015-12-06 20:51:54 +00:00
Javen O'Neal 37622ec57e make test easier to understand using A1 addresses instead of row+col numbers
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1718216 13f79535-47bb-0310-9956-ffa450edef68
2015-12-06 20:43:27 +00:00
Javen O'Neal eca89530d3 whitespace
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1717931 13f79535-47bb-0310-9956-ffa450edef68
2015-12-04 11:12:27 +00:00
Javen O'Neal ebbf3d0ddb whitespace
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1717928 13f79535-47bb-0310-9956-ffa450edef68
2015-12-04 10:47:31 +00:00
Javen O'Neal 9c19c23291 bug 58570: add get/setActiveCell to Sheet interface, add Cell.getAddress,
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1717900 13f79535-47bb-0310-9956-ffa450edef68
2015-12-04 06:36:27 +00:00
Javen O'Neal 293ef9fe17 remove deprecated functions (since 2008)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1717899 13f79535-47bb-0310-9956-ffa450edef68
2015-12-04 06:30:34 +00:00
Javen O'Neal 5650b03ea0 testBool/testErr: check values before writeOutAndReadBack
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1717178 13f79535-47bb-0310-9956-ffa450edef68
2015-11-30 05:21:01 +00:00
Javen O'Neal 7fc9df615f fix testErr: createRow(1) -> createRow(0); replace assumeTrue with assertEquals for more informative test results
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1717171 13f79535-47bb-0310-9956-ffa450edef68
2015-11-30 05:00:24 +00:00
Javen O'Neal dcba12a0ce whitespace
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1717167 13f79535-47bb-0310-9956-ffa450edef68
2015-11-30 04:50:18 +00:00
Javen O'Neal 2924c7b9da break testBoolErr into 2 unit tests. The test shouldn't be aware of the underlying implementation for HSSFRows, and shorter tests are better
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1717163 13f79535-47bb-0310-9956-ffa450edef68
2015-11-30 04:38:04 +00:00
Javen O'Neal 226fefe0c9 patch from Stefan Thurnherr: bug 57450: autosize columns in SXSSF using rows that have been flushed to disk
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1717146 13f79535-47bb-0310-9956-ffa450edef68
2015-11-30 00:22:50 +00:00
Andreas Beeker ee0f9b84e1 close resources
fix a few eclipse warnings

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1717077 13f79535-47bb-0310-9956-ffa450edef68
2015-11-29 15:26:53 +00:00
Javen O'Neal d7c3a9b2ca remove debugging print statements
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1717076 13f79535-47bb-0310-9956-ffa450edef68
2015-11-29 15:24:08 +00:00
Javen O'Neal 79e099f5fa Patch from Lyle for bug 52903: HSSFSheet.shiftRows does not shift hyperlink references
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1717069 13f79535-47bb-0310-9956-ffa450edef68
2015-11-29 14:45:24 +00:00
Javen O'Neal 58bffd78a1 javadocs
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1716811 13f79535-47bb-0310-9956-ffa450edef68
2015-11-27 09:45:53 +00:00
Javen O'Neal 842171b94a add failing unit test for bug 58648
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1716338 13f79535-47bb-0310-9956-ffa450edef68
2015-11-25 09:19:03 +00:00
Javen O'Neal 1f874be829 bug 58636: upgrade anchor types from int to AnchorType enum
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1716313 13f79535-47bb-0310-9956-ffa450edef68
2015-11-25 07:16:43 +00:00
Javen O'Neal 735c43ec9d bug 58644: fix HSSFSheet.setZoom(int); update documentation to use non-deprecated method
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1716053 13f79535-47bb-0310-9956-ffa450edef68
2015-11-24 08:04:42 +00:00
Javen O'Neal e7d29ad533 whitespace
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1716051 13f79535-47bb-0310-9956-ffa450edef68
2015-11-24 07:53:17 +00:00
Javen O'Neal 8eabc4710a bug 58642: deprecate Sheet.setZoom(numerator, denominator) and replace with Sheet.setZoom(scale)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1716048 13f79535-47bb-0310-9956-ffa450edef68
2015-11-24 07:43:53 +00:00
Javen O'Neal 891f2d26fc bug 58642: remove deprecated functions in Spreadsheet Sheet interface and implementing classes; add @Override annotations
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1716046 13f79535-47bb-0310-9956-ffa450edef68
2015-11-24 07:34:09 +00:00
Javen O'Neal 788047ed08 fixed bad test case in BaseTestSheet.getCellComments
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1715854 13f79535-47bb-0310-9956-ffa450edef68
2015-11-23 15:45:30 +00:00
Javen O'Neal 3e10c4f0f6 bug 58365: patch from Hannes Erven: add method to efficiently get all cell comments on a Sheet and return a dictionary with the location of each comment as the key and the comment itself as the value.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1715839 13f79535-47bb-0310-9956-ffa450edef68
2015-11-23 15:11:28 +00:00
Javen O'Neal ae9bcd8e82 convert junit3 to junit4
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1715752 13f79535-47bb-0310-9956-ffa450edef68
2015-11-23 10:26:06 +00:00
Javen O'Neal dbba80c3fc bug 58637: contribution from Hannes Erven: add CellAddress class, distinct from CellReference
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1715743 13f79535-47bb-0310-9956-ffa450edef68
2015-11-23 09:30:53 +00:00
Andreas Beeker 4ccadf7315 fix unnecessary cast warnings
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1715626 13f79535-47bb-0310-9956-ffa450edef68
2015-11-22 12:30:42 +00:00
Andreas Beeker 7458fdc277 In preparation for table rendering, added table row heights and column widths to common sl.
To have better results in rendering switch anchor from java.awt.Rectangle to Rectangle2D.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1715540 13f79535-47bb-0310-9956-ffa450edef68
2015-11-21 15:54:01 +00:00
Uwe Schindler 9ab28f52ab Add security check
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1713917 13f79535-47bb-0310-9956-ffa450edef68
2015-11-11 19:17:18 +00:00
Uwe Schindler 493a157e6a Fix remaining security manager problems. Forbiddenapis now passes.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1713915 13f79535-47bb-0310-9956-ffa450edef68
2015-11-11 19:11:35 +00:00
Uwe Schindler 73a8488838 #58597: Fix tests to not do setAccessible(), add some doPrivileged, too.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1713891 13f79535-47bb-0310-9956-ffa450edef68
2015-11-11 16:57:39 +00:00
Uwe Schindler b62cc549fe #58597: Remove setAccessible (more coming soon)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1713770 13f79535-47bb-0310-9956-ffa450edef68
2015-11-11 07:41:54 +00:00
Dominik Stadler 4cdcc9fc24 Eclipse warnings, typos, ...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1713216 13f79535-47bb-0310-9956-ffa450edef68
2015-11-08 10:00:24 +00:00
Javen O'Neal 8cff5d7e49 bug 58591: add formula evaluation unit tests inspired by Jason Tomforde's question on user@
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1713080 13f79535-47bb-0310-9956-ffa450edef68
2015-11-07 04:09:39 +00:00
Nick Burch a4e891ff8f Whitespace
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1712985 13f79535-47bb-0310-9956-ffa450edef68
2015-11-06 17:03:22 +00:00
Nick Burch 6cc2839b66 Convert to JUnit4
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1712984 13f79535-47bb-0310-9956-ffa450edef68
2015-11-06 17:02:18 +00:00
Javen O'Neal 0149810619 remove TestWorkbookEvaluator from junit3 test suite since it was upgraded to junit4 in r1712908
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1712921 13f79535-47bb-0310-9956-ffa450edef68
2015-11-06 08:51:49 +00:00
Javen O'Neal c47401d239 remove deprecated ErrorConstants usage in TestWorkbookEvaluator
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1712910 13f79535-47bb-0310-9956-ffa450edef68
2015-11-06 04:58:35 +00:00
Javen O'Neal 663c64ff44 whitespace
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1712909 13f79535-47bb-0310-9956-ffa450edef68
2015-11-06 04:45:25 +00:00
Javen O'Neal 42c1296ef6 convert TestWorkbookEvaluator from junit3 to junit4
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1712908 13f79535-47bb-0310-9956-ffa450edef68
2015-11-06 04:43:50 +00:00
Andreas Beeker 9b4919cd51 extended forbidden-apis-check to ooxml-tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1712693 13f79535-47bb-0310-9956-ffa450edef68
2015-11-05 00:15:51 +00:00
Nick Burch 0e7caa5eb1 Bug #55265 - DataFormatter correct support for alternate number grouping characters, eg 1234 + #'##0 = 1'234 not 1,234
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1712605 13f79535-47bb-0310-9956-ffa450edef68
2015-11-04 18:23:17 +00:00
Javen O'Neal 20ba4851a8 fix for bug 51622: autosize columns with leading whitespace
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1712477 13f79535-47bb-0310-9956-ffa450edef68
2015-11-04 06:39:57 +00:00
Javen O'Neal 265d198612 bug 58576: rename canComputeColumnWidht to canComputeColumnWidth
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1712219 13f79535-47bb-0310-9956-ffa450edef68
2015-11-03 07:23:09 +00:00
Javen O'Neal 3a08acac95 fix typos
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1712213 13f79535-47bb-0310-9956-ffa450edef68
2015-11-03 06:03:52 +00:00
Andreas Beeker acb219fbe1 fixes sonar/findbugs issues
add Date.toString() to forbidden-apis and fix occurrences

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1712181 13f79535-47bb-0310-9956-ffa450edef68
2015-11-02 23:46:57 +00:00
Javen O'Neal e1e740bc3c bug 58572: change hyperlink reference to be consistent with TestXSSFHyperlink#testCopyXSSFHyperlink
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1711952 13f79535-47bb-0310-9956-ffa450edef68
2015-11-02 13:02:44 +00:00
Javen O'Neal 9b8250832e bug 58572: replace Cloneable with copy constructors for spreadsheet Hyperlink class
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1711951 13f79535-47bb-0310-9956-ffa450edef68
2015-11-02 12:57:57 +00:00
Javen O'Neal 0eb6ec6717 bug 58572: move getHyperlinkList() and getHyperlink(row, col) from XSSFSheet to Sheet
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1711923 13f79535-47bb-0310-9956-ffa450edef68
2015-11-02 09:40:49 +00:00
Javen O'Neal 3c18d6aa7b don't leave behind files when running unit tests. In the future this should be revisited to verify POI isn't writing workbooks that are unopenable/corrupt by applications that read POI's formats (MS Office, OpenOffice, LibreOffice, etc)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1711920 13f79535-47bb-0310-9956-ffa450edef68
2015-11-02 09:23:12 +00:00
Javen O'Neal 43a5f308d0 upgrade spreadsheet Hyperlink unit tests from junit3 to junit4
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1711910 13f79535-47bb-0310-9956-ffa450edef68
2015-11-02 09:01:23 +00:00
Javen O'Neal 0e3230f703 upgrade spreadsheet Hyperlink unit tests from junit3 to junit4
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1711909 13f79535-47bb-0310-9956-ffa450edef68
2015-11-02 08:55:45 +00:00
Javen O'Neal 40b250bbb3 replace deprecated usage of FormulaShifter.createForRowShift
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1711879 13f79535-47bb-0310-9956-ffa450edef68
2015-11-02 02:22:03 +00:00
Javen O'Neal af4a96f467 bug 58384: add FormulaShifter.createForRowCopy
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1711866 13f79535-47bb-0310-9956-ffa450edef68
2015-11-02 00:25:08 +00:00
Andreas Beeker fa40f8417c findbugs fixes
close resources in tests

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1711712 13f79535-47bb-0310-9956-ffa450edef68
2015-11-01 03:23:16 +00:00
Javen O'Neal 1aa81eb463 bug58452: set cell formulas containing unregistered function names
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1711605 13f79535-47bb-0310-9956-ffa450edef68
2015-10-31 11:57:39 +00:00
Javen O'Neal 07cf6736ae improve error message if CellRangeAddress intersection assertion fails
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1711597 13f79535-47bb-0310-9956-ffa450edef68
2015-10-31 11:20:15 +00:00
Javen O'Neal 5f23aa95f7 bug 58442: in-place reorganize an AreaPtg as upper-left and lower-right
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1711592 13f79535-47bb-0310-9956-ffa450edef68
2015-10-31 11:10:28 +00:00
Javen O'Neal 043a86e243 bug 58443: prevent corrupted workbooks by checking for overlapping merged regions before adding a merged region to a sheet; fix unit tests that produced corrupt workbooks; remove deprecated HSSFSheet#addMergedRegion(Region)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1711586 13f79535-47bb-0310-9956-ffa450edef68
2015-10-31 10:22:19 +00:00
Javen O'Neal b40a0b01bb replace deprecated usage of o.a.p.ss.util.Region with o.a.p.ss.util.CellRangeAddress; add documentation to tests that exist strictly to test deprecated methods, and move SuppressWarnings-deprecation down to just those functions
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1711581 13f79535-47bb-0310-9956-ffa450edef68
2015-10-31 09:29:32 +00:00
Dominik Stadler ba7f5f3037 Ensure that no password was set by other tests, this breaks sometimes when the Sonar/Maven build runs all tests in one VM
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1711199 13f79535-47bb-0310-9956-ffa450edef68
2015-10-29 09:30:11 +00:00
Nick Burch 632228a34e #58558 SXSSFCell.setCellValue((RichTextString)null) fixed to work like XSSF and HSSF, with common unit tests to verify this
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1711082 13f79535-47bb-0310-9956-ffa450edef68
2015-10-28 17:42:56 +00:00
David North b0551e322e Fix for https://bz.apache.org/bugzilla/show_bug.cgi?id=58549
Thanks to Damian Cugley for the patch.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1710552 13f79535-47bb-0310-9956-ffa450edef68
2015-10-26 10:32:30 +00:00
Nick Burch 8cd7f1f736 58536 DataFormatter and CellFormat non-localised support for localised currency formats like [$£-809]
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1710484 13f79535-47bb-0310-9956-ffa450edef68
2015-10-25 21:20:44 +00:00
Nick Burch dc947416d4 Mention about Locale definitions in Excel cell data format strings
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1710459 13f79535-47bb-0310-9956-ffa450edef68
2015-10-25 16:13:16 +00:00
Nick Burch 1b019d3c76 #58532 Enable more of the padding cell format tests, but a few remain to be fixed
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1710407 13f79535-47bb-0310-9956-ffa450edef68
2015-10-24 23:57:49 +00:00
Nick Burch e966499ad2 #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
2015-10-24 23:34:47 +00:00
Nick Burch e86a116d0a Fix inconsistent whitespace
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1710395 13f79535-47bb-0310-9956-ffa450edef68
2015-10-24 22:12:06 +00:00
asf-sync-process 41419d44eb Test to check that #58532 formats are seen as valid
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1710394 13f79535-47bb-0310-9956-ffa450edef68
2015-10-24 22:09:11 +00:00
Dominik Stadler dd48f58f95 Bug 58085: removing sheet breaks other existing sheet references
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1710193 13f79535-47bb-0310-9956-ffa450edef68
2015-10-23 12:11:40 +00:00
Javen O'Neal c22fdbbc2b bug 58441: define equals method for CellRangeAddressBase
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1710172 13f79535-47bb-0310-9956-ffa450edef68
2015-10-23 11:17:06 +00:00
Javen O'Neal 538b2d1377 bug 33174: Use common unit test for testNoMergedRegionsIsEmptyList
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1710140 13f79535-47bb-0310-9956-ffa450edef68
2015-10-23 08:38:14 +00:00
Dominik Stadler 3a8f40db7c Bug 58499: Don't report Zip-Bomb for small files which should not cause memory issues anyway
Also make error message a bit more specific and list classname in Zip-Bomb-Error to make it easier for users what the
problem is and how to find out where the static methods are

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1709180 13f79535-47bb-0310-9956-ffa450edef68
2015-10-17 14:40:36 +00:00
Dominik Stadler e9d0e9cc12 Update test to not depend on an existing build-directory
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1708682 13f79535-47bb-0310-9956-ffa450edef68
2015-10-14 19:27:20 +00:00
Dominik Stadler 392591e222 Reenable test on Windows which was disabled previously but should now work after a workaround was put in place via bug 58480.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1708613 13f79535-47bb-0310-9956-ffa450edef68
2015-10-14 15:00:19 +00:00
Dominik Stadler a00240f212 Bug 58480: Work around problem where on Windows systems a Mapped Buffer can still lock a file even if the Channel was closed properly. Use reflection as DirectBuffer is in package sun.com and thus likely to go away with Java 9.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1708609 13f79535-47bb-0310-9956-ffa450edef68
2015-10-14 14:53:41 +00:00
Andreas Beeker 5fd71db914 - removed deprecated and confusing methods in XSSFColor
- sonar fixes

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1708236 13f79535-47bb-0310-9956-ffa450edef68
2015-10-12 20:43:42 +00:00
David North efee7bf83f Format numbers more like Excel does
Thanks to Chris Boyle for the patch

https://bz.apache.org/bugzilla/show_bug.cgi?id=58471

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1706971 13f79535-47bb-0310-9956-ffa450edef68
2015-10-06 09:56:26 +00:00
Andreas Beeker 62561d5f53 sonar fixes and closing resources after use
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1706937 13f79535-47bb-0310-9956-ffa450edef68
2015-10-06 00:04:12 +00:00
Dominik Stadler cc1caaf658 As discussed at ApacheCon: Try to automatically find test-data in unit tests, this makes it easier to get going in Eclipse or other IDEs.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1706752 13f79535-47bb-0310-9956-ffa450edef68
2015-10-05 06:45:20 +00:00
Dominik Stadler 4b487fcc10 Eclipse warnings
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1706750 13f79535-47bb-0310-9956-ffa450edef68
2015-10-05 06:41:48 +00:00
Andreas Beeker eee32c0480 fixed sonar issues and eclipse warnings
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1706742 13f79535-47bb-0310-9956-ffa450edef68
2015-10-05 00:28:54 +00:00
Andreas Beeker 8aec6ba738 removed obsolete classes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1706740 13f79535-47bb-0310-9956-ffa450edef68
2015-10-05 00:26:45 +00:00
Dominik Stadler 030c29cfed Bug 55032: Fix handling missing option values in financial functions PV, FV, NPER and PMT
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1706254 13f79535-47bb-0310-9956-ffa450edef68
2015-10-01 14:05:28 +00:00
Dominik Stadler 99d33a0330 Bug 50319: Make row groups which include row 0 work
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1705844 13f79535-47bb-0310-9956-ffa450edef68
2015-09-29 12:26:08 +00:00
Dominik Stadler b261c978a8 Tried to reproduce bug 48403 but couldn't, still adding the related unit test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1705830 13f79535-47bb-0310-9956-ffa450edef68
2015-09-29 10:14:40 +00:00
Dominik Stadler c56977e6d2 Add test which shows that bug 46515 is fixed since some time already.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1705807 13f79535-47bb-0310-9956-ffa450edef68
2015-09-29 07:51:48 +00:00
David North c93ded0f36 Make XSSF and HSSF consistent in getMergedRegions - return empty list if there are none, rather than an exception. Tests for this.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58350

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1704839 13f79535-47bb-0310-9956-ffa450edef68
2015-09-23 12:53:13 +00:00
Dominik Stadler 5e6b975b1c Ensure that the ThreadLocal-Biff-Password is reset correctly after each usage, we had some unit tests failing sporadically due to this
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1704710 13f79535-47bb-0310-9956-ffa450edef68
2015-09-22 19:50:37 +00:00
Andreas Beeker dec09d2713 - #58216 - provide picture-shape resize that maintains the aspect ratio
- moved SlideShowFactory to Common SL
- changed get/setAnchor to Rectangle instead of Rectangle2D
- Fixed some Common SL generic definitions
- picture dimensions are now in points and an additional method exists for pixels

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1704206 13f79535-47bb-0310-9956-ffa450edef68
2015-09-21 00:09:45 +00:00
Dominik Stadler d61ea07e26 Bug 58333: Apply patch to verify behavior on row-index before and after the limits set by the specification
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1704186 13f79535-47bb-0310-9956-ffa450edef68
2015-09-20 20:16:17 +00:00
Andreas Beeker f3004e6185 close resources in junit tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1704124 13f79535-47bb-0310-9956-ffa450edef68
2015-09-20 12:02:40 +00:00
Dominik Stadler a207e463e9 Bug 57925: Add unit test and a simple fix to at least avoid the NPE when Workbooks have invalid external references
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1703999 13f79535-47bb-0310-9956-ffa450edef68
2015-09-19 12:22:42 +00:00
Dominik Stadler 3a325dc5dc Bug 57915: Fix Dev2Hex for numbers larger than Integer.MAX_VALUE and less than Integer.MIN_VALUE
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1703672 13f79535-47bb-0310-9956-ffa450edef68
2015-09-17 19:23:25 +00:00
Nick Burch 9647b62d1a Patch from Javen ONeal from bug #58245 - Make Workbook support iterating over Sheets
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1703573 13f79535-47bb-0310-9956-ffa450edef68
2015-09-17 11:10:11 +00:00
Dominik Stadler 8f604e8563 Eclipse warnings, code formatting, simplify ExcelAntWorkbookUtilFactory, always close resources, ...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1703028 13f79535-47bb-0310-9956-ffa450edef68
2015-09-14 18:40:23 +00:00
Dominik Stadler c6f875fbb9 Eclipse warnings, comment out dead code, close resources, enhance unit tests, javadoc, ...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1702802 13f79535-47bb-0310-9956-ffa450edef68
2015-09-13 19:05:55 +00:00
Andreas Beeker 50777f1e48 fix eclipse warning - mostly generics cosmetics
close resources in tests
junit4 conversions
convert spreadsheet based formular test to junit parameterized tests

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1702773 13f79535-47bb-0310-9956-ffa450edef68
2015-09-13 12:36:56 +00:00
Andreas Beeker 5f94d8b533 fix eclipse warning - mostly generics cosmetics
close resources in tests
junit4 conversions
convert spreadsheet based formular test to junit parameterized tests

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1702659 13f79535-47bb-0310-9956-ffa450edef68
2015-09-12 18:45:07 +00:00
Dominik Stadler 768060a8ff Bug 58353: Return correct value in Match-Function with match-type == -1
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1702535 13f79535-47bb-0310-9956-ffa450edef68
2015-09-11 18:52:29 +00:00
Andreas Beeker fec6b40606 More forbidden apis fixes (added main-tests to the check)
and a few junit4 upgrades
... hopefully this doesn't crash the build again ... :|

to simulate the tests on jenkins on the local developer box, uncomment the UTC lines in the build.xml

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1702356 13f79535-47bb-0310-9956-ffa450edef68
2015-09-11 00:56:16 +00:00
Andreas Beeker c21b7bc4d1 forbidden apis fixes - timezone fix ... will it work?
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1702321 13f79535-47bb-0310-9956-ffa450edef68
2015-09-10 21:31:00 +00:00
Andreas Beeker aea434a135 forbidden apis fixes - a few DateFormat clean ups ...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1701888 13f79535-47bb-0310-9956-ffa450edef68
2015-09-09 00:41:03 +00:00
Andreas Beeker aaafb0270d Bug 58326 - Forbidden APIs patches - first set of changes for locale and timezone settings
also includes fixes for
- name shadowing 
- unused deprecated method "getClipRect" in classes extending Graphics2d
- HexDump - replaced intermediate String.format calls with custom padding
- convert testcases to junit4
- closing resources

also tested with an arbitary timezone (PST) and locale (ru)

supresses forbidden apis check for
- LocaleUtil (the only place where Locale.getDefault() and TimeZone.getDefault() should be called)
- Classes using FontMetrics - without the actual text it's difficult to return something sane

Some usage of UTC and Locale.ROOT might be still wrong, e.g. in MapiMessage we don't access the
extended mapi properties, which might contain the timezone

DataFormatter has now a Observable property which need to be observed when custom formats are used
and the Locale changes

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1701688 13f79535-47bb-0310-9956-ffa450edef68
2015-09-07 20:19:50 +00:00
Dominik Stadler b2bd6a0a4c Eclipse warnings, close resources in CommandLineTextExtractor, add try/finally, formatting, ...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1701139 13f79535-47bb-0310-9956-ffa450edef68
2015-09-03 20:59:14 +00:00
Dominik Stadler de46578051 Bug 56959: Add verification unit test to show that the bug cannot be reproduced
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1701135 13f79535-47bb-0310-9956-ffa450edef68
2015-09-03 20:46:32 +00:00
Andreas Beeker d6f598b8f9 remove trailing comma ... works ok in Oracle jdk6, but maybe not in openjdk ...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1700880 13f79535-47bb-0310-9956-ffa450edef68
2015-09-02 19:44:14 +00:00
Andreas Beeker 1ca522ffa9 Fix DAYS360 for US/EU handling
fix forbidden api calls
add TimeZone (user) override to DateUtil
fix a few left open resources in the junit tests

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1700686 13f79535-47bb-0310-9956-ffa450edef68
2015-09-01 23:10:43 +00:00
Nick Burch d2ebc899fb Fix some Forbidden APIs errors
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1700677 13f79535-47bb-0310-9956-ffa450edef68
2015-09-01 21:46:30 +00:00
Nick Burch aa455c91fd Fix some Forbidden APIs errors
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1700670 13f79535-47bb-0310-9956-ffa450edef68
2015-09-01 21:09:20 +00:00
Nick Burch 47fb9df1a1 Fix some Forbidden APIs errors
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1700644 13f79535-47bb-0310-9956-ffa450edef68
2015-09-01 19:06:53 +00:00
Nick Burch f098eca5a0 Fix some Forbidden APIs errors
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1700635 13f79535-47bb-0310-9956-ffa450edef68
2015-09-01 18:37:07 +00:00
Andreas Beeker 6703c9d3fb forbidden apis fixes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1700076 13f79535-47bb-0310-9956-ffa450edef68
2015-08-29 21:45:08 +00:00
Andreas Beeker f2487c035a junit4 fix
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1700043 13f79535-47bb-0310-9956-ffa450edef68
2015-08-29 14:47:16 +00:00
Andreas Beeker 33ffe01bff - reworked HexDump class - unified array dumps and usage of standard java calls for hex format
- fixed a few findbugs DM_DEFAULT_ENCODING issues
- removed a few System.out/.err calls - instead the poilogger is used
- closed a few left open resource instances

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1700040 13f79535-47bb-0310-9956-ffa450edef68
2015-08-29 14:41:12 +00:00
Dominik Stadler b98bfd48aa Adjust excludes for TestRecordLister
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1698081 13f79535-47bb-0310-9956-ffa450edef68
2015-08-27 06:32:33 +00:00
Dominik Stadler 50687e782b Refactor BaseXLSIteratingTest into a Parameterized test to better show which files failed
Simplify exclusion handling
Exclude testEXCEL_3.xls and testEXCEL_4.xls in two tests, not sure why this worked before?!

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1697601 13f79535-47bb-0310-9956-ffa450edef68
2015-08-25 08:30:49 +00:00
Dominik Stadler 97fa448a2c Allow multiple instances of HeaderFooterRecord in CustomViewSettingsRecordAggregate similar to ChartSubstreamRecordAggreagte in order to read sample 49931.xls correctly after re-saving it with HSSFWorkbook
Improve error output


git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1697600 13f79535-47bb-0310-9956-ffa450edef68
2015-08-25 08:28:54 +00:00
Dominik Stadler 639b847d6e Reduce required memory in tests by not actually creating all the rows/cells when verifying the max number of cellstyles. Hopefully this will avoid the OOMs that we see in various CI environments currently while still verifying the limits correctly.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1697326 13f79535-47bb-0310-9956-ffa450edef68
2015-08-24 08:12:01 +00:00
Dominik Stadler 39163eccff Eclipse warnings, code formatting, missing @Overrides, Javadoc, missing close(), ...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1696794 13f79535-47bb-0310-9956-ffa450edef68
2015-08-20 14:28:39 +00:00
Dominik Stadler f828ff1554 Somehow the Date formatting via SimpleDateFormatter fails on some CI machines, don't rely on this to avoid test-failures due to timezones/locales but rather compare the date directly.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1696710 13f79535-47bb-0310-9956-ffa450edef68
2015-08-20 06:29:48 +00:00
Nick Burch cd988b9c2e Patch from Javen ONeal from bug #58254 - CellFormatResult.text should check for nulls as per the javadoc
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1696638 13f79535-47bb-0310-9956-ffa450edef68
2015-08-19 18:00:31 +00:00
Dominik Stadler c275dea88c POI Bug 58260: Fix checks for limit on number of styles in XSSF/SXSSF and fix having more than 32k styles in SXSSF workbooks
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1696586 13f79535-47bb-0310-9956-ffa450edef68
2015-08-19 13:36:08 +00:00
Dominik Stadler a6caec985c Add additional checks to narrow down why this test fails when run via Maven
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1696584 13f79535-47bb-0310-9956-ffa450edef68
2015-08-19 13:28:23 +00:00
David North 5706c2ac9b Make intersection formulae work in XSSF. Patch from Matt Hillsdon plus additional tests.
https://bz.apache.org/bugzilla/show_bug.cgi?id=52111

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1696549 13f79535-47bb-0310-9956-ffa450edef68
2015-08-19 10:10:08 +00:00