Compare commits

...

1011 Commits

Author SHA1 Message Date
PJ Fanning
cfb713df29 use javadocs.dev 2026-02-22 23:53:35 +01:00
Dominik Stadler
44598bd030 Avoid OOM with incorrect property sizes
Add allocation check to verify size >= 0 and < 1mio
Also reformat code to match general coding style

Fixes https://issues.oss-fuzz.com/issues/485091380
2026-02-21 15:39:55 +01:00
Dominik Stadler
23369586da Avoid assertion when handling slightly corrupted emf-file
Also remove methods which are identical to the ones in the super-class

Fixes https://issues.oss-fuzz.com/issues/486039135
2026-02-21 15:39:54 +01:00
Dominik Stadler
9d9865c9b8 Avoid NPE when handling diagrams in pptx
Fixes https://issues.oss-fuzz.com/issues/484589690
2026-02-21 15:39:54 +01:00
Dominik Stadler
e9e9612a1f Avoid ClassCastException when reading headers of EMF files 2026-02-21 15:39:54 +01:00
Dominik Stadler
1594baf696 Avoid NPE when updating cell-anchors 2026-02-21 15:39:54 +01:00
Dominik Stadler
839ce4a0f4 Avoid NPE in HSSFShapeGroup.setShapeId() 2026-02-21 15:39:54 +01:00
Dominik Stadler
260b22fb09 Handle slightly broken file with empty BlipFill properly 2026-02-21 15:39:54 +01:00
PJ Fanning
ac4e3c199e more HSSFEventFactory changes 2026-02-20 20:19:10 +01:00
PJ Fanning
a1f6f2786f Update RecordFactoryInputStream.java 2026-02-20 19:55:49 +01:00
PJ Fanning
b923655b43 update tests 2026-02-20 19:48:56 +01:00
PJ Fanning
6b72a2dff3 Update DocumentInputStream.java 2026-02-20 19:46:56 +01:00
PJ Fanning
c7976440c3 Update TestRecordFactoryInputStream.java 2026-02-20 15:10:26 +01:00
PJ Fanning
811eb4a4a8
support reading HSSFWorkbook with password passed as param (#1016)
* support reading HSSFWorkbook with password passed as param

Update HSSFWorkbook.java

* npe issue

* remove one use of Biff8EncryptionKey

* extractor api

* support changing passwords
2026-02-20 15:06:33 +01:00
PJ Fanning
6ba4a1b050 Update TestDocumentEncryption.java 2026-02-20 14:52:28 +01:00
PJ Fanning
4efa2b7162 Update OldExcelExtractor.java 2026-02-20 13:47:36 +01:00
PJ Fanning
139321c5e9 Update HSSFWorkbook.java 2026-02-20 12:28:29 +01:00
PJ Fanning
6a9224385e deprecate unnecessary constructor 2026-02-20 12:25:18 +01:00
PJ Fanning
df5604a1d7
check input stream read params (#1012) 2026-02-17 09:20:28 +01:00
PJ Fanning
eafd6c04b8 Update security.xml 2026-02-16 19:59:54 +01:00
dependabot[bot]
e340f313bc
Bump net.bytebuddy:byte-buddy-agent from 1.18.4 to 1.18.5 (#1009)
Bumps [net.bytebuddy:byte-buddy-agent](https://github.com/raphw/byte-buddy) from 1.18.4 to 1.18.5.
- [Release notes](https://github.com/raphw/byte-buddy/releases)
- [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md)
- [Commits](https://github.com/raphw/byte-buddy/compare/byte-buddy-1.18.4...byte-buddy-1.18.5)

---
updated-dependencies:
- dependency-name: net.bytebuddy:byte-buddy-agent
  dependency-version: 1.18.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-16 16:33:31 +01:00
Dominik Stadler
bc02ef0703 Avoid NPE with malformed wmf headers 2026-02-14 21:26:00 +01:00
Dominik Stadler
692caf0f36 Avoid NPE with malformed master-style 2026-02-14 21:26:00 +01:00
Dominik Stadler
e96c9e17c0 Avoid NPE with malformed EscherAggregate 2026-02-14 21:26:00 +01:00
Dominik Stadler
55c1608a2d Avoid NPE with malformed anchors in slideshow files 2026-02-14 21:26:00 +01:00
Dominik Stadler
5338b17a8f Avoid NPE with malformed Visio diagram
Fixes https://issues.oss-fuzz.com/issues/477312394
2026-02-14 21:26:00 +01:00
Dominik Stadler
c92c533d7a Prevent large allocations when writing PPDrawing items
Add an allocation check which can be disabled if necessary.

Fixes https://issues.oss-fuzz.com/issues/477289649 and https://issues.oss-fuzz.com/issues/479564936
2026-02-14 21:26:00 +01:00
Yongho Hwang
8d53613bcf
Bug 69935: Add short-based column setters to ClientAnchor (#1006)
* Bug 69935: Add short-based column setters to ClientAnchor

Introduce short-based column setters on ClientAnchor to complement the existing int-based setters and improve Kotlin property support.

- Add default short setters setCol1(short) and setCol2(short) that delegate to the existing int-based setters.
- Add TestClientAnchorShortSetter to verify both the new short-based setters and the existing int-based setters.

Tests:
- ./gradlew :poi:test --tests 'org.apache.poi.ss.usermodel.TestClientAnchorShortSetter'

* Replace @since TBD with 6.0.0

* Add license header to TestClieAdd ASF license header to TestClientAnchorShortSetterntAnchorShortSetter.java

Added license header to TestClientAnchorShortSetter.java
2026-02-14 09:50:52 +01:00
Dominik Stadler
62ae400993 Do not call getColumn() twice
It always iterates over the array of columns, so we
should reuse the result here.
2026-02-02 18:15:11 +01:00
Dominik Stadler
ae3ed57baa Prevent a file-handle leak
File-handles could leak when an exception occurs during
class initialization when loading an broken workbook-file
2026-02-02 18:15:10 +01:00
dependabot[bot]
8f149f51d0
Bump commons-codec:commons-codec from 1.20.0 to 1.21.0 (#1004)
Bumps [commons-codec:commons-codec](https://github.com/apache/commons-codec) from 1.20.0 to 1.21.0.
- [Changelog](https://github.com/apache/commons-codec/blob/master/RELEASE-NOTES.txt)
- [Commits](https://github.com/apache/commons-codec/compare/rel/commons-codec-1.20.0...rel/commons-codec-1.21.0)

---
updated-dependencies:
- dependency-name: commons-codec:commons-codec
  dependency-version: 1.21.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-30 18:10:06 +01:00
Dominik Stadler
ab196a7441 Use log instead of assert when parsing emf-files
Assert effectively hides problem in provided input files.
2026-01-24 14:47:30 +01:00
Dominik Stadler
da3d64d9e3 Add an NPE check when retrieving fonts for bullet-items 2026-01-24 14:47:30 +01:00
Dominik Stadler
04f4c1fa74 Avoid NPE when retrieving sheets by name with invalid name 2026-01-24 14:47:30 +01:00
Dominik Stadler
513a805c25 Describe where to get the latest spotbugs 2026-01-24 14:47:26 +01:00
Dominik Stadler
0ae15edb2c Perform an allocation-check for .emf files 2026-01-24 14:45:16 +01:00
Dominik Stadler
5eba199642 Fix tests for no-scratchpad 2026-01-18 20:53:44 +01:00
Dominik Stadler
0de8ecd6a0 Recent tests add one more file to ooxml-lite 2026-01-18 20:53:44 +01:00
Dominik Stadler
d1f3f9489f Add check for too large allocation in SharedFormulaGroup
A malformed spreadsheet could trigger a very large allocation.

Can be overruled by users via IOUtils.setByteArrayMaxOverride().

Fixes https://issues.oss-fuzz.com/issues/476431391
2026-01-18 18:28:36 +01:00
Dominik Stadler
d1f0a88ea1 Avoid NPE in XSLFDiagram
Throw IllegalStateException instead

Fixes https://issues.oss-fuzz.com/issues/476184825
2026-01-18 18:28:36 +01:00
Dominik Stadler
beab88fb0e Remove obsolete if-condition
All branches perform the same action now anyway
2026-01-18 18:28:36 +01:00
Dominik Stadler
66109187d1 Only allocate the required size for EscherComplexProperty
Otherwise a malformed document can cause OOM by reserving
large chunks of memory, but only using little of it.

This fixes https://issues.oss-fuzz.com/issues/476184826
2026-01-18 18:28:36 +01:00
Dominik Stadler
c9b37678cc Introduce getComplexSize()
To not materialize the array only to get its size
2026-01-18 18:28:35 +01:00
Dominik Stadler
e54ba888e2 Log instead of an assertion
Issues which can be triggered by malformed documents
should not use "assert"
2026-01-18 18:27:05 +01:00
Dominik Stadler
8df367310c Avoid some more NPEs on slightly broken documents 2026-01-18 18:27:05 +01:00
PJ Fanning
58ac8d05f0
throw exception if getAlpha returns very large value (that is too big for int) (#1000) 2026-01-17 15:09:06 +01:00
Jacobo Aragunde Pérez
372388b7ed
Support rendering transparent bitmaps in presentations. (#990)
* Support rendering transparent bitmaps in presentations.

Add PictureShape.getAlpha() method and implementations for HSLF and
XSLF. Then make use of it in DrawPictureShape to apply the right alpha
value to the picture being drawn.

Fixed a bug in BitmapImageRenderer that considered alpha value 0 as
"fully opaque", when it means "fully transparent" instead.

Finally, added a test for this feature in TestDrawPictureShape for XSLF.
A test for HSLF could not be created because it was not possible to
generate a test file with today's tools; MS Office removes the
bitmap transparency effect when saving as .ppt, and LibreOffice blends
it into the bitmap.

* Address reviewer comments.

* Add comment about default alpha value.

* Prevent NPE in XSLFPictureShape.getAlpha().

* Change wording in comments to avoid the word "percentage".

* Use static vars for extreme alpha values.
2026-01-17 13:47:09 +01:00
PJ Fanning
e3e04a641f
Fix missing newline at end of TestXSLFTextShape.java
Add missing newline at the end of the file.
2026-01-17 13:46:01 +01:00
Dominik Stadler
d72e3a608c Add a file-handler for .emf files
These can be embedded in slideshows and POI supports
some handling of them.

Also Tika uses this code to extract some textual information
from such images.
2026-01-16 18:49:27 +01:00
Dominik Stadler
1910fff53e Add a file-handler for .wmf files
These can be embedded in slideshows and POI supports
some handling of them.

Also Tika uses this code to extract some textual information
from such images.
2026-01-16 18:49:27 +01:00
Dominik Stadler
22531fe638 Prevent invalid height/width in wmf-images exhausting memory
Introduce an adjustable limit of maximum number of pixels
for when drawing the image
2026-01-16 18:49:27 +01:00
Dominik Stadler
9c2f487c98 Bug 69927: Avoid NPE when parsing wmf-file
headerBitCount can be null if the header contains an
invalid flag
2026-01-16 18:49:27 +01:00
Dominik Stadler
b09bf904d7 Fix running integration-tests without scratchpad-libraries 2026-01-16 18:49:27 +01:00
Dominik Stadler
2acb5cf66a Avoid several NPEs
When retrieving picture data
When retrieving text in slides
When handling XSLFTableStyles
In EmbeddedExtractor if ShapeName is not set
In HSSF with invalid EscherSpRecord
In HSSF with invalid RecordStreams
When drawing arcs for shapes in slides
In HSSFPicture.getPictureIndex
Adjust "opens" for tests in poi-ooxml

Either handle it gracefully or throw
IllegalStateException instead for broken files
2026-01-16 18:49:27 +01:00
dependabot[bot]
d60edd21a3
Bump net.bytebuddy:byte-buddy from 1.18.3 to 1.18.4 (#998)
Bumps [net.bytebuddy:byte-buddy](https://github.com/raphw/byte-buddy) from 1.18.3 to 1.18.4.
- [Release notes](https://github.com/raphw/byte-buddy/releases)
- [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md)
- [Commits](https://github.com/raphw/byte-buddy/compare/byte-buddy-1.18.3...byte-buddy-1.18.4)

---
updated-dependencies:
- dependency-name: net.bytebuddy:byte-buddy
  dependency-version: 1.18.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-16 17:44:32 +01:00
PJ Fanning
fd4d143d44
XSSFReader: tolerate missing comments file (#996) 2026-01-14 21:06:26 +01:00
PJ Fanning
df2d5d62d9
rename param in ColumnHelper
see #993
2026-01-13 10:59:09 +01:00
Dominik Stadler
8cdcda2873 Avoid NPE when handling color-highlighting in text-runs 2026-01-12 06:48:24 +01:00
Dominik Stadler
18ef01295d Avoid some NPEs when handling LinkTables 2026-01-12 06:48:24 +01:00
Dominik Stadler
ac4295deac Avoid NPE when a row in a workbook was deleted and thus getRow() returns null 2026-01-12 06:48:23 +01:00
Dominik Stadler
d93a29ae67 Optimize handling of large XSSFTables
The current implementation calls updateHeaders() very often
causing cloning a sheet to take very long with high CPU.

We can optimize a number of things here:
* Use getTableColumnArray() as the List-based methods
have very costly implementations of hasNext()/next()
* Avoid some duplicated calls to updateHeaders()

There are likely more aggressive optimizations like
only calling updateHeaders() once after cloning,
but this would require more invasive changes in this
rarely used code-area.
2026-01-12 06:48:23 +01:00
Dominik Stadler
1fc4f9e3b7 Avoid ClastCastException when handling a broken ppt file 2026-01-12 06:48:23 +01:00
Dominik Stadler
b401b92aea Avoid NPE when reading a broken pptx file 2026-01-12 06:48:23 +01:00
Dominik Stadler
a5f5f4294e Avoid NPE when reading a broken xlsb file
Throw a more useful exception instead
2026-01-12 06:48:23 +01:00
PJ Fanning
ba04c61188 format methods 2026-01-11 10:34:54 +01:00
Dominik Stadler
f8a8189230 Use the proper add-method to perform the check for max number of children
If adding is done without check it can trigger OOM when fuzzing.

This should fix https://issues.oss-fuzz.com/issues/391709145
2026-01-10 13:14:34 +01:00
Dominik Stadler
95b2a1cf1d Avoid NPE with broken files when reading xls file 2026-01-10 13:14:34 +01:00
Dominik Stadler
017ff5f8f8 Implement lazy allocation of data for complex escher properties
This may reduce memory usage if the content is never used
or not populated for some reason.

This should fix https://issues.oss-fuzz.com/issues/42528528
2026-01-10 13:14:34 +01:00
PJ Fanning
cc8b6d7591 Update XWPFTheme.java 2026-01-09 14:35:59 +01:00
Jacobo Aragunde Pérez
6670c48c30
Add getter for body elements in XWPFSDTContent. (#991)
* Add getter for body elements in XWPFSDTContent.

This getter allows to navigate the POI objects stored inside a
XWPFSDTContent object without resorting to navigating XML.

* Address comments in review.
2026-01-09 13:28:30 +01:00
Etienne Gautier
aead782eb2
XWPF Themes: allow public access of theme and add helpers for theme fonts (#986)
* allow public access of theme and add helpers for theme fonts

* nit:naming

* add javadoc and tests

* Fix formatting of getMajorFontForScript method

* Refactor font retrieval methods for null checks

* Update XWPFTheme.java

---------

Co-authored-by: PJ Fanning <pjfanning@users.noreply.github.com>
2026-01-09 13:09:12 +01:00
Dominik Stadler
c94e795f35 Avoid NPE with broken files when writing endnotes for Word documents
https://issues.oss-fuzz.com/issues/391728757
2026-01-09 08:45:03 +01:00
Dominik Stadler
e9b33c0b08 Avoid NPE with broken files when writing endnotes for Word documents
Fixes https://issues.oss-fuzz.com/issues/392690733
2026-01-09 08:45:03 +01:00
Dominik Stadler
befc941dcf Avoid NPE with broken files when handling paint-style for fill 2026-01-09 08:45:03 +01:00
Dominik Stadler
ac989335d7 Avoid NPE with broken files when handling text-shapes 2026-01-09 08:45:03 +01:00
Dominik Stadler
0ec4434f59 Avoid NPE with broken file 2026-01-09 08:45:03 +01:00
Dominik Stadler
c28aec61d4 Avoid an NPE when reading broken SlideShow-files 2026-01-09 08:45:03 +01:00
Dominik Stadler
b195a3b9ed Avoid an NPE when OPCPackage is closed without being fully initialized 2026-01-06 22:47:00 +01:00
Dominik Stadler
ddf71d0984 Avoid two NPEs which were currently "expected" in tests
When things go wrong, we always want to give an
explanation via an exception instead of an NPE.
2026-01-06 22:47:00 +01:00
Dominik Stadler
fb75600872 Don't throw RuntimeException in integration-tests
This prepares us to include the FileHandlers in fuzz-testing
via oss-fuzz while keeping to not expect any direct
RuntimeException being caught.
2026-01-06 22:47:00 +01:00
PJ Fanning
4dadb9d6cc
Update copyright year in NOTICE file 2026-01-03 14:38:23 +01:00
PJ Fanning
e7515ba5e6 log4j 2.25.3 2025-12-29 13:29:43 +01:00
dependabot[bot]
c1fac56998
Bump log4jVersion from 2.24.3 to 2.25.3 (#975)
Bumps `log4jVersion` from 2.24.3 to 2.25.3.

Updates `org.apache.logging.log4j:log4j-bom` from 2.24.3 to 2.25.3
- [Release notes](https://github.com/apache/logging-log4j2/releases)
- [Changelog](https://github.com/apache/logging-log4j2/blob/2.x/RELEASE-NOTES.adoc)
- [Commits](https://github.com/apache/logging-log4j2/compare/rel/2.24.3...rel/2.25.3)

Updates `org.apache.logging.log4j:log4j-slf4j2-impl` from 2.24.3 to 2.25.3

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-bom
  dependency-version: 2.25.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-slf4j2-impl
  dependency-version: 2.25.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-29 13:27:00 +01:00
PJ Fanning
3a56bbd73b Update TestDetectAsOOXML.java 2025-12-25 11:17:12 +01:00
dependabot[bot]
6d42ff955a
Bump net.bytebuddy:byte-buddy from 1.18.2 to 1.18.3 (#984)
Bumps [net.bytebuddy:byte-buddy](https://github.com/raphw/byte-buddy) from 1.18.2 to 1.18.3.
- [Release notes](https://github.com/raphw/byte-buddy/releases)
- [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md)
- [Commits](https://github.com/raphw/byte-buddy/compare/byte-buddy-1.18.2...byte-buddy-1.18.3)

---
updated-dependencies:
- dependency-name: net.bytebuddy:byte-buddy
  dependency-version: 1.18.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-22 16:10:05 +01:00
emmanueldufour
528591ba11
Allow to load a word document with chartex chart (#982)
* Allow to load a word document with chartex chart

ChartEx (new charts introduced in Office 2016) will raise exceptions in underlying XML parsing, we catch them here in order to still be able to load the document

* spacing

some extra spaces were unbearable and could have prevented the pull request

* add test

* Update POIXMLDocumentPart.java

* Update POIXMLDocumentPart.java

* Update POIXMLDocumentPart.java

* reduce risk of swallowing zip bomb exceptions

* Update POIXMLDocumentPart.java

---------

Co-authored-by: PJ Fanning <pjfanning@users.noreply.github.com>
2025-12-19 20:10:25 +01:00
PJ Fanning
c703d00300 Update build.gradle 2025-12-19 17:31:40 +01:00
Dominik Stadler
9e1afbbab1 Fix some more Gradle deprecation-warnings in preparation for Gradle 9
Only signing-handling in poi-ooxml is still remaining, but
this deprecation seems to have been moved to Gradle 10 anyway.

Gradle 9 will require JDK 17, though, so we can only upgrade
when the min. supported JDK is bumped once more.
2025-12-19 16:15:21 +01:00
dependabot[bot]
3ac160b57d
Bump org.sonarqube from 7.2.1.6560 to 7.2.2.6593 (#983)
Bumps org.sonarqube from 7.2.1.6560 to 7.2.2.6593.

---
updated-dependencies:
- dependency-name: org.sonarqube
  dependency-version: 7.2.2.6593
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-19 16:09:48 +01:00
PJ Fanning
f2c52141c7
remove pre-existing inline strings when updating value (#962)
* remove pre-existing inline strings when updating value

* Update TestXSSFCell.java
2025-12-18 19:45:50 +01:00
Dominik Stadler
fd66689944 Improve message if test fails 2025-12-17 22:12:41 +01:00
Dominik Stadler
97a97bd75c JavaDoc: Don't link to classes from "poi-ooxml" in module "poi"
Otherwise building javadoc in CI fails sometimes, maybe if
the repository is cleaned before building.

And add some missing javadoc
2025-12-17 22:12:41 +01:00
Dominik Stadler
338882ac88 Convert some files to unix newlines
Otherwise these can cause issues when checking out
sources on Windows
2025-12-17 22:11:29 +01:00
Dominik Stadler
2dd124eb42 Fix some Gradle deprecation warnings
A number of warnings still remain,
they seem a bit more complicated to fix.
2025-12-17 22:11:29 +01:00
PJ Fanning
fe3359bd79
refactor recurse check (#979) 2025-12-17 22:08:23 +01:00
PJ Fanning
6762b5a9fb Revert "Update XSSFCell.java"
This reverts commit 037a001719d3beb8f31cb4022dd34cd28a318c61.
2025-12-17 21:49:08 +01:00
PJ Fanning
037a001719 Update XSSFCell.java 2025-12-17 21:31:06 +01:00
PJ Fanning
3a69605f4c
[bz-69905] check cell before recursing (#978) 2025-12-17 21:29:03 +01:00
dependabot[bot]
08e9bb00d4
Bump org.sonarqube from 7.2.0.6526 to 7.2.1.6560 (#976)
Bumps org.sonarqube from 7.2.0.6526 to 7.2.1.6560.

---
updated-dependencies:
- dependency-name: org.sonarqube
  dependency-version: 7.2.1.6560
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-17 21:24:32 +01:00
Jacobo Aragunde Pérez
4fb34ebeae
Fix rules for table style application in XSLFTables. (#969)
* Fix rules for table style application in XSLFTables.

Table styles contain rules for first and last rows/columns, even and
odd rows/columns... When one of these rules is empty, we are supposed
to fall back to the "whole table" rules. The fallback must also be
applied for the format that's not explicitly specified in the specific
rules.

when the corresponding specific rule is missing some info.

Fallback must also be applied when the corresponding specific rule is
missing some info. A couple of examples from the reproducer/test file
included:

The included reproducer/test file contained a few problems related to
table style application:
* The second style for horizontal/vertical banding (band2H, band2V) was
  never applied.
* In the table with horizontal banding enabled, the style band1H did
  not set a font color, POI returned a null font color instead of the
  color from wholeTable.
* In the table with horizontal banding enabled, the style band2H did
  not set a background color, POI returned null instead of the color
  specified in wholeTable.

This patches fixes the behaviors mentioned above, making POI behavior
match the one from MS Office and LibreOffice.

* Replace uses of java.util.list.getFirst().
2025-12-16 18:03:45 +01:00
dependabot[bot]
f476c64179
Bump com.github.spotbugs from 6.4.7 to 6.4.8 (#972)
Bumps com.github.spotbugs from 6.4.7 to 6.4.8.

---
updated-dependencies:
- dependency-name: com.github.spotbugs
  dependency-version: 6.4.8
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-16 15:44:28 +01:00
dependabot[bot]
a9bc28a4bb
Bump org.mockito:mockito-core from 5.20.0 to 5.21.0 (#970)
Bumps [org.mockito:mockito-core](https://github.com/mockito/mockito) from 5.20.0 to 5.21.0.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.20.0...v5.21.0)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-version: 5.21.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-15 20:43:46 +01:00
dependabot[bot]
0eb7135f2b
Bump org.sonarqube from 7.1.0.6387 to 7.2.0.6526 (#960)
Bumps org.sonarqube from 7.1.0.6387 to 7.2.0.6526.

---
updated-dependencies:
- dependency-name: org.sonarqube
  dependency-version: 7.2.0.6526
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-13 13:06:56 +01:00
hyun1024
4b3c688d51
Add methods to manage first slide number(firstSlideNum) (#968)
* Add methods to manage first slide number(firstSlideNum)

Adds methods to manage the custom starting slide number in XSLF (PowerPoint) presentations. This property is stored as the 'firstSlideNum' attribute in ppt/presentation.xml.

The following methods are added to XMLSlideShow:
- getFirstSlideNumber(): Retrieves the current starting slide number (default is 1).
- setFirstSlideNumber(int num): Sets the custom starting slide number.
- unsetFirstSlideNumber(): Removes the 'firstSlideNum' attribute, reverting to the default (1).

Constraints:
The 'set' method enforces the bounds [0, 9999] as defined by Microsoft's implementation specifications (MS-OI29500, Part 1, Section 19.2.1.26) to ensure the creation of valid PowerPoint files.

Also includes TestXSLFSlideShow updates to cover the new functionality, persistence, and validation checks.

* Review: Apply review feedback to firstSlideNumber feature

- Add @since 6.0.0 Javadoc tag to getFirstSlideNumber(), setFirstSlideNumber(), and unsetFirstSlideNumber() methods in XMLSlideShow.
- Refactor TestXSLFSlideShow to use explicit static JUnit imports (e.g., assertEquals, assertThrows) instead of wildcard imports, adhering to project coding style guidelines.

* whitespace

---------

Co-authored-by: PJ Fanning <pjfanning@users.noreply.github.com>
2025-12-13 13:06:04 +01:00
PJ Fanning
e4e4582689
add cell tests (#965) 2025-12-08 20:56:38 +01:00
PJ Fanning
027927bfad
[bz-69897] Fix null check for LineDash properties (#964) 2025-12-08 15:47:50 +01:00
PJ Fanning
2098df7467 broken javadoc 2025-12-08 14:04:45 +01:00
PJ Fanning
40ca9bd085 commercial support page 2025-12-08 11:33:53 +01:00
PJ Fanning
88836e1614 add versioning support section 2025-12-08 10:44:42 +01:00
PJ Fanning
e7620b7ce7 set up default impls of new(-ish) methods 2025-12-05 10:58:48 +01:00
PJ Fanning
6d6089eee5
nullSafeFormatProperties (#961) 2025-12-05 10:51:57 +01:00
Dominik Stadler
57ffd3aa12 Remove unused list of pivot-caches and update deprecations
Seems the list is currently never accessed any more.
2025-12-03 21:35:02 +01:00
Dominik Stadler
2428265d35 Update Gradle Wrapper 2025-12-03 21:35:02 +01:00
Dominik Stadler
3d9c243943 Ant-target "javadoc" requires compiled sources 2025-12-03 21:35:02 +01:00
Dominik Stadler
236784371b Update JavaDoc-references to JDK 11 2025-12-03 21:35:02 +01:00
Dominik Stadler
47d0e956b8 Add missing Mockito which is needed for module-based execution of tests
This seems to only fail in Ant-based test-execution for some reason
2025-12-02 20:33:42 +01:00
Dominik Stadler
74bdee9c0d Avoid usage of package org.mockito.internal
Otherwise JUnit tests fail in CI now when
the module-system is used.
2025-12-02 20:33:42 +01:00
Dominik Stadler
e5336586a9 Add missing @Deprecated 2025-12-02 20:33:42 +01:00
Dominik Stadler
2805093da6 Add missing Mockito which is needed for module-based execution of tests
This seems to only fail in Ant-based test-execution
2025-12-02 19:47:08 +01:00
Dominik Stadler
2a2e4f095e Adjust source-rebuild-test for version 6 2025-12-02 19:22:05 +01:00
dependabot[bot]
5d8d3e77bf
Bump com.github.spotbugs from 6.4.6 to 6.4.7 (#959)
Bumps com.github.spotbugs from 6.4.6 to 6.4.7.

---
updated-dependencies:
- dependency-name: com.github.spotbugs
  dependency-version: 6.4.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-02 15:53:44 +01:00
vo0ff
006e49765c
Bugzilla 69303: Fix RangeCopier's copyMergedRanges when copying withing the same sheet (#958)
* Bugzilla 69303: added failing test for case with same sheet RangeCopier for merged regions

* Bugzilla 69303: fixed same sheet issue when enabling copy of merged ranges

* Bugzilla 69303: added @since 6.0.0 to new public methods

---------

Co-authored-by: Viktor Ozerov <vik.ozerov+git@gmail.com>
2025-12-01 22:38:04 +01:00
Gili Tzabari
c953a8ff22
Add XSSFOptimiser - XSSF equivalent of HSSFOptimiser (#952)
* Add XSSFOptimiser - XSSF equivalent of HSSFOptimiser

Adds optimization methods for XSSF workbooks to address style explosion
issues. HSSFOptimiser exists for HSSF but no equivalent existed for XSSF.

Methods added:
- optimiseCellStyles(XSSFWorkbook): Remaps cells using duplicate styles
  to canonical (first) occurrence
- optimiseFonts(XSSFWorkbook): Updates style font references to canonical
  fonts

Implementation uses a safe remapping approach rather than removing entries
from XML, which avoids XmlValueDisconnectedException issues caused by
StylesTable's internal list becoming disconnected from CTStylesheet.

Includes comprehensive test coverage in TestXSSFOptimiser.

Closes #951

* Address PR review comments

- Add "since 6.0.0" javadoc tag to XSSFOptimiser class
- Use Locale.ROOT in String.format() to comply with forbidden-apis check
2025-12-01 19:30:27 +01:00
PJ Fanning
f44ece137f adjust 'since' values to remove POI 2025-12-01 19:28:56 +01:00
PJ Fanning
97cef0a3e3 Update RELEASE-NOTES.txt 2025-12-01 09:53:09 +01:00
PJ Fanning
73d1fc53f5 Update download.xml 2025-11-30 20:34:14 +01:00
PJ Fanning
614d7c7002 Update release-guide.txt 2025-11-30 20:16:34 +01:00
PJ Fanning
c51dadf703 release 5.5.1 2025-11-30 20:11:35 +01:00
dependabot[bot]
c5c2540abb
Bump com.github.spotbugs from 6.4.5 to 6.4.6 (#957)
Bumps com.github.spotbugs from 6.4.5 to 6.4.6.

---
updated-dependencies:
- dependency-name: com.github.spotbugs
  dependency-version: 6.4.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-28 16:19:53 +01:00
dependabot[bot]
97ea97b5a2
Bump net.bytebuddy:byte-buddy-agent from 1.18.1 to 1.18.2 (#955)
Bumps [net.bytebuddy:byte-buddy-agent](https://github.com/raphw/byte-buddy) from 1.18.1 to 1.18.2.
- [Release notes](https://github.com/raphw/byte-buddy/releases)
- [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md)
- [Commits](https://github.com/raphw/byte-buddy/compare/byte-buddy-1.18.1...byte-buddy-1.18.2)

---
updated-dependencies:
- dependency-name: net.bytebuddy:byte-buddy-agent
  dependency-version: 1.18.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-27 15:57:48 +01:00
PJ Fanning
6b6735a3c4 Update changes.xml 2025-11-26 22:05:00 +01:00
PJ Fanning
1dbfba9225 Update changes.xml 2025-11-26 20:54:08 +01:00
dependabot[bot]
c4e0cde59c
Bump bouncyCastleVersion from 1.82 to 1.83 (#953)
Bumps `bouncyCastleVersion` from 1.82 to 1.83.

Updates `org.bouncycastle:bcpkix-jdk18on` from 1.82 to 1.83
- [Changelog](https://github.com/bcgit/bc-java/blob/main/docs/releasenotes.html)
- [Commits](https://github.com/bcgit/bc-java/commits)

Updates `org.bouncycastle:bcutil-jdk18on` from 1.82 to 1.83
- [Changelog](https://github.com/bcgit/bc-java/blob/main/docs/releasenotes.html)
- [Commits](https://github.com/bcgit/bc-java/commits)

---
updated-dependencies:
- dependency-name: org.bouncycastle:bcpkix-jdk18on
  dependency-version: '1.83'
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.bouncycastle:bcutil-jdk18on
  dependency-version: '1.83'
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-26 15:42:57 +01:00
PJ Fanning
32d7a45b50 license headers 2025-11-26 13:39:37 +01:00
PJ Fanning
528b72d347 Update versioning.xml 2025-11-26 12:13:24 +01:00
PJ Fanning
ccacd1540c version support 2025-11-26 12:07:09 +01:00
dependabot[bot]
22ff9e34b6
Bump actions/checkout from 5 to 6 (#949)
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-24 20:45:50 +01:00
Jacobo Aragunde Pérez
775da74dee
Fix NPE in XWPFParagraph.getCTSpacing(). (#950)
We recently changed the getters so they don't create the PPr object if
it doesn't exist, but we missed adding one null check for the new
situation.

Add a test to exercise all the getters in a case where there isn't a PPr
object.
2025-11-24 20:44:02 +01:00
PJ Fanning
b4326363d6 Update news.xml 2025-11-23 21:04:37 +01:00
PJ Fanning
ed156e63c6 update trademark text 2025-11-23 20:25:00 +01:00
dependabot[bot]
5a7cd39393
Bump org.sonarqube from 7.0.1.6134 to 7.1.0.6387 (#948)
Bumps org.sonarqube from 7.0.1.6134 to 7.1.0.6387.

---
updated-dependencies:
- dependency-name: org.sonarqube
  dependency-version: 7.1.0.6387
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-21 20:08:49 +01:00
PJ Fanning
8f1cfa2eb3
Upgrade commons-codec dependency to 1.20.0 2025-11-20 15:31:22 +01:00
dependabot[bot]
2cb8c4020e
Bump commons-codec:commons-codec from 1.19.0 to 1.20.0 (#946)
Bumps [commons-codec:commons-codec](https://github.com/apache/commons-codec) from 1.19.0 to 1.20.0.
- [Changelog](https://github.com/apache/commons-codec/blob/master/RELEASE-NOTES.txt)
- [Commits](https://github.com/apache/commons-codec/compare/rel/commons-codec-1.19.0...rel/commons-codec-1.20.0)

---
updated-dependencies:
- dependency-name: commons-codec:commons-codec
  dependency-version: 1.20.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-20 15:28:12 +01:00
dependabot[bot]
4b38ab5401
Bump com.github.spotbugs from 6.4.4 to 6.4.5 (#944)
Bumps com.github.spotbugs from 6.4.4 to 6.4.5.

---
updated-dependencies:
- dependency-name: com.github.spotbugs
  dependency-version: 6.4.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-19 17:45:37 +01:00
dependabot[bot]
e7c0389865
Bump de.thetaphi.forbiddenapis from 3.9 to 3.10 (#945)
Bumps de.thetaphi.forbiddenapis from 3.9 to 3.10.

---
updated-dependencies:
- dependency-name: de.thetaphi.forbiddenapis
  dependency-version: '3.10'
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-19 15:40:28 +01:00
PJ Fanning
d83039cca7 Update README.md 2025-11-19 14:27:44 +01:00
PJ Fanning
62e12fdb1b Update README.md 2025-11-19 14:25:00 +01:00
PJ Fanning
53ceff13b2 jar details 2025-11-19 14:22:16 +01:00
PJ Fanning
fa95a3e522
reduce use of setCellType (#943) 2025-11-19 14:20:56 +01:00
PJ Fanning
031793ddaf
remove deprecated AddDimensionedImage (#942) 2025-11-19 14:10:23 +01:00
PJ Fanning
e73c419a37 switch to README.md 2025-11-19 14:09:08 +01:00
PJ Fanning
540f0e5617
remove deprecated hasOOXMLHeader method (#941) 2025-11-19 13:58:41 +01:00
PJ Fanning
9fb2c4b03e
make getCachedResultType return enum (#939) 2025-11-19 13:58:18 +01:00
PJ Fanning
cb520e8046
remove deprecated getCodepoints method (#940) 2025-11-19 13:58:03 +01:00
PJ Fanning
ae0a17765e remove deprecated isStartAtOverriden 2025-11-19 13:44:59 +01:00
PJ Fanning
71b4b62a6d remove deprecated shortArrayToByteArray 2025-11-19 13:43:55 +01:00
PJ Fanning
a2ed8fda3a protect asf-site branch 2025-11-19 00:39:02 +01:00
PJ Fanning
2f5ec43601 Update versioning.xml 2025-11-19 00:15:14 +01:00
PJ Fanning
b45b7095c0 Update index.xml 2025-11-19 00:09:16 +01:00
PJ Fanning
9b7938bf81 update docs 2025-11-18 23:55:40 +01:00
dependabot[bot]
789fcc29bb
Bump org.apache.pdfbox:pdfbox from 3.0.5 to 3.0.6 (#938)
Bumps org.apache.pdfbox:pdfbox from 3.0.5 to 3.0.6.

---
updated-dependencies:
- dependency-name: org.apache.pdfbox:pdfbox
  dependency-version: 3.0.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-18 17:26:01 +01:00
dependabot[bot]
1c4f68f262
Bump commons-io:commons-io from 2.20.0 to 2.21.0 (#937)
Bumps [commons-io:commons-io](https://github.com/apache/commons-io) from 2.20.0 to 2.21.0.
- [Changelog](https://github.com/apache/commons-io/blob/master/RELEASE-NOTES.txt)
- [Commits](https://github.com/apache/commons-io/compare/rel/commons-io-2.20.0...rel/commons-io-2.21.0)

---
updated-dependencies:
- dependency-name: commons-io:commons-io
  dependency-version: 2.21.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-18 15:56:39 +01:00
PJ Fanning
7ec1fc01d4 Update changes.xml 2025-11-17 17:50:45 +01:00
dependabot[bot]
ad925ac0d1
Bump net.bytebuddy:byte-buddy-agent from 1.17.7 to 1.18.1 (#935)
Bumps [net.bytebuddy:byte-buddy-agent](https://github.com/raphw/byte-buddy) from 1.17.7 to 1.18.1.
- [Release notes](https://github.com/raphw/byte-buddy/releases)
- [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md)
- [Commits](https://github.com/raphw/byte-buddy/compare/byte-buddy-1.17.7...byte-buddy-1.18.1)

---
updated-dependencies:
- dependency-name: net.bytebuddy:byte-buddy-agent
  dependency-version: 1.18.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-17 15:26:02 +01:00
dependabot[bot]
7a36dfe031
Bump org.xmlunit:xmlunit-core from 2.10.4 to 2.11.0 (#934)
Bumps [org.xmlunit:xmlunit-core](https://github.com/xmlunit/xmlunit) from 2.10.4 to 2.11.0.
- [Release notes](https://github.com/xmlunit/xmlunit/releases)
- [Changelog](https://github.com/xmlunit/xmlunit/blob/main/RELEASE_NOTES.md)
- [Commits](https://github.com/xmlunit/xmlunit/compare/v2.10.4...v2.11.0)

---
updated-dependencies:
- dependency-name: org.xmlunit:xmlunit-core
  dependency-version: 2.11.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-17 15:25:32 +01:00
PJ Fanning
a5d43073a6 Update create_jobs.groovy 2025-11-17 15:16:36 +01:00
PJ Fanning
c840e660b7
Update GitHub description and homepage URL 2025-11-17 14:57:42 +01:00
PJ Fanning
f258b2b26d
Add protected branch for version 5.5.x 2025-11-17 14:54:32 +01:00
PJ Fanning
90e5d5d998 Update test-gradle.yml 2025-11-17 14:53:33 +01:00
PJ Fanning
7631eae9b2 try to fix issue with missing module-info classes 2025-11-17 14:17:51 +01:00
Dominik Stadler
3116668737 Remove identical overriding method 2025-11-16 22:34:18 +01:00
Dominik Stadler
b770a35aba Add missing @Deprecated and @Removal 2025-11-16 22:34:18 +01:00
Dominik Stadler
59e595b844 Remove some of the deprecated methods with @Removal("6.0.0")
We announced their removal for 6.0.0, so
we can remove them now as we plan a 6.0.0 release
next.

Some were not yet removed as they have still internal
usage or seem to need more work to finally remove.
2025-11-16 22:34:18 +01:00
Dominik Stadler
c6a621edc6 Remove deprecated methods with @Removal("5...")
We announced their removal already for 5.0.0 or 5.3.0, so
we can safely remove them now as we plan a 6.0.0 release
next.

Cell.setCellType() needs a closer look later as
it is not a simple deletion of code.
2025-11-16 22:34:18 +01:00
Dominik Stadler
f774a638cb Switch to JDK 11 some more
This should fix building with Ant with JDK > 11,
hopefully IBM JDK in CI as well.
2025-11-16 22:34:17 +01:00
Dominik Stadler
73b904f16d Remove workarounds for IBM JDK and JDK patchlevel 21.0.1
IBM JDK 11 seems to be fixed and we do not expect to run
tests with JDK 21.0.1 anymore
2025-11-16 14:18:06 +01:00
Dominik Stadler
cd22293975 Newer Mockito prevents using code from org.mockito.internal.matchers
At least locally tests fail now for me, so let's get rid of using
internal code here.
2025-11-16 14:18:06 +01:00
Dominik Stadler
d486e50822 Use OpenRewrite to update code to make use of Java 11 2025-11-16 14:18:06 +01:00
Dominik Stadler
89fa331beb Sync third-party-library-versions in build.xml 2025-11-16 14:18:06 +01:00
PJ Fanning
1604c410d1 java 11 2025-11-15 12:33:21 +01:00
PJ Fanning
61203972a5 Update create_jobs.groovy 2025-11-15 12:33:21 +01:00
dependabot[bot]
709bfd4305
Bump org.sonarqube from 4.0.0.2929 to 7.0.1.6134 (#923)
Bumps org.sonarqube from 4.0.0.2929 to 7.0.1.6134.

---
updated-dependencies:
- dependency-name: org.sonarqube
  dependency-version: 7.0.1.6134
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-15 12:09:02 +01:00
PJ Fanning
3b69442907 Update index.xml 2025-11-15 12:02:39 +01:00
PJ Fanning
1d4f5d34bd 5.5.0 release notes 2025-11-15 11:54:49 +01:00
PJ Fanning
bc2b1b0422 Update changes.xml 2025-11-15 11:40:44 +01:00
dependabot[bot]
7b5fe9c42b
Bump org.mockito:mockito-core from 4.11.0 to 5.20.0 (#906)
Bumps [org.mockito:mockito-core](https://github.com/mockito/mockito) from 4.11.0 to 5.20.0.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v4.11.0...v5.20.0)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-version: 5.20.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-15 11:39:14 +01:00
dependabot[bot]
dd0d6deb81
Bump com.github.spotbugs from 6.1.13 to 6.4.4 (#922)
Bumps com.github.spotbugs from 6.1.13 to 6.4.4.

---
updated-dependencies:
- dependency-name: com.github.spotbugs
  dependency-version: 6.4.4
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-15 11:38:48 +01:00
PJ Fanning
16ecbc7d48 build issues 2025-11-15 11:34:52 +01:00
PJ Fanning
323b5c8c6b start move to require java 11 min 2025-11-15 11:26:19 +01:00
PJ Fanning
41f4570c8f Update create_jobs.groovy 2025-11-15 11:20:36 +01:00
PJ Fanning
58ee3f732b Update create_jobs.groovy 2025-11-15 11:07:04 +01:00
PJ Fanning
7ec830f892 set version to 6.0.0-SNAPSHOT 2025-11-15 10:52:57 +01:00
PJ Fanning
95b46731b9
Remove comment about unknown built-in style
Removed comment about unknown built-in style from getTableStyle method.
2025-11-03 07:41:22 +01:00
Dominik Stadler
b16a094bba Fix JavaDoc
Otherwise javadoc generation fails locally
2025-11-03 07:31:41 +01:00
Dominik Stadler
a371cba0be Apply IDE suggestions 2025-11-03 07:31:41 +01:00
Dominik Stadler
25a2dd9227 Adjust parsing XSSFBuiltinTableStyle
In case of invalid enum-value keep the fallback-handling
as before as otherwise some existing documents fail to parse
2025-11-03 07:26:03 +01:00
Dominik Stadler
207d67c12b Prevent a NullPointerException
The regression-corpus contains some documents which trigger this,
but succeed with the added null-check
2025-11-03 07:26:03 +01:00
PJ Fanning
e09a167bbb javadoc 2025-11-02 09:32:40 +01:00
PJ Fanning
f632c29683 javadoc issue 2025-10-31 00:18:10 +00:00
PJ Fanning
0dc32a8596
cache CellStyle Properties to improve performance (#926)
* cache CellStyle Properties to improve performance

* add tests
2025-10-29 19:47:21 +00:00
PJ Fanning
67c8284f35 prep 5.5.0 release 2025-10-27 17:31:34 +00:00
Dominik Stadler
1dcb799127 Source-rebuild testing: Fix building actual source-pacakge and improve output
Adjust for the actual build-directory where sources were extracted
Also print out how the necessary source-package can be created
2025-10-25 12:03:43 +02:00
PJ Fanning
1aa1fd6273 short versioning page 2025-10-24 21:07:03 +01:00
PJ Fanning
70f8b15333 Update changes.xml 2025-10-22 22:35:39 +01:00
PJ Fanning
782d187b10
Update targetCompatibility to use JavaVersion.VERSION_23 2025-10-22 22:18:45 +01:00
AdRiley
63c0bf9368
New api for reading xlsb (#920)
* Add new API

* Add testBasicXSSFBSheetContentsHandler

* Add testCommentsXSSFBSheetContentsHandler

* Add testDateXSSFBSheetContentsHandler

* Fix comment

* Code Review feedback

* Code review feedback

* Fix backwards compatibility

* rename helper method

* Organise imports

* Add @since POI 5.5.0
2025-10-21 14:19:16 +01:00
Dominik Stadler
ea74954fcf Trigger reading metadata-text as part of integration testing
One test-case fails differently now
2025-10-06 07:40:53 +02:00
Dominik Stadler
b5221fac25 Add changelog 2025-10-06 07:40:53 +02:00
Dominik Stadler
42193c57e4 Try to verify handling of deeply nested xlsx 2025-10-06 07:40:53 +02:00
Dominik Stadler
7003357b79 TestAllFiles: Add output if a file cannot be matched to a handler 2025-10-06 07:40:53 +02:00
Dominik Stadler
dc2cfe0bfc Apply IDE suggestions 2025-10-06 07:40:53 +02:00
Dominik Stadler
f10f164c61 Add a microBenchmark for replacing strings
It shows that Java 11 improves a lot and no custom string-replace
is necessary any more when using this version
2025-10-06 07:40:53 +02:00
Jacobo Aragunde Pérez
79d1630374
Prevent NullPointerException in XWPFTable.getWidthType(). (#912)
According to the spec in section "17.4.63 tblW (Preferred Table Width)",
the element tblW is not compulsory and "If this element is omitted, then
the cell width shall be of type auto."

We modify the getter to follow this behavior, preventing a NPE.

It implies a change of behavior in the situation when there is no tblPr,
in that case it used to return NIL, but notice that this behavior was
introduced in commit d4fc5cd6c08338a4132a6348ee1b1b077f9527b8 and has
never been part of a release.
2025-10-01 14:17:00 +01:00
PJ Fanning
05f37a5204 refactor SheetUtil code 2025-09-30 10:03:39 +01:00
Jaroslav Tulach
0a17fa9e22
Delay initialization of fontRenderContext field & co. by moving it into own inner class (#909)
* git-svn-id: https://svn.apache.org/repos/asf/poi/tags/REL_5_2_3@1904113 13f79535-47bb-0310-9956-ffa450edef68

* Delay loading AWT classes by moving the methods into own class

* Set default value of ignoreMissingFontSystem to true when java.desktop module isn't available

---------

Co-authored-by: PJ Fanning <fanningpj@apache.org>
Co-authored-by: Jaroslav Tulach <jaroslav.tulach@apidesign.org>
2025-09-30 09:44:47 +01:00
PJ Fanning
444a8a7214
Upgrade graphics2d dependency to 3.0.5 2025-09-29 19:47:44 +01:00
dependabot[bot]
22b78e1887
Bump de.rototor.pdfbox:graphics2d from 3.0.3 to 3.0.5 (#914)
Bumps [de.rototor.pdfbox:graphics2d](https://github.com/rototor/pdfbox-graphics2d) from 3.0.3 to 3.0.5.
- [Commits](https://github.com/rototor/pdfbox-graphics2d/compare/pdfboxgraphics2d-parent-3.0.3...pdfboxgraphics2d-parent-3.0.5)

---
updated-dependencies:
- dependency-name: de.rototor.pdfbox:graphics2d
  dependency-version: 3.0.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-29 19:46:17 +01:00
PJ Fanning
03fc1ddea1 [github-911] close DataSource before deleting temp file 2025-09-26 19:22:32 +01:00
Jacobo Aragunde Pérez
7a124135de
Make getters public for XML beans in XWPFDefault*Style. (#910)
The classes XWPFDefaultRunStyle and XWPFDefaultParagraphStyle only
expose a subset of their possibles attributes. To let users access all
the underlying data, we change the visibility of the XML bean getters
to public.
2025-09-26 09:13:14 +01:00
dependabot[bot]
b50946307e
Bump org.cyclonedx.bom from 2.3.1 to 2.4.1 (#908)
Bumps org.cyclonedx.bom from 2.3.1 to 2.4.1.

---
updated-dependencies:
- dependency-name: org.cyclonedx.bom
  dependency-version: 2.4.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-23 19:40:29 +01:00
dependabot[bot]
f26ea2b777
Bump com.google.guava:guava from 33.4.8-jre to 33.5.0-jre (#907)
Bumps [com.google.guava:guava](https://github.com/google/guava) from 33.4.8-jre to 33.5.0-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-version: 33.5.0-jre
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-22 17:21:13 +01:00
PJ Fanning
14cd9a35c6
Upgrade bouncycastle dependency to version 1.82 2025-09-22 10:33:01 +01:00
dependabot[bot]
c048ba53fe
Bump bouncyCastleVersion from 1.81 to 1.82 (#903)
Bumps `bouncyCastleVersion` from 1.81 to 1.82.

Updates `org.bouncycastle:bcpkix-jdk18on` from 1.81 to 1.82
- [Changelog](https://github.com/bcgit/bc-java/blob/main/docs/releasenotes.html)
- [Commits](https://github.com/bcgit/bc-java/commits)

Updates `org.bouncycastle:bcutil-jdk18on` from 1.81 to 1.82
- [Changelog](https://github.com/bcgit/bc-java/blob/main/docs/releasenotes.html)
- [Commits](https://github.com/bcgit/bc-java/commits)

---
updated-dependencies:
- dependency-name: org.bouncycastle:bcpkix-jdk18on
  dependency-version: '1.82'
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.bouncycastle:bcutil-jdk18on
  dependency-version: '1.82'
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-20 09:12:58 +01:00
PJ Fanning
2e375a76ea Update support-asf.png 2025-09-18 10:34:24 +01:00
dependabot[bot]
f2267c0668
Bump net.sf.saxon:Saxon-HE from 12.8 to 12.9 (#902)
Bumps net.sf.saxon:Saxon-HE from 12.8 to 12.9.

---
updated-dependencies:
- dependency-name: net.sf.saxon:Saxon-HE
  dependency-version: '12.9'
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-16 17:35:51 +01:00
dependabot[bot]
e4a2cd1233
Bump org.xmlunit:xmlunit-core from 2.10.3 to 2.10.4 (#901)
Bumps [org.xmlunit:xmlunit-core](https://github.com/xmlunit/xmlunit) from 2.10.3 to 2.10.4.
- [Release notes](https://github.com/xmlunit/xmlunit/releases)
- [Changelog](https://github.com/xmlunit/xmlunit/blob/main/RELEASE_NOTES.md)
- [Commits](https://github.com/xmlunit/xmlunit/compare/v2.10.3...v2.10.4)

---
updated-dependencies:
- dependency-name: org.xmlunit:xmlunit-core
  dependency-version: 2.10.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-15 18:34:09 +01:00
PJ Fanning
ca7e3330ed Update favicon.ico 2025-09-11 23:47:18 +01:00
PJ Fanning
6bbd6fc177 new support logo 2025-09-11 23:23:30 +01:00
PJ Fanning
18e0a37df3 new asf logo 2025-09-11 22:51:30 +01:00
PJ Fanning
49fd564023
log4j bom (#897) 2025-09-11 10:52:01 +01:00
PJ Fanning
2b7f7074a0
refactor getTableStyle due to perf issues (#896) 2025-09-09 23:12:08 +01:00
dependabot[bot]
28cd548f6b
Bump net.bytebuddy:byte-buddy from 1.17.5 to 1.17.7 (#884)
Bumps [net.bytebuddy:byte-buddy](https://github.com/raphw/byte-buddy) from 1.17.5 to 1.17.7.
- [Release notes](https://github.com/raphw/byte-buddy/releases)
- [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md)
- [Commits](https://github.com/raphw/byte-buddy/compare/byte-buddy-1.17.5...byte-buddy-1.17.7)

---
updated-dependencies:
- dependency-name: net.bytebuddy:byte-buddy
  dependency-version: 1.17.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-09 22:38:34 +01:00
PJ Fanning
d0e6830e44
issue when formatting number when divisor is needed (#895)
* reproduce issue 69812

* workaround for issue
2025-09-09 22:27:48 +01:00
PJ Fanning
559485a0fe throw OfficeXmlFileException if hwpf reads an ooxml file 2025-09-05 11:04:29 +01:00
PJ Fanning
2fbfe2ea7e Create TestHSLFParser.java 2025-09-05 10:45:07 +01:00
PJ Fanning
aeb53ffe62 Create TestHSSFParser.java 2025-08-28 16:38:58 +01:00
PJ Fanning
b0a4e1042a Update TestXSSFParser.java 2025-08-28 15:41:20 +01:00
PJ Fanning
00c2a85c30 Update HeaderFooterComplexFormats.xlsx 2025-08-28 15:14:57 +01:00
PJ Fanning
6647bc8c8b Update TestXSSFParser.java 2025-08-28 14:43:15 +01:00
PJ Fanning
4493f3a5d6 Update TestXSSFParser.java 2025-08-28 14:13:16 +01:00
PJ Fanning
dda424920a Update TestXSSFParser.java 2025-08-28 13:50:21 +01:00
PJ Fanning
c5f3ab9d50 Update TestXSSFParser.java 2025-08-28 13:48:05 +01:00
PJ Fanning
7a80eb6920 Update TestXSSFParser.java 2025-08-28 13:23:53 +01:00
PJ Fanning
172e73a10b Update TestXSSFParser.java 2025-08-28 13:15:10 +01:00
PJ Fanning
9f9ff14e56 add test 2025-08-28 13:00:54 +01:00
PJ Fanning
c38f5f9577
Reorder import statements in TestHSSFColor 2025-08-27 15:47:49 +01:00
dependabot[bot]
732001c4ae
Bump actions/setup-java from 4 to 5 (#886)
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 4 to 5.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-21 18:41:41 +01:00
PJ Fanning
061d6a3d0f more parsers 2025-08-20 18:34:48 +01:00
PJ Fanning
54f1f5deac
add new XSSFParser (#870)
* add new XSSFParser

* Update build.gradle

* extra parse methods
2025-08-20 13:13:23 +01:00
PJ Fanning
ac53afe307 Update XSSFPictureData.java 2025-08-15 10:44:54 +01:00
PJ Fanning
bdb467e84e Update TestXSSFWorkbook.java 2025-08-14 12:44:21 +01:00
PJ Fanning
65747422b3 Update TestXSSFWorkbook.java 2025-08-14 12:10:49 +01:00
PJ Fanning
c0e6a9bed0
close package parts when closing OPCPackage (#880)
* close package parts when closing OPCPackage

* Update ZipPackagePart.java
2025-08-14 10:58:46 +01:00
PJ Fanning
e98a5991e7 Update TestXSSFWorkbook.java 2025-08-14 10:56:27 +01:00
PJ Fanning
314bda66a4 Update TestXSSFWorkbook.java 2025-08-14 09:44:08 +01:00
dependabot[bot]
3b011a0164
Bump actions/checkout from 4 to 5 (#878)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-12 12:07:06 +01:00
Dominik Stadler
085c9ddb19 Try to fix some JavaDoc references 2025-08-10 17:00:11 +02:00
Dominik Stadler
92565ea07c Adjust test with deeply nested file for JDK 25
It seems JDK 25 introduces more checks when parsing XML
Also apply some IDE suggestions and fix deprecation warnings
2025-08-10 17:00:11 +02:00
Dominik Stadler
009b6501f2 Fix a Gradle warning 2025-08-10 17:00:11 +02:00
PJ Fanning
86e80a9164
change xml options (#875) 2025-08-06 18:29:04 +01:00
PJ Fanning
9d37011683
workaround stray whitespace in sst index (#874)
* tolerate whitespace in ints

* try to workaround stray whitespace in sst index

* Update TestAllFiles.java
2025-08-05 12:00:54 +01:00
Patrik Lindström
d81592022d
feat: Full color support in CellFormat expressions (#797)
* feat: Full color support in cellformat expressions

This change adds full support for named and indexed color in cell format expressions by adding in the standard color palette to CellFormatPart, from where the formatting information is free to propagate down the stack.

For strict format compatibility, only the 8 basic named colors and 56 indexed colors should be allowed, but this change retains the assumed intended feature of the original code to also support the full set of colors specified in HSSFColor.HSSFColorPredefined. If this is undesirable, the dependency on HSSFColor should be dropped entirely.

This change is required in order to properly support named and indexed colors as part of cell format expressions in products using POI.

* Add some sanity tests

* Rename testNamedColorsExist to testNamedColors

* fix rebase corruption in CellFormatPart

* fix indentation in TestCellFormat

..by converting tabs to four spaces

* fix: replace .length() == 0 with .isEmpty for color name string

* fix Javadoc name parameter in CellFormatPart.getColor()

* chore: Tidy up CellFormatPart
2025-08-04 16:19:45 +01:00
PJ Fanning
bf4ee6a3b9 another windows test issue 2025-08-03 14:54:34 +01:00
PJ Fanning
e97f1036f0 Update ClassID.java 2025-08-03 14:48:37 +01:00
PJ Fanning
8df560eed2 don't return inner bytes 2025-08-03 14:47:10 +01:00
PJ Fanning
75e9383a5c try test fix again 2025-08-03 14:13:12 +01:00
PJ Fanning
ae232b73d7 windows test issue 2025-08-03 13:54:52 +01:00
PJ Fanning
224201e1a2
check node depth (xslf) (#872) 2025-08-03 01:13:59 +01:00
PJ Fanning
e070250352 Update XSSFReader.java 2025-08-01 21:33:59 +01:00
PJ Fanning
4a9c9271fe
check node depth (#871) 2025-08-01 21:20:17 +01:00
PJ Fanning
3240852e49 Update POIException.java 2025-08-01 20:33:44 +01:00
PJ Fanning
b50ce609ca
check xwpf node depth (#869)
* check xwpf node depth

* Update TestAllFiles.java

* Update TestAllFiles.java
2025-08-01 20:28:05 +01:00
PJ Fanning
fa573c72da add xwpf test 2025-07-30 21:40:21 +01:00
PJ Fanning
a3cca6c017 Update changes.xml 2025-07-30 18:59:18 +01:00
PJ Fanning
8d71c1f2ff add poifs test 2025-07-30 18:54:05 +01:00
PJ Fanning
5c9bb13cd7 Update build.xml 2025-07-30 08:13:49 +01:00
PJ Fanning
99fdda0dc0 commons-compress dependency to 1.28.0 2025-07-30 08:10:54 +01:00
buaazyl
9ebec77aca
Bump commons-compress from 1.27.1 to 1.28.0 (#868)
https://github.com/apache/poi/issues/867
There is a security vulnerability in commons-lang3, with the vulnerability number CVE-2025-48924.
2025-07-30 08:07:10 +01:00
PJ Fanning
bcc7912c8d add message to NPE 2025-07-26 10:25:03 +01:00
PJ Fanning
e18b5576f0 call next release 5.5.0 2025-07-25 15:31:25 +01:00
PJ Fanning
f73913cd84
deprecate old picture type method (#865)
* deprecate old picture type method

* more changes
2025-07-25 15:28:51 +01:00
PJ Fanning
659dcb5dea
try to make lists returned unmodifiable to avoid external manipulation of inner data (#863)
* try to make lists returned unmodifiable to avoid external manipulation of inner data

* ExternalLinksTable list needs to be mutable

* pivot tables need to be modifiable

* refactor

* more

* test issue
2025-07-25 14:43:52 +01:00
PJ Fanning
f1e6b9d11c
remove deprecated method getSeries (#864)
* remove deprecated method getSeries

* Update TestXDDFChartRemoveSeries.java
2025-07-25 13:08:29 +01:00
Jacobo Aragunde Pérez
ebad7593ff
Return unmodifiable lists from XWPFRun charts and pictures. (#862)
The operations XWPFRun.getEmbedded[Pictures|Charts]().add() are not
supported. Users must call XWPFRun.add[Picture|Chart]() instead.

This change will make the fact more explicit, with an error when they
attempt to use the wrong operation.
2025-07-25 08:48:05 +01:00
PJ Fanning
5642c122f3
eager XWPF doc eval (#860)
we've seen evidence in deeply nested docs that it can cause recursion issues when this is lazily evaluated
2025-07-24 21:12:33 +01:00
Jacobo Aragunde Pérez
a96c0d9d78
Implement XWPFRun.getEmbeddedCharts(). (#859)
Returns a list of XWPFChart objects embedded in the run.

Works in a similar way to getEmbeddedPictures(), maintaining a list of
XWPFChart objects. They are retrieved from the XWPFDocument object
through their relation id.
2025-07-24 20:21:37 +01:00
Jacobo Aragunde Pérez
0b9bc5d0b4
Add getters for CTSdt(Content)Cell objects. (#854)
* Add getters for CTSdt(Content)Cell objects.

Currently the XWPFSdt(Content)Cell object just produces a text
equivalent of the content. There is no way to access the inner XML node
for further inspection; instead, one needs to go to the parent object
and iterate over its XML children.

This would allow users to use the XWPFRow.getICells() to obtain
XWPFTableCell or XWPFSDTCell objects, and then access the latter's inner
XML node to get access to its full data.

We also defer the parsing of the text in XWPFContentCell until the
getter is called. A user who will work with the inner XML is unlikely to
need the text parsing done.

* Add javadoc and @since annotation.
2025-07-23 21:33:47 +01:00
PJ Fanning
e5b2fbb89b
add depth check (#858)
* add depth check

* Update XWPFTableCell.java

* Update XWPFTableCell.java

* Update XWPFTableCell.java

* Update XWPFTableCell.java
2025-07-23 20:27:40 +01:00
PJ Fanning
8fc2f7db41 Update PropertyTable.java 2025-07-23 17:55:40 +01:00
PJ Fanning
c76be2df41 depth check in property table 2025-07-23 17:48:52 +01:00
PJ Fanning
7c86c60f7c Revert "avoid unsafe cast to int"
This reverts commit 44da0ea183b87fd8514048ecd510ea57fd3f2b08.
2025-07-23 17:19:45 +01:00
PJ Fanning
44da0ea183 avoid unsafe cast to int 2025-07-23 17:03:24 +01:00
PJ Fanning
f73a9e0875 reformat 2025-07-23 16:55:41 +01:00
PJ Fanning
6bc4a6ebd6 commons-codec 1.19.0 2025-07-23 15:39:11 +01:00
PJ Fanning
45a3e16e7e
add IOUtils.newFile(parent, path) (#855)
* add IOUtils.newFile(parent, path)

* Update IOUtils.java

* Update IOUtils.java
2025-07-23 12:43:18 +01:00
PJ Fanning
1a86f27e7b
junit 5.13.4 (#852) 2025-07-21 17:58:03 +01:00
PJ Fanning
ca104f4be7 commons-io 2.20.0 2025-07-20 01:17:41 +01:00
PJ Fanning
2d4ee2ebef Update build.gradle 2025-07-17 22:21:49 +01:00
PJ Fanning
cace66f52f Update changes.xml 2025-07-17 13:07:15 +01:00
Jacobo Aragunde Pérez
cceccc4bae
Support all possible alignment values for docx tables. (#848)
Besides the start/center/end values specified in the OOXML standard,
Word also uses "left" and "right" as values. We need to support this
to prevent POI code from crashing with such documents.

Fixes: https://bz.apache.org/bugzilla/show_bug.cgi?id=69744
2025-07-17 12:11:46 +01:00
PJ Fanning
f3bf31ac5d avoid creating CTUnderline 2025-07-15 14:08:42 +01:00
Jacobo Aragunde Pérez
73b2874824
Add getters and setters for XWPFTable indentation. (#843)
* Add getters and setters for XWPFTable indentation.

The element tblPr->tblInd represents "table indent from leading margin".
It specifies the indentation which shall be added before the leading
edge of the current table in the document (the left edge in a
left-to-right table, and the right edge in a right-to-left table). This
indentation should shift the table into the text margin by the specified
amount.

This value is specified in the units applied via its type attribute. Any
width value of type pct or auto for this element shall be ignored.

If this element is omitted, then the table shall inherit the table
indentation from the associated table style. If table indentation is
never specified in the style hierarchy, no indentation shall be added to
the parent table. If the resulting justification on any table row is not
left, then this property shall be ignored.

To implement this property, we included a getter and a setter for the
property value, and another couple of getter/setter for the existence
(and validity) or absence of the property itself, for clients to know
they must fall back to the table style.

* Address reviewer comments.
2025-07-15 10:05:17 +01:00
PJ Fanning
d4fc5cd6c0 avoid creating CTTblPr if not needed 2025-07-14 17:05:45 +01:00
PJ Fanning
533fee47c8 junit upgrade 2025-07-13 22:23:48 +01:00
PJ Fanning
94ff481ca9 license top of file 2025-07-11 22:21:55 +01:00
PJ Fanning
22d2efaf5b
Gradle: avoid deprecated buildDir property (#838)
* Gradle: avoid deprecated buildDir property

* try again
2025-07-11 21:40:19 +01:00
PJ Fanning
1eee67fb8b sxssf workbook dispose no longer needed 2025-07-11 19:50:51 +01:00
PJ Fanning
fa9428511a
try to cache xerces security manager (#841) 2025-07-11 15:40:14 +01:00
Dominik Stadler
cb0943970b Site: Add news-item about moving source-repository to Git 2025-07-11 14:43:31 +02:00
PJ Fanning
4166350488
try to remove batik-script build hack (#839)
* try to remove batik-script build hack

* Update build.gradle

* Update build.gradle
2025-07-11 13:05:52 +01:00
PJ Fanning
33d81ae7ef Update ppt-wmf-emf-renderer.xml 2025-07-11 11:35:18 +01:00
PJ Fanning
a1fa00e1d1 Update changes.xml 2025-07-11 11:03:25 +01:00
Dominik Stadler
af4eae815d Jenkins DSL: Remove JDK 18, 19, 20 and 22, disable building for JDK 23 2025-07-10 17:06:12 +02:00
Jacobo Aragunde Pérez
6d8f1901dc
Allow null values in XWPFParagraph.get/setAlignment(). (#829)
* Allow null values in XWPFParagraph.get/setAlignment().

A null value in this field would indicate that the paragraph should
follow the alignment provided by the style hierarchy.

Fixes: https://bz.apache.org/bugzilla/show_bug.cgi?id=69720

* Revert getAlignment() and implement isAlignmentSet() instead.

* Replace test case file.

* Implement XWPFParagraph.getTCPPr(create).

It lets the caller choose if a new PPr should be created in case it
doesn't exist.

* use getCTPPr(boolean)

* compile issue

---------

Co-authored-by: PJ Fanning <pjfanning@users.noreply.github.com>
2025-07-09 20:00:14 +01:00
PJ Fanning
550be7c201 Update changes.xml 2025-07-08 23:39:50 +01:00
PJ Fanning
b5f67fca04
bug-69727 decrease count when we remove merged regions (#837)
* bug-69727 decrease count when we remove merged regions

* extend test

* fix tests
2025-07-08 23:21:35 +01:00
PJ Fanning
07fa0b88e0 Update SavePasswordProtectedXlsx.java 2025-07-08 22:42:37 +01:00
PJ Fanning
e1d943e294 Update changes.xml 2025-07-08 21:41:21 +01:00
PJ Fanning
8fa36ff3df remove svn jars 2025-07-08 21:37:47 +01:00
Vengador
bbd404f343
Bugfix setBulletStyle in XSLFTextParagraph (#770)
* Bugfix setBulletStyle in XSLFTextParagraph

Having a 0 here throws IllegalArgumentException, the method setBulletAutoNumber requires 1 as minimun as argument

* tests added for setBulletStyle fix
2025-07-08 16:42:19 +01:00
PJ Fanning
0c3cc9a5e1
Update publish-poi-site.txt 2025-07-08 16:40:29 +01:00
PJ Fanning
024f1d3348 Update guidelines.xml 2025-07-08 12:05:16 +01:00
PJ Fanning
ef16723148 stray svn refs 2025-07-08 03:56:41 +01:00
PJ Fanning
f76089be67 rename xml file 2025-07-08 03:44:08 +01:00
PJ Fanning
8e5d6fe026 update docs 2025-07-08 03:40:26 +01:00
PJ Fanning
39e5ac2906 replace svn refs 2025-07-08 02:55:11 +01:00
PJ Fanning
18fc855e66
Update .asf.yaml 2025-07-08 01:47:14 +01:00
PJ Fanning
f2df929adb move over latest docuementation files from poi-site 2025-07-08 00:39:04 +01:00
PJ Fanning
5b8ff77997
Update .asf.yaml 2025-07-07 23:08:52 +01:00
PJ Fanning
2f66c63387 git repo 2025-07-07 23:07:39 +01:00
PJ Fanning
4fb39a6b09 gradle 8.14.3 2025-07-07 22:58:42 +01:00
PJ Fanning
eb91cfad93 Update create_jobs.groovy 2025-07-07 22:51:00 +01:00
PJ Fanning
6928a6ca2e Update create_jobs.groovy 2025-07-07 22:43:10 +01:00
PJ Fanning
102db731df Update create_jobs.groovy 2025-07-07 22:28:07 +01:00
PJ Fanning
d72b25d83b Update create_jobs.groovy 2025-07-07 22:21:13 +01:00
PJ Fanning
8c13001762 Update create_jobs.groovy 2025-07-07 22:10:43 +01:00
PJ Fanning
c88b9e0e76 try to switch poi ci builds to git 2025-07-07 21:59:17 +01:00
PJ Fanning
7333f6a7d0 Update build.xml 2025-07-07 11:25:04 +01:00
dependabot[bot]
521aab62da
Bump net.sf.saxon:Saxon-HE from 12.7 to 12.8 (#835)
Bumps net.sf.saxon:Saxon-HE from 12.7 to 12.8.

---
updated-dependencies:
- dependency-name: net.sf.saxon:Saxon-HE
  dependency-version: '12.8'
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-07 11:21:50 +01:00
dependabot[bot]
10675900c6
Bump org.junit.jupiter:junit-jupiter from 5.13.2 to 5.13.3 (#836)
Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit-framework) from 5.13.2 to 5.13.3.
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.2...r5.13.3)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-version: 5.13.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-07 11:21:34 +01:00
dependabot[bot]
e2a9a66428
Bump junitVersion from 5.13.2 to 5.13.3 (#834)
Bumps `junitVersion` from 5.13.2 to 5.13.3.

Updates `org.junit:junit-bom` from 5.13.2 to 5.13.3
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.2...r5.13.3)

Updates `org.junit.jupiter:junit-jupiter-api` from 5.13.2 to 5.13.3
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.2...r5.13.3)

Updates `org.junit.jupiter:junit-jupiter-engine` from 5.13.2 to 5.13.3
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.2...r5.13.3)

---
updated-dependencies:
- dependency-name: org.junit:junit-bom
  dependency-version: 5.13.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.junit.jupiter:junit-jupiter-api
  dependency-version: 5.13.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-version: 5.13.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-07 11:21:05 +01:00
PJ Fanning
631d8aecc4
Update .asf.yaml 2025-07-07 11:19:33 +01:00
PJ Fanning
67320b6453 xmlunit 2.10.3
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1926704 13f79535-47bb-0310-9956-ffa450edef68
2025-06-24 15:14:27 +00:00
PJ Fanning
b6f3fa0c42 junit 5.13.2
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1926703 13f79535-47bb-0310-9956-ffa450edef68
2025-06-24 15:13:35 +00:00
PJ Fanning
73c4de16e4 try to tidy up jupiter dependency by using the junit-bom
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1926702 13f79535-47bb-0310-9956-ffa450edef68
2025-06-24 13:51:52 +00:00
PJ Fanning
c784266438 [bug-69681] allow 1 optional space in date formats before the AM/PM part
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1926508 13f79535-47bb-0310-9956-ffa450edef68
2025-06-17 17:18:12 +00:00
PJ Fanning
779358f309 [bug-69714] refactor thread-local
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1926472 13f79535-47bb-0310-9956-ffa450edef68
2025-06-16 12:41:33 +00:00
PJ Fanning
f51cff5e76 [bug-69714] add TempFile.withStrategy. Thanks to Attila Kelemen. This closes #825
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1926471 13f79535-47bb-0310-9956-ffa450edef68
2025-06-16 12:16:28 +00:00
PJ Fanning
2ceb5f9020 [bug-69714] refactor thread-local
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1926469 13f79535-47bb-0310-9956-ffa450edef68
2025-06-16 12:05:42 +00:00
PJ Fanning
4080ab8f3f [bug-69714] refactor test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1926467 13f79535-47bb-0310-9956-ffa450edef68
2025-06-16 11:14:55 +00:00
PJ Fanning
6605569862 [bug-69714] add thread local support for overriding TempFile strategy
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1926466 13f79535-47bb-0310-9956-ffa450edef68
2025-06-16 11:01:40 +00:00
PJ Fanning
9c08d29fcb [bug-69714] add thread local support for overriding TempFile strategy
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1926465 13f79535-47bb-0310-9956-ffa450edef68
2025-06-16 10:54:41 +00:00
PJ Fanning
adc6d13f3a typo
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1926447 13f79535-47bb-0310-9956-ffa450edef68
2025-06-15 14:48:37 +00:00
PJ Fanning
d8b3934646 [bug-69715] update tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1926446 13f79535-47bb-0310-9956-ffa450edef68
2025-06-15 14:22:41 +00:00
PJ Fanning
47f2d72d35 add new line
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1926445 13f79535-47bb-0310-9956-ffa450edef68
2025-06-15 14:15:22 +00:00
PJ Fanning
e5ac02f7d0 [bug-69715] in DefaultTempFileCreationStrategy, allow initDir to not yet exist
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1926444 13f79535-47bb-0310-9956-ffa450edef68
2025-06-15 14:14:07 +00:00
Dominik Stadler
f6c1cbd229 Revert spotbugs to keep compatible with JDK 8
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1926442 13f79535-47bb-0310-9956-ffa450edef68
2025-06-15 13:40:07 +00:00
Dominik Stadler
d2cc0b770c Jenkins DSL: Add JDK 25, use Gradle for JDK 24, disable JDK 23, add JDK 26 to Test-Environment-Job
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1926441 13f79535-47bb-0310-9956-ffa450edef68
2025-06-15 13:36:50 +00:00
Dominik Stadler
92e7a8a417 Update JaCoCo to 0.8.13
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1926440 13f79535-47bb-0310-9956-ffa450edef68
2025-06-15 13:36:46 +00:00
Dominik Stadler
d0ad6030d2 Ant-build: Add missing dependency on Guava failureaccess
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1926439 13f79535-47bb-0310-9956-ffa450edef68
2025-06-15 13:36:43 +00:00
Dominik Stadler
b5b489f7fd Ant-build: xmlgraphics-commons needs update to match updated batik-version
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1926438 13f79535-47bb-0310-9956-ffa450edef68
2025-06-15 13:36:39 +00:00
PJ Fanning
c5df00b0a7 [bug-69715] add tests removing an old invalid one
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1926424 13f79535-47bb-0310-9956-ffa450edef68
2025-06-14 21:18:13 +00:00
PJ Fanning
c5ca5ae065 [bug-69715] in DefaultTempFileCreationStrategy, check that dir exists
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1926422 13f79535-47bb-0310-9956-ffa450edef68
2025-06-14 21:02:34 +00:00
PJ Fanning
a6f65db642 remove import
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1926415 13f79535-47bb-0310-9956-ffa450edef68
2025-06-14 14:15:47 +00:00
PJ Fanning
c01228c331 [bug-69697] HSLF getPictureData can return null for some pictures
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1926414 13f79535-47bb-0310-9956-ffa450edef68
2025-06-14 14:14:15 +00:00
PJ Fanning
2ca7114a8f spotbugs upgrade
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1926413 13f79535-47bb-0310-9956-ffa450edef68
2025-06-14 13:53:35 +00:00
PJ Fanning
6b968e64a5 junit 5.13.1
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1926315 13f79535-47bb-0310-9956-ffa450edef68
2025-06-10 10:35:53 +00:00
PJ Fanning
8767e243e3 xmlsec 3.0.6
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1926195 13f79535-47bb-0310-9956-ffa450edef68
2025-06-06 22:10:51 +00:00
PJ Fanning
9e7873267a bouncycastle 1.81
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1926118 13f79535-47bb-0310-9956-ffa450edef68
2025-06-04 14:22:26 +00:00
PJ Fanning
cf254c06f6 junit 5.13.0
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925990 13f79535-47bb-0310-9956-ffa450edef68
2025-05-30 15:12:15 +00:00
PJ Fanning
c8fc8a36a9 reorder map
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925974 13f79535-47bb-0310-9956-ffa450edef68
2025-05-30 09:34:42 +00:00
PJ Fanning
de1c2b67d7 add checks
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925939 13f79535-47bb-0310-9956-ffa450edef68
2025-05-29 16:07:27 +00:00
PJ Fanning
c5af268cc9 upgrade deps
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925938 13f79535-47bb-0310-9956-ffa450edef68
2025-05-29 15:55:30 +00:00
PJ Fanning
9a4a4270ec add missing types to CellUtil.namePropertyMap
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925936 13f79535-47bb-0310-9956-ffa450edef68
2025-05-29 15:53:22 +00:00
PJ Fanning
17cb74b3ff [bug-66687] Combination of XSSF and SXSSF may result in invalid files. Thanks to Martin Schloemer. This closes #814
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925881 13f79535-47bb-0310-9956-ffa450edef68
2025-05-27 21:52:20 +00:00
PJ Fanning
378a0bed06 [bug-69669] refactor
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925874 13f79535-47bb-0310-9956-ffa450edef68
2025-05-27 20:15:50 +00:00
PJ Fanning
16b53a8bc7 [bug-69669] try to share some code between the old code that I brought back and the newer code that caused the problems
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925872 13f79535-47bb-0310-9956-ffa450edef68
2025-05-27 18:48:31 +00:00
PJ Fanning
d189f69333 remove temp test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925871 13f79535-47bb-0310-9956-ffa450edef68
2025-05-27 18:03:51 +00:00
PJ Fanning
35a6ae72be [bug-69669] revert some changes in HSLF placeholder creation due to issue with addTitle
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925870 13f79535-47bb-0310-9956-ffa450edef68
2025-05-27 18:02:22 +00:00
PJ Fanning
67b0dc3966 try to avoid recreating HSLFShapePlaceholderDetails
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925869 13f79535-47bb-0310-9956-ffa450edef68
2025-05-27 17:34:05 +00:00
PJ Fanning
c1dc0c6130 te
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925864 13f79535-47bb-0310-9956-ffa450edef68
2025-05-27 11:56:43 +00:00
PJ Fanning
3c7d8dc8bc gradle 8.14.1
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925790 13f79535-47bb-0310-9956-ffa450edef68
2025-05-24 18:43:55 +00:00
PJ Fanning
6f1a81ac8c upgrade deps
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925765 13f79535-47bb-0310-9956-ffa450edef68
2025-05-23 14:40:37 +00:00
PJ Fanning
2880483f13 upgrade guava and xmlunit
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925698 13f79535-47bb-0310-9956-ffa450edef68
2025-05-19 16:00:09 +00:00
PJ Fanning
b461e98edb code refactor
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925650 13f79535-47bb-0310-9956-ffa450edef68
2025-05-17 17:00:58 +00:00
PJ Fanning
f298390ec3 code refactor
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925649 13f79535-47bb-0310-9956-ffa450edef68
2025-05-17 16:46:23 +00:00
PJ Fanning
426371301f code refactor
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925648 13f79535-47bb-0310-9956-ffa450edef68
2025-05-17 16:35:42 +00:00
PJ Fanning
5c6b59aea4 code refactor
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925647 13f79535-47bb-0310-9956-ffa450edef68
2025-05-17 16:02:13 +00:00
PJ Fanning
b76bbc866e code refactor
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925646 13f79535-47bb-0310-9956-ffa450edef68
2025-05-17 15:57:29 +00:00
PJ Fanning
62b351cbeb bring together CTRunTrackChange code
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925611 13f79535-47bb-0310-9956-ffa450edef68
2025-05-17 09:57:02 +00:00
PJ Fanning
e17ddb0374 bring together CTRunTrackChange code
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925610 13f79535-47bb-0310-9956-ffa450edef68
2025-05-17 09:52:20 +00:00
PJ Fanning
40beab6b6c revert change
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925576 13f79535-47bb-0310-9956-ffa450edef68
2025-05-16 08:57:02 +00:00
PJ Fanning
51316e01d8 saxon 12.7
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925575 13f79535-47bb-0310-9956-ffa450edef68
2025-05-16 08:55:40 +00:00
PJ Fanning
1b0f62a235 add tests for cell style cloning
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925551 13f79535-47bb-0310-9956-ffa450edef68
2025-05-14 16:49:33 +00:00
PJ Fanning
9df7326140 [bug-69688] add test case based on one provided by Dan S
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925538 13f79535-47bb-0310-9956-ffa450edef68
2025-05-13 17:56:07 +00:00
PJ Fanning
7363d0483a deprecation warning
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925537 13f79535-47bb-0310-9956-ffa450edef68
2025-05-13 17:44:38 +00:00
PJ Fanning
de0d120d69 [bug-69688] only try to get formula if the cell is of formula type
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925536 13f79535-47bb-0310-9956-ffa450edef68
2025-05-13 17:35:25 +00:00
PJ Fanning
cbf6577172 try best effort clone of styles if types don't match
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925525 13f79535-47bb-0310-9956-ffa450edef68
2025-05-12 22:54:46 +00:00
PJ Fanning
2f55495ba9 try best effort clone of styles if types don't match
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925524 13f79535-47bb-0310-9956-ffa450edef68
2025-05-12 22:27:42 +00:00
PJ Fanning
dce1a83169 extend test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925505 13f79535-47bb-0310-9956-ffa450edef68
2025-05-11 16:02:06 +00:00
PJ Fanning
ebd9a8bc9a extend test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925503 13f79535-47bb-0310-9956-ffa450edef68
2025-05-11 14:11:28 +00:00
PJ Fanning
3f9153c761 try to avoid class cast issues
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925502 13f79535-47bb-0310-9956-ffa450edef68
2025-05-11 13:45:31 +00:00
PJ Fanning
3ee613c336 javadoc build issue
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925501 13f79535-47bb-0310-9956-ffa450edef68
2025-05-11 13:31:00 +00:00
PJ Fanning
85212023d6 try to avoid class cast issues
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925500 13f79535-47bb-0310-9956-ffa450edef68
2025-05-11 13:26:06 +00:00
PJ Fanning
39935860ed support colors as byte[]
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925499 13f79535-47bb-0310-9956-ffa450edef68
2025-05-11 11:08:13 +00:00
PJ Fanning
bbccb5217f refactor
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925498 13f79535-47bb-0310-9956-ffa450edef68
2025-05-11 10:57:06 +00:00
PJ Fanning
1f6c32bd55 refactor font test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925497 13f79535-47bb-0310-9956-ffa450edef68
2025-05-11 10:55:31 +00:00
PJ Fanning
1b0632f3f1 support colors as byte[]
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925496 13f79535-47bb-0310-9956-ffa450edef68
2025-05-11 10:20:27 +00:00
PJ Fanning
783ebda7f3 reformat
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925495 13f79535-47bb-0310-9956-ffa450edef68
2025-05-11 09:56:45 +00:00
PJ Fanning
7981ea397f deprecate old constructor
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925494 13f79535-47bb-0310-9956-ffa450edef68
2025-05-11 09:49:57 +00:00
PJ Fanning
6a68902aee typo
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925492 13f79535-47bb-0310-9956-ffa450edef68
2025-05-11 08:03:59 +00:00
PJ Fanning
8bac1b33f6 [github-806] HSSFColor: Reduce use of java.awt.Color. Thanks to Jaroslav Tulach. This closes #806
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925491 13f79535-47bb-0310-9956-ffa450edef68
2025-05-11 07:37:23 +00:00
PJ Fanning
9f43059a37 [github-803] Add support for SHEET function. Thanks to Richard V. This closes #803
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925484 13f79535-47bb-0310-9956-ffa450edef68
2025-05-10 09:23:11 +00:00
PJ Fanning
9fafa45bac allow ATP function override
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925445 13f79535-47bb-0310-9956-ffa450edef68
2025-05-06 21:20:46 +00:00
PJ Fanning
1d510c7fc3 allow ATP function override
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925444 13f79535-47bb-0310-9956-ffa450edef68
2025-05-06 21:19:43 +00:00
PJ Fanning
a7231a3764 allow ATP function override
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925443 13f79535-47bb-0310-9956-ffa450edef68
2025-05-06 20:49:57 +00:00
PJ Fanning
cdcc14d6e3 allow ATP function override
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925442 13f79535-47bb-0310-9956-ffa450edef68
2025-05-06 20:29:55 +00:00
PJ Fanning
a56b68476f batik 1.19
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925441 13f79535-47bb-0310-9956-ffa450edef68
2025-05-06 20:16:55 +00:00
PJ Fanning
e867e371be typos (an)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925440 13f79535-47bb-0310-9956-ffa450edef68
2025-05-06 20:12:35 +00:00
PJ Fanning
eb89c043dc batik 1.19
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925439 13f79535-47bb-0310-9956-ffa450edef68
2025-05-06 20:01:53 +00:00
Dominik Stadler
7aa4ae3bc1 Bug 69667: Test more variants of valid and invalid usernames
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925429 13f79535-47bb-0310-9956-ffa450edef68
2025-05-06 06:04:44 +00:00
PJ Fanning
c37b4ee0d5 add test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925420 13f79535-47bb-0310-9956-ffa450edef68
2025-05-05 18:43:08 +00:00
Dominik Stadler
9e30ffc0de Bug 69667: Handle slightly broken WriteAccessRecord gracefully
It seems some software creates records with invalid length.

If it uses UTF-16LE encoding, we can end up with 109 bytes, 
which is invalid as UTF-16LE always requires an even number of 
bytes.

Therefor we now sanitize the number of bytes we read from the 
record to avoid this issue.

Also improve error message and add tests

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925419 13f79535-47bb-0310-9956-ffa450edef68
2025-05-05 17:23:59 +00:00
PJ Fanning
22192ce2cc add SHEET function to list of allowed functions
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925374 13f79535-47bb-0310-9956-ffa450edef68
2025-05-02 23:26:16 +00:00
PJ Fanning
2052a9be7d saxon 12.5 (issues with 12.6)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925373 13f79535-47bb-0310-9956-ffa450edef68
2025-05-02 18:42:45 +00:00
PJ Fanning
68d6e0cf9f gradle 8.14
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925370 13f79535-47bb-0310-9956-ffa450edef68
2025-05-02 15:23:27 +00:00
PJ Fanning
287d90ee8f saxon 12.6
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925366 13f79535-47bb-0310-9956-ffa450edef68
2025-05-02 15:14:40 +00:00
PJ Fanning
f73f377af4 pdfbox 3.0.5
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925364 13f79535-47bb-0310-9956-ffa450edef68
2025-05-02 15:13:35 +00:00
PJ Fanning
e458192cf2 upgrade plugins
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925353 13f79535-47bb-0310-9956-ffa450edef68
2025-05-01 13:16:14 +00:00
PJ Fanning
fe0a4f1166 [bug-69658] use EnumMap elsewhere
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925251 13f79535-47bb-0310-9956-ffa450edef68
2025-04-24 11:25:00 +00:00
PJ Fanning
691c8baa5a [bug-69658] use EnumMap elsewhere
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925250 13f79535-47bb-0310-9956-ffa450edef68
2025-04-24 11:21:36 +00:00
PJ Fanning
712c484a65 [bug-69658] use EnumMap in CellUtil
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925249 13f79535-47bb-0310-9956-ffa450edef68
2025-04-24 10:31:04 +00:00
PJ Fanning
421837d2c5 spotbugs upgrade
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925240 13f79535-47bb-0310-9956-ffa450edef68
2025-04-23 20:09:55 +00:00
PJ Fanning
694538aed0 commons-collections 4.5.0
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925238 13f79535-47bb-0310-9956-ffa450edef68
2025-04-23 19:44:41 +00:00
PJ Fanning
82aac8561f module-info (commons-collections)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925237 13f79535-47bb-0310-9956-ffa450edef68
2025-04-23 19:22:55 +00:00
Dominik Stadler
f9e692aa5d Enable spotbugs on newer JDKs, disable JDK 22, remove JDK 18, 19, 20, add JDK 24 for XMLBeans
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925204 13f79535-47bb-0310-9956-ffa450edef68
2025-04-21 17:42:23 +00:00
Dominik Stadler
0036655df4 ForbiddenApis: Adjust for deprecations in JDK 21+
Fix failures reported when raising the language level to 23
new URL() is deprecated
new Locale() is deprecated
still allow ThreadDeath and Thread.getId() for now to keep support for JDK 8

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925199 13f79535-47bb-0310-9956-ffa450edef68
2025-04-21 12:07:21 +00:00
Dominik Stadler
db61f5b4be Avoid race-condition with sample-file being changed/empty
Also improve output EmptyfileException

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925190 13f79535-47bb-0310-9956-ffa450edef68
2025-04-21 08:51:13 +00:00
Dominik Stadler
3d66281e6d Add more output to test to try to see why it fails now with JDK 23
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925189 13f79535-47bb-0310-9956-ffa450edef68
2025-04-21 08:51:08 +00:00
Dominik Stadler
dda779c4a0 Update spotbugs to check if this adds support for JDK 24
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925188 13f79535-47bb-0310-9956-ffa450edef68
2025-04-21 08:51:04 +00:00
Dominik Stadler
85aa74414c Add test which populates cells with null string
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925187 13f79535-47bb-0310-9956-ffa450edef68
2025-04-21 08:51:02 +00:00
Dominik Stadler
7c9a1ce89b Delete one more outdated jar-file
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925186 13f79535-47bb-0310-9956-ffa450edef68
2025-04-21 08:50:58 +00:00
Dominik Stadler
121c5f2aaf Update to latest supported JDK version of forbiddenapis
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925185 13f79535-47bb-0310-9956-ffa450edef68
2025-04-21 08:50:55 +00:00
PJ Fanning
be33cd61d1 junit 5.12.2
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925091 13f79535-47bb-0310-9956-ffa450edef68
2025-04-15 08:52:18 +00:00
PJ Fanning
5c82a0890c build issues due to commons-io 2.19.0
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925059 13f79535-47bb-0310-9956-ffa450edef68
2025-04-12 18:56:26 +00:00
PJ Fanning
eaff2ac8ce commons-io 2.19.0
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925057 13f79535-47bb-0310-9956-ffa450edef68
2025-04-12 18:02:25 +00:00
PJ Fanning
993cc5a5b8 use isEmpty
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925003 13f79535-47bb-0310-9956-ffa450edef68
2025-04-10 19:02:59 +00:00
PJ Fanning
92d4a8d86d use isEmpty
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925002 13f79535-47bb-0310-9956-ffa450edef68
2025-04-10 18:48:01 +00:00
PJ Fanning
b3d0fe52d3 [bug-69628] more changes to getMax methods
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1924994 13f79535-47bb-0310-9956-ffa450edef68
2025-04-10 13:58:44 +00:00
PJ Fanning
f2179098fe [bug-69628] more changes to getMax methods
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1924993 13f79535-47bb-0310-9956-ffa450edef68
2025-04-10 13:51:20 +00:00
PJ Fanning
f91ff62a55 [bug-69628] more changes to getMax methods
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1924992 13f79535-47bb-0310-9956-ffa450edef68
2025-04-10 13:47:33 +00:00
PJ Fanning
8bf71069cd [bug-69646] add tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1924986 13f79535-47bb-0310-9956-ffa450edef68
2025-04-10 08:08:22 +00:00
PJ Fanning
6cbc6694ab tidy up
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1924981 13f79535-47bb-0310-9956-ffa450edef68
2025-04-09 21:34:05 +00:00
PJ Fanning
7e3a404e4d tidy up
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1924980 13f79535-47bb-0310-9956-ffa450edef68
2025-04-09 21:31:39 +00:00
PJ Fanning
78ed7db257 [bug-69646] check for null _fd instance in dispose call
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1924979 13f79535-47bb-0310-9956-ffa450edef68
2025-04-09 21:31:25 +00:00
PJ Fanning
ae494ff2ef [bug-69646] check for null _fd instance in dispose call
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1924978 13f79535-47bb-0310-9956-ffa450edef68
2025-04-09 21:30:50 +00:00
Dominik Stadler
c6eb5b7b85 Exclude two more files when running tests with "no-scratchpad"
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1924886 13f79535-47bb-0310-9956-ffa450edef68
2025-04-07 05:45:39 +00:00
PJ Fanning
6cddf8be2d snapshot
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1924881 13f79535-47bb-0310-9956-ffa450edef68
2025-04-06 16:43:30 +00:00
PJ Fanning
f5f985f469 poi 5.4.1
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1924878 13f79535-47bb-0310-9956-ffa450edef68
2025-04-06 16:39:21 +00:00
PJ Fanning
618c129a98 forbiddenapis 3.9
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1924877 13f79535-47bb-0310-9956-ffa450edef68
2025-04-06 16:29:49 +00:00
PJ Fanning
fbd97d7672 prep 5.4.1
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1924733 13f79535-47bb-0310-9956-ffa450edef68
2025-04-01 19:56:00 +00:00
PJ Fanning
e3bb8c3032 bytebuddy 1.17.5
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1924715 13f79535-47bb-0310-9956-ffa450edef68
2025-03-31 19:59:03 +00:00
PJ Fanning
1f3d2a5c50 graphics2d 3.0.3
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1924714 13f79535-47bb-0310-9956-ffa450edef68
2025-03-31 19:57:52 +00:00
PJ Fanning
cdb8fad845 [bug-69628] in ZipArchiveFakeEntry, use min of IOUtils and ZipArchiveFakeEntry entry size limits
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1924657 13f79535-47bb-0310-9956-ffa450edef68
2025-03-27 09:32:19 +00:00
PJ Fanning
dbfe354b4a [bug-69628] add test case
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1924644 13f79535-47bb-0310-9956-ffa450edef68
2025-03-26 20:54:05 +00:00
PJ Fanning
9a6bd3902d [bug-69628] add test case
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1924643 13f79535-47bb-0310-9956-ffa450edef68
2025-03-26 20:52:10 +00:00
PJ Fanning
f90274e518 [bug-69628] make IOUtils more tolerant of len < 0
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1924601 13f79535-47bb-0310-9956-ffa450edef68
2025-03-25 21:12:23 +00:00
PJ Fanning
82784172b4 [bug-69628] make ZipArchiveFakeEntry.setMaxEntrySize publicly accessible
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1924595 13f79535-47bb-0310-9956-ffa450edef68
2025-03-25 16:41:19 +00:00
PJ Fanning
6096d55d23 bytebuddy 1.17.4
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1924594 13f79535-47bb-0310-9956-ffa450edef68
2025-03-25 16:11:49 +00:00
PJ Fanning
d8a2bbb900 [bug-69628] make ZipArchiveFakeEntry.setMaxEntrySize publicly accessible
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1924593 13f79535-47bb-0310-9956-ffa450edef68
2025-03-25 16:08:59 +00:00
PJ Fanning
a076204fac add test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1924539 13f79535-47bb-0310-9956-ffa450edef68
2025-03-23 20:59:01 +00:00
PJ Fanning
9b800c82d7 upgrade gradle plugin
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1924538 13f79535-47bb-0310-9956-ffa450edef68
2025-03-23 13:59:33 +00:00
PJ Fanning
42deaab12c junit 5.12.1
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1924537 13f79535-47bb-0310-9956-ffa450edef68
2025-03-23 13:57:05 +00:00
PJ Fanning
c16e98e5b2 bytebuddy 1.17.2
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1924536 13f79535-47bb-0310-9956-ffa450edef68
2025-03-23 13:56:06 +00:00
PJ Fanning
49aef015a8 fix test issue
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1924535 13f79535-47bb-0310-9956-ffa450edef68
2025-03-23 11:17:30 +00:00
PJ Fanning
70a69a4917 partially revert cell toString changes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1924534 13f79535-47bb-0310-9956-ffa450edef68
2025-03-23 11:00:33 +00:00
PJ Fanning
71dcabc947 partially revert cell toString changes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1924533 13f79535-47bb-0310-9956-ffa450edef68
2025-03-23 10:59:43 +00:00
PJ Fanning
82388de909 [bug-69618] fix test issue
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1924499 13f79535-47bb-0310-9956-ffa450edef68
2025-03-20 12:20:47 +00:00
fanningpj
26883c2d8c [bug-69618] ZipPackage save should check that intermediate steps succeed
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1924496 13f79535-47bb-0310-9956-ffa450edef68
2025-03-20 11:56:45 +00:00
PJ Fanning
2c8ab79a78 [bug-69618] ZipPackage save should check that intermediate steps succeed
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1924495 13f79535-47bb-0310-9956-ffa450edef68
2025-03-20 11:54:19 +00:00
PJ Fanning
aa964c385d [github-775] Allow some OPC compliance checks to be tuned. Thanks to Ken Reese. This closes #775
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1924476 13f79535-47bb-0310-9956-ffa450edef68
2025-03-19 20:38:10 +00:00
PJ Fanning
410653681e add arbitrary extra width support to XSSFSheet
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1924335 13f79535-47bb-0310-9956-ffa450edef68
2025-03-12 14:53:23 +00:00
PJ Fanning
502a0f756e cyclonedx 2.2.0
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1924324 13f79535-47bb-0310-9956-ffa450edef68
2025-03-11 23:56:02 +00:00
PJ Fanning
7babbd11a6 reformat
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1924323 13f79535-47bb-0310-9956-ffa450edef68
2025-03-11 23:47:19 +00:00
PJ Fanning
af040998f4 fix spelling of separate
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1924321 13f79535-47bb-0310-9956-ffa450edef68
2025-03-11 23:44:59 +00:00
PJ Fanning
064225a488 gradle 8.13
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1924065 13f79535-47bb-0310-9956-ffa450edef68
2025-02-26 21:43:31 +00:00
PJ Fanning
9bef52fc6e slf4j 2.0.17
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1924063 13f79535-47bb-0310-9956-ffa450edef68
2025-02-26 21:41:17 +00:00
PJ Fanning
40e7c815cf doc for getNumberOfTexts
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1924041 13f79535-47bb-0310-9956-ffa450edef68
2025-02-25 12:20:28 +00:00
Bida Fan
6d8bd2dcfa Bug 66260, Add getNumberOfTexts() method
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1924026 13f79535-47bb-0310-9956-ffa450edef68
2025-02-25 03:01:37 +00:00
PJ Fanning
ac9d37875d junit 5.12/1.12
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923967 13f79535-47bb-0310-9956-ffa450edef68
2025-02-21 19:24:02 +00:00
PJ Fanning
ed47184865 fix broken xssf test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923883 13f79535-47bb-0310-9956-ffa450edef68
2025-02-17 20:41:36 +00:00
PJ Fanning
9e64e029e0 add datetime test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923882 13f79535-47bb-0310-9956-ffa450edef68
2025-02-17 20:34:51 +00:00
PJ Fanning
5b12033b99 add datetime test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923881 13f79535-47bb-0310-9956-ffa450edef68
2025-02-17 20:23:13 +00:00
PJ Fanning
dbaf834459 fix problem test (SXXSF)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923820 13f79535-47bb-0310-9956-ffa450edef68
2025-02-14 21:27:38 +00:00
PJ Fanning
7d87f1b5cd fix problem test (SXXSF)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923819 13f79535-47bb-0310-9956-ffa450edef68
2025-02-14 21:25:55 +00:00
PJ Fanning
bd6fddbcc4 temp disable problem test (XSSF)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923798 13f79535-47bb-0310-9956-ffa450edef68
2025-02-13 23:17:01 +00:00
PJ Fanning
41d42717d4 temp disable problem test (SXXSF)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923797 13f79535-47bb-0310-9956-ffa450edef68
2025-02-13 22:55:05 +00:00
PJ Fanning
3be17c823d fix some of the broken tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923796 13f79535-47bb-0310-9956-ffa450edef68
2025-02-13 22:21:51 +00:00
PJ Fanning
961c83fb4e fix some of the broken tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923795 13f79535-47bb-0310-9956-ffa450edef68
2025-02-13 22:03:23 +00:00
PJ Fanning
50dcbd390b fix some of the broken tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923794 13f79535-47bb-0310-9956-ffa450edef68
2025-02-13 21:40:26 +00:00
PJ Fanning
f61dddea12 allow context to be set in XSSFSheet copyRows
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923793 13f79535-47bb-0310-9956-ffa450edef68
2025-02-13 21:02:09 +00:00
PJ Fanning
ca8014ebef refactor cell toString to use DataFormatter
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923790 13f79535-47bb-0310-9956-ffa450edef68
2025-02-13 20:24:17 +00:00
PJ Fanning
694765368e [bug-69583] DateUtil needs to handle time only dates (issue with 1900 format dates)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923785 13f79535-47bb-0310-9956-ffa450edef68
2025-02-13 12:34:38 +00:00
PJ Fanning
8ad10c0ed7 format
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923782 13f79535-47bb-0310-9956-ffa450edef68
2025-02-13 10:55:37 +00:00
PJ Fanning
3a3effca65 [bug-69583] when copying cells with dates - prefer using the numeric data directly
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923780 13f79535-47bb-0310-9956-ffa450edef68
2025-02-13 10:53:16 +00:00
PJ Fanning
d6d403371a add some doc
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923767 13f79535-47bb-0310-9956-ffa450edef68
2025-02-12 23:52:17 +00:00
PJ Fanning
bff0b98095 [bug-69583] when copying cells with dates - prefer using the numeric data directly
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923766 13f79535-47bb-0310-9956-ffa450edef68
2025-02-12 22:09:44 +00:00
PJ Fanning
ed744e15b4 remove line
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923765 13f79535-47bb-0310-9956-ffa450edef68
2025-02-12 21:56:12 +00:00
PJ Fanning
219f43b4ee gradle 8.12.1
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923737 13f79535-47bb-0310-9956-ffa450edef68
2025-02-12 00:07:38 +00:00
PJ Fanning
e33595b719 cyclonedx gradle
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923648 13f79535-47bb-0310-9956-ffa450edef68
2025-02-07 21:45:40 +00:00
PJ Fanning
bc11cc335e [bug-69563] try to avoid int overflow in Zip64 code (probably just moves the problem somewhere else though)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923647 13f79535-47bb-0310-9956-ffa450edef68
2025-02-07 21:44:50 +00:00
PJ Fanning
d8ae576afa bytebuddy 1.17.0
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923468 13f79535-47bb-0310-9956-ffa450edef68
2025-01-31 00:30:06 +00:00
PJ Fanning
79e5e6ae16 allow users supply a SheetUtil failover function
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923467 13f79535-47bb-0310-9956-ffa450edef68
2025-01-30 22:29:43 +00:00
PJ Fanning
0f560377be allow users supply a SheetUtil failover function
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923466 13f79535-47bb-0310-9956-ffa450edef68
2025-01-30 22:15:32 +00:00
PJ Fanning
43aded3d9c [bug-69555] need to work around inability to create a TextLayout in another place (caused by missing fonts most likely)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923445 13f79535-47bb-0310-9956-ffa450edef68
2025-01-29 17:24:30 +00:00
PJ Fanning
e51877f5a6 fix create issue in getUnderline
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923440 13f79535-47bb-0310-9956-ffa450edef68
2025-01-29 13:20:25 +00:00
PJ Fanning
72aa1f42a7 commons-codec 1.18.0
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923428 13f79535-47bb-0310-9956-ffa450edef68
2025-01-28 20:04:53 +00:00
PJ Fanning
cc61ad565f pdfbox 3.0.4
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923355 13f79535-47bb-0310-9956-ffa450edef68
2025-01-24 19:29:26 +00:00
Dominik Stadler
1dbcea46d5 Some changes to the Gradle build
Apply IDE suggestions for Gradle build files
Remove obsolete sorting of gradle-wrapper.properties

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923284 13f79535-47bb-0310-9956-ffa450edef68
2025-01-20 20:05:58 +00:00
PJ Fanning
045a37f9c1 bytebuddy 1.16.1
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923278 13f79535-47bb-0310-9956-ffa450edef68
2025-01-20 18:50:09 +00:00
Dominik Stadler
80fd35198d Bug 66425: Avoid exceptions found via poi-fuzz
Prevent too deep nesting by throwing an exception
instead of just not parsing more nesting-levels as
this still caused OOMs.

Allow to adjust the limit via static setter as elsewhere
to give users a chance to parse very complicated files
if really necessary.

https://issues.oss-fuzz.com/issues/42528505

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923277 13f79535-47bb-0310-9956-ffa450edef68
2025-01-20 18:40:32 +00:00
Dominik Stadler
dd647b5d2d Bug 66425: Avoid exceptions found via poi-fuzz
Prevent NullPointerException

Fixes https://issues.oss-fuzz.com/issues/389724915

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923276 13f79535-47bb-0310-9956-ffa450edef68
2025-01-20 18:40:27 +00:00
PJ Fanning
9c24944299 bouncycastle 1.80
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923154 13f79535-47bb-0310-9956-ffa450edef68
2025-01-15 20:16:35 +00:00
PJ Fanning
61f9b79647 remove strat line in last commit
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923153 13f79535-47bb-0310-9956-ffa450edef68
2025-01-15 20:13:46 +00:00
PJ Fanning
ce19c3e761 upgrade cyclonedx
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923152 13f79535-47bb-0310-9956-ffa450edef68
2025-01-15 20:12:49 +00:00
Axel Howind
c85e91e25c remove unused import
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923082 13f79535-47bb-0310-9956-ffa450edef68
2025-01-11 22:56:46 +00:00
Axel Howind
4962a04bbf Support long month names, dot after day, single digit day of month
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923081 13f79535-47bb-0310-9956-ffa450edef68
2025-01-11 22:46:10 +00:00
PJ Fanning
9eda246398 reimplement SXSSFSheet arbitrary extra width support (5.4.0 code does not work)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923071 13f79535-47bb-0310-9956-ffa450edef68
2025-01-11 14:23:49 +00:00
Dominik Stadler
0ab1ccc20a Ensure that test which changes static value does not run at the same time as other tests
Otherwise we get strange test-failures in other places.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923066 13f79535-47bb-0310-9956-ffa450edef68
2025-01-11 10:26:07 +00:00
Dominik Stadler
0f91df9577 Adjust one more JavaDoc link for JDK 23+
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923065 13f79535-47bb-0310-9956-ffa450edef68
2025-01-11 10:26:03 +00:00
Dominik Stadler
86c0db4be1 Bug 58805: Adjust reproducer test-case some more
Do not write a local temp-file
It seems even parsing the resulting document fails

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923063 13f79535-47bb-0310-9956-ffa450edef68
2025-01-11 10:09:01 +00:00
Dominik Stadler
43a15ffaf3 Try to make javadoc building work on JDK 23 and newer
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923062 13f79535-47bb-0310-9956-ffa450edef68
2025-01-11 09:29:36 +00:00
Dominik Stadler
6befe2ad52 Bug 66425: Avoid exceptions found via poi-fuzz
Prevent a NullPointerException

Fixes https://issues.oss-fuzz.com/issues/42537720

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923061 13f79535-47bb-0310-9956-ffa450edef68
2025-01-11 09:24:20 +00:00
Dominik Stadler
76617e9793 Bug 66425: Avoid exceptions found via poi-fuzz
Prevent a NullPointerException

Fixes https://issues.oss-fuzz.com/issues/42537550

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923060 13f79535-47bb-0310-9956-ffa450edef68
2025-01-11 09:24:14 +00:00
Dominik Stadler
57afb34a18 Bug 66425: Avoid exceptions found via poi-fuzz
Prevent a NullPointerException

Fixes https://issues.oss-fuzz.com/issues/379574870

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923059 13f79535-47bb-0310-9956-ffa450edef68
2025-01-11 09:24:08 +00:00
Dominik Stadler
edcbd87360 Bug 66425: Avoid exceptions found via poi-fuzz
Prevent a NullPointerException

Fixes https://issues.oss-fuzz.com/issues/42538163

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923058 13f79535-47bb-0310-9956-ffa450edef68
2025-01-11 09:24:03 +00:00
Dominik Stadler
f873888301 Add a missing xsb which shows up as missing in oss-fuzz runs
Fixes https://issues.oss-fuzz.com/issues/384757273

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923057 13f79535-47bb-0310-9956-ffa450edef68
2025-01-11 09:23:58 +00:00
Dominik Stadler
a4097e05aa Bug 65190: Handle decimal format '0#' the same way as Excel
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923056 13f79535-47bb-0310-9956-ffa450edef68
2025-01-11 09:23:55 +00:00
Dominik Stadler
534d24dc74 Add test for bug 58805
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923055 13f79535-47bb-0310-9956-ffa450edef68
2025-01-11 09:23:50 +00:00
Dominik Stadler
38e7fe63a8 Apply IDE suggestions, code-formating, tests, ...
Add test for DefaultTempFileCreationStrategy
Adjust comments, add test, improve error message

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923054 13f79535-47bb-0310-9956-ffa450edef68
2025-01-11 09:23:46 +00:00
Dominik Stadler
147c034cfd Bug 58571: Add test which shows a workaround
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923053 13f79535-47bb-0310-9956-ffa450edef68
2025-01-11 09:23:39 +00:00
Dominik Stadler
ae9355dcf4 Bug 57603: Apply suggested patch
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923052 13f79535-47bb-0310-9956-ffa450edef68
2025-01-11 09:23:35 +00:00
Dominik Stadler
c1f52674fd Bug 69315: HSMF: At least continue processing properties after multivalued properties
Currently processing stops at multivalued properties.

This at least continues processing, so other properties are processed properly.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923051 13f79535-47bb-0310-9956-ffa450edef68
2025-01-11 09:23:29 +00:00
Dominik Stadler
4f21f5280a Bug 69265: Add test which verifies that Hyperlink Type "Email" is not supported for HSSF
Also update JavaDoc slightly to describe
the special handling of HyperlinkType.EMAIL

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923050 13f79535-47bb-0310-9956-ffa450edef68
2025-01-11 09:23:23 +00:00
Dominik Stadler
3aad12021a Ant: Update XMLBeans to 5.3.0
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923049 13f79535-47bb-0310-9956-ffa450edef68
2025-01-11 09:23:18 +00:00
Dominik Stadler
d52f80eb79 Set version to 5.4.1-SNAPSHOT
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923048 13f79535-47bb-0310-9956-ffa450edef68
2025-01-11 09:23:15 +00:00
PJ Fanning
2c74a961a4 poi release
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922998 13f79535-47bb-0310-9956-ffa450edef68
2025-01-08 19:42:34 +00:00
PJ Fanning
4ca89e156f [bug-69529] relax exception check
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922987 13f79535-47bb-0310-9956-ffa450edef68
2025-01-08 11:56:11 +00:00
PJ Fanning
b0515e7493 [bug-69529] try to workaround cells with numeric type whose format cannot be applied
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922986 13f79535-47bb-0310-9956-ffa450edef68
2025-01-08 11:21:24 +00:00
PJ Fanning
116c32137d [bug-69529] try to workaround cells with numeric type whose format cannot be applied
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922985 13f79535-47bb-0310-9956-ffa450edef68
2025-01-08 11:14:13 +00:00
PJ Fanning
8d73b7ac2b commons-codec 1.17.2
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922976 13f79535-47bb-0310-9956-ffa450edef68
2025-01-07 23:27:58 +00:00
PJ Fanning
91569bd826 nearly 2025
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922796 13f79535-47bb-0310-9956-ffa450edef68
2024-12-31 11:54:55 +00:00
PJ Fanning
018961ea77 try to fix temp file docs
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922789 13f79535-47bb-0310-9956-ffa450edef68
2024-12-30 22:01:17 +00:00
PJ Fanning
75729edcea do not set deleteOnExit if sys prop set to false
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922788 13f79535-47bb-0310-9956-ffa450edef68
2024-12-30 21:48:22 +00:00
PJ Fanning
9951e8dfc1 try to fix temp file docs
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922787 13f79535-47bb-0310-9956-ffa450edef68
2024-12-30 21:46:01 +00:00
PJ Fanning
3f4e7189b3 prep poi 5.4.0
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922754 13f79535-47bb-0310-9956-ffa450edef68
2024-12-29 17:25:15 +00:00
PJ Fanning
39f4085d6c junit update
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922685 13f79535-47bb-0310-9956-ffa450edef68
2024-12-25 10:48:01 +00:00
PJ Fanning
2ebb2938b1 spotbugs update
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922684 13f79535-47bb-0310-9956-ffa450edef68
2024-12-25 10:47:10 +00:00
PJ Fanning
0c3ebbb1bc bytebuddy update
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922683 13f79535-47bb-0310-9956-ffa450edef68
2024-12-25 10:45:59 +00:00
PJ Fanning
83e38afcdb gradle update
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922682 13f79535-47bb-0310-9956-ffa450edef68
2024-12-25 10:45:16 +00:00
Dominik Stadler
1d5497f2c3 Adjust format for DE on JDK 23+ some more
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922680 13f79535-47bb-0310-9956-ffa450edef68
2024-12-25 08:13:18 +00:00
Dominik Stadler
a40ab5a551 Jenkins DSL: Also check current Windows builders for Java versions
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922679 13f79535-47bb-0310-9956-ffa450edef68
2024-12-25 08:13:14 +00:00
Dominik Stadler
d7ca791ace Apply some spelling fixes from GitHub PR #480
Some suggested changes are too invasive so we
can only pick some changes semi-automatically

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922678 13f79535-47bb-0310-9956-ffa450edef68
2024-12-25 08:13:10 +00:00
Dominik Stadler
b92a912e7d Adjust some more for JDK 23/24
There are more date-formats which need to be
defined manually for the German locale now
to work without the COMPAT locale provider
in JDK 23+

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922518 13f79535-47bb-0310-9956-ffa450edef68
2024-12-15 15:24:09 +00:00
PJ Fanning
704e9a5439 log4j 2.24.3
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922507 13f79535-47bb-0310-9956-ffa450edef68
2024-12-15 12:21:30 +00:00
Dominik Stadler
be83ccf2ef Adjust for removed locale provider in JDK 23 and newer
JDK 23 removes the COMPAT/JRE locale provider
which causes some changes to string formatting

Default German data format changed and thus we
need to introduce a custom format.

Also the US format uses some non-breaking spaces now
which we need to handle properly in tests.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922506 13f79535-47bb-0310-9956-ffa450edef68
2024-12-15 11:40:02 +00:00
Dominik Stadler
ba6b755107 Adjust for removed locale provider in JDK 23 and newer
JDK 23 removes the COMPAT/JRE locale provider
which causes some changes to string formatting

Some currency formatting relied on COMPAT to
format US-Dollar, we should override this to
keep the formatting the same way as Excel and
LibreOffice.

Also some tests for Chinese tried to work
around when COMPAT was used, this needs to
take JDK 23 into account when checking

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922500 13f79535-47bb-0310-9956-ffa450edef68
2024-12-14 18:53:03 +00:00
Dominik Stadler
3755101b72 Ant: Update spotbugs to support JDK 21-23
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922497 13f79535-47bb-0310-9956-ffa450edef68
2024-12-14 15:06:34 +00:00
Dominik Stadler
3ee979c767 Versions for spotbugs-libs need to be of a specific version
Using newer versions does not work

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922496 13f79535-47bb-0310-9956-ffa450edef68
2024-12-14 15:06:31 +00:00
Dominik Stadler
6754be55a2 Exclude one file from testing because it fails in the IBM JDK CI build
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922495 13f79535-47bb-0310-9956-ffa450edef68
2024-12-14 15:06:28 +00:00
Dominik Stadler
0e18766e1a Adjust excludes for rat-check in Ant build
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922489 13f79535-47bb-0310-9956-ffa450edef68
2024-12-14 10:24:34 +00:00
Dominik Stadler
50431fbbaa Jenkins DSL: Add JDK 24, use Gradle for JDK 22 and 23
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922488 13f79535-47bb-0310-9956-ffa450edef68
2024-12-14 10:24:32 +00:00
Dominik Stadler
1065c69004 Print out current locale.provider for some test-failures
JDK 24 will break things here and thus we should get more
information about which provider is used when running some tests

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922487 13f79535-47bb-0310-9956-ffa450edef68
2024-12-14 10:24:29 +00:00
Dominik Stadler
20cb040701 Update JaCoCo to 0.8.12
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922486 13f79535-47bb-0310-9956-ffa450edef68
2024-12-14 10:24:25 +00:00
PJ Fanning
fde4545b3b remove staging repo
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922476 13f79535-47bb-0310-9956-ffa450edef68
2024-12-13 22:47:02 +00:00
PJ Fanning
c57f7a3b0e [github-735] POIFS: optimise occupied size calc. Thanks to Emmanuel Bourg. This closes #735
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922232 13f79535-47bb-0310-9956-ffa450edef68
2024-11-30 10:47:53 +00:00
Dominik Stadler
1700967d17 Expect an XML parser error in one test when running with IBM JDK
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922231 13f79535-47bb-0310-9956-ffa450edef68
2024-11-30 09:36:20 +00:00
Dominik Stadler
4f5d7781c1 Jenkins DSL: Remove POI builds for non-LTS JDKs 18, 19 and 20
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922230 13f79535-47bb-0310-9956-ffa450edef68
2024-11-30 09:29:46 +00:00
Dominik Stadler
33f944f922 Groovy script example: Use latest POI and fix to run again
Fix path to test-file
Fix changed constants
Add settings.gradle
Adjust Rat exclusions

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922229 13f79535-47bb-0310-9956-ffa450edef68
2024-11-30 09:29:43 +00:00
Dominik Stadler
3e0306d253 Jenkins DSL: adoptopenjdk is not available any more
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922228 13f79535-47bb-0310-9956-ffa450edef68
2024-11-30 09:29:39 +00:00
PJ Fanning
b8f975fb8f gradle 8.11.1
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922180 13f79535-47bb-0310-9956-ffa450edef68
2024-11-27 20:55:13 +00:00
PJ Fanning
d4c6cb4b53 add back 731 changes but increase gradle heap
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922162 13f79535-47bb-0310-9956-ffa450edef68
2024-11-27 13:32:39 +00:00
PJ Fanning
6fdbaa55f3 test with xmlbeans 5.3.0 rc1
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922135 13f79535-47bb-0310-9956-ffa450edef68
2024-11-26 20:53:04 +00:00
PJ Fanning
6d56d81f35 revert 731 because of suspicious mem issues in ci-builds
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922112 13f79535-47bb-0310-9956-ffa450edef68
2024-11-26 11:24:39 +00:00
PJ Fanning
5874f55dcc add mirr test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922096 13f79535-47bb-0310-9956-ffa450edef68
2024-11-25 21:09:54 +00:00
PJ Fanning
edb9aeaca5 [github-733] Fix rate order in Mirr function. Thanks to Aleksandrs Jansons. This closes #733
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922095 13f79535-47bb-0310-9956-ffa450edef68
2024-11-25 20:48:45 +00:00
PJ Fanning
0d63f9a814 [github-731] Fix the mini-stream size in the root property. This closes #731
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922094 13f79535-47bb-0310-9956-ffa450edef68
2024-11-25 19:33:17 +00:00
PJ Fanning
799aef54fe PoiLogManager
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922063 13f79535-47bb-0310-9956-ffa450edef68
2024-11-24 21:02:58 +00:00
PJ Fanning
b788812546 PoiLogManager
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922062 13f79535-47bb-0310-9956-ffa450edef68
2024-11-24 20:47:36 +00:00
PJ Fanning
f2b0e2f19a PoiLogManager
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922061 13f79535-47bb-0310-9956-ffa450edef68
2024-11-24 20:39:13 +00:00
PJ Fanning
f5cb9588a0 PoiLogManager
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922060 13f79535-47bb-0310-9956-ffa450edef68
2024-11-24 20:17:07 +00:00
PJ Fanning
ba79c4c3c1 forbidden-apis
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922057 13f79535-47bb-0310-9956-ffa450edef68
2024-11-24 20:02:18 +00:00
PJ Fanning
a2af56511f PoiLogManager
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922056 13f79535-47bb-0310-9956-ffa450edef68
2024-11-24 19:52:24 +00:00
PJ Fanning
924d8e7894 PoiLogManager
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922055 13f79535-47bb-0310-9956-ffa450edef68
2024-11-24 19:48:55 +00:00
PJ Fanning
e400a0cc0d log4j 2.24.2
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922035 13f79535-47bb-0310-9956-ffa450edef68
2024-11-23 08:42:12 +00:00
Dominik Stadler
c17d78a182 Add test to verify bug 69266
We could not reproduce the reported issue,
this test verifies this the functionality
some more now.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1921982 13f79535-47bb-0310-9956-ffa450edef68
2024-11-20 20:29:49 +00:00
Dominik Stadler
7c881a408f More tests for reproducible outputs
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1921981 13f79535-47bb-0310-9956-ffa450edef68
2024-11-20 20:29:45 +00:00
Dominik Stadler
c1f018f79c Apply some IDE suggestions, JavaDoc and GitHub PR
Update assertion-message
Adjust JavaDoc
Add tests
Reformat class DirectoryNode, adjust/move some comments

Closes #730

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1921980 13f79535-47bb-0310-9956-ffa450edef68
2024-11-20 20:29:38 +00:00
PJ Fanning
83384ccf90 commons-io 2.18.0
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1921968 13f79535-47bb-0310-9956-ffa450edef68
2024-11-20 09:09:19 +00:00
PJ Fanning
8c77000e8d [bug-66590] Number of blocks used by the property table missing from the file header. Thanks to Emmanuel Bourg. This closes #728
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1921956 13f79535-47bb-0310-9956-ffa450edef68
2024-11-19 17:39:09 +00:00
PJ Fanning
0f42425f8c [gitub-727] Remove DSTAMP token substitution. Thanks to Emmanuel Bourg. This closes #727
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1921954 13f79535-47bb-0310-9956-ffa450edef68
2024-11-19 09:36:00 +00:00
PJ Fanning
0aa9e2bbb7 [bug-66590] Number of blocks used by the property table missing from the file header. Thanks to Emmanuel Bourg. This closes #462
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1921937 13f79535-47bb-0310-9956-ffa450edef68
2024-11-18 17:33:04 +00:00
PJ Fanning
1df9b9c5cb [bug-66590] Number of blocks used by the property table missing from the file header. Thanks to Emmanuel Bourg. This closes #462
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1921936 13f79535-47bb-0310-9956-ffa450edef68
2024-11-18 17:28:36 +00:00
PJ Fanning
8fe23195c6 snapshot version
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1921935 13f79535-47bb-0310-9956-ffa450edef68
2024-11-18 17:20:07 +00:00
PJ Fanning
7bc2dced2f revert log4j and xmlbeans upgrades due to log4j issues
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1921859 13f79535-47bb-0310-9956-ffa450edef68
2024-11-12 09:52:42 +00:00
PJ Fanning
1d620e8714 prep v5.4.0
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1921817 13f79535-47bb-0310-9956-ffa450edef68
2024-11-08 08:52:52 +00:00
PJ Fanning
e132050d2e add since tags
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1921801 13f79535-47bb-0310-9956-ffa450edef68
2024-11-06 20:56:45 +00:00
Tim Allison
157512d437 [bug-69434] -- add more properties to AttachmentChunks
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1921800 13f79535-47bb-0310-9956-ffa450edef68
2024-11-06 20:45:12 +00:00
PJ Fanning
b9eabbb477 upgrade spotbugs
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1921789 13f79535-47bb-0310-9956-ffa450edef68
2024-11-05 19:46:19 +00:00
PJ Fanning
02d2e6e82e xmlsec 3.0.5
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1921787 13f79535-47bb-0310-9956-ffa450edef68
2024-11-05 19:17:51 +00:00
PJ Fanning
613bf24ee7 xmlsec 3.0.5
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1921786 13f79535-47bb-0310-9956-ffa450edef68
2024-11-05 19:14:51 +00:00
PJ Fanning
5ba45570d6 xmlbeans 5.2.2
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1921776 13f79535-47bb-0310-9956-ffa450edef68
2024-11-05 10:38:30 +00:00
PJ Fanning
df4bf119a5 update bytebuddy
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1921767 13f79535-47bb-0310-9956-ffa450edef68
2024-11-04 14:39:37 +00:00
PJ Fanning
0b758a45ba bcprov 1.79
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1921688 13f79535-47bb-0310-9956-ffa450edef68
2024-10-30 14:54:04 +00:00
PJ Fanning
a43cc4a41a call next release poi 5.4.0
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1921653 13f79535-47bb-0310-9956-ffa450edef68
2024-10-29 18:22:59 +00:00
PJ Fanning
7ea956189d [bug-69418] Issue when evaluating WORKDAY function that has a cell ref as 2nd param
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1921651 13f79535-47bb-0310-9956-ffa450edef68
2024-10-29 18:18:12 +00:00
PJ Fanning
a185d08880 add workday test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1921649 13f79535-47bb-0310-9956-ffa450edef68
2024-10-29 17:49:27 +00:00
PJ Fanning
e1f7d4df4f immutable lists
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1921576 13f79535-47bb-0310-9956-ffa450edef68
2024-10-26 18:12:39 +00:00
PJ Fanning
9185ec02c5 immutable maps
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1921575 13f79535-47bb-0310-9956-ffa450edef68
2024-10-26 16:34:40 +00:00
PJ Fanning
69d935d4db -F
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1921572 13f79535-47bb-0310-9956-ffa450edef68
2024-10-26 15:38:16 +00:00
PJ Fanning
c9c8653e6e [bug-69411] add XSSFReader.getSheetIterator
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1921571 13f79535-47bb-0310-9956-ffa450edef68
2024-10-26 15:22:52 +00:00
PJ Fanning
a528d43590 bytebuddy
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1921512 13f79535-47bb-0310-9956-ffa450edef68
2024-10-23 20:34:58 +00:00
PJ Fanning
7c17cc5e8f woodstox 7.1.0
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1921511 13f79535-47bb-0310-9956-ffa450edef68
2024-10-23 19:18:51 +00:00
PJ Fanning
e896804683 junit 5.11.3
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1921459 13f79535-47bb-0310-9956-ffa450edef68
2024-10-21 17:04:23 +00:00
PJ Fanning
db97cf001f byte buddy 1.15.5
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1921387 13f79535-47bb-0310-9956-ffa450edef68
2024-10-17 17:09:30 +00:00
PJ Fanning
468b423168 upgrade gradle plugins
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1921343 13f79535-47bb-0310-9956-ffa450edef68
2024-10-15 17:21:27 +00:00
PJ Fanning
24452a2ecb try to make VariantSupport thread safe
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1921341 13f79535-47bb-0310-9956-ffa450edef68
2024-10-15 16:39:09 +00:00
PJ Fanning
822974aadc make static maps final
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1921340 13f79535-47bb-0310-9956-ffa450edef68
2024-10-15 16:33:15 +00:00
PJ Fanning
c5986447d1 thread safety
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1921339 13f79535-47bb-0310-9956-ffa450edef68
2024-10-15 16:16:51 +00:00
PJ Fanning
fad6cae019 try to make ExcelAntWorkbookUtilFactory thread safe
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1921338 13f79535-47bb-0310-9956-ffa450edef68
2024-10-15 16:13:17 +00:00
PJ Fanning
88a0d4ecf3 make it harder to modify metadata in maps
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1921337 13f79535-47bb-0310-9956-ffa450edef68
2024-10-15 16:08:07 +00:00
PJ Fanning
ab68210d2a [github-709] Make BitFieldFactory threadsafe. Thanks to ZhangChen. This closes #709
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1921332 13f79535-47bb-0310-9956-ffa450edef68
2024-10-15 12:58:33 +00:00
PJ Fanning
f8bbec3104 try batik 1.18 again
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1921225 13f79535-47bb-0310-9956-ffa450edef68
2024-10-09 20:47:24 +00:00
PJ Fanning
f219a1a09f try batik 1.18 again
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1921224 13f79535-47bb-0310-9956-ffa450edef68
2024-10-09 20:47:05 +00:00
PJ Fanning
9b29308d6e remove batik-shared-reource module (no classes in it)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1921223 13f79535-47bb-0310-9956-ffa450edef68
2024-10-09 20:30:54 +00:00
PJ Fanning
6b9a099a69 update junit
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1921222 13f79535-47bb-0310-9956-ffa450edef68
2024-10-09 20:28:52 +00:00
PJ Fanning
da1939fd6a revert batik change due to build issues
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1921221 13f79535-47bb-0310-9956-ffa450edef68
2024-10-09 20:26:51 +00:00
PJ Fanning
ad8b9f0b6d try to get rid of batik fix
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1921220 13f79535-47bb-0310-9956-ffa450edef68
2024-10-09 20:02:56 +00:00
PJ Fanning
cab699001e try to get rid of batik fix
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1921219 13f79535-47bb-0310-9956-ffa450edef68
2024-10-09 19:22:57 +00:00
PJ Fanning
720596a9ec revert batik change due to build issues
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1921218 13f79535-47bb-0310-9956-ffa450edef68
2024-10-09 19:18:22 +00:00
PJ Fanning
c33f34b27c try batik 1.18
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1921214 13f79535-47bb-0310-9956-ffa450edef68
2024-10-09 17:48:02 +00:00
PJ Fanning
d034f954bd [github-704] Add UserNameAwareTempFileCreationStrategy. Thanks to TigerZCoder. This closes #704
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1921154 13f79535-47bb-0310-9956-ffa450edef68
2024-10-06 17:30:49 +00:00
PJ Fanning
70aba4268b junit 5.11.2
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1921153 13f79535-47bb-0310-9956-ffa450edef68
2024-10-06 17:18:55 +00:00
PJ Fanning
f1a5571a61 upgrade log4j
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1921038 13f79535-47bb-0310-9956-ffa450edef68
2024-09-30 11:40:58 +00:00
PJ Fanning
52039e220d [bug-69351] fix issues with removing items from IntList
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1921017 13f79535-47bb-0310-9956-ffa450edef68
2024-09-29 07:12:48 +00:00
PJ Fanning
a3d9bb7e35 gradle 8.10.2
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1920999 13f79535-47bb-0310-9956-ffa450edef68
2024-09-27 20:08:59 +00:00
PJ Fanning
2536f51646 upgrade byte-buddy
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1920997 13f79535-47bb-0310-9956-ffa450edef68
2024-09-27 18:31:45 +00:00
PJ Fanning
8235db8758 junit 5.11.1
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1920912 13f79535-47bb-0310-9956-ffa450edef68
2024-09-25 14:24:03 +00:00
PJ Fanning
0f5585d8e1 upgrade spotbugs
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1920911 13f79535-47bb-0310-9956-ffa450edef68
2024-09-25 14:23:05 +00:00
PJ Fanning
a139a17909 [github-692] D* functions are incompatible with the diamond operator. Thanks to Luk Spiewak. This closes #692
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1920817 13f79535-47bb-0310-9956-ffa450edef68
2024-09-20 20:20:34 +00:00
PJ Fanning
2ef8461f51 gradle 8.10.1
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1920815 13f79535-47bb-0310-9956-ffa450edef68
2024-09-20 19:32:11 +00:00
PJ Fanning
89ef0de42e try to add more chart related classes to poi-ooxml-lite
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1920795 13f79535-47bb-0310-9956-ffa450edef68
2024-09-19 16:13:27 +00:00
PJ Fanning
e1379d3725 commons-io 2.17.0
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1920780 13f79535-47bb-0310-9956-ffa450edef68
2024-09-19 11:15:42 +00:00
PJ Fanning
fb02a49df0 back to ant
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1920703 13f79535-47bb-0310-9956-ffa450edef68
2024-09-15 22:31:44 +00:00
PJ Fanning
c51270d308 back to ant
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1920702 13f79535-47bb-0310-9956-ffa450edef68
2024-09-15 22:30:35 +00:00
PJ Fanning
b6c67ae736 use gradle for java 22 builds
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1920701 13f79535-47bb-0310-9956-ffa450edef68
2024-09-15 21:59:55 +00:00
PJ Fanning
e788f0832b try jupiter junit 5.11.0 again
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1920700 13f79535-47bb-0310-9956-ffa450edef68
2024-09-15 21:19:00 +00:00
PJ Fanning
4dd22fa282 upgrade spotbugs
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1920699 13f79535-47bb-0310-9956-ffa450edef68
2024-09-15 21:13:22 +00:00
PJ Fanning
b0fa9e5e3e revert junit upgrade due to CI issues
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1920698 13f79535-47bb-0310-9956-ffa450edef68
2024-09-15 21:12:49 +00:00
PJ Fanning
5a977d1a7b [bug-69323] DefaultTempFileCreationStrategy should worry about OS deleting the temp dir. Thanks to Palle Girgensohn. This closes #691
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1920610 13f79535-47bb-0310-9956-ffa450edef68
2024-09-13 11:09:21 +00:00
PJ Fanning
5b404ebc6b [bug-69209] default ignoreMissingFontSystem to true
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1920601 13f79535-47bb-0310-9956-ffa450edef68
2024-09-12 21:32:17 +00:00
PJ Fanning
5fd1f28b4b [bug-69209] default ignoreMissingFontSystem to true
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1920600 13f79535-47bb-0310-9956-ffa450edef68
2024-09-12 21:16:34 +00:00
PJ Fanning
d2866dae24 revert spotbugs due to build issues
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1920520 13f79535-47bb-0310-9956-ffa450edef68
2024-09-08 21:12:19 +00:00
PJ Fanning
6464543fb2 revert log4j 2.24.0 due to build issue
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1920515 13f79535-47bb-0310-9956-ffa450edef68
2024-09-08 00:30:33 +00:00
PJ Fanning
7933b53287 log4j 2.24.0
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1920512 13f79535-47bb-0310-9956-ffa450edef68
2024-09-08 00:23:45 +00:00
PJ Fanning
f4ec85adb0 upgrade spotbugs
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1920477 13f79535-47bb-0310-9956-ffa450edef68
2024-09-05 16:30:26 +00:00
PJ Fanning
cb1f341bb9 ant 1.10.15
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1920302 13f79535-47bb-0310-9956-ffa450edef68
2024-08-30 17:37:58 +00:00
PJ Fanning
a2289f4596 bytebuddy 1.15.1
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1920301 13f79535-47bb-0310-9956-ffa450edef68
2024-08-30 17:15:58 +00:00
PJ Fanning
6a68645f62 bytebuddy 1.15.0
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1920233 13f79535-47bb-0310-9956-ffa450edef68
2024-08-27 18:48:12 +00:00
PJ Fanning
41ea754510 update javadoc
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1920232 13f79535-47bb-0310-9956-ffa450edef68
2024-08-27 18:46:55 +00:00
PJ Fanning
abf153d6a4 [github-682] Add CellPropertyType and CellPropertyCategory enums. Thanks to Danila Avdeyenko. This closes #682
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1920230 13f79535-47bb-0310-9956-ffa450edef68
2024-08-27 18:36:59 +00:00
PJ Fanning
41453f3916 [github-657] SXSSF: support setting an arbitrary extra width value for column widths
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1920107 13f79535-47bb-0310-9956-ffa450edef68
2024-08-21 11:35:20 +00:00
PJ Fanning
f33b2cbd51 upgrade bytebuddy
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1920075 13f79535-47bb-0310-9956-ffa450edef68
2024-08-20 16:30:34 +00:00
PJ Fanning
cbda6bccf4 upgrade guava
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1920074 13f79535-47bb-0310-9956-ffa450edef68
2024-08-20 16:29:36 +00:00
PJ Fanning
295e1d0bc9 upgrade commons-compress
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1920072 13f79535-47bb-0310-9956-ffa450edef68
2024-08-20 16:28:30 +00:00
PJ Fanning
2d869111bc upgrade cyclonedx
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1920071 13f79535-47bb-0310-9956-ffa450edef68
2024-08-20 16:26:58 +00:00
PJ Fanning
1ba795451e gradle 8.10
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919930 13f79535-47bb-0310-9956-ffa450edef68
2024-08-16 12:08:48 +00:00
PJ Fanning
b0c67177ff [github-673] Add word10.xsd to poi-ooxml-full. Thanks to fangd1997. This closes #673
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919929 13f79535-47bb-0310-9956-ffa450edef68
2024-08-16 12:06:41 +00:00
PJ Fanning
c2945d86f9 [github-672] Support removing XWPF Styles. Thanks to fangd1997. This closes #672
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919918 13f79535-47bb-0310-9956-ffa450edef68
2024-08-15 19:45:40 +00:00
PJ Fanning
571845c5b0 junit 5.11.0
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919896 13f79535-47bb-0310-9956-ffa450edef68
2024-08-14 17:42:53 +00:00
PJ Fanning
33260d51ee [github-670] XWPFRun.getText should support delInstrText and noBreakHyphen. Thanks to fangd1997. This closes #670
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919895 13f79535-47bb-0310-9956-ffa450edef68
2024-08-14 17:38:32 +00:00
PJ Fanning
6c56c2d00f slf4j 2.0.16
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919805 13f79535-47bb-0310-9956-ffa450edef68
2024-08-11 07:24:06 +00:00
PJ Fanning
c82ebeab7d pdfbox 3.0.3
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919786 13f79535-47bb-0310-9956-ffa450edef68
2024-08-09 16:03:15 +00:00
PJ Fanning
84824170d8 commons-compress 1.27.0
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919785 13f79535-47bb-0310-9956-ffa450edef68
2024-08-09 16:01:41 +00:00
PJ Fanning
e4c617baba slf4j 2.0.15
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919749 13f79535-47bb-0310-9956-ffa450edef68
2024-08-08 15:00:18 +00:00
PJ Fanning
d681bcfcfb slf4j 2.0.14
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919716 13f79535-47bb-0310-9956-ffa450edef68
2024-08-07 10:19:16 +00:00
PJ Fanning
fdb8b41fe3 hamcrest 3.0
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919622 13f79535-47bb-0310-9956-ffa450edef68
2024-08-01 15:46:30 +00:00
PJ Fanning
b737d6c03e upgrade cyclondex
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919596 13f79535-47bb-0310-9956-ffa450edef68
2024-07-30 14:59:38 +00:00
PJ Fanning
ac02543cfe remove unnecessary xz test dependendency
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919595 13f79535-47bb-0310-9956-ffa450edef68
2024-07-30 14:48:30 +00:00
Dominik Stadler
0559accac4 Bug 66425: Avoid exceptions found via poi-fuzz
Prevent a possible NullPointerException

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=70467

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919562 13f79535-47bb-0310-9956-ffa450edef68
2024-07-28 11:02:18 +00:00
PJ Fanning
c05eebf415 add chinese hssf test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919373 13f79535-47bb-0310-9956-ffa450edef68
2024-07-19 14:19:35 +00:00
PJ Fanning
889ba37ae9 remove 22742.xls
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919372 13f79535-47bb-0310-9956-ffa450edef68
2024-07-19 13:36:06 +00:00
Dominik Stadler
6739970530 Apply some IDE suggestions, improve JavaDoc and simplify reporting log messages
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919343 13f79535-47bb-0310-9956-ffa450edef68
2024-07-18 07:10:35 +00:00
Dominik Stadler
0dea4a301c Bug 66425: Avoid exceptions found via poi-fuzz
Processing formats uses regular expressions. Very complex formats
can recurse very deeply and thus can cause StackOVerflows depending
on the used stack-size.

In order to handle this a bit more gracefully, we now catch this
and report a better exception with details about the parsed 
format and potential mitigation.

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=66137

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919342 13f79535-47bb-0310-9956-ffa450edef68
2024-07-18 07:09:32 +00:00
PJ Fanning
0dac5680c3 commons-codec 1.17.1 - no need to note Saxon upgrade (only used in tests)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919288 13f79535-47bb-0310-9956-ffa450edef68
2024-07-16 14:11:35 +00:00
Dominik Stadler
7b15aefae8 Bug 66425: Avoid exceptions found via poi-fuzz
Avoid a possible OutOfMemoryException with incorrect uniqueCount

The ReadOnlySharedStringsTable pre-allocates whatever is stated in uniqueCount.

As the uniqueCount may be an incorrect large number, we should cap it at some point
to avoid OOMs if corrupt files are processed.

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=66137

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919284 13f79535-47bb-0310-9956-ffa450edef68
2024-07-16 13:26:16 +00:00
PJ Fanning
cc4fbe1c4d POI tm
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919276 13f79535-47bb-0310-9956-ffa450edef68
2024-07-16 12:33:05 +00:00
PJ Fanning
264a215573 gradle 8.9
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919274 13f79535-47bb-0310-9956-ffa450edef68
2024-07-16 07:42:28 +00:00
Dominik Stadler
09fbfd5be4 Bug 66425: Avoid exceptions found via poi-fuzz
Avoid a possible OutOfMemoryException with many child-records

This avoids having too many children in EscherRecords, the limit of
100_000 is arbitrarily chosen and can be adjusted if needed  

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62924 and maybe others

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919272 13f79535-47bb-0310-9956-ffa450edef68
2024-07-16 05:26:42 +00:00
PJ Fanning
9456261cba update bytebuddy
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919268 13f79535-47bb-0310-9956-ffa450edef68
2024-07-15 22:42:38 +00:00
PJ Fanning
ebb9cde924 update gradle plugins
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919266 13f79535-47bb-0310-9956-ffa450edef68
2024-07-15 22:41:18 +00:00
Dominik Stadler
e75d2c6d9f Remove exclusions that are not necessary/useful
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919258 13f79535-47bb-0310-9956-ffa450edef68
2024-07-15 13:04:48 +00:00
Dominik Stadler
a3d9c025e9 Apply some IDE suggestions
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919257 13f79535-47bb-0310-9956-ffa450edef68
2024-07-15 13:03:19 +00:00
Dominik Stadler
2582e5e0c1 Bug 66425: Avoid exceptions found via poi-fuzz
Avoid a possible StackOverflowException

This adds support of counting of the "nesting level" into the base 
EscherRecord and thus makes this existing limitation much more effective
as it kicks in for more types of nested records. 

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=66374

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919256 13f79535-47bb-0310-9956-ffa450edef68
2024-07-15 13:02:43 +00:00
Dominik Stadler
719e7154a1 Optimize generating numbers for bullets in Word
Using char[] instead of String improves performance of this
operation considerably, especially in JDK 11+ where StringBuilder
was switched to work on bytes instead of chars.

This is likely only relevant for very large documents, it was visible
in a synthetic test-file from fuzzing.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919239 13f79535-47bb-0310-9956-ffa450edef68
2024-07-15 05:41:14 +00:00
Dominik Stadler
a971751238 Reformat and add more tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919238 13f79535-47bb-0310-9956-ffa450edef68
2024-07-15 05:41:10 +00:00
Dominik Stadler
e2044c958b Bug 66425: Avoid exceptions found via poi-fuzz
Prevent too much memory usage

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=67413

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919237 13f79535-47bb-0310-9956-ffa450edef68
2024-07-15 05:41:04 +00:00
Dominik Stadler
5085e3d1b2 Add initial support for SOURCE_DATE_EPOCH
This allows to create reproducible binary files without creation/modification-timestamp
being set when environment variable SOURCE_DATE_EPOCH is set.

See https://reproducible-builds.org/docs/source-date-epoch/ for the related specification.

For now, we ensure that Zip-file entries set the modification time to 1970-01-01,
which seems to be enough to make simple OOXML files reproducible.

There are likely some other places where resulting files are not reproducible, some
more testing will be necessary to identify other areas that should take this into
account as well.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919236 13f79535-47bb-0310-9956-ffa450edef68
2024-07-15 05:40:56 +00:00
Dominik Stadler
1a07ee8d6a Patch forrest to expect all links to be "https" instead of "http"
Otherwise generating documentation leads to incorrect links with "../https://..."

Unfortunately Forrest is archived at Apache so we cannot get this fixed
in Forrest anymore.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919235 13f79535-47bb-0310-9956-ffa450edef68
2024-07-15 05:40:48 +00:00
Dominik Stadler
04a956ab8f Adjust the name of the distribution-file in one more place.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919221 13f79535-47bb-0310-9956-ffa450edef68
2024-07-14 13:11:23 +00:00
Dominik Stadler
8be69305ca Bug 66425: Avoid exceptions found via poi-fuzz
Prevent a NullPointerException

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=66400

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919216 13f79535-47bb-0310-9956-ffa450edef68
2024-07-14 11:27:02 +00:00
Dominik Stadler
a042165133 Bug 66425: Avoid exceptions found via poi-fuzz
Prevent a NullPointerException

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=68104

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919215 13f79535-47bb-0310-9956-ffa450edef68
2024-07-14 11:26:56 +00:00
Dominik Stadler
fc17f113d8 Bug 66425: Avoid exceptions found via poi-fuzz
Prevent a ClassCastException

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=66089

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919214 13f79535-47bb-0310-9956-ffa450edef68
2024-07-14 11:26:50 +00:00
Dominik Stadler
7601beb592 Bug 66425: Avoid exceptions found via poi-fuzz
Prevent a NullPointerException

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=70273

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919213 13f79535-47bb-0310-9956-ffa450edef68
2024-07-14 11:26:43 +00:00
Dominik Stadler
148ac23c0d List expected failures in stress.xls instead of fully excluding them
We list expected failures in stress.xls to verify that
the error message is correct and no unexpected exception
is introduced

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919212 13f79535-47bb-0310-9956-ffa450edef68
2024-07-14 11:26:38 +00:00
PJ Fanning
a0008d6764 update exception message
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919091 13f79535-47bb-0310-9956-ffa450edef68
2024-07-10 11:39:27 +00:00
PJ Fanning
302b43641f add negative test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919065 13f79535-47bb-0310-9956-ffa450edef68
2024-07-09 14:43:03 +00:00
PJ Fanning
bfd4645a72 add test case
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919064 13f79535-47bb-0310-9956-ffa450edef68
2024-07-09 14:16:47 +00:00
PJ Fanning
c1d6d0d4a1 make validateEntryNames use case insensitive check
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919058 13f79535-47bb-0310-9956-ffa450edef68
2024-07-09 09:46:46 +00:00
Dominik Stadler
894ef6e1bd Fix Paragraph.searchText
The result was wrong for certain combinations of runs and found positions.

The adjusted implementation fixes this.

Also add a number of additional tests to verify results are correct.

Closes #655

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918986 13f79535-47bb-0310-9956-ffa450edef68
2024-07-07 06:40:36 +00:00
Dominik Stadler
397cee3a12 Bug 66425: Avoid exceptions found via poi-fuzz
Prevent a NullPointerException

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=69450

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918985 13f79535-47bb-0310-9956-ffa450edef68
2024-07-07 06:40:31 +00:00
Dominik Stadler
164c239a52 HSSFWorkbook.getSheet(): Return first found sheet
We do not need to loop over all sheets always but should
be able to return the first found sheet.

This may change semantics for cases where there are
multiple sheets where name only differs in case, but
the JavaDoc did not state which one will be returned.

All three implementations (HSSF, XSSF, SXSSF)
now behave the same way.

Closes #653

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918982 13f79535-47bb-0310-9956-ffa450edef68
2024-07-07 05:03:15 +00:00
PJ Fanning
d090c6b77a update TestXSSFSheetShiftRows
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918978 13f79535-47bb-0310-9956-ffa450edef68
2024-07-06 20:17:22 +00:00
PJ Fanning
750657064a saxon 12.5
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918857 13f79535-47bb-0310-9956-ffa450edef68
2024-07-02 20:29:26 +00:00
PJ Fanning
e1c6168682 [bug-69154] add speculative row shifter fix
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918841 13f79535-47bb-0310-9956-ffa450edef68
2024-07-02 13:10:29 +00:00
PJ Fanning
3d1375deee [bug-69154] XSSF: Shifting columns with merged regions generates an error about overlapping regions
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918838 13f79535-47bb-0310-9956-ffa450edef68
2024-07-02 12:58:37 +00:00
PJ Fanning
a78d594b73 unused import
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918833 13f79535-47bb-0310-9956-ffa450edef68
2024-07-02 12:44:23 +00:00
PJ Fanning
559de96cc0 snapshot version
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918832 13f79535-47bb-0310-9956-ffa450edef68
2024-07-02 12:37:38 +00:00
PJ Fanning
6e07ce50dd add dataformatter test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918819 13f79535-47bb-0310-9956-ffa450edef68
2024-07-02 09:42:02 +00:00
PJ Fanning
04c9d0a3c1 another dataformatter test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918817 13f79535-47bb-0310-9956-ffa450edef68
2024-07-02 09:08:40 +00:00
PJ Fanning
05c79326be another dataformatter test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918810 13f79535-47bb-0310-9956-ffa450edef68
2024-07-02 00:32:59 +00:00
PJ Fanning
3f246cc189 disable new dataformatter test that is failing
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918809 13f79535-47bb-0310-9956-ffa450edef68
2024-07-02 00:22:49 +00:00
PJ Fanning
a12c95990b try to fix tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918808 13f79535-47bb-0310-9956-ffa450edef68
2024-07-02 00:02:47 +00:00
PJ Fanning
648a2e58b0 add dataformatter tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918807 13f79535-47bb-0310-9956-ffa450edef68
2024-07-01 23:45:40 +00:00
PJ Fanning
96fa957ef5 try to stop poi-integration testing with corrupt file
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918806 13f79535-47bb-0310-9956-ffa450edef68
2024-07-01 23:27:27 +00:00
PJ Fanning
66f89c50d6 try to stop poi-integration testing with corrupt file
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918805 13f79535-47bb-0310-9956-ffa450edef68
2024-07-01 23:19:33 +00:00
PJ Fanning
7e86ff1bb0 use standard ASF header
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918804 13f79535-47bb-0310-9956-ffa450edef68
2024-07-01 23:06:36 +00:00
PJ Fanning
8a37350e94 rename file
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918803 13f79535-47bb-0310-9956-ffa450edef68
2024-07-01 22:50:04 +00:00
PJ Fanning
03b0742ad3 throw exception if xlsx contains duplicate file names
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918802 13f79535-47bb-0310-9956-ffa450edef68
2024-07-01 22:40:18 +00:00
PJ Fanning
600bf8c4b3 license header
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918801 13f79535-47bb-0310-9956-ffa450edef68
2024-07-01 21:37:53 +00:00
PJ Fanning
f8a990051b throw exception if xlsx contains duplicate file names
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918800 13f79535-47bb-0310-9956-ffa450edef68
2024-07-01 21:36:31 +00:00
PJ Fanning
d879a94a15 reformat ZipFileZipEntrySource.java
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918799 13f79535-47bb-0310-9956-ffa450edef68
2024-07-01 21:30:07 +00:00
PJ Fanning
527f26aac9 junit 5.10.3
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918712 13f79535-47bb-0310-9956-ffa450edef68
2024-06-27 15:12:15 +00:00
PJ Fanning
f8a949217b update changes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918709 13f79535-47bb-0310-9956-ffa450edef68
2024-06-27 15:10:52 +00:00
PJ Fanning
65443a93c6 stray ref to SNAPSHOT
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918584 13f79535-47bb-0310-9956-ffa450edef68
2024-06-25 10:42:38 +00:00
PJ Fanning
bb541e3e7c set version to 5.3.0
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918572 13f79535-47bb-0310-9956-ffa450edef68
2024-06-24 23:48:32 +00:00
PJ Fanning
a0abf65115 woodstox 7.0.0
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918546 13f79535-47bb-0310-9956-ffa450edef68
2024-06-24 14:30:36 +00:00
Dominik Stadler
e8c0084606 Adjust src-build-test for changed name of source-distribution archive
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918518 13f79535-47bb-0310-9956-ffa450edef68
2024-06-23 07:38:33 +00:00
Dominik Stadler
434b1ab8e6 Add one more case where timestamp could end up
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918517 13f79535-47bb-0310-9956-ffa450edef68
2024-06-23 07:38:30 +00:00
PJ Fanning
d530977347 [bug-69147] fix issues with text function when input is a datetime in string format
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918501 13f79535-47bb-0310-9956-ffa450edef68
2024-06-21 20:25:46 +00:00
PJ Fanning
461691ef0e add test related to bug-69147
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918499 13f79535-47bb-0310-9956-ffa450edef68
2024-06-21 20:03:50 +00:00
PJ Fanning
2a47c185c6 issue with Java 22 returning string values insteadof booleans
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918397 13f79535-47bb-0310-9956-ffa450edef68
2024-06-17 21:37:36 +00:00
PJ Fanning
ebc4c37e78 issue with Java 22 returning string values insteadof booleans
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918396 13f79535-47bb-0310-9956-ffa450edef68
2024-06-17 21:02:55 +00:00
PJ Fanning
fac56eea48 gradle 8.8
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918394 13f79535-47bb-0310-9956-ffa450edef68
2024-06-17 20:44:33 +00:00
PJ Fanning
ca64f86ff8 ZipFile deprecation warnings
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918179 13f79535-47bb-0310-9956-ffa450edef68
2024-06-05 18:51:17 +00:00
PJ Fanning
41ccb6fe30 getNextZipEntry deprecation warnings
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918177 13f79535-47bb-0310-9956-ffa450edef68
2024-06-05 16:45:46 +00:00
PJ Fanning
a1a982a2fb update guava
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918176 13f79535-47bb-0310-9956-ffa450edef68
2024-06-05 16:33:17 +00:00
PJ Fanning
f56eea8e45 BoundedInputStream deprecation warnings
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918175 13f79535-47bb-0310-9956-ffa450edef68
2024-06-05 16:31:36 +00:00
PJ Fanning
160fc0122c put apache in name of source dist
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918173 13f79535-47bb-0310-9956-ffa450edef68
2024-06-05 16:10:04 +00:00
Dominik Stadler
3f243f65ab Change one exception to warning-log to avoid regressions in mass-tests
This avoids "breaking" a few documents which could be opened before.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918118 13f79535-47bb-0310-9956-ffa450edef68
2024-06-02 11:31:31 +00:00
Dominik Stadler
329a659739 Avoid NPE and improve error message when saving a package-part fails
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918117 13f79535-47bb-0310-9956-ffa450edef68
2024-06-02 09:39:57 +00:00
Dominik Stadler
f490e43442 Apply IDE suggestions and ignore sonar false positive
Use NullOutputStream.INSTANCE
Rework one test slightly

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918116 13f79535-47bb-0310-9956-ffa450edef68
2024-06-02 09:39:51 +00:00
Dominik Stadler
72282b8780 Add simple test for font-width
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918115 13f79535-47bb-0310-9956-ffa450edef68
2024-06-02 09:39:43 +00:00
PJ Fanning
5ecc959180 use xmlbeans release
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917993 13f79535-47bb-0310-9956-ffa450edef68
2024-05-26 21:42:46 +00:00
PJ Fanning
6ed4818996 commons-compress 1.26.2 released
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917936 13f79535-47bb-0310-9956-ffa450edef68
2024-05-24 08:55:02 +00:00
PJ Fanning
19b9510bed commons-compress 1.26.2 is not yet officially released
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917923 13f79535-47bb-0310-9956-ffa450edef68
2024-05-23 10:58:54 +00:00
PJ Fanning
156371540f commons-compress 1.26.2
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917903 13f79535-47bb-0310-9956-ffa450edef68
2024-05-22 14:06:41 +00:00
PJ Fanning
7027eb5e8a byte buddy 1.14.16
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917902 13f79535-47bb-0310-9956-ffa450edef68
2024-05-22 14:06:05 +00:00
PJ Fanning
5f7db27559 test with staged copy of xmlbeans 5.2.1 (rc)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917874 13f79535-47bb-0310-9956-ffa450edef68
2024-05-22 00:06:34 +00:00
PJ Fanning
4565d31222 rename as 5.3.0-SNAPSHOT due to some changes in behaviour
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917782 13f79535-47bb-0310-9956-ffa450edef68
2024-05-17 11:07:37 +00:00
PJ Fanning
68478c8b8c [bug-68183] SXSSFWorkbook now removes temp files when closed - removing need for a separate dispose call. Thanks to Clayton Bodendein. This closes #586
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917780 13f79535-47bb-0310-9956-ffa450edef68
2024-05-17 11:04:12 +00:00
PJ Fanning
af5d4b9f22 [bug-69021] add guard around cast
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917779 13f79535-47bb-0310-9956-ffa450edef68
2024-05-17 10:00:28 +00:00
PJ Fanning
48305903b3 graphics2d 3.0.2
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917702 13f79535-47bb-0310-9956-ffa450edef68
2024-05-13 15:49:36 +00:00
PJ Fanning
b91827e029 [bug-68987] support allowStoredEntriesWithDataDescriptor=true when reading zip data
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917587 13f79535-47bb-0310-9956-ffa450edef68
2024-05-08 22:32:22 +00:00
PJ Fanning
c0c70cac7a javadoc issues
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917586 13f79535-47bb-0310-9956-ffa450edef68
2024-05-08 21:30:13 +00:00
PJ Fanning
efce9ba930 add back check for if dir already exists
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917583 13f79535-47bb-0310-9956-ffa450edef68
2024-05-08 17:24:41 +00:00
PJ Fanning
c960ee6070 upgrade xmlunit
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917422 13f79535-47bb-0310-9956-ffa450edef68
2024-04-29 15:07:33 +00:00
PJ Fanning
fa166a65d7 commons-codec 1.17.0
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917420 13f79535-47bb-0310-9956-ffa450edef68
2024-04-29 15:04:07 +00:00
Dominik Stadler
3800aa5418 Bug 66425: Avoid exceptions found via poi-fuzz
Avoid a possible NullPointerException

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=67922

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917269 13f79535-47bb-0310-9956-ffa450edef68
2024-04-22 13:32:30 +00:00
Dominik Stadler
91149769e4 Adjust test for XLS2CSV for different newlines on Windows
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917267 13f79535-47bb-0310-9956-ffa450edef68
2024-04-22 13:16:10 +00:00
PJ Fanning
e6a913c3bd fix use of forbidden api
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917264 13f79535-47bb-0310-9956-ffa450edef68
2024-04-22 10:43:36 +00:00
Dominik Stadler
238d002f34 Some new test-files need to be excluded for no-scratchpad execution
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917258 13f79535-47bb-0310-9956-ffa450edef68
2024-04-22 06:43:24 +00:00
Dominik Stadler
601c5e2671 XLS(X) -> CSV: Wrap formatted numbers in quotes if necessary
e.g. German locale uses "comma" instead of point, e.g. 1,23 instead of 1.23
so we may need to quote formatted numbers

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917257 13f79535-47bb-0310-9956-ffa450edef68
2024-04-22 06:43:20 +00:00
PJ Fanning
51242877e5 update fanningpj key
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917252 13f79535-47bb-0310-9956-ffa450edef68
2024-04-21 22:03:36 +00:00
Dominik Stadler
5813a6d2d3 One integration-test file now fails in "additional" as well
Not sure which change introduced this as it worked initially...

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917223 13f79535-47bb-0310-9956-ffa450edef68
2024-04-20 16:12:36 +00:00
Dominik Stadler
48a69cd5df Add one more "flaky" byte when comparing two documents
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917177 13f79535-47bb-0310-9956-ffa450edef68
2024-04-20 07:53:47 +00:00
Dominik Stadler
6936398b0a Include inner exception when re-throwing
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917176 13f79535-47bb-0310-9956-ffa450edef68
2024-04-20 07:53:43 +00:00
Dominik Stadler
d4bcc2b3bb Bug 66425: Avoid exceptions found via poi-fuzz
Prevent a NullPointerException

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=65448

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917175 13f79535-47bb-0310-9956-ffa450edef68
2024-04-20 07:53:40 +00:00
Dominik Stadler
8c101982e0 Integration tests: Add writing out the document
This will cover some more functionality

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917174 13f79535-47bb-0310-9956-ffa450edef68
2024-04-20 07:53:35 +00:00
PJ Fanning
d87ffbc1b0 update tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917164 13f79535-47bb-0310-9956-ffa450edef68
2024-04-19 17:10:56 +00:00
PJ Fanning
ee525b6477 refactor code that removes parts
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917154 13f79535-47bb-0310-9956-ffa450edef68
2024-04-19 14:12:13 +00:00
PJ Fanning
f335554254 gradle 8.7
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917149 13f79535-47bb-0310-9956-ffa450edef68
2024-04-19 13:26:22 +00:00
PJ Fanning
6948f9031d add javadoc
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917140 13f79535-47bb-0310-9956-ffa450edef68
2024-04-19 10:59:30 +00:00
PJ Fanning
ff7f1ea721 fix npe
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917139 13f79535-47bb-0310-9956-ffa450edef68
2024-04-19 10:16:08 +00:00
PJ Fanning
a0091652a5 fix npe
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917138 13f79535-47bb-0310-9956-ffa450edef68
2024-04-19 10:12:44 +00:00
PJ Fanning
1899bee1b9 refactor some code
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917136 13f79535-47bb-0310-9956-ffa450edef68
2024-04-19 09:56:05 +00:00
PJ Fanning
5955dd75de fix compile issues
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917135 13f79535-47bb-0310-9956-ffa450edef68
2024-04-19 09:38:53 +00:00
PJ Fanning
eebb3717e0 [bug-63189] support hyperlink relationships. Thanks to Ohyoung Kwon. This closes #617
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917134 13f79535-47bb-0310-9956-ffa450edef68
2024-04-19 09:23:54 +00:00
PJ Fanning
d525d1a5b1 bouncycastle 1.78.1
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917116 13f79535-47bb-0310-9956-ffa450edef68
2024-04-18 19:47:58 +00:00
Dominik Stadler
1fb1d57ca8 Comment out one more flaky assertion
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917073 13f79535-47bb-0310-9956-ffa450edef68
2024-04-17 19:12:25 +00:00
Dominik Stadler
4a3b92b305 Comment out flaky assertion and add more information to find which file fails in CI
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917072 13f79535-47bb-0310-9956-ffa450edef68
2024-04-17 18:50:32 +00:00
Dominik Stadler
9453fa908a Bug 66425: Avoid exceptions found via poi-fuzz
Use correct default date-format, add some tests

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=66381

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917070 13f79535-47bb-0310-9956-ffa450edef68
2024-04-17 18:15:46 +00:00
Dominik Stadler
c4e8388742 Bug 66425: Avoid exceptions found via poi-fuzz
Prevent a NullPointerException

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=66386

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917069 13f79535-47bb-0310-9956-ffa450edef68
2024-04-17 18:15:38 +00:00
Dominik Stadler
51637fcc43 Bug 66425: Avoid exceptions found via poi-fuzz
Prevent a few NullPointerException

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=66400

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917068 13f79535-47bb-0310-9956-ffa450edef68
2024-04-17 18:15:33 +00:00
PJ Fanning
059595f021 remove accidental test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1916938 13f79535-47bb-0310-9956-ffa450edef68
2024-04-12 17:29:27 +00:00
PJ Fanning
1fe45e84b0 slf4j 2.0.13
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1916936 13f79535-47bb-0310-9956-ffa450edef68
2024-04-12 17:28:41 +00:00
PJ Fanning
eee1ab84dc commons-io 2.16.1
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1916878 13f79535-47bb-0310-9956-ffa450edef68
2024-04-09 07:59:42 +00:00
PJ Fanning
5984227b20 bouncycastle 1.77
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1916866 13f79535-47bb-0310-9956-ffa450edef68
2024-04-08 18:44:01 +00:00
PJ Fanning
eccb6983b7 commons-io 2.16.0
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1916611 13f79535-47bb-0310-9956-ffa450edef68
2024-03-29 08:46:25 +00:00
PJ Fanning
0e806d485c upgrade woodstox
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1916587 13f79535-47bb-0310-9956-ffa450edef68
2024-03-27 16:58:47 +00:00
PJ Fanning
d8d1af03b5 add since annotation
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1916583 13f79535-47bb-0310-9956-ffa450edef68
2024-03-27 13:36:25 +00:00
PJ Fanning
c715f9ee1d [github-607] Support SVGs in XWPF. Thanks to Etienne Gautier. This closes #607
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1916582 13f79535-47bb-0310-9956-ffa450edef68
2024-03-27 13:33:57 +00:00
PJ Fanning
bdff72668e pdfbox 3.0.2
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1916345 13f79535-47bb-0310-9956-ffa450edef68
2024-03-15 17:16:10 +00:00
Dominik Stadler
f4af02bb24 Bug 68778: Verify "ignoreMissingFontSystem" for SheetUtil.getDefaultCharWidthAsFloat()
This functionality saw some regressions at times and thus
should be verified via unit-tests. 

We can simulate failures in the low-level font-system by 
mocking the FontRenderContext and triggering exceptions
from there.

This hopefully now verifies behavior of 
SheetUtil.getDefaultCharWidthAsFloat() both with 
"ignoreMissingFontSystem" enabled and disabled.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1916297 13f79535-47bb-0310-9956-ffa450edef68
2024-03-14 13:20:47 +00:00
PJ Fanning
08436ddf7f upgrade commons-compress and log4j
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1916233 13f79535-47bb-0310-9956-ffa450edef68
2024-03-11 17:48:11 +00:00
PJ Fanning
56692aa84c add javadoc
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1916150 13f79535-47bb-0310-9956-ffa450edef68
2024-03-06 12:22:34 +00:00
PJ Fanning
6e01fe6e2a remove annotation
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1916149 13f79535-47bb-0310-9956-ffa450edef68
2024-03-06 12:20:46 +00:00
PJ Fanning
45b2ecb20a deprecation warning
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1916147 13f79535-47bb-0310-9956-ffa450edef68
2024-03-06 11:57:53 +00:00
PJ Fanning
d0a5b622ca [github-604] XDGF: add support for poly lines. Thanks to Dmitrii Komarov. This closes #604
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1916146 13f79535-47bb-0310-9956-ffa450edef68
2024-03-06 11:53:17 +00:00
PJ Fanning
baae7b0301 [github-601] XDGF: handle elliptical arcs that have colinear points. Thanks to Dmitrii Komarov. This closes #601
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1916144 13f79535-47bb-0310-9956-ffa450edef68
2024-03-06 11:13:01 +00:00
PJ Fanning
9d3531842b rework test state
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1916143 13f79535-47bb-0310-9956-ffa450edef68
2024-03-06 10:49:07 +00:00
PJ Fanning
30ff717be4 gradle 8.6
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1916114 13f79535-47bb-0310-9956-ffa450edef68
2024-03-05 00:13:09 +00:00
PJ Fanning
a3488f6c39 [bug-68703] fix issue with XSLFTextRuns in XSLFTableCells
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1916108 13f79535-47bb-0310-9956-ffa450edef68
2024-03-04 14:56:20 +00:00
PJ Fanning
db63599833 [bug-68703] revert fix issue with XSLFTextRuns in XSLFTableCells
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1916106 13f79535-47bb-0310-9956-ffa450edef68
2024-03-04 14:01:46 +00:00
PJ Fanning
1c156c4005 [bug-68703] fix issue with XSLFTextRuns in XSLFTableCells
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1916105 13f79535-47bb-0310-9956-ffa450edef68
2024-03-04 12:49:02 +00:00
Axel Howind
9d14f3f9ee enable gradle caching again
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1916038 13f79535-47bb-0310-9956-ffa450edef68
2024-02-28 09:42:29 +00:00
Axel Howind
9e425e1c5b use diamond operator
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1916036 13f79535-47bb-0310-9956-ffa450edef68
2024-02-28 09:35:51 +00:00
Axel Howind
263171f80e use method reference
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1916035 13f79535-47bb-0310-9956-ffa450edef68
2024-02-28 09:35:49 +00:00
Axel Howind
6b40b7f966 use Map.computeIfAbsent()
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1916034 13f79535-47bb-0310-9956-ffa450edef68
2024-02-28 09:35:46 +00:00
PJ Fanning
2496ce5229 rework tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1916017 13f79535-47bb-0310-9956-ffa450edef68
2024-02-26 23:05:36 +00:00
PJ Fanning
025c904695 woodstox 6.6.1
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1916016 13f79535-47bb-0310-9956-ffa450edef68
2024-02-26 22:44:31 +00:00
Axel Howind
05af0e0bf3 Math.toIntExact is unnecessary because value is guaranteed to be between 0 and 15
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915959 13f79535-47bb-0310-9956-ffa450edef68
2024-02-22 20:56:03 +00:00
Axel Howind
17c6a1ec50 replace List<Byte> with ByteArrayOutputStream to avoid boxing/unboxing and repeated copying of data
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915958 13f79535-47bb-0310-9956-ffa450edef68
2024-02-22 20:48:04 +00:00
PJ Fanning
e5e22bb1f2 xmlsec 3.0.4
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915955 13f79535-47bb-0310-9956-ffa450edef68
2024-02-22 17:27:45 +00:00
Axel Howind
e65e666ece do not write single bytes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915953 13f79535-47bb-0310-9956-ffa450edef68
2024-02-22 15:44:31 +00:00
Axel Howind
39a1ced25e fix Logging issues:
- don't use foreign class in Logger initialization
- update log statements to use MessageFormat syntax

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915930 13f79535-47bb-0310-9956-ffa450edef68
2024-02-21 21:28:04 +00:00
Axel Howind
cb10857970 make loggers static final
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915929 13f79535-47bb-0310-9956-ffa450edef68
2024-02-21 21:04:58 +00:00
PJ Fanning
28fc73b046 log4j 2.23.0
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915917 13f79535-47bb-0310-9956-ffa450edef68
2024-02-21 10:52:18 +00:00
Axel Howind
386ddb8e6b move setting of locale for tests to top level build.gradle
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915910 13f79535-47bb-0310-9956-ffa450edef68
2024-02-20 22:48:53 +00:00
Dominik Stadler
1bb5f644f1 Fix Ant-build after upgrade of commons-compress
Commons-lang3 is now required as dependency of commons-compress

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915909 13f79535-47bb-0310-9956-ffa450edef68
2024-02-20 21:09:48 +00:00
Dominik Stadler
b7bf336453 Jenkins DSL: Use sonar-task and sonar.token instead of sonar.login
This removes some build-warnings

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915908 13f79535-47bb-0310-9956-ffa450edef68
2024-02-20 21:09:44 +00:00
Dominik Stadler
b4a2bc084e Switch builds for JDK 22 and 23 to Ant for now
Gradle does not yet support newer JDKs

See https://docs.gradle.org/current/userguide/compatibility.html
and https://github.com/gradle/gradle/issues/26162

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915907 13f79535-47bb-0310-9956-ffa450edef68
2024-02-20 21:06:41 +00:00
PJ Fanning
3817f138f8 try to fix issue with invalid files after commons-compress upgrade
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915895 13f79535-47bb-0310-9956-ffa450edef68
2024-02-20 16:31:04 +00:00
PJ Fanning
fded4957db commons-compress 1.26.0
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915892 13f79535-47bb-0310-9956-ffa450edef68
2024-02-20 12:01:15 +00:00
PJ Fanning
d59d6b7d7d [github-596] Change cast logic in HSSFChart. Thanks to Ruby Hartono. This closes #596
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915881 13f79535-47bb-0310-9956-ffa450edef68
2024-02-19 20:11:45 +00:00
PJ Fanning
23ed93817f remove unused loggers. Thanks to Ruby Hartono. This closes #594 and closes #595
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915870 13f79535-47bb-0310-9956-ffa450edef68
2024-02-19 10:10:57 +00:00
Axel Howind
63899a8810 fix #68635: POI unit tests fail when run under non-US locale
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915827 13f79535-47bb-0310-9956-ffa450edef68
2024-02-17 15:47:46 +00:00
PJ Fanning
c871bb7b9f remove unused loggers - thanks to Ruby Hartono. This closes #588 and closes #589
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915819 13f79535-47bb-0310-9956-ffa450edef68
2024-02-16 15:25:24 +00:00
PJ Fanning
dc025d9365 [github-590] simplify some logging. This closes #590
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915818 13f79535-47bb-0310-9956-ffa450edef68
2024-02-16 15:12:54 +00:00
PJ Fanning
99ec2c6c0f byte buddy 1.14.12
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915817 13f79535-47bb-0310-9956-ffa450edef68
2024-02-16 15:05:18 +00:00
PJ Fanning
6a8994ee0e try to fix poi-scratchpad test module-info
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915701 13f79535-47bb-0310-9956-ffa450edef68
2024-02-10 01:27:06 +00:00
PJ Fanning
3b7a01b804 Upgrade commons-codec dependency to 1.16.1
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915695 13f79535-47bb-0310-9956-ffa450edef68
2024-02-09 16:38:15 +00:00
PJ Fanning
b5c1a6644c junit 5.10.2
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915600 13f79535-47bb-0310-9956-ffa450edef68
2024-02-06 20:18:31 +00:00
PJ Fanning
9994816676 slf4j 2.0.12
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915599 13f79535-47bb-0310-9956-ffa450edef68
2024-02-06 20:17:13 +00:00
PJ Fanning
2469b89ee6 [github-582] improve performance CodepointsUtil.iteratorFor. Thanks to Jason Mirra. This closes #582
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915572 13f79535-47bb-0310-9956-ffa450edef68
2024-02-03 21:06:38 +00:00
PJ Fanning
e455798019 remove one use of CodepointsUtil.iteratorFor
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915571 13f79535-47bb-0310-9956-ffa450edef68
2024-02-03 20:20:40 +00:00
Dominik Stadler
e0d446c533 Switch builds for JDK 22 and 23 to Ant for now
Gradle does not yet support newer JDKs

See https://docs.gradle.org/current/userguide/compatibility.html
and https://github.com/gradle/gradle/issues/26162

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915505 13f79535-47bb-0310-9956-ffa450edef68
2024-02-01 06:38:54 +00:00
Dominik Stadler
3b5a9b07c4 SonarQube demands at least JDK 17 now
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915504 13f79535-47bb-0310-9956-ffa450edef68
2024-02-01 06:38:51 +00:00
Dominik Stadler
1bfcae1ac3 Jenknins DSL: Remove builds for JDK 15 and 16
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915503 13f79535-47bb-0310-9956-ffa450edef68
2024-02-01 06:38:49 +00:00
Dominik Stadler
1fd07c94af SonarQube demands at least JDK 17 now
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915483 13f79535-47bb-0310-9956-ffa450edef68
2024-01-30 21:28:48 +00:00
Dominik Stadler
209e8fc659 Fix handling missing font libraries to again not throw on some types of exception
The previous change broke this handling by always re-throwing "Fatal" exceptions.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915482 13f79535-47bb-0310-9956-ffa450edef68
2024-01-30 21:01:53 +00:00
Dominik Stadler
e696053e23 Use latest version of rat and rat-plugin
In Gradle builds, this will still use rat 0.15.0, though
as the plugin hardcodes the version of rat that is used.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915481 13f79535-47bb-0310-9956-ffa450edef68
2024-01-30 21:01:49 +00:00
Dominik Stadler
147c96da67 Bug 66425: Avoid exceptions found via poi-fuzz
Prevent a few NullPointerException

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=65450 and
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=63907 and
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=63727

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915480 13f79535-47bb-0310-9956-ffa450edef68
2024-01-30 21:01:46 +00:00
Dominik Stadler
fef87cfa0a Fix no-scratchpad CI job
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915479 13f79535-47bb-0310-9956-ffa450edef68
2024-01-30 21:01:39 +00:00
Dominik Stadler
98c52bcbbb Ignore missing directory 'build/dist/maven' when deleting obsolete jars
Otherwise build may fail on a fresh checkout or after 'clean'

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915410 13f79535-47bb-0310-9956-ffa450edef68
2024-01-26 12:52:16 +00:00
PJ Fanning
274a7e24f3 [github-578] allow any non-fatal exception when setting up fonts to indicate that the fonts are probably not installed. This closes #578
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915397 13f79535-47bb-0310-9956-ffa450edef68
2024-01-25 10:03:29 +00:00
PJ Fanning
7b7f10e657 cyclonedx 1.8.2
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915395 13f79535-47bb-0310-9956-ffa450edef68
2024-01-25 09:32:57 +00:00
Dominik Stadler
b010f9c99c Try to remove outdated files from the "distribution" folder
Clean directory and keep only the expected files with the current
version.

Otherwise we get strange errors about "duplicate modules" when
building after version was switched.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915368 13f79535-47bb-0310-9956-ffa450edef68
2024-01-23 09:28:17 +00:00
PJ Fanning
c868af2e57 revert woodstox upgrade
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915309 13f79535-47bb-0310-9956-ffa450edef68
2024-01-18 09:23:42 +00:00
PJ Fanning
1fa568916f woodstox upgrade
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915295 13f79535-47bb-0310-9956-ffa450edef68
2024-01-17 18:04:50 +00:00
PJ Fanning
f93306721f remove ant release logic (not used for our releases and dependent on libs that don't seem to be maintained)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915265 13f79535-47bb-0310-9956-ffa450edef68
2024-01-16 10:17:54 +00:00
PJ Fanning
724fc526bf remove ant release logic (not used for our releases and dependent on libs that don't seem to be maintained)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915264 13f79535-47bb-0310-9956-ffa450edef68
2024-01-16 10:15:36 +00:00
PJ Fanning
c3fd1d5731 slf4j 2.0.11
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915160 13f79535-47bb-0310-9956-ffa450edef68
2024-01-09 15:28:26 +00:00
PJ Fanning
cf5cd6fb6b 2024
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915022 13f79535-47bb-0310-9956-ffa450edef68
2023-12-31 12:42:38 +00:00
Dominik Stadler
a27029d1af Bug 66425: Avoid exceptions found via poi-fuzz
Prevent NullPointerException

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=64212

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915006 13f79535-47bb-0310-9956-ffa450edef68
2023-12-30 19:39:42 +00:00
Dominik Stadler
d54c8f16e6 Bug 66425: Avoid exceptions found via poi-fuzz
Prevent NullPointerException

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=64495

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915005 13f79535-47bb-0310-9956-ffa450edef68
2023-12-30 19:39:36 +00:00
Dominik Stadler
94ace1c4b0 Bug 66425: Avoid exceptions found via poi-fuzz
Prevent NullPointerException

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=64943

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915004 13f79535-47bb-0310-9956-ffa450edef68
2023-12-30 19:39:31 +00:00
Dominik Stadler
4d175324f2 Bug 66425: Avoid exceptions found via poi-fuzz
Prevent ClassCastException

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=63736

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915003 13f79535-47bb-0310-9956-ffa450edef68
2023-12-30 19:39:24 +00:00
PJ Fanning
fb1aaf1e4e slf4j 2.0.10
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914998 13f79535-47bb-0310-9956-ffa450edef68
2023-12-30 13:08:39 +00:00
Dominik Stadler
8507fdf371 Bug 66425: Avoid exceptions found via poi-fuzz
Prevent ClassCastException

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=63504

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914991 13f79535-47bb-0310-9956-ffa450edef68
2023-12-30 11:11:42 +00:00
Dominik Stadler
28811d26df Bug 66425: Avoid exceptions found via poi-fuzz
Prevent ClassCastException

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=63375

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914990 13f79535-47bb-0310-9956-ffa450edef68
2023-12-30 11:11:36 +00:00
Dominik Stadler
8e3b60f63d Bug 66425: Avoid exceptions found via poi-fuzz
Prevent StackOverflow via endless nesting

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=65303

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914989 13f79535-47bb-0310-9956-ffa450edef68
2023-12-30 11:11:32 +00:00
Dominik Stadler
c63cb1846c Add JDK 23 and disable JDK 19 and 20 as they are replaced by LTS-version JDK 21 now
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914988 13f79535-47bb-0310-9956-ffa450edef68
2023-12-30 11:11:26 +00:00
Dominik Stadler
e17f92ee3a Update JaCoCo to 0.8.11
This should make building with JDK 22 work

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914987 13f79535-47bb-0310-9956-ffa450edef68
2023-12-30 11:11:24 +00:00
Dominik Stadler
a9ca01e3fd Don't fail on JDK 21.0.1 if one signature check fails
See https://bugs.openjdk.org/browse/JDK-8320597 for the
related bug-report for the JDK itself

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914986 13f79535-47bb-0310-9956-ffa450edef68
2023-12-30 11:11:21 +00:00
PJ Fanning
fb3f3ef26f log4j 2.22.1
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914954 13f79535-47bb-0310-9956-ffa450edef68
2023-12-27 14:04:34 +00:00
PJ Fanning
2f25c1ab90 [bug-68379] add signing support for classificationlabels
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914808 13f79535-47bb-0310-9956-ffa450edef68
2023-12-20 18:01:02 +00:00
PJ Fanning
7e5e9fcc62 try to javadoc more unsupported methods
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914791 13f79535-47bb-0310-9956-ffa450edef68
2023-12-20 08:14:13 +00:00
PJ Fanning
c7324182ad try to javadoc more unsupported methods
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914785 13f79535-47bb-0310-9956-ffa450edef68
2023-12-19 20:27:49 +00:00
Dominik Stadler
53cfc2cc96 Allow all IndexOutOfBoundsException to have either empty message or some message
Newer JDKs add a more useful exception message, so we need to be a bit more
lenient for these in integration tests

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914708 13f79535-47bb-0310-9956-ffa450edef68
2023-12-16 12:09:02 +00:00
Dominik Stadler
399e99630c commons-compress is needed in ooxml-test for running tests via Ant
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914707 13f79535-47bb-0310-9956-ffa450edef68
2023-12-16 12:08:57 +00:00
Dominik Stadler
ffc4795258 Use revert() instead of close() when processing fails
Otherwise we might write partial changes to the
underlying file which is unexpected.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914706 13f79535-47bb-0310-9956-ffa450edef68
2023-12-16 12:08:54 +00:00
PJ Fanning
4b84986671 [bug-68305] extend test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914512 13f79535-47bb-0310-9956-ffa450edef68
2023-12-10 13:51:19 +00:00
PJ Fanning
f662657db1 [bug-68305] add test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914511 13f79535-47bb-0310-9956-ffa450edef68
2023-12-10 13:30:59 +00:00
PJ Fanning
2c838143ba [GitHub-562] Add extra pivot table classes to poi-ooxml-lite. This closes #562
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914509 13f79535-47bb-0310-9956-ffa450edef68
2023-12-10 12:53:05 +00:00
PJ Fanning
ecc42ac4f2 remove unused loggers
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914434 13f79535-47bb-0310-9956-ffa450edef68
2023-12-07 14:04:02 +00:00
Dominik Stadler
6775bd259d Add new dependency pdfbox-io to Ant build
Otherwise CI job "old-xerces" fails.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914411 13f79535-47bb-0310-9956-ffa450edef68
2023-12-06 20:49:10 +00:00
Dominik Stadler
d021e6bc5e Simplify handling of exceptions in ZipPackage
The code became overly complex and hard to reason about.

We can avoid some additional catching/rethrowing of exceptions.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914409 13f79535-47bb-0310-9956-ffa450edef68
2023-12-06 19:51:19 +00:00
Dominik Stadler
fd9300d3b7 Mark internal classes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914408 13f79535-47bb-0310-9956-ffa450edef68
2023-12-06 19:50:06 +00:00
Dominik Stadler
c8c8130ae3 Make sure OLE2ScratchpadExtractorFacory is sorted first
Otherwise order of found extractors would depend on jar-loading order
and thus might have unexpected side-effects and missing features in
text-extraction.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914407 13f79535-47bb-0310-9956-ffa450edef68
2023-12-06 19:50:02 +00:00
Dominik Stadler
497482d4dc Add one more xsb which is missing in one of my projects
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914406 13f79535-47bb-0310-9956-ffa450edef68
2023-12-06 19:49:59 +00:00
Dominik Stadler
25e2d5ca69 Add more output for a failure that we saw once in CI
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914405 13f79535-47bb-0310-9956-ffa450edef68
2023-12-06 19:49:56 +00:00
Dominik Stadler
15dd62d659 Bug 66425: Avoid exceptions found via poi-fuzz
Avoid a ClassCastException and trigger some more
code in integration-testing.

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=63358

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914404 13f79535-47bb-0310-9956-ffa450edef68
2023-12-06 19:49:52 +00:00
Dominik Stadler
c7329fbd38 Bug 66425: Avoid exceptions found via poi-fuzz
Change an assertion which can be triggered via an
input-document.

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=63309

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914403 13f79535-47bb-0310-9956-ffa450edef68
2023-12-06 19:49:45 +00:00
Dominik Stadler
f1589b8d66 Bug 66425: Avoid exceptions found via poi-fuzz
Add an xsb file to ooxml-lite which seems to be
missing in some cases

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=63652

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914402 13f79535-47bb-0310-9956-ffa450edef68
2023-12-06 19:49:38 +00:00
Dominik Stadler
9fda604fb8 Bug 66425: Avoid exceptions found via poi-fuzz
Capture and report integer overflow as normal
parsing/format exceptions

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=63628

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914401 13f79535-47bb-0310-9956-ffa450edef68
2023-12-06 19:49:34 +00:00
PJ Fanning
e0b7dcda83 gradle 8.5
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914357 13f79535-47bb-0310-9956-ffa450edef68
2023-12-05 11:35:22 +00:00
PJ Fanning
6e3d031e80 pdfbox/graphics2d 3.0.1
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914298 13f79535-47bb-0310-9956-ffa450edef68
2023-12-03 10:41:36 +00:00
PJ Fanning
3f317f5b32 pdfbox/graphics2d 3.0.1
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914296 13f79535-47bb-0310-9956-ffa450edef68
2023-12-03 10:40:41 +00:00
PJ Fanning
5b246ca080 saxon 12.4
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914236 13f79535-47bb-0310-9956-ffa450edef68
2023-11-30 15:41:04 +00:00
PJ Fanning
f40c8ccafb update github actions
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914235 13f79535-47bb-0310-9956-ffa450edef68
2023-11-30 15:37:44 +00:00
PJ Fanning
3ab1c1a131 xmlsec stuck at 3.0.3 due to xmlsec 4 needing java 11
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914230 13f79535-47bb-0310-9956-ffa450edef68
2023-11-30 09:26:03 +00:00
PJ Fanning
9e1e675fc3 try xmlsec 4.0.1
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914228 13f79535-47bb-0310-9956-ffa450edef68
2023-11-30 08:39:07 +00:00
PJ Fanning
ba84383764 commons-io 2.15.1
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914225 13f79535-47bb-0310-9956-ffa450edef68
2023-11-30 08:29:37 +00:00
PJ Fanning
8690df1d28 log4j 2.22.0
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914154 13f79535-47bb-0310-9956-ffa450edef68
2023-11-27 11:09:38 +00:00
PJ Fanning
9c48dee4ea snapshot version
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914153 13f79535-47bb-0310-9956-ffa450edef68
2023-11-27 10:11:54 +00:00
PJ Fanning
bcb451a416 [bug-68237] SXSSFWorkbook: write as
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914152 13f79535-47bb-0310-9956-ffa450edef68
2023-11-27 10:08:16 +00:00
PJ Fanning
b5da35ee4e poi 5.2.5 release
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914119 13f79535-47bb-0310-9956-ffa450edef68
2023-11-25 19:31:28 +00:00
PJ Fanning
d81223cd10 deprecate unnecessary method
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914086 13f79535-47bb-0310-9956-ffa450edef68
2023-11-24 13:03:54 +00:00
PJ Fanning
5d2f053769 deprecate unnecessary method
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914084 13f79535-47bb-0310-9956-ffa450edef68
2023-11-24 11:07:44 +00:00
Dominik Stadler
9965dc74db Jenkins DSL: Capture artefacts for checksums and .pom as well
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913990 13f79535-47bb-0310-9956-ffa450edef68
2023-11-20 19:16:43 +00:00
PJ Fanning
386b2fcc78 try to fix compile issues due to commons-compress upgrade
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913865 13f79535-47bb-0310-9956-ffa450edef68
2023-11-16 22:15:24 +00:00
PJ Fanning
e9710ead93 prep v5.2.5
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913863 13f79535-47bb-0310-9956-ffa450edef68
2023-11-16 20:52:47 +00:00
PJ Fanning
2d10477565 XMLBeans 5.2.0 release
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913860 13f79535-47bb-0310-9956-ffa450edef68
2023-11-16 20:46:45 +00:00
PJ Fanning
3d35361666 commons-compress 1.25.0
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913857 13f79535-47bb-0310-9956-ffa450edef68
2023-11-16 20:16:19 +00:00
PJ Fanning
04a4dd179b bouncycastle 1.77
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913806 13f79535-47bb-0310-9956-ffa450edef68
2023-11-15 15:02:09 +00:00
Dominik Stadler
676d0fdf3f Bug 68128: Exclude one broken file from the "No-Scratchpad" run
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913797 13f79535-47bb-0310-9956-ffa450edef68
2023-11-15 10:32:59 +00:00
Dominik Stadler
219954c07c Close document always in SlideShowRecordDumper
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913795 13f79535-47bb-0310-9956-ffa450edef68
2023-11-15 10:22:49 +00:00
PJ Fanning
3b03ed58e4 use xmlbeans 5.1.1 release
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913696 13f79535-47bb-0310-9956-ffa450edef68
2023-11-10 10:50:14 +00:00
PJ Fanning
8819952b2f [bug-68094] try to improve cell width derivation by not rounding
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913676 13f79535-47bb-0310-9956-ffa450edef68
2023-11-08 13:41:53 +00:00
PJ Fanning
e95a4d84d0 [bug-67510] issue with empty num format on chart axes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913674 13f79535-47bb-0310-9956-ffa450edef68
2023-11-08 12:34:41 +00:00
PJ Fanning
74151ffa5b [bug-67510] issue with empty num format on chart axes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913672 13f79535-47bb-0310-9956-ffa450edef68
2023-11-08 11:26:08 +00:00
PJ Fanning
726fa5c85e temp workaround for chart axis issue
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913671 13f79535-47bb-0310-9956-ffa450edef68
2023-11-08 11:14:47 +00:00
PJ Fanning
e83987b35d [github-545] Make exported sheet names compatible with Excel. Thanks to Aleksandrs Jansons. This closes #545
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913660 13f79535-47bb-0310-9956-ffa450edef68
2023-11-07 21:50:12 +00:00
PJ Fanning
76b1a6fee4 try to fix broken sxssf tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913651 13f79535-47bb-0310-9956-ffa450edef68
2023-11-07 12:23:53 +00:00
PJ Fanning
c9506f0f39 fix broken HSSFWorkbook test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913648 13f79535-47bb-0310-9956-ffa450edef68
2023-11-07 12:00:57 +00:00
PJ Fanning
a57344e585 gradle 8.4
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913647 13f79535-47bb-0310-9956-ffa450edef68
2023-11-07 11:23:30 +00:00
PJ Fanning
1d24d0c476 test with saxon 12.3
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913646 13f79535-47bb-0310-9956-ffa450edef68
2023-11-07 11:17:39 +00:00
PJ Fanning
69be873ff3 upgrade junit
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913643 13f79535-47bb-0310-9956-ffa450edef68
2023-11-07 08:54:13 +00:00
PJ Fanning
5533d35cef upgrade cyclonedx
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913433 13f79535-47bb-0310-9956-ffa450edef68
2023-10-30 11:27:56 +00:00
PJ Fanning
9acbe83d5b some tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913396 13f79535-47bb-0310-9956-ffa450edef68
2023-10-27 16:59:49 +00:00
PJ Fanning
8142b56fb8 some tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913395 13f79535-47bb-0310-9956-ffa450edef68
2023-10-27 16:53:06 +00:00
PJ Fanning
0d1644282f some tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913394 13f79535-47bb-0310-9956-ffa450edef68
2023-10-27 16:48:34 +00:00
Dominik Stadler
4cff905375 Bug 66425: Avoid exceptions found via poi-fuzz
Fix one expected exception-text which is different
on newer Java versions

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=63142

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913385 13f79535-47bb-0310-9956-ffa450edef68
2023-10-27 10:08:09 +00:00
Dominik Stadler
56eb1ccff6 Bug 66425: Avoid exceptions found via poi-fuzz
Fix one expected exception-text which is different
on newer Java versions

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=63143

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913384 13f79535-47bb-0310-9956-ffa450edef68
2023-10-27 10:08:04 +00:00
Dominik Stadler
5cc8b9958c Bug 66425: Avoid exceptions found via poi-fuzz
Fix one expected exception-text which is different
on newer Java versions

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=63266

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913383 13f79535-47bb-0310-9956-ffa450edef68
2023-10-27 10:07:57 +00:00
PJ Fanning
ef743728ab [bug-67579] test OPCPackage
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913368 13f79535-47bb-0310-9956-ffa450edef68
2023-10-26 20:03:33 +00:00
PJ Fanning
6e680589de [bug-67579] add new XmlVisioDocument constructor
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913364 13f79535-47bb-0310-9956-ffa450edef68
2023-10-26 18:24:03 +00:00
PJ Fanning
89ccbec1dd [bug-67579] add new XWPFDocument/XMLSlideShow constructor
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913363 13f79535-47bb-0310-9956-ffa450edef68
2023-10-26 18:20:33 +00:00
PJ Fanning
070393a06f [bug-67579] add new XSSFWorkbook constructor
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913362 13f79535-47bb-0310-9956-ffa450edef68
2023-10-26 18:13:43 +00:00
PJ Fanning
e7358f8ff8 [bug-67579] add new XSSFWorkbook constructor
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913361 13f79535-47bb-0310-9956-ffa450edef68
2023-10-26 18:12:29 +00:00
PJ Fanning
e94b284c59 [bug-67579] add new XSSFWorkbook constructor
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913359 13f79535-47bb-0310-9956-ffa450edef68
2023-10-26 18:09:38 +00:00
PJ Fanning
ff5fc9d582 [bug-67579] revert changes - POI will again close the InputStream
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913356 13f79535-47bb-0310-9956-ffa450edef68
2023-10-26 17:37:46 +00:00
PJ Fanning
bcfd81f489 [bug-67579] test that we close input stream
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913352 13f79535-47bb-0310-9956-ffa450edef68
2023-10-26 15:19:42 +00:00
PJ Fanning
d4373c2d09 try to close streams in HSSF tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913351 13f79535-47bb-0310-9956-ffa450edef68
2023-10-26 15:02:52 +00:00
PJ Fanning
f64524916d [bug-67579] test that we do not close input stream
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913350 13f79535-47bb-0310-9956-ffa450edef68
2023-10-26 14:59:54 +00:00
PJ Fanning
fee050b391 revert change to github-321.xlsx
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913343 13f79535-47bb-0310-9956-ffa450edef68
2023-10-26 09:55:33 +00:00
PJ Fanning
1855186f85 undo test change
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913341 13f79535-47bb-0310-9956-ffa450edef68
2023-10-26 09:09:04 +00:00
PJ Fanning
9dec19ba00 commons-io 2.15.0
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913340 13f79535-47bb-0310-9956-ffa450edef68
2023-10-26 09:07:54 +00:00
PJ Fanning
0d57635607 revert test change
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913329 13f79535-47bb-0310-9956-ffa450edef68
2023-10-25 16:41:09 +00:00
PJ Fanning
c8d0332c60 update test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913328 13f79535-47bb-0310-9956-ffa450edef68
2023-10-25 16:39:46 +00:00
PJ Fanning
0fe45fe899 security docs
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913302 13f79535-47bb-0310-9956-ffa450edef68
2023-10-24 21:50:57 +00:00
PJ Fanning
7c5a3ee7fc bytebuddy 1.14.9
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913272 13f79535-47bb-0310-9956-ffa450edef68
2023-10-24 17:09:34 +00:00
PJ Fanning
efba2c39ce log4j 2.21.1
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913270 13f79535-47bb-0310-9956-ffa450edef68
2023-10-24 17:08:33 +00:00
PJ Fanning
176a685e2d [bug-67778] add more null checks to BaseXSSFFormulaEvaluator
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913258 13f79535-47bb-0310-9956-ffa450edef68
2023-10-24 09:34:58 +00:00
PJ Fanning
8759103c94 xmlsec 3.0.3
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913122 13f79535-47bb-0310-9956-ffa450edef68
2023-10-19 15:18:55 +00:00
PJ Fanning
cf440d3c77 spotbugs gradle plugin to 5.2.1
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913121 13f79535-47bb-0310-9956-ffa450edef68
2023-10-19 14:58:47 +00:00
PJ Fanning
9a8ea4a165 [bug-67785] make XSSFExcelExtractor output more like that from XSSFEventBasedExcelExtractor
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913080 13f79535-47bb-0310-9956-ffa450edef68
2023-10-18 09:37:37 +00:00
PJ Fanning
e80ae0bb07 [bug-67784] add tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913068 13f79535-47bb-0310-9956-ffa450edef68
2023-10-17 16:05:08 +00:00
PJ Fanning
818091f54d [bug-67784] experimental hack to fix regression
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913067 13f79535-47bb-0310-9956-ffa450edef68
2023-10-17 15:22:16 +00:00
PJ Fanning
0dd2b18b56 reformat file
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913066 13f79535-47bb-0310-9956-ffa450edef68
2023-10-17 15:09:26 +00:00
PJ Fanning
5035a531c5 [bug-67784] add test for divide error
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913065 13f79535-47bb-0310-9956-ffa450edef68
2023-10-17 14:39:54 +00:00
PJ Fanning
08aa6d1730 [bug-67784] add test for divide error
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913064 13f79535-47bb-0310-9956-ffa450edef68
2023-10-17 14:27:25 +00:00
PJ Fanning
5c9fb98bcf refactor
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913056 13f79535-47bb-0310-9956-ffa450edef68
2023-10-17 10:34:23 +00:00
PJ Fanning
2f5a188497 log4j 2.21.0
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913046 13f79535-47bb-0310-9956-ffa450edef68
2023-10-17 08:42:26 +00:00
PJ Fanning
236710df4e [bug-67778] try to make formula eval involving external workbooks more robust
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913045 13f79535-47bb-0310-9956-ffa450edef68
2023-10-17 08:36:07 +00:00
Tim Allison
f869dc6f74 Bug 67767 - bump max picture size
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913004 13f79535-47bb-0310-9956-ffa450edef68
2023-10-16 10:42:53 +00:00
PJ Fanning
edef04dce7 try harder to close zipArchive in ZipPackage (edge cases)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912986 13f79535-47bb-0310-9956-ffa450edef68
2023-10-15 21:06:01 +00:00
PJ Fanning
dbddc32c1b [bug-67475] better support for edge cases in TEXT function. Thanks to Jakub Vojtisek
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912973 13f79535-47bb-0310-9956-ffa450edef68
2023-10-14 22:34:58 +00:00
PJ Fanning
b48de0fe42 update gradle plugins
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912968 13f79535-47bb-0310-9956-ffa450edef68
2023-10-14 14:51:30 +00:00
PJ Fanning
fccf4a97fb add back leading len into slideshow DrawTextFragment height
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912967 13f79535-47bb-0310-9956-ffa450edef68
2023-10-14 14:47:34 +00:00
PJ Fanning
ec099d769f extra classes in poi-ooxml-lite
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912965 13f79535-47bb-0310-9956-ffa450edef68
2023-10-14 14:38:12 +00:00
PJ Fanning
6a3e6c2b2e extra classes in poi-ooxml-lite
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912964 13f79535-47bb-0310-9956-ffa450edef68
2023-10-14 14:37:59 +00:00
PJ Fanning
bc870ab764 [bug-67735] Add Complex scripts support in XWPFRun. Thanks to Mohammed Alhaddar. This closes #536
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912963 13f79535-47bb-0310-9956-ffa450edef68
2023-10-14 14:31:52 +00:00
Dominik Stadler
407bb3744c Fix job "no-scratchpad" after adding some more broken test-data
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912934 13f79535-47bb-0310-9956-ffa450edef68
2023-10-13 09:26:07 +00:00
Dominik Stadler
a227fa9443 integration-tests: Enable testing extracting for OPCFileHandler and fix single test
Enable running "extract" also for OPCFileHandler
Add additional expected failures in stress.xls

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912933 13f79535-47bb-0310-9956-ffa450edef68
2023-10-13 09:25:13 +00:00
Dominik Stadler
638a9be903 Bug 66425: Avoid exceptions found via poi-fuzz
Fix one expected exception-text which is different
on newer Java versions

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912804 13f79535-47bb-0310-9956-ffa450edef68
2023-10-08 05:41:26 +00:00
Dominik Stadler
2276c3571d Exception text changed for some file
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912800 13f79535-47bb-0310-9956-ffa450edef68
2023-10-07 22:13:01 +00:00
Dominik Stadler
e670061518 Bug 66425: Avoid exceptions found via poi-fuzz
Fix check after commit fcaac5073716b98cba26c0655f06f20e310fd85e
so that other IndexOutOfBoundsExceptions are still thrown out

Also free resources when throwing an exception in the constructor

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912799 13f79535-47bb-0310-9956-ffa450edef68
2023-10-07 22:12:58 +00:00
Dominik Stadler
2bd84bf25c Add some missing schema-files to ooxml-lite
This should fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62255

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912798 13f79535-47bb-0310-9956-ffa450edef68
2023-10-07 22:12:54 +00:00
Dominik Stadler
e43c1bc911 Bug 66425: Avoid Exceptions found via oss-fuzz
We try to avoid throwing ConcurrentModificationException,
but it was possible to trigger one here with a specially
crafted input-file

Should fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62861

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912797 13f79535-47bb-0310-9956-ffa450edef68
2023-10-07 22:12:50 +00:00
Dominik Stadler
5cd4fa5488 Bug 66425: Avoid Exceptions found via oss-fuzz
We try to avoid throwing ClassCastExceptions,
but it was possible to trigger one here with a specially
crafted input-file

Should fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62795

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912796 13f79535-47bb-0310-9956-ffa450edef68
2023-10-07 22:12:43 +00:00
Dominik Stadler
eb11f3324f Bug 66425: Avoid Exceptions found via oss-fuzz
We try to avoid throwing NullPointerExceptions or endless allocations,
but it was possible to trigger one here with a specially
crafted input-file

Should fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62745

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912795 13f79535-47bb-0310-9956-ffa450edef68
2023-10-07 22:12:35 +00:00
Dominik Stadler
50b4da40b8 Bug 66425: Avoid Exceptions found via oss-fuzz
We try to avoid throwing NullPointerExceptions or endless allocations,
but it was possible to trigger one here with a specially
crafted input-file

Should fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62706

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912794 13f79535-47bb-0310-9956-ffa450edef68
2023-10-07 22:12:30 +00:00
Dominik Stadler
6fae5bbc18 Bug 66425: Avoid Exceptions found via oss-fuzz
We try to avoid throwing NullPointerExceptions or endless allocations,
but it was possible to trigger one here with a specially
crafted input-file

Should fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62697

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912793 13f79535-47bb-0310-9956-ffa450edef68
2023-10-07 22:12:25 +00:00
Dominik Stadler
c331c5d26a Bug 66425: Avoid a NullPointerException found via oss-fuzz
We try to avoid throwing NullPointerException, but it was possible
to trigger one here with a specially crafted input-file

Should fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62626

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912792 13f79535-47bb-0310-9956-ffa450edef68
2023-10-07 22:12:18 +00:00
Dominik Stadler
a42842841e Add some missing schema-files to ooxml-lite
This should fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62255

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912791 13f79535-47bb-0310-9956-ffa450edef68
2023-10-07 22:12:12 +00:00
PJ Fanning
42651f6eda add internal annotation
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912727 13f79535-47bb-0310-9956-ffa450edef68
2023-10-04 07:48:57 +00:00
Dominik Stadler
e8e6f671ef Assert that deleting test-files and entries works in tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912709 13f79535-47bb-0310-9956-ffa450edef68
2023-10-03 06:17:01 +00:00
Dominik Stadler
a5b4a3504a Adjust order of testing and use try-with-resources
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912708 13f79535-47bb-0310-9956-ffa450edef68
2023-10-03 06:06:03 +00:00
Dominik Stadler
360c05d9e3 Bug 66425: Avoid exceptions found via poi-fuzz
We try to avoid throwing NullPointerException, ClassCastExceptions 
and StackOverflowException, but it was possible to trigger them

Also improve some exception messages

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62698
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62606
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62685

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912707 13f79535-47bb-0310-9956-ffa450edef68
2023-10-03 06:05:30 +00:00
PJ Fanning
105966cc29 [bug-67579] do not close stream when reading XSSFWorkbook based on stream
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912700 13f79535-47bb-0310-9956-ffa450edef68
2023-10-03 00:06:27 +00:00
PJ Fanning
5d36e0c450 update gradlew
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912642 13f79535-47bb-0310-9956-ffa450edef68
2023-10-01 03:00:23 +00:00
PJ Fanning
8814a4bfb9 commons-io 2.14.0
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912639 13f79535-47bb-0310-9956-ffa450edef68
2023-10-01 01:56:20 +00:00
PJ Fanning
bbc98b5cd3 commons-io 2.14.0
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912638 13f79535-47bb-0310-9956-ffa450edef68
2023-10-01 01:34:13 +00:00
PJ Fanning
505ac31533 commons-io 2.14.0
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912637 13f79535-47bb-0310-9956-ffa450edef68
2023-10-01 01:16:08 +00:00
PJ Fanning
e720c27b71 commons-io 2.14.0
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912635 13f79535-47bb-0310-9956-ffa450edef68
2023-09-30 23:29:27 +00:00
PJ Fanning
8e20b5e9cd change param name
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912589 13f79535-47bb-0310-9956-ffa450edef68
2023-09-29 01:16:35 +00:00
PJ Fanning
6c91c5f807 fix release artifact names
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912588 13f79535-47bb-0310-9956-ffa450edef68
2023-09-29 01:01:46 +00:00
PJ Fanning
fdad7e1408 [github-523] set locales for some tests. This closes #523
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912583 13f79535-47bb-0310-9956-ffa450edef68
2023-09-28 22:35:00 +00:00
PJ Fanning
57e1f4b79e update docs for release 5.2.4
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912581 13f79535-47bb-0310-9956-ffa450edef68
2023-09-28 22:19:53 +00:00
1351 changed files with 58769 additions and 11345 deletions

View File

@ -1,7 +1,7 @@
# https://cwiki.apache.org/confluence/display/INFRA/Git+-+.asf.yaml+features
# https://github.com/apache/infrastructure-asfyaml/blob/main/README.md
github:
description: "Mirror of Apache POI subversion. The Java API for Microsoft Documents."
description: "Mirror of Apache POI gitbox. The Java API for Microsoft Documents."
homepage: https://poi.apache.org/
labels:
- poi
@ -14,10 +14,35 @@ github:
- powerpoint
- visio
dependabot_alerts: true
dependabot_updates: false
features:
# Enable wiki for documentation
wiki: false
# Enable issue management
issues: false
issues: true
# Enable projects for project management boards
projects: false
# Enable github discussions
discussions: true
enabled_merge_buttons:
squash: true
merge: false
rebase: true
protected_branches:
trunk: {}
5.5.x: {}
asf-site: {}
notifications:
commits: commits@poi.apache.org
issues: dev@poi.apache.org
pullrequests: dev@poi.apache.org
discussions: dev@poi.apache.org
jobs: dev@poi.apache.org
publish:
whoami: asf-site

View File

@ -5,9 +5,9 @@ name: Java CI with Gradle
on:
push:
branches: [ trunk ]
branches: [ trunk, 5.5.x ]
pull_request:
branches: [ trunk ]
branches: [ trunk, 5.5.x ]
permissions: {}
@ -17,10 +17,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6
- name: Set up JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '11'

84
KEYS
View File

@ -2545,14 +2545,12 @@ bpjAhwE2YmGQ7oB+3V798HtAmceRNf8AY0GWrZswJlg7xUn+WJNwQ9uIHI1fxYHx
2Nr+AmDDs6ZOEI5zhwxioePw/Cg=
=9lKb
-----END PGP PUBLIC KEY BLOCK-----
pub rsa2048 2018-05-02 [SC] [expires: 2024-05-25]
6BA4 DA8B 1C88 A494 28A2 9C3D 0C69 C1EF 4118 1E13
uid [ultimate] PJ Fanning <fanningpj@yahoo.com>
sig 3 0C69C1EF41181E13 2022-04-06 PJ Fanning <fanningpj@yahoo.com>
uid [ultimate] PJ Fanning (http://www.apache.org/) <fanningpj@apache.org>
sig 3 0C69C1EF41181E13 2022-04-06 PJ Fanning <fanningpj@yahoo.com>
sub rsa2048 2018-05-02 [E] [expires: 2024-05-25]
sig 0C69C1EF41181E13 2022-04-06 PJ Fanning <fanningpj@yahoo.com>
pub rsa2048 2018-05-02 [SC] [expires: 2026-05-11]
6BA4DA8B1C88A49428A29C3D0C69C1EF41181E13
uid [ unknown] PJ Fanning (http://www.apache.org/) <fanningpj@apache.org>
uid [ unknown] PJ Fanning (GitHub noreply address) <pjfanning@users.noreply.github.com>
uid [ unknown] PJ Fanning <fanningpj@yahoo.com>
sub rsa2048 2018-05-02 [E] [expires: 2026-05-11]
-----BEGIN PGP PUBLIC KEY BLOCK-----
@ -2561,37 +2559,45 @@ ARFmtFPnwYwLTdz3ECqWWsC3RkI62079DweNasXV8nBz9sUt6mQqSMx3W/s6389/
k9iywPLvhHH7rpp05js8zwJoA8Fr1YwPtBjyhrxl58LQ5ihd/1f2ud2tnwQw1dI2
8fuTS3QaKP4Zdx2diD5rYhkAecWaFRwxn1L7Tye5dfD1uPElPCHGKqfaeQXtl01u
TOwYB1p9tKPHvfni1qgD3QLWUJ2oyBGSA9IgEF5rm8LtR6vADKQwORjg99a7HE2h
lDBZi/tmu23fgWSioiy084fB5GqmApK/681DABEBAAG0OlBKIEZhbm5pbmcgKGh0
dHA6Ly93d3cuYXBhY2hlLm9yZy8pIDxmYW5uaW5ncGpAYXBhY2hlLm9yZz6JAVQE
EwEIAD4CGwMFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AWIQRrpNqLHIiklCiinD0M
acHvQRgeEwUCYk2YRAUJC2h2bgAKCRAMacHvQRgeE7nTB/4tZq9/gQcpCKgPVKI8
MKtY/NWOc9nRr5LrNjY/qFU2Z2gMoUQT1fIBm6gjd9iI92QgLMeekuR2fXBBOx3y
JbiklXfQVGytEOochkemylwtaCZTHB61KWkemDfS+YeG3qBKwFa5B+zJvp7LqYdQ
GrNFFgtHwkhNiviDN7JFxsMGM2IpopgvNYB72B35q3YnrDsgDNlD3eraKU25sMx7
2vNHABrdHzd1ZnKDA1hSV6any5Ifw4NJsPaM0RrmwuwoWkL7WHPftbqkM0zy6RIe
O+2tlKsJ6cKfOCYL9fbS7/UmkVVcrSLpJCCwmdsra3/57uha7TofDvl+R32CWzrv
yWfXtCBQSiBGYW5uaW5nIDxmYW5uaW5ncGpAeWFob28uY29tPokBVAQTAQgAPgIb
AwULCQgHAgYVCgkICwIEFgIDAQIeAQIXgBYhBGuk2osciKSUKKKcPQxpwe9BGB4T
BQJiTZhKBQkLaHZuAAoJEAxpwe9BGB4T58UH/RBEOnA9TDTKTi7T4y+R1/q2SUp+
tMzv91jhmlaDvNnA2lGVFNGj1tdy1O7xoCEEw9diKCVqVwHecuBQCaLI70r1W4Qw
qixjKJwDDnPoMKfhjuvHEHRZV0Pg+uZ50DxkFNn+bPPlXABGelliAPTvetK3ELPJ
EIRzVJkFsS0McHwXJgmIPAz8ZVlwd1/Xu21MIKOkPzgXML7uq4PN++L+mM4RmpGU
phOetyxLO1xf6ZixCoUnA7Ayi0hAKUAhu9acuc8SoDacfKm1EQ26SHUhOTNm0YCH
PPfucHJbUgqSUOYjkEftOtT0ZqVGWS7tR3iEIJu90MJ6SJRovag7khCsYY65AQ0E
Wulz1gEIAORuS4e+Ek+d+0gBMlnigNJ2HoQalKFaERf5K/iQZY4E6Z2ahJ4UFIj7
ri3isWgOleP+REJJPfeSrWQ5XgdklDlHHyv4O5iMkEFWQHttiaTuvdomDncQrNRP
TaIOe9iQgfQzDw6mqsb7ZWd5ICA8Krd97BwNHjq/CZ9+WrU6GDc6ImissLVVGGdk
EGO7qZTqNUCeH4Znm/00mNMI4OH8xkwA2vzV5o3J5116zIuv29XQDtcSM+9NQ/Hd
sjKIA0OpDyWE7Ek/SO+/CvkylwaOcmkuf33ADNjpF4BsBxn7L9XI1WJDtRaMkpbq
MsymIxi35VUOGD+ms+72CcUStfYj4NEAEQEAAYkBPAQYAQgAJgIbDBYhBGuk2osc
iKSUKKKcPQxpwe9BGB4TBQJiTZhrBQkLaHaVAAoJEAxpwe9BGB4TfjUH/24Q/H5u
vXlb/Dpx4eFcyLhRVgREoMwwAlzM5GKInHO1W7SHeD7iVR8H1XQVHTgUBNBQ1bUd
f2R2fyNAbSgCP9VooN6Q/+uTjRsm5gRD7KY5NHxjTC/SZMwKNy/haXQk/qSjDLUy
cD/2fQovuSLgoqZrTvyvz9e4JhFPk0i1it7I6KWnyyLGOItKc3Cv4p/vkD1ldYKN
XBhAxmErC9KHQK8pNi8y5z+F1JuZV74i3FRWa+3L2730qIDfR9K3jGIqOow59iqZ
c8cQLjcGU9lL4dzHh5Hcph8OC5U2aZaJOuMpCndD6XXPvq5/3QQU5rMqP//6tuVi
aAMwT8RaYPiJJPI=
=2Ips
lDBZi/tmu23fgWSioiy084fB5GqmApK/681DABEBAAG0SFBKIEZhbm5pbmcgKEdp
dEh1YiBub3JlcGx5IGFkZHJlc3MpIDxwamZhbm5pbmdAdXNlcnMubm9yZXBseS5n
aXRodWIuY29tPokBVwQTAQgAQQIbAwULCQgHAgIiAgYVCgkICwIEFgIDAQIeBwIX
gBYhBGuk2osciKSUKKKcPQxpwe9BGB4TBQJmJYbdBQkPGNgHAAoJEAxpwe9BGB4T
5Z4H/3sDqi2QozHbsUy2dm+xS105bpmiNn3aDYzEyjOBggypDWpG5fmlD6ya3Yfd
H172auahZ1SK6t7Q7u97QdtrvMKTVBBq+DahkHnvw4nsPwBI00aTy616of1+CirZ
lDPo912aLrWlouizuy6qeJE0EfB0PGXtuZP3E0yZHqgmIOBrQw5fJQtrka5WWK3C
AqO2Z1hZLh9ftheJtKSYX1gZnPEAWs3ZBG2tCk4+qAjB8y5kRvrJFpC36FkisYlg
YTtAOSMHED/3YFsDsXFvLmrSkNBImjdAnRW59TD5XUgEMDZ9Dylz3/b4/gtNi2SX
9WSYWC60/3Jgxh4u3cTUnUtW2yC0IFBKIEZhbm5pbmcgPGZhbm5pbmdwakB5YWhv
by5jb20+iQFUBBMBCAA+AhsDBQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAFiEEa6Ta
ixyIpJQoopw9DGnB70EYHhMFAmYlhuUFCQ8Y2AcACgkQDGnB70EYHhOecwgApleV
9IOazPAk8pF0WfkslRWNrGHzaGoqO+WVhMS4doxR8bjqkrHwuI4c8Z2vCCMnKqb1
LF7djz9GXFGklvoyV7rQYrDx15bYWjtassvM4KExcnoPGxx9Kb7f0j0WSZwtwMUl
XWvsrS0+BkbRz+PIpGtDJhlI++aRoZdWCz5j5st5HzmacC0GVuYGvRPj8uMW2LN5
5HvGzlzqWIQ7l68KQPz7g5KIFKUrCPyzZS0m8Nj+gRWhF3+u3/1SY2hoCzobSMJj
PNhEovdpi8h5qbUOpHn2OM7l8/nioRaJwAmcMTnmlh1lqeyxIFYnFIBT24o3aEtN
N2d1xg/moXvzNTq7yrQ6UEogRmFubmluZyAoaHR0cDovL3d3dy5hcGFjaGUub3Jn
LykgPGZhbm5pbmdwakBhcGFjaGUub3JnPokBVAQTAQgAPgIbAwULCQgHAgYVCgkI
CwIEFgIDAQIeAQIXgBYhBGuk2osciKSUKKKcPQxpwe9BGB4TBQJmJYblBQkPGNgH
AAoJEAxpwe9BGB4TgwMIAJj3aQYKSxt9iyIP5nFhIWAFSPZcZ0gRB6jYMuANVoJE
yelbhIziN2dXLOjHWpia2x9p7krxY6ZLtogkL4MjfVpCaaXwsaYOq6LeuPN27/Pt
9rRcDz7j5lA9u9MShc6O8lwNbVReCWR08H0oiEdS09xwZY3aiZniptRBeK+mcsNc
Zw7kNmPHC79WaI6Rb/qnPLHJDD0l8vrVSShgmEeVJJoC/YjuVzKoiy2BmjSOpOLF
d88NlquWbvLO6j2tzboUs+93Kc4MwG57hwRIqS7wfsENkecSRj23KQN0UOpxgwz7
b0+ii9F9jsddEqqpXspcM8zaacf+FpIwO6rk7v1U8LG5AQ0EWulz1gEIAORuS4e+
Ek+d+0gBMlnigNJ2HoQalKFaERf5K/iQZY4E6Z2ahJ4UFIj7ri3isWgOleP+REJJ
PfeSrWQ5XgdklDlHHyv4O5iMkEFWQHttiaTuvdomDncQrNRPTaIOe9iQgfQzDw6m
qsb7ZWd5ICA8Krd97BwNHjq/CZ9+WrU6GDc6ImissLVVGGdkEGO7qZTqNUCeH4Zn
m/00mNMI4OH8xkwA2vzV5o3J5116zIuv29XQDtcSM+9NQ/HdsjKIA0OpDyWE7Ek/
SO+/CvkylwaOcmkuf33ADNjpF4BsBxn7L9XI1WJDtRaMkpbqMsymIxi35VUOGD+m
s+72CcUStfYj4NEAEQEAAYkBPAQYAQgAJgIbDBYhBGuk2osciKSUKKKcPQxpwe9B
GB4TBQJmJYcPBQkPGNg5AAoJEAxpwe9BGB4TTswH/3RmARIBV2LV72Sqk3rBcKLG
mY808npRuL6tQDVnrFPl9J8Q1/zItINYUc+2p8rHPW/N/5vyun4oVF9mT+Swqmuy
FkciQ8vCTdPlocGsGmb8eIKSvkzyRb3B8RkiXq2btDQBCVqVWbB6fh3FSI8L5442
r/IAQOKyd5wDGP2vDt1wGQ+0aV60gO2lWXOMi6U7dvt/+9vFaMciNdeZt7llNFIF
OzQuaMAqRP8viuuA29GAsy59x92LWEhm6RRSyU6rMGqfhbHQEs6FZ0x6zuBq8Ru7
T9wf/cc6uGGG6BqnjxFbWL/g9XJeU8gDxQ+ElJbYDXHT255g8kb92mHbJziPbxM=
=WUaV
-----END PGP PUBLIC KEY BLOCK-----
pub 2048R/1556F3A4 2016-10-04
uid Greg Woolsey <gwoolsey@apache.org>

View File

@ -1,6 +1,4 @@
Apache POI
======================
# Apache POI™
A Java library for reading and writing Microsoft Office binary and OOXML file formats.
@ -35,36 +33,45 @@ And lower-level, supporting components:
| Components named H??F are for reading or writing OLE2 binary formats.
| Components named X??F are for reading or writing OpenOffice XML (OOXML) formats.
Getting started
------------------
# Getting started
Website: https://poi.apache.org/
`Mailing lists`_:
[Mailing lists](https://poi.apache.org/mailinglists.html):
* `Developers`_
* `Users`_
* `General`_ (release announcements)
* [Developers](https://lists.apache.org/list.html?dev@poi.apache.org)
* [Users](https://lists.apache.org/list.html?user@poi.apache.org) Including Announcements
* [General](https://lists.apache.org/list.html?general@poi.apache.org)
Bug tracker:
## Bug trackers
* `Bugzilla`_
* `GitHub pull requests`_
* [Bugzilla](https://bz.apache.org/bugzilla/buglist.cgi?product=POI)
* [GitHub](https://github.com/apache/poi/issues)
Source code:
## Source code
* Official `Apache Subversion repo`_ at apache.org
* `ViewVC repo browser`_ at apache.org
* `GitHub git mirror`_ at github.com
* https://github.com/apache/poi
Requires Java 1.8 or later.
Requires Java 11 or later. `trunk` branch is used for 6.0.0 development. POI 4 and 5 releases require Java 8 or later.
Contributing
------------------
* Download and install svn or git, Java JDK 1.8+, and Apache Ant 1.8+ or Gradle
## Jars
* Check out the code from svn or git
A good resource for finding the published jars and forming build tool dependency definitions is https://mvnrepository.com/artifact/org.apache.poi.
* poi - main jar, including shared interfaces
* poi-scratchpad - extra classes to support legacy MS file formats (`H**F`)
* poi-ooxml - support for newer OOXML file formats (`X**F`)
* poi-ooxml-lite - generated classes based on MS XSDs used by poi-ooxml (only includes the most commonly used classes)
* poi-ooxml-full - generated classes based on MS XSDs (can be used instead of poi-ooxml-lite if you need support for less commonly used features)
* poi-excelant - tools for working with Excel files in Apache Ant scripts
* poi-examples
# Contributing
* Download and install git, Java JDK 11+, and Apache Ant 1.8+ or Gradle
* Check out the code from git
* Import the project into Eclipse or your favorite IDE
@ -82,25 +89,12 @@ Contributing
* Scratchpad (Binary formats): poi-scratchpad/src/main/java/org/apache/poi/
* Examples: poi-examples/src/main/java/org/apache/poi/
* More info: `How To Build page`_ at apache.org
* More info: [How To Build page](https://poi.apache.org/devel/)
Building jar files
------------------
# Building jar files
To build the jar files for poi, poi-ooxml, poi-ooxml-lite, poi-ooxml-full and poi-examples::
./gradlew jar
gradlew jar
.. _Mailing lists: https://poi.apache.org/mailinglists.html
.. _Developers: https://lists.apache.org/list.html?dev@poi.apache.org
.. _Users: https://lists.apache.org/list.html?user@poi.apache.org
.. _General: https://lists.apache.org/list.html?general@poi.apache.org
.. _Bugzilla: https://bz.apache.org/bugzilla/buglist.cgi?product=POI
.. _GitHub pull requests: https://github.com/apache/poi/pulls
.. _Apache Subversion repo: https://svn.apache.org/repos/asf/poi/trunk
.. _ViewVC repo browser: https://svn.apache.org/viewvc/poi/trunk
.. _GitHub git mirror: https://github.com/apache/poi
.. _How To Build page: http://poi.apache.org/devel/

View File

@ -1,4 +1,9 @@
# Security
If you suspect you have found a security vulnerability in Apache POI code, please read https://www.apache.org/security/
for how to report the issue. Please do not report the details publicly until the report is reviewed.
for how to report the issue. Please do not report the details publicly until the report is reviewed.
## Secure Processing
We strongly discourage users of Apache POI from using the lib to parse documents from untrusted sources. For more details,
please read https://poi.apache.org/security.html.

View File

@ -24,26 +24,33 @@ import javax.xml.xpath.XPathFactory
buildscript {
repositories {
maven { url 'https://plugins.gradle.org/m2/' }
maven { url = 'https://plugins.gradle.org/m2/' }
mavenCentral()
}
}
plugins {
id 'base'
id 'com.dorongold.task-tree' version '2.1.1'
id 'org.nosphere.apache.rat' version '0.8.0'
id 'com.dorongold.task-tree' version '4.0.1'
id 'org.nosphere.apache.rat' version '0.8.1'
id 'distribution'
id "com.github.spotbugs" version '5.0.14'
id 'de.thetaphi.forbiddenapis' version '3.5.1'
id 'org.sonarqube' version '4.0.0.2929'
id 'org.cyclonedx.bom' version '1.7.4'
id 'com.adarshr.test-logger' version '3.2.0'
// 6.2.0+ requires JDK 11
// this is the version of the Gradle plugin, it usually includes a
// different version of spotbugs itself
// Latest spotbugs: https://github.com/spotbugs/spotbugs
// Latest gradle plugin: https://plugins.gradle.org/plugin/com.github.spotbugs
id 'com.github.spotbugs' version '6.4.8'
id 'de.thetaphi.forbiddenapis' version '3.10'
id 'org.sonarqube' version '7.2.2.6593'
id 'org.cyclonedx.bom' version '2.4.1'
id 'com.adarshr.test-logger' version '4.0.0'
}
repositories {
mavenCentral()
//maven { url 'https://repository.apache.org/content/repositories/staging' }
// maven { url 'https://repository.apache.org/content/repositories/staging' }
}
// Only add the plugin for Sonar if enabled
@ -52,7 +59,8 @@ if (project.hasProperty('enableSonar')) {
apply plugin: 'org.sonarqube'
}
boolean isCIBuild = false;
boolean isCIBuild = false
String dateSuffix = new Date().format('yyyyMMdd')
// For help converting an Ant build to a Gradle build, see
// https://docs.gradle.org/current/userguide/ant.html
@ -66,8 +74,8 @@ configurations {
}
dependencies {
antLibs("org.junit.jupiter:junit-jupiter:5.10.0")
antLibs("org.apache.ant:ant-junitlauncher:1.10.14")
antLibs("org.junit.jupiter:junit-jupiter:5.13.4")
antLibs("org.apache.ant:ant-junitlauncher:1.10.15")
}
ant.taskdef(name: "junit",
@ -76,20 +84,9 @@ ant.taskdef(name: "junit",
wrapper {
gradleVersion = '8.3'
gradleVersion = '8.14.3'
}
task adjustWrapperPropertiesFile {
doLast {
ant.replaceregexp(match:'^#.*', replace:'', flags:'g', byline:true) {
fileset(dir: project.projectDir, includes: 'gradle/wrapper/gradle-wrapper.properties')
}
new File(project.projectDir, 'gradle/wrapper/gradle-wrapper.properties').with { it.text = it.readLines().findAll { it }.sort().join('\n') }
ant.fixcrlf(file: 'gradle/wrapper/gradle-wrapper.properties', eol: 'lf')
}
}
wrapper.finalizedBy adjustWrapperPropertiesFile
group = 'org.apache.poi'
/**
@ -99,7 +96,7 @@ allprojects {
// apply plugin: 'eclipse'
apply plugin: 'idea'
version = '5.2.4'
version = '6.0.0-SNAPSHOT'
}
/**
@ -117,56 +114,57 @@ subprojects {
apply plugin: 'com.adarshr.test-logger'
ext {
bouncyCastleVersion = '1.76'
commonsCodecVersion = '1.16.0'
commonsCompressVersion = '1.24.0'
commonsIoVersion = '2.13.0'
bouncyCastleVersion = '1.83'
commonsCodecVersion = '1.21.0'
commonsCompressVersion = '1.28.0'
commonsIoVersion = '2.21.0'
commonsMathVersion = '3.6.1'
junitVersion = '5.10.0'
log4jVersion = '2.20.0'
mockitoVersion = '4.11.0'
hamcrestVersion = '2.2'
xmlbeansVersion = '5.1.1'
batikVersion = '1.17'
graphics2dVersion = '0.43'
pdfboxVersion = '2.0.29'
saxonVersion = '11.5'
junitVersion = '5.13.4'
log4jVersion = '2.25.3'
mockitoVersion = '5.21.0'
hamcrestVersion = '3.0'
xmlbeansVersion = '5.3.0'
batikVersion = '1.19'
graphics2dVersion = '3.0.5'
pdfboxVersion = '3.0.6'
saxonVersion = '12.9'
xmlSecVersion = '3.0.6'
apiGuardianVersion = '1.1.2'
jdkVersion = (project.properties['jdkVersion'] ?: '8') as int
jdkVersion = (project.properties['jdkVersion'] ?: '11') as int
// see https://github.com/gradle/gradle/blob/master/subprojects/jvm-services/src/main/java/org/gradle/internal/jvm/inspection/JvmVendor.java
jdkVendor = (project.properties['jdkVendor'] ?: '') as String
JAVA9_SRC = 'src/main/java9'
JAVA9_OUT = "${buildDir}/classes/java9/main/"
JAVA9_OUT = layout.buildDirectory.dir('classes/java9/main/').get().asFile.absolutePath
TEST9_SRC = 'src/test/java9'
TEST9_OUT = "${buildDir}/classes/java9/test/"
VERSIONS9 = 'META-INF/versions/9'
TEST9_OUT = layout.buildDirectory.dir('classes/java9/test/').get().asFile.absolutePath
VERSIONS9 = '/META-INF/versions/9'
NO_SCRATCHPAD = (findProperty("scratchpad.ignore") == "true")
SAXON_TEST = (findProperty("saxon.test") == "true")
}
configurations {
all {
configureEach {
resolutionStrategy {
force "commons-io:commons-io:${commonsIoVersion}"
force 'org.slf4j:slf4j-api:2.0.9'
force 'com.fasterxml.woodstox:woodstox-core:6.5.1'
force 'org.slf4j:slf4j-api:2.0.17'
force 'com.fasterxml.woodstox:woodstox-core:7.1.1'
}
}
}
tasks.withType(JavaCompile) {
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
options.compilerArgs += '-Xlint:unchecked'
options.deprecation = true
options.incremental = true
}
tasks.withType(Test) {
tasks.withType(Test).configureEach {
systemProperty "file.encoding", "UTF-8"
}
tasks.withType(Javadoc) {
tasks.withType(Javadoc).configureEach {
options.encoding = 'UTF-8'
}
tasks.withType(AbstractArchiveTask).configureEach {
@ -176,14 +174,18 @@ subprojects {
repositories {
mavenCentral()
//maven { url 'https://repository.apache.org/content/repositories/staging' }
// maven { url 'https://repository.apache.org/content/repositories/staging' }
}
dependencies {
testImplementation "org.junit.jupiter:junit-jupiter:${junitVersion}"
api platform("org.apache.logging.log4j:log4j-bom:${log4jVersion}")
api 'org.apache.logging.log4j:log4j-api'
testImplementation platform("org.junit:junit-bom:${junitVersion}")
testImplementation 'org.junit.jupiter:junit-jupiter'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
testImplementation "org.mockito:mockito-core:${mockitoVersion}"
testImplementation "org.hamcrest:hamcrest:${hamcrestVersion}"
testImplementation "org.apache.logging.log4j:log4j-core:${log4jVersion}"
testImplementation 'org.apache.logging.log4j:log4j-core'
if (SAXON_TEST) {
testRuntimeOnly("net.sf.saxon:Saxon-HE:${saxonVersion}") {
@ -210,33 +212,93 @@ subprojects {
doFirst {
options {
if (jdkVersion > 8) addBooleanOption('html5', true)
addBooleanOption('html5', true)
addBooleanOption('Xdoclint:all,-missing', true)
links 'https://poi.apache.org/apidocs/dev/'
links 'https://docs.oracle.com/javase/8/docs/api/'
if (jdkVersion >= 23) links 'https://docs.oracle.com/en/java/javase/23/docs/api/' else links 'https://docs.oracle.com/en/java/javase/11/docs/api/'
links 'https://xmlbeans.apache.org/docs/5.0.0/'
links 'https://commons.apache.org/proper/commons-compress/apidocs/'
links 'https://www.javadocs.dev/org.apache.commons/commons-compress/1.28.0/'
use = true
splitIndex = true
source = "1.8"
source = "11"
}
}
}
// helper-target to get a directory with all third-party libraries
// this is used for mass-regression-testing
task getDeps(type: Copy) {
tasks.register('getDeps', Copy) {
from sourceSets.main.runtimeClasspath
into 'build/runtime/'
}
tasks.withType(Jar) {
duplicatesStrategy = 'fail'
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}")
tasks.withType(Jar).configureEach {
duplicatesStrategy = DuplicatesStrategy.FAIL
destinationDirectory = file("../build/dist/maven/${base.archivesName.get()}")
doLast {
ant.checksum(file: it.archivePath, algorithm: 'SHA-256', fileext: '.sha256', format: 'MD5SUM')
ant.checksum(file: it.archivePath, algorithm: 'SHA-512', fileext: '.sha512', format: 'MD5SUM')
// make sure we do not have distribution jar-files with different versions
// in the build-dir as those lead to strange errors about "duplicate modules"
// when building java9 JPMS class files ("java9")
ant.delete(failOnError: true, verbose: true) {
fileset(dir: "../build/dist/maven/${base.archivesName.get()}", erroronmissingdir: false) {
include(name: '*.jar')
exclude(name: "*${version}.jar")
exclude(name: "*${version}-sources.jar")
include(name: '*.jar.asc')
exclude(name: "*${version}.jar.asc")
exclude(name: "*${version}-sources.jar.asc")
include(name: '*.jar.sha256')
exclude(name: "*${version}.jar.sha256")
exclude(name: "*${version}-sources.jar.sha256")
include(name: '*.jar.sha512')
exclude(name: "*${version}.jar.sha512")
exclude(name: "*${version}-sources.jar.sha512")
include(name: '*.pom')
exclude(name: "*${version}.pom")
include(name: '*.pom.asc')
exclude(name: "*${version}.pom.asc")
}
}
// use failOnError=false for -javadoc and -tests as not all modules create this directory
ant.delete(failOnError: false, verbose: true) {
fileset(dir: "../build/dist/maven/${base.archivesName.get()}-javadoc", erroronmissingdir: false) {
include(name: '*-javadoc.jar')
exclude(name: "*${version}-javadoc.jar")
include(name: '*-javadoc.jar.asc')
exclude(name: "*${version}-javadoc.jar.asc")
include(name: '*-javadoc.jar.sha256')
exclude(name: "*${version}-javadoc.jar.sha256")
include(name: '*-javadoc.jar.sha512')
exclude(name: "*${version}-javadoc.jar.sha512")
}
}
ant.delete(failOnError: false, verbose: true) {
fileset(dir: "../build/dist/maven/${base.archivesName.get()}-tests", erroronmissingdir: false) {
include(name: '*-tests.jar')
exclude(name: "*${version}-tests.jar")
include(name: '*-tests.jar.asc')
exclude(name: "*${version}-tests.jar.asc")
include(name: '*-tests.jar.sha256')
exclude(name: "*${version}-tests.jar.sha256")
include(name: '*-tests.jar.sha512')
exclude(name: "*${version}-tests.jar.sha512")
}
}
ant.checksum(file: it.archiveFile.get().asFile, algorithm: 'SHA-256', fileext: '.sha256', format: 'MD5SUM')
ant.checksum(file: it.archiveFile.get().asFile, algorithm: 'SHA-512', fileext: '.sha512', format: 'MD5SUM')
}
}
@ -264,15 +326,19 @@ subprojects {
javadocJar {
// if javadocs and binaries are in the same directory, JPMS complaints about duplicated modules
// in the module-path
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}-javadoc")
destinationDirectory = file("../build/dist/maven/${base.archivesName.get()}-javadoc")
}
sourcesJar {
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}")
destinationDirectory = file("../build/dist/maven/${base.archivesName.get()}")
exclude 'META-INF/services/**'
}
test {
// use US locale for tests
systemProperty "user.language", "en"
systemProperty "user.country", "US"
// make XML test-results available for Jenkins CI
useJUnitPlatform()
reports {
@ -309,10 +375,10 @@ subprojects {
]
// detect if running on Jenkins/CI
isCIBuild |= Boolean.valueOf(System.getenv("CI_BUILD"));
isCIBuild |= Boolean.valueOf(System.getenv("CI_BUILD"))
if (isCIBuild) {
System.out.println("Run with reduced parallelism for CI build");
System.out.println("Run with reduced parallelism for CI build")
jvmArgs += [
// Strictly serial
@ -355,27 +421,25 @@ subprojects {
systemProperties['java.locale.providers'] = 'JRE,CLDR'
doFirst {
if (jdkVersion > 8) {
// some options were removed in JDK 18
if (jdkVersion < 18) {
jvmArgs += [
'--illegal-access=warn',
]
}
// some options were removed in JDK 18
if (jdkVersion < 18) {
jvmArgs += [
// see https://github.com/java9-modularity/gradle-modules-plugin/issues/97
// opposed to the recommendation there, it doesn't work to add ... to the dependencies
// testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.10.0'
// gradles gradle-worker.jar is still not a JPMS module and thus runs as unnamed module
'--add-exports','org.junit.platform.commons/org.junit.platform.commons.util=org.apache.poi.poi',
'--add-exports','org.junit.platform.commons/org.junit.platform.commons.util=ALL-UNNAMED',
'--add-exports','org.junit.platform.commons/org.junit.platform.commons.logging=ALL-UNNAMED',
'-Dsun.reflect.debugModuleAccessChecks=true',
'-Dcom.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize=true',
'--illegal-access=warn',
]
}
jvmArgs += [
// see https://github.com/java9-modularity/gradle-modules-plugin/issues/97
// opposed to the recommendation there, it doesn't work to add ... to the dependencies
// testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.13.2'
// gradles gradle-worker.jar is still not a JPMS module and thus runs as unnamed module
'--add-exports','org.junit.platform.commons/org.junit.platform.commons.util=org.apache.poi.poi',
'--add-exports','org.junit.platform.commons/org.junit.platform.commons.util=ALL-UNNAMED',
'--add-exports','org.junit.platform.commons/org.junit.platform.commons.logging=ALL-UNNAMED',
'-Dsun.reflect.debugModuleAccessChecks=true',
'-Dcom.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize=true',
]
}
jacoco {
@ -388,7 +452,7 @@ subprojects {
}
jacoco {
toolVersion = '0.8.10'
toolVersion = '0.8.13'
}
jacocoTestReport {
@ -407,7 +471,7 @@ subprojects {
//
// Some additional properties are currently set in the Jenkins-DSL, see jenkins/create_jobs.groovy
//
sonarqube {
sonar {
properties {
// as we currently use build/<module>/ as project-basedir, we need to tell Sonar to use
// the root-folder as "basedir" for the projects
@ -434,21 +498,20 @@ subprojects {
}
forbiddenApisTest {
// forbiddenapis bundled signatures max supported version is 17
// also see https://github.com/policeman-tools/forbidden-apis/issues/191
targetCompatibility = (JavaVersion.VERSION_17.isCompatibleWith(JavaVersion.current()) ? JavaVersion.current() : JavaVersion.VERSION_17)
// forbiddenapis:3.8 bundled signatures max supported version is 23
targetCompatibility = (JavaVersion.VERSION_23.isCompatibleWith(JavaVersion.current()) ? JavaVersion.current() : JavaVersion.VERSION_23)
}
forbiddenApisMain {
signaturesFiles += files('../src/resources/devtools/forbidden-signatures-prod.txt')
targetCompatibility = (JavaVersion.VERSION_17.isCompatibleWith(JavaVersion.current()) ? JavaVersion.current() : JavaVersion.VERSION_17)
targetCompatibility = (JavaVersion.VERSION_23.isCompatibleWith(JavaVersion.current()) ? JavaVersion.current() : JavaVersion.VERSION_23)
}
publishing {
publications {
POI(MavenPublication) {
groupId 'org.apache.poi'
artifactId project.archivesBaseName
groupId = 'org.apache.poi'
artifactId = base.archivesName.get()
from components.java
@ -529,9 +592,9 @@ subprojects {
}
}
generatePomFileForPOIPublication.destination = "../build/dist/maven/${project.archivesBaseName}/${project.archivesBaseName}-${project.version}.pom"
generatePomFileForPOIPublication.destination = "../build/dist/maven/${base.archivesName.get()}/${base.archivesName.get()}-${project.version}.pom"
tasks.withType(GenerateModuleMetadata) {
tasks.withType(GenerateModuleMetadata).configureEach {
enabled = false
}
@ -559,14 +622,14 @@ subprojects {
}
// initial try to provide a combined JavaDoc, grouping is still missing here, though!
task allJavaDoc(type: Javadoc) {
var prj = [ project(':poi'), project(':poi-excelant'), project(':poi-ooxml'), project(':poi-scratchpad') ]
tasks.register('allJavaDoc', Javadoc) {
var prj = [project(':poi'), project(':poi-excelant'), project(':poi-ooxml'), project(':poi-scratchpad')]
source prj.collect { it.sourceSets.main.allJava }
// for possible settings see https://docs.gradle.org/current/dsl/org.gradle.api.tasks.javadoc.Javadoc.html
classpath = files(subprojects.collect { it.sourceSets.main.compileClasspath })
destinationDir = file("${buildDir}/docs/javadoc")
maxMemory="2048M"
destinationDir = layout.buildDirectory.dir('docs/javadoc').get().asFile
maxMemory = "2048M"
// for possible options see https://docs.gradle.org/current/javadoc/org/gradle/external/javadoc/StandardJavadocDocletOptions.html
options.use = true
@ -581,7 +644,7 @@ task allJavaDoc(type: Javadoc) {
options.group('SS - Common Spreadsheet Format', 'org.apache.poi.ss*')
options.group('HSSF - Horrible Spreadsheet Format', 'org.apache.poi.hssf*')
options.group('XSSF - Open Office XML Spreadsheet Format', 'org.apache.poi.xssf*')
options.group('SL - Common Slideshow Format', 'org.apache.poi.sl*')
options.group('SL - Common Slideshow Format', 'org.apache.poi.sl*')
options.group('HSLF - Horrible Slideshow Format', 'org.apache.poi.hslf*', 'org.apache.poi.hwmf*', 'org.apache.poi.hemf*')
options.group('XSLF - Open Office XML Slideshow Format', 'org.apache.poi.xslf*')
options.group('HWPF - Horrible Word Processor Format', 'org.apache.poi.hwpf*')
@ -642,7 +705,9 @@ rat {
"osgi/README.md",
"src/resources/ooxml-lite-report.*",
// ignore svn conflict artifacts
"**/module-info.*"
"**/module-info.*",
"poi-examples/src/main/groovy/settings.gradle",
"poi-examples/src/main/groovy/.gradle/**"
]
/*
@ -657,21 +722,21 @@ rat {
}
task jenkins(dependsOn: [
'replaceVersion',
subprojects.build,
subprojects.check,
subprojects.javadoc,
subprojects.jacocoTestReport,
subprojects.getDeps,
'srcDistZip',
'srcDistTar',
rat
'replaceVersion',
subprojects.build,
subprojects.check,
subprojects.javadoc,
subprojects.jacocoTestReport,
subprojects.getDeps,
'srcDistZip',
'srcDistTar',
rat
]) {}
task jenkinsLite(dependsOn: [
'replaceVersion',
subprojects.build,
subprojects.test
'replaceVersion',
subprojects.build,
subprojects.test
]) {}
/*task downloadJarsToLibs() {
@ -685,14 +750,14 @@ task jenkinsLite(dependsOn: [
//compileJava.dependsOn 'downloadJarsToLibs'
task replaceVersion() {
tasks.register('replaceVersion') {
outputs.upToDateWhen { false }
var version = subprojects[0].version
var tokens = [
[ 'osgi', 'pom.xml', '(packaging>\\n\\s*<version>)[0-9.]+(?:-SNAPSHOT|-RC\\d+)?', "\\1${version}" ],
[ 'osgi', 'pom.xml', '(<poi.version>)[0-9.]+(?:-SNAPSHOT|-RC\\d+)?', "\\1${version}" ]
// [ '.', 'build.gradle', ' version = \'[0-9.]+(?:-SNAPSHOT)?\'', " version = '${version}'" ]
['osgi', 'pom.xml', '(packaging>\\n\\s*<version>)[0-9.]+(?:-SNAPSHOT|-RC\\d+)?', "\\1${version}"],
['osgi', 'pom.xml', '(<poi.version>)[0-9.]+(?:-SNAPSHOT|-RC\\d+)?', "\\1${version}"]
// [ '.', 'build.gradle', ' version = \'[0-9.]+(?:-SNAPSHOT)?\'', " version = '${version}'" ]
]
doLast {
@ -716,20 +781,13 @@ task zipJavadocs(type: Zip, dependsOn: allJavaDoc) {
archiveExtension = 'jar'
}
tasks.withType(Tar) {
tasks.withType(Tar).configureEach {
compression = Compression.GZIP
archiveExtension = 'tgz'
}
distributions {
var version = subprojects[0].version
var date = new Date().format('yyyyMMdd')
var poiDep = project(':poi').configurations.getAt('compileClasspath')
var ooxmlImp = project(':poi-ooxml').configurations.getAt('compileClasspath')
src {
distributionBaseName = "poi-src-${version}-${date}"
contents {
from('.') {
exclude '*/build/**'
@ -782,7 +840,7 @@ distributions {
}
}
task soLinkCheck() {
tasks.register('soLinkCheck') {
doLast {
def path = ant.path {
fileset(dir: '.', includes: '**/*.java') {
@ -819,12 +877,14 @@ var srcDep = [
':poi-ooxml-lite:generateModuleInfo'
]
srcDistTar.setArchiveFileName("apache-poi-src-${subprojects[0].version}-${dateSuffix}.tgz")
srcDistZip.setArchiveFileName("apache-poi-src-${subprojects[0].version}-${dateSuffix}.zip")
srcDistTar.dependsOn srcDep
srcDistZip.dependsOn srcDep
soLinkCheck.dependsOn srcDep
rat.dependsOn soLinkCheck
task fixDistDir {
tasks.register('fixDistDir') {
doLast {
ant.mkdir(dir: 'build/dist')
ant.move(todir: 'build/dist') {

559
build.xml
View File

@ -26,7 +26,7 @@ under the License.
To build the documentation you will need to install forrest and set
the FORREST_HOME environment variable.
Since POI 4.0 you will need JDK 1.8 or newer to build and run POI.
Since POI 6.0 you will need JDK 11 or newer to build and run POI.
Some people may find the tests hang when run through Ant. If this
happens to you, try giving Ant some more memory when you run it, eg:
@ -42,7 +42,7 @@ under the License.
<description>The Apache POI project Ant build.</description>
<property name="version.id" value="5.2.4"/>
<property name="version.id" value="6.0.0-SNAPSHOT"/>
<property name="release.rc" value=""/>
<property environment="env"/>
@ -60,8 +60,8 @@ under the License.
<!-- compiler options -->
<property name="jdk.version.source" value="1.8" description="JDK version of source code"/>
<property name="jdk.version.class" value="1.8" description="JDK version of generated class files"/>
<property name="jdk.version.source" value="11" description="JDK version of source code"/>
<property name="jdk.version.class" value="11" description="JDK version of generated class files"/>
<property name="compile.debug" value="true"/>
<condition property="isIBMVM">
@ -69,7 +69,7 @@ under the License.
</condition>
<condition property="isJava8" else="false">
<equals arg1="${ant.java.version}" arg2="1.8"/>
<equals arg1="${ant.java.version}" arg2="11"/>
</condition>
<!-- add addOpens parameter for Java 9 and higher -->
@ -263,92 +263,95 @@ under the License.
<!-- jars in the /lib directory, see the fetch-jars target-->
<dependency prefix="main.commons-codec" artifact="commons-codec:commons-codec:1.16.0" usage="main"/>
<dependency prefix="main.commons-collections4" artifact="org.apache.commons:commons-collections4:4.4" usage="main"/>
<dependency prefix="main.commons-codec" artifact="commons-codec:commons-codec:1.19.0" usage="main"/>
<dependency prefix="main.commons-collections4" artifact="org.apache.commons:commons-collections4:4.5.0" usage="main"/>
<dependency prefix="main.commons-math3" artifact="org.apache.commons:commons-math3:3.6.1" usage="main"/>
<dependency prefix="main.commons-io" artifact="commons-io:commons-io:2.13.0" usage="main"/>
<dependency prefix="main.commons-io" artifact="commons-io:commons-io:2.20.0" usage="main"/>
<dependency prefix="main.com.zaxxer" artifact="com.zaxxer:SparseBitSet:1.3" usage="main"/>
<dependency prefix="main.log4j-api" artifact="org.apache.logging.log4j:log4j-api:2.20.0" usage="main"/>
<dependency prefix="main.log4j-api" artifact="org.apache.logging.log4j:log4j-api:2.25.3" usage="main"/>
<dependency prefix="main.junit-api" artifact="org.junit.jupiter:junit-jupiter-api:5.10.0" usage="main-tests"/>
<dependency prefix="main.junit-jengine" artifact="org.junit.jupiter:junit-jupiter-engine:5.10.0" usage="main-tests"/>
<dependency prefix="main.junit-params" artifact="org.junit.jupiter:junit-jupiter-params:5.10.0" usage="main-tests"/>
<dependency prefix="main.junit-api" artifact="org.junit.jupiter:junit-jupiter-api:5.13.4" usage="main-tests"/>
<dependency prefix="main.junit-jengine" artifact="org.junit.jupiter:junit-jupiter-engine:5.13.4" usage="main-tests"/>
<dependency prefix="main.junit-params" artifact="org.junit.jupiter:junit-jupiter-params:5.13.4" usage="main-tests"/>
<dependency prefix="main.junit-opentest4j" artifact="org.opentest4j:opentest4j:1.2.0" usage="main-tests"/>
<dependency prefix="main.junit-apiguardian" artifact="org.apiguardian:apiguardian-api:1.1.2" usage="main-tests"/>
<dependency prefix="main.junit-pcommons" artifact="org.junit.platform:junit-platform-commons:1.10.0" usage="main-tests"/>
<dependency prefix="main.junit-pengine" artifact="org.junit.platform:junit-platform-engine:1.10.0" usage="main-tests"/>
<dependency prefix="main.junit-plauncher" artifact="org.junit.platform:junit-platform-launcher:1.10.0" usage="main-tests"/>
<dependency prefix="main.junit-pcommons" artifact="org.junit.platform:junit-platform-commons:1.13.4" usage="main-tests"/>
<dependency prefix="main.junit-pengine" artifact="org.junit.platform:junit-platform-engine:1.13.4" usage="main-tests"/>
<dependency prefix="main.junit-plauncher" artifact="org.junit.platform:junit-platform-launcher:1.13.4" usage="main-tests"/>
<dependency prefix="main.jmh" artifact="org.openjdk.jmh:jmh-core:1.35" usage="main-tests"/>
<dependency prefix="main.jmhAnnotation" artifact="org.openjdk.jmh:jmh-generator-annprocess:1.35" usage="main-tests"/>
<dependency prefix="main.hamcrest" artifact="org.hamcrest:hamcrest:2.2" usage="main-tests"/>
<dependency prefix="main.xmlunit" artifact="org.xmlunit:xmlunit-core:2.9.1" usage="main-tests"/>
<dependency prefix="main.mockito" artifact="org.mockito:mockito-core:4.11.0" usage="main-tests"/>
<dependency prefix="main.byte-buddy" artifact="net.bytebuddy:byte-buddy:1.14.7" usage="main-tests"/>
<dependency prefix="main.byte-buddy-agent" artifact="net.bytebuddy:byte-buddy-agent:1.14.7" usage="main-tests"/>
<dependency prefix="main.hamcrest" artifact="org.hamcrest:hamcrest:3.0" usage="main-tests"/>
<dependency prefix="main.xmlunit" artifact="org.xmlunit:xmlunit-core:2.10.3" usage="main-tests"/>
<dependency prefix="main.mockito" artifact="org.mockito:mockito-core:5.20.0" usage="main-tests"/>
<dependency prefix="main.byte-buddy" artifact="net.bytebuddy:byte-buddy:1.17.5" usage="main-tests"/>
<dependency prefix="main.byte-buddy-agent" artifact="net.bytebuddy:byte-buddy-agent:1.17.5" usage="main-tests"/>
<dependency prefix="main.objenesis" artifact="org.objenesis:objenesis:3.1" usage="main-tests"/>
<dependency prefix="main.log4j-core" artifact="org.apache.logging.log4j:log4j-core:2.20.0" usage="main-tests"/>
<dependency prefix="main.log4j-core" artifact="org.apache.logging.log4j:log4j-core:2.25.3" usage="main-tests"/>
<dependency prefix="main.commons-logging" artifact="commons-logging:commons-logging:1.2" usage="main-tests"/>
<dependency prefix="main.ant" artifact="org.apache.ant:ant:1.10.14" usage="excelant"/>
<dependency prefix="main.antlauncher" artifact="org.apache.ant:ant-launcher:1.10.14" usage="excelant"/>
<dependency prefix="main.ant" artifact="org.apache.ant:ant:1.10.15" usage="excelant"/>
<dependency prefix="main.antlauncher" artifact="org.apache.ant:ant-launcher:1.10.15" usage="excelant"/>
<!-- xml signature libs - not part of the distribution -->
<dependency prefix="dsig.xmlsec" artifact="org.apache.santuario:xmlsec:3.0.2" usage="ooxml-provided"/>
<dependency prefix="dsig.bouncycastle-prov" artifact="org.bouncycastle:bcprov-jdk18on:1.76" usage="ooxml-provided"/>
<dependency prefix="dsig.bouncycastle-pkix" artifact="org.bouncycastle:bcpkix-jdk18on:1.76" usage="ooxml-provided"/>
<dependency prefix="dsig.bouncycastle-util" artifact="org.bouncycastle:bcutil-jdk18on:1.76" usage="ooxml-provided"/>
<dependency prefix="dsig.xmlsec" artifact="org.apache.santuario:xmlsec:3.0.6" usage="ooxml-provided"/>
<dependency prefix="dsig.bouncycastle-prov" artifact="org.bouncycastle:bcprov-jdk18on:1.82" usage="ooxml-provided"/>
<dependency prefix="dsig.bouncycastle-pkix" artifact="org.bouncycastle:bcpkix-jdk18on:1.82" usage="ooxml-provided"/>
<dependency prefix="dsig.bouncycastle-util" artifact="org.bouncycastle:bcutil-jdk18on:1.82" usage="ooxml-provided"/>
<!-- only used for signing the release - not used with the ooxml signatures -->
<dependency prefix="dsig.bouncycastle-bcpg" artifact="org.bouncycastle:bcpg-jdk18on:1.76" usage="util"/>
<dependency prefix="dsig.bouncycastle-bcpg" artifact="org.bouncycastle:bcpg-jdk18on:1.82" usage="util"/>
<dependency prefix="ooxml.test.stax2" artifact="org.codehaus.woodstox:stax2-api:4.2.1" usage="ooxml-provided"/>
<!-- svg/batik/pdf libs - not part of the distribution - move batik to its own directory because of JPMS module-path issues -->
<dependency prefix="svg.xml-apis-ext" artifact="xml-apis:xml-apis-ext:1.3.04" usage="ooxml-batik"/>
<dependency prefix="svg.xmlgraphics-commons" artifact="org.apache.xmlgraphics:xmlgraphics-commons:2.7" usage="ooxml-batik"/>
<dependency prefix="svg.batik-anim" artifact="org.apache.xmlgraphics:batik-anim:1.17" usage="ooxml-batik"/>
<dependency prefix="svg.batik-awt-util" artifact="org.apache.xmlgraphics:batik-awt-util:1.17" usage="ooxml-batik"/>
<dependency prefix="svg.batik-bridge" artifact="org.apache.xmlgraphics:batik-bridge:1.17" usage="ooxml-batik"/>
<dependency prefix="svg.batik-codec" artifact="org.apache.xmlgraphics:batik-codec:1.17" usage="ooxml-batik"/>
<dependency prefix="svg.batik-constants" artifact="org.apache.xmlgraphics:batik-constants:1.17" usage="ooxml-batik"/>
<dependency prefix="svg.batik-css" artifact="org.apache.xmlgraphics:batik-css:1.17" usage="ooxml-batik"/>
<dependency prefix="svg.batik-dom" artifact="org.apache.xmlgraphics:batik-dom:1.17" usage="ooxml-batik"/>
<dependency prefix="svg.batik-ext" artifact="org.apache.xmlgraphics:batik-ext:1.17" usage="ooxml-batik"/>
<dependency prefix="svg.batik-gvt" artifact="org.apache.xmlgraphics:batik-gvt:1.17" usage="ooxml-batik"/>
<dependency prefix="svg.batik-i18n" artifact="org.apache.xmlgraphics:batik-i18n:1.17" usage="ooxml-batik"/>
<dependency prefix="svg.batik-parser" artifact="org.apache.xmlgraphics:batik-parser:1.17" usage="ooxml-batik"/>
<dependency prefix="svg.batik-script" artifact="org.apache.xmlgraphics:batik-script:1.17" usage="ooxml-batik"/>
<dependency prefix="svg.batik-shared-resources" artifact="org.apache.xmlgraphics:batik-shared-resources:1.17" usage="ooxml-batik"/>
<dependency prefix="svg.batik-svg-dom" artifact="org.apache.xmlgraphics:batik-svg-dom:1.17" usage="ooxml-batik"/>
<dependency prefix="svg.batik-svggen" artifact="org.apache.xmlgraphics:batik-svggen:1.17" usage="ooxml-batik"/>
<dependency prefix="svg.batik-svgrasterizer" artifact="org.apache.xmlgraphics:batik-svgrasterizer:1.17" usage="ooxml-batik"/>
<dependency prefix="svg.batik-transcoder" artifact="org.apache.xmlgraphics:batik-transcoder:1.17" usage="ooxml-batik"/>
<dependency prefix="svg.batik-util" artifact="org.apache.xmlgraphics:batik-util:1.17" usage="ooxml-batik"/>
<dependency prefix="svg.batik-xml" artifact="org.apache.xmlgraphics:batik-xml:1.17" usage="ooxml-batik"/>
<dependency prefix="pdf.pdfbox" artifact="org.apache.pdfbox:pdfbox:2.0.29" usage="ooxml-provided"/>
<dependency prefix="pdf.fontbox" artifact="org.apache.pdfbox:fontbox:2.0.29" usage="ooxml-provided"/>
<dependency prefix="pdf.graphics2d" artifact="de.rototor.pdfbox:graphics2d:0.43" usage="ooxml-provided"/>
<dependency prefix="svg.xmlgraphics-commons" artifact="org.apache.xmlgraphics:xmlgraphics-commons:2.11" usage="ooxml-batik"/>
<dependency prefix="svg.batik-anim" artifact="org.apache.xmlgraphics:batik-anim:1.19" usage="ooxml-batik"/>
<dependency prefix="svg.batik-awt-util" artifact="org.apache.xmlgraphics:batik-awt-util:1.19" usage="ooxml-batik"/>
<dependency prefix="svg.batik-bridge" artifact="org.apache.xmlgraphics:batik-bridge:1.19" usage="ooxml-batik"/>
<dependency prefix="svg.batik-codec" artifact="org.apache.xmlgraphics:batik-codec:1.19" usage="ooxml-batik"/>
<dependency prefix="svg.batik-constants" artifact="org.apache.xmlgraphics:batik-constants:1.19" usage="ooxml-batik"/>
<dependency prefix="svg.batik-css" artifact="org.apache.xmlgraphics:batik-css:1.19" usage="ooxml-batik"/>
<dependency prefix="svg.batik-dom" artifact="org.apache.xmlgraphics:batik-dom:1.19" usage="ooxml-batik"/>
<dependency prefix="svg.batik-ext" artifact="org.apache.xmlgraphics:batik-ext:1.19" usage="ooxml-batik"/>
<dependency prefix="svg.batik-gvt" artifact="org.apache.xmlgraphics:batik-gvt:1.19" usage="ooxml-batik"/>
<dependency prefix="svg.batik-i18n" artifact="org.apache.xmlgraphics:batik-i18n:1.19" usage="ooxml-batik"/>
<dependency prefix="svg.batik-parser" artifact="org.apache.xmlgraphics:batik-parser:1.19" usage="ooxml-batik"/>
<dependency prefix="svg.batik-script" artifact="org.apache.xmlgraphics:batik-script:1.19" usage="ooxml-batik"/>
<dependency prefix="svg.batik-shared-resources" artifact="org.apache.xmlgraphics:batik-shared-resources:1.19" usage="ooxml-batik"/>
<dependency prefix="svg.batik-svg-dom" artifact="org.apache.xmlgraphics:batik-svg-dom:1.19" usage="ooxml-batik"/>
<dependency prefix="svg.batik-svggen" artifact="org.apache.xmlgraphics:batik-svggen:1.19" usage="ooxml-batik"/>
<dependency prefix="svg.batik-svgrasterizer" artifact="org.apache.xmlgraphics:batik-svgrasterizer:1.19" usage="ooxml-batik"/>
<dependency prefix="svg.batik-transcoder" artifact="org.apache.xmlgraphics:batik-transcoder:1.19" usage="ooxml-batik"/>
<dependency prefix="svg.batik-util" artifact="org.apache.xmlgraphics:batik-util:1.19" usage="ooxml-batik"/>
<dependency prefix="svg.batik-xml" artifact="org.apache.xmlgraphics:batik-xml:1.19" usage="ooxml-batik"/>
<dependency prefix="pdf.pdfbox" artifact="org.apache.pdfbox:pdfbox:3.0.5" usage="ooxml-provided"/>
<dependency prefix="pdf.pdfbox.io" artifact="org.apache.pdfbox:pdfbox-io:3.0.5" usage="ooxml-provided"/>
<dependency prefix="pdf.fontbox" artifact="org.apache.pdfbox:fontbox:3.0.5" usage="ooxml-provided"/>
<dependency prefix="pdf.graphics2d" artifact="de.rototor.pdfbox:graphics2d:3.0.3" usage="ooxml-provided"/>
<!-- jars in the ooxml-lib directory, see the fetch-ooxml-jars target-->
<dependency prefix="ooxml.curvesapi" artifact="com.github.virtuald:curvesapi:1.08" usage="ooxml"/>
<dependency prefix="ooxml.xmlbeans" artifact="org.apache.xmlbeans:xmlbeans:5.1.1" usage="ooxml"/>
<dependency prefix="ooxml.commons-compress" artifact="org.apache.commons:commons-compress:1.24.0" usage="ooxml"/>
<dependency prefix="ooxml.xmlbeans" artifact="org.apache.xmlbeans:xmlbeans:5.3.0" usage="ooxml"/>
<dependency prefix="ooxml.commons-compress" artifact="org.apache.commons:commons-compress:1.28.0" usage="ooxml"/>
<dependency prefix="ooxml.commons-lang3" artifact="org.apache.commons:commons-lang3:3.18.0" usage="ooxml"/>
<!-- jars in the ooxml-test-lib directory, see the fetch-ooxml-jars target-->
<dependency prefix="ooxml.test.reflections" artifact="org.reflections:reflections:0.10.2" usage="ooxml-tests"/>
<dependency prefix="ooxml.test.guava" artifact="com.google.guava:guava:32.1.1-jre" usage="ooxml-tests"/>
<dependency prefix="ooxml.test.guava" artifact="com.google.guava:guava:33.4.8-jre" usage="ooxml-tests"/>
<dependency prefix="ooxml.test.guava.failureaccess" artifact="com.google.guava:failureaccess:1.0.3" usage="ooxml-tests"/>
<dependency prefix="ooxml.test.javassist" artifact="org.javassist:javassist:3.27.0-GA" usage="ooxml-tests"/>
<dependency prefix="ooxml.test.slf4j-api" artifact="org.slf4j:slf4j-api:2.0.9" usage="ooxml-tests"/>
<dependency prefix="ooxml.test.slf4j-api" artifact="org.slf4j:slf4j-api:2.0.17" usage="ooxml-tests"/>
<dependency prefix="ooxml.test.opczip" artifact="com.github.rzymek:opczip:1.2.0" usage="ooxml-tests"/>
<!-- coverage libs -->
<dependency prefix="jacoco" artifact="org.jacoco:jacoco:0.8.10" usage="util" packaging="zip"/>
<dependency prefix="jacoco" artifact="org.jacoco:jacoco:0.8.13" usage="util" packaging="zip"/>
<dependency prefix="asm" artifact="org.ow2.asm:asm:9.5" usage="util"/>
<dependency prefix="asm-commons" artifact="org.ow2.asm:asm-commons:9.5" usage="util"/>
<dependency prefix="asm-tree" artifact="org.ow2.asm:asm-tree:9.5" usage="util"/>
<!-- license and api checks -->
<dependency prefix="rat" artifact="org.apache.rat:apache-rat:0.15" usage="util"/>
<dependency prefix="rat" artifact="org.apache.rat:apache-rat:0.16.1" usage="util"/>
<dependency prefix="forbidden" artifact="de.thetaphi:forbiddenapis:3.5.1" usage="util"/>
<!-- See https://www.ecma-international.org/publications/standards/Ecma-376.htm -->
@ -381,7 +384,7 @@ under the License.
<property name="rat.report" value="${rat.reportdir}/report.txt"/>
<!-- build and distro settings -->
<property name="jar.name" value="poi"/>
<property name="jar.name" value="apache-poi"/>
<property name="build.site" location="build/site"/>
<property name="javadocs.report.dir" location="${build.site}/apidocs/dev"/>
<property name="dist.dir" location="build/dist"/>
@ -395,27 +398,6 @@ under the License.
<!-- jars required for maven helper targets -->
<dependency prefix="maven.ant" artifact="org.apache.maven:maven-ant-tasks:2.1.3" usage="util"/>
<!-- subclipse.tigris.org is gone - left-over is hosted at https://bintray.com/openmeetings/maven/org.tigris.subclipse.svnant -->
<!-- request will be forwarded to d29vzk4ow07wi7.cloudfront.net which is an Atlassian Marketplace instance -->
<dependency prefix="dist.svnant" artifact="org.tigris.subclipse:svnant:1.3.1" usage="util"
repo="https://dl.bintray.com/openmeetings/maven"/>
<!-- hosted at https://bintray.com/subclipse/maven/svnclientadapter - https://github.com/subclipse/svnclientadapter -->
<dependency prefix="dist.svnclientadapter-base" artifact="org.tigris.svnclientadapter:adapter-base:1.12.0" usage="util"
repo="https://dl.bintray.com/subclipse/maven"/>
<dependency prefix="dist.svnclientadapter-svnkit" artifact="org.tigris.svnclientadapter:adapter-svnkit:1.12.0" usage="util"
repo="https://dl.bintray.com/subclipse/maven"/>
<dependency prefix="dist.svnclientadapter-javahl" artifact="org.tigris.svnclientadapter:adapter-javahl:1.12.0" usage="util"
repo="https://dl.bintray.com/subclipse/maven"/>
<dependency prefix="dist.svnkit" artifact="org.tmatesoft.svnkit:svnkit:1.10.1" usage="util"/>
<dependency prefix="dist.svnkit-javahl16" artifact="org.tmatesoft.svnkit:svnkit-javahl16:1.10.1" usage="util"/>
<dependency prefix="dist.sqljet" artifact="org.tmatesoft.sqljet:sqljet:1.1.13" usage="util"/>
<dependency prefix="dist.antlr" artifact="org.antlr:antlr-runtime:3.5.2" usage="util"/>
<dependency prefix="dist.sequence-library" artifact="de.regnis.q.sequence:sequence-library:1.0.4" usage="util"/>
<dependency prefix="dist.lz4-java" artifact="org.lz4:lz4-java:1.7.1" usage="util"/>
<propertyset id="junit.properties">
<propertyref name="POI.testdata.path"/>
<propertyref name="java.awt.headless"/>
@ -478,9 +460,11 @@ under the License.
<pathelement location="${ooxml.curvesapi.jar}"/>
<pathelement location="${ooxml.xmlbeans.jar}"/>
<pathelement location="${ooxml.commons-compress.jar}"/>
<pathelement location="${ooxml.commons-lang3.jar}"/>
<path refid="main.classpath"/>
<pathelement location="${main.output.dir}"/>
<pathelement location="${ooxml.test.guava.jar}"/>
<pathelement location="${ooxml.test.guava.failureaccess.jar}"/>
<pathelement location="${ooxml.test.opczip.jar}"/>
<!-- classes are omitted on test cases outside the xml-dsign area to avoid classpath poisoning -->
<!--path refid="ooxml.xmlsec.classpath"/-->
@ -514,6 +498,7 @@ under the License.
<path id="pdfbox.classpath">
<pathelement location="${pdf.pdfbox.jar}"/>
<pathelement location="${pdf.pdfbox.io.jar}"/>
<pathelement location="${pdf.fontbox.jar}"/>
<pathelement location="${pdf.graphics2d.jar}"/>
</path>
@ -533,6 +518,7 @@ under the License.
<path id="test.ooxml.reflections.classpath">
<pathelement location="${ooxml.test.reflections.jar}"/>
<pathelement location="${ooxml.test.guava.jar}"/>
<pathelement location="${ooxml.test.guava.failureaccess.jar}"/>
<pathelement location="${ooxml.test.javassist.jar}"/>
</path>
@ -684,11 +670,7 @@ under the License.
<fileset dir="${basedir}/lib/main-tests">
<include name="byte-buddy-*1.12*.jar"/>
<include name="mockito-core-3*.jar"/>
<include name="mockito-core-4.0*.jar"/>
<include name="mockito-core-4.2*.jar"/>
<include name="mockito-core-4.5*.jar"/>
<include name="mockito-core-4.6*.jar"/>
<include name="mockito-core-4.8*.jar"/>
<include name="mockito-core-4*.jar"/>
<include name="hamcrest-core*"/>
<include name="junit-4*.jar"/>
<include name="*slf4j*.jar"/>
@ -706,6 +688,7 @@ under the License.
<include name="xmlbeans-4*.jar"/>
<include name="xmlbeans-5.0*.jar"/>
<include name="xmlbeans-5.1.0.jar"/>
<include name="xmlbeans-5.2.2.jar"/>
</fileset>
<fileset dir="${basedir}/lib/ooxml-provided">
<include name="bc*-1.6*.jar"/>
@ -714,6 +697,7 @@ under the License.
<include name="batik*.jar"/>
<include name="slf4j*-1.*.jar"/>
<include name="xmlsec-2*.jar"/>
<include name="xmlgraphics-commons-*.jar"/>
</fileset>
<fileset dir="${basedir}/lib/ooxml-tests">
<include name="guava-20.0.jar"/>
@ -725,6 +709,8 @@ under the License.
<include name="org.jacoco.*-0.8.5.*.jar"/>
<include name="org.jacoco.*-0.8.6.*.jar"/>
<include name="org.jacoco.*-0.8.8.*.jar"/>
<include name="org.jacoco.*-0.8.10.*.jar"/>
<include name="org.jacoco.*-0.8.11.*.jar"/>
<include name="forbiddenapis-3.1.jar"/>
<include name="forbiddenapis-3.4.jar"/>
</fileset>
@ -732,6 +718,8 @@ under the License.
<include name="jacoco-0.8.5.zip"/>
<include name="jacoco-0.8.6.zip"/>
<include name="jacoco-0.8.8.zip"/>
<include name="jacoco-0.8.10.zip"/>
<include name="jacoco-0.8.11.zip"/>
</fileset>
<fileset dir="${basedir}/lib">
<include name="jacoco-*.zip"/>
@ -842,8 +830,10 @@ under the License.
<available file="${ooxml.curvesapi.jar}"/>
<available file="${ooxml.xmlbeans.jar}"/>
<available file="${ooxml.commons-compress.jar}"/>
<available file="${ooxml.commons-lang3.jar}"/>
<available file="${ooxml.test.reflections.jar}"/>
<available file="${ooxml.test.guava.jar}"/>
<available file="${ooxml.test.guava.failureaccess.jar}"/>
<available file="${ooxml.test.javassist.jar}"/>
<available file="${ooxml.test.slf4j-api.jar}"/>
<available file="${ooxml.test.opczip.jar}"/>
@ -870,6 +860,7 @@ under the License.
<available file="${svg.batik-xml.jar}"/>
<available file="${svg.xmlgraphics-commons.jar}"/>
<available file="${pdf.pdfbox.jar}"/>
<available file="${pdf.pdfbox.io.jar}"/>
<available file="${pdf.fontbox.jar}"/>
<available file="${pdf.graphics2d.jar}"/>
</and>
@ -883,8 +874,10 @@ under the License.
<downloadfile src="${ooxml.curvesapi.url}" dest="${ooxml.curvesapi.jar}"/>
<downloadfile src="${ooxml.xmlbeans.url}" dest="${ooxml.xmlbeans.jar}"/>
<downloadfile src="${ooxml.commons-compress.url}" dest="${ooxml.commons-compress.jar}"/>
<downloadfile src="${ooxml.commons-lang3.url}" dest="${ooxml.commons-lang3.jar}"/>
<downloadfile src="${ooxml.test.reflections.url}" dest="${ooxml.test.reflections.jar}"/>
<downloadfile src="${ooxml.test.guava.url}" dest="${ooxml.test.guava.jar}"/>
<downloadfile src="${ooxml.test.guava.failureaccess.url}" dest="${ooxml.test.guava.failureaccess.jar}"/>
<downloadfile src="${ooxml.test.javassist.url}" dest="${ooxml.test.javassist.jar}"/>
<downloadfile src="${ooxml.test.slf4j-api.url}" dest="${ooxml.test.slf4j-api.jar}"/>
<downloadfile src="${ooxml.test.opczip.url}" dest="${ooxml.test.opczip.jar}"/>
@ -911,42 +904,11 @@ under the License.
<downloadfile src="${svg.xml-apis-ext.url}" dest="${svg.xml-apis-ext.jar}"/>
<downloadfile src="${svg.xmlgraphics-commons.url}" dest="${svg.xmlgraphics-commons.jar}"/>
<downloadfile src="${pdf.pdfbox.url}" dest="${pdf.pdfbox.jar}"/>
<downloadfile src="${pdf.pdfbox.io.url}" dest="${pdf.pdfbox.io.jar}"/>
<downloadfile src="${pdf.fontbox.url}" dest="${pdf.fontbox.jar}"/>
<downloadfile src="${pdf.graphics2d.url}" dest="${pdf.graphics2d.jar}"/>
</target>
<target name="check-svn-jars">
<condition property="svn.jars.present">
<or>
<and>
<available file="${dist.svnant.jar}"/>
<available file="${dist.svnclientadapter-base.jar}"/>
<available file="${dist.svnclientadapter-svnkit.jar}"/>
<available file="${dist.svnclientadapter-javahl.jar}"/>
<available file="${dist.svnkit.jar}"/>
<available file="${dist.svnkit-javahl16.jar}"/>
<available file="${dist.sqljet.jar}"/>
<available file="${dist.antlr.jar}"/>
<available file="${dist.sequence-library.jar}"/>
<available file="${dist.lz4-java.jar}"/>
</and>
<isset property="disconnected"/>
</or>
</condition>
</target>
<target name="fetch-svn-jars" depends="check-svn-jars" unless="svn.jars.present">
<!-- some jars are gone since bintray.dl is shutting down, so we started to include them in the sources for now -->
<copy todir="lib/util">
<fileset dir="lib.stored/" includes="*.jar"/>
</copy>
<downloadfile src="${dist.svnkit.url}" dest="${dist.svnkit.jar}"/>
<downloadfile src="${dist.svnkit-javahl16.url}" dest="${dist.svnkit-javahl16.jar}"/>
<downloadfile src="${dist.sqljet.url}" dest="${dist.sqljet.jar}"/>
<downloadfile src="${dist.antlr.url}" dest="${dist.antlr.jar}"/>
<downloadfile src="${dist.sequence-library.url}" dest="${dist.sequence-library.jar}"/>
<downloadfile src="${dist.lz4-java.url}" dest="${dist.lz4-java.jar}"/>
</target>
<target name="check-compiled-ooxml-xsds">
<condition property="ooxml-compiled-xsds.present">
<and>
@ -976,7 +938,7 @@ under the License.
<zipfileset src="${ooxml.xsds.izip.1}"/>
<fileset dir="${ooxml.visio.xsd.dir}"/>
<fileset dir="${ooxml.schema.xsdconfig.dir}" includes="ooxmlSchemas.xsdconfig,markup-compatibility.xsd,vmlDrawing.xsd"/>
<fileset dir="${ooxml.schema.xsdconfig.dir}" includes="dml-drawing.xsd,word12.xsd,XAdES*.xsd,xlThreaded*.xsd,xmldsig*.xsd"/>
<fileset dir="${ooxml.schema.xsdconfig.dir}" includes="dml-drawing.xsd,word10.xsd,word12.xsd,XAdES*.xsd,xlThreaded*.xsd,xmldsig*.xsd"/>
<zipfileset src="${ooxml.xsds.izip.2}" includes="opc-digSig.xsd,opc-relationships.xsd"/>
<fileset dir="${ooxml.security.xsd.dir}" includes="signatureInfo.xsd"/>
</copy>
@ -1021,7 +983,7 @@ under the License.
</classpath>
</javac>
<javac release="9"
<javac release="11"
srcdir="${basedir}/poi-ooxml-full/src/main/java9"
destdir="${basedir}/poi-ooxml-full/src/main/java9"
includeantruntime="false"
@ -1121,7 +1083,7 @@ under the License.
<echo message="Building java9+ classes for @{module}"/>
<!-- compile jigsaw files to sources, so we don't forget to update/provide them for Java 8 builds -->
<javac release="9"
<javac release="11"
srcdir="${basedir}/@{module}/src/main/java9"
destdir="${basedir}/@{module}/src/main/java9"
includeantruntime="false"
@ -1160,7 +1122,7 @@ under the License.
</jar>
<!-- compile the tests -->
<javac release="8"
<javac release="11"
target="${jdk.version.class}"
source="${jdk.version.source}"
destdir="@{test-classes}"
@ -1182,7 +1144,7 @@ under the License.
<path location="@{test-classes}"/>
</pathconvert>
<javac release="9"
<javac release="11"
srcdir="${basedir}/@{module}/src/test/java9"
destdir="${basedir}/@{module}/src/test/java9"
includeantruntime="false"
@ -1310,7 +1272,7 @@ under the License.
<!-- create ooxml-lite-agent jar -->
<mkdir dir="${ooxml.lite.output.dir}"/>
<javac release="8"
<javac release="11"
srcdir="${basedir}/poi-ooxml-lite-agent/src/main/java"
destdir="${ooxml.lite.output.dir}"
includeantruntime="false"
@ -1321,7 +1283,7 @@ under the License.
</classpath>
</javac>
<javac release="9"
<javac release="11"
srcdir="${basedir}/poi-ooxml-lite-agent/src/main/java9"
destdir="${basedir}/poi-ooxml-lite-agent/src/main/java9"
includeantruntime="false"
@ -1529,7 +1491,7 @@ under the License.
</target>
<target name="compile-integration" depends="compile-scratchpad, compile-main, compile-ooxml, compile-examples">
<javac release="8"
<javac release="11"
target="${jdk.version.class}"
source="${jdk.version.source}"
destdir="${integration.output.test.dir}"
@ -1556,7 +1518,7 @@ under the License.
<mkdir dir="${integration.output.test.dir}/META-INF/versions/9"/>
<javac release="9"
<javac release="11"
srcdir="${basedir}/poi-integration/src/test/java9"
destdir="${integration.output.test.dir}/META-INF/versions/9"
includeantruntime="false"
@ -1606,7 +1568,6 @@ under the License.
<copy file="${main.version.template}" tofile="${main.version.java}" overwrite="true">
<filterset>
<filter token="VERSION" value="${version.id}"/>
<filter token="DSTAMP" value="${DSTAMP}"/>
</filterset>
</copy>
@ -1931,7 +1892,7 @@ under the License.
<echo output="${basedir}/poi-ooxml-lite/src/main/java9/module-info.java">${full.schema}${lite.exports}}</echo>
<javac release="9"
<javac release="11"
srcdir="${basedir}/poi-ooxml-lite/src/main/java9"
destdir="${basedir}/poi-ooxml-lite/src/main/java9"
includeantruntime="false"
@ -2081,6 +2042,13 @@ under the License.
unless="main.docs.notRequired" description="Builds the HTML pages of the POI website">
<echo message="Using Apache Forrest from ${env.FORREST_HOME}"/>
<echo message="Adjusting http -> https in forrset itself"/>
<replace dir="${env.FORREST_HOME}"
token="'http://'"
value="'https://'"
summary="true"
includes="**/*.xsl"/>
<exec executable="${env.FORREST_HOME}/bin/forrest" osfamily="unix"/>
<exec executable="cmd" osfamily="windows">
<arg value="/c"/>
@ -2129,6 +2097,7 @@ under the License.
<!-- Generates the latest/development API documentation. -->
<target name="javadocs"
depends="compile-ooxml"
description="Generates the API documentation">
<echo message="Generating latest Javadocs in ${javadocs.report.dir}"/>
<javadoc verbose="false" author="true" destdir="${javadocs.report.dir}"
@ -2277,7 +2246,7 @@ under the License.
<echo message="Building maven-jar for @{module}, module-name: ${module-name} with isJava8: ${isJava8} and src: @{src}"/>
<javac release="9"
<javac release="11"
srcdir="${basedir}/@{module}/src/main/java9"
destdir="@{src}/META-INF/versions/9"
includeantruntime="false"
@ -2452,7 +2421,7 @@ under the License.
<!-- continuous integration targets -->
<target name="jenkins"
depends="replaceVersion, compile, test-all, jar, javadocs, assemble, findbugs, release-notes, rat-check, forbidden-apis-check, help, fetch-svn-jars, maventask"
depends="replaceVersion, compile, test-all, jar, javadocs, assemble, findbugs, release-notes, rat-check, forbidden-apis-check, help, maventask"
description="Target run by Jenkins on a continuous basis. Builds and tests POI, generates artifacts and documentation, and searches for problems."/>
<target name="maventask" depends="init">
@ -2474,7 +2443,11 @@ under the License.
uri="antlib:org.apache.rat.anttasks"
classpath="${rat.jar}" />
<rat:report xmlns:rat="antlib:org.apache.rat.anttasks" reportFile="${rat.report}">
<fileset dir="poi-examples/src" excludes="main/java/org/apache/poi/**/*-chart-data.txt"/>
<fileset dir="poi-examples/src">
<exclude name="main/java/org/apache/poi/**/*-chart-data.txt" />
<exclude name="main/groovy/settings.gradle" />
<exclude name="main/groovy/.gradle/**" />
</fileset>
<fileset dir="poi-excelant/src"/>
<fileset dir="poi-integration/src"/>
<fileset dir="poi/src">
@ -2600,30 +2573,31 @@ under the License.
<!-- findbugs successor, spotbugs ... need to use the dependencies used in the spotbugs release. -->
<!-- compare with the entries found in the MANIFEST.MF of spotbugs.jar -->
<dependency prefix="spotbugs" artifact="com.github.spotbugs:spotbugs:4.7.3" usage="${spotbugs.lib}" target="spotbugs.jar"/>
<dependency prefix="spotbugs-ant" artifact="com.github.spotbugs:spotbugs-ant:4.7.3" usage="${spotbugs.lib}" target="spotbugs-ant.jar"/>
<dependency prefix="spotbugs-anno" artifact="com.github.spotbugs:spotbugs-annotations:4.7.3" usage="${spotbugs.lib}" target="spotbugs-annotations.jar"/>
<dependency prefix="spotbugs.asm" artifact="org.ow2.asm:asm:9.5" usage="${spotbugs.lib}"/>
<dependency prefix="spotbugs.asm-analysis" artifact="org.ow2.asm:asm-analysis:9.5" usage="${spotbugs.lib}"/>
<dependency prefix="spotbugs.asm-commons" artifact="org.ow2.asm:asm-commons:9.5" usage="${spotbugs.lib}"/>
<dependency prefix="spotbugs.asm-tree" artifact="org.ow2.asm:asm-tree:9.5" usage="${spotbugs.lib}"/>
<dependency prefix="spotbugs.asm-util" artifact="org.ow2.asm:asm-util:9.5" usage="${spotbugs.lib}"/>
<dependency prefix="spotbugs" artifact="com.github.spotbugs:spotbugs:4.9.8" usage="${spotbugs.lib}" target="spotbugs.jar"/>
<dependency prefix="spotbugs-ant" artifact="com.github.spotbugs:spotbugs-ant:4.9.8" usage="${spotbugs.lib}" target="spotbugs-ant.jar"/>
<dependency prefix="spotbugs-anno" artifact="com.github.spotbugs:spotbugs-annotations:4.9.8" usage="${spotbugs.lib}" target="spotbugs-annotations.jar"/>
<dependency prefix="spotbugs.asm" artifact="org.ow2.asm:asm:9.9" usage="${spotbugs.lib}"/>
<dependency prefix="spotbugs.asm-analysis" artifact="org.ow2.asm:asm-analysis:9.9" usage="${spotbugs.lib}"/>
<dependency prefix="spotbugs.asm-commons" artifact="org.ow2.asm:asm-commons:9.9" usage="${spotbugs.lib}"/>
<dependency prefix="spotbugs.asm-tree" artifact="org.ow2.asm:asm-tree:9.9" usage="${spotbugs.lib}"/>
<dependency prefix="spotbugs.asm-util" artifact="org.ow2.asm:asm-util:9.9" usage="${spotbugs.lib}"/>
<dependency prefix="spotbugs.jsr305" artifact="com.google.code.findbugs:jsr305:3.0.2" usage="${spotbugs.lib}"/>
<dependency prefix="spotbugs.dom4j" artifact="org.dom4j:dom4j:2.1.3" usage="${spotbugs.lib}"/>
<dependency prefix="spotbugs.jaxen" artifact="jaxen:jaxen:1.2.0" usage="${spotbugs.lib}"/>
<dependency prefix="spotbugs.bcel" artifact="org.apache.bcel:bcel:6.5.0" usage="${spotbugs.lib}"/>
<dependency prefix="spotbugs.slf4j-api" artifact="org.slf4j:slf4j-api:2.0.0" usage="${spotbugs.lib}"/>
<dependency prefix="spotbugs.commons-lang3" artifact="org.apache.commons:commons-lang3:3.12.0" usage="${spotbugs.lib}"/>
<dependency prefix="spotbugs.commons-text" artifact="org.apache.commons:commons-text:1.10.0" usage="${spotbugs.lib}"/>
<dependency prefix="spotbugs.commons-codec" artifact="commons-codec:commons-codec:1.11" usage="${spotbugs.lib}"/>
<dependency prefix="spotbugs.dom4j" artifact="org.dom4j:dom4j:2.2.0" usage="${spotbugs.lib}"/>
<dependency prefix="spotbugs.jaxen" artifact="jaxen:jaxen:2.0.0" usage="${spotbugs.lib}"/>
<dependency prefix="spotbugs.bcel" artifact="org.apache.bcel:bcel:6.11.0" usage="${spotbugs.lib}"/>
<dependency prefix="spotbugs.slf4j-api" artifact="org.slf4j:slf4j-api:2.0.17" usage="${spotbugs.lib}"/>
<dependency prefix="spotbugs.commons-lang" artifact="org.apache.commons:commons-lang3:3.19.0" usage="${spotbugs.lib}"/>
<dependency prefix="spotbugs.commons-text" artifact="org.apache.commons:commons-text:1.14.0" usage="${spotbugs.lib}"/>
<dependency prefix="spotbugs.commons-codec" artifact="commons-codec:commons-codec:1.15" usage="${spotbugs.lib}"/>
<dependency prefix="spotbugs.commons-io" artifact="commons-io:commons-io:2.20.0" usage="${spotbugs.lib}"/>
<dependency prefix="spotbugs.commons-logging" artifact="commons-logging:commons-logging:1.2" usage="${spotbugs.lib}"/>
<dependency prefix="spotbugs.jcip-annotations" artifact="net.jcip:jcip-annotations:1.0" usage="${spotbugs.lib}"/>
<dependency prefix="spotbugs.icu4j" artifact="com.ibm.icu:icu4j:68.2" usage="${spotbugs.lib}" target="icu4j-68.2.jar"/>
<dependency prefix="spotbugs.log4j-api" artifact="org.apache.logging.log4j:log4j-api:2.17.2" usage="${spotbugs.lib}"/>
<dependency prefix="spotbugs.log4j-core" artifact="org.apache.logging.log4j:log4j-core:2.17.2" usage="${spotbugs.lib}"/>
<dependency prefix="spotbugs.log4j-slf4j18-impl" artifact="org.apache.logging.log4j:log4j-slf4j18-impl:2.17.2" usage="${spotbugs.lib}"/>
<dependency prefix="spotbugs.saxon" artifact="net.sf.saxon:Saxon-HE:11.5" usage="${spotbugs.lib}"/>
<dependency prefix="spotbugs.xmlresolver" artifact="org.xmlresolver:xmlresolver:4.2.0" usage="${spotbugs.lib}"/>
<dependency prefix="spotbugs.log4j-api" artifact="org.apache.logging.log4j:log4j-api:2.25.2" usage="${spotbugs.lib}"/>
<dependency prefix="spotbugs.log4j-core" artifact="org.apache.logging.log4j:log4j-core:2.25.2" usage="${spotbugs.lib}"/>
<dependency prefix="spotbugs.log4j-slf4j18-impl" artifact="org.apache.logging.log4j:log4j-slf4j2-impl:2.25.2" usage="${spotbugs.lib}"/>
<dependency prefix="spotbugs.saxon" artifact="net.sf.saxon:Saxon-HE:12.9" usage="${spotbugs.lib}"/>
<dependency prefix="spotbugs.xmlresolver" artifact="org.xmlresolver:xmlresolver:5.2.2" usage="${spotbugs.lib}"/>
<mkdir dir="${basedir}${spotbugs.lib}/config"/>
@ -2634,9 +2608,10 @@ under the License.
<downloadfile src="${spotbugs.jaxen.url}" dest="${spotbugs.jaxen.jar}"/>
<downloadfile src="${spotbugs.bcel.url}" dest="${spotbugs.bcel.jar}"/>
<downloadfile src="${spotbugs.slf4j-api.url}" dest="${spotbugs.slf4j-api.jar}"/>
<downloadfile src="${spotbugs.commons-lang3.url}" dest="${spotbugs.commons-lang3.jar}"/>
<downloadfile src="${spotbugs.commons-lang.url}" dest="${spotbugs.commons-lang.jar}"/>
<downloadfile src="${spotbugs.commons-text.url}" dest="${spotbugs.commons-text.jar}"/>
<downloadfile src="${spotbugs.commons-codec.url}" dest="${spotbugs.commons-codec.jar}"/>
<downloadfile src="${spotbugs.commons-io.url}" dest="${spotbugs.commons-io.jar}"/>
<downloadfile src="${spotbugs.commons-logging.url}" dest="${spotbugs.commons-logging.jar}"/>
<downloadfile src="${spotbugs.jcip-annotations.url}" dest="${spotbugs.jcip-annotations.jar}"/>
<downloadfile src="${spotbugs.jsr305.url}" dest="${spotbugs.jsr305.jar}"/>
@ -2693,6 +2668,7 @@ under the License.
<auxClasspath path="${ooxml.curvesapi.jar}" />
<auxClasspath path="${ooxml.xmlbeans.jar}" />
<auxClasspath path="${ooxml.commons-compress.jar}" />
<auxClasspath path="${ooxml.commons-lang3.jar}" />
<auxClasspath path="${main.commons-collections4.jar}" />
<auxClasspath path="${main.commons-math3.jar}" />
<auxClasspath path="${main.commons-io.jar}" />
@ -2734,6 +2710,7 @@ under the License.
<auxClasspath path="${svg.xml-apis-ext.jar}"/>
<auxClasspath path="${svg.xmlgraphics-commons.jar}"/>
<auxClasspath path="${pdf.pdfbox.jar}"/>
<auxClasspath path="${pdf.pdfbox.io.jar}"/>
<auxClasspath path="${pdf.fontbox.jar}"/>
<auxClasspath path="${pdf.graphics2d.jar}"/>
<sourcePath path="poi/src/main/java" />
@ -2822,286 +2799,6 @@ under the License.
</openpgp:signer>
</target>
<target name="dist-nexus" depends="load-maven-server-settings,dist-checksum"
description="upload build artifacts to nexus">
<delete dir="build/repo"/>
<delete dir="build/nexus-stage"/>
<nexus-upload artifactId="poi"/>
<nexus-upload artifactId="poi-examples"/>
<nexus-upload artifactId="poi-excelant"/>
<nexus-upload artifactId="poi-ooxml"/>
<nexus-upload artifactId="poi-ooxml-lite"/>
<nexus-upload artifactId="poi-ooxml-full"/>
<nexus-upload artifactId="poi-scratchpad"/>
</target>
<macrodef name="nexus-upload">
<attribute name="artifactId"/>
<sequential>
<local name="repo"/>
<property name="repo" location="build/repo/@{artifactId}"/>
<copy todir="${repo}">
<mappedresources>
<!-- add sha-512 when nexus rules are updated (1/2) -->
<fileset dir="build/dist/maven" includes="@{artifactId}/**" excludes="**/*.sha512,**/*.sha256"/>
<regexpmapper from="^([^/]+)/(.*)$$" to="org/apache/poi/\1/${version.id}/\2" handledirsep="true"/>
</mappedresources>
</copy>
<local name="lastUpdated"/>
<tstamp>
<format property="lastUpdated" pattern="yyyyMMddHHmmss" timezone="UTC"/>
</tstamp>
<local name="metadir"/>
<property name="metadir" location="${repo}/org/apache/poi/@{artifactId}"/>
<echo file="${metadir}/maven-metadata.xml"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>org.apache.poi</groupId>
<artifactId>@{artifactId}</artifactId>
<versioning>
<latest>${version.id}</latest>
<release>${version.id}</release>
<versions>
<version>${version.id}</version>
</versions>
<lastUpdated>${lastUpdated}</lastUpdated>
</versioning>
</metadata>]]></echo>
<fixcrlf srcdir="${metadir}" includes="maven-metadata.xml" eol="unix" eof="remove" />
<!-- add sha-512 when nexus rules are updated (2/2) -->
<!--checksum algorithm="SHA-512" fileext=".sha512" format="MD5SUM">
<fileset dir="${metadir}" includes="maven-metadata.xml"/>
</checksum-->
<checksum algorithm="sha1" format="MD5SUM">
<fileset dir="${metadir}" includes="maven-metadata.xml"/>
</checksum>
<checksum algorithm="md5" format="MD5SUM">
<fileset dir="${metadir}" includes="maven-metadata.xml"/>
</checksum>
<fixcrlf srcDir="${metadir}" includes="*.md5,*.sha1,*.sha256,*.sha512" eol="unix"/>
<downloadfile src="${dist.nexus-staging.url}" dest="${dist.nexus-staging.jar}"/>
<taskdef uri="antlib:org.sonatype.nexus.ant.staging" resource="org/sonatype/nexus/ant/staging/antlib.xml">
<classpath><pathelement path="${dist.nexus-staging.jar}"/></classpath>
</taskdef>
<staging:stageLocally description="@{artifactId} ${version.id}">
<staging:nexusStagingInfo stagingDirectory="build/nexus-stage/@{artifactId}"/>
<fileset dir="${repo}" />
</staging:stageLocally>
<!-- if this throws a "... dh keypair ..." exception, use Java 7+ for executing the task -->
<staging:stageRemotely description="@{artifactId} ${version.id}">
<staging:nexusStagingInfo stagingDirectory="build/nexus-stage/@{artifactId}">
<staging:projectInfo groupId="org.apache.poi" artifactId="@{artifactId}" version="${version.id}" />
<staging:connectionInfo baseUrl="https://repository.apache.org/">
<staging:authentication username="${settings.apache-id.username}" password="${settings.apache-id.password}" />
</staging:connectionInfo>
</staging:nexusStagingInfo>
</staging:stageRemotely>
</sequential>
</macrodef>
<target name="-init-svn" depends="init,fetch-svn-jars,load-maven-server-settings">
<!-- JAVA_HOME needs to point to a JRE/JDK7+, otherwise the svn/https connection throws a "Could not generate DH keypair"-->
<fail message="Environment needs to point to Java 8+">
<condition>
<or>
<equals arg1="${ant.java.version}" arg2="1.7"/>
<equals arg1="${ant.java.version}" arg2="1.6"/>
<equals arg1="${ant.java.version}" arg2="1.5"/>
</or>
</condition>
</fail>
<path id="path.svnant">
<pathelement location="${dist.svnant.jar}"/>
<pathelement location="${dist.svnclientadapter-base.jar}"/>
<pathelement location="${dist.svnclientadapter-svnkit.jar}"/>
<pathelement location="${dist.svnclientadapter-javahl.jar}"/>
<pathelement location="${dist.svnkit.jar}"/>
<pathelement location="${dist.svnkit-javahl16.jar}"/>
<pathelement location="${dist.sqljet.jar}"/>
<pathelement location="${dist.antlr.jar}"/>
<pathelement location="${dist.sequence-library.jar}"/>
<pathelement location="${dist.lz4-java.jar}"/>
</path>
<taskdef resource="org/tigris/subversion/svnant/svnantlib.xml" classpathref="path.svnant"/>
<svnSetting
svnkit="true"
javahl="false"
username="${settings.apache-id.username}"
password="${settings.apache-id.password}"
id="svn.settings"
/>
</target>
<target name="release-prep0" depends="-init-svn" description="check to make sure the release tag doesn't exist yet">
<!-- verify that svn username/password are valid ... -->
<fail message="Unable to connect to SVN repo. Verify apache-id username and password. If these are correct, change the release-prep0 target to check over http, which would indicate a problem with your https setup.">
<condition>
<not><svnExists refid="svn.settings" target="https://svn.apache.org/repos/asf/poi/"/></not>
</condition>
</fail>
<!-- verify that the release tag that we're about to create in release-prep1 does not already exist (no overwriting tags!) -->
<fail message="Cannot create release tag. https://svn.apache.org/repos/asf/poi/tags/${RELEASE_TAG} already exists. Verify the requested release version (${version.id}).">
<condition>
<svnExists refid="svn.settings" target="https://svn.apache.org/repos/asf/poi/tags/${RELEASE_TAG}/"/>
</condition>
</fail>
</target>
<!-- experimental release preparation ... tbd. ... -->
<target name="release-prep1" depends="-init-svn,release-prep0" description="update the documentation and create the svn tag - needs Java7+">
<local name="tstamp_rel"/>
<local name="tstamp_next"/>
<local name="rel_next"/>
<tstamp>
<format property="tstamp_rel" pattern="yyyy-MM-dd" offset="7" unit="day"/>
<format property="tstamp_next" pattern="yyyy-MM" offset="3" unit="month"/>
</tstamp>
<taskdef name="NextRelease" classname="NextRelease" classpath="poi-excelant/build/poi-ant-contrib"/>
<NextRelease property="rel_next"/>
<antcall target="-update-build.xml">
<param name="version_id" value="${version.id}"/>
</antcall>
<replaceregexp byline="true">
<regexp pattern="&lt;release.*date=&quot;.*\?\?&quot;&gt;"/>
<substitution expression="&lt;!-- release version=&quot;${rel_next}&quot; date=&quot;${tstamp_next}-??&quot;&gt;&#10; &lt;/release --&gt;&#10;&#10; &lt;release version=&quot;${version.id}&quot; date=&quot;${tstamp_rel}&quot;&gt;"/>
<fileset dir="src/documentation/content/xdocs">
<include name="changes.xml"/>
</fileset>
</replaceregexp>
<fixcrlf srcdir="." includes="src/documentation/content/xdocs/changes.xml" eol="unix" eof="remove" />
<!-- can't combine updating and pinning of the documentation ... so we need two commits -->
<!-- (revision)properties can't be set and read within one svn block -->
<echo message="updating build.xml and changes.xml"/>
<exec command="svn ci --username ${settings.apache-id.username} --password ${settings.apache-id.password} -m 'release prepare for ${version.id} - updating build.xml and changes.xml' build.xml src/documentation/content/xdocs/changes.xml"/>
<svn refid="svn.settings">
<!--<commit message="release prepare for ${version.id} - updating build.xml and changes.xml" recurse="false">
<fileset dir="." includes="build.xml,src/documentation/content/xdocs/changes.xml"/>
</commit>-->
<update dir="." recurse="true"/>
<status path="." revisionProperty="svn_version1"/>
</svn>
<echo message="pin documentation - release ${svn_version1}"/>
<exec command="svn ci --username ${settings.apache-id.username} --password ${settings.apache-id.password} -m 'release prepare for ${version.id} - pin documentation' src"/>
<svn refid="svn.settings">
<propset path="src" name="svn:externals" value="documentation -r${svn_version1} https://svn.apache.org/repos/asf/poi/site/src/documentation"/>
<!-- <commit message="release prepare for ${version.id} - pin documentation" dir="src" recurse="false"/>-->
<update dir="." recurse="true"/>
<status path="." revisionProperty="svn_version2"/>
</svn>
<echo message="create release tag"/>
<svn refid="svn.settings">
<copy
srcUrl="https://svn.apache.org/repos/asf/poi/trunk"
destUrl="https://svn.apache.org/repos/asf/poi/tags/${RELEASE_TAG}"
message="tag r${svn_version2} as ${version.id}"/>
</svn>
<!-- update build.xml to the next snapshot version -->
<antcall target="-update-build.xml">
<param name="version_id" value="${rel_next}"/>
</antcall>
<!-- unpin documentation and commit next snapshot version -->
<svn refid="svn.settings">
<update dir="." recurse="true"/>
<propset path="src" name="svn:externals" value="documentation https://svn.apache.org/repos/asf/poi/site/src/documentation"/>
<!--<commit message="prepare for ${rel_next}" recurse="false">
<fileset dir="." includes="build.xml"/>
<dirset dir="src"/>
</commit>-->
</svn>
<exec command="svn ci --username ${settings.apache-id.username} --password ${settings.apache-id.password} -m 'prepare for ${rel_next}' build.xml src poi*"/>
<mkdir dir="build/release"/>
<svn refid="svn.settings">
<checkout url="https://svn.apache.org/repos/asf/poi/tags/${RELEASE_TAG}" destPath="build/release" ignoreExternals="false"/>
</svn>
</target>
<target name="release-prep2" depends="init" description="compile the freshly checked out svn tag and upload it to the nexus - needs a JDK6">
<!-- JAVA_HOME needs to point to a JDK8, otherwise the ant invocation is failing on a missing javac -->
<fail message="Environment needs to point to a Java 8 JDK">
<condition>
<not><equals arg1="${ant.java.version}" arg2="1.8"/></not>
</condition>
</fail>
<local name="DSTAMP"/>
<tstamp>
<format property="DSTAMP" pattern="yyyyMMdd" offset="7" unit="day"/>
</tstamp>
<ant dir="build/release" inheritAll="false" inheritRefs="false" useNativeBasedir="true">
<property name="DSTAMP" value="${DSTAMP}"/>
<target name="dist" />
</ant>
</target>
<target name="release-prep3" depends="-init-svn" description="write the dist to the release candidate repo - needs Java7+">
<ant dir="build/release" inheritAll="false" inheritRefs="false" useNativeBasedir="true">
<target name="dist-nexus" />
</ant>
<svn refid="svn.settings">
<import path="build/release/build/dist"
url="https://dist.apache.org/repos/dist/dev/poi"
newEntry="${version.id}-${release.rc}"
message="release candidate POI ${version.id}"/>
</svn>
</target>
<target name="release-finish" description="write the dist to the release candidate repo - needs Java7+">
<!--svn refid="svn.settings">
<update dir="." recurse="true"/>
</svn-->
<local name="rel_prev"/>
<local name="file_date"/>
<local name="file_date_iso"/>
<tstamp>
<!-- usually overwritten by a command line argument -->
<!-- for convenience this is kept in the same format as in the release-prep call -->
<format property="file_date" pattern="yyyyMMdd" locale="US"/>
</tstamp>
<taskdef name="NextRelease" classname="NextRelease" classpath="poi-excelant/build/poi-ant-contrib"/>
<NextRelease property="rel_prev" increment="-1"/>
<!-- we don't simply generate a new iso file date with tstamp,
but potentially use the date given as an argument to ant -->
<loadresource property="file_date_iso">
<string>${file_date}</string>
<filterchain>
<replaceregex pattern="([0-9]{4})([0-9]{2})([0-9]{2})" replace="\1-\2-\3"/>
</filterchain>
</loadresource>
<replaceregexp file="build.gradle" match="( +version += +)'[^']+'" replace="\1'${version.id}'"/>
<replaceregexp file="poi-examples/src/main/groovy/build.gradle" match="( *compile 'org.apache.poi:[^0-9]+)([0-9.]+)'" replace="\1${rel_prev}'" byline="true"/>
<replaceregexp file="poi-examples/src/main/scala/build.sbt" match='( *org.apache.poi.* ")[0-9.]+(.+)' replace="\1${rel_prev}\2" byline="true"/>
<replaceregexp file="osgi/pom.xml" match="version>${rel_prev}[^&lt;]+" replace="version>${version.id}"/>
<replaceregexp file="doap_POI.rdf" match="&lt;release&gt;" replace="&lt;release&gt;&#10; &lt;Version&gt;&#10; &lt;name&gt;Apache POI ${rel_prev}&lt;/name&gt;&#10; &lt;created&gt;${file_date_iso}&lt;/created&gt;&#10; &lt;revision&gt;${rel_prev}&lt;/revision&gt;&#10; &lt;/Version&gt;&#10; &lt;/release&gt;&#10; &lt;release&gt;"/>
</target>
<target name="-update-build.xml">
<replaceregexp byline="true">
<regexp pattern="(&lt;property name=&quot;version.id&quot; value=&quot;)[^&quot;]+(&quot;/>)"/>

View File

@ -35,6 +35,55 @@
<programming-language>Java</programming-language>
<category rdf:resource="https://projects.apache.org/category/content" />
<category rdf:resource="https://projects.apache.org/category/library" />
<release>
<Version>
<name>Apache POI 5.5.1</name>
<created>2025-11-30</created>
<revision>5.5.1</revision>
</Version>
</release>
<release>
<Version>
<name>Apache POI 5.5.0</name>
<created>2025-11-15</created>
<revision>5.5.0</revision>
</Version>
</release>
<release>
<Version>
<name>Apache POI 5.4.1</name>
<created>2025-04-06</created>
<revision>5.4.1</revision>
</Version>
</release>
<release>
<Version>
<name>Apache POI 5.4.0</name>
<created>2025-01-08</created>
<revision>5.4.0</revision>
</Version>
</release>
<release>
<Version>
<name>Apache POI 5.3.0</name>
<created>2024-07-02</created>
<revision>5.3.0</revision>
</Version>
</release>
<release>
<Version>
<name>Apache POI 5.2.5</name>
<created>2023-11-25</created>
<revision>5.2.5</revision>
</Version>
</release>
<release>
<Version>
<name>Apache POI 5.2.4</name>
<created>2023-09-28</created>
<revision>5.2.4</revision>
</Version>
</release>
<release>
<Version>
<name>Apache POI 5.2.3</name>
@ -218,10 +267,10 @@
</Version>
</release>
<repository>
<SVNRepository>
<location rdf:resource="https://svn.apache.org/repos/asf/poi/"/>
<browse rdf:resource="https://svn.apache.org/viewvc/poi/"/>
</SVNRepository>
<GitRepository>
<location rdf:resource="https://github.com/apache/poi.git"/>
<browse rdf:resource="https://github.com/apache/poi/"/>
</GitRepository>
</repository>
<maintainer>
<foaf:Person>

View File

@ -1,11 +1,11 @@
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Less than 2G definitely slows things down. -XX:+HeapDumpOnOutOfMemoryError
org.gradle.jvmargs=-Xmx2G -Dfile.encoding=UTF-8
# Less than 2G definitely slows things down. Increased to 3G due to OOM issues on ci-builds.apache.org.
# -XX:+HeapDumpOnOutOfMemoryError
org.gradle.jvmargs=-Xmx3G -Dfile.encoding=UTF-8
# Activating will be much faster, but break the build of 'poi-ooxml-lite'
# @todo: look into poi-ooxml-lite task generateModuleInfo and enforce running whatever is needed before
org.gradle.caching=false
org.gradle.caching=true
# Modularise your project and enable parallel build
org.gradle.parallel=true

Binary file not shown.

View File

@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME

37
gradlew vendored
View File

@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#
##############################################################################
#
@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
@ -84,7 +86,7 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
@ -112,20 +114,7 @@ case "$( uname )" in #(
NONSTOP* ) nonstop=true ;;
esac
# Loop in case we encounter an error.
for attempt in 1 2 3; do
if [ ! -e "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" ]; then
if ! curl -s -S --retry 3 -L -o "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" "https://raw.githubusercontent.com/gradle/gradle/v8.3/gradle/wrapper/gradle-wrapper.jar"; then
rm -f "$APP_HOME/gradle/wrapper/gradle-wrapper.jar"
# Pause for a bit before looping in case the server throttled us.
sleep 5
continue
fi
fi
done
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
CLASSPATH="\\\"\\\""
# Determine the Java command to use to start the JVM.
@ -158,7 +147,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
@ -166,7 +155,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
@ -215,16 +204,16 @@ fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
"$@"
# Stop when "xargs" is not available.

186
gradlew.bat vendored
View File

@ -1,92 +1,94 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell
if %ERRORLEVEL% equ 0 goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
:execute
@rem Setup the command line
set CLASSPATH=
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
:end
@rem End local scope for the variables with windows NT shell
if %ERRORLEVEL% equ 0 goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

View File

@ -1,3 +1,20 @@
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
// This script is used as input to the Jenkins Job DSL plugin to create all the build-jobs that
// Apache POI uses on the public Jenkins instance at https://ci-builds.apache.org/job/POI/
//
@ -14,42 +31,31 @@ def xercesUrl = 'https://repo1.maven.org/maven2/xerces/xercesImpl/2.6.1/xercesIm
def xercesLib = './xercesImpl-2.6.1.jar'
def poijobs = [
[ name: 'POI-DSL-1.8', trigger: 'H */12 * * *', jenkinsLite: true
[ name: 'POI-DSL-1.8',
jdk: '1.8',
trigger: 'H */12 * * *',
jenkinsLite: true,
disabled: true // JDK 8 is no longer supported by POI 6
],
[ name: 'POI-DSL-OpenJDK', jdk: 'OpenJDK 1.8', trigger: 'H */12 * * *',
// only a limited set of nodes still have OpenJDK 8 (on Ubuntu) installed
slaves: 'ubuntu',
skipcigame: true,
jenkinsLite: true
[ name: 'POI-DSL-1.8-branch-5.5.x',
jdk: '1.8',
branch: '5.5.x',
trigger: 'H */12 * * *',
jenkinsLite: true,
],
[ name: 'POI-DSL-1.11', jdk: '1.11', trigger: triggerSundays, skipcigame: true
],
[ name: 'POI-DSL-1.15', jdk: '1.15', trigger: triggerSundays, skipcigame: true,
// let's save some CPU cycles here, 15 is not an LTS and JDK 16 is GA
disabled: true
],
[ name: 'POI-DSL-1.16', jdk: '1.16', trigger: triggerSundays, skipcigame: true,
// let's save some CPU cycles here, 16 is not an LTS and JDK 17 is GA
disabled: true
],
[ name: 'POI-DSL-1.17', jdk: '1.17', trigger: 'H */12 * * *', skipcigame: true
],
// Jenkins on ci-builds.apache.org does not support spotbugs with a new enough version of asm for Java18+
[ name: 'POI-DSL-1.18', jdk: '1.18', trigger: triggerSundays, skipcigame: true, skipSpotbugs: true,
// let's save some CPU cycles here, 18 is not a LTS and JDK 20 is out
disabled: true
[ name: 'POI-DSL-1.21', jdk: '1.21', trigger: 'H */12 * * *', skipcigame: true
],
// Jenkins on ci-builds.apache.org does not support spotbugs with a new enough version of asm for Java18+
[ name: 'POI-DSL-1.19', jdk: '1.19', trigger: triggerSundays, skipcigame: true, skipSpotbugs: true
[ name: 'POI-DSL-1.24', jdk: '1.24', trigger: triggerSundays, skipcigame: true,
],
// Jenkins on ci-builds.apache.org does not support spotbugs with a new enough version of asm for Java18+
[ name: 'POI-DSL-1.20', jdk: '1.20', trigger: triggerSundays, skipcigame: true, skipSpotbugs: true
],
// Jenkins on ci-builds.apache.org does not support spotbugs with a new enough version of asm for Java18+
[ name: 'POI-DSL-1.21', jdk: '1.21', trigger: 'H */12 * * *', skipcigame: true, skipSpotbugs: true
],
// Jenkins on ci-builds.apache.org does not support spotbugs with a new enough version of asm for Java18+
[ name: 'POI-DSL-1.22', jdk: '1.22', trigger: triggerSundays, skipcigame: true, skipSpotbugs: true
[ name: 'POI-DSL-1.25', jdk: '1.25', trigger: triggerSundays, skipcigame: true, skipSpotbugs: true,
// use Ant for building until Gradle supports JDK 25
// see https://docs.gradle.org/current/userguide/compatibility.html
// and https://github.com/gradle/gradle/issues/31625
useAnt: true
],
// Use Ant-build for now as selecting IBM JDK via toolchain does not work (yet)
[ name: 'POI-DSL-IBM-JDK', jdk: 'IBMJDK', trigger: triggerSundays, skipcigame: true, useAnt: true
@ -60,17 +66,11 @@ def poijobs = [
// the property triggers using Xerces as XML Parser and previously showed some exception that can occur
properties: ["-Dadditionaljar=${xercesLib}"]
],
// [ name: 'POI-DSL-Maven', trigger: 'H */4 * * *', maven: true,
// // not needed any more now that we use Gradle for SonarQube
// disabled: true
// ],
[ name: 'POI-DSL-regenerate-javadoc', trigger: triggerSundays, javadoc: true
],
// it was impossible to make this run stable in Gradle, thus disabling this for now
[ name: 'POI-DSL-API-Check', trigger: '@daily', apicheck: true, disabled: true, useAnt: true
],
// [ name: 'POI-DSL-Gradle', trigger: triggerSundays, email: 'centic@apache.org'
// ],
[ name: 'POI-DSL-no-scratchpad', trigger: triggerSundays, noScratchpad: true
],
[ name: 'POI-DSL-saxon-test', trigger: triggerSundays, saxonTest: true
@ -80,33 +80,30 @@ def poijobs = [
// // replaced by Gradle-based build now
// disabled: true
// ],
[ name: 'POI-DSL-SonarQube-Gradle', jdk: '1.11', trigger: 'H 7 * * *', sonar: true, skipcigame: true
[ name: 'POI-DSL-SonarQube-Gradle', jdk: '1.17', trigger: 'H 7 * * *', sonar: true, skipcigame: true
],
[ name: 'POI-DSL-Windows-1.8', trigger: 'H */12 * * *', windows: true, slaves: 'Windows', jenkinsLite: true
[ name: 'POI-DSL-Windows-1.8',
trigger: 'H */12 * * *',
windows: true,
slaves: 'Windows',
jenkinsLite: true,
disabled: true // JDK 8 is no longer supported by POI 6
],
[ name: 'POI-DSL-Windows-1.11', jdk: '1.11', trigger: triggerSundays, windows: true, slaves: 'Windows',
jenkinsLite: true
],
[ name: 'POI-DSL-Windows-1.15', jdk: '1.15', trigger: triggerSundays, windows: true, slaves: 'Windows', skipcigame: true,
// let's save some CPU cycles here, 14 is not an LTS and JDK 15 is GA as of 15 September 2020
disabled: true
],
[ name: 'POI-DSL-Windows-1.16', jdk: '1.16', trigger: triggerSundays, windows: true, slaves: 'Windows', skipcigame: true,
// let's save some CPU cycles here, 16 is not an LTS and JDK 17 is GA
disabled: true
],
[ name: 'POI-DSL-Windows-1.17', jdk: '1.17', trigger: 'H */12 * * *', windows: true, slaves: 'Windows', skipcigame: true
],
[ name: 'POI-DSL-Windows-1.18', jdk: '1.18', trigger: triggerSundays, windows: true, slaves: 'Windows', skipcigame: true,
skipSpotbugs: true,
// let's save some CPU cycles here, 18 is not an LTS and JDK 20 is out
disabled: true
],
[ name: 'POI-DSL-Windows-1.20', jdk: '1.20', trigger: triggerSundays, windows: true, slaves: 'Windows', skipcigame: true
],
[ name: 'POI-DSL-Windows-1.21', jdk: '1.21', trigger: 'H */12 * * *', windows: true, slaves: 'Windows', skipcigame: true
],
[ name: 'POI-DSL-Windows-1.22', jdk: '1.22', trigger: triggerSundays, windows: true, slaves: 'Windows', skipcigame: true
[ name: 'POI-DSL-Windows-1.24', jdk: '1.24', trigger: triggerSundays, windows: true, slaves: 'Windows', skipcigame: true,
],
[ name: 'POI-DSL-Windows-1.25', jdk: '1.25', trigger: triggerSundays, windows: true, slaves: 'Windows', skipcigame: true,
skipSpotbugs: true,
// use Ant for building until Gradle supports JDK 24
// see https://docs.gradle.org/current/userguide/compatibility.html
// and https://github.com/gradle/gradle/issues/31625
useAnt: true
],
[ name: 'POI-DSL-Github-PullRequests', trigger: '', skipcigame: true, disabled: true
],
@ -117,37 +114,25 @@ def xmlbeansjobs = [
],
[ name: 'POI-XMLBeans-DSL-1.11', jdk: '1.11', trigger: triggerSundays, skipcigame: true,
],
[ name: 'POI-XMLBeans-DSL-1.16', jdk: '1.16', trigger: triggerSundays, skipcigame: true,
// let's save some CPU cycles here, 16 is not an LTS and JDK 17 is GA
disabled: true
],
[ name: 'POI-XMLBeans-DSL-1.17', jdk: '1.17', trigger: 'H */12 * * *', skipcigame: true,
],
[ name: 'POI-XMLBeans-DSL-1.18', jdk: '1.18', trigger: triggerSundays, skipcigame: true,
// let's save some CPU cycles here, 18 is not an LTS and JDK 20 is out
disabled: true
],
[ name: 'POI-XMLBeans-DSL-1.19', jdk: '1.19', trigger: triggerSundays, skipcigame: true,
// let's save some CPU cycles here, 19 is not an LTS
disabled: true
],
[ name: 'POI-XMLBeans-DSL-1.20', jdk: '1.20', trigger: triggerSundays, skipcigame: true,
],
[ name: 'POI-XMLBeans-DSL-1.21', jdk: '1.21', trigger: 'H */12 * * *', skipcigame: true,
],
[ name: 'POI-XMLBeans-DSL-1.22', jdk: '1.22', trigger: triggerSundays, skipcigame: true,
[ name: 'POI-XMLBeans-DSL-1.24', jdk: '1.24', trigger: triggerSundays, skipcigame: true,
disabled: true
],
[ name: 'POI-XMLBeans-DSL-1.20', jdk: '1.20', trigger: triggerSundays, skipcigame: true,
[ name: 'POI-XMLBeans-DSL-1.25', jdk: '1.25', trigger: triggerSundays, skipcigame: true,
],
[ name: 'POI-XMLBeans-DSL-Sonar', jdk: '1.11', trigger: triggerSundays, skipcigame: true,
[ name: 'POI-XMLBeans-DSL-Sonar', jdk: '1.17', trigger: triggerSundays, skipcigame: true,
sonar: true
]
]
def svnBase = 'https://svn.apache.org/repos/asf/poi/trunk'
def xmlbeansSvnBase = 'https://svn.apache.org/repos/asf/xmlbeans/trunk'
def gitBase = 'https://github.com/apache/poi.git'
def xmlbeansGitBase = 'https://github.com/apache/xmlbeans.git'
def defaultJdk = '1.8'
def defaultJdk = '1.11'
def defaultBranch = 'trunk'
def defaultTrigger = 'H/15 * * * *' // check SCM every 60/15 = 4 minutes
def defaultEmail = 'dev@poi.apache.org'
def defaultAnt = 'ant_1.10_latest'
@ -159,16 +144,12 @@ def defaultSlaves = '(ubuntu)&&!beam&&!cloud-slave&&!H29'
def jdkMapping = [
'1.8': [ jenkinsJdk: 'jdk_1.8_latest', jdkVersion: 8, jdkVendor: '' ],
'1.11': [ jenkinsJdk: 'jdk_11_latest', jdkVersion: 11, jdkVendor: '' ],
'1.15': [ jenkinsJdk: 'jdk_15_latest', jdkVersion: 15, jdkVendor: '' ],
'1.16': [ jenkinsJdk: 'jdk_16_latest', jdkVersion: 16, jdkVendor: '' ],
'1.17': [ jenkinsJdk: 'jdk_17_latest', jdkVersion: 17, jdkVendor: '' ],
'1.18': [ jenkinsJdk: 'jdk_18_latest', jdkVersion: 18, jdkVendor: '' ],
'1.19': [ jenkinsJdk: 'jdk_19_latest', jdkVersion: 19, jdkVendor: '' ],
'1.20': [ jenkinsJdk: 'jdk_20_latest', jdkVersion: 20, jdkVendor: '' ],
'1.21': [ jenkinsJdk: 'jdk_21_latest', jdkVersion: 21, jdkVendor: '' ],
'1.22': [ jenkinsJdk: 'jdk_22_latest', jdkVersion: 22, jdkVendor: '' ],
'OpenJDK 1.8': [ jenkinsJdk: 'adoptopenjdk_hotspot_8u282', jdkVersion: 8, jdkVendor: 'adoptopenjdk' ],
'IBMJDK': [ jenkinsJdk: 'ibmjdk_1.8.0_261', jdkVersion: 8, jdkVendor: 'ibm' ]
'1.24': [ jenkinsJdk: 'jdk_24_latest', jdkVersion: 24, jdkVendor: '' ],
'1.25': [ jenkinsJdk: 'jdk_25_latest', jdkVersion: 25, jdkVendor: '' ],
// one of the few IBM JDKs that is still supported on ci-builds.apache.org
'IBMJDK': [ jenkinsJdk: 'ibm_semeru_21.0.2_13', jdkVersion: 21, jdkVendor: 'ibm' ]
]
static def shellEx(def context, String cmd, def poijob) {
@ -186,7 +167,7 @@ Apache POI - the Java API for Microsoft Documents
</p>
<p>
<b>This is an automatically generated Job Config, do not edit it here!
Instead change the Jenkins Job DSL at <a href="https://svn.apache.org/repos/asf/poi/trunk/jenkins">https://svn.apache.org/repos/asf/poi/trunk/jenkins</a>,
Instead change the Jenkins Job DSL at <a href="https://github.com/apache/poi/blob/trunk/jenkins/">https://github.com/apache/poi/blob/trunk/jenkins/</a>,
see <a href="https://github.com/jenkinsci/job-dsl-plugin/wiki">https://github.com/jenkinsci/job-dsl-plugin/wiki</a>
for more details about the DSL.</b>
</p>'''
@ -216,10 +197,9 @@ def shellCmdsUnix =
rm -rf examples excelant integrationtest main ooxml ooxml-schema scratchpad build.javacheck.xml
# show which files are currently modified in the working copy
svn status || true
git status || true
# make sure no changed module-class-files or ooxml-lite-report-files are lingering on
svn revert poi*/src/*/java9/module-info.* || true
svn revert src/resources/ooxml-lite-report.* || true
git reset --hard || true
# print out information about which exact version of java we are using
echo Java-Home: $JAVA_HOME
@ -252,11 +232,9 @@ exit 0'''
def shellCmdsWin =
'''@echo off
:: show which files are currently modified in the working copy
svn status
git status
:: make sure no changed module-class-files are lingering on
svn revert poi*\\src\\*\\java9\\module-info.*
:: also revert some files directly as the wildcard-based revert seems to fail sometimes
svn revert poi\\src\\main\\java9\\module-info.class poi\\src\\test\\java9\\module-info.class poi-examples\\src\\main\\java9\\module-info.class poi-excelant\\src\\main\\java9\\module-info.class poi-excelant\\src\\test\\java9\\module-info.class poi-integration\\src\\test\\java9\\module-info.class poi-ooxml\\src\\main\\java9\\module-info.class poi-ooxml\\src\\test\\java9\\module-info.class poi-ooxml-full\\src\\main\\java9\\module-info.class poi-ooxml-lite\\src\\main\\java9\\module-info.class poi-ooxml-lite\\src\\main\\java9\\module-info.java poi-ooxml-lite-agent\\src\\main\\java9\\module-info.class poi-scratchpad\\src\\main\\java9\\module-info.class poi-scratchpad\\src\\test\\java9\\module-info.class src\\resources\\ooxml-lite-report.clazz src\\resources\\ooxml-lite-report.xsb
git reset --hard
:: print out information about which exact version of java we are using
echo Java-Home: %JAVA_HOME%
@ -274,6 +252,7 @@ poijobs.each { poijob ->
def email = poijob.email ?: defaultEmail
def slaves = poijob.slaves ?: defaultSlaves + (poijob.slaveAdd ?: '')
def antRT = poijob.windows ? defaultAntWindows : defaultAnt
def checkoutBranch = poijob.branch ?: defaultBranch
job('POI/' + poijob.name) {
if (poijob.disabled) {
@ -318,9 +297,11 @@ poijobs.each { poijob ->
}
jdk(jdkMapping.get(jdkKey).jenkinsJdk)
scm {
svn(svnBase) { svnNode ->
svnNode / browser(class: 'hudson.scm.browsers.ViewSVN') /
url << 'https://svn.apache.org/viewcvs.cgi/?root=Apache-SVN'
git {
remote {
url(gitBase)
}
branch("*/${checkoutBranch}")
}
}
checkoutRetryCount(3)
@ -358,7 +339,7 @@ poijobs.each { poijob ->
gradle {
switches('-PenableSonar')
switches('-Dsonar.login=${POI_SONAR_TOKEN}')
switches('-Dsonar.token=${POI_SONAR_TOKEN}')
switches('-Dsonar.organization=apache')
switches('-Dsonar.projectKey=poi-parent')
switches('-Dsonar.host.url=https://sonarcloud.io')
@ -369,7 +350,7 @@ poijobs.each { poijob ->
tasks('clean')
tasks('check')
tasks('jacocoTestReport')
tasks('sonarqube')
tasks('sonar')
useWrapper(true)
}
}
@ -458,7 +439,7 @@ poijobs.each { poijob ->
}
}
// in archive, junit and jacoco publishers, matches beneath build/*/build/... are for Gradle-build results
archiveArtifacts('build/dist/*.zip,build/dist/*.tgz,build/dist/maven/*/*.jar,build/coverage/**,*/build/reports/*.bom.*,build/hs_err*.log')
archiveArtifacts('build/dist/*.zip,build/dist/*.tgz,build/dist/maven/*/*.jar,build/dist/maven/*/*.pom,build/dist/maven/*/*.asc,build/dist/maven/*/*.sha256,build/dist/maven/*/*.sha512,build/coverage/**,*/build/reports/*.bom.*,build/hs_err*.log')
/* this plugin is currently missing on the Apache Jenkins instance
warnings(['Java Compiler (javac)', 'JavaDoc Tool'], null) {
resolveRelativePaths()
@ -509,8 +490,8 @@ xmlbeansjobs.each { xjob ->
label(slaves)
environmentVariables {
env('LANG', 'en_US.UTF-8')
if (jdkKey == '1.11' || jdkKey == '1.15' || jdkKey == '1.16' || jdkKey == '1.17'
|| jdkKey == '1.18' || jdkKey == '1.19' || jdkKey == '1.20' || jdkKey == '1.21') {
if (jdkKey == '1.11' || jdkKey == '1.17' || jdkKey == '1.21'
|| jdkKey == '1.23' || jdkKey == '1.24' || jdkKey == '1.25') {
env('ANT_OPTS', '--add-opens=java.xml/com.sun.org.apache.xerces.internal.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED')
}
// will be needed for forbidden-apis-check: env('ANT_HOME', xjob.windows ? 'f:\\jenkins\\tools\\ant\\latest' : '/usr/share/ant')
@ -533,9 +514,11 @@ xmlbeansjobs.each { xjob ->
}
jdk(jdkMapping.get(jdkKey).jenkinsJdk)
scm {
svn(xmlbeansSvnBase) { svnNode ->
svnNode / browser(class: 'hudson.scm.browsers.ViewSVN') /
url << 'https://svn.apache.org/viewcvs.cgi/?root=Apache-SVN'
git {
remote {
url(xmlbeansGitBase)
}
branch('*/trunk')
}
}
checkoutRetryCount(3)
@ -556,7 +539,7 @@ xmlbeansjobs.each { xjob ->
gradle {
if (xjob.sonar) {
switches('-PenableSonar')
switches('-Dsonar.login=${POI_SONAR_TOKEN}')
switches('-Dsonar.token=${POI_SONAR_TOKEN}')
switches('-Dsonar.organization=apache')
switches('-Dsonar.projectKey=apache_xmlbeans')
switches('-Dsonar.host.url=https://sonarcloud.io')
@ -569,7 +552,7 @@ xmlbeansjobs.each { xjob ->
tasks('jenkins')
tasks('jacocoTestReport')
if (xjob.sonar) {
tasks('sonarqube')
tasks('sonar')
}
useWrapper(true)
}
@ -628,26 +611,19 @@ Unfortunately we often see builds break because of changes/new machines...''')
}
axes {
jdk(
'jdk_1.8_latest',
'jdk_8_latest',
'jdk_11_latest',
/* don't look for JDKs that are out of support
'jdk_10_latest',
'jdk_12_latest',
'jdk_13_latest',
'jdk_14_latest',
'jdk_15_latest',
'jdk_16_latest',*/
'jdk_17_latest',
'jdk_18_latest',
'jdk_19_latest',
'jdk_20_latest',
'jdk_21_latest',
'jdk_22_latest',
'adoptopenjdk_hotspot_8u282',
'ibmjdk_1.8.0_261'
'jdk_23_latest',
'jdk_24_latest',
'jdk_25_latest',
'jdk_26_latest',
'ibm_semeru_21.0.2_13'
)
// Note H50 is reserved according to its node-description
label('Nodes','builds22','builds23','builds24','builds25','builds26','builds27','builds28','builds29','builds30','builds31','builds32','builds33','builds34','builds35','builds36','builds37','builds38','builds39','builds40','builds50','builds56','builds57','builds58','builds59','builds60')
label('Nodes','builds22','builds23','builds24','builds25','builds26','builds27','builds28','builds29','builds30','builds31','builds32','builds33','builds34','builds35','builds36','builds37','builds38','builds39','builds40','builds50','builds56','builds57','builds58','builds59','builds60',
'jenkins-win-azr-1','jenkins-win-azr-2','jenkins-win-azr-3','jenkins-win-azr-4','jenkins-win-azr-5','jenkins-win-azr-6','jenkins-win-azr-7','jenkins-win-azr-8','jenkins-win-azr-10','jenkins-win-azr-11','jenkins-win-azr-12')
}
steps {
conditionalSteps {
@ -657,7 +633,7 @@ Unfortunately we often see builds break because of changes/new machines...''')
runner('DontRun')
steps {
shell(
'''which svn || true
'''which git || true
which javac
javac -version
echo '<?xml version="1.0"?><project name="POI Build" default="test"><target name="test"><echo>Using Ant: ${ant.version} from ${ant.home}</echo></target></project>' > build.xml
@ -699,64 +675,3 @@ echo ^<?xml version=^"1.0^"?^>^<project name=^"POI Build^" default=^"test^"^>^<t
}
}
}
/* I tried to put the view into a sub-folder/sub-view, but failed, there are multiple related
plugins so this is all a bit confusing :(, see also https://issues.apache.org/jira/browse/INFRA-14002
dashboardView("P/POI-new") {
columns {
status()
weather()
configureProject()
buildButton()
cronTrigger()
lastBuildConsole()
name()
lastSuccess()
lastFailure()
lastDuration()
//lastSuccessDescription()
jacoco()
}
description("<table>\n" +
" <tr>\n" +
" <td><img src=\"https://poi.apache.org/images/project-header.png\" /></td>\n" +
" <td> \n" +
" <p>Apache POI - the Java API for Microsoft Documents</p>\n" +
" <p><b>Most of the POI Jobs are automatically generated by Jenkins Job DSL\n" +
" at <a href=\"https://svn.apache.org/repos/asf/poi/trunk/jenkins\">https://svn.apache.org/repos/asf/poi/trunk/jenkins</a>,<br/>\n" +
" see <a href=\"https://github.com/jenkinsci/job-dsl-plugin/wiki\">https://github.com/jenkinsci/job-dsl-plugin/wiki</a>\n" +
" for more details about the DSL.</b>\n" +
" </p>\n" +
" <p>\n" +
" <b><a href=\"job/POI-DSL-1.8/lastSuccessfulBuild/findbugsResult/\" target=\"_blank\">Findbugs report of latest build</a></b> -\n" +
" <b><a href=\"https://sonarcloud.io/dashboard?id=poi-parent\" target=\"_blank\">Sonar reports</a></b> -\n" +
" <b><a href=\"job/POI-DSL-1.8/lastSuccessfulBuild/artifact/build/coverage/index.html\" target=\"_blank\">Coverage of latest build</a></b>\n" +
" </p>\n" +
" </td>\n" +
" </tr>\n" +
"</table>")
filterBuildQueue(false)
filterExecutors(false)
// Job selection
jobs {*/
//regex(/.*POI.*/)
/*}
// Layout
topPortlets {
jenkinsJobsList {
displayName('POI jobs')
}
}
leftPortlets {
testStatisticsChart()
}
rightPortlets {
testTrendChart()
}
bottomPortlets {
testStatisticsGrid()
buildStatistics()
}
}*/

View File

@ -1,5 +1,5 @@
Apache POI
Copyright 2003-2023 The Apache Software Foundation
Copyright 2003-2026 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (https://www.apache.org/).

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -21,15 +21,15 @@ The bundle embeds all the jars from lib/main:
Required to render WMF/EMF images. The OSGi bundle is provided by ServiceMix and available in Maven Central: https://mvnrepository.com/artifact/org.apache.servicemix.bundles/org.apache.servicemix.bundles.batik/1.14_1
2. Saxon
Required if using as the XSLT and XQuery Processor engine in XML Beans.
Available in Maven Central (but version might be too old): https://mvnrepository.com/artifact/net.sf.saxon/saxon/8.9.0.4-osgi
Available in Maven Central: https://mvnrepository.com/artifact/net.sf.saxon/Saxon-HE/12.3
3. Apache XML Security for Java, Bouncy Castle and XML Commons Resolver
These are required to sign or validate signed Office documents. The OSGi bundles are available in Maven Central:
- Apache XML Security for Java: https://mvnrepository.com/artifact/org.apache.santuario/xmlsec/3.0.2 (use v3.0.2 with POI v5.2.3)
- Apache XML Security for Java: https://mvnrepository.com/artifact/org.apache.santuario/xmlsec/3.0.6
- XML Commons Resolver: https://mvnrepository.com/artifact/xml-resolver/xml-resolver/1.2-osgi
- Bouncy Castle: https://mvnrepository.com/artifact/org.bouncycastle/bcprov-ext-jdk18on/1.76, https://mvnrepository.com/artifact/org.bouncycastle/bcpkix-jdk18on/1.76
- Bouncy Castle: https://mvnrepository.com/artifact/org.bouncycastle/bcprov-ext-jdk18on/1.82, https://mvnrepository.com/artifact/org.bouncycastle/bcpkix-jdk18on/1.82
4. PDFBox and PDFBox Graphics2D
Required to render to PDF documents.
The required jars can be downloaded from:

View File

@ -24,13 +24,13 @@
<groupId>org.apache.poi</groupId>
<artifactId>poi-bundle</artifactId>
<packaging>bundle</packaging>
<version>5.2.4</version>
<version>6.0.0-SNAPSHOT</version>
<name>Apache POI OSGi bundle</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<poi.version>5.2.4</poi.version>
<pax.exam.version>4.12.0</pax.exam.version>
<poi.version>6.0.0-SNAPSHOT</poi.version>
<pax.exam.version>4.14.0</pax.exam.version>
</properties>
<build>
@ -39,8 +39,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>11</source>
<target>11</target>
</configuration>
</plugin>
<plugin>
@ -176,7 +176,7 @@
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
<version>4.13.1</version>
<version>4.13.2</version>
</dependency>
<!-- Pax Exam -->
@ -231,7 +231,7 @@
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.20.0</version>
<version>2.25.3</version>
<scope>test</scope>
</dependency>
</dependencies>

View File

@ -35,8 +35,6 @@ dependencies {
implementation project(path: ':poi-scratchpad', configuration: 'archives')
}
implementation "org.apache.logging.log4j:log4j-api:${log4jVersion}"
testImplementation(project(path: ':poi-ooxml', configuration: 'tests')) {
if (NO_SCRATCHPAD) {
exclude group: 'org.apache.poi', module: 'poi-scratchpad'
@ -49,27 +47,27 @@ final String MODULE_NAME = 'org.apache.poi.examples'
final Pattern MODULE_REGEX = ~'\\.jar$'
final List MODULE_COMPILE_PATH = sourceSets.main.compileClasspath.findAll{ it.path =~ MODULE_REGEX }.collect{ it.parent }.unique()
task compileJava9(type: JavaCompile) {
tasks.register('compileJava9', JavaCompile) {
dependsOn 'compileJava', ':poi-ooxml:jar', ':poi-scratchpad:jar'
javaCompiler = javaToolchains.compilerFor {
languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
}
sourceCompatibility = 1.9
targetCompatibility = 1.9
sourceCompatibility = 11
targetCompatibility = 11
destinationDirectory = file(JAVA9_OUT + VERSIONS9)
source = file(JAVA9_SRC)
classpath = files()
options.compilerArgs = [
'--patch-module', "${MODULE_NAME}=${sourceSets.main.output.classesDirs.asPath}",
'--module-path', files(MODULE_COMPILE_PATH).asPath
'--patch-module', "${MODULE_NAME}=${sourceSets.main.output.classesDirs.asPath}",
'--module-path', files(MODULE_COMPILE_PATH).asPath
]
}
jar {
dependsOn compileJava9
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}")
destinationDirectory = file("../build/dist/maven/${base.archivesName.get()}")
manifest {
attributes('Automatic-Module-Name': MODULE_NAME, 'Multi-Release': 'true')

View File

@ -36,7 +36,7 @@ WorkbookFactory.create(f,null,true).withCloseable { workbook ->
def sheet = workbook.getSheetAt(sheetNum)
sheet.each { row ->
def nonEmptyCells = row.grep { c -> c.getCellType() != Cell.CELL_TYPE_BLANK }
def nonEmptyCells = row.grep { c -> c.getCellType() != CellType.BLANK }
println " Row ${row.getRowNum()} has ${nonEmptyCells.size()} non-empty cells:"
nonEmptyCells.each { c ->
def cRef = [c] as CellReference
@ -52,7 +52,7 @@ WorkbookFactory.create(f,null,true).withCloseable { workbook ->
ns1.createRow(1).createCell(0).setCellValue("TODO - Populate with data")
Sheet ns2 = workbook.createSheet("Generated 2")
exportHeader(ns2, headerStyle, "This is a demo sheet",
exportHeader(ns2, headerStyle, "This is a demo sheet",
["ID","Title","Date","Author","Num"] as String[])
ns2.createRow(2).createCell(0).setCellValue(1)
ns2.createRow(3).createCell(0).setCellValue(4)

View File

@ -21,10 +21,11 @@ apply plugin: 'groovy'
repositories {
mavenCentral()
}
dependencies {
compile 'org.codehaus.groovy:groovy-all:2.4.21'
compile 'org.apache.poi:poi:5.2.2'
compile 'org.apache.poi:poi-ooxml:5.2.2'
implementation 'org.codehaus.groovy:groovy-all:2.4.21'
implementation 'org.apache.poi:poi:5.3.0'
implementation 'org.apache.poi:poi-ooxml:5.3.0'
}
// Our files are in the current directory
@ -33,11 +34,11 @@ sourceSets {
}
// Run out read demo by default
tasks.withType(JavaExec) {
classpath = sourceSets.main.runtimeClasspath
tasks.withType(JavaExec).configureEach {
classpath = sourceSets.main.runtimeClasspath
}
task runScript(type: JavaExec) {
tasks.register('runScript', JavaExec) {
mainClass = "SpreadSheetDemo"
args = ["../../../test-data/spreadsheet/Simple.xls"]
args = ["../../../../test-data/spreadsheet/Simple.xls"]
}
defaultTasks 'runScript'

View File

@ -0,0 +1 @@
// empty file required to have a standalone build

View File

@ -21,7 +21,7 @@ package org.apache.poi.examples.crypt;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.Path;
import java.security.GeneralSecurityException;
import java.util.Optional;
import java.util.function.Predicate;
@ -72,7 +72,7 @@ public final class OOXMLPasswordsTry {
};
// Try each password in turn, reporting progress
try (Stream<String> lines = Files.lines(Paths.get(words))) {
try (Stream<String> lines = Files.lines(Path.of(words))) {
Optional<String> found = lines.filter(counter).filter(w -> isValid(d, w)).findFirst();
System.out.println(found.map(s -> "Password found: " + s).orElse("Error - No password matched"));
}

View File

@ -253,6 +253,10 @@ public class XLS2CSVmra implements HSSFListener {
// Format
thisStr = formatListener.formatNumberDateCell(numrec);
if (thisStr.contains(",")) {
thisStr = '"' + thisStr + '"';
}
break;
case RKRecord.sid:
RKRecord rkrec = (RKRecord) record;

View File

@ -23,7 +23,6 @@ import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFCellStyle;
@ -32,6 +31,7 @@ import org.apache.poi.hssf.usermodel.HSSFRichTextString;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.logging.PoiLogManager;
/**
* This class contains code that demonstrates how to insert plain, numbered
@ -50,7 +50,7 @@ import org.apache.poi.hssf.usermodel.HSSFWorkbook;
*/
@SuppressWarnings({"java:S106","java:S4823"})
public class InCellLists {
private static final Logger LOG = LogManager.getLogger(InCellLists.class);
private static final Logger LOG = PoiLogManager.getLogger(InCellLists.class);
// This character looks like a solid, black, loser case letter 'o'

View File

@ -22,12 +22,12 @@ import java.io.FileOutputStream;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.logging.PoiLogManager;
/**
* Creates outlines.
@ -35,7 +35,7 @@ import org.apache.poi.hssf.usermodel.HSSFWorkbook;
public class Outlines implements Closeable {
public static void main(String[] args)
throws IOException, IllegalAccessException, InvocationTargetException, NoSuchMethodException {
Logger LOGGER = LogManager.getLogger(Outlines.class);
Logger LOGGER = PoiLogManager.getLogger(Outlines.class);
for (int i=1; i<=13; i++) {
try (Outlines o = new Outlines()) {
String log = (String) Outlines.class.getDeclaredMethod("test" + i).invoke(o);

View File

@ -59,7 +59,7 @@ public final class Word2Forrest
{
Paragraph p = r.getParagraph (x);
String text = p.text ();
if (text.trim ().length () == 0)
if (text.trim().isEmpty())
{
continue;
}

View File

@ -22,7 +22,7 @@ package org.apache.poi.examples.ss;
import java.io.IOException;
import java.io.OutputStream;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.Path;
import java.util.List;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
@ -95,7 +95,7 @@ public final class ConditionalFormats {
if (wb instanceof XSSFWorkbook) {
file += "x";
}
try (OutputStream out = Files.newOutputStream(Paths.get(file))) {
try (OutputStream out = Files.newOutputStream(Path.of(file))) {
wb.write(out);
}
System.out.println("Generated: " + file);
@ -203,7 +203,7 @@ public final class ConditionalFormats {
if (rn%10 == 0) {
str = str + "x10 ";
}
if (str.length() == 0) {
if (str.isEmpty()) {
str = "nothing special...";
}
r.createCell(1).setCellValue("It is " + str);

View File

@ -28,8 +28,8 @@ import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.util.ArrayList;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.poi.logging.PoiLogManager;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellType;
import org.apache.poi.ss.usermodel.DataFormatter;
@ -134,7 +134,7 @@ import org.apache.poi.ss.usermodel.WorkbookFactory;
*/
@SuppressWarnings({"java:S106","java:S4823","java:S1192"})
public class ToCSV {
private static final Logger LOG = LogManager.getLogger(ToCSV.class);
private static final Logger LOG = PoiLogManager.getLogger(ToCSV.class);
private Workbook workbook;
private ArrayList<ArrayList<String>> csvData;

View File

@ -23,7 +23,7 @@ import org.apache.poi.util.DefaultTempFileCreationStrategy;
import org.apache.poi.util.TempFile;
import java.io.File;
import java.nio.file.Paths;
import java.nio.file.Path;
public final class TempFileUtils {
private TempFileUtils() {
@ -31,7 +31,7 @@ public final class TempFileUtils {
@SuppressWarnings("java:S106")
public static void checkTempFiles() {
File tempDir = Paths.get(System.getProperty(TempFile.JAVA_IO_TMPDIR), DefaultTempFileCreationStrategy.POIFILES).toFile();
File tempDir = Path.of(System.getProperty(TempFile.JAVA_IO_TMPDIR), DefaultTempFileCreationStrategy.POIFILES).toFile();
if(tempDir.exists()) {
String[] tempFiles = tempDir.list();
if(tempFiles != null && tempFiles.length > 0) {

View File

@ -1,251 +1,251 @@
/*
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ====================================================================
*/
package org.apache.poi.xslf.usermodel;
import java.awt.Rectangle;
import java.awt.image.BufferedImage;
import java.io.ByteArrayOutputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URL;
import java.text.DecimalFormat;
import javax.imageio.ImageIO;
import javax.xml.namespace.QName;
import org.apache.poi.openxml4j.opc.PackagePart;
import org.apache.poi.openxml4j.opc.PackagePartName;
import org.apache.poi.openxml4j.opc.PackageRelationship;
import org.apache.poi.openxml4j.opc.PackagingURIHelper;
import org.apache.poi.openxml4j.opc.TargetMode;
import org.apache.poi.sl.usermodel.PictureData.PictureType;
import org.apache.xmlbeans.XmlCursor;
import org.openxmlformats.schemas.drawingml.x2006.main.CTHyperlink;
import org.openxmlformats.schemas.officeDocument.x2006.relationships.STRelationshipId;
import org.openxmlformats.schemas.presentationml.x2006.main.CTApplicationNonVisualDrawingProps;
import org.openxmlformats.schemas.presentationml.x2006.main.CTExtension;
import org.openxmlformats.schemas.presentationml.x2006.main.CTPicture;
import org.openxmlformats.schemas.presentationml.x2006.main.CTSlide;
import org.openxmlformats.schemas.presentationml.x2006.main.CTTLCommonMediaNodeData;
import org.openxmlformats.schemas.presentationml.x2006.main.CTTLCommonTimeNodeData;
import org.openxmlformats.schemas.presentationml.x2006.main.CTTimeNodeList;
import org.openxmlformats.schemas.presentationml.x2006.main.STTLTimeIndefinite;
import org.openxmlformats.schemas.presentationml.x2006.main.STTLTimeNodeFillType;
import org.openxmlformats.schemas.presentationml.x2006.main.STTLTimeNodeRestartType;
import org.openxmlformats.schemas.presentationml.x2006.main.STTLTimeNodeType;
import com.xuggle.mediatool.IMediaReader;
import com.xuggle.mediatool.MediaListenerAdapter;
import com.xuggle.mediatool.ToolFactory;
import com.xuggle.mediatool.event.IVideoPictureEvent;
import com.xuggle.xuggler.Global;
import com.xuggle.xuggler.IContainer;
import com.xuggle.xuggler.io.InputOutputStreamHandler;
/**
* Adding multiple videos to a slide
*
* need the Xuggler 5.4 jars:
* &lt;repositories&gt;
* &lt;repository&gt;
* &lt;id&gt;xuggle repo&lt;/id&gt;
* &lt;url&gt;http://xuggle.googlecode.com/svn/trunk/repo/share/java/&lt;/url&gt;
* &lt;/repository&gt;
* &lt;/repositories&gt;
* ...
* &lt;dependency&gt;
* &lt;groupId&gt;xuggle&lt;/groupId&gt;
* &lt;artifactId&gt;xuggle-xuggler&lt;/artifactId&gt;
* &lt;version&gt;5.4&lt;/version&gt;
* &lt;/dependency&gt;
*
* @see <a href="http://stackoverflow.com/questions/15197300/apache-poi-xslf-adding-movie-to-the-slide">Apache POI XSLF Adding movie to the slide</a>
* @see <a href="http://apache-poi.1045710.n5.nabble.com/Question-about-embedded-video-in-PPTX-files-tt5718461.html">Question about embedded video in PPTX files</a>
*/
public class AddVideoToPptx {
static DecimalFormat df_time = new DecimalFormat("0.####");
public static void main(String[] args) throws Exception {
URL video = new URL("http://archive.org/download/test-mpeg/test-mpeg.mpg");
// URL video = new URL("file:test-mpeg.mpg");
XMLSlideShow pptx = new XMLSlideShow();
// add video file
String videoFileName = video.getPath().substring(video.getPath().lastIndexOf('/')+1);
PackagePartName partName = PackagingURIHelper.createPartName("/ppt/media/"+videoFileName);
PackagePart part = pptx.getPackage().createPart(partName, "video/mpeg");
OutputStream partOs = part.getOutputStream();
InputStream fis = video.openStream();
byte buf[] = new byte[1024];
for (int readBytes; (readBytes = fis.read(buf)) != -1; partOs.write(buf, 0, readBytes));
fis.close();
partOs.close();
XSLFSlide slide1 = pptx.createSlide();
XSLFPictureShape pv1 = addPreview(pptx, slide1, part, 5, 50, 50);
addVideo(pptx, slide1, part, pv1, 5);
addTimingInfo(slide1, pv1);
XSLFPictureShape pv2 = addPreview(pptx, slide1, part, 9, 50, 250);
addVideo(pptx, slide1, part, pv2, 9);
addTimingInfo(slide1, pv2);
FileOutputStream fos = new FileOutputStream("pptx-with-video.pptx");
pptx.write(fos);
fos.close();
pptx.close();
}
static XSLFPictureShape addPreview(XMLSlideShow pptx, XSLFSlide slide1, PackagePart videoPart, double seconds, int x, int y) throws IOException {
// get preview after 5 sec.
IContainer ic = IContainer.make();
InputOutputStreamHandler iosh = new InputOutputStreamHandler(videoPart.getInputStream());
if (ic.open(iosh, IContainer.Type.READ, null) < 0) return null;
IMediaReader mediaReader = ToolFactory.makeReader(ic);
// stipulate that we want BufferedImages created in BGR 24bit color space
mediaReader.setBufferedImageTypeToGenerate(BufferedImage.TYPE_3BYTE_BGR);
ImageSnapListener isl = new ImageSnapListener(seconds);
mediaReader.addListener(isl);
// read out the contents of the media file and
// dispatch events to the attached listener
while (!isl.hasFired && mediaReader.readPacket() == null) ;
mediaReader.close();
ic.close();
// add snapshot
BufferedImage image1 = isl.image;
ByteArrayOutputStream bos = new ByteArrayOutputStream();
ImageIO.write(image1, "jpeg", bos);
XSLFPictureData snap = pptx.addPicture(bos.toByteArray(), PictureType.JPEG);
XSLFPictureShape pic1 = slide1.createPicture(snap);
pic1.setAnchor(new Rectangle(x, y, image1.getWidth(), image1.getHeight()));
return pic1;
}
static void addVideo(XMLSlideShow pptx, XSLFSlide slide1, PackagePart videoPart, XSLFPictureShape pic1, double seconds) throws IOException {
// add video shape
PackagePartName partName = videoPart.getPartName();
PackageRelationship prsEmbed1 = slide1.getPackagePart().addRelationship(partName, TargetMode.INTERNAL, "http://schemas.microsoft.com/office/2007/relationships/media");
PackageRelationship prsExec1 = slide1.getPackagePart().addRelationship(partName, TargetMode.INTERNAL, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/video");
CTPicture xpic1 = (CTPicture)pic1.getXmlObject();
CTHyperlink link1 = xpic1.getNvPicPr().getCNvPr().addNewHlinkClick();
link1.setId("");
link1.setAction("ppaction://media");
// add video relation
CTApplicationNonVisualDrawingProps nvPr = xpic1.getNvPicPr().getNvPr();
nvPr.addNewVideoFile().setLink(prsExec1.getId());
CTExtension ext = nvPr.addNewExtLst().addNewExt();
// see http://msdn.microsoft.com/en-us/library/dd950140(v=office.12).aspx
ext.setUri("{DAA4B4D4-6D71-4841-9C94-3DE7FCFB9230}");
String p14Ns = "http://schemas.microsoft.com/office/powerpoint/2010/main";
try (XmlCursor cur = ext.newCursor()) {
cur.toEndToken();
cur.beginElement(new QName(p14Ns, "media", "p14"));
cur.insertNamespace("p14", p14Ns);
cur.insertAttributeWithValue(new QName(STRelationshipId.type.getName().getNamespaceURI(), "embed"), prsEmbed1.getId());
cur.beginElement(new QName(p14Ns, "trim", "p14"));
cur.insertAttributeWithValue("st", df_time.format(seconds*1000.0));
}
}
static void addTimingInfo(XSLFSlide slide1, XSLFPictureShape pic1) {
// add slide timing information, so video can be controlled
CTSlide xslide = slide1.getXmlObject();
CTTimeNodeList ctnl;
if (!xslide.isSetTiming()) {
CTTLCommonTimeNodeData ctn = xslide.addNewTiming().addNewTnLst().addNewPar().addNewCTn();
ctn.setDur(STTLTimeIndefinite.INDEFINITE);
ctn.setRestart(STTLTimeNodeRestartType.NEVER);
ctn.setNodeType(STTLTimeNodeType.TM_ROOT);
ctnl = ctn.addNewChildTnLst();
} else {
ctnl = xslide.getTiming().getTnLst().getParArray(0).getCTn().getChildTnLst();
}
CTTLCommonMediaNodeData cmedia = ctnl.addNewVideo().addNewCMediaNode();
cmedia.setVol(80000);
CTTLCommonTimeNodeData ctn = cmedia.addNewCTn();
ctn.setFill(STTLTimeNodeFillType.HOLD);
ctn.setDisplay(false);
ctn.addNewStCondLst().addNewCond().setDelay(STTLTimeIndefinite.INDEFINITE);
cmedia.addNewTgtEl().addNewSpTgt().setSpid(""+pic1.getShapeId());
}
static class ImageSnapListener extends MediaListenerAdapter {
final double SECONDS_BETWEEN_FRAMES;
final long MICRO_SECONDS_BETWEEN_FRAMES;
boolean hasFired = false;
BufferedImage image = null;
// The video stream index, used to ensure we display frames from one and
// only one video stream from the media container.
int mVideoStreamIndex = -1;
// Time of last frame write
long mLastPtsWrite = Global.NO_PTS;
public ImageSnapListener(double seconds) {
SECONDS_BETWEEN_FRAMES = seconds;
MICRO_SECONDS_BETWEEN_FRAMES =
(long)(Global.DEFAULT_PTS_PER_SECOND * SECONDS_BETWEEN_FRAMES);
}
@Override
public void onVideoPicture(IVideoPictureEvent event) {
if (event.getStreamIndex() != mVideoStreamIndex) {
// if the selected video stream id is not yet set, go ahead an
// select this lucky video stream
if (mVideoStreamIndex != -1) return;
mVideoStreamIndex = event.getStreamIndex();
}
long evtTS = event.getTimeStamp();
// if uninitialized, back date mLastPtsWrite to get the very first frame
if (mLastPtsWrite == Global.NO_PTS)
mLastPtsWrite = Math.max(0, evtTS - MICRO_SECONDS_BETWEEN_FRAMES);
// if its time to write the next frame
if (evtTS - mLastPtsWrite >= MICRO_SECONDS_BETWEEN_FRAMES) {
if (!hasFired) {
image = event.getImage();
hasFired = true;
}
// update last write time
mLastPtsWrite += MICRO_SECONDS_BETWEEN_FRAMES;
}
}
}
}
/*
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ====================================================================
*/
package org.apache.poi.xslf.usermodel;
import java.awt.Rectangle;
import java.awt.image.BufferedImage;
import java.io.ByteArrayOutputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URL;
import java.text.DecimalFormat;
import javax.imageio.ImageIO;
import javax.xml.namespace.QName;
import org.apache.poi.openxml4j.opc.PackagePart;
import org.apache.poi.openxml4j.opc.PackagePartName;
import org.apache.poi.openxml4j.opc.PackageRelationship;
import org.apache.poi.openxml4j.opc.PackagingURIHelper;
import org.apache.poi.openxml4j.opc.TargetMode;
import org.apache.poi.sl.usermodel.PictureData.PictureType;
import org.apache.xmlbeans.XmlCursor;
import org.openxmlformats.schemas.drawingml.x2006.main.CTHyperlink;
import org.openxmlformats.schemas.officeDocument.x2006.relationships.STRelationshipId;
import org.openxmlformats.schemas.presentationml.x2006.main.CTApplicationNonVisualDrawingProps;
import org.openxmlformats.schemas.presentationml.x2006.main.CTExtension;
import org.openxmlformats.schemas.presentationml.x2006.main.CTPicture;
import org.openxmlformats.schemas.presentationml.x2006.main.CTSlide;
import org.openxmlformats.schemas.presentationml.x2006.main.CTTLCommonMediaNodeData;
import org.openxmlformats.schemas.presentationml.x2006.main.CTTLCommonTimeNodeData;
import org.openxmlformats.schemas.presentationml.x2006.main.CTTimeNodeList;
import org.openxmlformats.schemas.presentationml.x2006.main.STTLTimeIndefinite;
import org.openxmlformats.schemas.presentationml.x2006.main.STTLTimeNodeFillType;
import org.openxmlformats.schemas.presentationml.x2006.main.STTLTimeNodeRestartType;
import org.openxmlformats.schemas.presentationml.x2006.main.STTLTimeNodeType;
import com.xuggle.mediatool.IMediaReader;
import com.xuggle.mediatool.MediaListenerAdapter;
import com.xuggle.mediatool.ToolFactory;
import com.xuggle.mediatool.event.IVideoPictureEvent;
import com.xuggle.xuggler.Global;
import com.xuggle.xuggler.IContainer;
import com.xuggle.xuggler.io.InputOutputStreamHandler;
/**
* Adding multiple videos to a slide
*
* need the Xuggler 5.4 jars:
* &lt;repositories&gt;
* &lt;repository&gt;
* &lt;id&gt;xuggle repo&lt;/id&gt;
* &lt;url&gt;http://xuggle.googlecode.com/svn/trunk/repo/share/java/&lt;/url&gt;
* &lt;/repository&gt;
* &lt;/repositories&gt;
* ...
* &lt;dependency&gt;
* &lt;groupId&gt;xuggle&lt;/groupId&gt;
* &lt;artifactId&gt;xuggle-xuggler&lt;/artifactId&gt;
* &lt;version&gt;5.4&lt;/version&gt;
* &lt;/dependency&gt;
*
* @see <a href="http://stackoverflow.com/questions/15197300/apache-poi-xslf-adding-movie-to-the-slide">Apache POI XSLF Adding movie to the slide</a>
* @see <a href="http://apache-poi.1045710.n5.nabble.com/Question-about-embedded-video-in-PPTX-files-tt5718461.html">Question about embedded video in PPTX files</a>
*/
public class AddVideoToPptx {
static DecimalFormat df_time = new DecimalFormat("0.####");
public static void main(String[] args) throws Exception {
URL video = new URL("http://archive.org/download/test-mpeg/test-mpeg.mpg");
// URL video = new URL("file:test-mpeg.mpg");
XMLSlideShow pptx = new XMLSlideShow();
// add video file
String videoFileName = video.getPath().substring(video.getPath().lastIndexOf('/')+1);
PackagePartName partName = PackagingURIHelper.createPartName("/ppt/media/"+videoFileName);
PackagePart part = pptx.getPackage().createPart(partName, "video/mpeg");
OutputStream partOs = part.getOutputStream();
InputStream fis = video.openStream();
byte buf[] = new byte[1024];
for (int readBytes; (readBytes = fis.read(buf)) != -1; partOs.write(buf, 0, readBytes));
fis.close();
partOs.close();
XSLFSlide slide1 = pptx.createSlide();
XSLFPictureShape pv1 = addPreview(pptx, slide1, part, 5, 50, 50);
addVideo(pptx, slide1, part, pv1, 5);
addTimingInfo(slide1, pv1);
XSLFPictureShape pv2 = addPreview(pptx, slide1, part, 9, 50, 250);
addVideo(pptx, slide1, part, pv2, 9);
addTimingInfo(slide1, pv2);
FileOutputStream fos = new FileOutputStream("pptx-with-video.pptx");
pptx.write(fos);
fos.close();
pptx.close();
}
static XSLFPictureShape addPreview(XMLSlideShow pptx, XSLFSlide slide1, PackagePart videoPart, double seconds, int x, int y) throws IOException {
// get preview after 5 sec.
IContainer ic = IContainer.make();
InputOutputStreamHandler iosh = new InputOutputStreamHandler(videoPart.getInputStream());
if (ic.open(iosh, IContainer.Type.READ, null) < 0) return null;
IMediaReader mediaReader = ToolFactory.makeReader(ic);
// stipulate that we want BufferedImages created in BGR 24bit color space
mediaReader.setBufferedImageTypeToGenerate(BufferedImage.TYPE_3BYTE_BGR);
ImageSnapListener isl = new ImageSnapListener(seconds);
mediaReader.addListener(isl);
// read out the contents of the media file and
// dispatch events to the attached listener
while (!isl.hasFired && mediaReader.readPacket() == null) ;
mediaReader.close();
ic.close();
// add snapshot
BufferedImage image1 = isl.image;
ByteArrayOutputStream bos = new ByteArrayOutputStream();
ImageIO.write(image1, "jpeg", bos);
XSLFPictureData snap = pptx.addPicture(bos.toByteArray(), PictureType.JPEG);
XSLFPictureShape pic1 = slide1.createPicture(snap);
pic1.setAnchor(new Rectangle(x, y, image1.getWidth(), image1.getHeight()));
return pic1;
}
static void addVideo(XMLSlideShow pptx, XSLFSlide slide1, PackagePart videoPart, XSLFPictureShape pic1, double seconds) throws IOException {
// add video shape
PackagePartName partName = videoPart.getPartName();
PackageRelationship prsEmbed1 = slide1.getPackagePart().addRelationship(partName, TargetMode.INTERNAL, "http://schemas.microsoft.com/office/2007/relationships/media");
PackageRelationship prsExec1 = slide1.getPackagePart().addRelationship(partName, TargetMode.INTERNAL, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/video");
CTPicture xpic1 = (CTPicture)pic1.getXmlObject();
CTHyperlink link1 = xpic1.getNvPicPr().getCNvPr().addNewHlinkClick();
link1.setId("");
link1.setAction("ppaction://media");
// add video relation
CTApplicationNonVisualDrawingProps nvPr = xpic1.getNvPicPr().getNvPr();
nvPr.addNewVideoFile().setLink(prsExec1.getId());
CTExtension ext = nvPr.addNewExtLst().addNewExt();
// see http://msdn.microsoft.com/en-us/library/dd950140(v=office.12).aspx
ext.setUri("{DAA4B4D4-6D71-4841-9C94-3DE7FCFB9230}");
String p14Ns = "http://schemas.microsoft.com/office/powerpoint/2010/main";
try (XmlCursor cur = ext.newCursor()) {
cur.toEndToken();
cur.beginElement(new QName(p14Ns, "media", "p14"));
cur.insertNamespace("p14", p14Ns);
cur.insertAttributeWithValue(new QName(STRelationshipId.type.getName().getNamespaceURI(), "embed"), prsEmbed1.getId());
cur.beginElement(new QName(p14Ns, "trim", "p14"));
cur.insertAttributeWithValue("st", df_time.format(seconds*1000.0));
}
}
static void addTimingInfo(XSLFSlide slide1, XSLFPictureShape pic1) {
// add slide timing information, so video can be controlled
CTSlide xslide = slide1.getXmlObject();
CTTimeNodeList ctnl;
if (!xslide.isSetTiming()) {
CTTLCommonTimeNodeData ctn = xslide.addNewTiming().addNewTnLst().addNewPar().addNewCTn();
ctn.setDur(STTLTimeIndefinite.INDEFINITE);
ctn.setRestart(STTLTimeNodeRestartType.NEVER);
ctn.setNodeType(STTLTimeNodeType.TM_ROOT);
ctnl = ctn.addNewChildTnLst();
} else {
ctnl = xslide.getTiming().getTnLst().getParArray(0).getCTn().getChildTnLst();
}
CTTLCommonMediaNodeData cmedia = ctnl.addNewVideo().addNewCMediaNode();
cmedia.setVol(80000);
CTTLCommonTimeNodeData ctn = cmedia.addNewCTn();
ctn.setFill(STTLTimeNodeFillType.HOLD);
ctn.setDisplay(false);
ctn.addNewStCondLst().addNewCond().setDelay(STTLTimeIndefinite.INDEFINITE);
cmedia.addNewTgtEl().addNewSpTgt().setSpid(""+pic1.getShapeId());
}
static class ImageSnapListener extends MediaListenerAdapter {
final double SECONDS_BETWEEN_FRAMES;
final long MICRO_SECONDS_BETWEEN_FRAMES;
boolean hasFired = false;
BufferedImage image = null;
// The video stream index, used to ensure we display frames from one and
// only one video stream from the media container.
int mVideoStreamIndex = -1;
// Time of last frame write
long mLastPtsWrite = Global.NO_PTS;
public ImageSnapListener(double seconds) {
SECONDS_BETWEEN_FRAMES = seconds;
MICRO_SECONDS_BETWEEN_FRAMES =
(long)(Global.DEFAULT_PTS_PER_SECOND * SECONDS_BETWEEN_FRAMES);
}
@Override
public void onVideoPicture(IVideoPictureEvent event) {
if (event.getStreamIndex() != mVideoStreamIndex) {
// if the selected video stream id is not yet set, go ahead an
// select this lucky video stream
if (mVideoStreamIndex != -1) return;
mVideoStreamIndex = event.getStreamIndex();
}
long evtTS = event.getTimeStamp();
// if uninitialized, back date mLastPtsWrite to get the very first frame
if (mLastPtsWrite == Global.NO_PTS)
mLastPtsWrite = Math.max(0, evtTS - MICRO_SECONDS_BETWEEN_FRAMES);
// if its time to write the next frame
if (evtTS - mLastPtsWrite >= MICRO_SECONDS_BETWEEN_FRAMES) {
if (!hasFired) {
image = event.getImage();
hasFired = true;
}
// update last write time
mLastPtsWrite += MICRO_SECONDS_BETWEEN_FRAMES;
}
}
}
}

View File

@ -25,7 +25,7 @@ import java.io.FileOutputStream;
import java.io.OutputStream;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.List;
@ -64,7 +64,7 @@ public final class BarChartDemo {
}
try (FileInputStream argIS = new FileInputStream(args[0]);
BufferedReader modelReader = Files.newBufferedReader(Paths.get(args[1]), StandardCharsets.UTF_8)) {
BufferedReader modelReader = Files.newBufferedReader(Path.of(args[1]), StandardCharsets.UTF_8)) {
String chartTitle = modelReader.readLine(); // first line is chart title
String seriesText = modelReader.readLine();

View File

@ -26,7 +26,7 @@ import java.io.FileOutputStream;
import java.io.OutputStream;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.List;
@ -72,7 +72,7 @@ public final class ChartFromScratch {
return;
}
try (BufferedReader modelReader = Files.newBufferedReader(Paths.get(args[0]), StandardCharsets.UTF_8)) {
try (BufferedReader modelReader = Files.newBufferedReader(Path.of(args[0]), StandardCharsets.UTF_8)) {
String chartTitle = modelReader.readLine(); // first line is chart title
String seriesText = modelReader.readLine();
@ -180,6 +180,10 @@ public final class ChartFromScratch {
chart.setTitleText(chartTitle);
chart.setTitleOverlay(false);
chart.setAutoTitleDeleted(false);
// temporary workaround for https://bz.apache.org/bugzilla/show_bug.cgi?id=67510
if (bottomAxis.hasNumberFormat()) bottomAxis.setNumberFormat("@");
if (leftAxis.hasNumberFormat()) leftAxis.setNumberFormat("#,##0.00");
}
private static final int COLUMN_LANGUAGES = 0;

View File

@ -41,7 +41,7 @@ import java.io.FileOutputStream;
import java.io.OutputStream;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.List;
@ -64,7 +64,7 @@ public final class DoughnutChartFromScratch {
return;
}
try (BufferedReader modelReader = Files.newBufferedReader(Paths.get(args[0]), StandardCharsets.UTF_8)) {
try (BufferedReader modelReader = Files.newBufferedReader(Path.of(args[0]), StandardCharsets.UTF_8)) {
String chartTitle = modelReader.readLine(); // first line is chart title
String seriesText = modelReader.readLine();

View File

@ -25,7 +25,7 @@ import java.io.FileOutputStream;
import java.io.OutputStream;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.List;
@ -61,7 +61,7 @@ public final class PieChartDemo {
}
try (FileInputStream argIS = new FileInputStream(args[0]);
BufferedReader modelReader = Files.newBufferedReader(Paths.get(args[1]), StandardCharsets.UTF_8)) {
BufferedReader modelReader = Files.newBufferedReader(Path.of(args[1]), StandardCharsets.UTF_8)) {
String chartTitle = modelReader.readLine(); // first line is chart title
try (XMLSlideShow pptx = new XMLSlideShow(argIS)) {

View File

@ -1,12 +1,12 @@
10 languages with most speakers as first language
countries,speakers,language
58,315,العربية
4,243,বাংলা
38,1299,中文
118,378,English
4,260,हिन्दी
2,128,日本語
15,223,português
6,119,ਪੰਜਾਬੀ
18,154,Русский язык
31,442,español
10 languages with most speakers as first language
countries,speakers,language
58,315,العربية
4,243,বাংলা
38,1299,中文
118,378,English
4,260,हिन्दी
2,128,日本語
15,223,português
6,119,ਪੰਜਾਬੀ
18,154,Русский язык
31,442,español

View File

@ -1,4 +1,4 @@
My Chart
First 1.0
Second 3.0
My Chart
First 1.0
Second 3.0
Third 4.0

View File

@ -136,7 +136,7 @@ public class FromHowTo {
if(nextIsString && StringUtil.isNotBlank(lastContents)) {
Integer idx = Integer.valueOf(lastContents);
lastContents = lruCache.get(idx);
if (lastContents == null && !lruCache.containsKey(idx)) {
if (lastContents == null && !lruCache.containsKey(idx) && sst != null) {
lastContents = sst.getItemAt(idx).getString();
lruCache.put(idx, lastContents);
}

View File

@ -20,12 +20,12 @@
package org.apache.poi.examples.xssf.eventusermodel;
import java.io.InputStream;
import java.util.Iterator;
import org.apache.poi.examples.xssf.usermodel.LoadPasswordProtectedXlsx;
import org.apache.poi.openxml4j.opc.OPCPackage;
import org.apache.poi.poifs.crypt.temp.AesZipFileZipEntrySource;
import org.apache.poi.xssf.eventusermodel.XSSFReader;
import org.apache.poi.xssf.eventusermodel.XSSFReader.SheetIterator;
/**
* An example that loads a password protected workbook and counts the sheets.
@ -48,11 +48,12 @@ public final class LoadPasswordProtectedXlsxStreaming {
try (AesZipFileZipEntrySource source = AesZipFileZipEntrySource.createZipEntrySource(inputStream);
OPCPackage pkg = OPCPackage.open(source)) {
XSSFReader reader = new XSSFReader(pkg);
SheetIterator iter = (SheetIterator)reader.getSheetsData();
Iterator<InputStream> iter = reader.getSheetsData();
int count = 0;
while(iter.hasNext()) {
iter.next();
count++;
try (InputStream stream = iter.next()) {
count++;
}
}
System.out.println("sheet count: " + count);
}

View File

@ -212,7 +212,7 @@ public class XLSX2CSV {
styles, null, strings, sheetHandler, formatter, false);
sheetParser.setContentHandler(handler);
sheetParser.parse(sheetSource);
} catch(ParserConfigurationException e) {
} catch (ParserConfigurationException e) {
throw new RuntimeException("SAX parser appears to be broken - " + e.getMessage());
}
}
@ -234,7 +234,12 @@ public class XLSX2CSV {
String sheetName = iter.getSheetName();
this.output.println();
this.output.println(sheetName + " [index=" + index + "]:");
processSheet(styles, strings, new SheetToCSV(), stream);
try {
processSheet(styles, strings, new SheetToCSV(), stream);
} catch (NumberFormatException e) {
throw new IOException("Failed to parse sheet " + sheetName, e);
}
}
++index;
}

View File

@ -53,12 +53,13 @@ public class DeferredGeneration {
try (FileOutputStream fileOut = new FileOutputStream("DeferredGeneration.xlsx")) {
wb.write(fileOut);
//writeAvoidingTempFiles was added as an experimental change in POI 5.1.0
//wb.writeAvoidingTempFiles(fileOut);
} finally {
//the dispose call is necessary to ensure temp files are removed
wb.dispose();
// writeAvoidingTempFiles was added as an experimental change in POI 5.1.0
// wb.writeAvoidingTempFiles(fileOut);
}
// finally {
// the dispose call is no longer necessary to ensure temp files are removed
// wb.dispose();
// }
System.out.println("wrote DeferredGeneration.xlsx");
}
}

View File

@ -46,10 +46,11 @@ public class Outlining {
try (FileOutputStream fileOut = new FileOutputStream("outlining_collapsed.xlsx")) {
wb2.write(fileOut);
} finally {
//the dispose call is necessary to ensure temp files are removed
wb2.dispose();
}
// finally {
// the dispose call is no longer necessary to ensure temp files are removed
// wb2.dispose();
// }
}
}
}

View File

@ -58,8 +58,7 @@ public final class SavePasswordProtectedXlsx {
TempFileUtils.checkTempFiles();
String filename = args[0];
String password = args[1];
SXSSFWorkbookWithCustomZipEntrySource wb = new SXSSFWorkbookWithCustomZipEntrySource();
try {
try (SXSSFWorkbookWithCustomZipEntrySource wb = new SXSSFWorkbookWithCustomZipEntrySource()) {
for(int i = 0; i < 10; i++) {
SXSSFSheet sheet = wb.createSheet("Sheet" + i);
for(int r = 0; r < 1000; r++) {
@ -78,10 +77,6 @@ public final class SavePasswordProtectedXlsx {
} finally {
tempData.dispose();
}
} finally {
wb.close();
//the dispose call is necessary to ensure temp files are removed
wb.dispose();
}
TempFileUtils.checkTempFiles();
}

View File

@ -104,6 +104,10 @@ public final class BarChart {
solidFillSeries(data, 0, PresetColor.CHARTREUSE);
solidFillSeries(data, 1, PresetColor.TURQUOISE);
// temporary workaround for https://bz.apache.org/bugzilla/show_bug.cgi?id=67510
if (bottomAxis.hasNumberFormat()) bottomAxis.setNumberFormat("@");
if (leftAxis.hasNumberFormat()) leftAxis.setNumberFormat("#,##0.00");
// Write the output to a file
try (FileOutputStream fileOut = new FileOutputStream("ooxml-bar-chart.xlsx")) {
wb.write(fileOut);

View File

@ -35,8 +35,8 @@ import java.util.Random;
import org.apache.commons.compress.archivers.zip.ZipArchiveEntry;
import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream;
import org.apache.commons.compress.archivers.zip.ZipFile;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.poi.logging.PoiLogManager;
import org.apache.poi.openxml4j.opc.internal.ZipHelper;
import org.apache.poi.ss.usermodel.DateUtil;
import org.apache.poi.ss.usermodel.FillPatternType;
@ -77,7 +77,7 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook;
* See <a href="https://poi.apache.org/spreadsheet/how-to.html#sxssf">SXSSF (Streaming Usermodel API)</a>.
*/
public final class BigGridDemo {
private static final Logger LOG = LogManager.getLogger(BigGridDemo.class);
private static final Logger LOG = PoiLogManager.getLogger(BigGridDemo.class);
private static final Random rnd = new Random();

View File

@ -105,6 +105,10 @@ public final class LineChart {
solidLineSeries(data, 0, PresetColor.CHARTREUSE);
solidLineSeries(data, 1, PresetColor.TURQUOISE);
// temporary workaround for https://bz.apache.org/bugzilla/show_bug.cgi?id=67510
if (bottomAxis.hasNumberFormat()) bottomAxis.setNumberFormat("@");
if (leftAxis.hasNumberFormat()) leftAxis.setNumberFormat("#,##0.00");
// Write the output to a file
try (FileOutputStream fileOut = new FileOutputStream("ooxml-line-chart.xlsx")) {
wb.write(fileOut);

View File

@ -99,6 +99,10 @@ public final class ScatterChart {
solidLineSeries(data, 0, PresetColor.CHARTREUSE);
solidLineSeries(data, 1, PresetColor.TURQUOISE);
// temporary workaround for https://bz.apache.org/bugzilla/show_bug.cgi?id=67510
if (bottomAxis.hasNumberFormat()) bottomAxis.setNumberFormat("@");
if (leftAxis.hasNumberFormat()) leftAxis.setNumberFormat("#,##0.00");
// Write the output to a file
try (FileOutputStream fileOut = new FileOutputStream("ooxml-scatter-chart.xlsx")) {
wb.write(fileOut);

View File

@ -26,7 +26,7 @@ import java.io.FileOutputStream;
import java.io.OutputStream;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.List;
@ -63,7 +63,7 @@ public final class BarChartExample {
}
try (FileInputStream argIS = new FileInputStream(args[0]);
BufferedReader modelReader = Files.newBufferedReader(Paths.get(args[1]), StandardCharsets.UTF_8)) {
BufferedReader modelReader = Files.newBufferedReader(Path.of(args[1]), StandardCharsets.UTF_8)) {
String chartTitle = modelReader.readLine(); // first line is chart title
String seriesText = modelReader.readLine();

View File

@ -24,7 +24,7 @@ import java.io.FileOutputStream;
import java.io.OutputStream;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.List;
@ -67,7 +67,7 @@ public final class ChartFromScratch {
return;
}
try (BufferedReader modelReader = Files.newBufferedReader(Paths.get(args[0]), StandardCharsets.UTF_8)) {
try (BufferedReader modelReader = Files.newBufferedReader(Path.of(args[0]), StandardCharsets.UTF_8)) {
String chartTitle = modelReader.readLine(); // first line is chart title
String seriesText = modelReader.readLine();
@ -146,6 +146,10 @@ public final class ChartFromScratch {
chart.setTitleText(chartTitle);
chart.setTitleOverlay(false);
chart.setAutoTitleDeleted(false);
// temporary workaround for https://bz.apache.org/bugzilla/show_bug.cgi?id=67510
if (bottomAxis.hasNumberFormat()) bottomAxis.setNumberFormat("@");
if (leftAxis.hasNumberFormat()) leftAxis.setNumberFormat("#,##0.00");
}
private static final int COLUMN_LANGUAGES = 0;

View File

@ -22,10 +22,10 @@ import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import org.apache.poi.common.usermodel.PictureType;
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
import org.apache.poi.util.Units;
import org.apache.poi.xwpf.usermodel.BreakType;
import org.apache.poi.xwpf.usermodel.Document;
import org.apache.poi.xwpf.usermodel.XWPFDocument;
import org.apache.poi.xwpf.usermodel.XWPFParagraph;
import org.apache.poi.xwpf.usermodel.XWPFRun;
@ -45,30 +45,30 @@ public final class SimpleImages {
XWPFRun r = p.createRun();
for (String imgFile : args) {
int format;
PictureType format;
if (imgFile.endsWith(".emf")) {
format = Document.PICTURE_TYPE_EMF;
format = PictureType.EMF;
} else if (imgFile.endsWith(".wmf")) {
format = Document.PICTURE_TYPE_WMF;
format = PictureType.WMF;
} else if (imgFile.endsWith(".pict")) {
format = Document.PICTURE_TYPE_PICT;
format = PictureType.PICT;
} else if (imgFile.endsWith(".jpeg") || imgFile.endsWith(".jpg")) {
format = Document.PICTURE_TYPE_JPEG;
format = PictureType.JPEG;
} else if (imgFile.endsWith(".png")) {
format = Document.PICTURE_TYPE_PNG;
format = PictureType.PNG;
} else if (imgFile.endsWith(".dib")) {
format = Document.PICTURE_TYPE_DIB;
format = PictureType.DIB;
} else if (imgFile.endsWith(".gif")) {
format = Document.PICTURE_TYPE_GIF;
format = PictureType.GIF;
} else if (imgFile.endsWith(".tiff")) {
format = Document.PICTURE_TYPE_TIFF;
format = PictureType.TIFF;
} else if (imgFile.endsWith(".eps")) {
format = Document.PICTURE_TYPE_EPS;
format = PictureType.EPS;
} else if (imgFile.endsWith(".bmp")) {
format = Document.PICTURE_TYPE_BMP;
format = PictureType.BMP;
} else if (imgFile.endsWith(".wpg")) {
format = Document.PICTURE_TYPE_WPG;
format = PictureType.WPG;
} else {
System.err.println("Unsupported picture: " + imgFile +
". Expected emf|wmf|pict|jpeg|png|dib|gif|tiff|eps|bmp|wpg");

View File

@ -44,7 +44,7 @@ import org.apache.poi.xwpf.usermodel.XWPFDocument;
* SpreadsheetML workbook embedded into the document.<p>
*
* This code was successfully tested with the following file from the POI test collection:
* http://svn.apache.org/repos/asf/poi/trunk/test-data/document/EmbeddedDocument.docx
* test-data/document/EmbeddedDocument.docx
*/
@SuppressWarnings({"java:S106","java:S4823","java:S1192"})
public class UpdateEmbeddedDoc {

View File

@ -1,12 +1,12 @@
10 languages with most speakers as first language
countries,speakers,language
58,315,العربية
4,243,বাংলা
38,1299,中文
118,378,English
4,260,हिन्दी
2,128,日本語
15,223,português
6,119,ਪੰਜਾਬੀ
18,154,Русский язык
31,442,español
10 languages with most speakers as first language
countries,speakers,language
58,315,العربية
4,243,বাংলা
38,1299,中文
118,378,English
4,260,हिन्दी
2,128,日本語
15,223,português
6,119,ਪੰਜਾਬੀ
18,154,Русский язык
31,442,español

View File

@ -0,0 +1,115 @@
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
package org.apache.poi.examples.hssf.eventusermodel;
import static org.junit.jupiter.api.Assertions.assertEquals;
import java.io.ByteArrayOutputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.nio.charset.StandardCharsets;
import org.apache.poi.hssf.HSSFTestDataSamples;
import org.apache.poi.hssf.record.NumberRecord;
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
import org.junit.jupiter.api.Test;
class TestXLS2CSVmra {
@Test
void test() throws Exception {
XLS2CSVmra.main(new String[] { HSSFTestDataSamples.getSampleFile("SampleSS.xls").getAbsolutePath() });
}
@Test
void testWithMinCols() throws Exception {
XLS2CSVmra.main(new String[] { HSSFTestDataSamples.getSampleFile("SampleSS.xls").getAbsolutePath(), "100" });
}
@Test
void testProcess() throws IOException {
ByteArrayOutputStream outStream = new ByteArrayOutputStream();
PrintStream out = new PrintStream(outStream, false, StandardCharsets.UTF_8.name());
XLS2CSVmra cvs = new XLS2CSVmra(
new POIFSFileSystem(new FileInputStream(HSSFTestDataSamples.getSampleFile("SampleSS.xls").getAbsolutePath())),
out, -1);
cvs.process();
outStream.flush();
assertEquals(sanitize("\n"
+ "First Sheet [1]:\n"
+ "\"Test spreadsheet\"\n"
+ "\"2nd row\",\"2nd row 2nd column\"\n"
+ "\n"
+ "\"This one is red\"\n"
+ "\n"
+ "Sheet Number 2 [2]:\n"
+ "\"Start of 2nd sheet\"\n"
+ "\"Sheet 2 row 2\"\n"
+ "\n"
+ "\"I'm in bold blue, on a yellow background\"\n"
+ "\n"
+ "\"cb=1\",\"cb=10\",\"cb=2\",\"cb=sum\"\n"
+ "1,10,2,13\n"
+ "\n"
+ "Sheet3 [3]:\n"), sanitize(new String(outStream.toByteArray(), StandardCharsets.UTF_8)));
}
@Test
void testProcessNumberRecord() throws IOException {
ByteArrayOutputStream outStream = new ByteArrayOutputStream();
PrintStream out = new PrintStream(outStream, false, StandardCharsets.UTF_8.name());
XLS2CSVmra cvs = new XLS2CSVmra(
new POIFSFileSystem(new FileInputStream(HSSFTestDataSamples.getSampleFile("empty.xls").getAbsolutePath())),
out, -1);
// need to call process() first to initialize members
cvs.process();
outStream.flush();
assertEquals(sanitize("\n"
+ "Лист1 [1]:\n"
+ "\n"
+ "Лист2 [2]:\n"
+ "\n"
+ "Лист3 [3]:\n"), sanitize(new String(outStream.toByteArray(), StandardCharsets.UTF_8)));
NumberRecord record = new NumberRecord();
record.setValue(1.243);
cvs.processRecord(record);
outStream.flush();
assertEquals(sanitize("\n"
+ "Лист1 [1]:\n"
+ "\n"
+ "Лист2 [2]:\n"
+ "\n"
+ "Лист3 [3]:\n"
+ "1.243"), sanitize(new String(outStream.toByteArray(), StandardCharsets.UTF_8)));
}
private String sanitize(String str) {
return str.replace("\r\n", "\n");
}
}

View File

@ -18,9 +18,11 @@
package org.apache.poi.integration;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
import java.io.IOException;
import java.io.PrintStream;
import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;
@ -33,8 +35,11 @@ import org.apache.poi.openxml4j.opc.PackageAccess;
import org.apache.poi.xssf.XSSFTestDataSamples;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import net.bytebuddy.utility.RandomString;
public class TestXLSX2CSV {
private PrintStream err;
private final UnsynchronizedByteArrayOutputStream errorBytes = UnsynchronizedByteArrayOutputStream.builder().get();
@ -130,7 +135,87 @@ public class TestXLSX2CSV {
assertEquals("", errorOutput);
String output = outputBytes.toString(StandardCharsets.UTF_8);
assertTrue(output.contains("\"Lorem\",111,,,"), "Had: " + output);
assertTrue(output.contains(",\"hello, xssf\",,\"hello, xssf\","), "Had: " + output);
assertTrue(output.contains("\"Lorem\",111,,,"), "Had: " + output);
assertTrue(output.contains(",\"hello, xssf\",,\"hello, xssf\","), "Had: " + output);
}
@Disabled("Used for local micro-benchmarking")
@Test
public void microBenchmark() {
checkReplace("str");
checkReplace("str.123");
checkReplace("str.123,");
checkReplace("str,,,.123,,,,");
for (int i = 0; i < 1000;i++) {
checkReplace(RandomString.make(20));
}
for (int i = 0;i < 10;i++) {
long start = System.currentTimeMillis();
String str = RandomString.make(100) + "\"\"" + RandomString.make(100) + "\"\"" + RandomString.make(100);
String expected = str.replace("\"", "\"\"");
for (int j = 0;j < 300000;j++) {
//assertEquals(expected, replaceString(str, "\"", "\"\""));
assertEquals(expected, replaceDirect(str, "\"", "\"\""));
}
System.out.println(" , " + (System.currentTimeMillis() - start));
}
// Java 8: replaceString: 1001, 921, 1264, 1019, 1258, 990, 1089, 1430, 1153, 907
// Java 8: replaceDirect: 375, 282, 240, 246, 264, 271, 258, 250, 263, 259
// Java 11: replaceString: 510, 218, 202, 205, 202, 198, 202, 198, 208, 201
// Java 11: replaceDirect: 384, 228, 204, 201, 201, 200, 206, 196, 200, 200
//
// => On Java 8, a custom implementation would make sense, however on Java 9
// String.replace() was optimized so that it does not make any difference
// anymore!
}
private void checkReplace(String orig) {
assertEquals(replaceString(orig, ",", "."), replaceDirect(orig, ",", "."),
"Did have a difference with " + orig);
}
public static String replaceString(String originalStr, String oldStr, String newStr) {
return originalStr.replace(oldStr, newStr);
}
public static String replaceDirect(String originalStr, String oldStr, String newStr) {
int p = originalStr.indexOf(oldStr);
if (p == -1) {
return originalStr;
} else {
StringBuilder result = new StringBuilder();
result.append(originalStr, 0, p);
result.append(newStr);
int q = p + oldStr.length();
while ((p = originalStr.indexOf(oldStr, q)) != -1) {
result.append(originalStr, q, p);
result.append(newStr);
q = p + oldStr.length();
}
result.append(originalStr, q, originalStr.length());
return result.toString();
}
}
@Test
public void testDeepFile() {
// returns with some System.err
try {
assertThrows(IOException.class,
() -> XLSX2CSV.main(new String[] { XSSFTestDataSamples.getSampleFile("deep-data.xlsx").getAbsolutePath() }));
} catch (Throwable e) {
// restore output-streams again to get proper error output
System.setErr(err);
throw e;
}
String output = errorBytes.toString(StandardCharsets.UTF_8);
assertFalse(output.contains("Not found"), "Had: " + output);
System.out.println(output);
}
}

View File

@ -31,7 +31,7 @@ sourceSets {
}
dependencies {
api 'org.apache.ant:ant:1.10.14'
api 'org.apache.ant:ant:1.10.15'
api project(':poi-ooxml')
compileOnly project(path: ':poi-ooxml', configuration: 'archives')
@ -41,9 +41,9 @@ dependencies {
testImplementation(project(path: ':poi-ooxml', configuration: 'tests')) {
exclude group: 'org.apache.poi', module: 'poi-scratchpad'
}
testImplementation 'com.google.guava:guava:32.1.1-jre'
testImplementation 'com.google.guava:guava:33.5.0-jre'
testImplementation "org.apache.logging.log4j:log4j-slf4j2-impl:${log4jVersion}"
testImplementation 'org.slf4j:slf4j-simple:2.0.9'
testImplementation 'org.slf4j:slf4j-simple:2.0.17'
testRuntimeOnly "org.apiguardian:apiguardian-api:${apiGuardianVersion}"
}
@ -57,36 +57,36 @@ final String OOXML_LITE_AGENT = "../build/dist/maven/poi-ooxml-lite-agent/poi-oo
final String OOXML_LITE_REPORT = '../src/resources/ooxml-lite-report'
final String OOXML_LITE_INCLUDES = "^(com/microsoft/schemas|org/(etsi|openxmlformats|w3/)|org/apache/poi/schemas)"
task compileJava9(type: JavaCompile) {
tasks.register('compileJava9', JavaCompile) {
dependsOn 'compileJava', ':poi-ooxml:jar', ':poi-scratchpad:jar'
javaCompiler = javaToolchains.compilerFor {
languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
}
sourceCompatibility = 1.9
targetCompatibility = 1.9
sourceCompatibility = 11
targetCompatibility = 11
destinationDirectory = file(JAVA9_OUT + VERSIONS9)
source = file(JAVA9_SRC)
classpath = files()
options.compilerArgs = [
'--patch-module', "${MODULE_NAME}=${sourceSets.main.output.classesDirs.asPath}",
'--module-path', files(MAIN_MODULE_PATH).asPath
'--patch-module', "${MODULE_NAME}=${sourceSets.main.output.classesDirs.asPath}",
'--module-path', files(MAIN_MODULE_PATH).asPath
]
}
task compileTest9(type: JavaCompile) {
tasks.register('compileTest9', JavaCompile) {
dependsOn 'compileTestJava', ':poi-ooxml:jar', ':poi-scratchpad:jar'
javaCompiler = javaToolchains.compilerFor {
languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
}
sourceCompatibility = 1.9
targetCompatibility = 1.9
sourceCompatibility = 11
targetCompatibility = 11
destinationDirectory = file(TEST9_OUT + VERSIONS9)
source = file(TEST9_SRC)
options.compilerArgs = [
'--patch-module', "${MODULE_NAME}=${(sourceSets.main.output.classesDirs + sourceSets.test.output.classesDirs).asPath}",
'--module-path', files(TEST_MODULE_PATH).asPath
'--patch-module', "${MODULE_NAME}=${(sourceSets.main.output.classesDirs + sourceSets.test.output.classesDirs).asPath}",
'--module-path', files(TEST_MODULE_PATH).asPath
]
classpath = files()
}
@ -95,7 +95,7 @@ task compileTest9(type: JavaCompile) {
jar {
dependsOn compileJava9
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}")
destinationDirectory = file("../build/dist/maven/${base.archivesName.get()}")
manifest {
attributes('Automatic-Module-Name': MODULE_NAME, 'Multi-Release': 'true')
@ -119,11 +119,11 @@ sourcesJar {
// Create a separate jar for test-code to depend on it in other projects
// See http://stackoverflow.com/questions/5144325/gradle-test-dependency
task testJar(type: Jar, dependsOn: [ testClasses, compileTest9 ] ) {
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}-tests")
destinationDirectory = file("../build/dist/maven/${base.archivesName.get()}-tests")
setArchiveClassifier 'tests'
// ignore second module-info.class from main
duplicatesStrategy = 'exclude'
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from sourceSets.test.output + sourceSets.main.output
@ -142,13 +142,9 @@ test {
doFirst {
jvmArgs += [
"-javaagent:${OOXML_LITE_AGENT}=${OOXML_LITE_REPORT}|${OOXML_LITE_INCLUDES}",
'--add-modules', MODULE_NAME,
'--module-path', '../build/dist/maven/poi-excelant-tests' + File.pathSeparator + files(TEST_MODULE_PATH).asPath,
]
if (jdkVersion > 8) {
jvmArgs += [
'--add-modules', MODULE_NAME,
'--module-path', '../build/dist/maven/poi-excelant-tests' + File.pathSeparator + files(TEST_MODULE_PATH).asPath,
]
}
}
}

View File

@ -27,7 +27,7 @@ import java.util.Map;
*/
public final class ExcelAntWorkbookUtilFactory {
private static Map<String, ExcelAntWorkbookUtil> workbookUtilMap;
private static final Map<String, ExcelAntWorkbookUtil> workbookUtilMap = new HashMap<>();
private ExcelAntWorkbookUtilFactory() {
}
@ -41,16 +41,14 @@ public final class ExcelAntWorkbookUtilFactory {
* a freshly instantiated one if none did exist before.
*/
public static ExcelAntWorkbookUtil getInstance(String fileName) {
if(workbookUtilMap == null) {
workbookUtilMap = new HashMap<>();
}
synchronized (workbookUtilMap) {
if(workbookUtilMap.containsKey(fileName)) {
return workbookUtilMap.get(fileName);
}
if(workbookUtilMap.containsKey(fileName)) {
return workbookUtilMap.get(fileName);
ExcelAntWorkbookUtil wbu = new ExcelAntWorkbookUtil(fileName);
workbookUtilMap.put(fileName, wbu);
return wbu;
}
ExcelAntWorkbookUtil wbu = new ExcelAntWorkbookUtil(fileName);
workbookUtilMap.put(fileName, wbu);
return wbu;
}
}

View File

@ -18,6 +18,7 @@
module org.apache.poi.excelant {
requires ant;
requires transitive org.apache.poi.poi;
requires org.apache.poi.ooxml;
exports org.apache.poi.ss.excelant;

View File

@ -1,5 +1,3 @@
import java.util.regex.Pattern
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@ -17,8 +15,10 @@ import java.util.regex.Pattern
limitations under the License.
==================================================================== */
import java.util.regex.Pattern
final String TEST9_SRC = 'src/test/java9'
final String TEST9_OUT = "${buildDir}/classes/java9/test/"
final String TEST9_OUT = layout.buildDirectory.dir('classes/java9/test/').get().asFile.absolutePath
final String VERSIONS9 = 'META-INF/versions/9'
final boolean IBMVM = System.getProperty("java.vendor").contains("IBM")
@ -39,9 +39,9 @@ sourceSets {
}
dependencies {
testImplementation 'org.apache.ant:ant:1.10.14'
testImplementation 'org.apache.commons:commons-collections4:4.4'
testImplementation 'com.google.guava:guava:32.1.1-jre'
testImplementation 'org.apache.ant:ant:1.10.15'
testImplementation 'org.apache.commons:commons-collections4:4.5.0'
testImplementation 'com.google.guava:guava:33.5.0-jre'
misc(project(':poi-ooxml')) {
capabilities {
@ -76,7 +76,7 @@ dependencies {
}
testImplementation project(path: ':poi-ooxml-lite-agent', configuration: 'archives')
testImplementation "org.apache.logging.log4j:log4j-slf4j2-impl:${log4jVersion}"
testImplementation 'org.slf4j:slf4j-simple:2.0.9'
testImplementation 'org.slf4j:slf4j-simple:2.0.17'
testRuntimeOnly "org.apiguardian:apiguardian-api:${apiGuardianVersion}"
}
@ -90,26 +90,26 @@ final String OOXML_LITE_AGENT = "../build/dist/maven/poi-ooxml-lite-agent/poi-oo
final String OOXML_LITE_REPORT = '../src/resources/ooxml-lite-report'
final String OOXML_LITE_INCLUDES = "^(com/microsoft/schemas|org/(etsi|openxmlformats|w3/)|org/apache/poi/schemas)"
task compileTest9(type: JavaCompile) {
tasks.register('compileTest9', JavaCompile) {
dependsOn 'compileTestJava', ':poi-ooxml:testJar', ':poi-scratchpad:testJar', ':poi-examples:jar'
javaCompiler = javaToolchains.compilerFor {
languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
}
sourceCompatibility = 1.9
targetCompatibility = 1.9
sourceCompatibility = 11
targetCompatibility = 11
destinationDirectory = file(TEST9_OUT + VERSIONS9)
source = file(TEST9_SRC)
options.compilerArgs = [
'--patch-module', "${MODULE_NAME}=${(sourceSets.main.output.classesDirs + sourceSets.test.output.classesDirs).asPath}",
'--module-path', files(MODULE_COMPILE_PATH).asPath
'--patch-module', "${MODULE_NAME}=${(sourceSets.main.output.classesDirs + sourceSets.test.output.classesDirs).asPath}",
'--module-path', files(MODULE_COMPILE_PATH).asPath
]
classpath = files()
}
jar {
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}")
destinationDirectory = file("../build/dist/maven/${base.archivesName.get()}")
manifest {
attributes('Automatic-Module-Name': MODULE_NAME, 'Multi-Release': 'true')
@ -119,11 +119,11 @@ jar {
// Create a separate jar for test-code to depend on it in other projects
// See http://stackoverflow.com/questions/5144325/gradle-test-dependency
task testJar(type: Jar, dependsOn: [ testClasses, compileTest9 ] ) {
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}-tests")
destinationDirectory = file("../build/dist/maven/${base.archivesName.get()}-tests")
setArchiveClassifier 'tests'
// ignore second module-info.class from main
duplicatesStrategy = 'exclude'
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from sourceSets.test.output + sourceSets.main.output
@ -143,29 +143,26 @@ test {
dependsOn { testJar }
systemProperties['junit.jupiter.execution.parallel.enabled'] = 'true'
if (jdkVersion == 8) {
systemProperties['sun.java2d.renderer'] = 'sun.java2d.marlin.MarlinRenderingEngine'
}
doFirst {
jvmArgs += [
"-javaagent:${OOXML_LITE_AGENT}=${OOXML_LITE_REPORT}|${OOXML_LITE_INCLUDES}",
'--add-modules', MODULE_NAME,
'--module-path', '../build/dist/maven/poi-integration-tests' + File.pathSeparator + files(MODULE_RUNTIME_PATH).asPath,
]
if (jdkVersion > 8) {
jvmArgs += [
'--add-modules', MODULE_NAME,
'--module-path', '../build/dist/maven/poi-integration-tests' + File.pathSeparator + files(MODULE_RUNTIME_PATH).asPath,
]
}
if (NO_SCRATCHPAD) {
systemProperty 'scratchpad.ignore', 'true'
}
}
}
javadoc { enabled(false) }
javadoc {
enabled = false
}
sourcesJar { enabled(false) }
sourcesJar {
enabled = false
}
generateMetadataFileForPOIPublication.enabled = false
publishPOIPublicationToMavenLocal.enabled = false

View File

@ -27,11 +27,14 @@ Before running this, you should execute the "jar" target in the main build.gradl
<property name="dist" value="../build/dist"/>
<property name="build" value="../build/distsourcebuild"/>
<condition property="gradle.executable" value="../gradlew.bat" else="../gradlew">
<!-- Gradle is executed in ../build/poi-<version>, so three ".." are needed to use gradle from the root-dir -->
<condition property="gradle.executable" value="../../../gradlew.bat" else="../../../gradlew">
<os family="windows" />
</condition>
<target name="init" depends="">
<echo message="Using Ant: ${ant.version} from ${ant.home}, Ant detected Java ${ant.java.version} (may be different than actual Java sometimes...)" />
<echo message="Using Java: ${java.version}/${java.runtime.version}/${java.vm.version}/${java.vm.name} from ${java.vm.vendor} on ${os.name}: ${os.version}" />
</target>
<target name="run" depends="init,runSourceBuild,runCompileTest"/>
@ -48,14 +51,14 @@ Before running this, you should execute the "jar" target in the main build.gradl
<date xmlns="antlib:org.apache.tools.ant.types.resources.comparators"/>
<resources>
<fileset dir="${dist}">
<include name="poi-src-*.zip"/>
<include name="apache-poi-src-*.zip"/>
</fileset>
</resources>
</sort>
</last>
</pathconvert>
<echo message="Found source package at ${srcpackage}"/>
<echo message="Found source package with pattern 'apache-poi-src-*.zip' in ${dist} at '${srcpackage}'. Run Gradle-task 'srcDistZip' in the main directory if it is missing"/>
<unzip src="${srcpackage}" dest="${build}" failOnEmptyArchive="true"/>
<!-- look for name of sub-dir, do this dynamically as it changes with every (beta|rc)-release -->
@ -74,7 +77,7 @@ Before running this, you should execute the "jar" target in the main build.gradl
<!-- finally call Ant on the extracted source to check if we can build the packages -->
<echo message="Building in temporary dir ${dirversion}/"/>
<!--ant dir="${dirversion}" target="assemble" inheritAll="false" inheritRefs="false" useNativeBasedir="true"/-->
<exec executable="${gradle.executable}" dir="." failonerror="true">
<exec executable="${gradle.executable}" dir="${dirversion}" failonerror="true">
<arg value="assemble" />
</exec>
</target>
@ -91,9 +94,9 @@ Before running this, you should execute the "jar" target in the main build.gradl
<sort>
<resources>
<fileset dir="${dist}">
<include name="**/poi-5.*.jar"/>
<include name="**/poi-ooxml-5.*.jar"/>
<include name="**/poi-ooxml-lite-5.*.jar"/>
<include name="**/poi-6.*.jar"/>
<include name="**/poi-ooxml-6.*.jar"/>
<include name="**/poi-ooxml-lite-6.*.jar"/>
<exclude name="**/*-javadoc*"/>
<exclude name="**/*-sources*"/>
</fileset>
@ -123,7 +126,7 @@ Before running this, you should execute the "jar" target in the main build.gradl
<echo message="Compiling examples without linking to scratchpad.jar to ensure that only some specific ones require this jar"/>
<javac srcdir="../poi-examples/src/main/java" destdir="${build}"
target="1.8" source="1.8" debug="true"
target="11" source="11" debug="true"
encoding="ASCII" fork="yes" includeantruntime="false"
excludes="org/apache/poi/examples/hslf/**,org/apache/poi/examples/hsmf/**,org/apache/poi/examples/hwmf/**,**/EmbeddedObjects.java,**/EmeddedObjects.java,**/LoadEmbedded.java,**/Word2Forrest.java"
classpath="${jarpackage}" classpathref="libs">
@ -134,10 +137,10 @@ Before running this, you should execute the "jar" target in the main build.gradl
<sort>
<resources>
<fileset dir="${dist}">
<include name="**/poi-5.*.jar"/>
<include name="**/poi-ooxml-5.*.jar"/>
<include name="**/poi-ooxml-lite-5.*.jar"/>
<include name="**/poi-scratchpad-5.*.jar"/>
<include name="**/poi-6.*.jar"/>
<include name="**/poi-ooxml-6.*.jar"/>
<include name="**/poi-ooxml-lite-6.*.jar"/>
<include name="**/poi-scratchpad-6.*.jar"/>
<exclude name="**/*-javadoc*"/>
<exclude name="**/*-sources*"/>
</fileset>
@ -147,7 +150,7 @@ Before running this, you should execute the "jar" target in the main build.gradl
<echo message="Compiling all examples with the additional scratchpad.jar"/>
<javac srcdir="../poi-examples/src/main/java" destdir="${build}"
target="1.8" source="1.8" debug="true"
target="11" source="11" debug="true"
encoding="ASCII" fork="yes" includeantruntime="false"
classpath="${jarpackagescratchpad}" classpathref="libs">
</javac>

View File

@ -37,7 +37,6 @@ import org.apache.poi.hpsf.extractor.HPSFPropertiesExtractor;
import org.apache.poi.hssf.extractor.EventBasedExcelExtractor;
import org.apache.poi.ooxml.POIXMLException;
import org.apache.poi.ss.extractor.ExcelExtractor;
import org.apache.poi.util.IOUtils;
/**
* Base class with things that can be run for any supported file handler
@ -88,54 +87,78 @@ public abstract class AbstractFileHandler implements FileHandler {
long length = file.length();
long modified = file.lastModified();
POITextExtractor extractor = null;
String fileAndParentName = file.getParentFile().getName() + "/" + file.getName();
try {
// fix windows absolute paths for exception message tracking
String relPath = file.getPath().replaceAll(".*test-data", "test-data").replace('\\', '/');
extractor = ExtractorFactory.createExtractor(file);
assertNotNull(extractor, "Should get a POITextExtractor but had none for file " + relPath);
assertNotNull(extractor.getText(), "Should get some text but had none for file " + relPath);
// also try metadata
@SuppressWarnings("resource")
POITextExtractor metadataExtractor = extractor.getMetadataTextExtractor();
assertNotNull(metadataExtractor.getText());
assertFalse(EXPECTED_EXTRACTOR_FAILURES.contains(fileAndParentName),
"Expected Extraction to fail for file " + relPath + " and handler " + this + ", but did not fail!");
assertEquals(length, file.length(), "File should not be modified by extractor");
assertEquals(modified, file.lastModified(), "File should not be modified by extractor");
handleExtractingAsStream(file);
if (extractor instanceof POIOLE2TextExtractor) {
try (HPSFPropertiesExtractor hpsfExtractor = new HPSFPropertiesExtractor((POIOLE2TextExtractor) extractor)) {
assertNotNull(hpsfExtractor.getDocumentSummaryInformationText());
assertNotNull(hpsfExtractor.getSummaryInformationText());
String text = hpsfExtractor.getText();
//System.out.println(text);
// fix windows absolute paths for exception message tracking
String relPath = file.getPath().replaceAll(".*test-data", "test-data").replace('\\', '/');
try (POITextExtractor extractor = ExtractorFactory.createExtractor(file)) {
assertNotNull(extractor, "Should get a POITextExtractor but had none for file " + relPath);
assertNotNull(extractor.getText(), "Should get some text but had none for file " + relPath);
// also try metadata
POITextExtractor metadataExtractor = extractor.getMetadataTextExtractor();
assertNotNull(metadataExtractor.getText());
assertFalse(EXPECTED_EXTRACTOR_FAILURES.contains(fileAndParentName),
"Expected Extraction to fail for file " + relPath + " and handler " + this + ", but did not fail!");
assertEquals(length, file.length(), "File should not be modified by extractor");
assertEquals(modified, file.lastModified(), "File should not be modified by extractor");
if (extractor instanceof POIOLE2TextExtractor) {
POIOLE2TextExtractor ole2Extractor = (POIOLE2TextExtractor) extractor;
ole2Extractor.getRoot();
if (!(ole2Extractor instanceof EventBasedExcelExtractor)) {
ole2Extractor.getSummaryInformation();
ole2Extractor.getDocSummaryInformation();
}
try (HPSFPropertiesExtractor hpsfExtractor = new HPSFPropertiesExtractor(ole2Extractor)) {
assertNotNull(hpsfExtractor.getDocumentSummaryInformationText());
assertNotNull(hpsfExtractor.getSummaryInformationText());
String text = hpsfExtractor.getText();
//System.out.println(text);
assertNotNull(text);
}
if (ole2Extractor.getRoot() != null && !Boolean.getBoolean("scratchpad.ignore")) {
POITextExtractor[] embedded = ExtractorFactory.getEmbeddedDocsTextExtractors(ole2Extractor);
try {
for (POITextExtractor poiTextExtractor : embedded) {
poiTextExtractor.getText();
poiTextExtractor.getDocument();
poiTextExtractor.getFilesystem();
POITextExtractor metaData = poiTextExtractor.getMetadataTextExtractor();
metaData.getFilesystem();
metaData.getText();
}
} finally {
for (POITextExtractor embeddedExtractor : embedded) {
embeddedExtractor.close();
}
}
}
}
// test again with including formulas and cell-comments as this caused some bugs
if (extractor instanceof ExcelExtractor &&
// comment-extraction and formula extraction are not well supported in event based extraction
!(extractor instanceof EventBasedExcelExtractor)) {
((ExcelExtractor) extractor).setFormulasNotResults(true);
String text = extractor.getText();
assertNotNull(text);
// */
((ExcelExtractor) extractor).setIncludeCellComments(true);
text = extractor.getText();
assertNotNull(text);
}
}
// test again with including formulas and cell-comments as this caused some bugs
if (extractor instanceof ExcelExtractor &&
// comment-extraction and formula extraction are not well supported in event based extraction
!(extractor instanceof EventBasedExcelExtractor)) {
((ExcelExtractor) extractor).setFormulasNotResults(true);
String text = extractor.getText();
assertNotNull(text);
// */
((ExcelExtractor) extractor).setIncludeCellComments(true);
text = extractor.getText();
assertNotNull(text);
}
} catch (IOException | POIXMLException e) {
Exception prevE = e;
Throwable cause;
@ -159,8 +182,6 @@ public abstract class AbstractFileHandler implements FileHandler {
if (!e.getMessage().contains("POI Scratchpad jar missing") || !Boolean.getBoolean("scratchpad.ignore")) {
throw e;
}
} finally {
IOUtils.closeQuietly(extractor);
}
}
@ -170,6 +191,11 @@ public abstract class AbstractFileHandler implements FileHandler {
assertNotNull(streamExtractor);
assertNotNull(streamExtractor.getText());
POITextExtractor metadataTextExtractor = streamExtractor.getMetadataTextExtractor();
assertNotNull(metadataTextExtractor);
assertNotNull(metadataTextExtractor.getText());
}
}
}

View File

@ -29,6 +29,8 @@ public enum FileHandlerKnown {
HSLF,
HSMF,
HSSF,
HEMF,
HWMF,
HWPF,
OPC,
POIFS,

View File

@ -0,0 +1,85 @@
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
package org.apache.poi.stress;
import static org.junit.jupiter.api.Assertions.assertInstanceOf;
import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import org.apache.poi.hemf.record.emf.HemfRecord;
import org.apache.poi.hemf.record.emf.HemfRecordType;
import org.apache.poi.hemf.record.emf.HemfText;
import org.apache.poi.hemf.usermodel.HemfPicture;
import org.junit.jupiter.api.Test;
public class HEMFFileHandler implements FileHandler {
@Override
public void handleExtracting(File file) throws Exception {
try (InputStream stream = new BufferedInputStream(new FileInputStream(file))) {
HemfPicture picture = new HemfPicture(stream);
// mimic a bit what e.g. Tika does to extract some information from .emf files
for (HemfRecord record : picture.getRecords()) {
if (record.getEmfRecordType().equals(HemfRecordType.extTextOutW)) {
assertInstanceOf(HemfText.EmfExtTextOutW.class, record);
HemfText.EmfExtTextOutW textOut = (HemfText.EmfExtTextOutW) record;
textOut.getText(StandardCharsets.UTF_16LE);
} else if (record.getEmfRecordType().equals(HemfRecordType.extTextOutA)) {
assertInstanceOf(HemfText.EmfExtTextOutA.class, record);
HemfText.EmfExtTextOutA textOut = (HemfText.EmfExtTextOutA) record;
textOut.getText(StandardCharsets.UTF_8);
}
}
}
}
@Override
public void handleAdditional(File file) throws Exception {
// no additional checks for now
}
@Override
public void handleFile(InputStream stream, String path) throws Exception {
HemfPicture picture = new HemfPicture(stream);
for (HemfRecord record : picture.getRecords()) {
record.getEmfRecordType();
record.getGenericRecordType();
}
BufferedImage dest = new BufferedImage(256, 256, BufferedImage.TYPE_INT_ARGB);
picture.draw(dest.createGraphics(), new Rectangle2D.Double(0, 0, 256, 256));
}
@Test
void test() throws Exception {
String file = "test-data/slideshow/wrench.emf";
try (InputStream stream = new BufferedInputStream(new FileInputStream(file))) {
handleFile(stream, file);
}
handleExtracting(new File(file));
}
}

View File

@ -23,15 +23,15 @@ import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.poi.logging.PoiLogManager;
import org.apache.poi.hslf.usermodel.HSLFSlideShow;
import org.apache.poi.hslf.usermodel.HSLFSlideShowImpl;
import org.junit.jupiter.api.Test;
public class HSLFFileHandler extends SlideShowHandler {
private static final Logger LOGGER = LogManager.getLogger(HSLFFileHandler.class);
private static final Logger LOGGER = PoiLogManager.getLogger(HSLFFileHandler.class);
@Override
public void handleFile(InputStream stream, String path) throws Exception {

View File

@ -0,0 +1,93 @@
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
package org.apache.poi.stress;
import static org.junit.jupiter.api.Assertions.assertInstanceOf;
import java.awt.image.BufferedImage;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.nio.charset.Charset;
import org.apache.poi.hwmf.record.HwmfFont;
import org.apache.poi.hwmf.record.HwmfRecord;
import org.apache.poi.hwmf.record.HwmfRecordType;
import org.apache.poi.hwmf.record.HwmfText;
import org.apache.poi.hwmf.usermodel.HwmfPicture;
import org.apache.poi.util.LocaleUtil;
import org.junit.jupiter.api.Test;
public class HWMFFileHandler implements FileHandler {
@Override
public void handleExtracting(File file) throws Exception {
try (InputStream stream = new BufferedInputStream(new FileInputStream(file))) {
HwmfPicture picture = new HwmfPicture(stream);
Charset charset = LocaleUtil.CHARSET_1252;
// mimic a bit what e.g. Tika does to extract some information from .wmf files
for (HwmfRecord record : picture.getRecords()) {
if (record.getWmfRecordType().equals(HwmfRecordType.createFontIndirect)) {
HwmfFont font = ((HwmfText.WmfCreateFontIndirect) record).getFont();
charset = (font.getCharset() == null || font.getCharset().getCharset() == null) ?
LocaleUtil.CHARSET_1252 : font.getCharset().getCharset();
}
if (record.getWmfRecordType().equals(HwmfRecordType.extTextOut)) {
assertInstanceOf(HwmfText.WmfExtTextOut.class, record);
HwmfText.WmfExtTextOut textOut = (HwmfText.WmfExtTextOut) record;
textOut.getText(charset);
} else if (record.getWmfRecordType().equals(HwmfRecordType.textOut)) {
assertInstanceOf(HwmfText.WmfTextOut.class, record);
HwmfText.WmfTextOut textOut = (HwmfText.WmfTextOut) record;
textOut.getText(charset);
}
}
}
}
@Override
public void handleAdditional(File file) throws Exception {
// no additional checks for now
}
@Override
public void handleFile(InputStream stream, String path) throws Exception {
HwmfPicture picture = new HwmfPicture(stream);
for (HwmfRecord record : picture.getRecords()) {
record.getWmfRecordType();
record.getGenericRecordType();
}
BufferedImage dest = new BufferedImage(256, 256, BufferedImage.TYPE_INT_ARGB);
picture.draw(dest.createGraphics());
}
@Test
void test() throws Exception {
String file = "test-data/slideshow/santa.wmf";
try (InputStream stream = new BufferedInputStream(new FileInputStream(file))) {
handleFile(stream, file);
}
handleExtracting(new File(file));
}
}

View File

@ -19,10 +19,11 @@ package org.apache.poi.stress;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.io.PushbackInputStream;
import java.nio.file.Files;
import java.util.Set;
import org.apache.poi.openxml4j.opc.ContentTypes;
@ -61,17 +62,13 @@ public class OPCFileHandler extends AbstractFileHandler {
}
}
@Override
public void handleExtracting(File file) {
// text-extraction is not possible currently for these types of files
}
// a test-case to test this locally without executing the full TestAllFiles
@Test
void test() throws Exception {
File file = new File("test-data/diagram/test.vsdx");
try (InputStream stream = new PushbackInputStream(new FileInputStream(file), 100000)) {
try (InputStream stream = new BufferedInputStream(
new PushbackInputStream(Files.newInputStream(file.toPath()), 100000))) {
handleFile(stream, file.getPath());
}

View File

@ -29,6 +29,7 @@ import java.lang.ref.WeakReference;
import org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream;
import org.apache.poi.sl.draw.Drawable;
import org.apache.poi.sl.usermodel.GroupShape;
import org.apache.poi.sl.usermodel.MasterSheet;
import org.apache.poi.sl.usermodel.Notes;
import org.apache.poi.sl.usermodel.PictureData;
import org.apache.poi.sl.usermodel.Shape;
@ -76,8 +77,11 @@ public abstract class SlideShowHandler extends POIFSFileHandler {
}
}
for (Shape<?,?> shape : s.getMasterSheet()) {
readShapes(shape);
MasterSheet<?, ?> masterSheet = s.getMasterSheet();
if (masterSheet != null) {
for (Shape<?,?> shape : masterSheet) {
readShapes(shape);
}
}
}
}

View File

@ -37,6 +37,8 @@ public abstract class SpreadsheetHandler extends AbstractFileHandler {
// try to access some of the content
readContent(wb);
extractEmbedded(wb);
// write out the file
writeToArray(wb);

View File

@ -96,14 +96,19 @@ public class TestAllFiles {
"poifs/protected_sha512.xlsx",
"poifs/60320-protected.xlsx",
"poifs/protected_sha512.xlsx",
// stress docs
"document/deep-table-cell.docx",
// invalid files
"spreadsheet/bug69769.xlsx",
// NOTE: Expected failures should usually be added in file "stress.xls" instead
// of being listed here in order to also verify the expected exception details!
};
// cheap workaround of skipping the few problematic files
public static final String[] SCAN_EXCLUDES_NOSCRATCHPAD = {
"**/.svn/**",
"lost+found",
"**/.git/**",
"**/ExternalEntityInText.docx", //the DocType (DTD) declaration causes this to fail
public static final String[] SCAN_EXCLUDES_NOSCRATCHPAD = concat(SCAN_EXCLUDES, new String[] {
"**/right-to-left.xlsx", //the threaded comments in this file cause XSSF clone to fail
"document/word2.doc",
"document/cpansearch.perl.org_src_tobyink_acme-rundoc-0.001_word-lib_hello_world.docm",
@ -130,17 +135,28 @@ public class TestAllFiles {
"document/clusterfuzz-testcase-minimized-POIHWPFFuzzer-5418937293340672.doc",
"document/clusterfuzz-testcase-minimized-POIHWPFFuzzer-5440721166139392.doc",
"diagram/clusterfuzz-testcase-minimized-POIHDGFFuzzer-5947849161179136.vsd",
// exclude files failing on windows nodes, because of limited JCE policies
"document/bug53475-password-is-pass.docx",
"poifs/60320-protected.xlsx",
"poifs/protected_sha512.xlsx",
"poifs/60320-protected.xlsx",
"poifs/protected_sha512.xlsx",
};
"spreadsheet/clusterfuzz-testcase-minimized-POIHSSFFuzzer-5436547081830400.xls",
"spreadsheet/clusterfuzz-testcase-minimized-POIHSSFFuzzer-4819588401201152.xls",
"diagram/clusterfuzz-testcase-minimized-POIVisioFuzzer-4537225637134336.vsd",
"spreadsheet/clusterfuzz-testcase-minimized-POIHSSFFuzzer-6537773940867072.xls",
"spreadsheet/clusterfuzz-testcase-minimized-POIHSSFFuzzer-4977868385681408.xls",
"spreadsheet/clusterfuzz-testcase-minimized-POIHSSFFuzzer-4651309315719168.xls",
"document/clusterfuzz-testcase-POIHWPFFuzzer-5696094627495936.doc",
"spreadsheet/clusterfuzz-testcase-minimized-POIHSSFFuzzer-4657005060816896.xls",
"diagram/clusterfuzz-testcase-minimized-POIHDGFFuzzer-4913778037489664.vsd",
"diagram/clusterfuzz-testcase-minimized-POIHDGFFuzzer-6478389109981184.vsd",
"publisher/clusterfuzz-testcase-minimized-POIHPBFFuzzer-4918886059278336.pub",
"publisher/clusterfuzz-testcase-minimized-POIHPBFFuzzer-4918886059278336.pub",
"publisher/clusterfuzz-testcase-minimized-POIHPBFFuzzer-6325615354773504.pub",
"spreadsheet/clusterfuzz-testcase-minimized-POIHSSFFuzzer-4734163573080064.xls",
"spreadsheet/rde.imf.ru_sites_default_files_rde_documents_vodootvedenie_2020.xlsb.xls",
"publisher/clusterfuzz-testcase-minimized-POIHPBFFuzzer-6325615354773504.pub",
});
private static final Set<String> EXPECTED_FAILURES = StressTestUtils.unmodifiableHashSet(
"document/truncated62886.docx"
"document/truncated62886.docx",
// this document fails with IBM JDK because of a different exception being thrown
"spreadsheet/clusterfuzz-testcase-minimized-POIXSSFFuzzer-5089447305609216.xlsx"
);
public static Stream<Arguments> allfiles(String testName) throws IOException {
@ -162,6 +178,7 @@ public class TestAllFiles {
continue;
}
boolean found = false;
for (FileHandlerKnown handler : sm.getHandler(file)) {
ExcInfo info1 = sm.getExcInfo(file, testName, handler);
if (info1 == null || info1.isValid(testName, handler.name())) {
@ -172,8 +189,13 @@ public class TestAllFiles {
(info1 != null) ? info1.getExClazz() : null,
(info1 != null) ? info1.getExMessage() : null
));
found = true;
}
}
if (!found) {
System.out.println("Could not find a handler for " + file);
}
}
return result.stream();
@ -241,6 +263,9 @@ public class TestAllFiles {
String threadName = Thread.currentThread().getName();
try {
Thread.currentThread().setName("Additional - " + file + " - " + handler);
if (StressTestUtils.excludeFile(file, EXPECTED_FAILURES))
return;
System.out.println("Running additionals on "+file);
FileHandler fileHandler = handler.getHandler();
assertNotNull(fileHandler, "Did not find a handler for file " + file);
@ -284,9 +309,10 @@ public class TestAllFiles {
errPrefix + " for " + exClass + " expected message '" + exMessage + "' but had '" + actMsg + "': " + e);
if (actMsg != null &&
// sometimes ArrayIndexOutOfBoundsException has null-message?!?
// in newer JDK versions IndexOutOfBoundsException switch from empty message
// to more useful content
// so skip the check for this type of exception if expected message is null
(exMessage != null || !ArrayIndexOutOfBoundsException.class.isAssignableFrom(exClass))) {
(exMessage != null || !IndexOutOfBoundsException.class.isAssignableFrom(exClass))) {
assertNotNull(exMessage,
errPrefix + "Expected message was null, but actMsg wasn't: Message: " + actMsg + ": " + e);
assertTrue(actMsg.contains(exMessage),
@ -329,4 +355,11 @@ public class TestAllFiles {
private static boolean isJava8() {
return System.getProperty("java.version").startsWith("1.8");
}
private static String[] concat(String[] a, String[] b) {
String[] result = new String[a.length + b.length];
System.arraycopy(a, 0, result, 0, a.length);
System.arraycopy(b, 0, result, a.length, b.length);
return result;
}
}

View File

@ -78,7 +78,7 @@ public class XSSFBFileHandler extends AbstractFileHandler {
XSSFBEventBasedExcelExtractor ex = new XSSFBEventBasedExcelExtractor(pkg);
String txt = ex.getText();
if (txt.length() < 1) {
throw new RuntimeException("Should have gotten some text.");
throw new IllegalArgumentException("Should have gotten some text.");
}
}

View File

@ -203,7 +203,7 @@ public class XSSFFileHandler extends SpreadsheetHandler {
XLSX2CSV.main(new String[]{file.getAbsolutePath()});
ExcelComparator.main(new String[]{file.getAbsolutePath(), file.getAbsolutePath()});
assertFalse( EXPECTED_ADDITIONAL_FAILURES.contains(testFile), "Expected Extraction to fail for file " + file + " and handler " + this + ", but did not fail!" );
assertFalse(EXPECTED_ADDITIONAL_FAILURES.contains(testFile), "Expected Extraction to fail for file " + file + " and handler " + this + ", but did not fail!" );
} catch (OLE2NotOfficeXmlFileException e) {
// we have some files that are not actually OOXML and thus cannot be tested here

View File

@ -22,6 +22,7 @@ import java.io.FileInputStream;
import java.io.InputStream;
import java.util.Set;
import org.apache.commons.io.output.NullOutputStream;
import org.apache.poi.ooxml.POIXMLException;
import org.apache.poi.xwpf.usermodel.XWPFDocument;
import org.junit.jupiter.api.Test;
@ -41,6 +42,8 @@ public class XWPFFileHandler extends AbstractFileHandler {
try (XWPFDocument doc = new XWPFDocument(stream)) {
new POIXMLDocumentHandler().handlePOIXMLDocument(doc);
POIXMLDocumentHandler.cursorRecursive(doc.getDocument());
doc.write(NullOutputStream.INSTANCE);
} catch (POIXMLException e) {
Exception cause = (Exception)e.getCause();
throw cause == null ? e : cause;

View File

@ -16,13 +16,14 @@
==================================================================== */
module org.apache.poi.stress {
requires org.apache.logging.log4j;
requires org.junit.jupiter.api;
requires org.junit.jupiter.params;
requires net.bytebuddy;
requires java.desktop;
requires org.apache.commons.collections4;
requires org.apache.commons.io;
requires transitive org.apache.poi.poi;
requires org.apache.poi.examples;
requires org.apache.poi.scratchpad;

View File

@ -37,6 +37,7 @@
<Logger name="org.apache.poi.xssf.usermodel.XSSFWorkbook" level="ERROR" />
<Logger name="org.apache.poi.hslf.usermodel.HSLFGroupShape" level="WARN" />
<Logger name="org.apache.poi.hslf.record.Record" level="ERROR" />
<Logger name="org.apache.poi.hwpf.sprm.ParagraphSprmUncompressor" level="FATAL" />
<!-- Change to DEBUG or another level to get log output -->
<Root level="ERROR">

View File

@ -1,5 +1,3 @@
import java.util.regex.Pattern
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@ -17,9 +15,11 @@ import java.util.regex.Pattern
limitations under the License.
==================================================================== */
import java.util.regex.Pattern
final String MODULE_NAME = 'org.apache.poi.ooxml.schemas'
final String BEANS_SRC = "${buildDir}/generated-sources"
final String BEANS_RES = "${buildDir}/generated-resources"
final String BEANS_SRC = layout.buildDirectory.dir('generated-sources').get().asFile.absolutePath
final String BEANS_RES = layout.buildDirectory.dir('generated-resources').get().asFile.absolutePath
sourceSets {
main {
@ -54,36 +54,36 @@ compileJava {
options.forkOptions.jvmArgs += '-Xmx2G'
}
task compileJava9(type: JavaCompile) {
tasks.register('compileJava9', JavaCompile) {
dependsOn 'compileJava'
javaCompiler = javaToolchains.compilerFor {
languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
}
sourceCompatibility = 1.9
targetCompatibility = 1.9
sourceCompatibility = 11
targetCompatibility = 11
destinationDirectory = file(JAVA9_OUT + VERSIONS9)
source = file(JAVA9_SRC)
classpath = files()
options.compilerArgs = [
'--patch-module', "${MODULE_NAME}=${sourceSets.main.output.asPath}",
'--module-path', files(MAIN_MODULE_PATH).asPath
'--patch-module', "${MODULE_NAME}=${sourceSets.main.output.asPath}",
'--module-path', files(MAIN_MODULE_PATH).asPath
]
}
task copy_xsds(type: Copy) {
from ('src/main/xmlschema/org/apache/poi/xdgf')
from ('src/main/xmlschema/org/apache/poi/schemas') {
tasks.register('copy_xsds', Copy) {
from('src/main/xmlschema/org/apache/poi/xdgf')
from('src/main/xmlschema/org/apache/poi/schemas') {
include 'XAdES*.xsd', '*.xsdconfig', 'xmldsig*.xsd', 'ooxmlSchemas.xsdconfig', 'markup-compatibility.xsd',
'vmlDrawing.xsd', 'word12.xsd', 'xlThreaded*.xsd', 'dml-drawing.xsd', 'drawing-chart2012.xsd',
'vmlDrawing.xsd', 'word10.xsd', 'word12.xsd', 'xlThreaded*.xsd', 'dml-drawing.xsd', 'drawing-chart2012.xsd',
'chartEx.xsd'
exclude '*.zip'
}
from ('src/main/xmlschema/org/apache/poi/poifs/crypt') {
from('src/main/xmlschema/org/apache/poi/poifs/crypt') {
include 'signatureInfo.xsd'
}
from (zipTree('src/main/xmlschema/org/apache/poi/schemas/OfficeOpenXML-XMLSchema-Transitional.zip'))
from (zipTree('src/main/xmlschema/org/apache/poi/schemas/OpenPackagingConventions-XMLSchema.zip')) {
from(zipTree('src/main/xmlschema/org/apache/poi/schemas/OfficeOpenXML-XMLSchema-Transitional.zip'))
from(zipTree('src/main/xmlschema/org/apache/poi/schemas/OpenPackagingConventions-XMLSchema.zip')) {
include 'opc-digSig.xsd', 'opc-relationships.xsd'
}
into 'build/xsds'
@ -95,30 +95,30 @@ task generate_beans(dependsOn: copy_xsds) {
doLast {
ant.uptodate(
property: 'xmlbeans_uptodate',
targetfile: 'build/generated-resources/org/apache/poi/schemas/ooxml/system/ooxml/TypeSystemHolder.class'
property: 'xmlbeans_uptodate',
targetfile: 'build/generated-resources/org/apache/poi/schemas/ooxml/system/ooxml/TypeSystemHolder.class'
) {
srcFiles(dir: 'build/xsds', includes: '*.xsd')
}
ant.taskdef(
name: 'xmlbean',
classname: 'org.apache.xmlbeans.impl.tool.XMLBean',
classpath: sourceSets.main.runtimeClasspath.asPath
name: 'xmlbean',
classname: 'org.apache.xmlbeans.impl.tool.XMLBean',
classpath: sourceSets.main.runtimeClasspath.asPath
)
if (!ant.properties.xmlbeans_uptodate) {
ant.xmlbean(
schema: 'build/xsds',
srcgendir: BEANS_SRC,
classgendir: BEANS_RES,
destfile: 'build/xsds.jar',
srconly: true,
failonerror: true,
fork: true,
memoryMaximumSize: '1536m',
typesystemname: 'ooxml',
repackage: 'org.apache.xmlbeans.metadata:org.apache.poi.schemas.ooxml'
schema: 'build/xsds',
srcgendir: BEANS_SRC,
classgendir: BEANS_RES,
destfile: 'build/xsds.jar',
srconly: true,
failonerror: true,
fork: true,
memoryMaximumSize: '1536m',
typesystemname: 'ooxml',
repackage: 'org.apache.xmlbeans.metadata:org.apache.poi.schemas.ooxml'
) {
classpath = sourceSets.main.runtimeClasspath.asPath
}
@ -126,7 +126,7 @@ task generate_beans(dependsOn: copy_xsds) {
}
}
task sourceJar(type: Jar) {
tasks.register('sourceJar', Jar) {
setArchiveClassifier 'sources'
from sourceSets.main.allJava
}

View File

@ -1,39 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
====================================================================
-->
<xs:schema xmlns="http://schemas.microsoft.com/office/2006/keyEncryptor/certificate" xmlns:e="http://schemas.microsoft.com/office/2006/encryption" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://schemas.microsoft.com/office/2006/keyEncryptor/certificate" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:import namespace="http://schemas.microsoft.com/office/2006/encryption" schemaLocation="encryptionInfo.xsd"/>
<xs:simpleType name="ST_PasswordKeyEncryptorUri">
<xs:restriction base="xs:token">
<xs:enumeration value="http://schemas.microsoft.com/office/2006/keyEncryptor/certificate"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="CT_CertificateKeyEncryptor">
<xs:attribute name="encryptedKeyValue" type="xs:base64Binary" use="required">
<xs:annotation><xs:documentation>A base64-encoded value that specifies the encrypted form of the intermediate key, which is encrypted with the public key contained within the X509Certificate attribute.</xs:documentation></xs:annotation>
</xs:attribute>
<xs:attribute name="X509Certificate" type="xs:base64Binary" use="required">
<xs:annotation><xs:documentation>A base64-encoded value that specifies a DER-encoded X.509 certificate (1) used to encrypt the intermediate key. The certificate (1) MUST contain only the public portion of the public-private key pair.</xs:documentation></xs:annotation>
</xs:attribute>
<xs:attribute name="certVerifier" type="xs:base64Binary" use="required">
<xs:annotation><xs:documentation>A base64-encoded value that specifies the HMAC of the binary data obtained by base64-decoding the X509Certificate attribute. The hashing algorithm used to derive the HMAC MUST be the hashing algorithm specified for the Encryption.keyData element. The secret key used to derive the HMAC MUST be the intermediate key. If the intermediate key is reset, any CertificateKeyEncryptor elements are also reset to contain the new intermediate key, except that the certVerifier attribute MUST match the value calculated using the current intermediate key, to verify that the CertificateKeyEncryptor element actually encrypted the current intermediate key. If a CertificateKeyEncryptor element does not have a correct certVerifier attribute, it MUST be discarded.</xs:documentation></xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:element name="encryptedKey" type="CT_CertificateKeyEncryptor"/>
</xs:schema>
<?xml version="1.0" encoding="utf-8"?>
<!--
====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
====================================================================
-->
<xs:schema xmlns="http://schemas.microsoft.com/office/2006/keyEncryptor/certificate" xmlns:e="http://schemas.microsoft.com/office/2006/encryption" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://schemas.microsoft.com/office/2006/keyEncryptor/certificate" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:import namespace="http://schemas.microsoft.com/office/2006/encryption" schemaLocation="encryptionInfo.xsd"/>
<xs:simpleType name="ST_PasswordKeyEncryptorUri">
<xs:restriction base="xs:token">
<xs:enumeration value="http://schemas.microsoft.com/office/2006/keyEncryptor/certificate"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="CT_CertificateKeyEncryptor">
<xs:attribute name="encryptedKeyValue" type="xs:base64Binary" use="required">
<xs:annotation><xs:documentation>A base64-encoded value that specifies the encrypted form of the intermediate key, which is encrypted with the public key contained within the X509Certificate attribute.</xs:documentation></xs:annotation>
</xs:attribute>
<xs:attribute name="X509Certificate" type="xs:base64Binary" use="required">
<xs:annotation><xs:documentation>A base64-encoded value that specifies a DER-encoded X.509 certificate (1) used to encrypt the intermediate key. The certificate (1) MUST contain only the public portion of the public-private key pair.</xs:documentation></xs:annotation>
</xs:attribute>
<xs:attribute name="certVerifier" type="xs:base64Binary" use="required">
<xs:annotation><xs:documentation>A base64-encoded value that specifies the HMAC of the binary data obtained by base64-decoding the X509Certificate attribute. The hashing algorithm used to derive the HMAC MUST be the hashing algorithm specified for the Encryption.keyData element. The secret key used to derive the HMAC MUST be the intermediate key. If the intermediate key is reset, any CertificateKeyEncryptor elements are also reset to contain the new intermediate key, except that the certVerifier attribute MUST match the value calculated using the current intermediate key, to verify that the CertificateKeyEncryptor element actually encrypted the current intermediate key. If a CertificateKeyEncryptor element does not have a correct certVerifier attribute, it MUST be discarded.</xs:documentation></xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:element name="encryptedKey" type="CT_CertificateKeyEncryptor"/>
</xs:schema>

View File

@ -1,24 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
====================================================================
-->
<xb:config xmlns:xb="http://xml.apache.org/xmlbeans/2004/02/xbean/config" xmlns:c="http://schemas.microsoft.com/office/2006/keyEncryptor/certificate">
<xb:qname name="c:encryptedKey" javaname="EncryptedCertificateKey"/>
<?xml version="1.0" encoding="UTF-8"?>
<!--
====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
====================================================================
-->
<xb:config xmlns:xb="http://xml.apache.org/xmlbeans/2004/02/xbean/config" xmlns:c="http://schemas.microsoft.com/office/2006/keyEncryptor/certificate">
<xb:qname name="c:encryptedKey" javaname="EncryptedCertificateKey"/>
</xb:config>

View File

@ -1,259 +1,259 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
====================================================================
-->
<xs:schema xmlns="http://schemas.microsoft.com/office/2006/encryption" xmlns:p="http://schemas.microsoft.com/office/2006/keyEncryptor/password" xmlns:c="http://schemas.microsoft.com/office/2006/keyEncryptor/certificate" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://schemas.microsoft.com/office/2006/encryption" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:import namespace="http://schemas.microsoft.com/office/2006/keyEncryptor/password" schemaLocation="encryptionPassword.xsd"/>
<xs:import namespace="http://schemas.microsoft.com/office/2006/keyEncryptor/certificate" schemaLocation="encryptionCertificate.xsd"/>
<xs:simpleType name="ST_SaltSize">
<xs:annotation>
<xs:documentation>An unsigned integer that specifies the number of bytes used by a salt. It MUST be at least 1 and no greater than 65,536.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:unsignedInt">
<xs:minInclusive value="1"/>
<xs:maxInclusive value="65536"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ST_BlockSize">
<xs:annotation>
<xs:documentation>An unsigned integer that specifies the number of bytes used to encrypt one block of data. It MUST be at least 2, no greater than 4096, and a multiple of 2.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:unsignedInt">
<xs:minInclusive value="2"/>
<xs:maxInclusive value="4096"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ST_KeyBits">
<xs:annotation>
<xs:documentation>An unsigned integer that specifies the number of bits used by an encryption algorithm. It MUST be at least 8 and a multiple of 8.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:unsignedInt">
<xs:minInclusive value="8"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ST_HashSize">
<xs:annotation>
<xs:documentation>An unsigned integer that specifies the number of bytes used by a hash value. It MUST be at least 1, no greater than 65,536, and the same number of bytes as the hash algorithm emits.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:unsignedInt">
<xs:minInclusive value="1"/>
<xs:maxInclusive value="65536"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ST_SpinCount">
<xs:annotation>
<xs:documentation>An unsigned integer that specifies the number of times to iterate on a hash of a password. It MUST NOT be greater than 10,000,000.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:unsignedInt">
<xs:minInclusive value="0"/>
<xs:maxInclusive value="10000000"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ST_CipherAlgorithm">
<xs:annotation>
<xs:appinfo>modified for poi - list is restricted to given list in [ms-offcrypto]</xs:appinfo>
<xs:documentation>A string that specifies the cipher algorithm. Values that are not defined MAY be used, and a compliant implementation is not required to support all defined values. Any algorithm that can be resolved by name by the underlying operating system can be used for hashing or encryption. Only block algorithms are supported for encryption. AES-128 is the default encryption algorithm, and SHA-1 is the default hashing algorithm if no other algorithms have been configured.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:token">
<xs:enumeration value="AES">
<xs:annotation>
<xs:documentation>MUST conform to the AES algorithm.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="RC2">
<xs:annotation>
<xs:documentation>MUST conform to the algorithm as specified in [RFC2268] (http://tools.ietf.org/html/rfc2268). The use of RC2 is not recommended. If RC2 is used with a key length of less than 128 bits, documents could interoperate incorrectly across different versions of Windows.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="RC4">
<xs:annotation>
<xs:documentation>MUST NOT be used.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="DES">
<xs:annotation>
<xs:documentation>MUST conform to the DES algorithm. The use of DES is not recommended. If DES is used, the key length specified in the KeyBits element is required to be set to 64 for 56-bit encryption, and the key decrypted from encryptedKeyValue of KeyEncryptor is required to include the DES parity bits.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="DESX">
<xs:annotation>
<xs:documentation>MUST conform to the algorithm as specified in [DRAFT-DESX] (http://tools.ietf.org/html/draft-ietf-ipsec-ciph-desx-00). The use of DESX is not recommended. If DESX is used, documents could interoperate incorrectly across different versions of Windows.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="3DES">
<xs:annotation>
<xs:documentation>MUST conform to the algorithm as specified in [RFC1851] (http://tools.ietf.org/html/rfc1851). If 3DES or 3DES_112 is used, the key length specified in the KeyBits element is required to be set to 192 for 168-bit encryption and 128 for 112-bit encryption, and the key decrypted from encryptedKeyValue of KeyEncryptor is required to include the DES parity bits.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="3DES_112">
<xs:annotation>
<xs:documentation>see 3DES</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ST_CipherChaining">
<xs:annotation>
<xs:documentation>A string that specifies the chaining mode used by CipherAlgorithm. For more details about chaining modes, see [BCMO800-38A] (http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf).</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:token">
<xs:enumeration value="ChainingModeCBC">
<xs:annotation>
<xs:documentation>block chaining (CBC)</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="ChainingModeCFB">
<xs:annotation>
<xs:documentation>Cipher feedback chaining (CFB), with an 8-bit window</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ST_HashAlgorithm">
<xs:annotation>
<xs:appinfo>modified for poi - list is restricted to given list in [ms-offcrypto]</xs:appinfo>
<xs:documentation>A string specifying a hashing algorithm. Values that are not defined MAY be used, and a compliant implementation is not required to support all defined values.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:token">
<xs:enumeration value="SHA1">
<xs:annotation>
<xs:documentation>MUST conform to the algorithm as specified in [RFC4634] (http://tools.ietf.org/html/rfc4634).</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="SHA256">
<xs:annotation>
<xs:documentation>see SHA1</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="SHA384">
<xs:annotation>
<xs:documentation>see SHA1</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="SHA512">
<xs:annotation>
<xs:documentation>see SHA1</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="MD5">
<xs:annotation>
<xs:documentation>MUST conform to MD5.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="MD4">
<xs:annotation>
<xs:documentation>MUST conform to the algorithm as specified in [RFC1320] (http://tools.ietf.org/html/rfc1320).</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="MD2">
<xs:annotation>
<xs:documentation>MUST conform to the algorithm as specified in [RFC1319] (http://tools.ietf.org/html/rfc1319).</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="RIPEMD-128">
<xs:annotation>
<xs:documentation>MUST conform to the hash functions specified in [ISO/IEC 10118]. (https://en.wikipedia.org/wiki/RIPEMD)</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="RIPEMD-160">
<xs:annotation>
<xs:documentation>see RIPEMD-128 (https://en.wikipedia.org/wiki/RIPEMD)</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="WHIRLPOOL">
<xs:annotation>
<xs:documentation>see RIPEMD-128 (https://en.wikipedia.org/wiki/ISO/IEC_10118-3)</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="CT_KeyData">
<xs:annotation>
<xs:documentation>A complex type that specifies the encryption used within this element. The saltValue attribute is a base64-encoded binary value that is randomly generated. The number of bytes required to decode the saltValue attribute MUST be equal to the value of the saltSize attribute.</xs:documentation>
</xs:annotation>
<xs:attribute name="saltSize" type="ST_SaltSize" use="required"/>
<xs:attribute name="blockSize" type="ST_BlockSize" use="required"/>
<xs:attribute name="keyBits" type="ST_KeyBits" use="required"/>
<xs:attribute name="hashSize" type="ST_HashSize" use="required"/>
<xs:attribute name="cipherAlgorithm" type="ST_CipherAlgorithm" use="required"/>
<xs:attribute name="cipherChaining" type="ST_CipherChaining" use="required"/>
<xs:attribute name="hashAlgorithm" type="ST_HashAlgorithm" use="required"/>
<xs:attribute name="saltValue" type="xs:base64Binary" use="required"/>
</xs:complexType>
<xs:complexType name="CT_DataIntegrity">
<xs:annotation>
<xs:documentation>A complex type that specifies data used to verify whether the encrypted data passes an integrity check. It MUST be generated using the method specified in section 2.3.4.14 (http://msdn.microsoft.com/en-us/library/dd924068(v=office.12).aspx).</xs:documentation>
</xs:annotation>
<xs:attribute name="encryptedHmacKey" type="xs:base64Binary" use="required">
<xs:annotation>
<xs:documentation>A base64-encoded value that specifies an encrypted key used in calculating the encryptedHmacValue.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="encryptedHmacValue" type="xs:base64Binary" use="required">
<xs:annotation>
<xs:documentation>A base64-encoded value that specifies an HMAC derived from encryptedHmacKey and the encrypted data.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="CT_KeyEncryptor">
<xs:annotation>
<xs:appinfo>modified for POI</xs:appinfo>
<xs:documentation>A complex type that specifies the parameters used to encrypt an intermediate key, which is used to perform the final encryption of the document. To ensure extensibility, arbitrary elements can be defined to encrypt the intermediate key. The intermediate key MUST be the same for all KeyEncryptor elements.</xs:documentation>
</xs:annotation>
<xs:choice>
<xs:element ref="p:encryptedKey"/>
<xs:element ref="c:encryptedKey"/>
</xs:choice>
<xs:attribute name="uri">
<xs:annotation>
<xs:appinfo>modified for POI</xs:appinfo>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="http://schemas.microsoft.com/office/2006/keyEncryptor/password"/>
<xs:enumeration value="http://schemas.microsoft.com/office/2006/keyEncryptor/certificate"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
<xs:complexType name="CT_KeyEncryptors">
<xs:annotation>
<xs:documentation>A sequence of KeyEncryptor elements. Exactly one KeyEncryptors element MUST be present, and the KeyEncryptors element MUST contain at least one KeyEncryptor.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="keyEncryptor" type="CT_KeyEncryptor" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="CT_Encryption">
<xs:sequence>
<xs:element name="keyData" type="CT_KeyData"/>
<xs:element name="dataIntegrity" type="CT_DataIntegrity">
<xs:annotation>
<xs:appinfo>modified for POI</xs:appinfo>
<xs:documentation>All ECMA-376 documents [ECMA-376] encrypted by Microsoft Office using agile encryption will have a DataIntegrity element present. The schema allows for a DataIntegrity element to not be present because the encryption schema can be used by applications that do not create ECMA-376 documents [ECMA-376].</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="keyEncryptors" type="CT_KeyEncryptors">
<xs:annotation>
<xs:documentation>The KeyEncryptor element, which MUST be used when encrypting password-protected agile encryption documents, is either a PasswordKeyEncryptor or a CertificateKeyEncryptor. Exactly one PasswordKeyEncryptor MUST be present. Zero or more CertificateKeyEncryptor elements are contained within the KeyEncryptors element.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:element name="encryption" type="CT_Encryption"/>
</xs:schema>
<?xml version="1.0" encoding="utf-8"?>
<!--
====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
====================================================================
-->
<xs:schema xmlns="http://schemas.microsoft.com/office/2006/encryption" xmlns:p="http://schemas.microsoft.com/office/2006/keyEncryptor/password" xmlns:c="http://schemas.microsoft.com/office/2006/keyEncryptor/certificate" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://schemas.microsoft.com/office/2006/encryption" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:import namespace="http://schemas.microsoft.com/office/2006/keyEncryptor/password" schemaLocation="encryptionPassword.xsd"/>
<xs:import namespace="http://schemas.microsoft.com/office/2006/keyEncryptor/certificate" schemaLocation="encryptionCertificate.xsd"/>
<xs:simpleType name="ST_SaltSize">
<xs:annotation>
<xs:documentation>An unsigned integer that specifies the number of bytes used by a salt. It MUST be at least 1 and no greater than 65,536.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:unsignedInt">
<xs:minInclusive value="1"/>
<xs:maxInclusive value="65536"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ST_BlockSize">
<xs:annotation>
<xs:documentation>An unsigned integer that specifies the number of bytes used to encrypt one block of data. It MUST be at least 2, no greater than 4096, and a multiple of 2.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:unsignedInt">
<xs:minInclusive value="2"/>
<xs:maxInclusive value="4096"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ST_KeyBits">
<xs:annotation>
<xs:documentation>An unsigned integer that specifies the number of bits used by an encryption algorithm. It MUST be at least 8 and a multiple of 8.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:unsignedInt">
<xs:minInclusive value="8"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ST_HashSize">
<xs:annotation>
<xs:documentation>An unsigned integer that specifies the number of bytes used by a hash value. It MUST be at least 1, no greater than 65,536, and the same number of bytes as the hash algorithm emits.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:unsignedInt">
<xs:minInclusive value="1"/>
<xs:maxInclusive value="65536"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ST_SpinCount">
<xs:annotation>
<xs:documentation>An unsigned integer that specifies the number of times to iterate on a hash of a password. It MUST NOT be greater than 10,000,000.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:unsignedInt">
<xs:minInclusive value="0"/>
<xs:maxInclusive value="10000000"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ST_CipherAlgorithm">
<xs:annotation>
<xs:appinfo>modified for poi - list is restricted to given list in [ms-offcrypto]</xs:appinfo>
<xs:documentation>A string that specifies the cipher algorithm. Values that are not defined MAY be used, and a compliant implementation is not required to support all defined values. Any algorithm that can be resolved by name by the underlying operating system can be used for hashing or encryption. Only block algorithms are supported for encryption. AES-128 is the default encryption algorithm, and SHA-1 is the default hashing algorithm if no other algorithms have been configured.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:token">
<xs:enumeration value="AES">
<xs:annotation>
<xs:documentation>MUST conform to the AES algorithm.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="RC2">
<xs:annotation>
<xs:documentation>MUST conform to the algorithm as specified in [RFC2268] (http://tools.ietf.org/html/rfc2268). The use of RC2 is not recommended. If RC2 is used with a key length of less than 128 bits, documents could interoperate incorrectly across different versions of Windows.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="RC4">
<xs:annotation>
<xs:documentation>MUST NOT be used.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="DES">
<xs:annotation>
<xs:documentation>MUST conform to the DES algorithm. The use of DES is not recommended. If DES is used, the key length specified in the KeyBits element is required to be set to 64 for 56-bit encryption, and the key decrypted from encryptedKeyValue of KeyEncryptor is required to include the DES parity bits.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="DESX">
<xs:annotation>
<xs:documentation>MUST conform to the algorithm as specified in [DRAFT-DESX] (http://tools.ietf.org/html/draft-ietf-ipsec-ciph-desx-00). The use of DESX is not recommended. If DESX is used, documents could interoperate incorrectly across different versions of Windows.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="3DES">
<xs:annotation>
<xs:documentation>MUST conform to the algorithm as specified in [RFC1851] (http://tools.ietf.org/html/rfc1851). If 3DES or 3DES_112 is used, the key length specified in the KeyBits element is required to be set to 192 for 168-bit encryption and 128 for 112-bit encryption, and the key decrypted from encryptedKeyValue of KeyEncryptor is required to include the DES parity bits.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="3DES_112">
<xs:annotation>
<xs:documentation>see 3DES</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ST_CipherChaining">
<xs:annotation>
<xs:documentation>A string that specifies the chaining mode used by CipherAlgorithm. For more details about chaining modes, see [BCMO800-38A] (http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf).</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:token">
<xs:enumeration value="ChainingModeCBC">
<xs:annotation>
<xs:documentation>block chaining (CBC)</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="ChainingModeCFB">
<xs:annotation>
<xs:documentation>Cipher feedback chaining (CFB), with an 8-bit window</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ST_HashAlgorithm">
<xs:annotation>
<xs:appinfo>modified for poi - list is restricted to given list in [ms-offcrypto]</xs:appinfo>
<xs:documentation>A string specifying a hashing algorithm. Values that are not defined MAY be used, and a compliant implementation is not required to support all defined values.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:token">
<xs:enumeration value="SHA1">
<xs:annotation>
<xs:documentation>MUST conform to the algorithm as specified in [RFC4634] (http://tools.ietf.org/html/rfc4634).</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="SHA256">
<xs:annotation>
<xs:documentation>see SHA1</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="SHA384">
<xs:annotation>
<xs:documentation>see SHA1</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="SHA512">
<xs:annotation>
<xs:documentation>see SHA1</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="MD5">
<xs:annotation>
<xs:documentation>MUST conform to MD5.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="MD4">
<xs:annotation>
<xs:documentation>MUST conform to the algorithm as specified in [RFC1320] (http://tools.ietf.org/html/rfc1320).</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="MD2">
<xs:annotation>
<xs:documentation>MUST conform to the algorithm as specified in [RFC1319] (http://tools.ietf.org/html/rfc1319).</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="RIPEMD-128">
<xs:annotation>
<xs:documentation>MUST conform to the hash functions specified in [ISO/IEC 10118]. (https://en.wikipedia.org/wiki/RIPEMD)</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="RIPEMD-160">
<xs:annotation>
<xs:documentation>see RIPEMD-128 (https://en.wikipedia.org/wiki/RIPEMD)</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="WHIRLPOOL">
<xs:annotation>
<xs:documentation>see RIPEMD-128 (https://en.wikipedia.org/wiki/ISO/IEC_10118-3)</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="CT_KeyData">
<xs:annotation>
<xs:documentation>A complex type that specifies the encryption used within this element. The saltValue attribute is a base64-encoded binary value that is randomly generated. The number of bytes required to decode the saltValue attribute MUST be equal to the value of the saltSize attribute.</xs:documentation>
</xs:annotation>
<xs:attribute name="saltSize" type="ST_SaltSize" use="required"/>
<xs:attribute name="blockSize" type="ST_BlockSize" use="required"/>
<xs:attribute name="keyBits" type="ST_KeyBits" use="required"/>
<xs:attribute name="hashSize" type="ST_HashSize" use="required"/>
<xs:attribute name="cipherAlgorithm" type="ST_CipherAlgorithm" use="required"/>
<xs:attribute name="cipherChaining" type="ST_CipherChaining" use="required"/>
<xs:attribute name="hashAlgorithm" type="ST_HashAlgorithm" use="required"/>
<xs:attribute name="saltValue" type="xs:base64Binary" use="required"/>
</xs:complexType>
<xs:complexType name="CT_DataIntegrity">
<xs:annotation>
<xs:documentation>A complex type that specifies data used to verify whether the encrypted data passes an integrity check. It MUST be generated using the method specified in section 2.3.4.14 (http://msdn.microsoft.com/en-us/library/dd924068(v=office.12).aspx).</xs:documentation>
</xs:annotation>
<xs:attribute name="encryptedHmacKey" type="xs:base64Binary" use="required">
<xs:annotation>
<xs:documentation>A base64-encoded value that specifies an encrypted key used in calculating the encryptedHmacValue.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="encryptedHmacValue" type="xs:base64Binary" use="required">
<xs:annotation>
<xs:documentation>A base64-encoded value that specifies an HMAC derived from encryptedHmacKey and the encrypted data.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="CT_KeyEncryptor">
<xs:annotation>
<xs:appinfo>modified for POI</xs:appinfo>
<xs:documentation>A complex type that specifies the parameters used to encrypt an intermediate key, which is used to perform the final encryption of the document. To ensure extensibility, arbitrary elements can be defined to encrypt the intermediate key. The intermediate key MUST be the same for all KeyEncryptor elements.</xs:documentation>
</xs:annotation>
<xs:choice>
<xs:element ref="p:encryptedKey"/>
<xs:element ref="c:encryptedKey"/>
</xs:choice>
<xs:attribute name="uri">
<xs:annotation>
<xs:appinfo>modified for POI</xs:appinfo>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="http://schemas.microsoft.com/office/2006/keyEncryptor/password"/>
<xs:enumeration value="http://schemas.microsoft.com/office/2006/keyEncryptor/certificate"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
<xs:complexType name="CT_KeyEncryptors">
<xs:annotation>
<xs:documentation>A sequence of KeyEncryptor elements. Exactly one KeyEncryptors element MUST be present, and the KeyEncryptors element MUST contain at least one KeyEncryptor.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="keyEncryptor" type="CT_KeyEncryptor" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="CT_Encryption">
<xs:sequence>
<xs:element name="keyData" type="CT_KeyData"/>
<xs:element name="dataIntegrity" type="CT_DataIntegrity">
<xs:annotation>
<xs:appinfo>modified for POI</xs:appinfo>
<xs:documentation>All ECMA-376 documents [ECMA-376] encrypted by Microsoft Office using agile encryption will have a DataIntegrity element present. The schema allows for a DataIntegrity element to not be present because the encryption schema can be used by applications that do not create ECMA-376 documents [ECMA-376].</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="keyEncryptors" type="CT_KeyEncryptors">
<xs:annotation>
<xs:documentation>The KeyEncryptor element, which MUST be used when encrypting password-protected agile encryption documents, is either a PasswordKeyEncryptor or a CertificateKeyEncryptor. Exactly one PasswordKeyEncryptor MUST be present. Zero or more CertificateKeyEncryptor elements are contained within the KeyEncryptors element.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:element name="encryption" type="CT_Encryption"/>
</xs:schema>

View File

@ -1,25 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
====================================================================
-->
<xb:config xmlns:xb="http://xml.apache.org/xmlbeans/2004/02/xbean/config" xmlns:c="http://schemas.microsoft.com/office/2006/keyEncryptor/certificate" xmlns:p="http://schemas.microsoft.com/office/2006/keyEncryptor/password">
<xb:qname name="c:encryptedKey" javaname="EncryptedCertificateKey"/>
<xb:qname name="p:encryptedKey" javaname="EncryptedPasswordKey"/>
<?xml version="1.0" encoding="UTF-8"?>
<!--
====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
====================================================================
-->
<xb:config xmlns:xb="http://xml.apache.org/xmlbeans/2004/02/xbean/config" xmlns:c="http://schemas.microsoft.com/office/2006/keyEncryptor/certificate" xmlns:p="http://schemas.microsoft.com/office/2006/keyEncryptor/password">
<xb:qname name="c:encryptedKey" javaname="EncryptedCertificateKey"/>
<xb:qname name="p:encryptedKey" javaname="EncryptedPasswordKey"/>
</xb:config>

View File

@ -1,66 +1,66 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
====================================================================
-->
<xs:schema xmlns="http://schemas.microsoft.com/office/2006/keyEncryptor/password" xmlns:e="http://schemas.microsoft.com/office/2006/encryption" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://schemas.microsoft.com/office/2006/keyEncryptor/password" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:import namespace="http://schemas.microsoft.com/office/2006/encryption" schemaLocation="encryptionInfo.xsd"/>
<xs:simpleType name="ST_PasswordKeyEncryptorUri">
<xs:restriction base="xs:token">
<xs:enumeration value="http://schemas.microsoft.com/office/2006/keyEncryptor/password"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="CT_PasswordKeyEncryptor">
<xs:attribute name="saltSize" type="e:ST_SaltSize" use="required">
<xs:annotation><xs:documentation>A SaltSize that specifies the size of the salt for a PasswordKeyEncryptor.</xs:documentation></xs:annotation>
</xs:attribute>
<xs:attribute name="blockSize" type="e:ST_BlockSize" use="required">
<xs:annotation><xs:documentation>A BlockSize that specifies the block size for a PasswordKeyEncryptor.</xs:documentation></xs:annotation>
</xs:attribute>
<xs:attribute name="keyBits" type="e:ST_KeyBits" use="required">
<xs:annotation><xs:documentation>A KeyBits that specifies the number of bits for a PasswordKeyEncryptor.</xs:documentation></xs:annotation>
</xs:attribute>
<xs:attribute name="hashSize" type="e:ST_HashSize" use="required">
<xs:annotation><xs:documentation>A HashSize that specifies the size of the binary form of the hash for a PasswordKeyEncryptor.</xs:documentation></xs:annotation>
</xs:attribute>
<xs:attribute name="cipherAlgorithm" type="e:ST_CipherAlgorithm" use="required">
<xs:annotation><xs:documentation>A CipherAlgorithm that specifies the cipher algorithm for a PasswordKeyEncryptor. The cipher algorithm specified MUST be the same as the cipher algorithm specified for the Encryption.keyData element.</xs:documentation></xs:annotation>
</xs:attribute>
<xs:attribute name="cipherChaining" type="e:ST_CipherChaining" use="required">
<xs:annotation><xs:documentation>A CipherChaining that specifies the cipher chaining mode for a PasswordKeyEncryptor.</xs:documentation></xs:annotation>
</xs:attribute>
<xs:attribute name="hashAlgorithm" type="e:ST_HashAlgorithm" use="required">
<xs:annotation><xs:documentation>A HashAlgorithm that specifies the hashing algorithm for a PasswordKeyEncryptor. The hashing algorithm specified MUST be the same as the hashing algorithm specified for the Encryption.keyData element.</xs:documentation></xs:annotation>
</xs:attribute>
<xs:attribute name="saltValue" type="xs:base64Binary" use="required">
<xs:annotation><xs:documentation>A base64-encoded binary byte array that specifies the salt value for a PasswordKeyEncryptor. The number of bytes required by the decoded form of this element MUST be saltSize.</xs:documentation></xs:annotation>
</xs:attribute>
<xs:attribute name="spinCount" type="e:ST_SpinCount" use="required">
<xs:annotation><xs:documentation>A SpinCount that specifies the spin count for a PasswordKeyEncryptor.</xs:documentation></xs:annotation>
</xs:attribute>
<xs:attribute name="encryptedVerifierHashInput" type="xs:base64Binary" use="required">
<xs:annotation><xs:documentation>A base64-encoded value that specifies the encrypted verifier hash input for a PasswordKeyEncryptor used in password verification.</xs:documentation></xs:annotation>
</xs:attribute>
<xs:attribute name="encryptedVerifierHashValue" type="xs:base64Binary" use="required">
<xs:annotation><xs:documentation>A base64-encoded value that specifies the encrypted verifier hash value for a PasswordKeyEncryptor used in password verification.</xs:documentation></xs:annotation>
</xs:attribute>
<xs:attribute name="encryptedKeyValue" type="xs:base64Binary" use="required">
<xs:annotation><xs:documentation>A base64-encoded value that specifies the encrypted form of the intermediate key.</xs:documentation></xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:element name="encryptedKey" type="CT_PasswordKeyEncryptor"/>
</xs:schema>
<?xml version="1.0" encoding="utf-8"?>
<!--
====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
====================================================================
-->
<xs:schema xmlns="http://schemas.microsoft.com/office/2006/keyEncryptor/password" xmlns:e="http://schemas.microsoft.com/office/2006/encryption" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://schemas.microsoft.com/office/2006/keyEncryptor/password" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:import namespace="http://schemas.microsoft.com/office/2006/encryption" schemaLocation="encryptionInfo.xsd"/>
<xs:simpleType name="ST_PasswordKeyEncryptorUri">
<xs:restriction base="xs:token">
<xs:enumeration value="http://schemas.microsoft.com/office/2006/keyEncryptor/password"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="CT_PasswordKeyEncryptor">
<xs:attribute name="saltSize" type="e:ST_SaltSize" use="required">
<xs:annotation><xs:documentation>A SaltSize that specifies the size of the salt for a PasswordKeyEncryptor.</xs:documentation></xs:annotation>
</xs:attribute>
<xs:attribute name="blockSize" type="e:ST_BlockSize" use="required">
<xs:annotation><xs:documentation>A BlockSize that specifies the block size for a PasswordKeyEncryptor.</xs:documentation></xs:annotation>
</xs:attribute>
<xs:attribute name="keyBits" type="e:ST_KeyBits" use="required">
<xs:annotation><xs:documentation>A KeyBits that specifies the number of bits for a PasswordKeyEncryptor.</xs:documentation></xs:annotation>
</xs:attribute>
<xs:attribute name="hashSize" type="e:ST_HashSize" use="required">
<xs:annotation><xs:documentation>A HashSize that specifies the size of the binary form of the hash for a PasswordKeyEncryptor.</xs:documentation></xs:annotation>
</xs:attribute>
<xs:attribute name="cipherAlgorithm" type="e:ST_CipherAlgorithm" use="required">
<xs:annotation><xs:documentation>A CipherAlgorithm that specifies the cipher algorithm for a PasswordKeyEncryptor. The cipher algorithm specified MUST be the same as the cipher algorithm specified for the Encryption.keyData element.</xs:documentation></xs:annotation>
</xs:attribute>
<xs:attribute name="cipherChaining" type="e:ST_CipherChaining" use="required">
<xs:annotation><xs:documentation>A CipherChaining that specifies the cipher chaining mode for a PasswordKeyEncryptor.</xs:documentation></xs:annotation>
</xs:attribute>
<xs:attribute name="hashAlgorithm" type="e:ST_HashAlgorithm" use="required">
<xs:annotation><xs:documentation>A HashAlgorithm that specifies the hashing algorithm for a PasswordKeyEncryptor. The hashing algorithm specified MUST be the same as the hashing algorithm specified for the Encryption.keyData element.</xs:documentation></xs:annotation>
</xs:attribute>
<xs:attribute name="saltValue" type="xs:base64Binary" use="required">
<xs:annotation><xs:documentation>A base64-encoded binary byte array that specifies the salt value for a PasswordKeyEncryptor. The number of bytes required by the decoded form of this element MUST be saltSize.</xs:documentation></xs:annotation>
</xs:attribute>
<xs:attribute name="spinCount" type="e:ST_SpinCount" use="required">
<xs:annotation><xs:documentation>A SpinCount that specifies the spin count for a PasswordKeyEncryptor.</xs:documentation></xs:annotation>
</xs:attribute>
<xs:attribute name="encryptedVerifierHashInput" type="xs:base64Binary" use="required">
<xs:annotation><xs:documentation>A base64-encoded value that specifies the encrypted verifier hash input for a PasswordKeyEncryptor used in password verification.</xs:documentation></xs:annotation>
</xs:attribute>
<xs:attribute name="encryptedVerifierHashValue" type="xs:base64Binary" use="required">
<xs:annotation><xs:documentation>A base64-encoded value that specifies the encrypted verifier hash value for a PasswordKeyEncryptor used in password verification.</xs:documentation></xs:annotation>
</xs:attribute>
<xs:attribute name="encryptedKeyValue" type="xs:base64Binary" use="required">
<xs:annotation><xs:documentation>A base64-encoded value that specifies the encrypted form of the intermediate key.</xs:documentation></xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:element name="encryptedKey" type="CT_PasswordKeyEncryptor"/>
</xs:schema>

View File

@ -1,24 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
====================================================================
-->
<xb:config xmlns:xb="http://xml.apache.org/xmlbeans/2004/02/xbean/config" xmlns:p="http://schemas.microsoft.com/office/2006/keyEncryptor/password">
<xb:qname name="p:encryptedKey" javaname="EncryptedPasswordKey"/>
<?xml version="1.0" encoding="UTF-8"?>
<!--
====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
====================================================================
-->
<xb:config xmlns:xb="http://xml.apache.org/xmlbeans/2004/02/xbean/config" xmlns:p="http://schemas.microsoft.com/office/2006/keyEncryptor/password">
<xb:qname name="p:encryptedKey" javaname="EncryptedPasswordKey"/>
</xb:config>

View File

@ -1,103 +1,103 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
====================================================================
-->
<xsd:schema targetNamespace="http://schemas.microsoft.com/office/2006/digsig" elementFormDefault="qualified" xmlns="http://schemas.microsoft.com/office/2006/digsig" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:simpleType name="ST_PositiveInteger">
<xsd:restriction base="xsd:int">
<xsd:minExclusive value="0"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ST_SignatureComments">
<xsd:restriction base="xsd:string">
<xsd:maxLength value="255"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ST_SignatureProviderUrl">
<xsd:restriction base="xsd:string">
<xsd:maxLength value="2083"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ST_SignatureText">
<xsd:restriction base="xsd:string">
<xsd:maxLength value="100"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ST_SignatureType">
<xsd:restriction base="xsd:int">
<xsd:enumeration value="1"/>
<xsd:enumeration value="2"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ST_Version">
<xsd:restriction base="xsd:string">
<xsd:maxLength value="64"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ST_UniqueIdentifierWithBraces">
<xsd:restriction base="xsd:string">
<xsd:pattern value="\{[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}\}|"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:group name="EG_RequiredChildren">
<xsd:sequence>
<xsd:element name="SetupID" type="ST_UniqueIdentifierWithBraces"/>
<xsd:element name="SignatureText" type="ST_SignatureText"/>
<xsd:element name="SignatureImage" type="xsd:base64Binary"/>
<xsd:element name="SignatureComments" type="ST_SignatureComments"/>
<xsd:element name="WindowsVersion" type="ST_Version"/>
<xsd:element name="OfficeVersion" type="ST_Version"/>
<xsd:element name="ApplicationVersion" type="ST_Version"/>
<xsd:element name="Monitors" type="ST_PositiveInteger"/>
<xsd:element name="HorizontalResolution" type="ST_PositiveInteger"/>
<xsd:element name="VerticalResolution" type="ST_PositiveInteger"/>
<xsd:element name="ColorDepth" type="ST_PositiveInteger"/>
<xsd:element name="SignatureProviderId" type="ST_UniqueIdentifierWithBraces"/>
<xsd:element name="SignatureProviderUrl" type="ST_SignatureProviderUrl"/>
<xsd:element name="SignatureProviderDetails" type="xsd:int"/>
<xsd:element name="SignatureType" type="ST_SignatureType"/>
</xsd:sequence>
</xsd:group>
<xsd:group name="EG_OptionalChildren">
<xsd:sequence>
<xsd:element name="DelegateSuggestedSigner" type="xsd:string"/>
<xsd:element name="DelegateSuggestedSigner2" type="xsd:string"/>
<xsd:element name="DelegateSuggestedSignerEmail" type="xsd:string"/>
<xsd:element name="ManifestHashAlgorithm" type="xsd:anyURI" minOccurs="0"/>
</xsd:sequence>
</xsd:group>
<xsd:group name="EG_OptionalChildrenV2">
<xsd:sequence>
<xsd:element name="Address1" type="xsd:string"/>
<xsd:element name="Address2" type="xsd:string"/>
</xsd:sequence>
</xsd:group>
<xsd:complexType name="CT_SignatureInfoV1">
<xsd:sequence>
<xsd:group ref="EG_RequiredChildren"/>
<xsd:group ref="EG_OptionalChildren" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_SignatureInfoV2">
<xsd:sequence>
<xsd:group ref="EG_OptionalChildrenV2" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="SignatureInfoV1" type="CT_SignatureInfoV1"/>
<xsd:element name="SignatureInfoV2" type="CT_SignatureInfoV2"/>
<?xml version="1.0" encoding="utf-8"?>
<!--
====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
====================================================================
-->
<xsd:schema targetNamespace="http://schemas.microsoft.com/office/2006/digsig" elementFormDefault="qualified" xmlns="http://schemas.microsoft.com/office/2006/digsig" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:simpleType name="ST_PositiveInteger">
<xsd:restriction base="xsd:int">
<xsd:minExclusive value="0"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ST_SignatureComments">
<xsd:restriction base="xsd:string">
<xsd:maxLength value="255"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ST_SignatureProviderUrl">
<xsd:restriction base="xsd:string">
<xsd:maxLength value="2083"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ST_SignatureText">
<xsd:restriction base="xsd:string">
<xsd:maxLength value="100"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ST_SignatureType">
<xsd:restriction base="xsd:int">
<xsd:enumeration value="1"/>
<xsd:enumeration value="2"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ST_Version">
<xsd:restriction base="xsd:string">
<xsd:maxLength value="64"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ST_UniqueIdentifierWithBraces">
<xsd:restriction base="xsd:string">
<xsd:pattern value="\{[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}\}|"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:group name="EG_RequiredChildren">
<xsd:sequence>
<xsd:element name="SetupID" type="ST_UniqueIdentifierWithBraces"/>
<xsd:element name="SignatureText" type="ST_SignatureText"/>
<xsd:element name="SignatureImage" type="xsd:base64Binary"/>
<xsd:element name="SignatureComments" type="ST_SignatureComments"/>
<xsd:element name="WindowsVersion" type="ST_Version"/>
<xsd:element name="OfficeVersion" type="ST_Version"/>
<xsd:element name="ApplicationVersion" type="ST_Version"/>
<xsd:element name="Monitors" type="ST_PositiveInteger"/>
<xsd:element name="HorizontalResolution" type="ST_PositiveInteger"/>
<xsd:element name="VerticalResolution" type="ST_PositiveInteger"/>
<xsd:element name="ColorDepth" type="ST_PositiveInteger"/>
<xsd:element name="SignatureProviderId" type="ST_UniqueIdentifierWithBraces"/>
<xsd:element name="SignatureProviderUrl" type="ST_SignatureProviderUrl"/>
<xsd:element name="SignatureProviderDetails" type="xsd:int"/>
<xsd:element name="SignatureType" type="ST_SignatureType"/>
</xsd:sequence>
</xsd:group>
<xsd:group name="EG_OptionalChildren">
<xsd:sequence>
<xsd:element name="DelegateSuggestedSigner" type="xsd:string"/>
<xsd:element name="DelegateSuggestedSigner2" type="xsd:string"/>
<xsd:element name="DelegateSuggestedSignerEmail" type="xsd:string"/>
<xsd:element name="ManifestHashAlgorithm" type="xsd:anyURI" minOccurs="0"/>
</xsd:sequence>
</xsd:group>
<xsd:group name="EG_OptionalChildrenV2">
<xsd:sequence>
<xsd:element name="Address1" type="xsd:string"/>
<xsd:element name="Address2" type="xsd:string"/>
</xsd:sequence>
</xsd:group>
<xsd:complexType name="CT_SignatureInfoV1">
<xsd:sequence>
<xsd:group ref="EG_RequiredChildren"/>
<xsd:group ref="EG_OptionalChildren" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_SignatureInfoV2">
<xsd:sequence>
<xsd:group ref="EG_OptionalChildrenV2" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="SignatureInfoV1" type="CT_SignatureInfoV1"/>
<xsd:element name="SignatureInfoV2" type="CT_SignatureInfoV2"/>
</xsd:schema>

View File

@ -1,466 +1,466 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://uri.etsi.org/01903/v1.3.2#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://uri.etsi.org/01903/v1.3.2#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" elementFormDefault="qualified">
<xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd"/>
<!-- Start auxiliary types definitions: AnyType, ObjectIdentifierType,
EncapsulatedPKIDataType and containers for time-stamp tokens -->
<!-- Start AnyType -->
<xsd:element name="Any" type="AnyType"/>
<xsd:complexType name="AnyType" mixed="true">
<xsd:sequence minOccurs="0" maxOccurs="unbounded">
<xsd:any namespace="##any" processContents="lax"/>
</xsd:sequence>
<xsd:anyAttribute namespace="##any"/>
</xsd:complexType>
<!-- End AnyType -->
<!-- Start ObjectIdentifierType-->
<xsd:element name="ObjectIdentifier" type="ObjectIdentifierType"/>
<xsd:complexType name="ObjectIdentifierType">
<xsd:sequence>
<xsd:element name="Identifier" type="IdentifierType"/>
<xsd:element name="Description" type="xsd:string" minOccurs="0"/>
<xsd:element name="DocumentationReferences" type="DocumentationReferencesType" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="IdentifierType">
<xsd:simpleContent>
<xsd:extension base="xsd:anyURI">
<xsd:attribute name="Qualifier" type="QualifierType" use="optional"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:simpleType name="QualifierType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="OIDAsURI"/>
<xsd:enumeration value="OIDAsURN"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="DocumentationReferencesType">
<xsd:sequence maxOccurs="unbounded">
<xsd:element name="DocumentationReference" type="xsd:anyURI"/>
</xsd:sequence>
</xsd:complexType>
<!-- End ObjectIdentifierType-->
<!-- Start EncapsulatedPKIDataType-->
<xsd:element name="EncapsulatedPKIData" type="EncapsulatedPKIDataType"/>
<xsd:complexType name="EncapsulatedPKIDataType">
<xsd:simpleContent>
<xsd:extension base="xsd:base64Binary">
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
<xsd:attribute name="Encoding" type="xsd:anyURI" use="optional"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<!-- End EncapsulatedPKIDataType -->
<!-- Start time-stamp containers types -->
<!-- Start GenericTimeStampType -->
<xsd:element name="Include" type="IncludeType"/>
<xsd:complexType name="IncludeType">
<xsd:attribute name="URI" type="xsd:anyURI" use="required"/>
<xsd:attribute name="referencedData" type="xsd:boolean" use="optional"/>
</xsd:complexType>
<xsd:element name="ReferenceInfo" type="ReferenceInfoType"/>
<xsd:complexType name="ReferenceInfoType">
<xsd:sequence>
<xsd:element ref="ds:DigestMethod"/>
<xsd:element ref="ds:DigestValue"/>
</xsd:sequence>
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
<xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
</xsd:complexType>
<xsd:complexType name="GenericTimeStampType" abstract="true">
<xsd:sequence>
<xsd:choice minOccurs="0">
<xsd:element ref="Include" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="ReferenceInfo" maxOccurs="unbounded"/>
</xsd:choice>
<xsd:element ref="ds:CanonicalizationMethod" minOccurs="0"/>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="EncapsulatedTimeStamp" type="EncapsulatedPKIDataType"/>
<xsd:element name="XMLTimeStamp" type="AnyType"/>
</xsd:choice>
</xsd:sequence>
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
</xsd:complexType>
<!-- End GenericTimeStampType -->
<!-- Start XAdESTimeStampType -->
<xsd:element name="XAdESTimeStamp" type="XAdESTimeStampType"/>
<xsd:complexType name="XAdESTimeStampType">
<xsd:complexContent>
<xsd:restriction base="GenericTimeStampType">
<xsd:sequence>
<xsd:element ref="Include" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="ds:CanonicalizationMethod" minOccurs="0"/>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="EncapsulatedTimeStamp" type="EncapsulatedPKIDataType"/>
<xsd:element name="XMLTimeStamp" type="AnyType"/>
</xsd:choice>
</xsd:sequence>
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
<!-- End XAdESTimeStampType -->
<!-- Start OtherTimeStampType -->
<xsd:element name="OtherTimeStamp" type="OtherTimeStampType"/>
<xsd:complexType name="OtherTimeStampType">
<xsd:complexContent>
<xsd:restriction base="GenericTimeStampType">
<xsd:sequence>
<xsd:element ref="ReferenceInfo" maxOccurs="unbounded"/>
<xsd:element ref="ds:CanonicalizationMethod" minOccurs="0"/>
<xsd:choice>
<xsd:element name="EncapsulatedTimeStamp" type="EncapsulatedPKIDataType"/>
<xsd:element name="XMLTimeStamp" type="AnyType"/>
</xsd:choice>
</xsd:sequence>
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
<!-- End OtherTimeStampType -->
<!-- End time-stamp containers types -->
<!-- End auxiliary types definitions-->
<!-- Start container types -->
<!-- Start QualifyingProperties -->
<xsd:element name="QualifyingProperties" type="QualifyingPropertiesType"/>
<xsd:complexType name="QualifyingPropertiesType">
<xsd:sequence>
<xsd:element name="SignedProperties" type="SignedPropertiesType" minOccurs="0"/>
<xsd:element name="UnsignedProperties" type="UnsignedPropertiesType" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="Target" type="xsd:anyURI" use="required"/>
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
</xsd:complexType>
<!-- End QualifyingProperties -->
<!-- Start SignedProperties-->
<xsd:element name="SignedProperties" type="SignedPropertiesType"/>
<xsd:complexType name="SignedPropertiesType">
<xsd:sequence>
<xsd:element name="SignedSignatureProperties" type="SignedSignaturePropertiesType" minOccurs="0"/>
<xsd:element name="SignedDataObjectProperties" type="SignedDataObjectPropertiesType" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
</xsd:complexType>
<!-- End SignedProperties-->
<!-- Start UnsignedProperties-->
<xsd:element name="UnsignedProperties" type="UnsignedPropertiesType"/>
<xsd:complexType name="UnsignedPropertiesType">
<xsd:sequence>
<xsd:element name="UnsignedSignatureProperties" type="UnsignedSignaturePropertiesType" minOccurs="0"/>
<xsd:element name="UnsignedDataObjectProperties" type="UnsignedDataObjectPropertiesType" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
</xsd:complexType>
<!-- End UnsignedProperties-->
<!-- Start SignedSignatureProperties-->
<xsd:element name="SignedSignatureProperties" type="SignedSignaturePropertiesType"/>
<xsd:complexType name="SignedSignaturePropertiesType">
<xsd:sequence>
<xsd:element name="SigningTime" type="xsd:dateTime" minOccurs="0"/>
<xsd:element name="SigningCertificate" type="CertIDListType" minOccurs="0"/>
<xsd:element name="SignaturePolicyIdentifier" type="SignaturePolicyIdentifierType" minOccurs="0"/>
<xsd:element name="SignatureProductionPlace" type="SignatureProductionPlaceType" minOccurs="0"/>
<xsd:element name="SignerRole" type="SignerRoleType" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
</xsd:complexType>
<!-- End SignedSignatureProperties-->
<!-- Start SignedDataObjectProperties-->
<xsd:element name="SignedDataObjectProperties" type="SignedDataObjectPropertiesType"/>
<xsd:complexType name="SignedDataObjectPropertiesType">
<xsd:sequence>
<xsd:element name="DataObjectFormat" type="DataObjectFormatType" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="CommitmentTypeIndication" type="CommitmentTypeIndicationType" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="AllDataObjectsTimeStamp" type="XAdESTimeStampType" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="IndividualDataObjectsTimeStamp" type="XAdESTimeStampType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
</xsd:complexType>
<!-- End SignedDataObjectProperties-->
<!-- Start UnsignedSignatureProperties-->
<xsd:element name="UnsignedSignatureProperties" type="UnsignedSignaturePropertiesType"/>
<xsd:complexType name="UnsignedSignaturePropertiesType">
<xsd:choice maxOccurs="unbounded">
<xsd:element name="CounterSignature" type="CounterSignatureType"/>
<xsd:element name="SignatureTimeStamp" type="XAdESTimeStampType"/>
<xsd:element name="CompleteCertificateRefs" type="CompleteCertificateRefsType"/>
<xsd:element name="CompleteRevocationRefs" type="CompleteRevocationRefsType"/>
<xsd:element name="AttributeCertificateRefs" type="CompleteCertificateRefsType"/>
<xsd:element name="AttributeRevocationRefs" type="CompleteRevocationRefsType"/>
<xsd:element name="SigAndRefsTimeStamp" type="XAdESTimeStampType"/>
<xsd:element name="RefsOnlyTimeStamp" type="XAdESTimeStampType"/>
<xsd:element name="CertificateValues" type="CertificateValuesType"/>
<xsd:element name="RevocationValues" type="RevocationValuesType"/>
<xsd:element name="AttrAuthoritiesCertValues" type="CertificateValuesType"/>
<xsd:element name="AttributeRevocationValues" type="RevocationValuesType"/>
<xsd:element name="ArchiveTimeStamp" type="XAdESTimeStampType"/>
<xsd:any namespace="##other"/>
</xsd:choice>
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
</xsd:complexType>
<!-- End UnsignedSignatureProperties-->
<!-- Start UnsignedDataObjectProperties-->
<xsd:element name="UnsignedDataObjectProperties" type="UnsignedDataObjectPropertiesType"/>
<xsd:complexType name="UnsignedDataObjectPropertiesType">
<xsd:sequence>
<xsd:element name="UnsignedDataObjectProperty" type="AnyType" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
</xsd:complexType>
<!-- End UnsignedDataObjectProperties-->
<!-- Start QualifyingPropertiesReference-->
<xsd:element name="QualifyingPropertiesReference" type="QualifyingPropertiesReferenceType"/>
<xsd:complexType name="QualifyingPropertiesReferenceType">
<xsd:attribute name="URI" type="xsd:anyURI" use="required"/>
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
</xsd:complexType>
<!-- End QualifyingPropertiesReference-->
<!-- End container types -->
<!-- Start SigningTime element -->
<xsd:element name="SigningTime" type="xsd:dateTime"/>
<!-- End SigningTime element -->
<!-- Start SigningCertificate -->
<xsd:element name="SigningCertificate" type="CertIDListType"/>
<xsd:complexType name="CertIDListType">
<xsd:sequence>
<xsd:element name="Cert" type="CertIDType" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CertIDType">
<xsd:sequence>
<xsd:element name="CertDigest" type="DigestAlgAndValueType"/>
<xsd:element name="IssuerSerial" type="ds:X509IssuerSerialType"/>
</xsd:sequence>
<xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
</xsd:complexType>
<xsd:complexType name="DigestAlgAndValueType">
<xsd:sequence>
<xsd:element ref="ds:DigestMethod"/>
<xsd:element ref="ds:DigestValue"/>
</xsd:sequence>
</xsd:complexType>
<!-- End SigningCertificate -->
<!-- Start SignaturePolicyIdentifier -->
<xsd:element name="SignaturePolicyIdentifier" type="SignaturePolicyIdentifierType"/>
<xsd:complexType name="SignaturePolicyIdentifierType">
<xsd:choice>
<xsd:element name="SignaturePolicyId" type="SignaturePolicyIdType"/>
<xsd:element name="SignaturePolicyImplied"/>
</xsd:choice>
</xsd:complexType>
<xsd:complexType name="SignaturePolicyIdType">
<xsd:sequence>
<xsd:element name="SigPolicyId" type="ObjectIdentifierType"/>
<xsd:element ref="ds:Transforms" minOccurs="0"/>
<xsd:element name="SigPolicyHash" type="DigestAlgAndValueType"/>
<xsd:element name="SigPolicyQualifiers" type="SigPolicyQualifiersListType" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="SigPolicyQualifiersListType">
<xsd:sequence>
<xsd:element name="SigPolicyQualifier" type="AnyType" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="SPURI" type="xsd:anyURI"/>
<xsd:element name="SPUserNotice" type="SPUserNoticeType"/>
<xsd:complexType name="SPUserNoticeType">
<xsd:sequence>
<xsd:element name="NoticeRef" type="NoticeReferenceType" minOccurs="0"/>
<xsd:element name="ExplicitText" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="NoticeReferenceType">
<xsd:sequence>
<xsd:element name="Organization" type="xsd:string"/>
<xsd:element name="NoticeNumbers" type="IntegerListType"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="IntegerListType">
<xsd:sequence>
<xsd:element name="int" type="xsd:integer" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<!-- End SignaturePolicyIdentifier -->
<!-- Start CounterSignature -->
<xsd:element name="CounterSignature" type="CounterSignatureType"/>
<xsd:complexType name="CounterSignatureType">
<xsd:sequence>
<xsd:element ref="ds:Signature"/>
</xsd:sequence>
</xsd:complexType>
<!-- End CounterSignature -->
<!-- Start DataObjectFormat -->
<xsd:element name="DataObjectFormat" type="DataObjectFormatType"/>
<xsd:complexType name="DataObjectFormatType">
<xsd:sequence>
<xsd:element name="Description" type="xsd:string" minOccurs="0"/>
<xsd:element name="ObjectIdentifier" type="ObjectIdentifierType" minOccurs="0"/>
<xsd:element name="MimeType" type="xsd:string" minOccurs="0"/>
<xsd:element name="Encoding" type="xsd:anyURI" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="ObjectReference" type="xsd:anyURI" use="required"/>
</xsd:complexType>
<!-- End DataObjectFormat -->
<!-- Start CommitmentTypeIndication -->
<xsd:element name="CommitmentTypeIndication" type="CommitmentTypeIndicationType"/>
<xsd:complexType name="CommitmentTypeIndicationType">
<xsd:sequence>
<xsd:element name="CommitmentTypeId" type="ObjectIdentifierType"/>
<xsd:choice>
<xsd:element name="ObjectReference" type="xsd:anyURI" maxOccurs="unbounded"/>
<xsd:element name="AllSignedDataObjects"/>
</xsd:choice>
<xsd:element name="CommitmentTypeQualifiers" type="CommitmentTypeQualifiersListType" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CommitmentTypeQualifiersListType">
<xsd:sequence>
<xsd:element name="CommitmentTypeQualifier" type="AnyType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<!-- End CommitmentTypeIndication -->
<!-- Start SignatureProductionPlace -->
<xsd:element name="SignatureProductionPlace" type="SignatureProductionPlaceType"/>
<xsd:complexType name="SignatureProductionPlaceType">
<xsd:sequence>
<xsd:element name="City" type="xsd:string" minOccurs="0"/>
<xsd:element name="StateOrProvince" type="xsd:string" minOccurs="0"/>
<xsd:element name="PostalCode" type="xsd:string" minOccurs="0"/>
<xsd:element name="CountryName" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<!-- End SignatureProductionPlace -->
<!-- Start SignerRole -->
<xsd:element name="SignerRole" type="SignerRoleType"/>
<xsd:complexType name="SignerRoleType">
<xsd:sequence>
<xsd:element name="ClaimedRoles" type="ClaimedRolesListType" minOccurs="0"/>
<xsd:element name="CertifiedRoles" type="CertifiedRolesListType" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ClaimedRolesListType">
<xsd:sequence>
<xsd:element name="ClaimedRole" type="AnyType" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CertifiedRolesListType">
<xsd:sequence>
<xsd:element name="CertifiedRole" type="EncapsulatedPKIDataType" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<!-- End SignerRole -->
<xsd:element name="AllDataObjectsTimeStamp" type="XAdESTimeStampType"/>
<xsd:element name="IndividualDataObjectsTimeStamp" type="XAdESTimeStampType"/>
<xsd:element name="SignatureTimeStamp" type="XAdESTimeStampType"/>
<!-- Start CompleteCertificateRefs -->
<xsd:element name="CompleteCertificateRefs" type="CompleteCertificateRefsType"/>
<xsd:complexType name="CompleteCertificateRefsType">
<xsd:sequence>
<xsd:element name="CertRefs" type="CertIDListType"/>
</xsd:sequence>
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
</xsd:complexType>
<!-- End CompleteCertificateRefs -->
<!-- Start CompleteRevocationRefs-->
<xsd:element name="CompleteRevocationRefs" type="CompleteRevocationRefsType"/>
<xsd:complexType name="CompleteRevocationRefsType">
<xsd:sequence>
<xsd:element name="CRLRefs" type="CRLRefsType" minOccurs="0"/>
<xsd:element name="OCSPRefs" type="OCSPRefsType" minOccurs="0"/>
<xsd:element name="OtherRefs" type="OtherCertStatusRefsType" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
</xsd:complexType>
<xsd:complexType name="CRLRefsType">
<xsd:sequence>
<xsd:element name="CRLRef" type="CRLRefType" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CRLRefType">
<xsd:sequence>
<xsd:element name="DigestAlgAndValue" type="DigestAlgAndValueType"/>
<xsd:element name="CRLIdentifier" type="CRLIdentifierType" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CRLIdentifierType">
<xsd:sequence>
<xsd:element name="Issuer" type="xsd:string"/>
<xsd:element name="IssueTime" type="xsd:dateTime"/>
<xsd:element name="Number" type="xsd:integer" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
</xsd:complexType>
<xsd:complexType name="OCSPRefsType">
<xsd:sequence>
<xsd:element name="OCSPRef" type="OCSPRefType" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="OCSPRefType">
<xsd:sequence>
<xsd:element name="OCSPIdentifier" type="OCSPIdentifierType"/>
<xsd:element name="DigestAlgAndValue" type="DigestAlgAndValueType" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ResponderIDType">
<xsd:choice>
<xsd:element name="ByName" type="xsd:string"/>
<xsd:element name="ByKey" type="xsd:base64Binary"/>
</xsd:choice>
</xsd:complexType>
<xsd:complexType name="OCSPIdentifierType">
<xsd:sequence>
<xsd:element name="ResponderID" type="ResponderIDType"/>
<xsd:element name="ProducedAt" type="xsd:dateTime"/>
</xsd:sequence>
<xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
</xsd:complexType>
<xsd:complexType name="OtherCertStatusRefsType">
<xsd:sequence>
<xsd:element name="OtherRef" type="AnyType" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<!-- End CompleteRevocationRefs-->
<xsd:element name="AttributeCertificateRefs" type="CompleteCertificateRefsType"/>
<xsd:element name="AttributeRevocationRefs" type="CompleteRevocationRefsType"/>
<xsd:element name="SigAndRefsTimeStamp" type="XAdESTimeStampType"/>
<xsd:element name="RefsOnlyTimeStamp" type="XAdESTimeStampType"/>
<!-- Start CertificateValues -->
<xsd:element name="CertificateValues" type="CertificateValuesType"/>
<xsd:complexType name="CertificateValuesType">
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="EncapsulatedX509Certificate" type="EncapsulatedPKIDataType"/>
<xsd:element name="OtherCertificate" type="AnyType"/>
</xsd:choice>
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
</xsd:complexType>
<!-- End CertificateValues -->
<!-- Start RevocationValues-->
<xsd:element name="RevocationValues" type="RevocationValuesType"/>
<xsd:complexType name="RevocationValuesType">
<xsd:sequence>
<xsd:element name="CRLValues" type="CRLValuesType" minOccurs="0"/>
<xsd:element name="OCSPValues" type="OCSPValuesType" minOccurs="0"/>
<xsd:element name="OtherValues" type="OtherCertStatusValuesType" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
</xsd:complexType>
<xsd:complexType name="CRLValuesType">
<xsd:sequence>
<xsd:element name="EncapsulatedCRLValue" type="EncapsulatedPKIDataType" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="OCSPValuesType">
<xsd:sequence>
<xsd:element name="EncapsulatedOCSPValue" type="EncapsulatedPKIDataType" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="OtherCertStatusValuesType">
<xsd:sequence>
<xsd:element name="OtherValue" type="AnyType" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<!-- End RevocationValues-->
<xsd:element name="AttrAuthoritiesCertValues" type="CertificateValuesType"/>
<xsd:element name="AttributeRevocationValues" type="RevocationValuesType"/>
<xsd:element name="ArchiveTimeStamp" type="XAdESTimeStampType"/>
</xsd:schema>
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://uri.etsi.org/01903/v1.3.2#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://uri.etsi.org/01903/v1.3.2#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" elementFormDefault="qualified">
<xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd"/>
<!-- Start auxiliary types definitions: AnyType, ObjectIdentifierType,
EncapsulatedPKIDataType and containers for time-stamp tokens -->
<!-- Start AnyType -->
<xsd:element name="Any" type="AnyType"/>
<xsd:complexType name="AnyType" mixed="true">
<xsd:sequence minOccurs="0" maxOccurs="unbounded">
<xsd:any namespace="##any" processContents="lax"/>
</xsd:sequence>
<xsd:anyAttribute namespace="##any"/>
</xsd:complexType>
<!-- End AnyType -->
<!-- Start ObjectIdentifierType-->
<xsd:element name="ObjectIdentifier" type="ObjectIdentifierType"/>
<xsd:complexType name="ObjectIdentifierType">
<xsd:sequence>
<xsd:element name="Identifier" type="IdentifierType"/>
<xsd:element name="Description" type="xsd:string" minOccurs="0"/>
<xsd:element name="DocumentationReferences" type="DocumentationReferencesType" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="IdentifierType">
<xsd:simpleContent>
<xsd:extension base="xsd:anyURI">
<xsd:attribute name="Qualifier" type="QualifierType" use="optional"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:simpleType name="QualifierType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="OIDAsURI"/>
<xsd:enumeration value="OIDAsURN"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="DocumentationReferencesType">
<xsd:sequence maxOccurs="unbounded">
<xsd:element name="DocumentationReference" type="xsd:anyURI"/>
</xsd:sequence>
</xsd:complexType>
<!-- End ObjectIdentifierType-->
<!-- Start EncapsulatedPKIDataType-->
<xsd:element name="EncapsulatedPKIData" type="EncapsulatedPKIDataType"/>
<xsd:complexType name="EncapsulatedPKIDataType">
<xsd:simpleContent>
<xsd:extension base="xsd:base64Binary">
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
<xsd:attribute name="Encoding" type="xsd:anyURI" use="optional"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<!-- End EncapsulatedPKIDataType -->
<!-- Start time-stamp containers types -->
<!-- Start GenericTimeStampType -->
<xsd:element name="Include" type="IncludeType"/>
<xsd:complexType name="IncludeType">
<xsd:attribute name="URI" type="xsd:anyURI" use="required"/>
<xsd:attribute name="referencedData" type="xsd:boolean" use="optional"/>
</xsd:complexType>
<xsd:element name="ReferenceInfo" type="ReferenceInfoType"/>
<xsd:complexType name="ReferenceInfoType">
<xsd:sequence>
<xsd:element ref="ds:DigestMethod"/>
<xsd:element ref="ds:DigestValue"/>
</xsd:sequence>
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
<xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
</xsd:complexType>
<xsd:complexType name="GenericTimeStampType" abstract="true">
<xsd:sequence>
<xsd:choice minOccurs="0">
<xsd:element ref="Include" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="ReferenceInfo" maxOccurs="unbounded"/>
</xsd:choice>
<xsd:element ref="ds:CanonicalizationMethod" minOccurs="0"/>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="EncapsulatedTimeStamp" type="EncapsulatedPKIDataType"/>
<xsd:element name="XMLTimeStamp" type="AnyType"/>
</xsd:choice>
</xsd:sequence>
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
</xsd:complexType>
<!-- End GenericTimeStampType -->
<!-- Start XAdESTimeStampType -->
<xsd:element name="XAdESTimeStamp" type="XAdESTimeStampType"/>
<xsd:complexType name="XAdESTimeStampType">
<xsd:complexContent>
<xsd:restriction base="GenericTimeStampType">
<xsd:sequence>
<xsd:element ref="Include" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="ds:CanonicalizationMethod" minOccurs="0"/>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="EncapsulatedTimeStamp" type="EncapsulatedPKIDataType"/>
<xsd:element name="XMLTimeStamp" type="AnyType"/>
</xsd:choice>
</xsd:sequence>
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
<!-- End XAdESTimeStampType -->
<!-- Start OtherTimeStampType -->
<xsd:element name="OtherTimeStamp" type="OtherTimeStampType"/>
<xsd:complexType name="OtherTimeStampType">
<xsd:complexContent>
<xsd:restriction base="GenericTimeStampType">
<xsd:sequence>
<xsd:element ref="ReferenceInfo" maxOccurs="unbounded"/>
<xsd:element ref="ds:CanonicalizationMethod" minOccurs="0"/>
<xsd:choice>
<xsd:element name="EncapsulatedTimeStamp" type="EncapsulatedPKIDataType"/>
<xsd:element name="XMLTimeStamp" type="AnyType"/>
</xsd:choice>
</xsd:sequence>
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
<!-- End OtherTimeStampType -->
<!-- End time-stamp containers types -->
<!-- End auxiliary types definitions-->
<!-- Start container types -->
<!-- Start QualifyingProperties -->
<xsd:element name="QualifyingProperties" type="QualifyingPropertiesType"/>
<xsd:complexType name="QualifyingPropertiesType">
<xsd:sequence>
<xsd:element name="SignedProperties" type="SignedPropertiesType" minOccurs="0"/>
<xsd:element name="UnsignedProperties" type="UnsignedPropertiesType" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="Target" type="xsd:anyURI" use="required"/>
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
</xsd:complexType>
<!-- End QualifyingProperties -->
<!-- Start SignedProperties-->
<xsd:element name="SignedProperties" type="SignedPropertiesType"/>
<xsd:complexType name="SignedPropertiesType">
<xsd:sequence>
<xsd:element name="SignedSignatureProperties" type="SignedSignaturePropertiesType" minOccurs="0"/>
<xsd:element name="SignedDataObjectProperties" type="SignedDataObjectPropertiesType" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
</xsd:complexType>
<!-- End SignedProperties-->
<!-- Start UnsignedProperties-->
<xsd:element name="UnsignedProperties" type="UnsignedPropertiesType"/>
<xsd:complexType name="UnsignedPropertiesType">
<xsd:sequence>
<xsd:element name="UnsignedSignatureProperties" type="UnsignedSignaturePropertiesType" minOccurs="0"/>
<xsd:element name="UnsignedDataObjectProperties" type="UnsignedDataObjectPropertiesType" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
</xsd:complexType>
<!-- End UnsignedProperties-->
<!-- Start SignedSignatureProperties-->
<xsd:element name="SignedSignatureProperties" type="SignedSignaturePropertiesType"/>
<xsd:complexType name="SignedSignaturePropertiesType">
<xsd:sequence>
<xsd:element name="SigningTime" type="xsd:dateTime" minOccurs="0"/>
<xsd:element name="SigningCertificate" type="CertIDListType" minOccurs="0"/>
<xsd:element name="SignaturePolicyIdentifier" type="SignaturePolicyIdentifierType" minOccurs="0"/>
<xsd:element name="SignatureProductionPlace" type="SignatureProductionPlaceType" minOccurs="0"/>
<xsd:element name="SignerRole" type="SignerRoleType" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
</xsd:complexType>
<!-- End SignedSignatureProperties-->
<!-- Start SignedDataObjectProperties-->
<xsd:element name="SignedDataObjectProperties" type="SignedDataObjectPropertiesType"/>
<xsd:complexType name="SignedDataObjectPropertiesType">
<xsd:sequence>
<xsd:element name="DataObjectFormat" type="DataObjectFormatType" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="CommitmentTypeIndication" type="CommitmentTypeIndicationType" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="AllDataObjectsTimeStamp" type="XAdESTimeStampType" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="IndividualDataObjectsTimeStamp" type="XAdESTimeStampType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
</xsd:complexType>
<!-- End SignedDataObjectProperties-->
<!-- Start UnsignedSignatureProperties-->
<xsd:element name="UnsignedSignatureProperties" type="UnsignedSignaturePropertiesType"/>
<xsd:complexType name="UnsignedSignaturePropertiesType">
<xsd:choice maxOccurs="unbounded">
<xsd:element name="CounterSignature" type="CounterSignatureType"/>
<xsd:element name="SignatureTimeStamp" type="XAdESTimeStampType"/>
<xsd:element name="CompleteCertificateRefs" type="CompleteCertificateRefsType"/>
<xsd:element name="CompleteRevocationRefs" type="CompleteRevocationRefsType"/>
<xsd:element name="AttributeCertificateRefs" type="CompleteCertificateRefsType"/>
<xsd:element name="AttributeRevocationRefs" type="CompleteRevocationRefsType"/>
<xsd:element name="SigAndRefsTimeStamp" type="XAdESTimeStampType"/>
<xsd:element name="RefsOnlyTimeStamp" type="XAdESTimeStampType"/>
<xsd:element name="CertificateValues" type="CertificateValuesType"/>
<xsd:element name="RevocationValues" type="RevocationValuesType"/>
<xsd:element name="AttrAuthoritiesCertValues" type="CertificateValuesType"/>
<xsd:element name="AttributeRevocationValues" type="RevocationValuesType"/>
<xsd:element name="ArchiveTimeStamp" type="XAdESTimeStampType"/>
<xsd:any namespace="##other"/>
</xsd:choice>
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
</xsd:complexType>
<!-- End UnsignedSignatureProperties-->
<!-- Start UnsignedDataObjectProperties-->
<xsd:element name="UnsignedDataObjectProperties" type="UnsignedDataObjectPropertiesType"/>
<xsd:complexType name="UnsignedDataObjectPropertiesType">
<xsd:sequence>
<xsd:element name="UnsignedDataObjectProperty" type="AnyType" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
</xsd:complexType>
<!-- End UnsignedDataObjectProperties-->
<!-- Start QualifyingPropertiesReference-->
<xsd:element name="QualifyingPropertiesReference" type="QualifyingPropertiesReferenceType"/>
<xsd:complexType name="QualifyingPropertiesReferenceType">
<xsd:attribute name="URI" type="xsd:anyURI" use="required"/>
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
</xsd:complexType>
<!-- End QualifyingPropertiesReference-->
<!-- End container types -->
<!-- Start SigningTime element -->
<xsd:element name="SigningTime" type="xsd:dateTime"/>
<!-- End SigningTime element -->
<!-- Start SigningCertificate -->
<xsd:element name="SigningCertificate" type="CertIDListType"/>
<xsd:complexType name="CertIDListType">
<xsd:sequence>
<xsd:element name="Cert" type="CertIDType" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CertIDType">
<xsd:sequence>
<xsd:element name="CertDigest" type="DigestAlgAndValueType"/>
<xsd:element name="IssuerSerial" type="ds:X509IssuerSerialType"/>
</xsd:sequence>
<xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
</xsd:complexType>
<xsd:complexType name="DigestAlgAndValueType">
<xsd:sequence>
<xsd:element ref="ds:DigestMethod"/>
<xsd:element ref="ds:DigestValue"/>
</xsd:sequence>
</xsd:complexType>
<!-- End SigningCertificate -->
<!-- Start SignaturePolicyIdentifier -->
<xsd:element name="SignaturePolicyIdentifier" type="SignaturePolicyIdentifierType"/>
<xsd:complexType name="SignaturePolicyIdentifierType">
<xsd:choice>
<xsd:element name="SignaturePolicyId" type="SignaturePolicyIdType"/>
<xsd:element name="SignaturePolicyImplied"/>
</xsd:choice>
</xsd:complexType>
<xsd:complexType name="SignaturePolicyIdType">
<xsd:sequence>
<xsd:element name="SigPolicyId" type="ObjectIdentifierType"/>
<xsd:element ref="ds:Transforms" minOccurs="0"/>
<xsd:element name="SigPolicyHash" type="DigestAlgAndValueType"/>
<xsd:element name="SigPolicyQualifiers" type="SigPolicyQualifiersListType" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="SigPolicyQualifiersListType">
<xsd:sequence>
<xsd:element name="SigPolicyQualifier" type="AnyType" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="SPURI" type="xsd:anyURI"/>
<xsd:element name="SPUserNotice" type="SPUserNoticeType"/>
<xsd:complexType name="SPUserNoticeType">
<xsd:sequence>
<xsd:element name="NoticeRef" type="NoticeReferenceType" minOccurs="0"/>
<xsd:element name="ExplicitText" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="NoticeReferenceType">
<xsd:sequence>
<xsd:element name="Organization" type="xsd:string"/>
<xsd:element name="NoticeNumbers" type="IntegerListType"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="IntegerListType">
<xsd:sequence>
<xsd:element name="int" type="xsd:integer" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<!-- End SignaturePolicyIdentifier -->
<!-- Start CounterSignature -->
<xsd:element name="CounterSignature" type="CounterSignatureType"/>
<xsd:complexType name="CounterSignatureType">
<xsd:sequence>
<xsd:element ref="ds:Signature"/>
</xsd:sequence>
</xsd:complexType>
<!-- End CounterSignature -->
<!-- Start DataObjectFormat -->
<xsd:element name="DataObjectFormat" type="DataObjectFormatType"/>
<xsd:complexType name="DataObjectFormatType">
<xsd:sequence>
<xsd:element name="Description" type="xsd:string" minOccurs="0"/>
<xsd:element name="ObjectIdentifier" type="ObjectIdentifierType" minOccurs="0"/>
<xsd:element name="MimeType" type="xsd:string" minOccurs="0"/>
<xsd:element name="Encoding" type="xsd:anyURI" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="ObjectReference" type="xsd:anyURI" use="required"/>
</xsd:complexType>
<!-- End DataObjectFormat -->
<!-- Start CommitmentTypeIndication -->
<xsd:element name="CommitmentTypeIndication" type="CommitmentTypeIndicationType"/>
<xsd:complexType name="CommitmentTypeIndicationType">
<xsd:sequence>
<xsd:element name="CommitmentTypeId" type="ObjectIdentifierType"/>
<xsd:choice>
<xsd:element name="ObjectReference" type="xsd:anyURI" maxOccurs="unbounded"/>
<xsd:element name="AllSignedDataObjects"/>
</xsd:choice>
<xsd:element name="CommitmentTypeQualifiers" type="CommitmentTypeQualifiersListType" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CommitmentTypeQualifiersListType">
<xsd:sequence>
<xsd:element name="CommitmentTypeQualifier" type="AnyType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<!-- End CommitmentTypeIndication -->
<!-- Start SignatureProductionPlace -->
<xsd:element name="SignatureProductionPlace" type="SignatureProductionPlaceType"/>
<xsd:complexType name="SignatureProductionPlaceType">
<xsd:sequence>
<xsd:element name="City" type="xsd:string" minOccurs="0"/>
<xsd:element name="StateOrProvince" type="xsd:string" minOccurs="0"/>
<xsd:element name="PostalCode" type="xsd:string" minOccurs="0"/>
<xsd:element name="CountryName" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<!-- End SignatureProductionPlace -->
<!-- Start SignerRole -->
<xsd:element name="SignerRole" type="SignerRoleType"/>
<xsd:complexType name="SignerRoleType">
<xsd:sequence>
<xsd:element name="ClaimedRoles" type="ClaimedRolesListType" minOccurs="0"/>
<xsd:element name="CertifiedRoles" type="CertifiedRolesListType" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ClaimedRolesListType">
<xsd:sequence>
<xsd:element name="ClaimedRole" type="AnyType" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CertifiedRolesListType">
<xsd:sequence>
<xsd:element name="CertifiedRole" type="EncapsulatedPKIDataType" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<!-- End SignerRole -->
<xsd:element name="AllDataObjectsTimeStamp" type="XAdESTimeStampType"/>
<xsd:element name="IndividualDataObjectsTimeStamp" type="XAdESTimeStampType"/>
<xsd:element name="SignatureTimeStamp" type="XAdESTimeStampType"/>
<!-- Start CompleteCertificateRefs -->
<xsd:element name="CompleteCertificateRefs" type="CompleteCertificateRefsType"/>
<xsd:complexType name="CompleteCertificateRefsType">
<xsd:sequence>
<xsd:element name="CertRefs" type="CertIDListType"/>
</xsd:sequence>
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
</xsd:complexType>
<!-- End CompleteCertificateRefs -->
<!-- Start CompleteRevocationRefs-->
<xsd:element name="CompleteRevocationRefs" type="CompleteRevocationRefsType"/>
<xsd:complexType name="CompleteRevocationRefsType">
<xsd:sequence>
<xsd:element name="CRLRefs" type="CRLRefsType" minOccurs="0"/>
<xsd:element name="OCSPRefs" type="OCSPRefsType" minOccurs="0"/>
<xsd:element name="OtherRefs" type="OtherCertStatusRefsType" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
</xsd:complexType>
<xsd:complexType name="CRLRefsType">
<xsd:sequence>
<xsd:element name="CRLRef" type="CRLRefType" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CRLRefType">
<xsd:sequence>
<xsd:element name="DigestAlgAndValue" type="DigestAlgAndValueType"/>
<xsd:element name="CRLIdentifier" type="CRLIdentifierType" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CRLIdentifierType">
<xsd:sequence>
<xsd:element name="Issuer" type="xsd:string"/>
<xsd:element name="IssueTime" type="xsd:dateTime"/>
<xsd:element name="Number" type="xsd:integer" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
</xsd:complexType>
<xsd:complexType name="OCSPRefsType">
<xsd:sequence>
<xsd:element name="OCSPRef" type="OCSPRefType" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="OCSPRefType">
<xsd:sequence>
<xsd:element name="OCSPIdentifier" type="OCSPIdentifierType"/>
<xsd:element name="DigestAlgAndValue" type="DigestAlgAndValueType" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ResponderIDType">
<xsd:choice>
<xsd:element name="ByName" type="xsd:string"/>
<xsd:element name="ByKey" type="xsd:base64Binary"/>
</xsd:choice>
</xsd:complexType>
<xsd:complexType name="OCSPIdentifierType">
<xsd:sequence>
<xsd:element name="ResponderID" type="ResponderIDType"/>
<xsd:element name="ProducedAt" type="xsd:dateTime"/>
</xsd:sequence>
<xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
</xsd:complexType>
<xsd:complexType name="OtherCertStatusRefsType">
<xsd:sequence>
<xsd:element name="OtherRef" type="AnyType" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<!-- End CompleteRevocationRefs-->
<xsd:element name="AttributeCertificateRefs" type="CompleteCertificateRefsType"/>
<xsd:element name="AttributeRevocationRefs" type="CompleteRevocationRefsType"/>
<xsd:element name="SigAndRefsTimeStamp" type="XAdESTimeStampType"/>
<xsd:element name="RefsOnlyTimeStamp" type="XAdESTimeStampType"/>
<!-- Start CertificateValues -->
<xsd:element name="CertificateValues" type="CertificateValuesType"/>
<xsd:complexType name="CertificateValuesType">
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="EncapsulatedX509Certificate" type="EncapsulatedPKIDataType"/>
<xsd:element name="OtherCertificate" type="AnyType"/>
</xsd:choice>
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
</xsd:complexType>
<!-- End CertificateValues -->
<!-- Start RevocationValues-->
<xsd:element name="RevocationValues" type="RevocationValuesType"/>
<xsd:complexType name="RevocationValuesType">
<xsd:sequence>
<xsd:element name="CRLValues" type="CRLValuesType" minOccurs="0"/>
<xsd:element name="OCSPValues" type="OCSPValuesType" minOccurs="0"/>
<xsd:element name="OtherValues" type="OtherCertStatusValuesType" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
</xsd:complexType>
<xsd:complexType name="CRLValuesType">
<xsd:sequence>
<xsd:element name="EncapsulatedCRLValue" type="EncapsulatedPKIDataType" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="OCSPValuesType">
<xsd:sequence>
<xsd:element name="EncapsulatedOCSPValue" type="EncapsulatedPKIDataType" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="OtherCertStatusValuesType">
<xsd:sequence>
<xsd:element name="OtherValue" type="AnyType" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<!-- End RevocationValues-->
<xsd:element name="AttrAuthoritiesCertValues" type="CertificateValuesType"/>
<xsd:element name="AttributeRevocationValues" type="RevocationValuesType"/>
<xsd:element name="ArchiveTimeStamp" type="XAdESTimeStampType"/>
</xsd:schema>

View File

@ -1,15 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://uri.etsi.org/01903/v1.4.1#" xmlns="http://uri.etsi.org/01903/v1.4.1#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xades="http://uri.etsi.org/01903/v1.3.2#" elementFormDefault="qualified">
<xsd:import namespace="http://uri.etsi.org/01903/v1.3.2#" schemaLocation="http://uri.etsi.org/01903/v1.3.2/XAdES.xsd"/>
<!-- Start CertificateValues -->
<xsd:element name="TimeStampValidationData" type="ValidationDataType"/>
<xsd:complexType name="ValidationDataType">
<xsd:sequence>
<xsd:element ref="xades:CertificateValues" minOccurs="0"/>
<xsd:element ref="xades:RevocationValues" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
<xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
</xsd:complexType>
<xsd:element name="ArchiveTimeStamp" type="xades:XAdESTimeStampType"/>
</xsd:schema>
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://uri.etsi.org/01903/v1.4.1#" xmlns="http://uri.etsi.org/01903/v1.4.1#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xades="http://uri.etsi.org/01903/v1.3.2#" elementFormDefault="qualified">
<xsd:import namespace="http://uri.etsi.org/01903/v1.3.2#" schemaLocation="http://uri.etsi.org/01903/v1.3.2/XAdES.xsd"/>
<!-- Start CertificateValues -->
<xsd:element name="TimeStampValidationData" type="ValidationDataType"/>
<xsd:complexType name="ValidationDataType">
<xsd:sequence>
<xsd:element ref="xades:CertificateValues" minOccurs="0"/>
<xsd:element ref="xades:RevocationValues" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
<xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
</xsd:complexType>
<xsd:element name="ArchiveTimeStamp" type="xades:XAdESTimeStampType"/>
</xsd:schema>

View File

@ -1,50 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
====================================================================
-->
<xb:config xmlns:xb="http://xml.apache.org/xmlbeans/2004/02/xbean/config">
<xb:namespace uri="urn:schemas-microsoft-com:office:office">
<xb:package>com.microsoft.schemas.office.office</xb:package>
</xb:namespace>
<xb:namespace uri="urn:schemas-microsoft-com:office:excel">
<xb:package>com.microsoft.schemas.office.excel</xb:package>
</xb:namespace>
<xb:namespace uri="urn:schemas-microsoft-com:office:word">
<xb:package>com.microsoft.schemas.office.word</xb:package>
</xb:namespace>
<xb:namespace uri="urn:schemas-microsoft-com:office:powerpoint">
<xb:package>com.microsoft.schemas.office.powerpoint</xb:package>
</xb:namespace>
<xb:namespace uri="urn:schemas-microsoft-com:vml">
<xb:package>com.microsoft.schemas.vml</xb:package>
</xb:namespace>
<xb:namespace uri="http://schemas.openxmlformats.org/markup-compatibility/2006">
<xb:package>com.microsoft.schemas.compatibility</xb:package>
</xb:namespace>
<xb:namespace uri="urn:schemas-poi-apache-org:vmldrawing">
<xb:package>org.apache.poi.schemas.vmldrawing</xb:package>
</xb:namespace>
<?xml version="1.0" encoding="UTF-8"?>
<!--
====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
====================================================================
-->
<xb:config xmlns:xb="http://xml.apache.org/xmlbeans/2004/02/xbean/config">
<xb:namespace uri="urn:schemas-microsoft-com:office:office">
<xb:package>com.microsoft.schemas.office.office</xb:package>
</xb:namespace>
<xb:namespace uri="urn:schemas-microsoft-com:office:excel">
<xb:package>com.microsoft.schemas.office.excel</xb:package>
</xb:namespace>
<xb:namespace uri="urn:schemas-microsoft-com:office:word">
<xb:package>com.microsoft.schemas.office.word</xb:package>
</xb:namespace>
<xb:namespace uri="urn:schemas-microsoft-com:office:powerpoint">
<xb:package>com.microsoft.schemas.office.powerpoint</xb:package>
</xb:namespace>
<xb:namespace uri="urn:schemas-microsoft-com:vml">
<xb:package>com.microsoft.schemas.vml</xb:package>
</xb:namespace>
<xb:namespace uri="http://schemas.openxmlformats.org/markup-compatibility/2006">
<xb:package>com.microsoft.schemas.compatibility</xb:package>
</xb:namespace>
<xb:namespace uri="urn:schemas-poi-apache-org:vmldrawing">
<xb:package>org.apache.poi.schemas.vmldrawing</xb:package>
</xb:namespace>
</xb:config>

View File

@ -0,0 +1,562 @@
<xsd:schema attributeFormDefault="qualified" blockDefault="#all" elementFormDefault="qualified"
targetNamespace="http://schemas.microsoft.com/office/word/2010/wordml"
xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"
xmlns:w06="http://schemas.openxmlformats.org/wordprocessingml/2006/main"
xmlns:od06st="http://schemas.openxmlformats.org/officeDocument/2006/sharedTypes"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://schemas.microsoft.com/office/word/2010/wordml">
<xsd:complexType name="CT_LongHexNumber">
<xsd:attribute name="val" type="w06:ST_LongHexNumber" use="required"/>
</xsd:complexType>
<xsd:simpleType name="ST_OnOff">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="true"/>
<xsd:enumeration value="false"/>
<xsd:enumeration value="0"/>
<xsd:enumeration value="1"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="CT_OnOff">
<xsd:attribute name="val" type="ST_OnOff"/>
</xsd:complexType>
<xsd:element name="docId" type="CT_LongHexNumber"/>
<xsd:element name="conflictMode" type="CT_OnOff"/>
<xsd:attributeGroup name="AG_Parids">
<xsd:attribute name="paraId" type="w06:ST_LongHexNumber"/>
<xsd:attribute name="textId" type="w06:ST_LongHexNumber"/>
</xsd:attributeGroup>
<xsd:attribute name="anchorId" type="w06:ST_LongHexNumber"/>
<xsd:attribute name="noSpellErr" type="od06st:ST_OnOff"/>
<xsd:element name="customXmlConflictInsRangeStart" type="w06:CT_TrackChange"/>
<xsd:element name="customXmlConflictInsRangeEnd" type="w06:CT_Markup"/>
<xsd:element name="customXmlConflictDelRangeStart" type="w06:CT_TrackChange"/>
<xsd:element name="customXmlConflictDelRangeEnd" type="w06:CT_Markup"/>
<xsd:group name="EG_RunLevelConflicts">
<xsd:sequence>
<xsd:element name="conflictIns" type="w06:CT_RunTrackChange" minOccurs="0"/>
<xsd:element name="conflictDel" type="w06:CT_RunTrackChange" minOccurs="0"/>
</xsd:sequence>
</xsd:group>
<xsd:group name="EG_Conflicts">
<xsd:choice>
<xsd:element name="conflictIns" type="w06:CT_TrackChange" minOccurs="0"/>
<xsd:element name="conflictDel" type="w06:CT_TrackChange" minOccurs="0"/>
</xsd:choice>
</xsd:group>
<xsd:complexType name="CT_Percentage">
<xsd:attribute name="val" type="a:ST_Percentage" use="required"/>
</xsd:complexType>
<xsd:complexType name="CT_PositiveFixedPercentage">
<xsd:attribute name="val" type="a:ST_PositiveFixedPercentage" use="required"/>
</xsd:complexType>
<xsd:complexType name="CT_PositivePercentage">
<xsd:attribute name="val" type="a:ST_PositivePercentage" use="required"/>
</xsd:complexType>
<xsd:simpleType name="ST_SchemeColorVal">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="bg1"/>
<xsd:enumeration value="tx1"/>
<xsd:enumeration value="bg2"/>
<xsd:enumeration value="tx2"/>
<xsd:enumeration value="accent1"/>
<xsd:enumeration value="accent2"/>
<xsd:enumeration value="accent3"/>
<xsd:enumeration value="accent4"/>
<xsd:enumeration value="accent5"/>
<xsd:enumeration value="accent6"/>
<xsd:enumeration value="hlink"/>
<xsd:enumeration value="folHlink"/>
<xsd:enumeration value="dk1"/>
<xsd:enumeration value="lt1"/>
<xsd:enumeration value="dk2"/>
<xsd:enumeration value="lt2"/>
<xsd:enumeration value="phClr"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ST_RectAlignment">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="none"/>
<xsd:enumeration value="tl"/>
<xsd:enumeration value="t"/>
<xsd:enumeration value="tr"/>
<xsd:enumeration value="l"/>
<xsd:enumeration value="ctr"/>
<xsd:enumeration value="r"/>
<xsd:enumeration value="bl"/>
<xsd:enumeration value="b"/>
<xsd:enumeration value="br"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ST_PathShadeType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="shape"/>
<xsd:enumeration value="circle"/>
<xsd:enumeration value="rect"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ST_LineCap">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="rnd"/>
<xsd:enumeration value="sq"/>
<xsd:enumeration value="flat"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ST_PresetLineDashVal">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="solid"/>
<xsd:enumeration value="dot"/>
<xsd:enumeration value="sysDot"/>
<xsd:enumeration value="dash"/>
<xsd:enumeration value="sysDash"/>
<xsd:enumeration value="lgDash"/>
<xsd:enumeration value="dashDot"/>
<xsd:enumeration value="sysDashDot"/>
<xsd:enumeration value="lgDashDot"/>
<xsd:enumeration value="lgDashDotDot"/>
<xsd:enumeration value="sysDashDotDot"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ST_PenAlignment">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="ctr"/>
<xsd:enumeration value="in"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ST_CompoundLine">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="sng"/>
<xsd:enumeration value="dbl"/>
<xsd:enumeration value="thickThin"/>
<xsd:enumeration value="thinThick"/>
<xsd:enumeration value="tri"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="CT_RelativeRect">
<xsd:attribute name="l" use="optional" type="a:ST_Percentage"/>
<xsd:attribute name="t" use="optional" type="a:ST_Percentage"/>
<xsd:attribute name="r" use="optional" type="a:ST_Percentage"/>
<xsd:attribute name="b" use="optional" type="a:ST_Percentage"/>
</xsd:complexType>
<xsd:group name="EG_ColorTransform">
<xsd:choice>
<xsd:element name="tint" type="CT_PositiveFixedPercentage"/>
<xsd:element name="shade" type="CT_PositiveFixedPercentage"/>
<xsd:element name="alpha" type="CT_PositiveFixedPercentage"/>
<xsd:element name="hueMod" type="CT_PositivePercentage"/>
<xsd:element name="sat" type="CT_Percentage"/>
<xsd:element name="satOff" type="CT_Percentage"/>
<xsd:element name="satMod" type="CT_Percentage"/>
<xsd:element name="lum" type="CT_Percentage"/>
<xsd:element name="lumOff" type="CT_Percentage"/>
<xsd:element name="lumMod" type="CT_Percentage"/>
</xsd:choice>
</xsd:group>
<xsd:complexType name="CT_SRgbColor">
<xsd:sequence>
<xsd:group ref="EG_ColorTransform" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="val" type="od06st:ST_HexColorRGB" use="required"/>
</xsd:complexType>
<xsd:complexType name="CT_SchemeColor">
<xsd:sequence>
<xsd:group ref="EG_ColorTransform" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="val" type="ST_SchemeColorVal" use="required"/>
</xsd:complexType>
<xsd:group name="EG_ColorChoice">
<xsd:choice>
<xsd:element name="srgbClr" type="CT_SRgbColor"/>
<xsd:element name="schemeClr" type="CT_SchemeColor"/>
</xsd:choice>
</xsd:group>
<xsd:complexType name="CT_Color">
<xsd:sequence>
<xsd:group ref="EG_ColorChoice"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_GradientStop">
<xsd:sequence>
<xsd:group ref="EG_ColorChoice"/>
</xsd:sequence>
<xsd:attribute name="pos" type="a:ST_PositiveFixedPercentage" use="required"/>
</xsd:complexType>
<xsd:complexType name="CT_GradientStopList">
<xsd:sequence>
<xsd:element name="gs" type="CT_GradientStop" minOccurs="2" maxOccurs="10"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_LinearShadeProperties">
<xsd:attribute name="ang" type="a:ST_PositiveFixedAngle" use="optional"/>
<xsd:attribute name="scaled" type="ST_OnOff" use="optional"/>
</xsd:complexType>
<xsd:complexType name="CT_PathShadeProperties">
<xsd:sequence>
<xsd:element name="fillToRect" type="CT_RelativeRect" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="path" type="ST_PathShadeType" use="optional"/>
</xsd:complexType>
<xsd:group name="EG_ShadeProperties">
<xsd:choice>
<xsd:element name="lin" type="CT_LinearShadeProperties"/>
<xsd:element name="path" type="CT_PathShadeProperties"/>
</xsd:choice>
</xsd:group>
<xsd:complexType name="CT_SolidColorFillProperties">
<xsd:sequence>
<xsd:group ref="EG_ColorChoice" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_GradientFillProperties">
<xsd:sequence>
<xsd:element name="gsLst" type="CT_GradientStopList" minOccurs="0"/>
<xsd:group ref="EG_ShadeProperties" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:group name="EG_FillProperties">
<xsd:choice>
<xsd:element name="noFill" type="w06:CT_Empty"/>
<xsd:element name="solidFill" type="CT_SolidColorFillProperties"/>
<xsd:element name="gradFill" type="CT_GradientFillProperties"/>
</xsd:choice>
</xsd:group>
<xsd:complexType name="CT_PresetLineDashProperties">
<xsd:attribute name="val" type="ST_PresetLineDashVal" use="optional"/>
</xsd:complexType>
<xsd:group name="EG_LineDashProperties">
<xsd:choice>
<xsd:element name="prstDash" type="CT_PresetLineDashProperties"/>
</xsd:choice>
</xsd:group>
<xsd:complexType name="CT_LineJoinMiterProperties">
<xsd:attribute name="lim" type="a:ST_PositivePercentage" use="optional"/>
</xsd:complexType>
<xsd:group name="EG_LineJoinProperties">
<xsd:choice>
<xsd:element name="round" type="w06:CT_Empty"/>
<xsd:element name="bevel" type="w06:CT_Empty"/>
<xsd:element name="miter" type="CT_LineJoinMiterProperties"/>
</xsd:choice>
</xsd:group>
<xsd:simpleType name="ST_PresetCameraType">
<xsd:restriction base="xsd:token">
<xsd:enumeration value="legacyObliqueTopLeft"/>
<xsd:enumeration value="legacyObliqueTop"/>
<xsd:enumeration value="legacyObliqueTopRight"/>
<xsd:enumeration value="legacyObliqueLeft"/>
<xsd:enumeration value="legacyObliqueFront"/>
<xsd:enumeration value="legacyObliqueRight"/>
<xsd:enumeration value="legacyObliqueBottomLeft"/>
<xsd:enumeration value="legacyObliqueBottom"/>
<xsd:enumeration value="legacyObliqueBottomRight"/>
<xsd:enumeration value="legacyPerspectiveTopLeft"/>
<xsd:enumeration value="legacyPerspectiveTop"/>
<xsd:enumeration value="legacyPerspectiveTopRight"/>
<xsd:enumeration value="legacyPerspectiveLeft"/>
<xsd:enumeration value="legacyPerspectiveFront"/>
<xsd:enumeration value="legacyPerspectiveRight"/>
<xsd:enumeration value="legacyPerspectiveBottomLeft"/>
<xsd:enumeration value="legacyPerspectiveBottom"/>
<xsd:enumeration value="legacyPerspectiveBottomRight"/>
<xsd:enumeration value="orthographicFront"/>
<xsd:enumeration value="isometricTopUp"/>
<xsd:enumeration value="isometricTopDown"/>
<xsd:enumeration value="isometricBottomUp"/>
<xsd:enumeration value="isometricBottomDown"/>
<xsd:enumeration value="isometricLeftUp"/>
<xsd:enumeration value="isometricLeftDown"/>
<xsd:enumeration value="isometricRightUp"/>
<xsd:enumeration value="isometricRightDown"/>
<xsd:enumeration value="isometricOffAxis1Left"/>
<xsd:enumeration value="isometricOffAxis1Right"/>
<xsd:enumeration value="isometricOffAxis1Top"/>
<xsd:enumeration value="isometricOffAxis2Left"/>
<xsd:enumeration value="isometricOffAxis2Right"/>
<xsd:enumeration value="isometricOffAxis2Top"/>
<xsd:enumeration value="isometricOffAxis3Left"/>
<xsd:enumeration value="isometricOffAxis3Right"/>
<xsd:enumeration value="isometricOffAxis3Bottom"/>
<xsd:enumeration value="isometricOffAxis4Left"/>
<xsd:enumeration value="isometricOffAxis4Right"/>
<xsd:enumeration value="isometricOffAxis4Bottom"/>
<xsd:enumeration value="obliqueTopLeft"/>
<xsd:enumeration value="obliqueTop"/>
<xsd:enumeration value="obliqueTopRight"/>
<xsd:enumeration value="obliqueLeft"/>
<xsd:enumeration value="obliqueRight"/>
<xsd:enumeration value="obliqueBottomLeft"/>
<xsd:enumeration value="obliqueBottom"/>
<xsd:enumeration value="obliqueBottomRight"/>
<xsd:enumeration value="perspectiveFront"/>
<xsd:enumeration value="perspectiveLeft"/>
<xsd:enumeration value="perspectiveRight"/>
<xsd:enumeration value="perspectiveAbove"/>
<xsd:enumeration value="perspectiveBelow"/>
<xsd:enumeration value="perspectiveAboveLeftFacing"/>
<xsd:enumeration value="perspectiveAboveRightFacing"/>
<xsd:enumeration value="perspectiveContrastingLeftFacing"/>
<xsd:enumeration value="perspectiveContrastingRightFacing"/>
<xsd:enumeration value="perspectiveHeroicLeftFacing"/>
<xsd:enumeration value="perspectiveHeroicRightFacing"/>
<xsd:enumeration value="perspectiveHeroicExtremeLeftFacing"/>
<xsd:enumeration value="perspectiveHeroicExtremeRightFacing"/>
<xsd:enumeration value="perspectiveRelaxed"/>
<xsd:enumeration value="perspectiveRelaxedModerately"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="CT_Camera">
<xsd:attribute name="prst" use="required" type="ST_PresetCameraType"/>
</xsd:complexType>
<xsd:complexType name="CT_SphereCoords">
<xsd:attribute name="lat" type="a:ST_PositiveFixedAngle" use="required"/>
<xsd:attribute name="lon" type="a:ST_PositiveFixedAngle" use="required"/>
<xsd:attribute name="rev" type="a:ST_PositiveFixedAngle" use="required"/>
</xsd:complexType>
<xsd:simpleType name="ST_LightRigType">
<xsd:restriction base="xsd:token">
<xsd:enumeration value="legacyFlat1"/>
<xsd:enumeration value="legacyFlat2"/>
<xsd:enumeration value="legacyFlat3"/>
<xsd:enumeration value="legacyFlat4"/>
<xsd:enumeration value="legacyNormal1"/>
<xsd:enumeration value="legacyNormal2"/>
<xsd:enumeration value="legacyNormal3"/>
<xsd:enumeration value="legacyNormal4"/>
<xsd:enumeration value="legacyHarsh1"/>
<xsd:enumeration value="legacyHarsh2"/>
<xsd:enumeration value="legacyHarsh3"/>
<xsd:enumeration value="legacyHarsh4"/>
<xsd:enumeration value="threePt"/>
<xsd:enumeration value="balanced"/>
<xsd:enumeration value="soft"/>
<xsd:enumeration value="harsh"/>
<xsd:enumeration value="flood"/>
<xsd:enumeration value="contrasting"/>
<xsd:enumeration value="morning"/>
<xsd:enumeration value="sunrise"/>
<xsd:enumeration value="sunset"/>
<xsd:enumeration value="chilly"/>
<xsd:enumeration value="freezing"/>
<xsd:enumeration value="flat"/>
<xsd:enumeration value="twoPt"/>
<xsd:enumeration value="glow"/>
<xsd:enumeration value="brightRoom"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ST_LightRigDirection">
<xsd:restriction base="xsd:token">
<xsd:enumeration value="tl"/>
<xsd:enumeration value="t"/>
<xsd:enumeration value="tr"/>
<xsd:enumeration value="l"/>
<xsd:enumeration value="r"/>
<xsd:enumeration value="bl"/>
<xsd:enumeration value="b"/>
<xsd:enumeration value="br"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="CT_LightRig">
<xsd:sequence>
<xsd:element name="rot" type="CT_SphereCoords" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="rig" type="ST_LightRigType" use="required"/>
<xsd:attribute name="dir" type="ST_LightRigDirection" use="required"/>
</xsd:complexType>
<xsd:simpleType name="ST_BevelPresetType">
<xsd:restriction base="xsd:token">
<xsd:enumeration value="relaxedInset"/>
<xsd:enumeration value="circle"/>
<xsd:enumeration value="slope"/>
<xsd:enumeration value="cross"/>
<xsd:enumeration value="angle"/>
<xsd:enumeration value="softRound"/>
<xsd:enumeration value="convex"/>
<xsd:enumeration value="coolSlant"/>
<xsd:enumeration value="divot"/>
<xsd:enumeration value="riblet"/>
<xsd:enumeration value="hardEdge"/>
<xsd:enumeration value="artDeco"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="CT_Bevel">
<xsd:attribute name="w" type="a:ST_PositiveCoordinate" use="optional"/>
<xsd:attribute name="h" type="a:ST_PositiveCoordinate" use="optional"/>
<xsd:attribute name="prst" type="ST_BevelPresetType" use="optional"/>
</xsd:complexType>
<xsd:simpleType name="ST_PresetMaterialType">
<xsd:restriction base="xsd:token">
<xsd:enumeration value="legacyMatte"/>
<xsd:enumeration value="legacyPlastic"/>
<xsd:enumeration value="legacyMetal"/>
<xsd:enumeration value="legacyWireframe"/>
<xsd:enumeration value="matte"/>
<xsd:enumeration value="plastic"/>
<xsd:enumeration value="metal"/>
<xsd:enumeration value="warmMatte"/>
<xsd:enumeration value="translucentPowder"/>
<xsd:enumeration value="powder"/>
<xsd:enumeration value="dkEdge"/>
<xsd:enumeration value="softEdge"/>
<xsd:enumeration value="clear"/>
<xsd:enumeration value="flat"/>
<xsd:enumeration value="softmetal"/>
<xsd:enumeration value="none"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="CT_Glow">
<xsd:sequence>
<xsd:group ref="EG_ColorChoice"/>
</xsd:sequence>
<xsd:attribute name="rad" use="optional" type="a:ST_PositiveCoordinate"/>
</xsd:complexType>
<xsd:complexType name="CT_Shadow">
<xsd:sequence>
<xsd:group ref="EG_ColorChoice"/>
</xsd:sequence>
<xsd:attribute name="blurRad" use="optional" type="a:ST_PositiveCoordinate"/>
<xsd:attribute name="dist" use="optional" type="a:ST_PositiveCoordinate"/>
<xsd:attribute name="dir" use="optional" type="a:ST_PositiveFixedAngle"/>
<xsd:attribute name="sx" use="optional" type="a:ST_Percentage"/>
<xsd:attribute name="sy" use="optional" type="a:ST_Percentage"/>
<xsd:attribute name="kx" use="optional" type="a:ST_FixedAngle"/>
<xsd:attribute name="ky" use="optional" type="a:ST_FixedAngle"/>
<xsd:attribute name="algn" use="optional" type="ST_RectAlignment"/>
</xsd:complexType>
<xsd:complexType name="CT_Reflection">
<xsd:attribute name="blurRad" use="optional" type="a:ST_PositiveCoordinate"/>
<xsd:attribute name="stA" use="optional" type="a:ST_PositiveFixedPercentage"/>
<xsd:attribute name="stPos" use="optional" type="a:ST_PositiveFixedPercentage"/>
<xsd:attribute name="endA" use="optional" type="a:ST_PositiveFixedPercentage"/>
<xsd:attribute name="endPos" use="optional" type="a:ST_PositiveFixedPercentage"/>
<xsd:attribute name="dist" use="optional" type="a:ST_PositiveCoordinate"/>
<xsd:attribute name="dir" use="optional" type="a:ST_PositiveFixedAngle"/>
<xsd:attribute name="fadeDir" use="optional" type="a:ST_PositiveFixedAngle"/>
<xsd:attribute name="sx" use="optional" type="a:ST_Percentage"/>
<xsd:attribute name="sy" use="optional" type="a:ST_Percentage"/>
<xsd:attribute name="kx" use="optional" type="a:ST_FixedAngle"/>
<xsd:attribute name="ky" use="optional" type="a:ST_FixedAngle"/>
<xsd:attribute name="algn" use="optional" type="ST_RectAlignment"/>
</xsd:complexType>
<xsd:complexType name="CT_FillTextEffect">
<xsd:sequence>
<xsd:group ref="EG_FillProperties" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_TextOutlineEffect">
<xsd:sequence>
<xsd:group ref="EG_FillProperties" minOccurs="0"/>
<xsd:group ref="EG_LineDashProperties" minOccurs="0"/>
<xsd:group ref="EG_LineJoinProperties" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="w" use="optional" type="a:ST_LineWidth"/>
<xsd:attribute name="cap" use="optional" type="ST_LineCap"/>
<xsd:attribute name="cmpd" use="optional" type="ST_CompoundLine"/>
<xsd:attribute name="algn" use="optional" type="ST_PenAlignment"/>
</xsd:complexType>
<xsd:complexType name="CT_Scene3D">
<xsd:sequence>
<xsd:element name="camera" type="CT_Camera"/>
<xsd:element name="lightRig" type="CT_LightRig"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CT_Props3D">
<xsd:sequence>
<xsd:element name="bevelT" type="CT_Bevel" minOccurs="0"/>
<xsd:element name="bevelB" type="CT_Bevel" minOccurs="0"/>
<xsd:element name="extrusionClr" type="CT_Color" minOccurs="0"/>
<xsd:element name="contourClr" type="CT_Color" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="extrusionH" type="a:ST_PositiveCoordinate" use="optional"/>
<xsd:attribute name="contourW" type="a:ST_PositiveCoordinate" use="optional"/>
<xsd:attribute name="prstMaterial" type="ST_PresetMaterialType" use="optional"/>
</xsd:complexType>
<xsd:group name="EG_RPrTextEffects">
<xsd:sequence>
<xsd:element name="glow" minOccurs="0" type="CT_Glow"/>
<xsd:element name="shadow" minOccurs="0" type="CT_Shadow"/>
<xsd:element name="reflection" minOccurs="0" type="CT_Reflection"/>
<xsd:element name="textOutline" minOccurs="0" type="CT_TextOutlineEffect"/>
<xsd:element name="textFill" minOccurs="0" type="CT_FillTextEffect"/>
<xsd:element name="scene3d" minOccurs="0" type="CT_Scene3D"/>
<xsd:element name="props3d" minOccurs="0" type="CT_Props3D"/>
</xsd:sequence>
</xsd:group>
<xsd:simpleType name="ST_Ligatures">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="none"/>
<xsd:enumeration value="standard"/>
<xsd:enumeration value="contextual"/>
<xsd:enumeration value="historical"/>
<xsd:enumeration value="discretional"/>
<xsd:enumeration value="standardContextual"/>
<xsd:enumeration value="standardHistorical"/>
<xsd:enumeration value="contextualHistorical"/>
<xsd:enumeration value="standardDiscretional"/>
<xsd:enumeration value="contextualDiscretional"/>
<xsd:enumeration value="historicalDiscretional"/>
<xsd:enumeration value="standardContextualHistorical"/>
<xsd:enumeration value="standardContextualDiscretional"/>
<xsd:enumeration value="standardHistoricalDiscretional"/>
<xsd:enumeration value="contextualHistoricalDiscretional"/>
<xsd:enumeration value="all"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="CT_Ligatures">
<xsd:attribute name="val" type="ST_Ligatures" use="required"/>
</xsd:complexType>
<xsd:simpleType name="ST_NumForm">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="default"/>
<xsd:enumeration value="lining"/>
<xsd:enumeration value="oldStyle"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="CT_NumForm">
<xsd:attribute name="val" type="ST_NumForm" use="required"/>
</xsd:complexType>
<xsd:simpleType name="ST_NumSpacing">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="default"/>
<xsd:enumeration value="proportional"/>
<xsd:enumeration value="tabular"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="CT_NumSpacing">
<xsd:attribute name="val" type="ST_NumSpacing" use="required"/>
</xsd:complexType>
<xsd:complexType name="CT_StyleSet">
<xsd:attribute name="id" type="od06st:ST_UnsignedDecimalNumber" use="required"/>
<xsd:attribute name="val" type="ST_OnOff" use="optional"/>
</xsd:complexType>
<xsd:complexType name="CT_StylisticSets">
<xsd:sequence minOccurs="0">
<xsd:element name="styleSet" minOccurs="0" maxOccurs="unbounded" type="CT_StyleSet"/>
</xsd:sequence>
</xsd:complexType>
<xsd:group name="EG_RPrOpenType">
<xsd:sequence>
<xsd:element name="ligatures" minOccurs="0" type="CT_Ligatures"/>
<xsd:element name="numForm" minOccurs="0" type="CT_NumForm"/>
<xsd:element name="numSpacing" minOccurs="0" type="CT_NumSpacing"/>
<xsd:element name="stylisticSets" minOccurs="0" type="CT_StylisticSets"/>
<xsd:element name="cntxtAlts" minOccurs="0" type="CT_OnOff"/>
</xsd:sequence>
</xsd:group>
<xsd:element name="discardImageEditingData" type="CT_OnOff"/>
<xsd:element name="defaultImageDpi" type="CT_DefaultImageDpi"/>
<xsd:complexType name="CT_DefaultImageDpi">
<xsd:attribute name="val" type="w06:ST_DecimalNumber" use="required"/>
</xsd:complexType>
<xsd:element name="entityPicker" type="w06:CT_Empty"/>
<xsd:complexType name="CT_SdtCheckboxSymbol">
<xsd:attribute name="font" type="od06st:ST_String"/>
<xsd:attribute name="val" type="w06:ST_ShortHexNumber"/>
</xsd:complexType>
<xsd:complexType name="CT_SdtCheckbox">
<xsd:sequence>
<xsd:element name="checked" type="CT_OnOff" minOccurs="0"/>
<xsd:element name="checkedState" type="CT_SdtCheckboxSymbol" minOccurs="0"/>
<xsd:element name="uncheckedState" type="CT_SdtCheckboxSymbol" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="checkbox" type="CT_SdtCheckbox"/>
</xsd:schema>

View File

@ -22,8 +22,8 @@ sourceSets {
}
dependencies {
api 'net.bytebuddy:byte-buddy:1.14.7'
api 'net.bytebuddy:byte-buddy-agent:1.14.7'
api 'net.bytebuddy:byte-buddy:1.18.5'
api 'net.bytebuddy:byte-buddy-agent:1.18.5'
api "org.apache.xmlbeans:xmlbeans:${xmlbeansVersion}"
}
@ -36,27 +36,27 @@ java {
}
}
task compileJava9(type: JavaCompile) {
tasks.register('compileJava9', JavaCompile) {
dependsOn 'compileJava'
javaCompiler = javaToolchains.compilerFor {
languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
}
sourceCompatibility = 1.9
targetCompatibility = 1.9
sourceCompatibility = 11
targetCompatibility = 11
destinationDirectory = file(JAVA9_OUT + VERSIONS9)
source = file(JAVA9_SRC)
classpath = files()
doFirst {
options.compilerArgs = [
'--patch-module', "${MODULE_NAME}=${sourceSets.main.output.classesDirs.asPath}",
'--module-path', sourceSets.main.compileClasspath.asPath
'--patch-module', "${MODULE_NAME}=${sourceSets.main.output.classesDirs.asPath}",
'--module-path', sourceSets.main.compileClasspath.asPath
]
}
}
jar {
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}")
destinationDirectory = file("../build/dist/maven/${base.archivesName.get()}")
manifest {
attributes (

View File

@ -25,7 +25,6 @@ import java.lang.instrument.Instrumentation;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardOpenOption;
import java.security.ProtectionDomain;
import java.util.HashSet;
@ -78,7 +77,7 @@ public class OOXMLLiteAgent {
private static final Set<Integer> hashes = new HashSet<>();
static void load(String path) throws IOException {
logPath = Paths.get(path);
logPath = Path.of(path);
if (Files.exists(logPath)) {
try (Stream<String> stream = Files.lines(logPath)) {
stream.forEach((s) -> hashes.add(s.hashCode()));
@ -109,7 +108,7 @@ public class OOXMLLiteAgent {
}
void load(String path) throws IOException {
this.logPath = Paths.get(path);
this.logPath = Path.of(path);
if (Files.exists(this.logPath)) {
try (Stream<String> stream = Files.lines(this.logPath)) {
stream.forEach((s) -> hashes.add(s.hashCode()));

View File

@ -1,5 +1,3 @@
import java.util.regex.Pattern
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@ -17,8 +15,10 @@ import java.util.regex.Pattern
limitations under the License.
==================================================================== */
final String BEANS_SRC = "${buildDir}/generated-sources"
final String BEANS_RES = "${buildDir}/generated-resources"
import java.util.regex.Pattern
final String BEANS_SRC = layout.buildDirectory.dir('generated-sources').get().asFile.absolutePath
final String BEANS_RES = layout.buildDirectory.dir('generated-resources').get().asFile.absolutePath
sourceSets {
main {
@ -43,7 +43,7 @@ final Pattern MODULE_REGEX = ~'\\.jar$'
final List MAIN_MODULE_PATH = sourceSets.main.runtimeClasspath.findAll{ it.path =~ MODULE_REGEX }.collect{ it.parent }.unique()
final String OOXML_LITE_REPORT = '../src/resources/ooxml-lite-report'
task generateModuleInfo() {
tasks.register('generateModuleInfo') {
File fileIn = file("${OOXML_LITE_REPORT}.clazz")
File fileOut = file("src/main/java9/module-info.java")
@ -55,8 +55,8 @@ task generateModuleInfo() {
// generate module-info based on exported classes
String exports = fileIn.
collect { " exports ${it.replaceAll('[/\\\\][^/\\\\]+$', '').replaceAll('[/\\\\]', '.')};" }.
findAll { !(it =~ /\.impl;$/) }.unique().sort().join('\n')
collect { " exports ${it.replaceAll('[/\\\\][^/\\\\]+$', '').replaceAll('[/\\\\]', '.')};" }.
findAll { !(it =~ /\.impl;$/) }.unique().sort().join('\n')
String content = header + '\n' + exports + '\n}'
if (fileOut.text != content) {
@ -65,19 +65,19 @@ task generateModuleInfo() {
}
}
task compileOoxmlLite(type: Copy) {
tasks.register('compileOoxmlLite', Copy) {
dependsOn 'generateModuleInfo', ':poi-ooxml-full:generate_beans', ':poi-ooxml-full:compileJava'
// This task is currently always executed, because gradle thinks files with two dollar signs
// (as in AlternateContentDocument$AlternateContent$Choice.class) are always stale
// copy re-/sources to modules own directory to pacify IntelliJ, which doesn't like the same source dir in multiple modules
from(project(':poi-ooxml-full').buildDir) {
from(project(':poi-ooxml-full').layout.buildDirectory.asFile) {
include 'generated-sources/**'
include 'generated-resources/**'
include 'classes/java/main/**'
}
into(buildDir)
into(layout.buildDirectory.asFile)
}
compileJava {
@ -93,21 +93,21 @@ task compileJava9(type: JavaCompile, dependsOn: 'compileJava') {
javaCompiler = javaToolchains.compilerFor {
languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
}
sourceCompatibility = 1.9
targetCompatibility = 1.9
sourceCompatibility = 11
targetCompatibility = 11
destinationDirectory = file(JAVA9_OUT + VERSIONS9)
source = file(JAVA9_SRC)
classpath = files()
doFirst {
options.compilerArgs = [
'--patch-module', "${MODULE_NAME}=${project(':poi-ooxml-full').sourceSets.main.output.asPath}",
'--module-path', files(MAIN_MODULE_PATH).asPath
'--patch-module', "${MODULE_NAME}=${project(':poi-ooxml-full').sourceSets.main.output.asPath}",
'--module-path', files(MAIN_MODULE_PATH).asPath
]
}
}
jar {
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}")
destinationDirectory = file("../build/dist/maven/${base.archivesName.get()}")
doFirst {
File clazzFile = file("${OOXML_LITE_REPORT}.clazz")
@ -124,7 +124,7 @@ jar {
}
// ignore second module-info.class from poi-ooxml-full
// duplicatesStrategy = 'exclude'
// duplicatesStrategy = DuplicatesStrategy.EXCLUDE
includeEmptyDirs = false
manifest {

View File

@ -35,6 +35,7 @@ ctcustomshowlist3419type
ctcustomxmlblockd3c1type
ctdatarefsb753type
ctdiagramc1cctype
ctdocumentbasedf5ctype
cteastasianlayout0841type
ctednposd4a3type
cteqarr9667type
@ -96,8 +97,10 @@ ctwebpublishobjects30d8type
ctwrapthrough8b4etype
ctwraptightae95type
ctwraptopbottom5e13type
fonts7aa2doctype
lockedcanvaselement
polylineelement
relationships93b3doctype
relidselement
stalignh768ctype
stalignv5abetype
@ -125,3 +128,4 @@ ststrokelinestylea509type
sttargetscreensize4357type
stverticalanchor22cctype
stwrapside6d02type
wsdrd172doctype

View File

@ -28,7 +28,6 @@ configurations {
exclude group: 'xml-apis', module: 'xml-apis'
}
broken
tests
javadocs
}
@ -59,18 +58,23 @@ dependencies {
api project(':poi-ooxml-full')
api project(path: ':poi-ooxml-full', configuration: 'archives')
// Can be very useful in local testing to comment out the 2 poi-ooxml-full lines above
// and uncomment the line below to use a pre-built version of poi-ooxml-full.
// Try to use the last release version of poi-ooxml-full. You might be unlucky if
// recent unreleased changes in poi-ooxml-full are needed.
// api "org.apache.poi:poi-ooxml-full:5.5.1"
api "org.apache.xmlbeans:xmlbeans:${xmlbeansVersion}"
api "org.apache.commons:commons-compress:${commonsCompressVersion}"
api "commons-io:commons-io:${commonsIoVersion}"
api 'com.github.virtuald:curvesapi:1.08'
api "org.apache.logging.log4j:log4j-api:${log4jVersion}"
api 'org.apache.commons:commons-collections4:4.4'
api 'org.apache.commons:commons-collections4:4.5.0'
signingImplementation 'org.apache.santuario:xmlsec:3.0.2'
signingImplementation "org.apache.santuario:xmlsec:${xmlSecVersion}"
signingImplementation "org.bouncycastle:bcpkix-jdk18on:${bouncyCastleVersion}"
signingImplementation "org.bouncycastle:bcutil-jdk18on:${bouncyCastleVersion}"
rendersignImplementation 'org.apache.santuario:xmlsec:3.0.2'
rendersignImplementation "org.apache.santuario:xmlsec:${xmlSecVersion}"
rendersignImplementation "org.bouncycastle:bcpkix-jdk18on:${bouncyCastleVersion}"
rendersignImplementation "org.bouncycastle:bcutil-jdk18on:${bouncyCastleVersion}"
@ -89,6 +93,10 @@ dependencies {
exclude group: 'xalan', module: 'xalan'
exclude group: 'xml-apis', module: 'xml-apis'
}
renderImplementation("org.apache.xmlgraphics:batik-script:${batikVersion}") {
exclude group: 'xalan', module: 'xalan'
exclude group: 'xml-apis', module: 'xml-apis'
}
rendersignImplementation "org.apache.pdfbox:pdfbox:${pdfboxVersion}"
rendersignImplementation "de.rototor.pdfbox:graphics2d:${graphics2dVersion}"
@ -105,7 +113,10 @@ dependencies {
exclude group: 'xalan', module: 'xalan'
exclude group: 'xml-apis', module: 'xml-apis'
}
rendersignImplementation("org.apache.xmlgraphics:batik-script:${batikVersion}") {
exclude group: 'xalan', module: 'xalan'
exclude group: 'xml-apis', module: 'xml-apis'
}
if (!NO_SCRATCHPAD) {
testImplementation project(':poi-scratchpad')
@ -114,79 +125,69 @@ dependencies {
testImplementation project(path:':poi', configuration:'tests')
testImplementation project(path:':poi-ooxml-lite-agent', configuration: 'archives')
testRuntimeOnly "org.apiguardian:apiguardian-api:${apiGuardianVersion}"
testImplementation 'org.xmlunit:xmlunit-core:2.9.1'
testImplementation 'org.xmlunit:xmlunit-core:2.11.0'
testImplementation 'org.reflections:reflections:0.10.2'
testImplementation 'org.openjdk.jmh:jmh-core:1.36'
testImplementation 'org.openjdk.jmh:jmh-generator-annprocess:1.36'
testImplementation 'com.google.guava:guava:32.1.1-jre'
testImplementation 'org.tukaani:xz:1.9'
testImplementation 'com.google.guava:guava:33.5.0-jre'
testImplementation 'com.github.rzymek:opczip:1.2.0'
// prevent slf4j warnings coming from xmlsec -> slf4j-api 1.7.x dependency
// see https://logging.apache.org/log4j/2.x/log4j-slf4j-impl/
testImplementation "org.apache.logging.log4j:log4j-slf4j2-impl:${log4jVersion}"
testImplementation 'org.slf4j:slf4j-simple:2.0.9'
broken("org.apache.xmlgraphics:batik-script:${batikVersion}"){
exclude group: 'xalan', module: 'xalan'
exclude group: 'xml-apis', module: 'xml-apis'
}
testImplementation 'org.slf4j:slf4j-simple:2.0.17'
javadocs project(':poi')
javadocs project(':poi-scratchpad')
}
final String MODULE_NAME = 'org.apache.poi.ooxml'
final Pattern MODULE_NOT_REGEX = ~'(poi[/\\\\][^/\\\\]+$|batik-script)'
final Pattern MODULE_NOT_REGEX = ~'(poi[/\\\\][^/\\\\]+$)'
final Pattern MODULE_REGEX = ~'\\.jar$'
final List MAIN_MODULE_PATH = sourceSets.main.runtimeClasspath.findAll{ it.path =~ MODULE_REGEX }.collect{ it.parent }.unique()
final List TEST_MODULE_PATH = sourceSets.test.runtimeClasspath.findAll{ it.path =~ MODULE_REGEX && !(it.path =~ MODULE_NOT_REGEX) }.collect{ it.parent }.unique() + files("build/brokenJars")
final List TEST_MODULE_PATH = sourceSets.test.runtimeClasspath.findAll{ it.path =~ MODULE_REGEX && !(it.path =~ MODULE_NOT_REGEX) }.collect{ it.parent }.unique()
final String OOXML_LITE_AGENT = "../build/dist/maven/poi-ooxml-lite-agent/poi-ooxml-lite-agent-${project.version}.jar"
final String OOXML_LITE_REPORT = '../src/resources/ooxml-lite-report'
final String OOXML_LITE_INCLUDES = "^(com/microsoft/schemas|org/(etsi|openxmlformats|w3/)|org/apache/poi/schemas)"
compileJava {
dependsOn 'fixBatik', 'cleanupBatik'
}
task compileJava9(type: JavaCompile) {
tasks.register('compileJava9', JavaCompile) {
dependsOn 'compileJava', ':poi:jar'
javaCompiler = javaToolchains.compilerFor {
languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
}
sourceCompatibility = 1.9
targetCompatibility = 1.9
sourceCompatibility = 11
targetCompatibility = 11
destinationDirectory = file(JAVA9_OUT + VERSIONS9)
source = file(JAVA9_SRC)
classpath = files()
options.compilerArgs = [
'--patch-module', "${MODULE_NAME}=${sourceSets.main.output.classesDirs.asPath}",
'--module-path', files(MAIN_MODULE_PATH).asPath
'--patch-module', "${MODULE_NAME}=${sourceSets.main.output.classesDirs.asPath}",
'--module-path', files(MAIN_MODULE_PATH).asPath
]
}
task compileTest9(type: JavaCompile) {
tasks.register('compileTest9', JavaCompile) {
dependsOn 'compileTestJava', ':poi:testJar'
javaCompiler = javaToolchains.compilerFor {
languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
}
sourceCompatibility = 1.9
targetCompatibility = 1.9
sourceCompatibility = 11
targetCompatibility = 11
destinationDirectory = file(TEST9_OUT + VERSIONS9)
source = file(TEST9_SRC)
options.compilerArgs = [
'--patch-module', "${MODULE_NAME}=${(sourceSets.main.output.classesDirs + sourceSets.test.output.classesDirs).asPath}",
'--module-path', files(TEST_MODULE_PATH).asPath
'--patch-module', "${MODULE_NAME}=${(sourceSets.main.output.classesDirs + sourceSets.test.output.classesDirs).asPath}",
'--module-path', files(TEST_MODULE_PATH).asPath
]
classpath = files()
}
jar {
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}")
destinationDirectory = file("../build/dist/maven/${base.archivesName.get()}")
manifest {
attributes('Automatic-Module-Name': MODULE_NAME, 'Multi-Release': 'true')
@ -196,11 +197,11 @@ jar {
// Create a separate jar for test-code to depend on it in other projects
// See http://stackoverflow.com/questions/5144325/gradle-test-dependency
task testJar(type: Jar, dependsOn: testClasses) {
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}-tests")
destinationDirectory = file("../build/dist/maven/${base.archivesName.get()}-tests")
setArchiveClassifier 'tests'
// ignore second module-info.class from main
duplicatesStrategy = 'exclude'
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from sourceSets.test.output + sourceSets.main.output
@ -209,35 +210,16 @@ task testJar(type: Jar, dependsOn: testClasses) {
}
}
// based on https://github.com/moditect/moditect-gradle-plugin/issues/12
task fixBatik(type: Zip) {
ant.mkdir(dir: "${buildDir}/brokenJars")
archiveFileName = "batik-script-${batikVersion}.jar"
destinationDirectory = file("${buildDir}/brokenJars")
from zipTree(configurations.broken.files.find{ f -> f.name.startsWith("batik-script") })
filesMatching("**/org.apache.batik.script.InterpreterFactory") {
it.filter{ it2 -> it2.contains("Rhino") ? "#" + it2 : it2 }
}
}
task cleanupBatik(type: Delete) {
// remove older files to avoid build failures because of duplicate modules
delete fileTree("${buildDir}/brokenJars/").matching {
include "*.jar"
exclude "batik*-${batikVersion}.jar"
}
}
javadoc {
failOnError = true
doFirst {
options {
if (jdkVersion > 8) addBooleanOption('html5', true)
addBooleanOption('html5', true)
links 'https://poi.apache.org/apidocs/dev/'
links 'https://docs.oracle.com/javase/8/docs/api/'
if (jdkVersion >= 23) links 'https://docs.oracle.com/en/java/javase/23/docs/api/' else links 'https://docs.oracle.com/en/java/javase/11/docs/api/'
use = true
splitIndex = true
source = "1.8"
source = "11"
classpath += configurations.javadocs.files
}
}
@ -268,9 +250,6 @@ test {
dependsOn { testJar }
systemProperties['junit.jupiter.execution.parallel.enabled'] = 'true'
if (jdkVersion == 8) {
systemProperties['sun.java2d.renderer'] = 'sun.java2d.marlin.MarlinRenderingEngine'
}
if (NO_SCRATCHPAD) {
useJUnitPlatform {
@ -280,16 +259,12 @@ test {
doFirst {
jvmArgs += [
"-Xverify:all",
"-XX:ErrorFile=../build/hs_err_pid%p.log",
"-javaagent:${OOXML_LITE_AGENT}=${OOXML_LITE_REPORT}|${OOXML_LITE_INCLUDES}"
'-Xverify:all',
'-XX:ErrorFile=../build/hs_err_pid%p.log',
"-javaagent:${OOXML_LITE_AGENT}=${OOXML_LITE_REPORT}|${OOXML_LITE_INCLUDES}",
'--add-modules', MODULE_NAME,
'--module-path', '../build/dist/maven/poi-ooxml-tests' + File.pathSeparator + files(TEST_MODULE_PATH).asPath,
]
if (jdkVersion > 8) {
jvmArgs += [
'--add-modules', MODULE_NAME,
'--module-path', '../build/dist/maven/poi-ooxml-tests' + File.pathSeparator + files(TEST_MODULE_PATH).asPath,
]
}
}
}

View File

@ -14,28 +14,31 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
package org.apache.poi.ooxml;
package org.apache.poi.ooxml.util;
import javax.xml.parsers.ParserConfigurationException;
import org.apache.poi.util.Removal;
import org.apache.poi.util.XMLHelper;
import org.xml.sax.SAXException;
import org.xml.sax.XMLReader;
import org.apache.poi.openxml4j.opc.PackageRelationshipTypes;
import java.net.URI;
/**
* Provides handy methods for working with SAX parsers and readers
* @deprecated use {@link XMLHelper}
* Represents a hyperlink relationship.
*
* @since 5.3.0
*/
@Deprecated
@Removal(version = "6.0.0")
public final class SAXHelper {
public class HyperlinkRelationship extends ReferenceRelationship {
/**
* Creates a new SAX XMLReader, with sensible defaults
* Initializes a new instance of the HyperlinkRelationship.
*
* @param hyperlinkUri The target uri of the hyperlink relationship.
* @param isExternal Is the URI external.
* @param id The relationship ID.
*/
public static XMLReader newXMLReader() throws SAXException, ParserConfigurationException {
return XMLHelper.newXMLReader();
protected HyperlinkRelationship(POIXMLDocumentPart container, URI hyperlinkUri, boolean isExternal, String id) {
super(container, hyperlinkUri, isExternal, PackageRelationshipTypes.HYPERLINK_PART, id);
}
@Override
public String getRelationshipType() {
return PackageRelationshipTypes.HYPERLINK_PART;
}
}

View File

@ -155,7 +155,7 @@ public abstract class POIXMLDocument extends POIXMLDocumentPart implements Close
* @return the document's embedded files
*
* @throws OpenXML4JException if the embedded parts can't be determined
* @since POI 4.0.0
* @since 4.0.0
*/
public abstract List<PackagePart> getAllEmbeddedParts() throws OpenXML4JException;

View File

@ -23,10 +23,11 @@ import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.poi.logging.PoiLogManager;
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
import org.apache.poi.openxml4j.exceptions.OpenXML4JException;
import org.apache.poi.openxml4j.exceptions.PartAlreadyExistsException;
@ -38,13 +39,13 @@ import org.apache.poi.openxml4j.opc.PackageRelationshipCollection;
import org.apache.poi.openxml4j.opc.PackageRelationshipTypes;
import org.apache.poi.openxml4j.opc.PackagingURIHelper;
import org.apache.poi.openxml4j.opc.TargetMode;
import org.apache.poi.util.IOUtils;
import org.apache.poi.util.Internal;
import org.apache.poi.xddf.usermodel.chart.XDDFChart;
import org.apache.poi.xssf.usermodel.XSSFRelation;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.apache.poi.xwpf.usermodel.XWPFDocument;
import org.apache.poi.xwpf.usermodel.XWPFRelation;
import org.apache.xmlbeans.XmlException;
/**
* Represents an entry of a OOXML package.
@ -53,12 +54,13 @@ import org.apache.poi.xwpf.usermodel.XWPFRelation;
* </p>
*/
public class POIXMLDocumentPart {
private static final Logger LOG = LogManager.getLogger(POIXMLDocumentPart.class);
private static final Logger LOG = PoiLogManager.getLogger(POIXMLDocumentPart.class);
private String coreDocumentRel = PackageRelationshipTypes.CORE_DOCUMENT;
private PackagePart packagePart;
private POIXMLDocumentPart parent;
private final Map<String, RelationPart> relations = new LinkedHashMap<>();
private final Map<String, ReferenceRelationship> referenceRelationships = new LinkedHashMap<>();
private boolean isCommitted = false;
/**
@ -166,7 +168,7 @@ public class POIXMLDocumentPart {
*
* @param part - The package part that holds xml data representing this sheet.
* @see #read(POIXMLFactory, Map)
* @since POI 3.14-Beta1
* @since 3.14-Beta1
*/
public POIXMLDocumentPart(PackagePart part) {
this(null, part);
@ -179,7 +181,7 @@ public class POIXMLDocumentPart {
* @param parent - Parent part
* @param part - The package part that holds xml data representing this sheet.
* @see #read(POIXMLFactory, Map)
* @since POI 3.14-Beta1
* @since 3.14-Beta1
*/
public POIXMLDocumentPart(POIXMLDocumentPart parent, PackagePart part) {
this.packagePart = part;
@ -231,9 +233,14 @@ public class POIXMLDocumentPart {
}
/**
* Returns the list of child relations for this POIXMLDocumentPart
* Returns the list of child relations for this POIXMLDocumentPart.
*
* <p>
* Since POI 5.3.0, Reference Relationships are stored separately from other child relations.
* </p>
*
* @return child relations
* @see #getReferenceRelationships() for reference relationships (e.g. hyperlinks)
*/
public final List<RelationPart> getRelationParts() {
List<RelationPart> l = new ArrayList<>(relations.values());
@ -252,7 +259,7 @@ public class POIXMLDocumentPart {
*/
public final POIXMLDocumentPart getRelationById(String id) {
RelationPart rp = getRelationPartById(id);
return (rp == null) ? null : rp.getDocumentPart();
return rp == null ? null : rp.getDocumentPart();
}
/**
@ -640,38 +647,56 @@ public class POIXMLDocumentPart {
// scan breadth-first, so parent-relations are hopefully the shallowest element
for (PackageRelationship rel : rels) {
if (rel.getTargetMode() == TargetMode.INTERNAL) {
URI uri = rel.getTargetURI();
if (Objects.equals(rel.getRelationshipType(), PackageRelationshipTypes.HYPERLINK_PART)) {
referenceRelationships.put(rel.getId(), new HyperlinkRelationship(this, rel.getTargetURI(), rel.getTargetMode() == TargetMode.EXTERNAL, rel.getId()));
} else {
if (rel.getTargetMode() == TargetMode.INTERNAL) {
URI uri = rel.getTargetURI();
// check for internal references (e.g. '#Sheet1!A1')
PackagePartName relName;
if (uri.getRawFragment() != null) {
relName = PackagingURIHelper.createPartName(uri.getPath());
} else {
relName = PackagingURIHelper.createPartName(uri);
}
final PackagePart p = packagePart.getPackage().getPart(relName);
if (p == null) {
LOG.atError().log("Skipped invalid entry {}", rel.getTargetURI());
continue;
}
POIXMLDocumentPart childPart = context.get(p);
if (childPart == null) {
childPart = factory.createDocumentPart(this, p);
//here we are checking if part if embedded and excel then set it to chart class
//so that at the time to writing we can also write updated embedded part
if (this instanceof XDDFChart && childPart instanceof XSSFWorkbook) {
((XDDFChart) this).setWorkbook((XSSFWorkbook) childPart);
// check for internal references (e.g. '#Sheet1!A1')
PackagePartName relName;
if (uri.getRawFragment() != null) {
relName = PackagingURIHelper.createPartName(uri.getPath());
} else {
relName = PackagingURIHelper.createPartName(uri);
}
childPart.parent = this;
// already add child to context, so other children can reference it
context.put(p, childPart);
readLater.add(childPart);
}
addRelation(rel, childPart);
final PackagePart p = packagePart.getPackage().getPart(relName);
if (p == null) {
LOG.atError().log("Skipped invalid entry {}", rel.getTargetURI());
continue;
}
POIXMLDocumentPart childPart = context.get(p);
if (childPart == null) {
try {
childPart = factory.createDocumentPart(this, p);
} catch (POIXMLException e) {
if (e.getCause() instanceof XmlException
&& XSSFRelation.CHART.getRelation().equals(rel.getRelationshipType())) {
// https://github.com/apache/poi/pull/982
// only allow this skipping event for charts
// we need to be careful about not catching every exception here because
// issues like zip bomb exceptions need to thrown and not ignored
LOG.atWarn().log("Skipped unsupported part: {}", e.getMessage());
continue;
} else {
throw e;
}
}
//here we are checking if part is embedded and excel then set it to chart class
//so that at the time to writing we can also write updated embedded part
if (this instanceof XDDFChart && childPart instanceof XSSFWorkbook) {
((XDDFChart) this).setWorkbook((XSSFWorkbook) childPart);
}
childPart.parent = this;
// already add child to context, so other children can reference it
context.put(p, childPart);
readLater.add(childPart);
}
addRelation(rel, childPart);
}
}
}
@ -734,6 +759,63 @@ public class POIXMLDocumentPart {
part.onDocumentRead();
}
/**
* Remove the reference relationship to the specified part in this package.
*
* @param relId the part which is to be removed
* @return true, if the relation was removed
* @since 5.3.0
*/
public final boolean removeReferenceRelationship(String relId) {
ReferenceRelationship existing = referenceRelationships.remove(relId);
if (existing != null) {
packagePart.removeRelationship(relId);
return true;
}
return false;
}
/**
* Get the reference relationship with the specified id.
*
* @param relId the relation id
* @return the reference relationship or {@code null} if not found
* @since 5.3.0
*/
public final ReferenceRelationship getReferenceRelationship(String relId) {
return referenceRelationships.get(relId);
}
/**
* Create a new reference relationship for this POIXMLDocumentPart.
*
* @param uri the URI of the target part
* @param isExternal true, if the target is an external resource
* @param relId the relation id
* @return the created reference relationship
* @since 5.3.0
*/
public final HyperlinkRelationship createHyperlink(URI uri, boolean isExternal, String relId) {
packagePart.addRelationship(uri, isExternal ? TargetMode.EXTERNAL : TargetMode.INTERNAL,
PackageRelationshipTypes.HYPERLINK_PART, relId);
HyperlinkRelationship hyperlink = new HyperlinkRelationship(this, uri, isExternal, relId);
referenceRelationships.put(relId, hyperlink);
return hyperlink;
}
/**
* Returns an unmodifiable list of reference relationships for this POIXMLDocumentPart.
*
* @return reference relationships
* @since 5.3.0
* @see #getRelationParts() for child relations
*/
public final List<ReferenceRelationship> getReferenceRelationships() {
List<ReferenceRelationship> list = new ArrayList<>(referenceRelationships.values());
return Collections.unmodifiableList(list);
}
/**
* Retrieves the core document part
*
@ -746,7 +828,7 @@ public class POIXMLDocumentPart {
if (coreRel != null) {
PackagePart pp = pkg.getPart(coreRel);
if (pp == null) {
IOUtils.closeQuietly(pkg);
pkg.revert();
throw new POIXMLException("OOXML file structure broken/invalid - core document '" + coreRel.getTargetURI() + "' not found.");
}
return pp;
@ -754,16 +836,16 @@ public class POIXMLDocumentPart {
coreRel = pkg.getRelationshipsByType(PackageRelationshipTypes.STRICT_CORE_DOCUMENT).getRelationship(0);
if (coreRel != null) {
IOUtils.closeQuietly(pkg);
pkg.revert();
throw new POIXMLException("Strict OOXML isn't currently supported, please see bug #57699");
}
IOUtils.closeQuietly(pkg);
pkg.revert();
throw new POIXMLException("OOXML file structure broken/invalid - no core document found!");
} catch (POIXMLException e) {
throw e;
} catch (RuntimeException e) {
IOUtils.closeQuietly(pkg);
pkg.revert();
throw new POIXMLException("OOXML file structure broken/invalid", e);
}
}

View File

@ -19,7 +19,7 @@ package org.apache.poi.ooxml;
/**
* Indicates a generic OOXML error.
*/
public final class POIXMLException extends RuntimeException{
public final class POIXMLException extends RuntimeException {
/**
* Create a new {@code POIXMLException} with no
* detail message.

View File

@ -18,8 +18,8 @@ package org.apache.poi.ooxml;
import java.io.IOException;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.poi.logging.PoiLogManager;
import org.apache.poi.ooxml.POIXMLRelation.PackagePartConstructor;
import org.apache.poi.ooxml.POIXMLRelation.ParentPartConstructor;
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
@ -31,7 +31,7 @@ import org.apache.xmlbeans.XmlException;
* Defines a factory API that enables sub-classes to create instances of <code>POIXMLDocumentPart</code>
*/
public abstract class POIXMLFactory {
private static final Logger LOGGER = LogManager.getLogger(POIXMLFactory.class);
private static final Logger LOGGER = PoiLogManager.getLogger(POIXMLFactory.class);
/**
* Create a POIXMLDocumentPart from existing package part and relation. This method is called
@ -75,7 +75,7 @@ public abstract class POIXMLFactory {
* @param relationshipType the relationship type of the descriptor
* @return the descriptor or null if type is unknown
*
* @since POI 3.14-Beta1
* @since 3.14-Beta1
*/
protected abstract POIXMLRelation getDescriptor(String relationshipType);
@ -104,7 +104,7 @@ public abstract class POIXMLFactory {
*
* @throws POIXMLException if the relations are erroneous or the part is not related
*
* @since POI 3.14-Beta1
* @since 3.14-Beta1
*/
protected PackageRelationship getPackageRelationship(POIXMLDocumentPart parent, PackagePart part) {
try {

View File

@ -316,11 +316,11 @@ public class POIXMLProperties {
public void setLastPrinted(String date) throws InvalidFormatException {
part.setLastPrintedProperty(date);
}
/** @since POI 3.15 beta 3 */
/** @since 3.15 beta 3 */
public String getLastModifiedByUser() {
return part.getLastModifiedByProperty().orElse(null);
}
/** @since POI 3.15 beta 3 */
/** @since 3.15 beta 3 */
public void setLastModifiedByUser(String user) {
part.setLastModifiedByProperty(user);
}
@ -349,7 +349,7 @@ public class POIXMLProperties {
/**
* Sets the version property.
* @param version property value
* @since POI 5.2.3
* @since 5.2.3
*/
public void setVersion(String version) {
part.setVersionProperty(version);
@ -358,7 +358,7 @@ public class POIXMLProperties {
/**
* Returns the version property value.
* @return version property (can be null)
* @since POI 5.2.3
* @since 5.2.3
*/
public String getVersion() {
return part.getVersionProperty().orElse(null);
@ -399,7 +399,7 @@ public class POIXMLProperties {
}
return null;
}
/** @since POI 4.1.1 */
/** @since 4.1.1 */
public void setTemplate(String template) {
props.getProperties().setTemplate(template);
}
@ -409,7 +409,7 @@ public class POIXMLProperties {
}
return null;
}
/** @since POI 4.1.1 */
/** @since 4.1.1 */
public void setManager(String manager) {
props.getProperties().setManager(manager);
}
@ -419,7 +419,7 @@ public class POIXMLProperties {
}
return null;
}
/** @since POI 4.1.1 */
/** @since 4.1.1 */
public void setCompany(String company) {
props.getProperties().setCompany(company);
}
@ -429,7 +429,7 @@ public class POIXMLProperties {
}
return null;
}
/** @since POI 4.1.1 */
/** @since 4.1.1 */
public void setPresentationFormat(String presentationFormat) {
props.getProperties().setPresentationFormat(presentationFormat);
}
@ -439,7 +439,7 @@ public class POIXMLProperties {
}
return null;
}
/** @since POI 4.1.1 */
/** @since 4.1.1 */
public void setApplication(String application) {
props.getProperties().setApplication(application);
}
@ -449,7 +449,7 @@ public class POIXMLProperties {
}
return null;
}
/** @since POI 4.1.1 */
/** @since 4.1.1 */
public void setAppVersion(String appVersion) {
props.getProperties().setAppVersion(appVersion);
}
@ -460,7 +460,7 @@ public class POIXMLProperties {
}
return -1;
}
/** @since POI 4.1.1 */
/** @since 4.1.1 */
public void setPages(int pages) {
props.getProperties().setPages(pages);
}
@ -470,7 +470,7 @@ public class POIXMLProperties {
}
return -1;
}
/** @since POI 4.1.1 */
/** @since 4.1.1 */
public void setWords(int words) {
props.getProperties().setWords(words);
}
@ -480,7 +480,7 @@ public class POIXMLProperties {
}
return -1;
}
/** @since POI 4.1.1 */
/** @since 4.1.1 */
public void setCharacters(int characters) {
props.getProperties().setCharacters(characters);
}
@ -490,7 +490,7 @@ public class POIXMLProperties {
}
return -1;
}
/** @since POI 4.1.1 */
/** @since 4.1.1 */
public void setCharactersWithSpaces(int charactersWithSpaces) {
props.getProperties().setCharactersWithSpaces(charactersWithSpaces);
}
@ -500,7 +500,7 @@ public class POIXMLProperties {
}
return -1;
}
/** @since POI 4.1.1 */
/** @since 4.1.1 */
public void setLines(int lines) {
props.getProperties().setLines(lines);
}
@ -510,7 +510,7 @@ public class POIXMLProperties {
}
return -1;
}
/** @since POI 4.1.1 */
/** @since 4.1.1 */
public void setParagraphs(int paragraphs) {
props.getProperties().setParagraphs(paragraphs);
}
@ -520,7 +520,7 @@ public class POIXMLProperties {
}
return -1;
}
/** @since POI 4.1.1 */
/** @since 4.1.1 */
public void setSlides(int slides) {
props.getProperties().setSlides(slides);
}
@ -530,7 +530,7 @@ public class POIXMLProperties {
}
return -1;
}
/** @since POI 4.1.1 */
/** @since 4.1.1 */
public void setNotes(int notes) {
props.getProperties().setNotes(notes);
}
@ -540,7 +540,7 @@ public class POIXMLProperties {
}
return -1;
}
/** @since POI 4.1.1 */
/** @since 4.1.1 */
public void setTotalTime(int totalTime) {
props.getProperties().setTotalTime(totalTime);
}
@ -550,7 +550,7 @@ public class POIXMLProperties {
}
return -1;
}
/** @since POI 4.1.1 */
/** @since 4.1.1 */
public void setHiddenSlides(int hiddenSlides) {
props.getProperties().setHiddenSlides(hiddenSlides);
}
@ -560,7 +560,7 @@ public class POIXMLProperties {
}
return -1;
}
/** @since POI 4.1.1 */
/** @since 4.1.1 */
public void setMMClips(int mmClips) {
props.getProperties().setMMClips(mmClips);
}
@ -571,7 +571,7 @@ public class POIXMLProperties {
}
return null;
}
/** @since POI 4.1.1 */
/** @since 4.1.1 */
public void setHyperlinkBase(String hyperlinkBase) {
props.getProperties().setHyperlinkBase(hyperlinkBase);
}

View File

@ -20,8 +20,8 @@ import java.io.IOException;
import java.io.InputStream;
import java.util.Iterator;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.poi.logging.PoiLogManager;
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
import org.apache.poi.openxml4j.opc.PackagePart;
import org.apache.poi.openxml4j.opc.PackagePartName;
@ -51,7 +51,7 @@ public abstract class POIXMLRelation {
POIXMLDocumentPart init(POIXMLDocumentPart parent, PackagePart part) throws IOException, XmlException;
}
private static final Logger LOGGER = LogManager.getLogger(POIXMLRelation.class);
private static final Logger LOGGER = PoiLogManager.getLogger(POIXMLRelation.class);
/**
* Describes the content stored in a part.

Some files were not shown because too many files have changed in this diff Show More