Commit Graph

1192 Commits

Author SHA1 Message Date
Dominik Stadler
3f9c701688 Fix formatting of trailing comma in HexDumps, cover class fully with tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1612496 13f79535-47bb-0310-9956-ffa450edef68
2014-07-22 07:47:14 +00:00
Nick Burch
42cd819573 Update the formula evaluator to support XSSF style external named ranges too
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1612133 13f79535-47bb-0310-9956-ffa450edef68
2014-07-20 17:51:51 +00:00
Nick Burch
0986f32d46 Fix inconsistent indents
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1611947 13f79535-47bb-0310-9956-ffa450edef68
2014-07-19 19:11:54 +00:00
Nick Burch
c392b4fa72 The Event User Model fake-workbook for formula evaluations needs to know about the sheet names
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1611946 13f79535-47bb-0310-9956-ffa450edef68
2014-07-19 19:10:47 +00:00
Nick Burch
551573dd95 Bit more towards XSSF name support for #56737, will need some deeper changes though to fully implement
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1611830 13f79535-47bb-0310-9956-ffa450edef68
2014-07-18 22:50:54 +00:00
Nick Burch
d0db408a2f Leave part disabled for now
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1611755 13f79535-47bb-0310-9956-ffa450edef68
2014-07-18 18:30:54 +00:00
Nick Burch
4c362590d8 Start to support formula parsing of sheet-specified named ranges, required for a full fix to bug #56737
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1611753 13f79535-47bb-0310-9956-ffa450edef68
2014-07-18 18:30:16 +00:00
Nick Burch
3fd7c0d258 Update bug reference numbers, and bring over part of a test from unfixed that is now working (rest remains broken)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1611728 13f79535-47bb-0310-9956-ffa450edef68
2014-07-18 17:27:37 +00:00
Nick Burch
6e37f73018 Have WorkbookEvaluator process NameXPtgs, rather than returning a NameXEval which later places didn't handle. Largely allows us to process the .xls version of the test file for #56737 (but filenames aren't quite the same as in Excel)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1611711 13f79535-47bb-0310-9956-ffa450edef68
2014-07-18 16:58:38 +00:00
Nick Burch
d4a1239efa #56737 Sometimes Excel writes an internal reference to a local name in an odd way, without an ExternalNameRecord, try to detect and work around those
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1611681 13f79535-47bb-0310-9956-ffa450edef68
2014-07-18 15:59:55 +00:00
Nick Burch
c9d90732e5 Add disabled unit tests for bug #56737, which currently fails (differently) for HSSF and XSSF
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1611400 13f79535-47bb-0310-9956-ffa450edef68
2014-07-17 16:18:39 +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
Nick Burch
11a095bb3d HSSFCell should follow XSSF, and allow setting a null-style to return to the default style, fixes bug #56572
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1598258 13f79535-47bb-0310-9956-ffa450edef68
2014-05-29 11:39:50 +00:00
Dominik Stadler
f928ce1d34 Increase the font-inaccuracy for one unit test as some machines have fonts that lead to lower values, e.g. we get only 770 instead of 980 for Jenkins build on IBM JDK and on some local Windows machines
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1597873 13f79535-47bb-0310-9956-ffa450edef68
2014-05-27 20:45:25 +00:00
Dominik Stadler
8c6e7e06aa Fix for 56563 - Multithreading bug when reading 2 similar files
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1597637 13f79535-47bb-0310-9956-ffa450edef68
2014-05-26 20:03:08 +00:00
Nick Burch
834973efe0 If a NoteRecord has no author tag, it seems it can sometimes be double padded. Fixes #47251
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1597098 13f79535-47bb-0310-9956-ffa450edef68
2014-05-23 14:07:20 +00:00
Dominik Stadler
47ea1aa486 Bug 53691: Fix a copy/paste error in CFRuleRecord.clone()
also make CFRuleRecord.toString() print out more information which caused the bug to be much harder to find
Add unit tests to verify/reproduce this

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1596251 13f79535-47bb-0310-9956-ffa450edef68
2014-05-20 14:01:22 +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
Dominik Stadler
8e6c459d83 Bug 56325: fix Exception when removing sheets with named ranges in the workbook
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1595048 13f79535-47bb-0310-9956-ffa450edef68
2014-05-15 21:14:52 +00:00
Dominik Stadler
599489e6fa fix some Eclipse warnings, unnecessary null-check and missing close() in tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1594201 13f79535-47bb-0310-9956-ffa450edef68
2014-05-13 11:31:18 +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
337f775807 Bug 56269 - DateFormat - Rounding of fractionals
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1592419 13f79535-47bb-0310-9956-ffa450edef68
2014-05-04 21:17:18 +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
Dominik Stadler
4112a8441e File leak detector: Close streams in some tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1592315 13f79535-47bb-0310-9956-ffa450edef68
2014-05-04 08:05:32 +00:00
Nick Burch
ee0cddaf9a Excel 2007 and later allows for more than 3 Conditional Formatting rules per sheet, so change our hard limit to logging a compatibility warning. Test file from Pau Coma Ramirez from bug #56482
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1591959 13f79535-47bb-0310-9956-ffa450edef68
2014-05-02 15:49:23 +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
Andreas Beeker
5cd8324b89 junit4 fix
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1590327 13f79535-47bb-0310-9956-ffa450edef68
2014-04-26 23:37:40 +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
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
7f5f7d0440 Stream tests for NDocumentOutputStream
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1590303 13f79535-47bb-0310-9956-ffa450edef68
2014-04-26 21:33:19 +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
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
0250a0372f Complete NPOIFS write tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1590162 13f79535-47bb-0310-9956-ffa450edef68
2014-04-25 22:05:46 +00:00
Nick Burch
fb89f2c2aa More progress with the write/read npoifs tests, but one bug still to go....
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1590153 13f79535-47bb-0310-9956-ffa450edef68
2014-04-25 21:23:10 +00:00
Nick Burch
2c23f889df Refactor some of the NPOIFS write tests, and begin on the last missing write test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1590149 13f79535-47bb-0310-9956-ffa450edef68
2014-04-25 21:11:26 +00:00
Nick Burch
f6e7e1c8c7 Finish off the next NPOIFS write text
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1590133 13f79535-47bb-0310-9956-ffa450edef68
2014-04-25 20:38:55 +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
4540a3c0ab More npoifs write tests, some disabled as failing
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1589987 13f79535-47bb-0310-9956-ffa450edef68
2014-04-25 10:57:15 +00:00
Nick Burch
a4c8f4f1c9 Add common code for writing out and reading NPOIFS again, and add a disabled roundtrip test (currently failing...)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1589895 13f79535-47bb-0310-9956-ffa450edef68
2014-04-24 22:22:06 +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
950c10faf4 Add TODOs for the next set of NPOIFS write tests we need
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1589868 13f79535-47bb-0310-9956-ffa450edef68
2014-04-24 20:23:43 +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
166b8f6f8a Update a test to use the existing EntryUtils to copy with, rather than duplciating the logic, and tweak naming/javadocs to clarify what the test does
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1589802 13f79535-47bb-0310-9956-ffa450edef68
2014-04-24 17:32:47 +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
Nick Burch
e7dff43065 Fix bug #56450 - Avoid a NPE if a comment has no associated NoteRecord (but we still don't know where it belongs)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1589770 13f79535-47bb-0310-9956-ffa450edef68
2014-04-24 15:42:53 +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