Commit Graph

200 Commits

Author SHA1 Message Date
Nick Burch 680feb50ee Correct older biff detection, and add unit tests for HSSFWorkbook giving helpful exceptions on the older formats
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1642568 13f79535-47bb-0310-9956-ffa450edef68
2014-11-30 17:09:03 +00:00
Nick Burch 6873214113 More detection for older Excel formats when opening the POIFS Stream, and a more specific exception for non-OLE2 files
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1642565 13f79535-47bb-0310-9956-ffa450edef68
2014-11-30 16:59:06 +00:00
Dominik Stadler 4c451f44ed Add more output in case of unknown cipher-ids to aid in debugging bugs like 57195
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1641883 13f79535-47bb-0310-9956-ffa450edef68
2014-11-26 18:39:44 +00:00
Andreas Beeker 3f77a96e47 revert of r1639217 and offline-linking for maven javadocs
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1639807 13f79535-47bb-0310-9956-ffa450edef68
2014-11-15 00:00:30 +00:00
Andreas Beeker 39ba1ba707 Javadoc warnings fixed:
Now that the javadocs are split, the reference from one module to another need to be url links

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1639217 13f79535-47bb-0310-9956-ffa450edef68
2014-11-13 00:30:48 +00:00
Andreas Beeker f818d1fdb7 house keeping - fixes for sonarqube blockers
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1634255 13f79535-47bb-0310-9956-ffa450edef68
2014-10-25 21:32:03 +00:00
Andreas Beeker daa7d17531 Bug 57080 - IndexOutOfBoundsException in poi decryptor
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1631600 13f79535-47bb-0310-9956-ffa450edef68
2014-10-13 23:42:33 +00:00
Andreas Beeker da4201c2cd more tests, some refactoring
git-svn-id: https://svn.apache.org/repos/asf/poi/branches/xml_signature@1628107 13f79535-47bb-0310-9956-ffa450edef68
2014-09-28 22:30:02 +00:00
Andreas Beeker b410e72196 merge with trunk
git-svn-id: https://svn.apache.org/repos/asf/poi/branches/xml_signature@1625828 13f79535-47bb-0310-9956-ffa450edef68
2014-09-17 21:12:36 +00:00
Andreas Beeker 777fd47d71 some changes because of test errors
git-svn-id: https://svn.apache.org/repos/asf/poi/branches/xml_signature@1618254 13f79535-47bb-0310-9956-ffa450edef68
2014-08-15 18:19:28 +00:00
Andreas Beeker 63f8c1dcf0 Xml signature support - version 1
git-svn-id: https://svn.apache.org/repos/asf/poi/branches/xml_signature@1617141 13f79535-47bb-0310-9956-ffa450edef68
2014-08-10 18:25:10 +00:00
Andreas Beeker 3cd1cd6e70 Another test for NPOIFS in-place writing support - probably the deletion of an entry causes the problem
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1615273 13f79535-47bb-0310-9956-ffa450edef68
2014-08-02 00:51:56 +00:00
Dominik Stadler e34e77b12d Bug 56537: Update javadoc to reflect the addition of Closeable to Workbook
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1607390 13f79535-47bb-0310-9956-ffa450edef68
2014-07-02 15:05:05 +00:00
Andreas Beeker 00e2e55338 Bug 56486 - Add XOR obfuscation/decryption support to HSSF
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1592636 13f79535-47bb-0310-9956-ffa450edef68
2014-05-05 21:41:31 +00:00
Andreas Beeker 234ad7f85e The NPOIFS-classes result currently in left-over memory mapped buffers.
These are actually hard to workaround, so for Windows the test is ignored, if this error happens.
http://stackoverflow.com/questions/3602783/file-access-synchronized-on-java-object 

Apart of that, the RandomFileAccess instance is saved in the FileBackedDataSource as it needs to
be closed instead of the Channel.
http://bugs.java.com/bugdatabase/view_bug.do?bug_id=4796385

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1592418 13f79535-47bb-0310-9956-ffa450edef68
2014-05-04 20:58:42 +00:00
Nick Burch 3a5825c43f Update the HPSF change properties example to use NPOIFS + in-place writes, and have NPOIFS give a helpful error if you try to in-place write on a read only open
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1590577 13f79535-47bb-0310-9956-ffa450edef68
2014-04-28 09:22:58 +00:00
Nick Burch a57e1f1fa6 Get NPOIFS in-place-write working!
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1590556 13f79535-47bb-0310-9956-ffa450edef68
2014-04-28 06:35:39 +00:00
Nick Burch 3e6cb71fb9 More on the HPFS in-place NPOIFS write tests, and a note about what is still to do for them
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1590319 13f79535-47bb-0310-9956-ffa450edef68
2014-04-26 22:50:00 +00:00
Nick Burch f649abdbe9 Fix javadoc layout
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1590317 13f79535-47bb-0310-9956-ffa450edef68
2014-04-26 22:43:23 +00:00
Nick Burch 0496d8f330 Convert the HPSF test to JUnit 4, and add a bit more testing for NPOIFS
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1590309 13f79535-47bb-0310-9956-ffa450edef68
2014-04-26 21:51:28 +00:00
Nick Burch 73bc57db74 NDocumentOutputStream write logic
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1590191 13f79535-47bb-0310-9956-ffa450edef68
2014-04-25 23:34:09 +00:00
Nick Burch b77ce4fede Fix inconsistent whitespace
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1590190 13f79535-47bb-0310-9956-ffa450edef68
2014-04-25 23:33:16 +00:00
Nick Burch c3769b5da0 Begin to support and test in-place changes to documents within a NPOIFS stream
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1590185 13f79535-47bb-0310-9956-ffa450edef68
2014-04-25 23:07:00 +00:00
Nick Burch 868a108fe3 Support for replacing the contents of a Document in a NPOIFSFileSytem, in place
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1590177 13f79535-47bb-0310-9956-ffa450edef68
2014-04-25 22:40:51 +00:00
Nick Burch 0bdc025279 When deleting a document in NPOIFS, free the underlying blocks
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1590160 13f79535-47bb-0310-9956-ffa450edef68
2014-04-25 22:00:30 +00:00
Nick Burch b1dd6b403f Add a getEntryNames() method to POIFS/NPOIFS directory entries, to make listing easier
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1590148 13f79535-47bb-0310-9956-ffa450edef68
2014-04-25 21:10:52 +00:00
Nick Burch 6a89a9afbf More NPOIFS mini stream improvements, and more tests for it all
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1590098 13f79535-47bb-0310-9956-ffa450edef68
2014-04-25 18:39:31 +00:00
Nick Burch e4e0e93ff5 Correct mini stream initialisation, and enable more npoifs write tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1590088 13f79535-47bb-0310-9956-ffa450edef68
2014-04-25 18:14:28 +00:00
Nick Burch 4b6ae05a04 More NPOIFS tests, and a partial mini-stream fix
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1590083 13f79535-47bb-0310-9956-ffa450edef68
2014-04-25 17:06:10 +00:00
Nick Burch 1fc66d1f71 Correct NPOIFS mini stream first write bug, and add more NPOIFS stream write tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1589881 13f79535-47bb-0310-9956-ffa450edef68
2014-04-24 21:08:34 +00:00
Nick Burch a94f150450 More NPOIFS write testing, and fix a problem with writing xbat details out
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1589806 13f79535-47bb-0310-9956-ffa450edef68
2014-04-24 17:44:10 +00:00
Nick Burch b2a35bb494 More unit tests for NPOIFS writing, and correct a bug in how bats get allocated in xbats. (Some issues still remain)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1589800 13f79535-47bb-0310-9956-ffa450edef68
2014-04-24 17:25:10 +00:00
Nick Burch fbd86d5084 More int/long sizing fixes for >2gb NPOIFS files, see bug #56447
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1589783 13f79535-47bb-0310-9956-ffa450edef68
2014-04-24 16:15:21 +00:00
Andreas Beeker 14a7ae6316 Bug 56437 - [PATCH] Streaming write support in NPOIFS
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1588887 13f79535-47bb-0310-9956-ffa450edef68
2014-04-21 14:37:33 +00:00
Andreas Beeker 821d3ca5bd Some encryption fixes:
- don't rely on SecretKey object having the right algorithm set
- leave encryption-description parsing of string/stream to xmlbeans and refactor it to one location
- use namespaces of schema instead of hard-coded strings
- use CryptoFunctions.getMessageDigest() instead of code duplication

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1588874 13f79535-47bb-0310-9956-ffa450edef68
2014-04-21 12:16:54 +00:00
Andreas Beeker 3fe86eca24 Added MD4-option and some cleanups
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1574732 13f79535-47bb-0310-9956-ffa450edef68
2014-03-06 00:53:09 +00:00
Andreas Beeker 833ae007f8 Bug 56076 - Add document protection with password support to XWPF
Bug 56077 - Add password hash function to HWPF

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1570750 13f79535-47bb-0310-9956-ffa450edef68
2014-02-21 23:19:57 +00:00
Andreas Beeker 2cfc8dbf17 FindBugs fix
- fixed "Equals method should not assume anything about the type of its argument"
- see http://findbugs.sourceforge.net/bugDescriptions.html#BC_EQUALS_METHOD_SHOULD_WORK_FOR_ALL_OBJECTS

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1568861 13f79535-47bb-0310-9956-ffa450edef68
2014-02-16 23:36:32 +00:00
Dominik Stadler 023fa18794 Instead of using initCause() when re-throwing exceptions, it leads to better stacktraces if a simple constructor-argument is used
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1568614 13f79535-47bb-0310-9956-ffa450edef68
2014-02-15 10:43:58 +00:00
Andreas Beeker 5d0f69097c Bug 51891 - Fix StringIndexOutOfBoundsException : Ole10Native.<init> (parsing word file)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1563483 13f79535-47bb-0310-9956-ffa450edef68
2014-02-01 21:45:48 +00:00
Nick Burch 0e5300538f Ensure our package html files have consistent line endings, and the right svn properties set on them
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1557156 13f79535-47bb-0310-9956-ffa450edef68
2014-01-10 15:39:39 +00:00
Dominik Stadler 60ca1a5de4 Add some @Overrides suggested by Eclipse, generics and some warnings,
convert some tabs to spaces.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1553466 13f79535-47bb-0310-9956-ffa450edef68
2013-12-26 09:38:48 +00:00
Andreas Beeker 3ccd728544 javadoc house-keeping
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1553422 13f79535-47bb-0310-9956-ffa450edef68
2013-12-25 22:18:53 +00:00
kiwiwings 3a36da330a JCE policy fix
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1553342 13f79535-47bb-0310-9956-ffa450edef68
2013-12-25 01:04:29 +00:00
kiwiwings c72965c8b2 Fix jdk-differences for encryption patch
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1553339 13f79535-47bb-0310-9956-ffa450edef68
2013-12-24 23:49:10 +00:00
kiwiwings abac580a6e Fix jdk-differences for encryption patch
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1553338 13f79535-47bb-0310-9956-ffa450edef68
2013-12-24 23:39:09 +00:00
kiwiwings ad9cecae59 Patch for Bug/Enhancement 55818 - add encryption support
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1553336 13f79535-47bb-0310-9956-ffa450edef68
2013-12-24 23:13:21 +00:00
Nick Burch 44c9f41cc9 Patch from Andreas Beeker from bug #53475 - Switch XWPF test to JUnit 4, so that we can skip one part of the tests if the JVM doesn't support larger keys
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1544121 13f79535-47bb-0310-9956-ffa450edef68
2013-11-21 11:18:23 +00:00
Nick Burch d1118ce0d5 Patch from Andreas Beeker from bug #53475 - further OOXML Encryption support, covering more ciphers
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1541009 13f79535-47bb-0310-9956-ffa450edef68
2013-11-12 11:37:45 +00:00
Nick Burch f7b44f5e9f Patch from Andreas Beeker from bug #53475 - CSPName may not always be present on OOXML encrypted documents, plus test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1539828 13f79535-47bb-0310-9956-ffa450edef68
2013-11-07 21:29:14 +00:00