Commit Graph

2404 Commits

Author SHA1 Message Date
Greg Woolsey
11e60eb77e Bug 61882 - Some paths can create an XSSFColor instance with a null CTColor reference
Protect against this in the future by introducing a factory method to create XSSFColor instances from a CTColor instance and the associated workbook style indexed color map.

If the CTColor instance is null, the factory returns null.  All callers already are prepared for a null instance, but many had their own null check on the CTColor object.  This centralizes that.

This also further forces the requirement for the indexed color map.  Any time a color is created, the workbook or styleTable is available in the same context, so passing this is extra parameter is trivial and allows XSSFColor to properly reference custom/themed indexed colors.

Did not remove any methods yet, only deprecated them.  Changed the signature to one internal test-only constructor.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1817796 13f79535-47bb-0310-9956-ffa450edef68
2017-12-11 17:30:04 +00:00
Greg Woolsey
41981a4ac9 #61841
Add @Override annotations, clean up imports

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1817331 13f79535-47bb-0310-9956-ffa450edef68
2017-12-07 01:54:21 +00:00
Greg Woolsey
cbd17b9320 #61841 fix typo in method name
Fixing the typo pointed out by PJ Fanning, thanks for the proof read!

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1817325 13f79535-47bb-0310-9956-ffa450edef68
2017-12-06 23:53:25 +00:00
Greg Woolsey
94c2b64692 Bug #61841 - Unnecessary long computation when evaluating VLOOKUP on all column reference
always with the missing license...

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1817254 13f79535-47bb-0310-9956-ffa450edef68
2017-12-06 00:46:42 +00:00
Greg Woolsey
6390202491 Bug #61841 - Unnecessary long computation when evaluating VLOOKUP on all column reference
Found some optimizations in the general evaluation framework related to blank cells in rows beyond the last defined row of a sheet.

I don't see any issue with passing a bit of context down deeper into this framework, as it's all POI-internal and only had one calling path.

See the above bug for the performance analysis.  Not specifically related to VLOOKUP, but improves that case by more than 2/3 as well.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1817252 13f79535-47bb-0310-9956-ffa450edef68
2017-12-06 00:15:51 +00:00
PJ Fanning
89a788ea5b use try-with-resources in more places
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1817238 13f79535-47bb-0310-9956-ffa450edef68
2017-12-05 21:23:44 +00:00
Nick Burch
e8234fd032 Javadoc fixes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1816453 13f79535-47bb-0310-9956-ffa450edef68
2017-11-27 14:05:17 +00:00
Alain Béarez
c795f2e793 XDDF usermodel for Charts closes #68 on GitHub
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1816383 13f79535-47bb-0310-9956-ffa450edef68
2017-11-26 14:03:01 +00:00
PJ Fanning
76a16ba175 use try with resources in examples
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1816189 13f79535-47bb-0310-9956-ffa450edef68
2017-11-23 20:03:25 +00:00
Dominik Stadler
d77e980e44 Change order of handling shape-types in copy() as FreeFormShape derives from AutoShape and thus would have not been copied correctly currently
Fix some Javadoc, some warnings and code duplications

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1816185 13f79535-47bb-0310-9956-ffa450edef68
2017-11-23 18:54:11 +00:00
PJ Fanning
268bcdbc2d add forbidden api checks for non-Locale toLowerCase and toUpperCase
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1815994 13f79535-47bb-0310-9956-ffa450edef68
2017-11-21 22:10:48 +00:00
PJ Fanning
c1ae77c8ce [bug-61792] basic test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1815873 13f79535-47bb-0310-9956-ffa450edef68
2017-11-20 23:58:13 +00:00
PJ Fanning
d4f15fafa9 [bug-61792] some changes to avoid iterating over chars of Strings
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1815871 13f79535-47bb-0310-9956-ffa450edef68
2017-11-20 23:35:36 +00:00
Mark Murphy
c37a85d974 javadocs and Quick page improvements for XSSF Header/Footer
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1815706 13f79535-47bb-0310-9956-ffa450edef68
2017-11-19 01:35:07 +00:00
Greg Woolsey
963a8fedae ignore a unit test that snuck in. It was created to investigate an open bug report. It fails, as expected, which broke the build.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1815336 13f79535-47bb-0310-9956-ffa450edef68
2017-11-15 16:34:14 +00:00
Greg Woolsey
ff034f6a20 Fixes Bug 61764 Conditional formatting rules don't evaluate properly for some multi-range rule definitions
Fixes Bug 61761 Conditional formatting rule evaluation doesn't like comparing cells of different types

fixed, with unit tests.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1815298 13f79535-47bb-0310-9956-ffa450edef68
2017-11-15 08:35:17 +00:00
Dominik Stadler
3e70d22cbc Fix setting a font-color if no previous color is defined for the font
Add unit-test to verify this

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1815086 13f79535-47bb-0310-9956-ffa450edef68
2017-11-13 11:46:04 +00:00
Dominik Stadler
1b9d599882 Fix tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1815085 13f79535-47bb-0310-9956-ffa450edef68
2017-11-13 11:44:50 +00:00
Javen O'Neal
f062e7f1c2 bug 61745: remove String#toString() usage found by forbidden apis check
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1815048 13f79535-47bb-0310-9956-ffa450edef68
2017-11-13 00:51:41 +00:00
Javen O'Neal
a1b8f3ff14 bug 61745: add support for charts in XWPF/docx. Thanks to Sandeep Tiwari for the patch
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1815047 13f79535-47bb-0310-9956-ffa450edef68
2017-11-12 21:48:41 +00:00
Javen O'Neal
1bc1bdb58b XWPFTable#getRows() should return an unmodifiable list unless the method can correctly update xmlbeans in response to modifying the list
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1814999 13f79535-47bb-0310-9956-ffa450edef68
2017-11-12 01:34:52 +00:00
Javen O'Neal
fd29e87402 make tableRows final; initialize where defined rather than in constructor.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1814998 13f79535-47bb-0310-9956-ffa450edef68
2017-11-12 01:32:43 +00:00
Javen O'Neal
c1e6c2eef7 deprecate XWPFTable#addNewRowBetween(int,int), which has not been implemented since 2008 when this class was first authored. (Unrelated: This closes #82 on github).
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1814997 13f79535-47bb-0310-9956-ffa450edef68
2017-11-12 01:30:42 +00:00
Mark Murphy
70fdcdf848 Surface XSSF Header/Footer Attributes (60887)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1814950 13f79535-47bb-0310-9956-ffa450edef68
2017-11-11 14:18:24 +00:00
Dominik Stadler
7eb0187a5a Enhance unit-test to Verify that bug 58785 is already via via some other change
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1814440 13f79535-47bb-0310-9956-ffa450edef68
2017-11-06 20:26:32 +00:00
Dominik Stadler
4d13aefd6e Add test-case which shows that bug 55814 is fixed already by other changes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1814290 13f79535-47bb-0310-9956-ffa450edef68
2017-11-04 13:45:12 +00:00
Dominik Stadler
48d6e6c9cf Fix some IntelliJ and JavaDoc warnings and avoid code-duplication and duplicated test-methods
Adjust tests slighlty, close resources

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1814289 13f79535-47bb-0310-9956-ffa450edef68
2017-11-04 13:45:04 +00:00
Javen O'Neal
6fcacf21f3 bug 61474, github #81: pull up methods from RowShifter to BaseRowColShifter, since both row and column shifting should be able to shift formulas, comments, merged regions, conditional formatting, etc; add @since decorators for new *ColumnShifter and *RowColShifter classes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1814261 13f79535-47bb-0310-9956-ffa450edef68
2017-11-04 09:07:32 +00:00
Javen O'Neal
ec8b13c3a8 bug 61474, github #81: remove @Internal RowShifter#updateRowFormulas, move to XSSFRowColShifter; implement ColumnShifter#updateFormulas; remove duplicated JavaDocs (better to inherit)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1814260 13f79535-47bb-0310-9956-ffa450edef68
2017-11-04 08:54:20 +00:00
Javen O'Neal
4d526bfd01 bug 61474, github #81: implement updateConditionalFormatting for ColumnShifter
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1814259 13f79535-47bb-0310-9956-ffa450edef68
2017-11-04 07:58:41 +00:00
Javen O'Neal
7c88f32408 bug 61474, github #81: implement updateNamedRanges for ColumnShifter
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1814258 13f79535-47bb-0310-9956-ffa450edef68
2017-11-04 07:42:33 +00:00
Javen O'Neal
4b92e7c67a bug 61474, github #81: add ColumnShifter interface; deduplicate some code in RowShifter, CFRecordsAggregate
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1814256 13f79535-47bb-0310-9956-ffa450edef68
2017-11-04 07:17:44 +00:00
Javen O'Neal
b671199b40 bug 61474, #81 on github: add @Override annotation; rename FormulaShifter shifter to FormulaShifter formulaShifter to reduce confusion with the shifter variable referring to the RowShifter
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1814255 13f79535-47bb-0310-9956-ffa450edef68
2017-11-04 05:48:18 +00:00
Javen O'Neal
59594b6030 rename ambiguous variable name shifter -> formulaShifter
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1814247 13f79535-47bb-0310-9956-ffa450edef68
2017-11-04 02:57:01 +00:00
Javen O'Neal
4b2f709551 whitespace
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1814245 13f79535-47bb-0310-9956-ffa450edef68
2017-11-04 02:49:52 +00:00
Andreas Beeker
388c491135 #61671 - XSLFSlide does not contain isHidden and setHidden like HSLFSlide does
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1814122 13f79535-47bb-0310-9956-ffa450edef68
2017-11-02 23:15:19 +00:00
PJ Fanning
34006a542e use StringBuilder in more places
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1813869 13f79535-47bb-0310-9956-ffa450edef68
2017-10-31 10:24:47 +00:00
PJ Fanning
e623808539 add test case for bug 61701 and use StringBuilder in more places
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1813863 13f79535-47bb-0310-9956-ffa450edef68
2017-10-31 09:48:23 +00:00
Javen O'Neal
729c86e82c consolidate duplicated code: XSSFWorkbook#setBookViewsIfMissing()
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1813841 13f79535-47bb-0310-9956-ffa450edef68
2017-10-31 01:45:03 +00:00
Javen O'Neal
1cea1c52fd bug 61630: Patch from Daniel to fix XSSFExportToXML IllegalArgumentException: Comparison method violates its general contract! (bug 61630, comment 17, attachment 35468). Found during manual testing.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1813443 13f79535-47bb-0310-9956-ffa450edef68
2017-10-26 18:10:09 +00:00
Javen O'Neal
2cf5a977aa bug 61630: further XSSFExportToXML performance improvements from Daniel (bug 61630 comment 15, attachment 35450)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1813332 13f79535-47bb-0310-9956-ffa450edef68
2017-10-25 18:19:12 +00:00
Javen O'Neal
02093f59dc bug 61630: revert r1813240, which failed the integration test with org.apache.poi.stress.XSSFFileHandler on test-data/spreadsheet/59025.xlsx
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1813243 13f79535-47bb-0310-9956-ffa450edef68
2017-10-24 23:44:21 +00:00
Javen O'Neal
87d9019713 bug 61630: further XSSFExportToXML performance improvements from Daniel (comment 9, bug 61630 attachment 35450)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1813240 13f79535-47bb-0310-9956-ffa450edef68
2017-10-24 23:00:12 +00:00
PJ Fanning
95828710f1 Remove more deprecated code
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1813102 13f79535-47bb-0310-9956-ffa450edef68
2017-10-23 21:17:49 +00:00
PJ Fanning
6c0ac68e05 Remove more deprecated code
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1813085 13f79535-47bb-0310-9956-ffa450edef68
2017-10-23 20:27:47 +00:00
PJ Fanning
245d9b3b7f Introduce new BorderFormatting methods to expose border styles
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1812917 13f79535-47bb-0310-9956-ffa450edef68
2017-10-22 13:53:42 +00:00
PJ Fanning
26cc1e4d32 Remove use of deprecated methods
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1812911 13f79535-47bb-0310-9956-ffa450edef68
2017-10-22 13:03:33 +00:00
PJ Fanning
1ea1a692e0 Remove use of deprecated methods
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1812907 13f79535-47bb-0310-9956-ffa450edef68
2017-10-22 12:45:35 +00:00
PJ Fanning
dfd5f07079 Remove use of deprecated methods
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1812901 13f79535-47bb-0310-9956-ffa450edef68
2017-10-22 12:07:14 +00:00
Dominik Stadler
5d5ba1c767 Add getter/setter for ReadingOrder to XSSF, closes issue #73
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1812558 13f79535-47bb-0310-9956-ffa450edef68
2017-10-18 18:26:41 +00:00