Commit Graph

1298 Commits

Author SHA1 Message Date
Andreas Beeker 21d2bc3cff #57272 - deadlock on corrupted PPT file
+ some refactoring in HSLFSlideShow, which will be necessary for cryptoapi support 

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1643680 13f79535-47bb-0310-9956-ffa450edef68
2014-12-07 14:34:19 +00:00
Dominik Stadler 81a3425f16 Typo and remove unnecessary casts
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1641941 13f79535-47bb-0310-9956-ffa450edef68
2014-11-26 21:11:18 +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
Nick Burch 0bd50defba Add a disabled unit test for bug #56880
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1630543 13f79535-47bb-0310-9956-ffa450edef68
2014-10-09 17:58:47 +00:00
Andreas Beeker d60adb500e Bug 56913 - Replace usages of o.a.p.util.ArrayUtil.copyOf* methods with replacements from j.u.Arrays
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1622589 13f79535-47bb-0310-9956-ffa450edef68
2014-09-05 00:31:47 +00:00
Nick Burch da61e7dd32 Fix bug 54725 - HWPF where no parent style CHP exists, use an empty
set when processing the style to avoid a NPE

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1614926 13f79535-47bb-0310-9956-ffa450edef68
2014-07-31 15:41:58 +00:00
Dominik Stadler 379214975e Add unit test for bug 37625 which verifies that this file can now be loaded
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1613837 13f79535-47bb-0310-9956-ffa450edef68
2014-07-27 19:57:57 +00:00
Nick Burch 4c98f1db45 Patch from Raúl Wegmann from bug #56735 / GitHub Pull #10 - Rationalise POI temp file creation to the TempFile util class, and allow a system wide setting of where Temp files (eg for SXSSF) go, via TempFile / TempFileCreationStrategy
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1613246 13f79535-47bb-0310-9956-ffa450edef68
2014-07-24 18:58:27 +00:00
Nick Burch bb91152a12 For places where an ordered collection is created and used within the context of a single thread, and there are no thread safety concerns, use ArrayList not Vector. See bug #54838
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1613186 13f79535-47bb-0310-9956-ffa450edef68
2014-07-24 16:41:43 +00:00
Dominik Stadler 9d1d93b88f Add missing @Overrides, reformat some files, increase coverage slightly,
comments, fix Eclipse warnings and add close() calls in some tests and
in HMEFMessage() to close files during tests correctly.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1602008 13f79535-47bb-0310-9956-ffa450edef68
2014-06-11 20:36:30 +00:00
Dominik Stadler 927e62f662 Apache POI - Use assertArrayEquals() instead of assertTrue(Arrays.equals()), this way we get better information on failure
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1595190 13f79535-47bb-0310-9956-ffa450edef68
2014-05-16 13:25:45 +00:00
Nick Burch 0bcdc868f3 Based on reading of the new file format docs, start to tweak how fixed length vs variable length / multi-valued properties are handled
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1593861 13f79535-47bb-0310-9956-ffa450edef68
2014-05-11 21:16:40 +00:00
Nick Burch 1a149050ee Outlook sometimes stores a codepage of ANSI when it means 1252, detect and alias, fixes bug #53983
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1593306 13f79535-47bb-0310-9956-ffa450edef68
2014-05-08 15:17:22 +00:00
Nick Burch 50ad48e746 Implement a few more MAPI property types
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1593298 13f79535-47bb-0310-9956-ffa450edef68
2014-05-08 14:49:21 +00:00
Nick Burch 27e48c3b79 Fix inconsistent indents
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1593297 13f79535-47bb-0310-9956-ffa450edef68
2014-05-08 14:46:43 +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
Nick Burch d2d289b90f Rather than having lots of classes all create their own XML DocumentBuilderFactory instance, push that logic to a helper which sets all the right defaults
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1587739 13f79535-47bb-0310-9956-ffa450edef68
2014-04-15 21:59:52 +00:00
Cédric Walter 1c987c38e6 performance issue: removed instantiation of new String object by copying an existing string.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1583366 13f79535-47bb-0310-9956-ffa450edef68
2014-03-31 16:16:52 +00:00
Cédric Walter a0d1ab5add performance issue logging calls are expensive because of the objects created when assembling the log messages. Using the check() method of the logging sub-system can prevent object creation
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1583357 13f79535-47bb-0310-9956-ffa450edef68
2014-03-31 15:54:52 +00:00
Nick Burch 3868a2cdc7 Avoid an IndexOutOfBoundsException if there are no property nodes when searching for the start index, return -1 instead
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1578929 13f79535-47bb-0310-9956-ffa450edef68
2014-03-18 14:40:27 +00:00
Nick Burch 1e03ded992 When looking for text run related records after a TextHeaderAtom, provide a cleaner way to skip ones we don't care about, and a cleaner way to find the StyleTextPropAtom. Should fix #56260
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1577803 13f79535-47bb-0310-9956-ffa450edef68
2014-03-15 08:16:43 +00:00
Nick Burch 488647cb43 Implement MasterTextPropAtom, which provides the indents for a run of text, needed for #56260
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1577802 13f79535-47bb-0310-9956-ffa450edef68
2014-03-15 08:14:36 +00:00
Nick Burch adb98e1073 #56260 Partial fix for a slide with a TextHeaderAtom but no other atoms related to it, which is followed by another TextHeaderAtom straight away
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1577537 13f79535-47bb-0310-9956-ffa450edef68
2014-03-14 13:59:24 +00:00
Nick Burch 7984a1ec3f More helpful visio v5 exception, see bug #56171
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1570388 13f79535-47bb-0310-9956-ffa450edef68
2014-02-20 23:20:19 +00:00
Andreas Beeker 49c69f0eed The junit test failed with the original test-file (CDT_Data_Retention-PPT.ppt), so another check was necessary
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1569999 13f79535-47bb-0310-9956-ffa450edef68
2014-02-20 00:03:42 +00:00
Andreas Beeker 8afdb7a9ce Bug 55732 - PPT can't open, fails with "Couldn't instantiate .... StyleTextProp9Atom : java.lang.ArrayIndexOutOfBoundsException: 56"
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1569984 13f79535-47bb-0310-9956-ffa450edef68
2014-02-19 23:45:07 +00:00
Andreas Beeker edf1ffd89b upgraded to junit4 (before other changes)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1569972 13f79535-47bb-0310-9956-ffa450edef68
2014-02-19 23:30:12 +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
Andreas Beeker 53c90692ee FindBugs fix
- fixed "equals() method does not check for null argument"
- see http://findbugs.sourceforge.net/bugDescriptions.html#NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1568812 13f79535-47bb-0310-9956-ffa450edef68
2014-02-16 19:35:16 +00:00
Andreas Beeker 2a14920cdd FindBugs fix
- fixed/checked various null pointer related entries
- see http://findbugs.sourceforge.net/bugDescriptions.html#NP_NULL_PARAM_DEREF
- ... NP_NULL_ON_SOME_PATH, NP_NULL_ON_SOME_PATH_EXCEPTION


git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1568789 13f79535-47bb-0310-9956-ffa450edef68
2014-02-16 16:30:24 +00:00
Dominik Stadler dcad3624dc Fix unit tests broken by newly added test-file, ignore TestFontRendering as it is inherently unstable currently
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1568744 13f79535-47bb-0310-9956-ffa450edef68
2014-02-16 09:11:28 +00:00
Dominik Stadler 2414998aac Adjust test to write the failing PNG in case expected and actual do not match
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1568740 13f79535-47bb-0310-9956-ffa450edef68
2014-02-16 08:39:17 +00:00
Dominik Stadler b51a52cf20 Provide more output on test that failed for me locally
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1568558 13f79535-47bb-0310-9956-ffa450edef68
2014-02-15 00:21:19 +00:00
Andreas Beeker 92a488a28b FindBugs fix
- fixed "Should be a static inner class"
- see http://findbugs.sourceforge.net/bugDescriptions.html#SIC_INNER_SHOULD_BE_STATIC


git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1568178 13f79535-47bb-0310-9956-ffa450edef68
2014-02-14 01:00:45 +00:00
Andreas Beeker 3ceb93b23d FindBugs fix
- fixed "Field isn't final but should be"
- see http://findbugs.sourceforge.net/bugDescriptions.html#MS_SHOULD_BE_FINAL


git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1568145 13f79535-47bb-0310-9956-ffa450edef68
2014-02-13 23:34:11 +00:00
Andreas Beeker 8c3785890a Bug 55902 - Mixed fonts issue with Chinese characters (unable to form images from ppt)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1567455 13f79535-47bb-0310-9956-ffa450edef68
2014-02-11 23:16:54 +00:00
Andreas Beeker 413e76aed0 FindBugs fix
- fixed "Class defines equals() and uses Object.hashCode()"
- see http://findbugs.sourceforge.net/bugDescriptions.html#HE_EQUALS_USE_HASHCODE
- implemented UnicodeString.ExtRst.hashCode() + junit-test

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1566427 13f79535-47bb-0310-9956-ffa450edef68
2014-02-09 21:19:20 +00:00
Nick Burch fdcd28194e Fix up whitespace / indents to be consistent
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1563491 13f79535-47bb-0310-9956-ffa450edef68
2014-02-01 22:05:23 +00:00
Nick Burch c5823a746f Fix javadoc formatting
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1563489 13f79535-47bb-0310-9956-ffa450edef68
2014-02-01 21:58:24 +00:00
Nick Burch 2b0c8deb2f Expose the StyleIndex of CharacterRuns, and expand the range style tests to cover this + related
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1563486 13f79535-47bb-0310-9956-ffa450edef68
2014-02-01 21:52:19 +00:00
Andreas Beeker 439ad29071 Added license headers
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1559297 13f79535-47bb-0310-9956-ffa450edef68
2014-01-18 00:38:04 +00:00
Andreas Beeker c148f9c3e5 javadoc fix
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1557290 13f79535-47bb-0310-9956-ffa450edef68
2014-01-11 00:14:17 +00:00
Dominik Stadler 5e77641784 remove some unused imports and some useless TODOs, slightly more
coverage, @Overrides, more info on failing test, fix some Eclipse
warnings

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1554535 13f79535-47bb-0310-9956-ffa450edef68
2013-12-31 15:12:30 +00:00
Andreas Beeker ae2b93eaa0 Bug 45776 - Fix corrupt file problem using TextRun.setText
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1554077 13f79535-47bb-0310-9956-ffa450edef68
2013-12-29 22:14:05 +00:00
Andreas Beeker c95d740ee4 Bug 41246 - AIOOBE with missing notes entries
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1553760 13f79535-47bb-0310-9956-ffa450edef68
2013-12-27 23:42:34 +00:00
Andreas Beeker 3ef65e166d Bug 48593 - [PATCH] Multiple Saves Causes Slide Corruption
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1553610 13f79535-47bb-0310-9956-ffa450edef68
2013-12-27 00:22:19 +00:00
Andreas Beeker e34a1f9620 Bug 55579 - [PATCH] Patch for add/embed OLE objects into HSLF
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1553435 13f79535-47bb-0310-9956-ffa450edef68
2013-12-26 00:46:16 +00:00
Andreas Beeker 2788aca235 javadoc and compiler warning house-keeping
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1553428 13f79535-47bb-0310-9956-ffa450edef68
2013-12-25 23:24:04 +00:00
Dominik Stadler bc7b658ea9 Fix some JavaDoc items that are reported in the build-output
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1553404 13f79535-47bb-0310-9956-ffa450edef68
2013-12-25 18:05:41 +00:00
Yegor Kozlov fdda5f2071 removed pictureFileZero.ppt from svn as requested by the owner, see discussion on @poi-dev from Dec 12, 2013
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1551845 13f79535-47bb-0310-9956-ffa450edef68
2013-12-18 05:26:49 +00:00