Commit Graph

1124 Commits

Author SHA1 Message Date
Dominik Stadler 04ae3247eb Revert organize imports
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1661327 13f79535-47bb-0310-9956-ffa450edef68
2015-02-21 11:58:45 +00:00
Dominik Stadler fa85c4bbef Use assertArrayEquals() to try to better show why this test fails in some rare cases currently
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1660697 13f79535-47bb-0310-9956-ffa450edef68
2015-02-18 18:47:22 +00:00
Dominik Stadler ce007f05ee Bug 57459: Add method in SXSSFSheet to directly set row OutLineLevel
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1659785 13f79535-47bb-0310-9956-ffa450edef68
2015-02-14 12:46:16 +00:00
Dominik Stadler e450b8d5e1 Adjust TestSignatureInfo so junit provides more information if an unexpected exception happens
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1659784 13f79535-47bb-0310-9956-ffa450edef68
2015-02-14 12:46:04 +00:00
Nick Burch 702f8b9ee7 Finish converting ErrorEval to only use the FormulaError constants, and then finish unit test for 57535
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1658190 13f79535-47bb-0310-9956-ffa450edef68
2015-02-08 15:37:14 +00:00
Nick Burch b1a6afc36a Add a unit test (disabled) for bug #57535 - "Unknown error type: -60" fetching formula error value
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1658186 13f79535-47bb-0310-9956-ffa450edef68
2015-02-08 15:17:47 +00:00
Nick Burch 25385edc38 XWPF implementation of some common Paragraph methods
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1657717 13f79535-47bb-0310-9956-ffa450edef68
2015-02-05 23:31:59 +00:00
Nick Burch 483982caad Stub a common WP paragraph class, needs uncommenting as XWPF implements/emulates
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1657712 13f79535-47bb-0310-9956-ffa450edef68
2015-02-05 23:20:43 +00:00
Nick Burch c526206e0d More common HWPF/XWPF interfaces
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1657634 13f79535-47bb-0310-9956-ffa450edef68
2015-02-05 17:35:09 +00:00
Nick Burch 1f2fc6c08b More common XWPF/HWPF character run methods
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1657631 13f79535-47bb-0310-9956-ffa450edef68
2015-02-05 17:25:02 +00:00
Nick Burch a351b66fde XWPF double strikethrough, and start on a common interface for HWPF and XWPF character runs
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1657624 13f79535-47bb-0310-9956-ffa450edef68
2015-02-05 17:00:08 +00:00
Nick Burch b25e4ca87d 57482 Handle XSLX files with no shared strings table in read-only mode
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1653825 13f79535-47bb-0310-9956-ffa450edef68
2015-01-22 12:15:59 +00:00
Nick Burch ca33983388 Unit test from Isao Kadowaki from bug #57482
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1653814 13f79535-47bb-0310-9956-ffa450edef68
2015-01-22 11:45:40 +00:00
Dominik Stadler eab2c0d20d Add a developer-tool to pretty-print the XMLs in an OOXML file. This makes it easier to compare OOXML files produced by different applications with differeing XML formatting.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1653777 13f79535-47bb-0310-9956-ffa450edef68
2015-01-22 07:24:01 +00:00
Nick Burch 0257c23cae Have ExtractorFactory open OPCPackages from files in read-only mode by default, since writing should never be needed when extracting text
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1652877 13f79535-47bb-0310-9956-ffa450edef68
2015-01-18 23:46:29 +00:00
Nick Burch df20c0a69b For XSSFSheet, add a getDrawingPatriarch() method alongside the existing createDrawingPatriarch() one
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1652876 13f79535-47bb-0310-9956-ffa450edef68
2015-01-18 23:45:04 +00:00
Nick Burch c4eb73a28b Test to show that bug #57430 works fine already
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1651314 13f79535-47bb-0310-9956-ffa450edef68
2015-01-13 09:57:46 +00:00
Dominik Stadler 113edb1a76 Adjust Bin2Dec similar to what we did for Hex2Dec in Bug 57196 and fix some smaller problems in the implementation found while adding full unit tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1650654 13f79535-47bb-0310-9956-ffa450edef68
2015-01-09 20:37:11 +00:00
Dominik Stadler 3403bef5a8 Fix Eclipse warnings, provide better error message and adjust javadoc slightly
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1650598 13f79535-47bb-0310-9956-ffa450edef68
2015-01-09 16:52:23 +00:00
Dominik Stadler c8bf92f963 Bug 57196: Resolve RefEval to it's inner ValueEval in Hex2Dec
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1650597 13f79535-47bb-0310-9956-ffa450edef68
2015-01-09 16:51:02 +00:00
Nick Burch ed8964594b Swap Exception for Throwable, to skip a wider range of problems (eg GAE) when attempting to set an xml security manager as best we can
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1650290 13f79535-47bb-0310-9956-ffa450edef68
2015-01-08 13:22:50 +00:00
Dominik Stadler 8997d8900d * Add missing close() on streams in ImageUtils.getImageDimension()
* Add some unit tests for CellReference

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1650070 13f79535-47bb-0310-9956-ffa450edef68
2015-01-07 14:36:39 +00:00
Dominik Stadler f912ecac92 Add reproducer for bug 56655
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1650069 13f79535-47bb-0310-9956-ffa450edef68
2015-01-07 14:34:13 +00:00
Dominik Stadler 5aff4f5a2a Add reproducing testcase for Bug 57294
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1649536 13f79535-47bb-0310-9956-ffa450edef68
2015-01-05 14:39:51 +00:00
Dominik Stadler fa8eae2bfd Move some tests to the base test class where applicapple
Introduce class BaseTestXCell to collect tests for XSSFCell and SXSSFCell that do not work for HSSFCell

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1649527 13f79535-47bb-0310-9956-ffa450edef68
2015-01-05 14:03:37 +00:00
Dominik Stadler c2d82b6005 Update disabled test for bug 54071 to show the root-cause better
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1649526 13f79535-47bb-0310-9956-ffa450edef68
2015-01-05 13:48:41 +00:00
Dominik Stadler 8edf70ec8f Add unit tests for XSSFTextRun and TextPainter, slightly more tests for XSSFSheet and enhance unit tests for XWPFParagraph and ExcelAntTest
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1649309 13f79535-47bb-0310-9956-ffa450edef68
2015-01-04 10:23:01 +00:00
Dominik Stadler 9794510d33 Improve information in exceptions thrown by XSSFRichTextString and improve unit tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1649234 13f79535-47bb-0310-9956-ffa450edef68
2015-01-03 19:30:56 +00:00
Dominik Stadler 2f681f430c Fix copy/paste errors in XSSFSimpleShape, allow unset of insets multiple times and add unit tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1649233 13f79535-47bb-0310-9956-ffa450edef68
2015-01-03 19:30:36 +00:00
Dominik Stadler 3bbf57cd27 Fix copy/paste error in XSSFTextParagraph and add unit tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1649232 13f79535-47bb-0310-9956-ffa450edef68
2015-01-03 19:29:51 +00:00
Dominik Stadler 302db39cb7 Fix some Eclipse warnings
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1649123 13f79535-47bb-0310-9956-ffa450edef68
2015-01-02 21:06:51 +00:00
Dominik Stadler ffcc20f60e Bug 46898: Convert unit tests for circular references to also run for XSSF
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1649122 13f79535-47bb-0310-9956-ffa450edef68
2015-01-02 21:04:50 +00:00
Dominik Stadler 12edcc5ed2 Bug 46192: Add methods to query outline level for HSSF and XSSF
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1649107 13f79535-47bb-0310-9956-ffa450edef68
2015-01-02 20:03:28 +00:00
Dominik Stadler 5c76ccba5b Add missing close() of resources in both production code and tests
Use revert() instead of close() on OCPPackage in some places to not re-write the file unnecessarily.
This should now run tests without leftover file handles when checked with file leak detector and
allows to find newly introduced cases more easily.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1648160 13f79535-47bb-0310-9956-ffa450edef68
2014-12-28 09:16:57 +00:00
Dominik Stadler 26585f4e95 Ensure that XSSFWorkbooks contain a BookView, some corrupt ones do not contain this, e.g. ones created by movescound.com
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1648158 13f79535-47bb-0310-9956-ffa450edef68
2014-12-28 09:08:58 +00:00
Dominik Stadler 5173eca9ea Fix Eclipse warnings, unnecessary casts, use generics, static access...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1648156 13f79535-47bb-0310-9956-ffa450edef68
2014-12-28 09:06:12 +00:00
Andreas Beeker 4bed984c0f Charset.forName() for known encodings makes catching UnknownEncodingException obsolete
Unify UTF-16LE conversion to StringUtil
BugFix for RecordInputStream.readFully in combination with continuing records
BugFix for integration tests - fix pathname for handler/exclude lookup on windows

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1648032 13f79535-47bb-0310-9956-ffa450edef68
2014-12-27 01:33:28 +00:00
Dominik Stadler 0c580c8f45 Add a test-suite which performs integration/stress tests which load and handle all stored test files in various ways.
It works by using handlers for each type of file which perform various operations on the files, e.g. loading,
iterating content, modify, ... This will trigger changes which break working with the available test-files and
thus provides another layer of regression testing which hopefully prevents some failures from making it into
releases.

It is runnable via a new ant-target 'test-integration' and also added to the jenkins-target.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1647885 13f79535-47bb-0310-9956-ffa450edef68
2014-12-25 09:16:44 +00:00
Andreas Beeker 202aa8177f - Support for Office Binary Document RC4 CryptoAPI Encryption for HSLF
- Support for Office Binary Document RC4 Encryption
- use LittleEndian class in LittleEndianInputStream
- add normalize method for HSLF, to remove edit history, which is also necessary for encryption support
- update PersistDirectoryEntry handling in PersistPtrHolder to recognize groups while serializing
- deprecated PersistPtrHolder.getSlideOffsetDataLocationsLookup() - throws now UnsupportedOperationException,
  as this wasn't used outside the scope of the class and was quite internal logic of PersistPtrHolder


git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1647867 13f79535-47bb-0310-9956-ffa450edef68
2014-12-25 01:56:29 +00:00
Dominik Stadler ed60f5cb08 Add comment
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1647512 13f79535-47bb-0310-9956-ffa450edef68
2014-12-23 09:26:22 +00:00
Dominik Stadler 95c9b9991a Fix testcases which were not executed before, use tempfile, cleanup, ...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1647511 13f79535-47bb-0310-9956-ffa450edef68
2014-12-23 09:26:14 +00:00
Dominik Stadler 7ee9ce8388 Fix two Eclipse warnings
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1647325 13f79535-47bb-0310-9956-ffa450edef68
2014-12-22 14:56:47 +00:00
Dominik Stadler 83f5683c50 Bug 57373: Fix get/setFirstVisibleTab() for XSSFWorkbook
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1647322 13f79535-47bb-0310-9956-ffa450edef68
2014-12-22 14:37:37 +00:00
Dominik Stadler 1db7f3bd3b Bug 57362: Properly initialize chart axis when loading a workbook which already contains a chart.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1647317 13f79535-47bb-0310-9956-ffa450edef68
2014-12-22 14:16:23 +00:00
Dominik Stadler f622530806 Remove iterating over the number of runs for certain XSSFRichTextString operations. If I didn't overlook something, they can directly access the array element anyway. Seems this was some leftover copy/paste stuff.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1647315 13f79535-47bb-0310-9956-ffa450edef68
2014-12-22 14:09:55 +00:00
Dominik Stadler 03f846c695 Bug 56511: Add a null-check to ensure that the run actually has a font to not cause a NullPointerException but rather return null as documented
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1647308 13f79535-47bb-0310-9956-ffa450edef68
2014-12-22 13:06:58 +00:00
Dominik Stadler 645d2083bf Bug 56550: Defer the initialization of the _classes to when it is actually needed to allow IBM JDK to at least load the class
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1647302 13f79535-47bb-0310-9956-ffa450edef68
2014-12-22 12:38:44 +00:00
Dominik Stadler 43ee4e08ca Add missing license header to newly added file
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1647294 13f79535-47bb-0310-9956-ffa450edef68
2014-12-22 11:49:43 +00:00
Dominik Stadler 0b6867d1d5 Bug 56644: Fix adding cells if MissingCellPolicy is set to NULL_FOR_BLANK and the last column in a row is empty
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1647291 13f79535-47bb-0310-9956-ffa450edef68
2014-12-22 11:11:34 +00:00
Dominik Stadler 181de5f6e5 Bug 56888: XSSFDataValidation ignores "allow blank" read from sheet, assumes true
Add TestSXSSFDataValidation to verify some parts for SXSSF as well

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1647276 13f79535-47bb-0310-9956-ffa450edef68
2014-12-22 10:03:32 +00:00