Commit Graph

270 Commits

Author SHA1 Message Date
Nick Burch 091e464ed4 Bug #52389 - Handle ?/? format fractions as well as #/# ones, and tighten the criteria for triggering fraction formatting matching
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1225093 13f79535-47bb-0310-9956-ffa450edef68
2011-12-28 05:10:24 +00:00
Nick Burch 2af707980e Inspired by bug #52349 - Merge the logic between the TEXT function and DataFormatter
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1221126 13f79535-47bb-0310-9956-ffa450edef68
2011-12-20 07:20:44 +00:00
Yegor Kozlov 49c8d803f1 disabled a test failing under jdk 1.5: it assumes rounding mode half-up and jdk 1.6+
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1212401 13f79535-47bb-0310-9956-ffa450edef68
2011-12-09 13:26:49 +00:00
Yegor Kozlov b1dce5c2ad more progress with xssf chart api, see Bug 51196
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1167579 13f79535-47bb-0310-9956-ffa450edef68
2011-09-10 19:00:47 +00:00
Yegor Kozlov 3e56ba2b90 support for conditional formatting in XSSF including docs and examples
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1152099 13f79535-47bb-0310-9956-ffa450edef68
2011-07-29 04:47:25 +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
Nick Burch ee866292d9 Fix bug #51469 - XSSF support for row styles, to match existing HSSF functionality
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1144348 13f79535-47bb-0310-9956-ffa450edef68
2011-07-08 14:58:08 +00:00
Nick Burch ad4cef7557 More elapsed time unit tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1143737 13f79535-47bb-0310-9956-ffa450edef68
2011-07-07 09:53:36 +00:00
Yegor Kozlov af650e26a0 Bug 51431 - Avoid IndexOutOfBoundException when removing freeze panes in XSSF
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1139533 13f79535-47bb-0310-9956-ffa450edef68
2011-06-25 12:19:49 +00:00
Yegor Kozlov 14d4f183aa Bug 49564 - Fixed default behaviour of XSSFCellStyle.getLocked()
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1139288 13f79535-47bb-0310-9956-ffa450edef68
2011-06-24 13:06:04 +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 67206e5450 Bug 50681 - Fixed autosizing columns beyond 255 character limit
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1136330 13f79535-47bb-0310-9956-ffa450edef68
2011-06-16 08:57:55 +00:00
Yegor Kozlov 8b2603f7f6 Bug 51339 - Fixed arithmetic rounding in formula evaluation
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1135079 13f79535-47bb-0310-9956-ffa450edef68
2011-06-13 10:34:43 +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
Nick Burch ffcd5beed5 Fix bug #51115 - Handle DataFormatter escaping of "." in the same way as "-" and "/"
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1098917 13f79535-47bb-0310-9956-ffa450edef68
2011-05-03 05:42:41 +00:00
Nick Burch 1473cef845 Add a unit test for the formula evaluation caching/updating, which ensures that HSSF and XSSF behave the same
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1098227 13f79535-47bb-0310-9956-ffa450edef68
2011-05-01 08:00:56 +00:00
Yegor Kozlov 1ba16fb3b9 improved DataFormatter, see Bugzilla 50841
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1083173 13f79535-47bb-0310-9956-ffa450edef68
2011-03-19 12:42:01 +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
Nick Burch bc819d4a20 Add a unit test that shows bug #48079 no longer applies, and we can resize columns when there are more than 32767 rows
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1072093 13f79535-47bb-0310-9956-ffa450edef68
2011-02-18 18:02:47 +00:00
Nick Burch e57d3c7631 Remove un-used imports
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1061723 13f79535-47bb-0310-9956-ffa450edef68
2011-01-21 10:33:46 +00:00
Nick Burch 23935eb2a5 Fix bug #49928 for HSSF too - refactor HSSFDataFormat to allow overriding of built in formats, and tweak the format unit tests to do the same check for HSSF and XSSF. Also corrects some builtin formats for new HSSFWorkbooks which were slightly off
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1061288 13f79535-47bb-0310-9956-ffa450edef68
2011-01-20 13:20:24 +00:00
Yegor Kozlov 7d0dac8846 moved common formula-related code to org.apache.poi.ss.formula, eliminated dependencies on HSSF, reduced the number of eclipse warnings
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1037426 13f79535-47bb-0310-9956-ffa450edef68
2010-11-21 11:41:38 +00:00
Yegor Kozlov e8bbd4c957 clear calculation chain when deleting row or chaing cell type to blank, see Bugs 50113 and 49966
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1034358 13f79535-47bb-0310-9956-ffa450edef68
2010-11-12 12:03:56 +00:00
Yegor Kozlov 13920dccd6 use cached formula result when autosizing sheet columns, see Bugzilla 50211
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1033005 13f79535-47bb-0310-9956-ffa450edef68
2010-11-09 15:04:55 +00:00
Yegor Kozlov 442579c326 fixed inconsistent behaviour between HSSF and XSSF when creating consecutive names, see Bugzilla 49907
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@996136 13f79535-47bb-0310-9956-ffa450edef68
2010-09-11 12:45:59 +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 d55edf3f78 improved API for hiding sheets, see Bugzilla 49878
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@992772 13f79535-47bb-0310-9956-ffa450edef68
2010-09-05 12:53:07 +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
Yegor Kozlov c6219cadca fixed XSSFFormulaEvaluator to support blank cells, added BaseTestFormulaEvaluator - a common superclass for testing implementations of FormulaEvaluator
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@992620 13f79535-47bb-0310-9956-ffa450edef68
2010-09-04 15:03:48 +00:00
Yegor Kozlov acd3101b82 change cell type to error when setting Double.NaN or Infinities, see Bugzilla 49761
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@992591 13f79535-47bb-0310-9956-ffa450edef68
2010-09-04 12:33:09 +00:00
Yegor Kozlov 74c34444a8 support for protecting a XSSF workbook, see Bugzilla #48900
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@986649 13f79535-47bb-0310-9956-ffa450edef68
2010-08-18 12:49:05 +00:00
Nick Burch 5c3415e09c When formatting numbers with DataFormatter, handle brackets following colours
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@954416 13f79535-47bb-0310-9956-ffa450edef68
2010-06-14 11:45:09 +00:00
Nick Burch e6879026b5 Fix inspired by bug #48872 - allow DateFormatter.formatRawCellContents to handle 1904 as well as 1900 dates
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@950117 13f79535-47bb-0310-9956-ffa450edef68
2010-06-01 15:31:51 +00:00
Nick Burch fafc079bfe More work inspired by bug #48872 - handle MMMMM and elapsed time formatting rules in DataFormatter
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@950113 13f79535-47bb-0310-9956-ffa450edef68
2010-06-01 15:20:57 +00:00
Nick Burch b303c57d54 More fixes inspired by bug #48872 - handle zero formatting rules, and better color detection in DataFormatter
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@950035 13f79535-47bb-0310-9956-ffa450edef68
2010-06-01 12:12:22 +00:00
Yegor Kozlov c1748f0143 support for data validation for OOXML, see Bugzilla 49244
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@944869 13f79535-47bb-0310-9956-ffa450edef68
2010-05-16 15:49:21 +00:00
Nick Burch 81755dc8d2 Add patch from Jukka from bug #48617 + test - Optionally allow the overriding of the Locale used by DataFormatter to control how the default number and date formats should look
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@903303 13f79535-47bb-0310-9956-ffa450edef68
2010-01-26 16:21:17 +00:00
Yegor Kozlov 19d2a9ae09 improved usermodel to prevent data corruption when setting array formulas, mimic Excel behaviour and block changing cells included in multi-cell arrays
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@894469 13f79535-47bb-0310-9956-ffa450edef68
2009-12-29 19:47:38 +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
Josh Micich a1f9d0827c Clean-up in BaseTestSheetShiftRows and subclasses.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@893909 13f79535-47bb-0310-9956-ffa450edef68
2009-12-26 00:25:59 +00:00
Josh Micich 931671c3d2 Added CellRange return type for Sheet array formula methods. Renamed new test classes to make it clear that array formula evaluation is not being tested yet. Added extra test cases.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@893897 13f79535-47bb-0310-9956-ffa450edef68
2009-12-25 23:04:04 +00:00
Yegor Kozlov aba7267376 added HSSF usermodel tests for array formulas, added support for array formulas in ss interfaces
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@893870 13f79535-47bb-0310-9956-ffa450edef68
2009-12-25 15:15:55 +00:00
Josh Micich 7eea9324d8 More fixes for Cell.setCellType() when converting from CELL_TYPE_FORMULA to CELL_TYPE_STRING. Similar to issues fixed with bugzilla 46479.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@886951 13f79535-47bb-0310-9956-ffa450edef68
2009-12-03 22:18:12 +00:00
Yegor Kozlov 11b696550c improved work with cell comments in XSSF, also added support for cell comments to SS interfaces
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@884918 13f79535-47bb-0310-9956-ffa450edef68
2009-11-27 17:39:17 +00:00
Josh Micich ed1b4794a0 Bugzilla 47962 - Fixed some potential NPEs. Avoided unnecessary creation of box instances. Applied patch with mods
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@823348 13f79535-47bb-0310-9956-ffa450edef68
2009-10-08 22:29:41 +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 dc05b63cb9 Added method setFunction(boolean) for defined names
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@811998 13f79535-47bb-0310-9956-ffa450edef68
2009-09-07 05:17:23 +00:00
Yegor Kozlov f11f0c4138 Do not allow text longer than 32,767 characters in HSSF cells, see Bugzilla 47751
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@811994 13f79535-47bb-0310-9956-ffa450edef68
2009-09-07 04:55:32 +00:00
Josh Micich ee3718b5a7 Fixing compiler warnings - unboxing parameter to overloaded method, unnecessary typecast
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@805900 13f79535-47bb-0310-9956-ffa450edef68
2009-08-19 17:39:21 +00:00
Josh Micich 9926c89006 Fixed compiler warnings - unnecessary throws declaration
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@805552 13f79535-47bb-0310-9956-ffa450edef68
2009-08-18 19:49:28 +00:00
Yegor Kozlov 30ac3a9d07 Fixed XSSFCell to correctly parse column indexes greater than 702 (ZZ), see Bugzilla #47606
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@801305 13f79535-47bb-0310-9956-ffa450edef68
2009-08-05 17:02:04 +00:00
Yegor Kozlov e1ff96d77d fixed a regression issue where HSSFHyperlink failed to set inter-sheet and file links, see Bugzilla #47375
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@786442 13f79535-47bb-0310-9956-ffa450edef68
2009-06-19 10:37:24 +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
Yegor Kozlov e7d06ec34c Fixed HSSFSheet#getFirstRowNum and HSSFSheet#getLastRowNum to return correct values after removal of all rows
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@780245 13f79535-47bb-0310-9956-ffa450edef68
2009-05-30 11:31:14 +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 a5afdd38d2 avoid NPE when calling XSSF.setCellFormula(null) for a non-formula cell
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@766750 13f79535-47bb-0310-9956-ffa450edef68
2009-04-20 16:50:05 +00:00
Yegor Kozlov db553fd510 read GutsRecord in in the Sheet(RecordStream rs)
constructor (see bugzilla 46186); always call sheet.setAlternativeExpression in conjuction with sheet.setRowSumsBelow, see bugzilla 46714 and 30714

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@766273 13f79535-47bb-0310-9956-ffa450edef68
2009-04-18 09:06:16 +00:00
Yegor Kozlov 62b0595b83 Allow 255 arguments for excel functions in XSSF, see bugzilla 46279
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@766251 13f79535-47bb-0310-9956-ffa450edef68
2009-04-18 07:12:38 +00:00
Yegor Kozlov ecb76070a9 Fixed XSSFCell to preserve cell style when cell value is set to blank, also avoid NPE in XSSFCell.setCellType() when workbook does not have SST, see bugs 47026 and 47028
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@766103 13f79535-47bb-0310-9956-ffa450edef68
2009-04-17 18:02:01 +00:00
Josh Micich 344e422785 Improvements to Test[HX]SSFCell. Small fix to XSSFCell to get one more common test working.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@764225 13f79535-47bb-0310-9956-ffa450edef68
2009-04-11 17:53:39 +00:00
Josh Micich 60fd0a0fae Bugzilla 46973 - fixed defined names to behave better when refersToFormula is unset
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@762479 13f79535-47bb-0310-9956-ffa450edef68
2009-04-06 19:57:21 +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
Yegor Kozlov 5b0329873a update cell type when setting cached formula result in XSSFCell, also improved common xssf-hssf tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@757198 13f79535-47bb-0310-9956-ffa450edef68
2009-03-22 15:12:11 +00:00
Yegor Kozlov e4d94add7f support built-in data formats in XSSFDataFormat
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@749054 13f79535-47bb-0310-9956-ffa450edef68
2009-03-01 16:24:40 +00:00
Yegor Kozlov 1dfecf377c improved shifting of sheet-level names, also fixed an incorrect Bugzilla number in status.xml
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@748064 13f79535-47bb-0310-9956-ffa450edef68
2009-02-26 09:10:35 +00:00
Yegor Kozlov bebc51def9 more improvements in shiftRows: 1. shift named ranges and merged regions, JUnit added. 2. fixed shiftRows in XSSF to preserve row heights, see bugzilla 46719.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@747894 13f79535-47bb-0310-9956-ffa450edef68
2009-02-25 19:12:06 +00:00
Yegor Kozlov 4862f72197 added setDisplayZeros / isDisplayZeros and getMergedRegion(int) to common interface org.apache.poi.ss.usermodel.Sheet; more progress on testing common xssf-hssf interfaces
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@747307 13f79535-47bb-0310-9956-ffa450edef68
2009-02-24 08:38:16 +00:00
Yegor Kozlov cafbc76eb7 refactored XSSFSheet.shiftRows to use FormulaShifter, use a common test superclass for both hssf and xssf
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@744750 13f79535-47bb-0310-9956-ffa450edef68
2009-02-15 20:47:36 +00:00