Commit Graph

7182 Commits

Author SHA1 Message Date
Javen O'Neal
46b5d839c3 bug 57919: add functions to write and close a POIDocument, guaranteeing closure of the output stream and document.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1799308 13f79535-47bb-0310-9956-ffa450edef68
2017-06-20 07:28:14 +00:00
Javen O'Neal
5971083683 rename createXls and createXlsx helper functions: these are specifically for testing text rotation.
Made the file creation compatible on Windows and Mac/Linux using POI TempFile instead of a hard-coded filename.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1799307 13f79535-47bb-0310-9956-ffa450edef68
2017-06-20 07:05:08 +00:00
Javen O'Neal
51065c8159 bug 58113: this passes with SXSSF now
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1799306 13f79535-47bb-0310-9956-ffa450edef68
2017-06-20 07:03:13 +00:00
Javen O'Neal
15212e0feb bug 56557: open test-data/spreadsheet/56557.xlsx such that the unit test test56557() does not leave a modified file on disk after running.
I verified that
> Workbook wb = XSSFTestDataSamples.openSampleWorkbook("56557.xlsx")
and
> Workbook wb = WorkbookFactory.create(XSSFTestDataSamples.getSampleFile("56557.xlsx"), password=null, readOnly=false);
both fail when the fix from r1798913 for SXSSFWorkbook is not applied and both pass when the fix is applied.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1799304 13f79535-47bb-0310-9956-ffa450edef68
2017-06-20 06:08:38 +00:00
Javen O'Neal
4d692223bb whitespace
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1799303 13f79535-47bb-0310-9956-ffa450edef68
2017-06-20 05:51:48 +00:00
Javen O'Neal
5de40d3261 bug 52063: support 2-argument LOOKUP(lookup_value, array) function in Excel
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1799302 13f79535-47bb-0310-9956-ffa450edef68
2017-06-20 05:47:56 +00:00
Dominik Stadler
2095c92402 Improve error message if we encounter invalid/unexpected files in integration tests
Adjust some tests slightly

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1799178 13f79535-47bb-0310-9956-ffa450edef68
2017-06-19 11:05:20 +00:00
Dominik Stadler
66bf6c5ad7 Need to do the casting differently to make the code compile with Java 6
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1799038 13f79535-47bb-0310-9956-ffa450edef68
2017-06-18 05:59:31 +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
bac17be565 Fix some IntelliJ warnings
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1799035 13f79535-47bb-0310-9956-ffa450edef68
2017-06-18 05:59:11 +00:00
Andreas Beeker
0e57435abe #61169 - Text with Japanese characters overflows textbox
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1798986 13f79535-47bb-0310-9956-ffa450edef68
2017-06-17 00:00:49 +00:00
Dominik Stadler
20f46393f7 Fix some IntelliJ warnings
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1798913 13f79535-47bb-0310-9956-ffa450edef68
2017-06-16 11:35:31 +00:00
Javen O'Neal
c05e2ae644 bug 61170: add comment why we should catch exceptions in SAXHelper
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1798793 13f79535-47bb-0310-9956-ffa450edef68
2017-06-15 05:08:24 +00:00
Javen O'Neal
f66153c810 bug 61170: add extra logging to SaxHelper.
Thanks to PJ Fanning for the patch!
This closes #58 on github.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1798792 13f79535-47bb-0310-9956-ffa450edef68
2017-06-15 05:00:25 +00:00
Andreas Beeker
14b2d4501a #61162 - En-/decryption support for HWPF
- encryption support for HWPF
- refactor/unify EncryptionInfo handling in H**F classes
- remove Iterable interface from WorkbookRecordList - use getRecords() instead, to prevent modifications over the Iterator

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1798722 13f79535-47bb-0310-9956-ffa450edef68
2017-06-14 17:21:50 +00:00
Greg Woolsey
e5c5cba87c Standardize some more common chart axis properties.
Implement the ChartAxis ss interface for date axes, which are pretty much a category axis with one extra property, a date granularity (not currently passed through, get it still from the CT* class).  Created the class and test from the category axis versions.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1798414 13f79535-47bb-0310-9956-ffa450edef68
2017-06-12 05:38:41 +00:00
Greg Woolsey
8d7bab82bb Don't report data table master cells as formula cells, since POI doesn't evaluate data table formulas.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1798289 13f79535-47bb-0310-9956-ffa450edef68
2017-06-10 01:04:40 +00:00
Dominik Stadler
05570364db Move one testcase with incorrect source location
remove some junit dependencies in example-code
build: do not pass junit-jar to normal compile targets to avoid introducing it as dependency again 
Reformat code, fix warnings, ...

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1798202 13f79535-47bb-0310-9956-ffa450edef68
2017-06-09 12:49:01 +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
993801aa1c Update the CreateTable example to reduce the use of the raw CT classes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1797923 13f79535-47bb-0310-9956-ffa450edef68
2017-06-07 13:35:20 +00:00
Nick Burch
7b38f8c5f1 Permit table style modifications, needed for CreateTable
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1797922 13f79535-47bb-0310-9956-ffa450edef68
2017-06-07 13:33:58 +00:00
Nick Burch
fd0e150a94 Make it possible to create simple XSSF sheet tables without needing CT classes directly
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1797919 13f79535-47bb-0310-9956-ffa450edef68
2017-06-07 13:06:38 +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
a5dda416e7 Ignore JCE restriction errors
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1797856 13f79535-47bb-0310-9956-ffa450edef68
2017-06-07 06:25:56 +00:00
Andreas Beeker
20dcde37ec Handle encrypted files with known password in integration tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1797839 13f79535-47bb-0310-9956-ffa450edef68
2017-06-06 22:21:46 +00:00
Andreas Beeker
739599059a Replace HWPFOutputStream with ByteArrayOutputStream - it doesn't add any new features
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1797838 13f79535-47bb-0310-9956-ffa450edef68
2017-06-06 22:21:40 +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
Javen O'Neal
b0d0f2d255 bug 58325: enable TestXSSFShape unit tests. Thanks to Dominik Stadler for the initial unit test. Thanks to PJ Fanning for discovering that the bug was fixed at some point in the past and enabling the unit tests.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1797600 13f79535-47bb-0310-9956-ffa450edef68
2017-06-04 18:59:18 +00:00
Andreas Beeker
efccafd898 fix eclipse resource leak warnings
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1797043 13f79535-47bb-0310-9956-ffa450edef68
2017-05-31 14:10:18 +00:00
Javen O'Neal
4232a72208 javadocs
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1796966 13f79535-47bb-0310-9956-ffa450edef68
2017-05-31 02:46:24 +00:00
Andreas Beeker
95164e4a50 SonarQube fixes - close resources
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1796962 13f79535-47bb-0310-9956-ffa450edef68
2017-05-31 00:31:53 +00:00
Greg Woolsey
7e6007e0bd #61085 support table styles
Needed a bit more, to support table/range only border properties for "internal" vertical and horizontal borders.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1796961 13f79535-47bb-0310-9956-ffa450edef68
2017-05-31 00:22:58 +00:00
Andreas Beeker
49e47cb6e1 Bug 61119 - Fix preset shape rendering and shading
- Fixed conversion of ooxml to awt angle
- replace subclasses and reflection calls with enums
- implemented tinting/shading of preset shapes


git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1796823 13f79535-47bb-0310-9956-ffa450edef68
2017-05-30 09:33:28 +00:00
Javen O'Neal
b3c6907741 bug 61059: fix NamePtg to read unsigned shorts instead of signed shorts, avoiding a AIOOBE when a workbook contains more than 32k Names. Thanks to Travis Burtrum for the patch.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1796466 13f79535-47bb-0310-9956-ffa450edef68
2017-05-28 01:17:16 +00:00
Greg Woolsey
479b45ced9 Bug 60898 - XSSFColor's getARGB() method returns a wrong color value when a workbook has a custom indexed color
Missed this test.  As part of the work I noticed the Enum was missing some values defined in the OOXML spec, so I added them.

I've updated the test to reflect that those values are no longer invalid.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1796360 13f79535-47bb-0310-9956-ffa450edef68
2017-05-26 23:37:04 +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
Dominik Stadler
8564aa7bb6 Reformat code somewhat
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1795962 13f79535-47bb-0310-9956-ffa450edef68
2017-05-23 21:12:50 +00:00
Javen O'Neal
7881d05743 github-55: document that CellReference#isRowWithinRange(String rowNum, SpreadsheetVersion ss) expects rowNum to be parseable as an integer
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1795681 13f79535-47bb-0310-9956-ffa450edef68
2017-05-20 21:04:14 +00:00
Javen O'Neal
4ff23197e9 bug 61110: remove deprecated, misspelled CellReference#isRowWithnRange and #isColumnWithnRange methods
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1795680 13f79535-47bb-0310-9956-ffa450edef68
2017-05-20 20:22:24 +00:00
Greg Woolsey
2d2aa5196a #61085 support table styles
Added more features - this allows a client app to fully display table styling without resorting to CT* classes, and has some helper logic for the additional processing needed for things like regional/area borders.

As far as I can tell I only added stuff, didn't change any existing behavior.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1795648 13f79535-47bb-0310-9956-ffa450edef68
2017-05-20 04:05:32 +00:00
Javen O'Neal
284f7d19c5 github-55: NumberFormatException if XSSFName.setNameName is set with a long name that looks similar to a cell address. Thanks to Thomas S @Millie4Ever
This closes #55 on github.
https://github.com/apache/poi/pull/55

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1795595 13f79535-47bb-0310-9956-ffa450edef68
2017-05-19 08:26:41 +00:00
Javen O'Neal
0b767886bf replace "String.indexOf(String) >= 1" with "String.contains(String)"
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1795296 13f79535-47bb-0310-9956-ffa450edef68
2017-05-16 10:53:15 +00:00
Javen O'Neal
f701e81a64 github-25: add enable locking and tab color in SXSSFSheet. Thanks to Danilo Rangel. This closes #25.
https://github.com/apache/poi/pull/25

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1795277 13f79535-47bb-0310-9956-ffa450edef68
2017-05-16 08:38:58 +00:00
Javen O'Neal
b6f78f8d57 github-32: speed up Irr() Excel formula computation by replacing Math.pow() with multiplication. Thanks to Daniel Kuan! This closes #32.
https://github.com/apache/poi/pull/32

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1795266 13f79535-47bb-0310-9956-ffa450edef68
2017-05-16 03:18:17 +00:00
Javen O'Neal
be5106a1d7 github-43: add disabled unit test showing a problem with ROUNDUP(3987*0.2, 2). Thanks to @FishMeat.
https://github.com/apache/poi/pull/43

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1795265 13f79535-47bb-0310-9956-ffa450edef68
2017-05-16 03:04:12 +00:00
Nick Burch
fec503f1de Javadoc fixes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1795261 13f79535-47bb-0310-9956-ffa450edef68
2017-05-16 02:50:35 +00:00
Javen O'Neal
b527f96daa github-52: add ExcelToHtmlConverter method that works on InputStreams. Thanks to Tony Zeng! This closes #52.
https://github.com/apache/poi/pull/52

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1795256 13f79535-47bb-0310-9956-ffa450edef68
2017-05-16 00:58:01 +00:00
Javen O'Neal
fac98b5bef github-53: fix NPE when iterating over paragraphs in certain *.docx files. Thanks to Praful Kumar Vaishnav! This closes #53.
https://github.com/apache/poi/pull/53

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1795254 13f79535-47bb-0310-9956-ffa450edef68
2017-05-16 00:41:25 +00:00
Javen O'Neal
5c62492ffb github-54: when adding a picture to an XSSFWorkbook, reduce memory consumption by 100x and increase speed by 10x based on OpenJDK JMH benchmarking. Thanks to Tim Helmstedt! This closes #54.
https://github.com/apache/poi/pull/54

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1795252 13f79535-47bb-0310-9956-ffa450edef68
2017-05-15 23:27:21 +00:00
Andreas Beeker
8c1346b138 Add ASL header and exclude table preset from rat-check
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1795137 13f79535-47bb-0310-9956-ffa450edef68
2017-05-15 06:30:06 +00:00
Andreas Beeker
90dca20bd2 #52117 - Invalid "last printed" summary field value - added helper method to identify undefined dates
HPSF: fixed uid listing in Section.toString()
HPSF: moved timestamp based "utility" methods to Filetime class
HPSF: preserve original datastream for unchanged property sets

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1795123 13f79535-47bb-0310-9956-ffa450edef68
2017-05-14 22:25:33 +00:00
Greg Woolsey
bf83a00457 tweak to use platform line separator so tests can pass on Windows as well as Linux.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1795026 13f79535-47bb-0310-9956-ffa450edef68
2017-05-12 22:13:30 +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
Dominik Stadler
e77156d9f4 Simplify the ValueEval.toString() implementations and include more information on unexpected types of ValueEval
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1794956 13f79535-47bb-0310-9956-ffa450edef68
2017-05-12 11:38:05 +00:00
Dominik Stadler
d9df038f4a Bug 60352: Text extraction: Don't include the text "null" for empty cells
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1794260 13f79535-47bb-0310-9956-ffa450edef68
2017-05-07 21:03:46 +00:00
Greg Woolsey
8313b17515 60184 - invalid OOXML produced when XSSFFont.getFamily() called with no families defined
Fix to stop creating an empty family when none exist, just use the existing logic to return NOT_APPLICABLE.  Creating the empty element produces XML that doesn't comply with the XSD.

Alternative would have been to set the family int value for the new family, but this way checking the value doesn't change the output, which is my preferred behavior.  No quantum effects!

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1794111 13f79535-47bb-0310-9956-ffa450edef68
2017-05-05 21:50:59 +00:00
Greg Woolsey
6bca07a15f forgot license (as always)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1794093 13f79535-47bb-0310-9956-ffa450edef68
2017-05-05 18:33:49 +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
Andreas Beeker
fb28b14d48 test integration fix
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1793733 13f79535-47bb-0310-9956-ffa450edef68
2017-05-04 01:13:48 +00:00
Andreas Beeker
ad72f60ab6 SonarQube fixes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1793727 13f79535-47bb-0310-9956-ffa450edef68
2017-05-03 22:16:26 +00:00
Andreas Beeker
76dbb5a1eb HPSF: Change CustomProperties to delegate
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1793699 13f79535-47bb-0310-9956-ffa450edef68
2017-05-03 19:18:45 +00:00
Andreas Beeker
d0630390d2 Remove Unicode chars in comments
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1793647 13f79535-47bb-0310-9956-ffa450edef68
2017-05-03 14:08:04 +00:00
Andreas Beeker
0f78f6dc1f fix javadocs
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1793604 13f79535-47bb-0310-9956-ffa450edef68
2017-05-03 00:14:55 +00:00
Andreas Beeker
cd6236c74b #52372 - OutOfMemoryError parsing a word file
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1793602 13f79535-47bb-0310-9956-ffa450edef68
2017-05-02 23:32:13 +00:00
Andreas Beeker
a0b324224b Reverted DocumentSummary hack in codepage guessing code
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1793601 13f79535-47bb-0310-9956-ffa450edef68
2017-05-02 23:30:17 +00:00
Andreas Beeker
eeb697001f HPSF: Add CopyCompare to IntegrationTests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1793600 13f79535-47bb-0310-9956-ffa450edef68
2017-05-02 23:29:19 +00:00
Andreas Beeker
3a1771ced1 HPSF: Enable new number types in VariantSupport
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1793598 13f79535-47bb-0310-9956-ffa450edef68
2017-05-02 23:28:00 +00:00
Andreas Beeker
456b33a837 Fix hpsf javadocs and code issues
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1793596 13f79535-47bb-0310-9956-ffa450edef68
2017-05-02 23:27:27 +00:00
Andreas Beeker
5600fa6f58 IntegrationTest - move excludes to file handler
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1793595 13f79535-47bb-0310-9956-ffa450edef68
2017-05-02 23:25:45 +00:00
Andreas Beeker
63b88fec6a HPSF: Use LittleEndianStream instead of offset calculation
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1793594 13f79535-47bb-0310-9956-ffa450edef68
2017-05-02 23:24:50 +00:00
Javen O'Neal
95538eb815 bug 61059: add @Override annotations
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1793418 13f79535-47bb-0310-9956-ffa450edef68
2017-05-01 21:51:34 +00:00
Dominik Stadler
5265ff6f81 Improve information contained in exception in CellRangeAddress()
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1793252 13f79535-47bb-0310-9956-ffa450edef68
2017-04-30 09:12:44 +00:00
Dominik Stadler
fa39402871 60325: Add commented out test that reproduces the performance issue
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1793251 13f79535-47bb-0310-9956-ffa450edef68
2017-04-30 09:12:36 +00:00
Nick Burch
28cbb8e84e Javadoc fix
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1793249 13f79535-47bb-0310-9956-ffa450edef68
2017-04-30 08:49:51 +00:00
Javen O'Neal
f5389965a2 bug 61034: break out of for-loop when both <sheet name="", id=""/> are found
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1793230 13f79535-47bb-0310-9956-ffa450edef68
2017-04-29 18:56:09 +00:00
Javen O'Neal
e39ae9cd30 bug 61034: Call to XSSFReader.getSheetsData() returns duplicate sheets.
Thanks to Mauricio Eastmond for the Excel test file and unit test.
Thanks to Sebastian Wikalinski for isolating the problem and providing a patch.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1793223 13f79535-47bb-0310-9956-ffa450edef68
2017-04-29 17:27:17 +00:00
Tim Allison
a98eaeb917 bug 61051 -- add new worksheet-like relations for xlsb
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1792940 13f79535-47bb-0310-9956-ffa450edef68
2017-04-27 18:50:22 +00:00
Tim Allison
5f567f29a1 bug 61049 fix ordering of builtin formulas
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1792918 13f79535-47bb-0310-9956-ffa450edef68
2017-04-27 16:18:25 +00:00
Nick Burch
9896e13bf4 Patch from Tim Jones from #61044 - Note on setCompressTempFiles
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1792720 13f79535-47bb-0310-9956-ffa450edef68
2017-04-26 09:43:56 +00:00
Tim Allison
c2dc3ad585 bug 61021 - extract abspath from xlsb
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1792198 13f79535-47bb-0310-9956-ffa450edef68
2017-04-21 13:02:29 +00:00
Greg Woolsey
f5b90cbbee Add conditional formatting evaluation example code and output results
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1792102 13f79535-47bb-0310-9956-ffa450edef68
2017-04-20 18:05:50 +00:00
Javen O'Neal
3c2a6b38bb Use assertContains instead of assertTrue(text.contains) for better error messages on failure
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1792009 13f79535-47bb-0310-9956-ffa450edef68
2017-04-20 01:28:40 +00:00
Javen O'Neal
3cbf4740b1 Use assertContains instead of assertTrue(text.contains) for better error messages on failure
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1792007 13f79535-47bb-0310-9956-ffa450edef68
2017-04-19 23:51:03 +00:00
Greg Woolsey
6e0a5916b5 Fix bug #61007
Revert to previous "expected" test results even though they don't match excel for a specific case, to accommodate tighter logic about which format patterns to send to CellFormat vs. handle directly in DataFormatter.

Send what was checked previously plus only multi-segment conditional range formats.  Allows existing tests to pass plus the new test with the case for these conditional formats.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1791964 13f79535-47bb-0310-9956-ffa450edef68
2017-04-19 20:04:46 +00:00
Greg Woolsey
d1b92fe2d8 Fix bug #61007
use CellFormat for all format strings containing multiple parts (";" delimited) and update unit test to expect the same values as Excel.  Also added tests for the failing formats.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1791949 13f79535-47bb-0310-9956-ffa450edef68
2017-04-19 18:10:52 +00:00
Nick Burch
d4d08d5ce8 Use assertContains instead of assertTrue(text.contains) for better error messages on failure
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1791857 13f79535-47bb-0310-9956-ffa450edef68
2017-04-19 06:13:33 +00:00
Dominik Stadler
511c2544a8 Let IntelliJ cleanup some code-warnings across the whole code-base: unnecessary toString or semicolon
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1791720 13f79535-47bb-0310-9956-ffa450edef68
2017-04-17 20:13:52 +00:00
Andreas Beeker
c89d312bad #60998 - HSLFTable.setRowHeight sets row height incorrect
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1791696 13f79535-47bb-0310-9956-ffa450edef68
2017-04-17 17:13:23 +00:00
Andreas Beeker
7df2a8804c findbugs fixes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1791679 13f79535-47bb-0310-9956-ffa450edef68
2017-04-17 11:02:22 +00:00
Andreas Beeker
594b46f1cd fix forbidden-apis-check error
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1791646 13f79535-47bb-0310-9956-ffa450edef68
2017-04-16 23:43:56 +00:00
Andreas Beeker
bd237e2483 #60996 - XSSF: Multiple embedded objects on same sheet are ignored
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1791644 13f79535-47bb-0310-9956-ffa450edef68
2017-04-16 22:41:28 +00:00
Javen O'Neal
dc29c94460 roll back to hamcrest-core
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1791570 13f79535-47bb-0310-9956-ffa450edef68
2017-04-16 06:10:23 +00:00
Andreas Beeker
160fb550c1 #60993 - HSLF: Grid and rowspan calculation in table cells is wrong
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1791500 13f79535-47bb-0310-9956-ffa450edef68
2017-04-15 12:14:26 +00:00
Javen O'Neal
0acf44d3dc improve unit test error messages
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1791445 13f79535-47bb-0310-9956-ffa450edef68
2017-04-15 03:21:34 +00:00
Javen O'Neal
ef8c9329cf change from hamcrest-core-1.3 to hamcrest-all-1.3
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1791444 13f79535-47bb-0310-9956-ffa450edef68
2017-04-15 03:19:27 +00:00
Javen O'Neal
e7ca1594da use hamcrest matchers to reduce custom code
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1791443 13f79535-47bb-0310-9956-ffa450edef68
2017-04-15 02:50:46 +00:00
Javen O'Neal
7977026f96 use assertStartsWith and assertEndsWith for better unit test error messages
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1791440 13f79535-47bb-0310-9956-ffa450edef68
2017-04-15 02:19:24 +00:00
Nick Burch
70ae27f96d #60973 XDGF Support for "PolylineTo" as well as existing alternate spelling "PolyLineTo"
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1791108 13f79535-47bb-0310-9956-ffa450edef68
2017-04-12 11:11:56 +00:00
Nick Burch
3bd1f662f3 Failing, disabled unit test for bug #60973
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1791098 13f79535-47bb-0310-9956-ffa450edef68
2017-04-12 09:40:54 +00:00
Greg Woolsey
6163e4ca45 Issue #60971, handle formula chart titles
implemented per issue, breaking out static text vs. formula based title getters and setters, with unit test updates and additions.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1791025 13f79535-47bb-0310-9956-ffa450edef68
2017-04-11 20:27:23 +00:00
Tim Allison
0ddc4da7e2 bug 50955 - add logging per Javen's recommendation. Thank you!
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1791021 13f79535-47bb-0310-9956-ffa450edef68
2017-04-11 20:00:12 +00:00
Tim Allison
9412d467f3 bug 50955 - incorporate info from the DocumentSummaryInformation for
guessing the encoding.  Back off to the old method if DocSummInfo is
not available. Thanks to Andreas Beeker for recommending this direction.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1791002 13f79535-47bb-0310-9956-ffa450edef68
2017-04-11 17:07:04 +00:00
Tim Allison
44d536e4ce bug 50955 - try originally guessed codepoint, backoff to 1252 if that fails
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1790904 13f79535-47bb-0310-9956-ffa450edef68
2017-04-11 01:30:02 +00:00
Andreas Beeker
1f41c31984 Fix AIOOBE while extracting hssf pictures which are externally linked
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1790897 13f79535-47bb-0310-9956-ffa450edef68
2017-04-10 21:43:22 +00:00
Dominik Stadler
48526517cd Adjust checking for Zip-Bomb errors so it also works on JDK >= 8
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1790508 13f79535-47bb-0310-9956-ffa450edef68
2017-04-07 06:38:23 +00:00
Dominik Stadler
77614b8c49 Test for another type of xml-bomb
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1790473 13f79535-47bb-0310-9956-ffa450edef68
2017-04-06 21:50:03 +00:00
Dominik Stadler
0f193371ea Fix issue found via large corpus tests: HSSFPicture in a HSSFShapeGroup might not have a patriarch set, so let's walk up the parents to try to find one.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1790472 13f79535-47bb-0310-9956-ffa450edef68
2017-04-06 21:49:53 +00:00
Nick Burch
eb427080e8 Javadoc fixes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1790239 13f79535-47bb-0310-9956-ffa450edef68
2017-04-05 13:17:17 +00:00
Tim Allison
f426849947 bug 50955 convert Set to Singleton per Javen's code review
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1790215 13f79535-47bb-0310-9956-ffa450edef68
2017-04-05 11:02:48 +00:00
Tim Allison
1bfd5f6585 bug 50955 and bug 60953 improve Big5 reader; ensure one character
per byte pair

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1790172 13f79535-47bb-0310-9956-ffa450edef68
2017-04-05 01:45:55 +00:00
Tim Allison
4b0e6dc048 bug 50955 -- turn off test that now passes in Java 1.8 and 1.7
but not 1.6 until we can fix it

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1790136 13f79535-47bb-0310-9956-ffa450edef68
2017-04-04 15:26:01 +00:00
Tim Allison
3c62c898a4 bug 50955 -- fix for java 7
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1790130 13f79535-47bb-0310-9956-ffa450edef68
2017-04-04 14:41:53 +00:00
Tim Allison
af51ea4c10 bug 50955 -- word 6.0 charset fix
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1790061 13f79535-47bb-0310-9956-ffa450edef68
2017-04-04 02:06:46 +00:00
Tim Allison
9dcb5d4c47 Bug 60906 -- clean up, and add range checking for casting to ints.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1788295 13f79535-47bb-0310-9956-ffa450edef68
2017-03-23 18:08:52 +00:00
Tim Allison
3d20031b56 Bug 60489 -- add @Test annotation so that this actually runs and includes ConnectsType...<facepalm/>
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1788288 13f79535-47bb-0310-9956-ffa450edef68
2017-03-23 16:56:29 +00:00
Tim Allison
925f4b85ad Bug 60906 -- fix style index
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1788282 13f79535-47bb-0310-9956-ffa450edef68
2017-03-23 16:31:42 +00:00
Tim Allison
3953b18e2b 60881 -- fix unit test to use assumeTrue thanks to Javen's recommendation.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1788133 13f79535-47bb-0310-9956-ffa450edef68
2017-03-22 16:21:25 +00:00
Tim Allison
2674dad889 60881 -- strip out system.set props for local test.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1787891 13f79535-47bb-0310-9956-ffa450edef68
2017-03-21 00:13:11 +00:00
Tim Allison
26dddd5184 60881 -- fix new unit test. xlsb test file apparently requires unlimited jce. If not installed, ignore new test.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1787890 13f79535-47bb-0310-9956-ffa450edef68
2017-03-21 00:03:01 +00:00
Tim Allison
69c3311a98 60881 and 60891 -- on further look, no need to throw an exception for an encrypted xlsb. On the second, let's fix readFully to read fully.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1787846 13f79535-47bb-0310-9956-ffa450edef68
2017-03-20 20:47:15 +00:00
Tim Allison
e4f884a915 60879 -- figure out if we can support old beta xlsb or throw exception. For now, let's hope there's only one diff and/or the other bounds checking etc will throw exception if there are other problems.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1787832 13f79535-47bb-0310-9956-ffa450edef68
2017-03-20 18:50:25 +00:00
Dominik Stadler
1aee770758 Bug 60042: Add sample file to check if this bug is fixed via bug 55791 already.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1787664 13f79535-47bb-0310-9956-ffa450edef68
2017-03-19 21:44:05 +00:00
Dominik Stadler
a22b4aaa2d Bug 60810: Check for duplicate relation-names for notes similar to the fix for slides themselves in bug 55791
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1787663 13f79535-47bb-0310-9956-ffa450edef68
2017-03-19 21:43:57 +00:00
Dominik Stadler
eef36a1580 Fix typo to "length", closes #51
Fix a few IntelliJ warnings

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1787659 13f79535-47bb-0310-9956-ffa450edef68
2017-03-19 20:30:04 +00:00
Dominik Stadler
e78eb68b10 60823: DGET function, correct behavior with multiple result entries but only one non-blank
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1787658 13f79535-47bb-0310-9956-ffa450edef68
2017-03-19 20:29:55 +00:00
Dominik Stadler
bfeeba5eb8 Fix broken imports
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1787585 13f79535-47bb-0310-9956-ffa450edef68
2017-03-18 18:46:15 +00:00
Dominik Stadler
69923f8c5a Adjust integration-test files slightly, more failure-output, make it a bit easier to test single-files, add a HeapDump class for investigating memory leaks, adjust XSSFFileHandler to free memory more quickly
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1787556 13f79535-47bb-0310-9956-ffa450edef68
2017-03-18 13:56:11 +00:00
Dominik Stadler
531226ac84 Add docm-file which is actually a binary doc to check handling of wrong-format-exceptions
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1787555 13f79535-47bb-0310-9956-ffa450edef68
2017-03-18 13:56:04 +00:00
Dominik Stadler
12a26bd6ca Fix ROOT_DIR
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1787330 13f79535-47bb-0310-9956-ffa450edef68
2017-03-17 12:03:07 +00:00
Tim Allison
b52126f7f3 60826 -- clean up. Many, many thanks to Javen O'Neal's code review!
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1787320 13f79535-47bb-0310-9956-ffa450edef68
2017-03-17 10:09:59 +00:00
Tim Allison
60b4624cf7 60826 -- update stress tests to handle xlsb
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1787264 13f79535-47bb-0310-9956-ffa450edef68
2017-03-16 22:32:24 +00:00
Tim Allison
730f394261 60826 -- add initial support for streaming reading of xlsb files.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1787228 13f79535-47bb-0310-9956-ffa450edef68
2017-03-16 18:37:13 +00:00
Greg Woolsey
6fc050a162 add missing license header
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1786962 13f79535-47bb-0310-9956-ffa450edef68
2017-03-14 22:36:38 +00:00
Greg Woolsey
6349d2c614 Fixed #60858, which showed a regression of the fix for #56420 introduced by my refactoring to fix #56822.
Includes new unit test based on the bug sample file.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1786953 13f79535-47bb-0310-9956-ffa450edef68
2017-03-14 21:39:33 +00:00
Dominik Stadler
e13f7dc8af Fix some Sonar issues in sample "HSSFReadWrite"
Fix some IntelliJ warnings

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1786695 13f79535-47bb-0310-9956-ffa450edef68
2017-03-13 14:09:27 +00:00
Dominik Stadler
abc3d37adc Add tests from bug 45353 to show that this now works fine
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1786432 13f79535-47bb-0310-9956-ffa450edef68
2017-03-10 20:14:00 +00:00
Dominik Stadler
c07c41659f HSSF: Try to handle cases where the length does not match the actual data while cloning, we see this in some documents
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1786431 13f79535-47bb-0310-9956-ffa450edef68
2017-03-10 20:13:52 +00:00
Dominik Stadler
aafdbdfdd7 Remove unused import, IntelliJ warnings, duplicated code, improve some exception-texts
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1786429 13f79535-47bb-0310-9956-ffa450edef68
2017-03-10 20:13:39 +00:00
Tim Allison
b442671274 51519 -- follow on, make concatenation of rPh configurable
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1786021 13f79535-47bb-0310-9956-ffa450edef68
2017-03-08 16:44:40 +00:00
Tim Allison
5bb1195606 51519 -- allow users to ignore or include the <rPh> (phonetic run) element in the ReadOnlySharedStringsTable used in the SAX/streaming xlsx reader.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1785965 13f79535-47bb-0310-9956-ffa450edef68
2017-03-08 13:41:07 +00:00
Javen O'Neal
8dd5f7b887 store repeated expressions as temporary variables to make code shorter
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1785793 13f79535-47bb-0310-9956-ffa450edef68
2017-03-07 03:16:50 +00:00
Javen O'Neal
5b879942fc bug 60787: remove calls to System.out.println. Thanks to Kamile Demirel.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1785185 13f79535-47bb-0310-9956-ffa450edef68
2017-03-02 18:47:28 +00:00
Tim Allison
31dd2885dd Bug 60795 -- fixed deprecation, thanks to Javen.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1784989 13f79535-47bb-0310-9956-ffa450edef68
2017-03-01 16:49:15 +00:00
Tim Allison
5b801a9dc6 Bug 60795 -- add enum for message class in MAPIMessage; deprecate getMessageClass()
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1784978 13f79535-47bb-0310-9956-ffa450edef68
2017-03-01 15:47:47 +00:00
Javen O'Neal
bb6e94851f add helper functions to make it easier to see which scenarios are being tested
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1784231 13f79535-47bb-0310-9956-ffa450edef68
2017-02-24 05:07:10 +00:00
Javen O'Neal
c04e2a314a bug 59804: @Removal(version="3.15") version should be parsed to make sure the version number is recognizable
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1784230 13f79535-47bb-0310-9956-ffa450edef68
2017-02-24 04:59:29 +00:00
Greg Woolsey
717f279ed8 add javadocs
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1783915 13f79535-47bb-0310-9956-ffa450edef68
2017-02-21 18:31:48 +00:00
Greg Woolsey
62d7050af9 Add null check
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1783914 13f79535-47bb-0310-9956-ffa450edef68
2017-02-21 18:18:10 +00:00
Andreas Beeker
0744f73add BugFix for JDK-6623219
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1783698 13f79535-47bb-0310-9956-ffa450edef68
2017-02-19 21:36:45 +00:00