Commit Graph

641 Commits

Author SHA1 Message Date
Dominik Stadler d0513f2ca6 Apply patch from bug 58909 - Add a cloneSheet() which directly sets the sheetname to allow to avoid a costly renaming of sheets.
Combine related unit-tests into Base-Test-Classes to run them for all types of Workbook/Sheet/...

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1737237 13f79535-47bb-0310-9956-ffa450edef68
2016-03-31 13:32:05 +00:00
Dominik Stadler 992adb9c16 Revert set of inadvertedly committed files/changes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1737029 13f79535-47bb-0310-9956-ffa450edef68
2016-03-29 18:11:44 +00:00
Dominik Stadler f5332a3a40 Bug 58915: Add note about memory consumption and update changelog
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1737025 13f79535-47bb-0310-9956-ffa450edef68
2016-03-29 17:30:55 +00:00
Dominik Stadler 0115c12e2d Fix some compiler warnings, javadoc, ...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1736924 13f79535-47bb-0310-9956-ffa450edef68
2016-03-28 20:22:08 +00:00
Javen O'Neal 6b6b6a668e add more commented-out tests for bug 58779: closing an XML Workbook that was not opened as read-only will modify the file on disk
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1736742 13f79535-47bb-0310-9956-ffa450edef68
2016-03-27 13:04:37 +00:00
Andreas Beeker e9f333827d fix eclipse warnings
close resources

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1735912 13f79535-47bb-0310-9956-ffa450edef68
2016-03-21 00:14:21 +00:00
Andreas Beeker b09c85ff04 eclipse warning fixes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1735706 13f79535-47bb-0310-9956-ffa450edef68
2016-03-18 23:12:28 +00:00
Dominik Stadler 4bd9afde4f Bug 56930: Add Workbook.getNames() to allow to query for names that appear multiple times
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1734863 13f79535-47bb-0310-9956-ffa450edef68
2016-03-13 21:30:38 +00:00
Dominik Stadler 0a5dcbec1b Bug 55668: Try to avoid NullPointerException when chaning cell type and formula leads to null-string by seting the cell to BLANK instead
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1734861 13f79535-47bb-0310-9956-ffa450edef68
2016-03-13 21:30:18 +00:00
Andreas Beeker 653403e956 #59135 - Password gets truncated when using passwords longer than 15 characters for the function protectSheet()
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1734843 13f79535-47bb-0310-9956-ffa450edef68
2016-03-13 19:31:32 +00:00
Andreas Beeker 8e36872c48 #59170 - Remove deprecated classes (POI 3.15) - *Workbook.setRepeatingRowsAndColumns()
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1734701 13f79535-47bb-0310-9956-ffa450edef68
2016-03-12 13:33:53 +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 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
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
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
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 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 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
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
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
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 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
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 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
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 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 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 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 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
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