Commit Graph

34 Commits

Author SHA1 Message Date
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 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
Andreas Beeker bf311b8e6e SonarQube fixes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1777855 13f79535-47bb-0310-9956-ffa450edef68
2017-01-08 00:38:41 +00:00
Andreas Beeker 1042dacd93 SonarQube fixes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1777669 13f79535-47bb-0310-9956-ffa450edef68
2017-01-06 17:51:22 +00:00
Andreas Beeker 8cc9352d26 EmbeddedExtractor (for *SSF) - added OOXML support
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1777394 13f79535-47bb-0310-9956-ffa450edef68
2017-01-05 01:10:45 +00:00
Javen O'Neal 11c8858f6e use last file extension if multiple extensions; close opened stream; extract String constants
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1776827 13f79535-47bb-0310-9956-ffa450edef68
2017-01-01 06:57:42 +00:00
Andreas Beeker a4a0c1e91a fix content-type handling in *SSF-EmbeddedExtractor
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1776823 13f79535-47bb-0310-9956-ffa450edef68
2017-01-01 00:56:51 +00:00
Andreas Beeker 1d9c74b1bf #60519 - Extractor for *SSF embeddings
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1776819 13f79535-47bb-0310-9956-ffa450edef68
2016-12-31 21:50:47 +00:00
Dominik Stadler 06083f85f4 Refactor some common code from the various Document-Factories into a helper class
Fix a potential file-handle-leak for password protected workbooks or slideshows

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1734691 13f79535-47bb-0310-9956-ffa450edef68
2016-03-12 11:37:32 +00:00
Dominik Stadler 6d97ae7083 Fix some cases where POI itself or the tests leaked file-handles
Also fix some IntelliJ warnings

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1734690 13f79535-47bb-0310-9956-ffa450edef68
2016-03-12 11:37:22 +00:00
Dominik Stadler a021bc780b Fix some cases where file resources were not closed correctly, mostly when Exceptions occur during opening files
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1721470 13f79535-47bb-0310-9956-ffa450edef68
2015-12-22 22:36:43 +00:00
Dominik Stadler 5e6b975b1c Ensure that the ThreadLocal-Biff-Password is reset correctly after each usage, we had some unit tests failing sporadically due to this
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1704710 13f79535-47bb-0310-9956-ffa450edef68
2015-09-22 19:50:37 +00:00
Dominik Stadler 0377dbbb3e Bug 54938: Throw InvalidFormatException as documented instead of IllegalArgumentException in WorkbookFactory.create()
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1696338 13f79535-47bb-0310-9956-ffa450edef68
2015-08-17 20:54:32 +00:00
Dominik Stadler 03805d9e20 Add WorkbookFactory.create() with a flag to allow to open files read-only, keep the current way of opening read/write as default to not break existing code.
Also adjust Javadoc somewhat.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1681823 13f79535-47bb-0310-9956-ffa450edef68
2015-05-26 19:30:21 +00:00
Nick Burch dd8fc66a0c #56791 More updates from OPOIFS to NPOIFS
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1678801 13f79535-47bb-0310-9956-ffa450edef68
2015-05-11 18:59:10 +00:00
Nick Burch e9340cc1ba If an empty stream or file is given to WorkbookFactory.create, give a more informative exception - EmptyFileException
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1677562 13f79535-47bb-0310-9956-ffa450edef68
2015-05-04 09:15:48 +00:00
Nick Burch 925d32e2c1 Allow WorkbookFactory.create to open xlsx files protected with the default password
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1676853 13f79535-47bb-0310-9956-ffa450edef68
2015-04-29 20:36:13 +00:00
Nick Burch 9f196708d4 #57593 Complete create overloading in WorkbookFactory to take passwords
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1676847 13f79535-47bb-0310-9956-ffa450edef68
2015-04-29 20:19:38 +00:00
Nick Burch 2889cabaed #57593 Begin adding overloaded WorkbookFactory.create methods which take the spreadsheet password
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1676843 13f79535-47bb-0310-9956-ffa450edef68
2015-04-29 20:12:18 +00:00
Nick Burch 66afa6d09b Update Javadocs to refer to the fact that WorkbookFactory.create will throw a EncryptedDocumentException if the file is password protected
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1662074 13f79535-47bb-0310-9956-ffa450edef68
2015-02-24 18:20:02 +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 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 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
Nick Burch 1bcf519c7c Add a note about file resources, see bug #56537
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1600326 13f79535-47bb-0310-9956-ffa450edef68
2014-06-04 16:34:16 +00:00
Nick Burch 4c4d512d4a Ensure the indenting is consistent within the file, and then make some minor updates to the JavaDocs (language, clarity etc)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1496952 13f79535-47bb-0310-9956-ffa450edef68
2013-06-26 14:57:36 +00:00
Nick Burch 7aea48961d Add File based constructor to OPCPackage, alongside existing String one (which constructed a File from the string internally)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1351894 13f79535-47bb-0310-9956-ffa450edef68
2012-06-19 22:50:14 +00:00
Nick Burch 29fc1cc8ff Add a NPOIFS constructor to WorkbookFactory, to match the regular POIFS one
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1212976 13f79535-47bb-0310-9956-ffa450edef68
2011-12-11 08:16:32 +00:00
Nick Burch ba88670e3e Allow the passing of a File object to WorkbookFactory.create, which permits lower memory processing than the InputStream version
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1177409 13f79535-47bb-0310-9956-ffa450edef68
2011-09-29 19:39:51 +00:00
Josh Micich 67196db87e Renamed Package (in org.apache.poi.openxml4j.opc) to OPCPackage so as to avoid clash with java.lang.Package (see bugzilla 46859)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@755699 13f79535-47bb-0310-9956-ffa450edef68
2009-03-18 18:54:01 +00:00
Josh Micich d784593fa8 Fixed WorkbookFactory.create(InputStream) to throw specific Exceptions
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@743934 13f79535-47bb-0310-9956-ffa450edef68
2009-02-12 23:48:12 +00:00
Yegor Kozlov ef4b2ebc2e import OpenXML4j codebase
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@738842 13f79535-47bb-0310-9956-ffa450edef68
2009-01-29 12:44:31 +00:00
Nick Burch c8afd832c7 Start on a factory for producing the right Workbook
git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@635902 13f79535-47bb-0310-9956-ffa450edef68
2008-03-11 12:47:16 +00:00
Nick Burch bf493e3b88 [ooxml-branch] Split the common ss interfaces into two sets - one that works with jdk 1.5 and has the full functionality, and another that works with jdk 1.4 and only has dummy functionality. Update build.xml to spit out two versions of the main classes, one for jdk 1.5 with the full interfaces, and one for jdk 1.4 with the dummy ones (but which is otherwise like the current behaviour). Also add readme explaining all this
git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@613951 13f79535-47bb-0310-9956-ffa450edef68
2008-01-21 18:00:30 +00:00
Ugo Cei 0859571ede Some OOXML implementation and interface code, just some basic Row and Cell-level functionality.
git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@612495 13f79535-47bb-0310-9956-ffa450edef68
2008-01-16 16:08:22 +00:00