Commit Graph

7292 Commits

Author SHA1 Message Date
Andreas Beeker
97f90ca839 Fix further Windows JVM 6 font rendering errors - OOM and EXCEPTION_ACCESS_VIOLATION
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1803528 13f79535-47bb-0310-9956-ffa450edef68
2017-07-31 12:25:23 +00:00
Andreas Beeker
27fd9e4cbb remove invalid javadocs
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1803493 13f79535-47bb-0310-9956-ffa450edef68
2017-07-31 08:42:48 +00:00
Nick Burch
e34e286850 Javadoc fixes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1803488 13f79535-47bb-0310-9956-ffa450edef68
2017-07-31 06:36:10 +00:00
Andreas Beeker
ff2bcdf62d #61363 - Unify escher shape id allocation
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1803483 13f79535-47bb-0310-9956-ffa450edef68
2017-07-30 23:11:36 +00:00
Andreas Beeker
b3c111a283 Add handling of alternate content elements
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1803397 13f79535-47bb-0310-9956-ffa450edef68
2017-07-29 23:08:15 +00:00
Greg Woolsey
f9b9c0d18b Deleting a sheet did not delete table parts and relations. Deleting a table needs to also delete any queryTable relations and parts.
Previous behavior didn't result in documents Excel complained about, but left dead entries in the ZIP structure, which made it bigger and bugged me.

This change does not attempt to delete query connection definitions, as those aren't referenced as relations, and don't have a usage counter to ensure we only delete them if there are no other references.  In my samples I had query tables on multiple sheets using the same connection definition, and wanted to delete only one sheet/table but leave others.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1803317 13f79535-47bb-0310-9956-ffa450edef68
2017-07-28 18:01:36 +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
Andreas Beeker
49a222ecbc #61350 - Use unsynchronized xmlbeans
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1803120 13f79535-47bb-0310-9956-ffa450edef68
2017-07-26 22:15:27 +00:00
Greg Woolsey
9e896b17ea Another font size variation. I suspect it is my Windows 10 scaling factor, set to 100% instead of the Windows 10 default 125%.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1803117 13f79535-47bb-0310-9956-ffa450edef68
2017-07-26 22:00:23 +00:00
Tim Allison
16f331054f 61337 -- try to convert assertions to exceptions. I left in the assertions for the binary search components.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1803092 13f79535-47bb-0310-9956-ffa450edef68
2017-07-26 18:43:27 +00:00
Tim Allison
21cbf101bc 61346 add more sanity checks before allocating byte arrays in emf/wmf
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1803041 13f79535-47bb-0310-9956-ffa450edef68
2017-07-26 12:46:24 +00:00
Andreas Beeker
4ca2ad85b9 remove test leftover
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1803024 13f79535-47bb-0310-9956-ffa450edef68
2017-07-26 08:13:16 +00:00
Andreas Beeker
d345faa025 Bug 61182 - Invalid signature created for streamed xlsx file
- add hashes for other linebreaks

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1803011 13f79535-47bb-0310-9956-ffa450edef68
2017-07-25 22:42:22 +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
df3910135f 61295 -- prevent potential oom in HPSF triggered by fuzzed file
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1802879 13f79535-47bb-0310-9956-ffa450edef68
2017-07-25 01:38:35 +00:00
Tim Allison
67719a8d4f augment expected sizes in TestFonts
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1802855 13f79535-47bb-0310-9956-ffa450edef68
2017-07-24 19:29:29 +00:00
Dominik Stadler
cc0294d58b Refactor test somewhat to make it easier to see what it actually verifies
Check some more to see why it fails sometimes in CI, e.g. on node qnode1

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1802817 13f79535-47bb-0310-9956-ffa450edef68
2017-07-24 14:16:34 +00:00
Andreas Beeker
08b03d9547 Fonts bugfix
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1802751 13f79535-47bb-0310-9956-ffa450edef68
2017-07-24 05:39:33 +00:00
Andreas Beeker
2325cdb9e6 Bug 61331 - Font group handling / common font interface
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1802741 13f79535-47bb-0310-9956-ffa450edef68
2017-07-23 22:45:47 +00:00
Dominik Stadler
8a95a71a48 My version of Java 6 chokes on Generics here
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1802633 13f79535-47bb-0310-9956-ffa450edef68
2017-07-21 18:19:29 +00:00
Dominik Stadler
f28bbb750c Adjust TestFonts for my version of Ubuntu
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1802632 13f79535-47bb-0310-9956-ffa450edef68
2017-07-21 18:19:22 +00:00
Dominik Stadler
c76672b8aa ExtractorFactory: Try to close resources also on Errors to avoid keeping files open too long
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1802630 13f79535-47bb-0310-9956-ffa450edef68
2017-07-21 18:19:11 +00:00
Dominik Stadler
db1b62efe7 Fix some IntelliJ warnings
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1802629 13f79535-47bb-0310-9956-ffa450edef68
2017-07-21 18:19:03 +00:00
PJ Fanning
d4c9e0206a fix tests broken by <br/> doc changes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1802131 13f79535-47bb-0310-9956-ffa450edef68
2017-07-17 11:36:32 +00:00
PJ Fanning
810d03f499 javadoc: replace invalid self enclosing elements
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1802110 13f79535-47bb-0310-9956-ffa450edef68
2017-07-17 08:24:24 +00:00
PJ Fanning
9b3812d027 some javadoc fixes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1802035 13f79535-47bb-0310-9956-ffa450edef68
2017-07-15 22:31:09 +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
2398bb7a60 clean up whitespace and indents
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1801969 13f79535-47bb-0310-9956-ffa450edef68
2017-07-14 14:19:21 +00:00
Tim Allison
b0b3ad66ba avoid using non-ascii in unit tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1801968 13f79535-47bb-0310-9956-ffa450edef68
2017-07-14 14:17:55 +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
c7db66a30d bug 61294 -- cleaned up based on PJ Fanning's code review. Went with a copy/paste from commons-io.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1801952 13f79535-47bb-0310-9956-ffa450edef68
2017-07-14 12:48:28 +00:00
Javen O'Neal
a91c041c43 bug 61296: suggest de-duplication of purl dublin core namespace url
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1801905 13f79535-47bb-0310-9956-ffa450edef68
2017-07-14 03:54:12 +00:00
Javen O'Neal
36e97a30e5 bug 61296: deduplicate ooxml schema constants
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1801904 13f79535-47bb-0310-9956-ffa450edef68
2017-07-14 03:47:38 +00:00
Javen O'Neal
0a18068f0c bug 61296: consolidate some of the ooxml namespace uri copy-paste in POI, prepare to make these usable by downstream libraries like Tika
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1801903 13f79535-47bb-0310-9956-ffa450edef68
2017-07-14 03:39:25 +00:00
Javen O'Neal
e8d59d0d7b bug 61296: consolidate some of the ooxml namespace uri copy-paste in POI, prepare to make these usable by downstream libraries like Tika
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1801901 13f79535-47bb-0310-9956-ffa450edef68
2017-07-14 03:14:30 +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
d1a51f76f0 avoid unnecessary string concats in SXSSF SheetDataWriter
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1801806 13f79535-47bb-0310-9956-ffa450edef68
2017-07-13 07:14:01 +00:00
Javen O'Neal
f1cf95ecb5 add 362px font height for my computer's configuration (high-dpi monitor)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1801803 13f79535-47bb-0310-9956-ffa450edef68
2017-07-13 04:30:41 +00:00
Javen O'Neal
2b0ded5cb3 replace commented-out throw-away code that writes workbook to C:\temp\xxxxx.xlsx for manual review with XSSFTestDataSamples.writeOut(wb, "bug xxxxx for manual review")
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1801801 13f79535-47bb-0310-9956-ffa450edef68
2017-07-13 04:19:20 +00:00
Javen O'Neal
dc869e5e4a replace return variable assignments with return statements
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1801799 13f79535-47bb-0310-9956-ffa450edef68
2017-07-13 03:42:12 +00:00
Javen O'Neal
08a624f172 github #43: fix roundUp and roundDown.
Thanks to @FishMeat on github for the patch.
This closes #43 on github.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1801798 13f79535-47bb-0310-9956-ffa450edef68
2017-07-13 03:35:06 +00:00
PJ Fanning
eddad11775 [Bug-61281] fix issue with export of table columns - Thanks to Daniel for the patch
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1801721 13f79535-47bb-0310-9956-ffa450edef68
2017-07-12 10:46:13 +00:00
PJ Fanning
748e0c4981 remove more deprecated methods
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1801697 13f79535-47bb-0310-9956-ffa450edef68
2017-07-12 08:38:20 +00:00
PJ Fanning
f11bb182e9 remove deprecated methods from CommentsTable
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1801692 13f79535-47bb-0310-9956-ffa450edef68
2017-07-12 08:15:44 +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
PJ Fanning
9ae9aa0210 expand range of acceptable values in TestFonts
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1801416 13f79535-47bb-0310-9956-ffa450edef68
2017-07-10 07:26:40 +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
Javen O'Neal
0800702952 whitespace
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1801404 13f79535-47bb-0310-9956-ffa450edef68
2017-07-10 01:31:31 +00:00
Andreas Beeker
4c10645b48 font rendering - handle a few system dependent textbox sizes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1801401 13f79535-47bb-0310-9956-ffa450edef68
2017-07-09 23:28:41 +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
PJ Fanning
9225a961a3 fix spelling
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1801393 13f79535-47bb-0310-9956-ffa450edef68
2017-07-09 21:34:53 +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
0cac9103ba Rollback of r1801368 because of a generics bug with self-referenced types in Java6
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1801373 13f79535-47bb-0310-9956-ffa450edef68
2017-07-09 15:27:29 +00:00
Andreas Beeker
04ffc95da7 SL Common: narrow generics definition because of tighter java9 checks
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1801368 13f79535-47bb-0310-9956-ffa450edef68
2017-07-09 11:09:45 +00:00
Andreas Beeker
edae42cb91 add .ttf to ignored test integration resources
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1801339 13f79535-47bb-0310-9956-ffa450edef68
2017-07-08 23:15:21 +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
PJ Fanning
cfc7aa4315 [Bug 58975] add test case for new function args default of 255
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1801307 13f79535-47bb-0310-9956-ffa450edef68
2017-07-08 18:15:49 +00:00
PJ Fanning
23567cd3a0 [github-25] support excel number trailing comma format - Thabks to Luca Martini for proving the patch
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800975 13f79535-47bb-0310-9956-ffa450edef68
2017-07-06 07:56:57 +00:00
PJ Fanning
a0aa8807b5 [Bug 58975] do not cast numberOfOperands to byte in AbstractFunctionPtg
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800949 13f79535-47bb-0310-9956-ffa450edef68
2017-07-05 22:56:32 +00:00
PJ Fanning
a33eef41a0 fix javadoc issue
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800717 13f79535-47bb-0310-9956-ffa450edef68
2017-07-03 22:18:25 +00:00
PJ Fanning
86f7d0b896 [Bug 60422] fix data formatter issue with specific format in German locale
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800713 13f79535-47bb-0310-9956-ffa450edef68
2017-07-03 20:56:02 +00:00
PJ Fanning
68be989d22 [Bug 61246] remove flush method
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800712 13f79535-47bb-0310-9956-ffa450edef68
2017-07-03 20:32:55 +00:00
PJ Fanning
0c9a1ef203 [Bug 61246] fix issue where SXSSF sheet data has unicode surrogate chars replaced by '?'
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800705 13f79535-47bb-0310-9956-ffa450edef68
2017-07-03 18:49:25 +00:00
PJ Fanning
e02f6e038f Remove check for jdk1.5 in test because POI now only supports jre1.6 and up
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800696 13f79535-47bb-0310-9956-ffa450edef68
2017-07-03 16:16:35 +00:00
PJ Fanning
3cac752c89 Add missing deprecations for CellType methods that return ints
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800569 13f79535-47bb-0310-9956-ffa450edef68
2017-07-02 17:12:55 +00:00
PJ Fanning
0aa4406a08 add test case for date formatting using different locales
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800558 13f79535-47bb-0310-9956-ffa450edef68
2017-07-02 12:29:37 +00:00
Andreas Beeker
a09a3398cc #61243 - Refactor and unify toString/toXml in DDF
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800452 13f79535-47bb-0310-9956-ffa450edef68
2017-06-30 20:21:33 +00:00
PJ Fanning
cbb15b1efa Remove more deprecated code (MissingCellPolicy)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800400 13f79535-47bb-0310-9956-ffa450edef68
2017-06-30 13:00:57 +00:00
PJ Fanning
05d8c18a58 Remove more deprecated code (BorderFormatting constants)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800385 13f79535-47bb-0310-9956-ffa450edef68
2017-06-30 12:18:13 +00:00
PJ Fanning
ee70c9a8fb Remove more deprecated code (especially from Spreadsheet Cell classes)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800375 13f79535-47bb-0310-9956-ffa450edef68
2017-06-30 11:48:23 +00:00
Javen O'Neal
e552b04d9c remove incomplete javadocs
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800361 13f79535-47bb-0310-9956-ffa450edef68
2017-06-30 07:48:40 +00:00
Javen O'Neal
7cb0588daf add @Internal annotation to methods that return a CT* class
add @Override annotation where missing

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800360 13f79535-47bb-0310-9956-ffa450edef68
2017-06-30 07:45:46 +00:00
Greg Woolsey
07a7987a48 Expose one more bit of style information generically (for XSSF). If someone needs all these properties for HSSF charts as well, we can build a new Interface for the various bits and populate it with things like axis line width and color, etc. but for now I think most users are in the XSSF realm like me.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800341 13f79535-47bb-0310-9956-ffa450edef68
2017-06-29 23:06:27 +00:00
Nick Burch
2cbd15ece2 Deprecated xssfSheetIterator has been removed, so remove javadoc reference
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800288 13f79535-47bb-0310-9956-ffa450edef68
2017-06-29 14:38:41 +00:00
Andreas Beeker
b2d19936ef remove temporary jenkins debug output
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800263 13f79535-47bb-0310-9956-ffa450edef68
2017-06-29 10:49:22 +00:00
Andreas Beeker
1ce039753a remove timezoned call to Date.toString() - SignatureProperties don't necessarily need an Id attribute
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800257 13f79535-47bb-0310-9956-ffa450edef68
2017-06-29 09:33:33 +00:00
PJ Fanning
2ec623fe0b remove deprecated org.apache.poi.hssf.record.RecordFormatException
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800256 13f79535-47bb-0310-9956-ffa450edef68
2017-06-29 09:06:30 +00:00
PJ Fanning
af35e389da remove some unused imports
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800255 13f79535-47bb-0310-9956-ffa450edef68
2017-06-29 08:55:35 +00:00
PJ Fanning
5f6e2b780a remove deprecated POIXMLDocument.hasOOXMLHeader
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800254 13f79535-47bb-0310-9956-ffa450edef68
2017-06-29 08:45:00 +00:00
PJ Fanning
1281127420 remove deprecated org.apache.poi.hssf.record.RecordFormatException
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800249 13f79535-47bb-0310-9956-ffa450edef68
2017-06-29 08:37:02 +00:00
PJ Fanning
657784ce1a Remove old XSSFWorkbook wb.xssfSheetIterator method
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800248 13f79535-47bb-0310-9956-ffa450edef68
2017-06-29 08:15:50 +00:00
PJ Fanning
4bcc0f4eb1 Remove old XSSFPaswordHelper
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800247 13f79535-47bb-0310-9956-ffa450edef68
2017-06-29 08:10:32 +00:00
Nick Burch
b3149fe1ad Fix javadoc warnings
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800214 13f79535-47bb-0310-9956-ffa450edef68
2017-06-28 23:30:15 +00:00
Nick Burch
07c18a9055 Used deprecated external method removed, so remove internal method
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800212 13f79535-47bb-0310-9956-ffa450edef68
2017-06-28 23:29:58 +00:00
Nick Burch
a658a7f573 Used deprecated external method removed, so remove internal method
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800211 13f79535-47bb-0310-9956-ffa450edef68
2017-06-28 23:25:41 +00:00
Andreas Beeker
9ef695aedf add debugging info to find signature differences
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800209 13f79535-47bb-0310-9956-ffa450edef68
2017-06-28 23:04:25 +00:00
PJ Fanning
5c65b55bd4 Ensure SpreadsheetVersion is set for AreaReferences
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800208 13f79535-47bb-0310-9956-ffa450edef68
2017-06-28 22:11:26 +00:00
Andreas Beeker
51b46a9e4e Bug 61182 - Invalid signature created for streamed xslx file
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800207 13f79535-47bb-0310-9956-ffa450edef68
2017-06-28 21:38:23 +00:00
PJ Fanning
4209a1b2da Remove some deprecated *SSF APIs
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800147 13f79535-47bb-0310-9956-ffa450edef68
2017-06-28 10:34:37 +00:00
Nick Burch
a753adb848 Add import for javadocs references
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1799832 13f79535-47bb-0310-9956-ffa450edef68
2017-06-25 19:16:36 +00:00
PJ Fanning
03d4e52bc0 expand StaxHelper
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1799772 13f79535-47bb-0310-9956-ffa450edef68
2017-06-24 13:53:47 +00:00
Andreas Beeker
85963a56f7 rollback invalid commit - r1799740
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1799742 13f79535-47bb-0310-9956-ffa450edef68
2017-06-24 09:20:02 +00:00
Andreas Beeker
6aae53935a release prepare for 3.17-beta1 - pin documentation
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1799740 13f79535-47bb-0310-9956-ffa450edef68
2017-06-24 09:03:00 +00:00
PJ Fanning
61b0ecbd4b Add StaxHelper to ensure that StAX parsers have sensible defaults, including settings to avoid XML Entity Expansion issues
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1799734 13f79535-47bb-0310-9956-ffa450edef68
2017-06-24 07:30:07 +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
PJ Fanning
eee5205d0c [Bug 60422] Fix forbidden-api build issue
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1799723 13f79535-47bb-0310-9956-ffa450edef68
2017-06-24 00:37:03 +00:00
PJ Fanning
c1cc93a2ef [Bug 60422] Tidy up test case
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1799722 13f79535-47bb-0310-9956-ffa450edef68
2017-06-24 00:15:20 +00:00
PJ Fanning
66b39c70ad Bug 60422 add testtestcase with current LocaleUtil workaround
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1799721 13f79535-47bb-0310-9956-ffa450edef68
2017-06-23 23:42:25 +00:00
Greg Woolsey
0e23e4e9d8 Move my new unit conversions to the Units class, move and deprecate duplicate and scattered unit constants, update constant references to standardize on the ones in the Units class.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1799683 13f79535-47bb-0310-9956-ffa450edef68
2017-06-23 15:43:48 +00:00
Greg Woolsey
12048f528b Bug 61203
one of these days I'll add the copyright to my project templates.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1799645 13f79535-47bb-0310-9956-ffa450edef68
2017-06-23 06:17:09 +00:00
Greg Woolsey
8c67848ad6 Bug 61203 - XSSFDrawing.getAnchorFromParent handles CTOneCellAnchor incorrectly, ignores CTAbsoluteAnchor
This is likely incomplete, but closer to where things should be.  It is backward compatible with previous uses of XSSFClientAnchor.

This fixes a bug in XSSFGraphicFrame that was hiding the parent class anchor property (which is a protected field set directly from XSSFDrawing).  This is a peril of using direct property access - the hiding wasn't obvious because there was no setter being overridden.

XSSFGraphicFrame now notices when it relates to a chart, and setts the frame property of the XSSFChart.  That was not being set on parse previously, only when creating charts from scratch.  That didn't seem right.

XSSFClientAnchor now calculates size and position correctly based on initial inputs from the different types of anchors.  It DOES NOT update those initial inputs, however.  It does properly adjust if the size or initial position are absolute and the corresponding row/column values are requested.

Added new class EMUUtils to centralize the measurement constants and conversions since there are so many units in play in the OOXML spec and POI APIs:

* EMUs (English Metric Units)
* Inches
* Centimeters
* Points
* Pixels
* Twips (1/20th of a point)

I'm sure there are more conversions that could be done there, I just started with what I needed.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1799643 13f79535-47bb-0310-9956-ffa450edef68
2017-06-23 05:16:38 +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
Tim Allison
fe5f8fb54c bug 61053 -- not a fix, but this aligns XSSFBSheetHandler's behavior with streaming and non-streaming extractors for xlsx
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1799345 13f79535-47bb-0310-9956-ffa450edef68
2017-06-20 12:59:33 +00:00
Javen O'Neal
c0e5fcaa98 javadoc
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1799332 13f79535-47bb-0310-9956-ffa450edef68
2017-06-20 09:52:43 +00:00
Javen O'Neal
1866c69754 @Ignore("requires an internet connection to a 3rd party site"
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1799326 13f79535-47bb-0310-9956-ffa450edef68
2017-06-20 09:16:05 +00:00
Javen O'Neal
9326624d76 unit test that is not written yet should fail
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1799324 13f79535-47bb-0310-9956-ffa450edef68
2017-06-20 09:13:18 +00:00
Javen O'Neal
de9134c1d8 simplify unit test code with IOUtils.write to a NullOutputStream
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1799323 13f79535-47bb-0310-9956-ffa450edef68
2017-06-20 09:12:42 +00:00
Nick Burch
4a51090ae7 Javadoc fix
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1799320 13f79535-47bb-0310-9956-ffa450edef68
2017-06-20 09:04:02 +00:00
Javen O'Neal
171692edf2 bug 57919: close opened resources
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1799316 13f79535-47bb-0310-9956-ffa450edef68
2017-06-20 08:13:58 +00:00
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