Commit Graph

695 Commits

Author SHA1 Message Date
Dominik Stadler
bc4eb140c5 Add test which verifies that bug 61652 is not appearing any more on latest trunk
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1819769 13f79535-47bb-0310-9956-ffa450edef68
2018-01-01 14:39:08 +00:00
Yegor Kozlov
ca7549131b Bug 58106: when a cell with a 'master' shared formula is removed, the next cell in the range becomes the master
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1819623 13f79535-47bb-0310-9956-ffa450edef68
2017-12-30 16:34:57 +00:00
Yegor Kozlov
ff6f06cc27 Bugzilla 61116: Formula evaluation fails when using matrix addition within index function call
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1819596 13f79535-47bb-0310-9956-ffa450edef68
2017-12-30 13:11:56 +00:00
Dominik Stadler
9eb8fedf5d Fix bug 61787, which was introduced by bug 58067: Change how deleted content is detected to not incorrectly see too much text as deleted.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1819405 13f79535-47bb-0310-9956-ffa450edef68
2017-12-28 08:45:51 +00:00
Dominik Stadler
eb8fac4f77 Bug 61911: Avoid IndexOutOfBounds access when reading pictures
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1819403 13f79535-47bb-0310-9956-ffa450edef68
2017-12-28 08:45:36 +00:00
Greg Woolsey
a7a3293fb9 Implement DMAX and DSUM functions, following the pattern from DMIN.
Refactored the D* function enum to have instances return the function implementation instances rather than using a case construct, now that Java 8 is required.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1819376 13f79535-47bb-0310-9956-ffa450edef68
2017-12-27 22:33:03 +00:00
Yegor Kozlov
64d98e7872 Bug 61869: updating a cell with shared formula produces an unreadable file
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1818818 13f79535-47bb-0310-9956-ffa450edef68
2017-12-20 16:30:13 +00:00
Yegor Kozlov
1ccc7bfd46 Bug 61859: support for evaluating comparison operators in array mode, detect array mode from formula ptgs
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1818587 13f79535-47bb-0310-9956-ffa450edef68
2017-12-18 15:54:50 +00:00
Greg Woolsey
08e25fe46e Bug 61882 - Some paths can create an XSSFColor instance with a null CTColor reference
test file

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1817797 13f79535-47bb-0310-9956-ffa450edef68
2017-12-11 17:33:00 +00:00
Andreas Beeker
2c2028ede6 #61881 - handle invalid font names
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1817599 13f79535-47bb-0310-9956-ffa450edef68
2017-12-09 11:44:19 +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
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
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
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
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
PJ Fanning
5402bcdd49 add test case for bug 61701
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1813864 13f79535-47bb-0310-9956-ffa450edef68
2017-10-31 09:51:51 +00:00
Dominik Stadler
e24f25d0ef Add test which shows that bug 51262 is fixed now
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1811595 13f79535-47bb-0310-9956-ffa450edef68
2017-10-09 19:35:32 +00:00
Dominik Stadler
c2d09c0217 Bug 61586: Add test which shows that it works as expected
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1811355 13f79535-47bb-0310-9956-ffa450edef68
2017-10-06 17:41:20 +00:00
Andreas Beeker
a51bac65b7 #60499 - Deleting a picture that is used twice on a slide corrupt the slide
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808661 13f79535-47bb-0310-9956-ffa450edef68
2017-09-17 22:45:03 +00:00
Dominik Stadler
445852e773 Tried to reproduce bug 61300, but could not.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808502 13f79535-47bb-0310-9956-ffa450edef68
2017-09-16 08:20:25 +00:00
Tim Allison
4852228f3f 60279 -- back off to brute-force search for macro content if offset information is not correct
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808301 13f79535-47bb-0310-9956-ffa450edef68
2017-09-14 02:22:55 +00:00
PJ Fanning
5ef2f1636c Numeric Array Formula and Matrix Function [from Bob95132] This closes #69
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808297 13f79535-47bb-0310-9956-ffa450edef68
2017-09-13 23:54:36 +00:00
PJ Fanning
e726dd68de [bug-61515] fix xlsf issue with relationships [from Alain Bearez] This closes #70
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808294 13f79535-47bb-0310-9956-ffa450edef68
2017-09-13 23:10:44 +00:00
Tim Allison
3b32a00aa7 61470 -- add extraction of content within ruby elements; allow users to concatenate or not concatenate phonetic strings. Default is to concatenate.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1806712 13f79535-47bb-0310-9956-ffa450edef68
2017-08-30 16:29:52 +00:00
Greg Woolsey
914ae602b1 Fixes bug #61468, caused by a confusing OOXML spec design as noted in JavaDocs added in r1795648.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1806623 13f79535-47bb-0310-9956-ffa450edef68
2017-08-29 17:14:52 +00:00
Dominik Stadler
2108f82449 Fix 60384 and 60709: When shifting with merged regions we should correctly check if the region is moved along or needs to be removed because it is not fully kept via the shifting. This was broken by the fix for bug 59740, now additional unit tests ensure that it works better.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1805518 13f79535-47bb-0310-9956-ffa450edef68
2017-08-19 16:31:45 +00:00
Greg Woolsey
5e5adc70e5 Bug 61431 - Conditional formatting evaluation ignores undefined cells
now evaluating based on cell references instead, and watching out for undefined cells in rules that require a cell.

Added unit test based on previously failing file.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1805245 13f79535-47bb-0310-9956-ffa450edef68
2017-08-16 23:52:27 +00:00
PJ Fanning
9f28e36438 [Bug-61354] fix issue with extracting text from Word docs. This closes #66
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1803250 13f79535-47bb-0310-9956-ffa450edef68
2017-07-28 07:42:23 +00:00
Greg Woolsey
e1f37388fc Fix data validation value list evaluation
One of my users found that my initial implementation was lacking a core distinction - most evaluations expect a single result, and "unwrap" 2/3D ValueEval results to a single value based on the input row/column.

However, data validation list formulas explicitly are expected to return a 2D ValueEval.  This worked when the formula was simple and evaluated to a single Ptg, but only returned one value when the formula was more complex, or referenced a named range defined as a complex formula.

This change teaches WorkbookEvaluator about the distinction, by way of a new attribute for FormulaType.

There is room for discussion over how it is implemented, but this works for me.

Includes the failing workbook we had as a new unit test.

While I was in FormulaType I went ahead and removed the deprecated, unused, and redundant code marked for removal in 3.17.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1803121 13f79535-47bb-0310-9956-ffa450edef68
2017-07-26 22:19:58 +00:00
Tim Allison
a07ed9e864 61338 -- avoid infinite loop triggered by fuzzed wmf file
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1802997 13f79535-47bb-0310-9956-ffa450edef68
2017-07-25 20:26:57 +00:00
Tim Allison
408e236553 bug 61300 -- prevent really long (infinite?) loop on corrupt file
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1801989 13f79535-47bb-0310-9956-ffa450edef68
2017-07-14 20:47:40 +00:00
Tim Allison
93b1f0664c bug 61286/bug 61287 -- allow WriteProtectRecord to have 2 bytes, and allow for HeaderFooter to be empty.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1801966 13f79535-47bb-0310-9956-ffa450edef68
2017-07-14 13:54:06 +00:00
Tim Allison
278a235b08 bug 61294 -- prevent infinite loop in IOUtils' skipFully.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1801844 13f79535-47bb-0310-9956-ffa450edef68
2017-07-13 16:20:28 +00:00
PJ Fanning
1f8de11b31 [Bug-61281] guard against index out of bounds in XSSFExportToXml column mapping
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1801634 13f79535-47bb-0310-9956-ffa450edef68
2017-07-11 16:38:49 +00:00
Javen O'Neal
1137099aa3 bug 60685: ignore problems with HPBF Publisher Quill Contents PLC hyperlink records so that text extraction can continue
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1801405 13f79535-47bb-0310-9956-ffa450edef68
2017-07-10 01:34:30 +00:00
PJ Fanning
e046241c30 [Bug-61268] avoid NegativeArraySizeException parsing doc file
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1801395 13f79535-47bb-0310-9956-ffa450edef68
2017-07-09 22:32:27 +00:00
Nick Burch
05c7c16308 #61266 Test for old unsupported MS Write WRI files, and give a more helpful exception if found, plus unit tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1801376 13f79535-47bb-0310-9956-ffa450edef68
2017-07-09 16:26:33 +00:00
Andreas Beeker
377615e9cd #61169 - Text with Japanese characters overflows textbox
- add resize methods with Graphics argument

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1801329 13f79535-47bb-0310-9956-ffa450edef68
2017-07-08 22:20:55 +00:00
Greg Woolsey
972d561897 Add file that failed regression tests as a unit test.
Adjust table style processing to allow for AlternateContent wrappers for table element style definitions.  


git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1799733 13f79535-47bb-0310-9956-ffa450edef68
2017-06-24 05:55:45 +00:00
Tim Allison
649280df8c bug 61045 -- allow for (and log!) extra bytes in FormatRecord.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1799360 13f79535-47bb-0310-9956-ffa450edef68
2017-06-20 18:11:34 +00:00
Dominik Stadler
128ba623f8 Don't try to clone a chart, this makes integration-tests work for a few more documents, also the one added via bug 56557
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1799037 13f79535-47bb-0310-9956-ffa450edef68
2017-06-18 05:59:25 +00:00
Dominik Stadler
b1ed57750d Add missing file for test for bug 56557
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1798926 13f79535-47bb-0310-9956-ffa450edef68
2017-06-16 13:26:50 +00:00
Dominik Stadler
938bb91c51 Bug 60374: Add test for ArrayIndexOutOfBounds on old Word Documents due to Non-Unicode
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1798200 13f79535-47bb-0310-9956-ffa450edef68
2017-06-09 12:47:03 +00:00
Nick Burch
2ce00a5a78 XSSFTable should format numeric/date cells when used as Column Header names as Excel does, see https://stackoverflow.com/questions/44407111/apache-poi-cant-format-filled-cells-as-numeric
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1797914 13f79535-47bb-0310-9956-ffa450edef68
2017-06-07 12:39:41 +00:00
Andreas Beeker
2b4f944883 #61162 - En-/decryption support for HWPF
Decryption for Binary RC4 and CryptoAPI (... XOR is missing)

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1797837 13f79535-47bb-0310-9956-ffa450edef68
2017-06-06 22:21:11 +00:00
Greg Woolsey
586cf38f1c Bug 60898 - XSSFColor's getARGB() method returns a wrong color value when a workbook has a custom indexed color
teach XSSFColor and most things that create instances about indexed colors.

Null is a valid value for IndexedColorMap instances - the existing built-in default colors are used.

Whenever a workbook style is accessible in the call hierarchy its color mappings are passed down now.

Thanks for the unit test in the issue, it now passes.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1796359 13f79535-47bb-0310-9956-ffa450edef68
2017-05-26 23:14:48 +00:00
Dominik Stadler
d868026959 Bug 61063: Add a RefListEval to handle UnionPtg and implement it for Rank(), may be missing for other functions where ArrayEval is currently handled
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1795963 13f79535-47bb-0310-9956-ffa450edef68
2017-05-23 21:13:02 +00:00
Andreas Beeker
c45c64ae3a removed invalid test file
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1795122 13f79535-47bb-0310-9956-ffa450edef68
2017-05-14 22:24:07 +00:00
Greg Woolsey
0cdc064b0c git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1795002 13f79535-47bb-0310-9956-ffa450edef68 2017-05-12 18:01:32 +00:00
Greg Woolsey
18d107d974 61060 - teach DataFormatter about conditional formatting rules with number formats
Currently only implemented for XSSF, as there is no API available for HSSF conditional formatting rule number formats (if it is even in the files).

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1794084 13f79535-47bb-0310-9956-ffa450edef68
2017-05-05 17:44:58 +00:00