]> source.dussan.org Git - poi.git/log
poi.git
3 years agoAdjust JavaDoc target to act similar as the one in the build.xml
Dominik Stadler [Tue, 6 Apr 2021 06:11:10 +0000 (06:11 +0000)]
Adjust JavaDoc target to act similar as the one in the build.xml

Set memory and set "lint:non" on Java 8 to not be stricter than the Ant-build

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1888420 13f79535-47bb-0310-9956-ffa450edef68

3 years agoAdjust some JavaDoc
Dominik Stadler [Tue, 6 Apr 2021 06:11:07 +0000 (06:11 +0000)]
Adjust some JavaDoc

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1888419 13f79535-47bb-0310-9956-ffa450edef68

3 years agoXSLX2CSV: Do not double-encode if the value is already having quotes and escape doubl...
Dominik Stadler [Tue, 6 Apr 2021 06:11:01 +0000 (06:11 +0000)]
XSLX2CSV: Do not double-encode if the value is already having quotes and escape double-quotes

Most CSV formats use "" (two quotes) to escape a "-character, we should do this in this
example as well to produce files that can be parsed by other CSV processors correctly.

Also cases where the value is already enclosed in quotes should not lead to additional quotes

Add a simple initial test to module "examples" verify basic functionality of XSLX2CSV
as I often rely on it for converting some very large xlsx-files to csv

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1888418 13f79535-47bb-0310-9956-ffa450edef68

3 years agoAlso look for test-data in ../test-data for Gradle build
Dominik Stadler [Tue, 6 Apr 2021 06:10:46 +0000 (06:10 +0000)]
Also look for test-data in ../test-data for Gradle build

This is needed when running tests in the IDE via the Gradle project import

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1888417 13f79535-47bb-0310-9956-ffa450edef68

3 years agoUpdate JUnit to 5.7.1 and junit-platform to 1.7.1
Dominik Stadler [Tue, 6 Apr 2021 06:10:33 +0000 (06:10 +0000)]
Update JUnit to 5.7.1 and junit-platform to 1.7.1

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1888416 13f79535-47bb-0310-9956-ffa450edef68

3 years agoApply some IDE suggestions, improve exception message, add some JavaDoc
Dominik Stadler [Tue, 6 Apr 2021 06:10:19 +0000 (06:10 +0000)]
Apply some IDE suggestions, improve exception message, add some JavaDoc

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1888415 13f79535-47bb-0310-9956-ffa450edef68

3 years agoIgnore new "build" and "out" directories
Dominik Stadler [Sun, 28 Mar 2021 19:55:00 +0000 (19:55 +0000)]
Ignore new "build" and "out" directories

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1888140 13f79535-47bb-0310-9956-ffa450edef68

3 years agoGradle: Add support for rat-check and initial target "jenkins"
Dominik Stadler [Sun, 28 Mar 2021 19:54:57 +0000 (19:54 +0000)]
Gradle: Add support for rat-check and initial target "jenkins"

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1888139 13f79535-47bb-0310-9956-ffa450edef68

3 years agoRemove support for japicmp from Gradle build
Dominik Stadler [Sun, 28 Mar 2021 19:54:54 +0000 (19:54 +0000)]
Remove support for japicmp from Gradle build

I now spent a few hours trying to make it work and the Gradle support is
simply not production-ready and also not maintained, it triggers various
strange errors and does not supporting the usual Gradle conventions.

So I do not want to spend more time on it, feel free to revive it if you know how
to make this work properly.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1888138 13f79535-47bb-0310-9956-ffa450edef68

3 years ago65206 - Migrate ant / maven to gradle build
Andreas Beeker [Sun, 28 Mar 2021 01:12:58 +0000 (01:12 +0000)]
65206 - Migrate ant / maven to gradle build
fix distsourcebuild

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1888121 13f79535-47bb-0310-9956-ffa450edef68

3 years ago65206 - Migrate ant / maven to gradle build
Andreas Beeker [Sat, 27 Mar 2021 23:16:45 +0000 (23:16 +0000)]
65206 - Migrate ant / maven to gradle build
try to fix Java 16 build

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1888119 13f79535-47bb-0310-9956-ffa450edef68

3 years ago65206 - Migrate ant / maven to gradle build
Andreas Beeker [Sat, 27 Mar 2021 14:03:16 +0000 (14:03 +0000)]
65206 - Migrate ant / maven to gradle build
update gradle files and project structure along https://github.com/centic9/poi/tree/gradle_build
remove eclipse IDE project files
remove obsolete record generator files

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1888111 13f79535-47bb-0310-9956-ffa450edef68

3 years agoremove temp gradle workaround for xmlbeans
PJ Fanning [Fri, 26 Mar 2021 08:22:00 +0000 (08:22 +0000)]
remove temp gradle workaround for xmlbeans

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1888079 13f79535-47bb-0310-9956-ffa450edef68

3 years ago[github-233] Updated de.rototor.pdfbox:graphics2d to 0.31. Thanks to Tobias Stadler...
PJ Fanning [Thu, 25 Mar 2021 09:21:04 +0000 (09:21 +0000)]
[github-233] Updated de.rototor.pdfbox:graphics2d to 0.31. Thanks to Tobias Stadler. This closes #233

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1888058 13f79535-47bb-0310-9956-ffa450edef68

3 years agoMake "normalizing" the file-path actually work
Dominik Stadler [Wed, 24 Mar 2021 16:07:33 +0000 (16:07 +0000)]
Make "normalizing" the file-path actually work

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1888021 13f79535-47bb-0310-9956-ffa450edef68

3 years agoDon't use a hardcoded temporary file (and also not a hardcoded /tmp directory)
Dominik Stadler [Wed, 24 Mar 2021 09:32:12 +0000 (09:32 +0000)]
Don't use a hardcoded temporary file (and also not a hardcoded /tmp directory)

This could cause issues in CI or when multiple different users run tests of POI on one machine!

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887998 13f79535-47bb-0310-9956-ffa450edef68

3 years agoMake new tests for IOUtils work on Windows as well
Dominik Stadler [Wed, 24 Mar 2021 09:30:34 +0000 (09:30 +0000)]
Make new tests for IOUtils work on Windows as well

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887997 13f79535-47bb-0310-9956-ffa450edef68

3 years agoadd more xsbs to the ooxml-lite jar by recursing through XWPF and XSSF documents
Andreas Beeker [Tue, 23 Mar 2021 23:58:47 +0000 (23:58 +0000)]
add more xsbs to the ooxml-lite jar by recursing through XWPF and XSSF documents

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887978 13f79535-47bb-0310-9956-ffa450edef68

3 years agoForbidden apis fix
Andreas Beeker [Sat, 20 Mar 2021 21:27:02 +0000 (21:27 +0000)]
Forbidden apis fix

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887880 13f79535-47bb-0310-9956-ffa450edef68

3 years agodispose cursor finally
Sayi [Sat, 20 Mar 2021 16:58:11 +0000 (16:58 +0000)]
dispose cursor finally

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887868 13f79535-47bb-0310-9956-ffa450edef68

3 years agoCreate, get, modify and remove comments, support operating paragraphs, pictures and...
Sayi [Sat, 20 Mar 2021 16:21:41 +0000 (16:21 +0000)]
Create, get, modify and remove comments, support operating paragraphs, pictures and tables in comments

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887867 13f79535-47bb-0310-9956-ffa450edef68

3 years agoadd jdk 1.16 job for xmlbeans
PJ Fanning [Sat, 20 Mar 2021 10:03:36 +0000 (10:03 +0000)]
add jdk 1.16 job for xmlbeans

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887845 13f79535-47bb-0310-9956-ffa450edef68

3 years agorevert accidental change
PJ Fanning [Fri, 19 Mar 2021 21:27:04 +0000 (21:27 +0000)]
revert accidental change

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887829 13f79535-47bb-0310-9956-ffa450edef68

3 years agotry to re-enable new getBlockAt code
PJ Fanning [Fri, 19 Mar 2021 21:26:30 +0000 (21:26 +0000)]
try to re-enable new getBlockAt code

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887828 13f79535-47bb-0310-9956-ffa450edef68

3 years agoadd disabled test for corrupt file
PJ Fanning [Fri, 19 Mar 2021 21:07:52 +0000 (21:07 +0000)]
add disabled test for corrupt file

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887827 13f79535-47bb-0310-9956-ffa450edef68

3 years agoAllow negative numbers in conditional part of format string
Dominik Stadler [Fri, 19 Mar 2021 09:40:10 +0000 (09:40 +0000)]
Allow negative numbers in conditional part of format string

Closes #229

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887802 13f79535-47bb-0310-9956-ffa450edef68

3 years agoEnhance javadoc and coverage for IOUtils
Dominik Stadler [Fri, 19 Mar 2021 09:40:05 +0000 (09:40 +0000)]
Enhance javadoc and coverage for IOUtils

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887801 13f79535-47bb-0310-9956-ffa450edef68

3 years ago#65192 - Allow change of EncryptionMode
Andreas Beeker [Wed, 17 Mar 2021 22:51:58 +0000 (22:51 +0000)]
#65192 - Allow change of EncryptionMode

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887764 13f79535-47bb-0310-9956-ffa450edef68

3 years agoRevert erroneously modified logging statement
Marius Volkhart [Tue, 16 Mar 2021 11:37:56 +0000 (11:37 +0000)]
Revert erroneously modified logging statement

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887717 13f79535-47bb-0310-9956-ffa450edef68

3 years agoadd back some new code
PJ Fanning [Mon, 15 Mar 2021 20:24:22 +0000 (20:24 +0000)]
add back some new code

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887685 13f79535-47bb-0310-9956-ffa450edef68

3 years agorevert recent changes
PJ Fanning [Mon, 15 Mar 2021 18:21:37 +0000 (18:21 +0000)]
revert recent changes

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887682 13f79535-47bb-0310-9956-ffa450edef68

3 years agoRun the TestAllFiles tests as part of Gradle
Marius Volkhart [Mon, 15 Mar 2021 17:52:40 +0000 (17:52 +0000)]
Run the TestAllFiles tests as part of Gradle

I accidentally excluded these in r1887643. They should not be excluded.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887681 13f79535-47bb-0310-9956-ffa450edef68

3 years ago[bug-65184] revert due to integration test failures
PJ Fanning [Sun, 14 Mar 2021 23:54:49 +0000 (23:54 +0000)]
[bug-65184] revert due to integration test failures

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887660 13f79535-47bb-0310-9956-ffa450edef68

3 years agoTry to fix sonar build
Andreas Beeker [Sun, 14 Mar 2021 23:49:43 +0000 (23:49 +0000)]
Try to fix sonar build

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887659 13f79535-47bb-0310-9956-ffa450edef68

3 years agoreformat file
PJ Fanning [Sun, 14 Mar 2021 23:29:34 +0000 (23:29 +0000)]
reformat file

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887658 13f79535-47bb-0310-9956-ffa450edef68

3 years ago[bug-65184] Improve performance of POFSMiniStore getBlockAt. Thanks to sits
PJ Fanning [Sun, 14 Mar 2021 23:21:18 +0000 (23:21 +0000)]
[bug-65184] Improve performance of POFSMiniStore getBlockAt. Thanks to sits

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887657 13f79535-47bb-0310-9956-ffa450edef68

3 years agoImplement CONCAT function #65185
Nick Burch [Sun, 14 Mar 2021 22:53:27 +0000 (22:53 +0000)]
Implement CONCAT function #65185

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887656 13f79535-47bb-0310-9956-ffa450edef68

3 years agoChange Gradle to use java-library plugin
Marius Volkhart [Sun, 14 Mar 2021 20:43:43 +0000 (20:43 +0000)]
Change Gradle to use java-library plugin

This plugin is specifically built for libraries. The major difference to the regular java plugin is that is allows defining dependencies as part of the api or implementation. Both are used by the project at compile/runtime, but only api dependencies are made available to dependent projects.

In our current setup, this doesn't matter much. We deploy to maven central using pre-built POMs. It's more of a future-proofing, and it makes it a little bit clearer which gradle projects actually require which dependencies.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887650 13f79535-47bb-0310-9956-ffa450edef68

3 years agoxmlbeans 5.0.0 release
PJ Fanning [Sun, 14 Mar 2021 19:47:22 +0000 (19:47 +0000)]
xmlbeans 5.0.0 release

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887648 13f79535-47bb-0310-9956-ffa450edef68

3 years agoExclude batik-script dependency from OOXML artifact
Marius Volkhart [Sun, 14 Mar 2021 18:56:30 +0000 (18:56 +0000)]
Exclude batik-script dependency from OOXML artifact

We do not make use of the batik-script dependency. While this is likely to be true of a variety of the Batik dependencies, batik-script causes problems for our users who are using JPMS. See [bug-65103].

Fixes #230

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887643 13f79535-47bb-0310-9956-ffa450edef68

3 years agoSpecify more granular Batik dependencies
Marius Volkhart [Sun, 14 Mar 2021 18:51:12 +0000 (18:51 +0000)]
Specify more granular Batik dependencies

Batik-all is a strange artifact. It's POM declares dependencies on all the sub-JARs, but its JAR has all of the sub-jars repackaged. This results in multiple JARs with the same packages being added to consuming applications. This leads to problems for JPMS users. See [bug-65183].

The Ant build does not use batik-all, so the Maven and Gradle builds should not either.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887642 13f79535-47bb-0310-9956-ffa450edef68

3 years agoDisable parallel tests on Gradle again
Marius Volkhart [Sun, 14 Mar 2021 11:31:18 +0000 (11:31 +0000)]
Disable parallel tests on Gradle again

Something is causing parallel tests to fail on CI. I haven't been able to track down what it is. The symptoms look similar to others where the cause was a test modifying the test-data directory.

The integration tests also sometimes run into OutOfMemoryErrors when I run them in parallel.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887631 13f79535-47bb-0310-9956-ffa450edef68

3 years agoLimit which tests can run in parallel
Marius Volkhart [Sun, 14 Mar 2021 10:42:15 +0000 (10:42 +0000)]
Limit which tests can run in parallel

Some tests modify global resources. Those tests cannot be run in parallel with others, as they cause problems or become flaky. Where possible, indicate to JUnit the resources in contention. Otherwise, mark the tests as needing to run in isolation.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887630 13f79535-47bb-0310-9956-ffa450edef68

3 years agoGet Gradle GitHub Action past downloading the XMLBeans JAR
Marius Volkhart [Sun, 14 Mar 2021 01:46:05 +0000 (01:46 +0000)]
Get Gradle GitHub Action past downloading the XMLBeans JAR

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887614 13f79535-47bb-0310-9956-ffa450edef68

3 years ago[bug-65184] Improve performance of POFSMiniStore getBlockAt. Thanks to sits
PJ Fanning [Sat, 13 Mar 2021 18:09:13 +0000 (18:09 +0000)]
[bug-65184] Improve performance of POFSMiniStore getBlockAt. Thanks to sits

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887604 13f79535-47bb-0310-9956-ffa450edef68

3 years agoupdate key
PJ Fanning [Thu, 11 Mar 2021 21:39:48 +0000 (21:39 +0000)]
update key

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887516 13f79535-47bb-0310-9956-ffa450edef68

3 years agoStreamline HPSF CustomProperties collection retrieval
Marius Volkhart [Wed, 10 Mar 2021 21:42:19 +0000 (21:42 +0000)]
Streamline HPSF CustomProperties collection retrieval

Reduce the number of map lookups necessary to compute the return values for methods that return collections of property details. Since we maintain parity between the `props` and `dictionary` contents, when retrieving property details, we can reference the `props` directly and avoid the `dictionary` indirection.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887453 13f79535-47bb-0310-9956-ffa450edef68

3 years agoupdate key for kiwiwings - downrating sha1 - see https://infra.apache.org/release...
Andreas Beeker [Tue, 9 Mar 2021 22:04:11 +0000 (22:04 +0000)]
update key for kiwiwings - downrating sha1 - see https://infra.apache.org/release-signing.html

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887398 13f79535-47bb-0310-9956-ffa450edef68

3 years agoParse PPDrawing more deterministically
Marius Volkhart [Tue, 9 Mar 2021 20:59:24 +0000 (20:59 +0000)]
Parse PPDrawing more deterministically

The [MS-PPT] spec is very clear about what the format of the PPDrawing record must be, and parsing deterministically makes for clearer code.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887396 13f79535-47bb-0310-9956-ffa450edef68

3 years agoAdditional debug logging for unknown records in HSLF
Marius Volkhart [Tue, 9 Mar 2021 19:26:31 +0000 (19:26 +0000)]
Additional debug logging for unknown records in HSLF

Recently, while debugging app behavior on HSLF documents, I had to dig into the OOXML that Microsoft PowerPoint places into files saved in PPT format. Having information in the logs about when records were not parsed by POI was very helpful. The hex identifier was critical in being able to quickly search the [MS-PPT] spec for what type of record it was, and the integer identifier was helpful in quickly finding the Record type in RecordTypes.java.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887393 13f79535-47bb-0310-9956-ffa450edef68

3 years agoCleanup documentation of EscherChildAnchorRecord and EscherClientAnchorRecord
Marius Volkhart [Tue, 9 Mar 2021 18:28:59 +0000 (18:28 +0000)]
Cleanup documentation of EscherChildAnchorRecord and EscherClientAnchorRecord

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887391 13f79535-47bb-0310-9956-ffa450edef68

3 years agotry to fix windows path issues in exception messages
Andreas Beeker [Mon, 8 Mar 2021 23:14:11 +0000 (23:14 +0000)]
try to fix windows path issues in exception messages

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887346 13f79535-47bb-0310-9956-ffa450edef68

3 years agoraise XmlBeans to 5.0.0 (nightly) also in the gradle build
Andreas Beeker [Mon, 8 Mar 2021 22:36:08 +0000 (22:36 +0000)]
raise XmlBeans to 5.0.0 (nightly) also in the gradle build

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887345 13f79535-47bb-0310-9956-ffa450edef68

3 years agoremove old batik jar
Andreas Beeker [Mon, 8 Mar 2021 22:29:26 +0000 (22:29 +0000)]
remove old batik jar

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887344 13f79535-47bb-0310-9956-ffa450edef68

3 years agoUse XmlBeans 5 nightly
Andreas Beeker [Mon, 8 Mar 2021 00:35:10 +0000 (00:35 +0000)]
Use XmlBeans 5 nightly

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887309 13f79535-47bb-0310-9956-ffa450edef68

3 years agoadd DeferredGeneration sample
PJ Fanning [Sat, 6 Mar 2021 09:10:58 +0000 (09:10 +0000)]
add DeferredGeneration sample

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887250 13f79535-47bb-0310-9956-ffa450edef68

3 years agoconvert tabs to spaces
PJ Fanning [Sat, 6 Mar 2021 01:51:17 +0000 (01:51 +0000)]
convert tabs to spaces

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887239 13f79535-47bb-0310-9956-ffa450edef68

3 years agoadd DeferredGeneration sample
PJ Fanning [Sat, 6 Mar 2021 01:48:57 +0000 (01:48 +0000)]
add DeferredGeneration sample

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887238 13f79535-47bb-0310-9956-ffa450edef68

3 years agoRemove unnecessary array conversion in HWPF FSPATable
Marius Volkhart [Mon, 1 Mar 2021 19:06:28 +0000 (19:06 +0000)]
Remove unnecessary array conversion in HWPF FSPATable

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887044 13f79535-47bb-0310-9956-ffa450edef68

3 years agoRemove deprecated HWPF FSPA methods
Marius Volkhart [Mon, 1 Mar 2021 18:46:35 +0000 (18:46 +0000)]
Remove deprecated HWPF FSPA methods

These methods have been @Deprecated for years, and are part of @Internal structures.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887039 13f79535-47bb-0310-9956-ffa450edef68

3 years agoImprove performance of HSLFPictureData#write
Marius Volkhart [Mon, 1 Mar 2021 00:37:11 +0000 (00:37 +0000)]
Improve performance of HSLFPictureData#write

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887022 13f79535-47bb-0310-9956-ffa450edef68

3 years agoDeprecate functions that duplicate functionality
Marius Volkhart [Mon, 1 Mar 2021 00:25:23 +0000 (00:25 +0000)]
Deprecate functions that duplicate functionality

DrawingGroupRecord#processChildRecords and AbstractEscherHolderRecord#convertRawBytesToEscherRecords duplicate the functionality of AbstractEscherHolderRecord#decode. This makes the code harder to follow, as it is not clear when certain access patterns repeat. Accordingly, these functions are deprecated and flagged for removal.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887021 13f79535-47bb-0310-9956-ffa450edef68

3 years agoReview EscherContainerRecord#getChildRecords() call sites for unnecessary work
Marius Volkhart [Mon, 1 Mar 2021 00:04:51 +0000 (00:04 +0000)]
Review EscherContainerRecord#getChildRecords() call sites for unnecessary work

This started off as wanting to add the EscherContainerRecord#getChildCount() function in order to do an efficient check for how many children the container has. This was desirable in new code for editing HSSF pictures. The existing option of calling getChildRecords().size() was undesirable as this requires a list copy first.

In the process of finding call sites that would benefit from replacing getChildRecords().size(), I realized that several other patterns would benefit from eliminating a copy, such as iterating over the children in a for-each loop, and indexed access to specific children.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887020 13f79535-47bb-0310-9956-ffa450edef68

3 years agoAdd the ability to edit HSLFPictureData contents
Marius Volkhart [Sun, 28 Feb 2021 23:16:14 +0000 (23:16 +0000)]
Add the ability to edit HSLFPictureData contents

Pictures can now be edited by calling HSLFPictureData#setData(byte[]). The byte[] should contain the image data as an image viewer might read it.

To enable this functionality, a tighter coupling between the EscherBSERecords of the slideshow and the HSLFPictureData was required. This ensures that changes in image data size are accurately recorded in the records.

In the course of coupling the records and the HSLFPictureData, various scenarios arose where a mapping of records to pictures was non-trivial. Accordingly, the HSLFSlideShowImpl#matchPicturesAndRecords(...) function was added to perform a more sophisticated matching pass. This function is heavily exercised by org.apache.poi.hslf.usermodel.TestBugs.testFile[5] and PPTX2PNG.render[2], as well as the new TestPictures#testSlideshowWithIncorrectOffsets().

Closes #225

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887017 13f79535-47bb-0310-9956-ffa450edef68

3 years agoMake picture loading in HWPF PicturesTable easier to understand
Marius Volkhart [Sun, 28 Feb 2021 21:06:05 +0000 (21:06 +0000)]
Make picture loading in HWPF PicturesTable easier to understand

The recursion is no longer necessary due to the more defined structure of OfficeArtContent.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887016 13f79535-47bb-0310-9956-ffa450edef68

3 years agoAdd documentation to PICFAndOfficeArtData
Marius Volkhart [Sun, 28 Feb 2021 20:44:39 +0000 (20:44 +0000)]
Add documentation to PICFAndOfficeArtData

Adjust call sites based on defined behavior.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887015 13f79535-47bb-0310-9956-ffa450edef68

3 years agochange gradle build to get unreleased xmlbeans jar from ci-builds (like ant build...
PJ Fanning [Sun, 28 Feb 2021 19:48:22 +0000 (19:48 +0000)]
change gradle build to get unreleased xmlbeans jar from ci-builds (like ant build does)

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887012 13f79535-47bb-0310-9956-ffa450edef68

3 years agoSimplify OfficeArtContent#getBStoreContainer method
Marius Volkhart [Sun, 28 Feb 2021 19:40:23 +0000 (19:40 +0000)]
Simplify OfficeArtContent#getBStoreContainer method

Due to the new structure of the class, we can be more specific about how we load the BStore.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887011 13f79535-47bb-0310-9956-ffa450edef68

3 years agochange gradle build to get unreleased xmlbeans jar from ci-builds (like ant build...
PJ Fanning [Sun, 28 Feb 2021 19:28:39 +0000 (19:28 +0000)]
change gradle build to get unreleased xmlbeans jar from ci-builds (like ant build does)

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887010 13f79535-47bb-0310-9956-ffa450edef68

3 years agoRename EscherRecordHolder to OfficeArtContent
Marius Volkhart [Sun, 28 Feb 2021 19:18:13 +0000 (19:18 +0000)]
Rename EscherRecordHolder to OfficeArtContent

While the class does indeed hold EscherRecords, due to recent refactoring it is much more structured now than it was before. The contents of the class now closely resemble the OfficeArtContent structure referenced in the MS-DOC spec. Naming the class after the specification structure makes it easier to find and understand.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887009 13f79535-47bb-0310-9956-ffa450edef68

3 years agoRework EscherRecordHolder parsing
Marius Volkhart [Sun, 28 Feb 2021 18:49:42 +0000 (18:49 +0000)]
Rework EscherRecordHolder parsing

Modify the parsing done by EscherRecordHolder to be more deterministic. The format of the OfficeArtContent structure, which the EscherRecordHolder represents, is well defined in the MS-DOC spec. A clear class structure makes it easier to reason about the availability of data.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887008 13f79535-47bb-0310-9956-ffa450edef68

3 years agoAdd documentation to EscherRecordTypes#DG_CONTAINER
Marius Volkhart [Sun, 28 Feb 2021 18:39:51 +0000 (18:39 +0000)]
Add documentation to EscherRecordTypes#DG_CONTAINER

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887007 13f79535-47bb-0310-9956-ffa450edef68

3 years agoSimplify initialization of HWPF EscherRecordHolder
Marius Volkhart [Sun, 28 Feb 2021 16:47:43 +0000 (16:47 +0000)]
Simplify initialization of HWPF EscherRecordHolder

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1886999 13f79535-47bb-0310-9956-ffa450edef68

3 years agoAdd documentation for HWPF FileInformationBlock DggInfo methods
Marius Volkhart [Sun, 28 Feb 2021 15:08:39 +0000 (15:08 +0000)]
Add documentation for HWPF FileInformationBlock DggInfo methods

This documentation comes from [MS-DOC] - v20191119.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1886998 13f79535-47bb-0310-9956-ffa450edef68

3 years agoRevert "Replace magic constant with reference" changes
Marius Volkhart [Sat, 27 Feb 2021 19:08:49 +0000 (19:08 +0000)]
Revert "Replace magic constant with reference" changes

Reverts r1886986, r1886987 and r1886988. Incorrect conversion between int and shorts led to incorrect logic.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1886989 13f79535-47bb-0310-9956-ffa450edef68

3 years agoReplace magic constant use of Escher Blip End type ID with reference
Marius Volkhart [Sat, 27 Feb 2021 18:33:56 +0000 (18:33 +0000)]
Replace magic constant use of Escher Blip End type ID with reference

Instead of referring to the magic constant 0xF117, reference the value in the EscherRecordTypes enum.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1886988 13f79535-47bb-0310-9956-ffa450edef68

3 years agoReplace magic constant use of Escher Blip Start type ID with reference
Marius Volkhart [Sat, 27 Feb 2021 18:26:36 +0000 (18:26 +0000)]
Replace magic constant use of Escher Blip Start type ID with reference

Instead of referring to the magic constant 0xF018, reference the value in the EscherRecordTypes enum.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1886987 13f79535-47bb-0310-9956-ffa450edef68

3 years agoReplace magic constant use of EscherBSERecord type ID with reference
Marius Volkhart [Sat, 27 Feb 2021 18:22:33 +0000 (18:22 +0000)]
Replace magic constant use of EscherBSERecord type ID with reference

Instead of referring to the magic constant 0xF007, reference the value in the EscherRecordTypes enum.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1886986 13f79535-47bb-0310-9956-ffa450edef68

3 years agoadd missing license
PJ Fanning [Sat, 27 Feb 2021 01:29:21 +0000 (01:29 +0000)]
add missing license

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1886965 13f79535-47bb-0310-9956-ffa450edef68

3 years agoFix bug with record indexes for HSSF Workbooks
Marius Volkhart [Sat, 27 Feb 2021 00:43:56 +0000 (00:43 +0000)]
Fix bug with record indexes for HSSF Workbooks

We have encountered workbooks that do not have a TabIdRecord (see 55982.xls). However, the WorkbookRecordList#updateRecordPos() method would still increment the position of the TabIdRecord for such workbooks. Changing the default position of the record from 0 to -1 indicates that the record position has now been set.

This bug was discovered while adding support for editing pictures in HSSF documents.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1886963 13f79535-47bb-0310-9956-ffa450edef68

3 years agoEnable running more integration tests from Gradle.
Marius Volkhart [Fri, 26 Feb 2021 22:14:17 +0000 (22:14 +0000)]
Enable running more integration tests from Gradle.

This is particularly relevant for developers who import the Gradle project into their IDE and run tests using the Gradle test runner. Those developers were previously unable to debug integration tests.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1886962 13f79535-47bb-0310-9956-ffa450edef68

3 years agoRemove the integrationTest task from the Gradle integrationtest project
Marius Volkhart [Fri, 26 Feb 2021 22:07:14 +0000 (22:07 +0000)]
Remove the integrationTest task from the Gradle integrationtest project

This task adds no additional configuration over the regular test task.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1886961 13f79535-47bb-0310-9956-ffa450edef68

3 years agoRemove the test exclusion for RecordStresser and RecordsStresser from Gradle integrat...
Marius Volkhart [Fri, 26 Feb 2021 22:05:16 +0000 (22:05 +0000)]
Remove the test exclusion for RecordStresser and RecordsStresser from Gradle integration tests

These classes don't exist.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1886960 13f79535-47bb-0310-9956-ffa450edef68

3 years agoEnable parallel tests from Gradle
Marius Volkhart [Fri, 26 Feb 2021 21:15:12 +0000 (21:15 +0000)]
Enable parallel tests from Gradle

Parallel tests are already enabled from Ant. This does the same for Gradle users.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1886959 13f79535-47bb-0310-9956-ffa450edef68

3 years agoxmlsec version
PJ Fanning [Wed, 24 Feb 2021 21:42:01 +0000 (21:42 +0000)]
xmlsec version

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1886893 13f79535-47bb-0310-9956-ffa450edef68

3 years agomissing ooxml-schemas-lite classes
PJ Fanning [Wed, 24 Feb 2021 21:26:33 +0000 (21:26 +0000)]
missing ooxml-schemas-lite classes

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1886892 13f79535-47bb-0310-9956-ffa450edef68

3 years agoinclude batik in poi-bin artifact
Andreas Beeker [Tue, 23 Feb 2021 22:29:51 +0000 (22:29 +0000)]
include batik in poi-bin artifact

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1886863 13f79535-47bb-0310-9956-ffa450edef68

3 years agoadd batik to forbidden-apis-check classpath
Andreas Beeker [Tue, 23 Feb 2021 21:59:56 +0000 (21:59 +0000)]
add batik to forbidden-apis-check classpath

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1886862 13f79535-47bb-0310-9956-ffa450edef68

3 years ago[bug-63046] Fix Java 16 build
Marius Volkhart [Mon, 22 Feb 2021 18:27:14 +0000 (18:27 +0000)]
[bug-63046] Fix Java 16 build

org.apache.santuario:xmlsec:2.2.0 has a dependency on SLF4J. We use this in SignatureInfo.java.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1886811 13f79535-47bb-0310-9956-ffa450edef68

3 years agoUse upcoming XmlBeans 5.0.0 (working version 4.0.1)
Andreas Beeker [Mon, 22 Feb 2021 00:18:37 +0000 (00:18 +0000)]
Use upcoming XmlBeans 5.0.0 (working version 4.0.1)
Make batik optional as it doesn't work on the module-path
Use sub-components of batik as batik-all references them all again resulting in duplicated entries (maven poms haven't been migrated yet ...)
Remove SLF4j dependency

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1886777 13f79535-47bb-0310-9956-ffa450edef68

3 years ago[bug-63046] Use Log4j 2 for logging
Marius Volkhart [Sun, 21 Feb 2021 20:57:25 +0000 (20:57 +0000)]
[bug-63046] Use Log4j 2 for logging

This removes the POILogger and POILogFactory mechanism for logging. This mechanism was created at a time when the Java landscape looked very different than it does today.

Log4j 2 is an Apache Foundation project that is well maintained and is widely regarded as having good performance and capabilities. We use only the Log4j API artifact. This lets application developers choose how they want to capture logging events if at all. Integrations with Log4j 2 Core and Logback are available from the Log4j project.

Closes #224

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1886770 13f79535-47bb-0310-9956-ffa450edef68

3 years agoUse UTF-8 when writing SVG files
Andreas Beeker [Sun, 21 Feb 2021 18:52:23 +0000 (18:52 +0000)]
Use UTF-8 when writing SVG files

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1886768 13f79535-47bb-0310-9956-ffa450edef68

3 years agotry re-eanbling xml entity config
PJ Fanning [Sun, 21 Feb 2021 18:31:49 +0000 (18:31 +0000)]
try re-eanbling xml entity config

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1886766 13f79535-47bb-0310-9956-ffa450edef68

3 years agoFinanceLib: Simplify code and add a few more tests
Dominik Stadler [Thu, 18 Feb 2021 10:00:13 +0000 (10:00 +0000)]
FinanceLib: Simplify code and add a few more tests

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1886658 13f79535-47bb-0310-9956-ffa450edef68

3 years agoManipulate individual data point properties
Alain Béarez [Wed, 17 Feb 2021 22:05:18 +0000 (22:05 +0000)]
Manipulate individual data point properties

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1886642 13f79535-47bb-0310-9956-ffa450edef68

3 years agoCode cleanup AbstractEscherHolderRecord
Marius Volkhart [Wed, 17 Feb 2021 15:41:22 +0000 (15:41 +0000)]
Code cleanup AbstractEscherHolderRecord

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1886623 13f79535-47bb-0310-9956-ffa450edef68

3 years agoDocumentation for some EscherRecordTypes
Marius Volkhart [Wed, 17 Feb 2021 15:10:17 +0000 (15:10 +0000)]
Documentation for some EscherRecordTypes

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1886620 13f79535-47bb-0310-9956-ffa450edef68

3 years agoAdd documentation for DrawingGroupRecord
Marius Volkhart [Wed, 17 Feb 2021 14:48:30 +0000 (14:48 +0000)]
Add documentation for DrawingGroupRecord

Documentation adapted from [MS-XLS].pdf v20190618.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1886619 13f79535-47bb-0310-9956-ffa450edef68

3 years ago[bug-63902] reference cloned sheet in cloned chart data series
Alain Béarez [Tue, 16 Feb 2021 23:39:19 +0000 (23:39 +0000)]
[bug-63902] reference cloned sheet in cloned chart data series

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1886605 13f79535-47bb-0310-9956-ffa450edef68

3 years agoallow subclassing of code to gen comments table
PJ Fanning [Mon, 15 Feb 2021 21:48:26 +0000 (21:48 +0000)]
allow subclassing of code to gen comments table

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1886547 13f79535-47bb-0310-9956-ffa450edef68