Commit Graph

463 Commits

Author SHA1 Message Date
Dominik Stadler f71833e1d9 Do not return null for POITextExtractor.getMetadataTextExtractor() for old Excel files
To adhere to the JavaDoc of the POITextExtractor interface which does not document a
possible null return.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1889205 13f79535-47bb-0310-9956-ffa450edef68
2021-04-26 15:12:32 +00:00
PJ Fanning 50cfe3c10e [github-235] Fix date formatting for number cell values. Thanks to Anthony Schott. This close #235
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1889179 13f79535-47bb-0310-9956-ffa450edef68
2021-04-25 17:16:05 +00:00
PJ Fanning e7a2df7dda [github-234] Ensure the hours position is correct. Thanks to Anthony Schott. This closes #234
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1888804 13f79535-47bb-0310-9956-ffa450edef68
2021-04-15 22:13:09 +00:00
Dominik Stadler 4027d8ac67 Allow negative numbers in conditional part of format string
Closes #229

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887802 13f79535-47bb-0310-9956-ffa450edef68
2021-03-19 09:40:10 +00:00
Nick Burch 82b5113ba9 Implement CONCAT function #65185
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887656 13f79535-47bb-0310-9956-ffa450edef68
2021-03-14 22:53:27 +00:00
Marius Volkhart d1c9a07860 Add the ability to edit HSLFPictureData contents
Pictures can now be edited by calling HSLFPictureData#setData(byte[]). The byte[] should contain the image data as an image viewer might read it.

To enable this functionality, a tighter coupling between the EscherBSERecords of the slideshow and the HSLFPictureData was required. This ensures that changes in image data size are accurately recorded in the records.

In the course of coupling the records and the HSLFPictureData, various scenarios arose where a mapping of records to pictures was non-trivial. Accordingly, the HSLFSlideShowImpl#matchPicturesAndRecords(...) function was added to perform a more sophisticated matching pass. This function is heavily exercised by org.apache.poi.hslf.usermodel.TestBugs.testFile[5] and PPTX2PNG.render[2], as well as the new TestPictures#testSlideshowWithIncorrectOffsets().

Closes #225

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887017 13f79535-47bb-0310-9956-ffa450edef68
2021-02-28 23:16:14 +00:00
PJ Fanning 4013ffa220 [bug-65096] XLSX Streaming XML not correctly reading multiple inline Strings
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1885770 13f79535-47bb-0310-9956-ffa450edef68
2021-01-21 21:04:24 +00:00
Alain Béarez 825bebdbd1 Bug 65016 - Creating a chart throws exception
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1885700 13f79535-47bb-0310-9956-ffa450edef68
2021-01-19 21:33:38 +00:00
Andreas Beeker 8f2c722fd3 Integration tests - try to fix Oracle/OpenJDK vs IBM-JDK error message differences on XXE files
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1885625 13f79535-47bb-0310-9956-ffa450edef68
2021-01-17 21:20:05 +00:00
Andreas Beeker 8d0e84f257 integration tests: ignore hsmf/lots-of-recipients.msg because of concurrent test errors - also takes too long to process
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1885603 13f79535-47bb-0310-9956-ffa450edef68
2021-01-17 15:51:41 +00:00
Andreas Beeker 44efecf42e integration tests: Fix handling of NullPointerExceptions for Java 16+ (again ...)
Refactor TestAllFiles to provide an API for mass testing

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1885576 13f79535-47bb-0310-9956-ffa450edef68
2021-01-16 15:51:00 +00:00
Andreas Beeker 5e110d7216 integration tests: NullPointerExceptions contain now a description in Java 16+
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1885549 13f79535-47bb-0310-9956-ffa450edef68
2021-01-16 09:55:42 +00:00
Andreas Beeker 309e657b0d #65046 - Simplify integration tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1885538 13f79535-47bb-0310-9956-ffa450edef68
2021-01-15 23:50:42 +00:00
Andreas Beeker fb2a96a048 Sonar fixes
Fixed offset of compare picture in resize_compare.xlsx

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1885280 13f79535-47bb-0310-9956-ffa450edef68
2021-01-08 22:56:05 +00:00
Dominik Stadler 622574f5f4 Bug 64450: Allow to parse a file where the relationship-id is an empty string
Also improve exception reporting by including more information and not
"hiding" the actual exception-cause in a log-statement.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1885056 13f79535-47bb-0310-9956-ffa450edef68
2021-01-03 11:49:51 +00:00
Dominik Stadler 685af351d1 Bug 64750: Do not use CTDataValidations.getCount(), instead only rely on getDataValidationArray
Field "count" seems to be optional according
to the schema, so by using only the array
Apache POI can read data validations from
workbooks that do not populate the
"count" field properly.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1885011 13f79535-47bb-0310-9956-ffa450edef68
2021-01-01 15:51:19 +00:00
Dominik Stadler b231366fb6 Bug 64986: Support missing or blank match_type for function Match
Excel and LibreOffice use the default value in this case

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1884959 13f79535-47bb-0310-9956-ffa450edef68
2020-12-30 21:40:12 +00:00
Dominik Stadler 42c4e7d89a Add unfixed test for bug 64759 and make the ones fail which depend on manual opening of files in Microsoft Excel for verification
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1884957 13f79535-47bb-0310-9956-ffa450edef68
2020-12-30 21:40:01 +00:00
Dominik Stadler a7c1d84c5d Improve the speed of the styles-optimiser when there are many styles in a Workbook
Profiling showed that the call to isUserDefined() took most of the time,
so we now fetch this only once for each style and remember the result and
use it in the inner loop.

The attached sample-file took aprox. 1m30s on a decent machine, now it is down
to around 2s.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1884917 13f79535-47bb-0310-9956-ffa450edef68
2020-12-29 19:29:22 +00:00
Dominik Stadler 352f5a034c Fix bug 64238: Make LOOKUP functions deal with empty last arg correctly
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1882827 13f79535-47bb-0310-9956-ffa450edef68
2020-10-25 07:21:45 +00:00
Tim Allison ab2dc71a95 Bug 64667.xlsx prevent NPE loading styles table
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1880834 13f79535-47bb-0310-9956-ffa450edef68
2020-08-13 18:21:28 +00:00
PJ Fanning a8d90aba91 [github-187] Add length validation for Excel DataValidations that are list literals. Thanks to Leo Webb. This closes #187
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1880727 13f79535-47bb-0310-9956-ffa450edef68
2020-08-09 21:15:15 +00:00
PJ Fanning 26c2049147 [bug-64508] add guard for invalid v value
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1879905 13f79535-47bb-0310-9956-ffa450edef68
2020-07-15 20:56:59 +00:00
PJ Fanning be09639638 [github-185] Fix if function in array formulas with 2nd argument evaluating to error. Thanks to Miłosz Rembisz. This closes #185
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1879481 13f79535-47bb-0310-9956-ffa450edef68
2020-07-03 16:09:03 +00:00
PJ Fanning f99533c56e move docx added to wrong test dir
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1879229 13f79535-47bb-0310-9956-ffa450edef68
2020-06-26 10:41:15 +00:00
PJ Fanning 06cf5caa2d [bug-64561] XWPFSDTContent.getText() is empty for nested SDT elements
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1879223 13f79535-47bb-0310-9956-ffa450edef68
2020-06-26 10:15:53 +00:00
Andreas Beeker d559feb7de 64512 - Ole10Native aka embedded / object packager - handle UTF16 variants
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1878730 13f79535-47bb-0310-9956-ffa450edef68
2020-06-11 00:43:45 +00:00
PJ Fanning b7930fc65c [github-181] make Value function work with arrays. Thanks to Miłosz Rembisz. This closes #181
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1878541 13f79535-47bb-0310-9956-ffa450edef68
2020-06-06 09:30:30 +00:00
Dominik Stadler d2ad752e1c Fix bug 64420: NPE in XSSFReader for files with macro-sheets
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1877814 13f79535-47bb-0310-9956-ffa450edef68
2020-05-16 13:05:53 +00:00
PJ Fanning af8137a6e4 [github-180] Add DateValue function. Thanks to Milosz Rembisz. This closes #180
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1877793 13f79535-47bb-0310-9956-ffa450edef68
2020-05-15 20:15:00 +00:00
Andreas Beeker 778f4f5d7d #55505 - CountryRecord not found
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1876805 13f79535-47bb-0310-9956-ffa450edef68
2020-04-21 22:13:59 +00:00
Tim Allison 5976721660 64261 -- fix handling of drop down list when items are selected
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1875956 13f79535-47bb-0310-9956-ffa450edef68
2020-03-31 18:16:09 +00:00
Dominik Stadler a7d96dcb73 Bug 58896 and 52834: Cache Sheet.getMergedRegions() as it seems to sometimes be the culprit for autosize taking a very long time.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1874973 13f79535-47bb-0310-9956-ffa450edef68
2020-03-08 11:17:34 +00:00
Tim Allison 636cc83665 Bug 64130 -- handle empty worksheet names in OldSheetRecord more robustly.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1873863 13f79535-47bb-0310-9956-ffa450edef68
2020-02-10 17:38:29 +00:00
Dominik Stadler 4aa8334e3b Fix some additional file-handle-leaks reported by unit-tests via an enhanced version of the file-leak-detector
Also add a test for Bug 64045

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1872287 13f79535-47bb-0310-9956-ffa450edef68
2020-01-03 13:11:41 +00:00
Dominik Stadler 9f35db4f51 Bug 63940: Avoid endless loop/out of memory on string-replace with empty search string
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1872145 13f79535-47bb-0310-9956-ffa450edef68
2019-12-31 16:52:55 +00:00
Dominik Stadler 821e164041 Bug 63700: Make D* functions work with numeric result column
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1872136 13f79535-47bb-0310-9956-ffa450edef68
2019-12-31 10:41:43 +00:00
Dominik Stadler bc0dcdf369 Fix bug 63984: AND / OR should treat missing parameters as FALSE
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1872125 13f79535-47bb-0310-9956-ffa450edef68
2019-12-30 19:57:11 +00:00
PJ Fanning 4c034f0e20 [github-164] Fix Bug in XSSFTable.setCellReferences when table is single cell. Thanks to Travis Russell. This closes #164
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1871185 13f79535-47bb-0310-9956-ffa450edef68
2019-12-11 20:07:25 +00:00
PJ Fanning 06f28db213 Bug 63768: Adjust handling of SchemaFactory
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1867484 13f79535-47bb-0310-9956-ffa450edef68
2019-09-24 18:33:37 +00:00
Andreas Beeker 27399cec83 #54803 - Error opening XLSX after saving with a Drawing using POI
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1857671 13f79535-47bb-0310-9956-ffa450edef68
2019-04-17 06:19:51 +00:00
Tim Allison a5278ccad9 bug 63327 allow retrieval of wmf data embedded in emf
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1857136 13f79535-47bb-0310-9956-ffa450edef68
2019-04-08 19:53:21 +00:00
Greg Woolsey 30851e44a6 #63302 Formula evaluation of names with offset or row function is incorrect
thanks to John Lincoln White for the patch, including new unit tests.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1856644 13f79535-47bb-0310-9956-ffa450edef68
2019-03-30 18:14:14 +00:00
Greg Woolsey edd1f4c75e pre-release maintenance:
* add my key to the KEYS file
* update year in NOTICE (first release of 2019)
* remove svn:executable flag from random test data files

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1855799 13f79535-47bb-0310-9956-ffa450edef68
2019-03-19 00:35:09 +00:00
Greg Woolsey 82f9c29258 #60724 - Partial implementation for SUBTOTAL() 'ignore hidden rows' variations
The function still doesn't deal with auto-filtering, but it now handles variations that should skip hidden rows.

Taught the evaluation framework to know about hidden rows similar to what was already there for skipping subtotals within subtotal ranges.

Added unit test cases.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1855789 13f79535-47bb-0310-9956-ffa450edef68
2019-03-18 19:09:11 +00:00
Yegor Kozlov 6ef332b48e Bug 61472: Convert date/time strings to numbers when evaluating formulas
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1855662 13f79535-47bb-0310-9956-ffa450edef68
2019-03-16 15:41:46 +00:00
Yegor Kozlov c438465b08 Bug 62980: Make D* functions ignore case in headings
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1853268 13f79535-47bb-0310-9956-ffa450edef68
2019-02-09 13:00:09 +00:00
Dominik Stadler c376d662f9 Bug 60405: Add initial support for cetab functions so some macros can be
parsed
Add some function-definitions for Excel 4 Macros and missing functions
found in regression tests

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1852277 13f79535-47bb-0310-9956-ffa450edef68
2019-01-27 09:57:39 +00:00
Yegor Kozlov 698d8eb006 follow-up to Bug 62904. More tests and improved evaluation of IF in array mode
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1851263 13f79535-47bb-0310-9956-ffa450edef68
2019-01-14 14:48:21 +00:00
Dominik Stadler 88b9e48287 Add reproducer for bug 60355
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1851208 13f79535-47bb-0310-9956-ffa450edef68
2019-01-13 17:13:57 +00:00