Commit Graph

31 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
Javen O'Neal 4f4531c67e assertCloseDoesNotModifyFile method was adapted from method with the same name in TestWorkbookFactory
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1736744 13f79535-47bb-0310-9956-ffa450edef68
2016-03-27 13:09:50 +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 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
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 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
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
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 5c76ccba5b Add missing close() of resources in both production code and tests
Use revert() instead of close() on OCPPackage in some places to not re-write the file unnecessarily.
This should now run tests without leftover file handles when checked with file leak detector and
allows to find newly introduced cases more easily.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1648160 13f79535-47bb-0310-9956-ffa450edef68
2014-12-28 09:16:57 +00:00
Dominik Stadler 0fdfac62c9 Bug 57171 and 57163: Adjust the active sheet in setSheetOrder() and removeSheet() for both HSSF and XSSF
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1647264 13f79535-47bb-0310-9956-ffa450edef68
2014-12-22 09:00:18 +00:00
Andreas Beeker f8bf66308e update *ssf-workbook tests to junit4
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1568541 13f79535-47bb-0310-9956-ffa450edef68
2014-02-14 23:21:30 +00:00
Dominik Stadler 0342f9602d Add reproducer tests for Bug 53515, disabled as we do not fix any of the
reported issues. Also fix some Ecliipse warnings.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1535959 13f79535-47bb-0310-9956-ffa450edef68
2013-10-26 10:05:24 +00:00
Dominik Stadler 13e08c3e92 Add testcase which tries to reproduce Bug 48495, but seems to be fixed
now.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1516981 13f79535-47bb-0310-9956-ffa450edef68
2013-08-23 18:56:11 +00:00
Nick Burch a7bfec9271 Fix from Florian Hopf from bug #54564 - Fix error message text
for a workbook with no sheets when a sheet operation is performed

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1496516 13f79535-47bb-0310-9956-ffa450edef68
2013-06-25 15:19:56 +00:00
Yegor Kozlov 8394c58b15 Bug 53500: split setRepatingRowsAndColumns into setRepeatingRows and setRepeatingColumns
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1369290 13f79535-47bb-0310-9956-ffa450edef68
2012-08-04 08:51:49 +00:00
Yegor Kozlov d619711ea4 Bugzilla 53500 - Getter for repeating rows and columns
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1364061 13f79535-47bb-0310-9956-ffa450edef68
2012-07-21 10:33:00 +00:00
Yegor Kozlov af696ae5fd optimized unused imports and removed deprecation warnings in poi-main
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1296979 13f79535-47bb-0310-9956-ffa450edef68
2012-03-05 09:44:20 +00:00
Yegor Kozlov 44521220e5 Fixed bug 51533 - Avoid exception when changing name of a sheet containing shared formulas
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1148673 13f79535-47bb-0310-9956-ffa450edef68
2011-07-20 09:42:31 +00:00
Yegor Kozlov abe5618b5d Bug 51415 - Fixed Workbook.createSheet(sheetName) to truncate names longer than 31 characters
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1138819 13f79535-47bb-0310-9956-ffa450edef68
2011-06-23 10:49:11 +00:00
Yegor Kozlov 2cf314de68 initial support for SXSSF tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1124177 13f79535-47bb-0310-9956-ffa450edef68
2011-05-18 10:37:31 +00:00
Yegor Kozlov 817a44dcd4 Change related formulas and named ranges when XSSFWorkbook.setSheetName is called, see Bugzilla 47100
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1077878 13f79535-47bb-0310-9956-ffa450edef68
2011-03-04 11:15:01 +00:00
Yegor Kozlov 05593e6902 allow sheet names longer than 31 chars in XSSF, enforce name uniqueness on the first 31 chars
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@993246 13f79535-47bb-0310-9956-ffa450edef68
2010-09-07 07:09:49 +00:00
Yegor Kozlov 3744428426 fixed XSSFWorkbook.createSheet to throw exception if sheet name begins or ends with a single quote ('), see Bugzilla 49875
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@992629 13f79535-47bb-0310-9956-ffa450edef68
2010-09-04 15:56:29 +00:00
Josh Micich 88dbbbf1c6 Replaced getInstance methods with field for instances of ITestDataProvider. Some simplification in hierarchy of related tests.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@893929 13f79535-47bb-0310-9956-ffa450edef68
2009-12-26 02:17:34 +00:00
Yegor Kozlov bd966f208b removed unnecessary svn:executable flag from files in SVN trunk, see bugzilla 47734
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@814335 13f79535-47bb-0310-9956-ffa450edef68
2009-09-13 16:05:28 +00:00
Yegor Kozlov af23e1554d Fixed XSSFWorkbook#setRepeatingRowsAndColumns to tolerate sheet names with quotes, see bugzilla #47294
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@783445 13f79535-47bb-0310-9956-ffa450edef68
2009-06-10 18:44:53 +00:00
Josh Micich e6a53dc85b Changed CRLF to LF in .java test files. Minor reformatting and compiler warning fixes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@776056 13f79535-47bb-0310-9956-ffa450edef68
2009-05-18 19:11:45 +00:00
Yegor Kozlov 6ceeb39a45 consolidate limits specific to Excel version(Excel97, Excel2007) in SpreadsheetVersion enum, allow merged regions with columns greater than 255 or rows bigger than 65536 in XSSF
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@762372 13f79535-47bb-0310-9956-ffa450edef68
2009-04-06 15:06:23 +00:00
Yegor Kozlov 51d71180ab more refactoring of common ss tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@759714 13f79535-47bb-0310-9956-ffa450edef68
2009-03-29 16:10:40 +00:00
Yegor Kozlov 52ab464cab improved test cases: moved common hssf-xssf test to org.apache.poi.ss namespace, removed duplicate tests, refactored code to throw same exceptions, etc
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@759112 13f79535-47bb-0310-9956-ffa450edef68
2009-03-27 11:50:52 +00:00