Commit Graph

1596 Commits

Author SHA1 Message Date
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
Dominik Stadler
badd478547 Add one unit-test for a different way of calculating workdays to see if this also triggers test failures in Sonar Maven runs which currently fail for test-case TestWorkdayFunction
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1696498 13f79535-47bb-0310-9956-ffa450edef68
2015-08-18 20:24:07 +00:00
Nick Burch
a92c078d18 Fix indents
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1696429 13f79535-47bb-0310-9956-ffa450edef68
2015-08-18 14:34:52 +00:00
Nick Burch
3bde975db7 Patch from Javen ONeal from bug #58252 - More CellReference unit testing coverage
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1696427 13f79535-47bb-0310-9956-ffa450edef68
2015-08-18 14:32:53 +00:00
Dominik Stadler
0345110611 Try to make Sonar builds run again: add missing dependency, add ooxml-schema-security, don't depend on dir test-data and build-directory directly, don't override a POILogger that is set via System Properties
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1696165 13f79535-47bb-0310-9956-ffa450edef68
2015-08-16 20:51:40 +00:00
Nick Burch
36ee486049 More consistent test-file output for Excel testing
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1695605 13f79535-47bb-0310-9956-ffa450edef68
2015-08-12 19:52:22 +00:00
Nick Burch
a87cdf35cd Fix inconsistent whitespace/indents
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1695604 13f79535-47bb-0310-9956-ffa450edef68
2015-08-12 19:49:25 +00:00
Nick Burch
83bf96035c Continue with 55747 / 55324 testing
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1695603 13f79535-47bb-0310-9956-ffa450edef68
2015-08-12 19:46:54 +00:00
Nick Burch
459cb5ec62 More tests for 55747 / 55324
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1695601 13f79535-47bb-0310-9956-ffa450edef68
2015-08-12 19:31:47 +00:00
Andreas Beeker
750558d8d9 #56519 - XSLFSlide.draw is not working with text embeded in PPTX
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1694925 13f79535-47bb-0310-9956-ffa450edef68
2015-08-09 22:44:13 +00:00
Nick Burch
0e2e61d1e1 NPE fix for text extraction from MSG files with only a short name
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1694255 13f79535-47bb-0310-9956-ffa450edef68
2015-08-05 15:58:43 +00:00
Nick Burch
eb2ded1c4b Further unit tests for #55747
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1693675 13f79535-47bb-0310-9956-ffa450edef68
2015-08-01 00:01:56 +00:00
Nick Burch
bf7238699b Unit test for #55747
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1693674 13f79535-47bb-0310-9956-ffa450edef68
2015-07-31 23:53:54 +00:00
Dominik Stadler
d3efdf4dc4 Adjust test that is failing on freebsd some more
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1692904 13f79535-47bb-0310-9956-ffa450edef68
2015-07-27 16:08:08 +00:00
Dominik Stadler
23366918cd Adjust init of PresetGeometries to not keep the object if static initialization fails
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1692898 13f79535-47bb-0310-9956-ffa450edef68
2015-07-27 15:39:34 +00:00
Dominik Stadler
4728df5b6a Improve error message slightly, add tests to verify things failing in Gump-build currently
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1692836 13f79535-47bb-0310-9956-ffa450edef68
2015-07-27 08:44:04 +00:00
Dominik Stadler
f87d04c7cc Yet another adjustment to the test as it seems that small values can be computed, only larger ones fail, let's find out at which point it fails
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1692326 13f79535-47bb-0310-9956-ffa450edef68
2015-07-22 20:30:24 +00:00
Dominik Stadler
7560a4eb47 Still more checks to track down why canComputeColumnWidth() returns true, but width is still returned 0 on freebsd...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1692289 13f79535-47bb-0310-9956-ffa450edef68
2015-07-22 15:26:41 +00:00
Dominik Stadler
56c7b61cc2 Still more checks to track down why canComputeColumnWidth() returns true, but width is still returned 0 on freebsd...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1692278 13f79535-47bb-0310-9956-ffa450edef68
2015-07-22 14:03:11 +00:00
Dominik Stadler
48a08235ef Still more checks to track down why canComputeColumnWidth() returns true, but width is still returned 0 on freebsd...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1692265 13f79535-47bb-0310-9956-ffa450edef68
2015-07-22 12:43:48 +00:00
Dominik Stadler
ed7d892de7 Bug 58156: Possible data corruption in hasPOIFSHeader and hasOOXMLHeader
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1691948 13f79535-47bb-0310-9956-ffa450edef68
2015-07-20 14:03:35 +00:00
Nick Burch
b7d27d44ce #58130 CF DataBar example and tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1691869 13f79535-47bb-0310-9956-ffa450edef68
2015-07-20 04:43:36 +00:00
Nick Burch
104d9ad8e3 #58130 CF DataBar support
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1691868 13f79535-47bb-0310-9956-ffa450edef68
2015-07-20 03:52:50 +00:00
Nick Burch
164aa4c7c6 #58130 Support for creating CF Color Scale Formattings
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1691866 13f79535-47bb-0310-9956-ffa450edef68
2015-07-20 02:49:12 +00:00
Nick Burch
130fe24870 #58130 HSSF CF Color Scale color support
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1691865 13f79535-47bb-0310-9956-ffa450edef68
2015-07-20 00:47:27 +00:00
Nick Burch
7261a10654 #58130 Enable CF ColorScale support on the rule, and begin testing
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1691860 13f79535-47bb-0310-9956-ffa450edef68
2015-07-19 22:35:37 +00:00
Nick Burch
65b58b1a5d #58130 Stub the CF Color Scale unit tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1691789 13f79535-47bb-0310-9956-ffa450edef68
2015-07-19 02:54:25 +00:00
Nick Burch
22c2e794d6 #58130 Fix the icon formatting read/write CF test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1691788 13f79535-47bb-0310-9956-ffa450edef68
2015-07-19 02:35:04 +00:00
Nick Burch
520a6fdf68 #58130 More CF Icon unit tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1691787 13f79535-47bb-0310-9956-ffa450edef68
2015-07-19 00:08:26 +00:00
Nick Burch
293a7b4a5b Simplify CF icon rule asserts
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1691764 13f79535-47bb-0310-9956-ffa450edef68
2015-07-18 18:50:52 +00:00
Nick Burch
6cfa6ee7e4 #58130 Mostly there with CF Icon sets
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1691679 13f79535-47bb-0310-9956-ffa450edef68
2015-07-18 04:55:27 +00:00
Dominik Stadler
7f8a76da87 One more try to find out why autosize fails on the freebsd CI machine
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1691495 13f79535-47bb-0310-9956-ffa450edef68
2015-07-17 08:42:10 +00:00
Dominik Stadler
6fcb49535a * Some more checks as test still fails on freebsd CI machine
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1691407 13f79535-47bb-0310-9956-ffa450edef68
2015-07-16 14:17:13 +00:00
Dominik Stadler
651f03cc64 * Make on unit test not fail if Fonts are not available on the machine
* Refactor SheetUtil a bit to reduce code-duplication, adjust JavaDoc for -1 return values
* Add method to check if we can compute text-width
* Add unit-tests which verify some more of SheetUtil

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1691341 13f79535-47bb-0310-9956-ffa450edef68
2015-07-16 09:06:47 +00:00
Dominik Stadler
aeb0d6abe3 Fixup printing record name in case of unknown sid
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1691312 13f79535-47bb-0310-9956-ffa450edef68
2015-07-16 03:49:44 +00:00
Dominik Stadler
e64b72a4e1 More coverage of class EscherDump
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1691311 13f79535-47bb-0310-9956-ffa450edef68
2015-07-16 03:42:17 +00:00
Dominik Stadler
0c410544a9 Fix some Eclipse warnings and adjust use of Generics, Comments, close()
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1691308 13f79535-47bb-0310-9956-ffa450edef68
2015-07-16 03:41:57 +00:00
Nick Burch
9c9023524a Further HSSF support towards CF IconSets #58130
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1691113 13f79535-47bb-0310-9956-ffa450edef68
2015-07-15 00:04:53 +00:00
Nick Burch
c38bb72090 More CF colour tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1691094 13f79535-47bb-0310-9956-ffa450edef68
2015-07-14 21:54:28 +00:00
Nick Burch
a6836c595f Start checking the CF colours in the unit tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1691092 13f79535-47bb-0310-9956-ffa450edef68
2015-07-14 21:45:23 +00:00
Nick Burch
98d79c8eda Check more of the complex CF cases from the test files
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1690813 13f79535-47bb-0310-9956-ffa450edef68
2015-07-13 20:25:52 +00:00
Nick Burch
4632e35c3d Move some test checks to using ConditionType instead of raw bytes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1690808 13f79535-47bb-0310-9956-ffa450edef68
2015-07-13 20:11:47 +00:00
Nick Burch
fbf95cdb54 Enable CF2007 test for XLSX too
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1690805 13f79535-47bb-0310-9956-ffa450edef68
2015-07-13 19:56:09 +00:00
Nick Burch
705c3fe1f9 Have the HSSF ConditionalFormattingTable look for CF12 records as well, and begin more detailed testing of the high level rules #58130
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1690796 13f79535-47bb-0310-9956-ffa450edef68
2015-07-13 18:55:42 +00:00
Nick Burch
65aa10e10f Begin updating the HSSF CF code to work on the base types, so it can handle both CF and CF12
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1690793 13f79535-47bb-0310-9956-ffa450edef68
2015-07-13 18:38:15 +00:00
Nick Burch
9e7d44b81c Fix inconsistent indents
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1690790 13f79535-47bb-0310-9956-ffa450edef68
2015-07-13 18:28:05 +00:00
Nick Burch
6cc72aab77 Fix generics, and use base types
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1690789 13f79535-47bb-0310-9956-ffa450edef68
2015-07-13 18:27:06 +00:00