Compare commits

...

1888 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
PJ Fanning
d2ae0574e0 prep v5.2.4
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912467 13f79535-47bb-0310-9956-ffa450edef68
2023-09-21 18:43:24 +00:00
Dominik Stadler
c79fb75cbc Bug 66425: Avoid exceptions found via poi-fuzz
We try to avoid throwing NullPointerException, ClassCastExceptions and StackOverflowException, but it was possible
to trigger them

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

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912464 13f79535-47bb-0310-9956-ffa450edef68
2023-09-21 15:06:28 +00:00
PJ Fanning
a9aa91a9ed [bug-67396] add tests for standalone flag
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912456 13f79535-47bb-0310-9956-ffa450edef68
2023-09-21 12:15:20 +00:00
Tim Allison
99117381e5 Bug47950 -- make stream/directory name lookup in OLE2 case insensitive
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912438 13f79535-47bb-0310-9956-ffa450edef68
2023-09-20 20:32:59 +00:00
Dominik Stadler
ce919673c4 Bug 66425: Avoid exceptions found via poi-fuzz
We try to avoid throwing NullPointerException, ClassCastExceptions and StackOverflowException, but it was possible
to trigger them

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

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912433 13f79535-47bb-0310-9956-ffa450edef68
2023-09-20 14:55:19 +00:00
Dominik Stadler
857b96b2d3 Test without scratchpad: Do not fail reading data for integrationtests
It seems the XLS now has missing cells which cause an NPE
while checking for scratchpad-handlers

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912407 13f79535-47bb-0310-9956-ffa450edef68
2023-09-18 20:31:03 +00:00
Dominik Stadler
e7cb6ef5b2 Set one file to IGNORE as IBM JDK throws a different Exception
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912406 13f79535-47bb-0310-9956-ffa450edef68
2023-09-18 20:30:59 +00:00
Dominik Stadler
54f8384f0a Set one test-file to "IGNORED" in poi-integration
It was processing fine on some JVM versions, but failed with an error on others.
Seems there is a difference in XmlParsers across versions of the JVM.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912404 13f79535-47bb-0310-9956-ffa450edef68
2023-09-18 18:25:59 +00:00
Dominik Stadler
c32699c5b0 Adjust max recursion nesting
Otherwise this still triggered StackOverflow on some version of JDK

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912403 13f79535-47bb-0310-9956-ffa450edef68
2023-09-18 18:25:56 +00:00
Dominik Stadler
88bbfbb3f7 Bug 66425: Avoid exceptions found via poi-fuzz
We try to avoid throwing NullPointerException, ClassCastExceptions and StackOverflowException, but it was possible
to trigger them

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

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912383 13f79535-47bb-0310-9956-ffa450edef68
2023-09-18 06:38:37 +00:00
PJ Fanning
836512cc1f update changes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912373 13f79535-47bb-0310-9956-ffa450edef68
2023-09-17 16:39:35 +00:00
PJ Fanning
4299690639 use files nio APIs in more places
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912367 13f79535-47bb-0310-9956-ffa450edef68
2023-09-17 15:29:16 +00:00
PJ Fanning
8514b659ae [bug-67442] add test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912366 13f79535-47bb-0310-9956-ffa450edef68
2023-09-17 14:49:16 +00:00
Dominik Stadler
9e2ce70d2b Bug 66425: Avoid NullPointerExceptions and ClassCastExceptions found via poi-fuzz
We try to avoid throwing NullPointerException and ClassCastExceptions, but it was possible
to trigger them

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

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912365 13f79535-47bb-0310-9956-ffa450edef68
2023-09-17 14:38:24 +00:00
PJ Fanning
4b520ff7c5 use more nio file support
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912316 13f79535-47bb-0310-9956-ffa450edef68
2023-09-14 15:49:10 +00:00
PJ Fanning
4afcb281ce [bug-67005] XSLFPictureShape - audio-related methods. Thanks to Max
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912315 13f79535-47bb-0310-9956-ffa450edef68
2023-09-14 14:56:01 +00:00
PJ Fanning
3a6b91dd1f [bug-67402] DATEVALUE function should return #VALUE! for a null or empty string argument. Thanks to Jakub Vojtisek.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912313 13f79535-47bb-0310-9956-ffa450edef68
2023-09-14 14:13:22 +00:00
PJ Fanning
16a1e36018 missing header
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912306 13f79535-47bb-0310-9956-ffa450edef68
2023-09-14 11:56:02 +00:00
PJ Fanning
542daa2ab8 [bug-67396] StreamHelper does not set standalone=yes when built-in javax Transformer is used
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912305 13f79535-47bb-0310-9956-ffa450edef68
2023-09-14 11:23:05 +00:00
Dominik Stadler
e9b860f6d4 Bug 66425: Avoid NullPointerExceptions found via poi-fuzz
We try to avoid throwing NullPointerException, but it was possible
to trigger one here

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912303 13f79535-47bb-0310-9956-ffa450edef68
2023-09-14 09:23:02 +00:00
Dominik Stadler
cc4ccbae1d Bug 66425: Avoid NullPointerExceptions found via poi-fuzz
We try to avoid throwing NullPointerException, but it was possible
to trigger one here

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912281 13f79535-47bb-0310-9956-ffa450edef68
2023-09-13 10:59:54 +00:00
Dominik Stadler
4b70989156 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

Fixes https://oss-fuzz.com/testcase-detail/5265527465181184

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912277 13f79535-47bb-0310-9956-ffa450edef68
2023-09-13 07:48:22 +00:00
PJ Fanning
ca681fd706 [bug-63934] Fix parsing of structure references. Thanks to Matthias Raschhofer. This closes #514
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912263 13f79535-47bb-0310-9956-ffa450edef68
2023-09-12 10:36:14 +00:00
Dominik Stadler
e94297bb64 Bug 66425: Avoid a NullPointerException found via oss-fuzz
Ignore results of one file because the Exception is different in Java 8 and Java 11

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912254 13f79535-47bb-0310-9956-ffa450edef68
2023-09-11 18:25:21 +00:00
Dominik Stadler
cc9d1c7c70 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=62225

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912253 13f79535-47bb-0310-9956-ffa450edef68
2023-09-11 18:25:18 +00:00
Dominik Stadler
481c00bc6f Bug 66425: Avoid a ClassCastException found via oss-fuzz
We try to avoid throwing ClassCastException, 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=62170

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912252 13f79535-47bb-0310-9956-ffa450edef68
2023-09-11 18:25:13 +00:00
Dominik Stadler
e666d3756e 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=62208

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912251 13f79535-47bb-0310-9956-ffa450edef68
2023-09-11 18:25:06 +00:00
Dominik Stadler
dbd8808432 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=62216

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912250 13f79535-47bb-0310-9956-ffa450edef68
2023-09-11 18:25:01 +00:00
Dominik Stadler
482f4ca30d Bug 66828: Update Ant to 1.10.14
Now that adding the file allow.class was reverted, we should
be able to update

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912249 13f79535-47bb-0310-9956-ffa450edef68
2023-09-11 18:24:54 +00:00
PJ Fanning
67112540b9 commons-compress 1.24.0
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912246 13f79535-47bb-0310-9956-ffa450edef68
2023-09-11 14:34:51 +00:00
Dominik Stadler
d7884a4e0f Adjust expected exception text for 47889.xlsx
The actual message depends on the version of Java

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912200 13f79535-47bb-0310-9956-ffa450edef68
2023-09-08 16:02:17 +00:00
Dominik Stadler
5cb768379d 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=62128

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912199 13f79535-47bb-0310-9956-ffa450edef68
2023-09-08 16:02:13 +00:00
Dominik Stadler
f90415ef0e 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=62151

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912198 13f79535-47bb-0310-9956-ffa450edef68
2023-09-08 16:02:06 +00:00
Dominik Stadler
e686e84512 Bug 66425: Avoid a ClassCastException found via oss-fuzz
We try to avoid throwing ClassCastException, but it was possible
to trigger one here with a specially crafted input-file

Also add SXSSFWorkbook.write() to integrationtests

Fixes https://oss-fuzz.com/testcase-detail/5185049589579776

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

Fixes https://oss-fuzz.com/testcase-detail/4959857092198400

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912157 13f79535-47bb-0310-9956-ffa450edef68
2023-09-07 08:35:23 +00:00
PJ Fanning
40cdc76f63 [GitHub-511] Prevent artificial row creation when reading XWPFTable. Thanks to Christian Appl. This closes #511
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912149 13f79535-47bb-0310-9956-ffa450edef68
2023-09-06 22:32:28 +00:00
PJ Fanning
9821182d57 SparseBitSet 1.3
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912141 13f79535-47bb-0310-9956-ffa450edef68
2023-09-06 15:12:52 +00:00
Dominik Stadler
aad473eaca Bug 66425: Avoid a ClassCastException found via oss-fuzz
We try to avoid throwing ClassCastException, but it was possible
to trigger one here with a specially crafted input-file

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912140 13f79535-47bb-0310-9956-ffa450edef68
2023-09-06 14:58:31 +00:00
Dominik Stadler
5d073e3586 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

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912139 13f79535-47bb-0310-9956-ffa450edef68
2023-09-06 14:48:58 +00:00
Dominik Stadler
24bf8c33f2 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

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912138 13f79535-47bb-0310-9956-ffa450edef68
2023-09-06 14:33:59 +00:00
Dominik Stadler
b801711afe 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=62059

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912127 13f79535-47bb-0310-9956-ffa450edef68
2023-09-06 10:38:51 +00:00
Dominik Stadler
04ae3b4441 Reduce flakiness of one test which compares two documents
There are more places where a timestamp is stored in the zip-file, 
let's try to replace some more bytes to make comparison succeed
more often.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912126 13f79535-47bb-0310-9956-ffa450edef68
2023-09-06 09:53:29 +00:00
Dominik Stadler
4b03c24ec8 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=62074

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912125 13f79535-47bb-0310-9956-ffa450edef68
2023-09-06 09:48:21 +00:00
Dominik Stadler
35901849f1 Exclude more broken files when running without poi-scratchpad
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912123 13f79535-47bb-0310-9956-ffa450edef68
2023-09-06 07:46:58 +00:00
Dominik Stadler
186e91790a Exclude more broken files when running without poi-scratchpad
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912122 13f79535-47bb-0310-9956-ffa450edef68
2023-09-06 07:20:39 +00:00
Dominik Stadler
9f4c5b8e45 Revert PDFBox back to 2.0.x as 3.0.0 causes Java module errors
Seems Batik conflicts with newer PDFBox in some way

Error are like "module batik.xml reads package org.apache.pdfbox.multipdf from both de.rototor.pdfbox.graphics2d and org.apache.pdfbox"

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912121 13f79535-47bb-0310-9956-ffa450edef68
2023-09-06 07:14:14 +00:00
PJ Fanning
9c0c9ac8e4 slf4j 2.0.9
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912088 13f79535-47bb-0310-9956-ffa450edef68
2023-09-04 14:57:03 +00:00
Dominik Stadler
2999073715 Apply some IDE suggestions, add tests, set unit-test to isolated
Without Isolation, one test did change static settings 
and thus could cause flaky tests

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911891 13f79535-47bb-0310-9956-ffa450edef68
2023-08-24 08:53:01 +00:00
Dominik Stadler
cdb2ba1398 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=61441

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911890 13f79535-47bb-0310-9956-ffa450edef68
2023-08-24 08:48:45 +00:00
Dominik Stadler
e4ba9822cc Bug 66425: Avoid a NullPointerException found via oss-fuzz
ArrayIndexOutOfBoundsException has different message depending on JDK

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911864 13f79535-47bb-0310-9956-ffa450edef68
2023-08-23 10:00:16 +00:00
Dominik Stadler
0654bf9d87 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=61520

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911863 13f79535-47bb-0310-9956-ffa450edef68
2023-08-23 09:30:00 +00:00
Dominik Stadler
fd29772be6 Bug 66425: Avoid a ClassCastException found via oss-fuzz
We try to avoid throwing ClassCastException, 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=61578

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911860 13f79535-47bb-0310-9956-ffa450edef68
2023-08-23 08:26:27 +00:00
Dominik Stadler
1b88529d07 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=61644

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911842 13f79535-47bb-0310-9956-ffa450edef68
2023-08-22 14:22:06 +00:00
PJ Fanning
5a4193b14d batik 1.17
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911828 13f79535-47bb-0310-9956-ffa450edef68
2023-08-21 15:16:27 +00:00
PJ Fanning
c3f4201831 change test broken by bug-66988 change
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911755 13f79535-47bb-0310-9956-ffa450edef68
2023-08-18 13:08:13 +00:00
PJ Fanning
f07be05484 gradle 8.3
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911751 13f79535-47bb-0310-9956-ffa450edef68
2023-08-18 09:43:49 +00:00
PJ Fanning
1bdfdcc793 [bug-66988] Fully replace content of XWPFTableCell on setText. Thanks to Anton Oellerer. This closes #503
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911749 13f79535-47bb-0310-9956-ffa450edef68
2023-08-18 08:48:18 +00:00
PJ Fanning
1c1cff4357 gradle 8.2.1
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911737 13f79535-47bb-0310-9956-ffa450edef68
2023-08-17 08:48:31 +00:00
Dominik Stadler
9ae14ef6f0 Bug 66425: Avoid a ClassCastException found via oss-fuzz
We try to avoid throwing ClassCastException, 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=61400

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911618 13f79535-47bb-0310-9956-ffa450edef68
2023-08-12 17:37:14 +00:00
Dominik Stadler
733d3d10ea 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=61390

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911615 13f79535-47bb-0310-9956-ffa450edef68
2023-08-12 14:53:58 +00:00
Dominik Stadler
757708fb54 Jenkins DSL: Adjust nodes for job Test-Environment
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911614 13f79535-47bb-0310-9956-ffa450edef68
2023-08-12 14:53:54 +00:00
Dominik Stadler
0a932be11d Jenkins DSL: Add JDK 20, 21 and 22, disable JDK 18 and 19, remove JDK 10, 12, 13, 14
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911613 13f79535-47bb-0310-9956-ffa450edef68
2023-08-12 14:53:51 +00:00
PJ Fanning
5bedd077a6 curvesapi 1.08
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911604 13f79535-47bb-0310-9956-ffa450edef68
2023-08-11 14:52:47 +00:00
Dominik Stadler
f034ca26b9 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=61372

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911603 13f79535-47bb-0310-9956-ffa450edef68
2023-08-11 14:46:04 +00:00
PJ Fanning
d152861036 [bug-66855] Formula parser incorrectly handles sheet name containing multiple single quotes in a row. Thanks to Kirill lebedev. This closes #496
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911589 13f79535-47bb-0310-9956-ffa450edef68
2023-08-10 09:38:39 +00:00
PJ Fanning
a6a37bd0f0 add check for number of files inside zip
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911588 13f79535-47bb-0310-9956-ffa450edef68
2023-08-10 09:27:26 +00:00
Dominik Stadler
80264d5648 Bug 66425: Avoid a ClassCastException found via oss-fuzz
We try to avoid throwing ClassCastException, 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=61330

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911586 13f79535-47bb-0310-9956-ffa450edef68
2023-08-10 06:14:44 +00:00
Dominik Stadler
316738c9d0 Bug 66425: Avoid a NullPointerException found via oss-fuzz
Handle some data that can be missing properly.

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

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911585 13f79535-47bb-0310-9956-ffa450edef68
2023-08-10 04:54:25 +00:00
Dominik Stadler
d9106c60fd Jenkins DSL: Add JDK 20 and 21 to Test-Environment job
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911584 13f79535-47bb-0310-9956-ffa450edef68
2023-08-10 04:37:47 +00:00
Dominik Stadler
107def2e65 Bug 66425: Avoid a StackOverflowException found via oss-fuzz
We try to avoid causing StackOverflow, but it was possible
to trigger one here with a specially crafted input-file.

This puts a limit on the number of nested children in place
and logs a warning when the Stream is not fully parsed.

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

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911577 13f79535-47bb-0310-9956-ffa450edef68
2023-08-09 16:16:49 +00:00
Dominik Stadler
ccec6c4bf8 Bug 66425: Avoid a ClassCastException found via oss-fuzz
We try to avoid throwing ClassCastException, 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=61306

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911573 13f79535-47bb-0310-9956-ffa450edef68
2023-08-09 10:09:16 +00:00
Dominik Stadler
b757cf607e Try to adjust for strange null-message for ArrayIndexOutOfBoundsException
Some CI runs seem to throw the exception with an empty message instead of 
the expected text.

I could not reproduce this consistently and so we only can disable a
check in this case.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911572 13f79535-47bb-0310-9956-ffa450edef68
2023-08-09 09:53:54 +00:00
Dominik Stadler
fdeae16b0c Bug 66425: Avoid a ClassCastException found via oss-fuzz
We try to avoid throwing ClassCastException, 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=61317

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911565 13f79535-47bb-0310-9956-ffa450edef68
2023-08-09 07:23:04 +00:00
Dominik Stadler
e25c467209 Combine steps for tasks "jenkins" and "jenkinsLite" in one place
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911564 13f79535-47bb-0310-9956-ffa450edef68
2023-08-09 07:22:30 +00:00
Dominik Stadler
2e8afc0c01 Bug 66425: Avoid a StackOverflowException found via oss-fuzz
We try to avoid causing StackOverflow, but it was possible
to trigger one here with a specially crafted input-file.

This puts a limit on the number of nested properties in place
and logs a warning when the StyleSheet is not fully parsed.

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

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911563 13f79535-47bb-0310-9956-ffa450edef68
2023-08-09 05:45:21 +00:00
Dominik Stadler
543d6ad54b Do not disable all files for poi-integration in build.gradle
It seems doing it this way can kick in even when using JDK 11+ due 
to the Gradle toolchain.

Let's rather do a more specific exclusion in code to only exclude files
which actually cause JDK 8 to hang.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911562 13f79535-47bb-0310-9956-ffa450edef68
2023-08-09 05:44:01 +00:00
Dominik Stadler
e706f37170 Bug 66425: Avoid a ClassCastException found via oss-fuzz
We try to avoid throwing ClassCastException, 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=61276

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911536 13f79535-47bb-0310-9956-ffa450edef68
2023-08-08 08:48:13 +00:00
Dominik Stadler
1b7613329e Bug 66425: Add memory-safeguard in one more place
We try to generally avoid overly large allocations in places
where arrays are allocated. 

We add one more such check for pictures in HSLF.

We might need to increase the used value of 10MB if users report 
larger files being used frequently. 

Overriding this check via IOUtils is possible.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911525 13f79535-47bb-0310-9956-ffa450edef68
2023-08-07 20:35:59 +00:00
Dominik Stadler
163ff25594 Bug 66425: Avoid a ClassCastException 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=61266

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911523 13f79535-47bb-0310-9956-ffa450edef68
2023-08-07 20:01:19 +00:00
Dominik Stadler
f3997b49ef Bug 66425: Avoid a ClassCastException found via oss-fuzz
Fix previous changes

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911522 13f79535-47bb-0310-9956-ffa450edef68
2023-08-07 19:59:04 +00:00
PJ Fanning
ac9da84c86 use of junit internal StringUtils is causing build issues
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911519 13f79535-47bb-0310-9956-ffa450edef68
2023-08-07 19:11:54 +00:00
PJ Fanning
3b9a7c42c1 use of junit internal StringUtils is causing build issues
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911518 13f79535-47bb-0310-9956-ffa450edef68
2023-08-07 18:33:24 +00:00
Dominik Stadler
8e40aabb18 Bug 66425: Avoid a ClassCastException found via oss-fuzz
We try to avoid throwing ClassCastException, 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=61259

Also fix handling of NullPointerException

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911517 13f79535-47bb-0310-9956-ffa450edef68
2023-08-07 16:18:46 +00:00
Dominik Stadler
738d533a83 Reduce log4j2 level for integration tests to ERROR
Otherwise there is lots of output that is likely rarely useful. 

This can be changed locally for testing easily whenever necessary.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911516 13f79535-47bb-0310-9956-ffa450edef68
2023-08-07 15:17:10 +00:00
Dominik Stadler
5efa428ca0 Bug 66425: Avoid a ClassCastException found via oss-fuzz
We try to avoid throwing ClassCastException, 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=61242

Also enhance output of some test-failures and allow an empty exception message

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911515 13f79535-47bb-0310-9956-ffa450edef68
2023-08-07 15:15:38 +00:00
Dominik Stadler
2c5264277a Bug 66425: Avoid an AssertionError found via oss-fuzz
We try to avoid throwing AssertionError to be triggered by input data, 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=61251

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911514 13f79535-47bb-0310-9956-ffa450edef68
2023-08-07 14:32:11 +00:00
Dominik Stadler
f6b1435db1 Bug 66425: Avoid a ClassCastException found via oss-fuzz
We try to avoid throwing ClassCastException, 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=61243

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911507 13f79535-47bb-0310-9956-ffa450edef68
2023-08-07 12:09:31 +00:00
Dominik Stadler
ed12f1bb49 Open configuration file for integration-tests read-only to not fail if the file is opened by an Application locally
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911504 13f79535-47bb-0310-9956-ffa450edef68
2023-08-07 11:11:45 +00:00
Dominik Stadler
a8b31c37a6 Bug 66425: Avoid a ClassCastException found via oss-fuzz
Add exception details and fix expected exceptions to make tests run again

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911503 13f79535-47bb-0310-9956-ffa450edef68
2023-08-07 11:11:08 +00:00
Dominik Stadler
31fd087a48 Bug 66425: Avoid a ClassCastException found via oss-fuzz
We try to avoid throwing ClassCastException, 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=61249

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911501 13f79535-47bb-0310-9956-ffa450edef68
2023-08-07 09:42:17 +00:00
Dominik Stadler
6f054ddce1 Fix expected exception text and print out which FileHandler failed in integration-tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911495 13f79535-47bb-0310-9956-ffa450edef68
2023-08-06 17:13:46 +00:00
Dominik Stadler
1e8e95c3a6 Bug 66425: Avoid a ClassCastException found via oss-fuzz
We try to avoid throwing ClassCastException, but it was possible
to trigger one here with a specially crafted input-file

Also rework test a bit to use try-with-resources and proper formatting

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

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911494 13f79535-47bb-0310-9956-ffa450edef68
2023-08-06 14:57:47 +00:00
PJ Fanning
e5ff0e4eb6 upgrade junit
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911476 13f79535-47bb-0310-9956-ffa450edef68
2023-08-06 08:39:16 +00:00
PJ Fanning
91c4ec6a45 avoid creating enumeration twice
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911470 13f79535-47bb-0310-9956-ffa450edef68
2023-08-05 22:20:38 +00:00
PJ Fanning
ddef604f46 upgrade com.dorongold.task-tree
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911469 13f79535-47bb-0310-9956-ffa450edef68
2023-08-05 14:42:47 +00:00
PJ Fanning
bfd3a59813 add back gradle wrapper jar due to windows build issues
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911468 13f79535-47bb-0310-9956-ffa450edef68
2023-08-05 14:15:21 +00:00
PJ Fanning
0d18765c29 update jobs
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911466 13f79535-47bb-0310-9956-ffa450edef68
2023-08-05 13:43:48 +00:00
PJ Fanning
2fee41c1f7 update jobs
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911465 13f79535-47bb-0310-9956-ffa450edef68
2023-08-05 13:41:30 +00:00
PJ Fanning
d2f58f436c remove gradle-wrapper jar because it is against ASF policy to ship jars in source releases
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911464 13f79535-47bb-0310-9956-ffa450edef68
2023-08-05 13:34:46 +00:00
PJ Fanning
afa8b99eff remove gradle-wrapper jar because it is against ASF policy to ship jars in source releases
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911463 13f79535-47bb-0310-9956-ffa450edef68
2023-08-05 13:16:21 +00:00
PJ Fanning
c4e7b5174c remove gradle-wrapper jar because it is against ASF policy to ship jars in source releases
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911462 13f79535-47bb-0310-9956-ffa450edef68
2023-08-05 13:14:56 +00:00
Dominik Stadler
57d746827f Bug 66425: Avoid a ClassCastException found via oss-fuzz
We try to avoid throwing ClassCastException 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=61162

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911459 13f79535-47bb-0310-9956-ffa450edef68
2023-08-05 12:13:13 +00:00
Dominik Stadler
acf61f325f Use interfaces for variables and reformat source-code
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911436 13f79535-47bb-0310-9956-ffa450edef68
2023-08-04 12:47:09 +00:00
Dominik Stadler
ee1c914cea Use correct version for JUnit in Ant build
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911435 13f79535-47bb-0310-9956-ffa450edef68
2023-08-04 12:41:34 +00:00
PJ Fanning
53cb570a0c gradle-8.2.1
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911428 13f79535-47bb-0310-9956-ffa450edef68
2023-08-03 21:12:30 +00:00
PJ Fanning
c488cae3f3 [bug-66827] treat VML drawing entry for a comment that has incorrect type of TEXT as invalid
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911407 13f79535-47bb-0310-9956-ffa450edef68
2023-08-02 08:58:34 +00:00
PJ Fanning
dd1b0b1128 [bug-66827] add test case (that passes) - so issue is nor reproduced
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911399 13f79535-47bb-0310-9956-ffa450edef68
2023-08-01 20:49:26 +00:00
PJ Fanning
005863e1c9 gradle hates ant 1.10.13
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911398 13f79535-47bb-0310-9956-ffa450edef68
2023-08-01 20:19:38 +00:00
Dominik Stadler
cb835739c6 Exclude some files in one test to avoid flakiness during parallel builds
This test failed once locally due to a temporary file
being deleted again when the test tried to access it

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911384 13f79535-47bb-0310-9956-ffa450edef68
2023-08-01 08:24:59 +00:00
Dominik Stadler
8e2b749cf6 Update Apache Ant to 1.10.13 and use newer Gradle syntax
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911383 13f79535-47bb-0310-9956-ffa450edef68
2023-08-01 08:24:54 +00:00
PJ Fanning
ce1e4695e7 junit 5.10.0
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911373 13f79535-47bb-0310-9956-ffa450edef68
2023-07-31 15:02:03 +00:00
PJ Fanning
842e12d06e bouncycastle 1.76
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911371 13f79535-47bb-0310-9956-ffa450edef68
2023-07-31 14:55:12 +00:00
PJ Fanning
c6aa3a1318 [github-488] Round up seconds in CellElapsedFormatter. Thanks to Anthony Schott. This closes #488
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911254 13f79535-47bb-0310-9956-ffa450edef68
2023-07-24 19:59:45 +00:00
PJ Fanning
1f446e0aef undo last change due to broken test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911233 13f79535-47bb-0310-9956-ffa450edef68
2023-07-24 12:00:17 +00:00
PJ Fanning
cd2dcd3940 [github-487] Round up seconds in CellElapsedFormatter. Thanks to Anthony Schott. This closes #487
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911228 13f79535-47bb-0310-9956-ffa450edef68
2023-07-24 10:12:46 +00:00
PJ Fanning
fa8650fbe3 [bug-66682] fix xslb reading support for formula cells of boolean type. This closes #485
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1910951 13f79535-47bb-0310-9956-ffa450edef68
2023-07-12 22:26:41 +00:00
PJ Fanning
e1bb2a73c8 [bug-66675] fix issue with writing xlsx (core properties being added twice)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1910949 13f79535-47bb-0310-9956-ffa450edef68
2023-07-12 12:25:01 +00:00
PJ Fanning
a9a0acc232 gradle 8.2
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1910822 13f79535-47bb-0310-9956-ffa450edef68
2023-07-06 16:48:24 +00:00
PJ Fanning
23caf67c58 remove release date from version.java
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1910760 13f79535-47bb-0310-9956-ffa450edef68
2023-07-03 21:01:19 +00:00
PJ Fanning
04442923f3 [bug-62181] try to handle file where shared string loading is happening twice
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1910759 13f79535-47bb-0310-9956-ffa450edef68
2023-07-03 20:54:56 +00:00
PJ Fanning
cd5d0c3d07 update guava
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1910755 13f79535-47bb-0310-9956-ffa450edef68
2023-07-03 14:33:28 +00:00
PJ Fanning
20473c1b01 pdfbox 2.0.29
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1910753 13f79535-47bb-0310-9956-ffa450edef68
2023-07-03 14:32:05 +00:00
PJ Fanning
273067b103 apply some spelling fixes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1910659 13f79535-47bb-0310-9956-ffa450edef68
2023-06-28 11:55:29 +00:00
PJ Fanning
f331d08c22 apply some spelling fixes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1910640 13f79535-47bb-0310-9956-ffa450edef68
2023-06-27 19:37:48 +00:00
PJ Fanning
b90935055d apply some spelling fixes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1910639 13f79535-47bb-0310-9956-ffa450edef68
2023-06-27 19:33:13 +00:00
PJ Fanning
99634d6af6 apply some spelling fixes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1910627 13f79535-47bb-0310-9956-ffa450edef68
2023-06-27 11:48:38 +00:00
PJ Fanning
bfb6ec8e54 add XSSF test where 2 row instances have same rowNum
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1910569 13f79535-47bb-0310-9956-ffa450edef68
2023-06-23 12:59:57 +00:00
PJ Fanning
01208d5790 [bug-66661] revert github-269 due to it breaking formulas with table references
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1910561 13f79535-47bb-0310-9956-ffa450edef68
2023-06-22 21:37:01 +00:00
PJ Fanning
e8505dc208 update ooxml-lite-report.xsb
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1910560 13f79535-47bb-0310-9956-ffa450edef68
2023-06-22 20:46:25 +00:00
PJ Fanning
606d11be73 commons-codec 1.16.0
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1910558 13f79535-47bb-0310-9956-ffa450edef68
2023-06-22 16:49:00 +00:00
PJ Fanning
c3d8586079 bouncycastle 1.75
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1910543 13f79535-47bb-0310-9956-ffa450edef68
2023-06-21 17:03:09 +00:00
PJ Fanning
e30571e9ec fix test assertion
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1910480 13f79535-47bb-0310-9956-ffa450edef68
2023-06-18 17:10:56 +00:00
PJ Fanning
3bf4276117 xddf test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1910459 13f79535-47bb-0310-9956-ffa450edef68
2023-06-16 19:05:58 +00:00
PJ Fanning
5cafcdc83e [bug-66650] add chartex classes to poi-ooxml-full
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1910433 13f79535-47bb-0310-9956-ffa450edef68
2023-06-15 20:05:33 +00:00
PJ Fanning
73fef78604 bouncycastle 1.74
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1910429 13f79535-47bb-0310-9956-ffa450edef68
2023-06-15 15:35:39 +00:00
Dominik Stadler
9556080d38 Print out slightly more in SSPerformanceTest
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1910422 13f79535-47bb-0310-9956-ffa450edef68
2023-06-15 08:35:19 +00:00
PJ Fanning
6943cc9a9c [GitHub-473] Add getCTSettings() to XWPFSettings. This closes #473
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1910402 13f79535-47bb-0310-9956-ffa450edef68
2023-06-14 11:29:27 +00:00
PJ Fanning
51bd992387 update guava
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1910365 13f79535-47bb-0310-9956-ffa450edef68
2023-06-12 10:14:05 +00:00
PJ Fanning
0c62fc12f8 [bug-66644] enable reproducible build settings in gradle
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1910364 13f79535-47bb-0310-9956-ffa450edef68
2023-06-12 10:10:37 +00:00
Dominik Stadler
0dc3d6e479 Need to lower the min expected width after changes for bug 66632
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1910309 13f79535-47bb-0310-9956-ffa450edef68
2023-06-08 15:54:50 +00:00
Dominik Stadler
6442dccab9 Bug 66632: Round char-width instead of cutting off
Otherwise we sometimes use a too low "default char width"
which leads to autosizing of columns with too wide columns.

We should propably return float instead of int here to
not introduce rounding errors at this point at all,
but it would need more API changes, so let's at least
make it work better for now.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1910301 13f79535-47bb-0310-9956-ffa450edef68
2023-06-08 08:53:15 +00:00
Dominik Stadler
d3e35e740a Remove deprecation warnings reported with newer commons-io
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1910300 13f79535-47bb-0310-9956-ffa450edef68
2023-06-08 08:53:08 +00:00
Dominik Stadler
c8f9fe4c2c Fix generating JavaDoc when running build with Java 9 or higher
Otherwise "current" is JDK 11, but "javadoc" from JDK 8 is executed

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1910299 13f79535-47bb-0310-9956-ffa450edef68
2023-06-08 08:51:58 +00:00
PJ Fanning
219b1d0bce commons-io 2.13.0
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1910297 13f79535-47bb-0310-9956-ffa450edef68
2023-06-08 08:36:48 +00:00
PJ Fanning
367b8b797a update guava
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1910275 13f79535-47bb-0310-9956-ffa450edef68
2023-06-07 10:23:06 +00:00
PJ Fanning
ebb6796f69 byte buddy 1.14.5
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1910274 13f79535-47bb-0310-9956-ffa450edef68
2023-06-07 10:10:31 +00:00
PJ Fanning
0ad5f6ac58 improve exception handling
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1910273 13f79535-47bb-0310-9956-ffa450edef68
2023-06-07 09:51:05 +00:00
PJ Fanning
0b116246dd revert sonarqube plugin due to ci-build issues
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1910100 13f79535-47bb-0310-9956-ffa450edef68
2023-05-28 10:37:22 +00:00
PJ Fanning
13fa43f5b8 update sonarqube plugin
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1910076 13f79535-47bb-0310-9956-ffa450edef68
2023-05-26 18:24:43 +00:00
PJ Fanning
2676dcc7f4 [bug-66614] remove limit on offset function params
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1910049 13f79535-47bb-0310-9956-ffa450edef68
2023-05-25 10:39:47 +00:00
PJ Fanning
dfe5dd150c [bug-66612] get macrosheet xml (test)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1909996 13f79535-47bb-0310-9956-ffa450edef68
2023-05-22 16:31:05 +00:00
PJ Fanning
bc035b1aff [bug-66612] get macrosheet xml (test)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1909995 13f79535-47bb-0310-9956-ffa450edef68
2023-05-22 16:08:48 +00:00
PJ Fanning
b5153f1395 [bug-66612] get macrosheet xml (test)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1909994 13f79535-47bb-0310-9956-ffa450edef68
2023-05-22 16:00:10 +00:00
PJ Fanning
2712abf00b add content types for macrosheets
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1909993 13f79535-47bb-0310-9956-ffa450edef68
2023-05-22 15:17:22 +00:00
PJ Fanning
4b8a7eb6ce update jacoco
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1909963 13f79535-47bb-0310-9956-ffa450edef68
2023-05-21 13:31:17 +00:00
PJ Fanning
0326a02631 use gradle for java 20 build
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1909961 13f79535-47bb-0310-9956-ffa450edef68
2023-05-21 12:01:18 +00:00
PJ Fanning
60d5336f7c [bug-66607] perf issue processing array formulas
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1909934 13f79535-47bb-0310-9956-ffa450edef68
2023-05-19 13:09:15 +00:00
PJ Fanning
4ec360b006 commons-io 2.12.0
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1909874 13f79535-47bb-0310-9956-ffa450edef68
2023-05-17 14:28:23 +00:00
PJ Fanning
fefd1da959 graphics2d 0.43
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1909859 13f79535-47bb-0310-9956-ffa450edef68
2023-05-16 15:06:32 +00:00
Dominik Stadler
720027879f Bug 66598: Fix invalid loop-condition when cleaning up CTCells
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1909808 13f79535-47bb-0310-9956-ffa450edef68
2023-05-14 07:47:16 +00:00
Dominik Stadler
a647cc97e7 Fix a case in IdentifierManager.release(), reformat, add tests
The case when all are reserved was not handled properly

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1909807 13f79535-47bb-0310-9956-ffa450edef68
2023-05-14 07:47:12 +00:00
Dominik Stadler
ddafec4608 Update third-party versions in README
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1909806 13f79535-47bb-0310-9956-ffa450edef68
2023-05-14 07:47:07 +00:00
PJ Fanning
2e434a4eaf javadoc build issue
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1909752 13f79535-47bb-0310-9956-ffa450edef68
2023-05-11 13:54:55 +00:00
PJ Fanning
f57e10eb0e don't run integration tests in Java 8 (they hang on https://ci-builds.apache.org/)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1909749 13f79535-47bb-0310-9956-ffa450edef68
2023-05-11 11:22:19 +00:00
PJ Fanning
338e97f87c use MarlinRenderingEngine
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1909748 13f79535-47bb-0310-9956-ffa450edef68
2023-05-11 10:25:10 +00:00
PJ Fanning
0cd653d8c0 jupiter junit 5.9.3
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1909469 13f79535-47bb-0310-9956-ffa450edef68
2023-04-28 09:45:44 +00:00
PJ Fanning
fe3b4645b7 [bug-66584] ensure ZipPackage closes input stream when exceptions happen
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1909467 13f79535-47bb-0310-9956-ffa450edef68
2023-04-28 09:13:08 +00:00
PJ Fanning
b88f3ac0ab spelling
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1909466 13f79535-47bb-0310-9956-ffa450edef68
2023-04-28 08:58:34 +00:00
PJ Fanning
3786c3a596 upgrade gradle
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1909403 13f79535-47bb-0310-9956-ffa450edef68
2023-04-25 13:17:18 +00:00
PJ Fanning
add156ed0f upgrade woodstox to 6.5.1
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1909257 13f79535-47bb-0310-9956-ffa450edef68
2023-04-19 19:26:14 +00:00
PJ Fanning
f7cfed4c1a pdfbox 2.0.28
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1909124 13f79535-47bb-0310-9956-ffa450edef68
2023-04-13 18:22:25 +00:00
PJ Fanning
56dc911402 bouncycastle 1.73
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1909101 13f79535-47bb-0310-9956-ffa450edef68
2023-04-12 19:37:57 +00:00
PJ Fanning
e3605e8096 saxon 11.5
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908982 13f79535-47bb-0310-9956-ffa450edef68
2023-04-05 07:49:51 +00:00
PJ Fanning
155b4ea094 forbiddenapis 3.5.1
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908969 13f79535-47bb-0310-9956-ffa450edef68
2023-04-04 19:08:13 +00:00
PJ Fanning
d356ddd058 byte-buddy 1.14.3
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908968 13f79535-47bb-0310-9956-ffa450edef68
2023-04-04 19:06:37 +00:00
PJ Fanning
2bf82a487f xmlsec 3.0.2
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908966 13f79535-47bb-0310-9956-ffa450edef68
2023-04-04 19:04:46 +00:00
PJ Fanning
da8fb42bf4 increase heap in tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908719 13f79535-47bb-0310-9956-ffa450edef68
2023-03-26 01:08:13 +00:00
PJ Fanning
420c96f74e don't share the skip bytes buffer
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908716 13f79535-47bb-0310-9956-ffa450edef68
2023-03-25 20:09:30 +00:00
PJ Fanning
9e53a4f7c2 don't share the skip bytes buffer
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908700 13f79535-47bb-0310-9956-ffa450edef68
2023-03-25 00:47:15 +00:00
PJ Fanning
98f5f248ad commons-compress 1.23.0
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908669 13f79535-47bb-0310-9956-ffa450edef68
2023-03-23 15:11:27 +00:00
PJ Fanning
337f1514f7 try to run tests serially due to jdk 8 build issues
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908652 13f79535-47bb-0310-9956-ffa450edef68
2023-03-22 23:12:28 +00:00
PJ Fanning
632ec9dbf7 update spotbugs plugin
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908649 13f79535-47bb-0310-9956-ffa450edef68
2023-03-22 20:16:56 +00:00
Dominik Stadler
c0484ce62d Add more information in exception when formula parsing fails
Use toString() instead of getClass() to include more information 
for some ValueEval implementations
When low-level parsing fails, the IllegalStateException does not 
contain any information, therefore wrap it and enrich it with
more information about the cell and the parsed formula

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908608 13f79535-47bb-0310-9956-ffa450edef68
2023-03-21 11:45:00 +00:00
PJ Fanning
debd3bd4a9 java 11 github CI build
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908603 13f79535-47bb-0310-9956-ffa450edef68
2023-03-21 00:31:24 +00:00
PJ Fanning
80e0f091b4 java 8 github CI build
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908602 13f79535-47bb-0310-9956-ffa450edef68
2023-03-20 23:11:21 +00:00
PJ Fanning
d43890be07 jenkinsLite
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908601 13f79535-47bb-0310-9956-ffa450edef68
2023-03-20 21:30:54 +00:00
PJ Fanning
eef672278b jenkinsLite
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908600 13f79535-47bb-0310-9956-ffa450edef68
2023-03-20 20:57:35 +00:00
PJ Fanning
de517c32fc remove unused github-pr job that appears to break create-jobs
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908599 13f79535-47bb-0310-9956-ffa450edef68
2023-03-20 20:45:02 +00:00
PJ Fanning
aec585b5a6 still issues in create-jobs
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908598 13f79535-47bb-0310-9956-ffa450edef68
2023-03-20 20:39:45 +00:00
PJ Fanning
6ee5ef1f95 revert create-jobs changes due to build issues
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908597 13f79535-47bb-0310-9956-ffa450edef68
2023-03-20 20:34:27 +00:00
PJ Fanning
1196cc9655 jenkinsLite
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908596 13f79535-47bb-0310-9956-ffa450edef68
2023-03-20 20:19:21 +00:00
PJ Fanning
f37a6013b6 slf4j 2.0.7
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908558 13f79535-47bb-0310-9956-ffa450edef68
2023-03-20 11:00:46 +00:00
PJ Fanning
5fb90fdcce remove temporary hacks
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908529 13f79535-47bb-0310-9956-ffa450edef68
2023-03-19 20:40:14 +00:00
PJ Fanning
c58ff2216f temporary hack to build to see if the ooxml tests are hanging and breaking all our https://ci-builds.apache.org/ builds for Java 8
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908527 13f79535-47bb-0310-9956-ffa450edef68
2023-03-19 20:10:39 +00:00
PJ Fanning
505be44699 revert back to ant 1.10.12 - 1.10.13 breaks our build
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908518 13f79535-47bb-0310-9956-ffa450edef68
2023-03-19 14:03:50 +00:00
PJ Fanning
9017f15aad temporary hack to build to see if the integration tests are haning and breaking all our https://ci-builds.apache.org/ builds for Java 8
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908517 13f79535-47bb-0310-9956-ffa450edef68
2023-03-19 13:51:05 +00:00
PJ Fanning
36da005d3a ant 1.10.13
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908516 13f79535-47bb-0310-9956-ffa450edef68
2023-03-19 13:48:23 +00:00
PJ Fanning
17899fc75b temporary hack to build to see if the gradle toolchain logic is what is breaking all our https://ci-builds.apache.org/ builds for Java 8
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908515 13f79535-47bb-0310-9956-ffa450edef68
2023-03-19 13:17:53 +00:00
PJ Fanning
9f0fe6139e fix test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908486 13f79535-47bb-0310-9956-ffa450edef68
2023-03-18 12:03:41 +00:00
PJ Fanning
2ae294e606 use 'its'
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908484 13f79535-47bb-0310-9956-ffa450edef68
2023-03-18 11:55:54 +00:00
PJ Fanning
27344ca661 use 'an'
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908483 13f79535-47bb-0310-9956-ffa450edef68
2023-03-18 11:35:26 +00:00
PJ Fanning
6f36cab758 typo
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908481 13f79535-47bb-0310-9956-ffa450edef68
2023-03-18 11:14:37 +00:00
PJ Fanning
6e244845e5 [bug-66532] more performant way to iterate over codepoints.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908479 13f79535-47bb-0310-9956-ffa450edef68
2023-03-18 10:27:37 +00:00
PJ Fanning
ef82364bde revert: [bug-66503] Add flag for Excel 4 macros in composite documents.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908463 13f79535-47bb-0310-9956-ffa450edef68
2023-03-18 01:20:51 +00:00
PJ Fanning
02efb8f802 revert: [bug-66503] Add flag for Excel 4 macros in composite documents.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908462 13f79535-47bb-0310-9956-ffa450edef68
2023-03-18 00:59:29 +00:00
PJ Fanning
c12ed0dd1b [bug-66503] Add flag for Excel 4 macros in composite documents. Thanks to M. P. Halpin
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908461 13f79535-47bb-0310-9956-ffa450edef68
2023-03-18 00:30:58 +00:00
PJ Fanning
e73b20c86d [bug-66532] more performant way to iterate over codepoints.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908460 13f79535-47bb-0310-9956-ffa450edef68
2023-03-17 23:40:45 +00:00
PJ Fanning
a129086c84 [bug-66532] more performant way to iterate over codepoints.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908459 13f79535-47bb-0310-9956-ffa450edef68
2023-03-17 23:40:03 +00:00
PJ Fanning
0275daa5de [bug-66532] more performant way to iterate over codepoints. Thanks to Matthias Raschhofer
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908458 13f79535-47bb-0310-9956-ffa450edef68
2023-03-17 23:35:33 +00:00
PJ Fanning
3e6dddaa95 acknowledge use of scala derived code
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908376 13f79535-47bb-0310-9956-ffa450edef68
2023-03-14 09:20:32 +00:00
PJ Fanning
6c3aac7a28 javadoc typos
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908363 13f79535-47bb-0310-9956-ffa450edef68
2023-03-13 23:56:39 +00:00
PJ Fanning
1927f67563 upgrade byte-buddy
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908357 13f79535-47bb-0310-9956-ffa450edef68
2023-03-13 21:08:39 +00:00
PJ Fanning
1333585590 gradle wrapper license details
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908274 13f79535-47bb-0310-9956-ffa450edef68
2023-03-11 11:13:28 +00:00
PJ Fanning
c6c5d4cc47 gradle wrapper license details
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908273 13f79535-47bb-0310-9956-ffa450edef68
2023-03-11 11:12:04 +00:00
PJ Fanning
37859e07ae remove license items relating to bundling jars - no longer needed since we don't bundle these jars any more
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908270 13f79535-47bb-0310-9956-ffa450edef68
2023-03-11 10:36:30 +00:00
PJ Fanning
e784d0f467 provide more info in license about inbot-utils
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908269 13f79535-47bb-0310-9956-ffa450edef68
2023-03-11 10:21:39 +00:00
Dominik Stadler
b8cc997cd0 Bug 66521: Add a utility to clear all thread locals
Otherwise some applications may complain about left-over things,
e.g. Tomcat sometimes reports warning logs if Threads are not
cleaned up before being passed back into the global thread-pool.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908263 13f79535-47bb-0310-9956-ffa450edef68
2023-03-11 06:49:12 +00:00
Dominik Stadler
f192c95e0f Fix a flaky test which fails roughly once in 9000 iterations
Ranodm(9000) means it can also be 0 so the test should allow reading 300 bytes only

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908242 13f79535-47bb-0310-9956-ffa450edef68
2023-03-10 08:08:23 +00:00
Dominik Stadler
85d436b601 Ant-Build: Remove leftover versions of bouncycastle-libs
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908241 13f79535-47bb-0310-9956-ffa450edef68
2023-03-10 08:08:19 +00:00
Dominik Stadler
5b84aae94c Update/fix JavaDoc and add "throws"
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908240 13f79535-47bb-0310-9956-ffa450edef68
2023-03-10 08:08:16 +00:00
Dominik Stadler
30ff8020a3 Ant-Build: Add one more dependency for javadocs-creation
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908239 13f79535-47bb-0310-9956-ffa450edef68
2023-03-10 08:08:12 +00:00
PJ Fanning
5ad29c2df8 update build to no longer produce poi-bin distribution files
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908224 13f79535-47bb-0310-9956-ffa450edef68
2023-03-09 13:31:47 +00:00
PJ Fanning
aa9069c7df [bug-66518] license header
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908193 13f79535-47bb-0310-9956-ffa450edef68
2023-03-08 11:30:58 +00:00
PJ Fanning
dcc66fde79 [bug-66518] fix issue in AbstractExcelUtils.getColor(HSSFColor)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908192 13f79535-47bb-0310-9956-ffa450edef68
2023-03-08 11:04:59 +00:00
PJ Fanning
9a181c1a2d [bug-66518] fix issue in AbstractExcelUtils.getColor(HSSFColor)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908191 13f79535-47bb-0310-9956-ffa450edef68
2023-03-08 11:03:19 +00:00
PJ Fanning
2f2e61311a add test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908190 13f79535-47bb-0310-9956-ffa450edef68
2023-03-08 10:57:31 +00:00
PJ Fanning
7d67fa729e revert test change
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908175 13f79535-47bb-0310-9956-ffa450edef68
2023-03-07 22:14:25 +00:00
PJ Fanning
c8ef2e89ba byte-buddy 1.14.1
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908174 13f79535-47bb-0310-9956-ffa450edef68
2023-03-07 22:14:01 +00:00
PJ Fanning
1639f8b923 sxssf date style test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908173 13f79535-47bb-0310-9956-ffa450edef68
2023-03-07 22:03:58 +00:00
PJ Fanning
4ec643c624 upgrade gradle
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908059 13f79535-47bb-0310-9956-ffa450edef68
2023-03-04 13:40:24 +00:00
PJ Fanning
59b06fc126 gradle wrapper
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907841 13f79535-47bb-0310-9956-ffa450edef68
2023-02-24 00:07:48 +00:00
PJ Fanning
18e61e0b0a saxon 11.5
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907840 13f79535-47bb-0310-9956-ffa450edef68
2023-02-23 23:17:26 +00:00
PJ Fanning
a6f8743243 upgrade byte-buddy
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907833 13f79535-47bb-0310-9956-ffa450edef68
2023-02-23 19:41:20 +00:00
PJ Fanning
6248cc2138 try gradle 8.0.1 again
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907816 13f79535-47bb-0310-9956-ffa450edef68
2023-02-23 00:03:18 +00:00
PJ Fanning
dbbdb9bd46 try gradle 8.0.1 again
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907814 13f79535-47bb-0310-9956-ffa450edef68
2023-02-22 23:38:36 +00:00
PJ Fanning
c552947cd3 try gradle 8.0.1 again
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907813 13f79535-47bb-0310-9956-ffa450edef68
2023-02-22 22:43:41 +00:00
PJ Fanning
e7ec6329e9 try gradle 8.0.1 again
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907812 13f79535-47bb-0310-9956-ffa450edef68
2023-02-22 22:26:50 +00:00
PJ Fanning
340865beed try gradle 8.0.1 again
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907811 13f79535-47bb-0310-9956-ffa450edef68
2023-02-22 22:19:17 +00:00
PJ Fanning
a7bf0c0537 sonar 4.0.0.2929
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907810 13f79535-47bb-0310-9956-ffa450edef68
2023-02-22 20:44:46 +00:00
PJ Fanning
916e33285b try to fix gradle issues
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907809 13f79535-47bb-0310-9956-ffa450edef68
2023-02-22 20:31:47 +00:00
PJ Fanning
729e012804 try to fix gradle issues
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907808 13f79535-47bb-0310-9956-ffa450edef68
2023-02-22 20:08:44 +00:00
PJ Fanning
41f87333cf gradle 8.0.1
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907807 13f79535-47bb-0310-9956-ffa450edef68
2023-02-22 19:45:56 +00:00
PJ Fanning
3ab6847bcc [bug-66485] poi-ooxml-full: generate classes for drawing/2012/chart schema
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907789 13f79535-47bb-0310-9956-ffa450edef68
2023-02-21 13:11:59 +00:00
PJ Fanning
af7848243b log4j 2.20.0
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907784 13f79535-47bb-0310-9956-ffa450edef68
2023-02-21 11:06:12 +00:00
PJ Fanning
09cbbfbac0 build issue
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907764 13f79535-47bb-0310-9956-ffa450edef68
2023-02-19 23:21:51 +00:00
PJ Fanning
15bdee4456 build issue
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907761 13f79535-47bb-0310-9956-ffa450edef68
2023-02-19 18:54:56 +00:00
PJ Fanning
c67d140d77 safety check on throwable catch
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907660 13f79535-47bb-0310-9956-ffa450edef68
2023-02-14 18:20:06 +00:00
PJ Fanning
e431ec35c3 safety check on throwable catch
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907656 13f79535-47bb-0310-9956-ffa450edef68
2023-02-14 15:12:18 +00:00
PJ Fanning
54fc06be81 revert accidental change
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907655 13f79535-47bb-0310-9956-ffa450edef68
2023-02-14 15:07:55 +00:00
PJ Fanning
d07d8e42b9 revert use of ExceptionUtil on caught exceptions (not useful)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907654 13f79535-47bb-0310-9956-ffa450edef68
2023-02-14 15:03:26 +00:00
PJ Fanning
f6cec39ba2 use of ExceptionUtil in excelant
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907653 13f79535-47bb-0310-9956-ffa450edef68
2023-02-14 14:52:29 +00:00
PJ Fanning
3968e289e4 fix up use of ExceptionUtil in main poi-scratchpad module
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907652 13f79535-47bb-0310-9956-ffa450edef68
2023-02-14 14:51:27 +00:00
PJ Fanning
3a70d5e002 fix up use of ExceptionUtil in main poi module
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907651 13f79535-47bb-0310-9956-ffa450edef68
2023-02-14 14:26:56 +00:00
PJ Fanning
03f7f911b0 don't use ExceptionUtil in examples
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907646 13f79535-47bb-0310-9956-ffa450edef68
2023-02-14 13:52:53 +00:00
PJ Fanning
adcf7bf533 add util code to rethrow fatal exceptions
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907645 13f79535-47bb-0310-9956-ffa450edef68
2023-02-14 13:51:52 +00:00
PJ Fanning
660b90062d upgrade cyclonedx plugin
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907639 13f79535-47bb-0310-9956-ffa450edef68
2023-02-14 11:01:06 +00:00
PJ Fanning
326126a365 provide way to clear the state on the ThreadLocal used byby ExtractorFactory
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907581 13f79535-47bb-0310-9956-ffa450edef68
2023-02-11 12:07:34 +00:00
PJ Fanning
28a26d9cb2 [bug-66475] SignatureConfig: remove ThreadLocals and deprecated code associated with them
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907579 13f79535-47bb-0310-9956-ffa450edef68
2023-02-11 11:51:13 +00:00
PJ Fanning
dc91cdbaaa remove recently added volatile markers due to Sonarcloud warnings
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907578 13f79535-47bb-0310-9956-ffa450edef68
2023-02-11 11:26:03 +00:00
PJ Fanning
bdd39251ef byte buddy 1.12.22
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907569 13f79535-47bb-0310-9956-ffa450edef68
2023-02-10 20:40:12 +00:00
PJ Fanning
46a1548f83 upgrade bouncycastle
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907568 13f79535-47bb-0310-9956-ffa450edef68
2023-02-10 20:34:01 +00:00
PJ Fanning
c2d2ec0eaf DataFormatter - typo in javadoc and possible NPE
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907543 13f79535-47bb-0310-9956-ffa450edef68
2023-02-09 15:22:21 +00:00
PJ Fanning
c4e2eebbaf remove oracle requirement due to build failures
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907447 13f79535-47bb-0310-9956-ffa450edef68
2023-02-06 00:38:26 +00:00
Dominik Stadler
25d67aa6ec Do not fail if an empty password is provided
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907446 13f79535-47bb-0310-9956-ffa450edef68
2023-02-05 21:11:14 +00:00
Dominik Stadler
3eae53357d Avoid a file-handle leak in tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907445 13f79535-47bb-0310-9956-ffa450edef68
2023-02-05 21:11:09 +00:00
Dominik Stadler
1ca2e638ed Bug 66436: Fix invalid handling of padded encrypted bytes
The encrypted data is padded to 16 bytes, but these additional bytes
were not read from the stream

Make the reading of the additional bytes "lenient" to not introduce
breaking change if some existing functionality did produce non-aligned
data for some reason.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907444 13f79535-47bb-0310-9956-ffa450edef68
2023-02-05 21:11:03 +00:00
PJ Fanning
43551babf1 [bug-65260] partial revert of recent changes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907443 13f79535-47bb-0310-9956-ffa450edef68
2023-02-05 20:34:19 +00:00
PJ Fanning
7c372bd18c fix compile issues
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907309 13f79535-47bb-0310-9956-ffa450edef68
2023-02-04 15:28:04 +00:00
PJ Fanning
040181c42f [bug-65260] catch Throwable instead of error - see https://github.com/apache/poi/pull/425
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907308 13f79535-47bb-0310-9956-ffa450edef68
2023-02-04 15:10:32 +00:00
PJ Fanning
34f6955a28 mark some variables that are used in synchronized code as volatile
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907114 13f79535-47bb-0310-9956-ffa450edef68
2023-01-30 14:46:43 +00:00
Dominik Stadler
6f606cabda Spotbugs: Replace \n with %n in String.format()
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907110 13f79535-47bb-0310-9956-ffa450edef68
2023-01-30 12:19:43 +00:00
Dominik Stadler
be3a17160e Ant build: Specify "--add-opens" to avoid byte-buddy complaining on newer JDKs
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907109 13f79535-47bb-0310-9956-ffa450edef68
2023-01-30 12:19:39 +00:00
Dominik Stadler
bcd3785d7d Use an error-handler to use logging also for XML parsing errors
Otherwise this output is done to stdout/stderr which we would like to avoid.

Keep the format as one line and do not include a full exception stacktrace
to not introduce lots of exception-stacktraces for some slightly broken input files

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907108 13f79535-47bb-0310-9956-ffa450edef68
2023-01-30 12:19:37 +00:00
Dominik Stadler
0f290fe501 Adjust file-handle-leak exlusions
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907107 13f79535-47bb-0310-9956-ffa450edef68
2023-01-30 12:19:33 +00:00
Dominik Stadler
edc7f8fd6f Bug 54373: Include alpha/transparency value when creating an XSSFColor from an AWT Color object
Use the alpha-value from Color as well

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907106 13f79535-47bb-0310-9956-ffa450edef68
2023-01-30 12:19:31 +00:00
Dominik Stadler
acdf2ec981 Bug 62272: Include alpha/transparency value when setting a color-value for a font
Use method with returns 4 bytes to use an ARGB value instead of only RGB

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907105 13f79535-47bb-0310-9956-ffa450edef68
2023-01-30 12:19:24 +00:00
PJ Fanning
a7382f00b9 junit-platform 1.9.2
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907084 13f79535-47bb-0310-9956-ffa450edef68
2023-01-29 21:15:58 +00:00
PJ Fanning
e6087ba6af don't create format pr instance for read events
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907079 13f79535-47bb-0310-9956-ffa450edef68
2023-01-29 17:15:41 +00:00
PJ Fanning
4944aa4c2e rework SXSSF groupRow and add test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907068 13f79535-47bb-0310-9956-ffa450edef68
2023-01-28 22:18:33 +00:00
PJ Fanning
cde87ab3c6 edge case (avoid short overflow)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907066 13f79535-47bb-0310-9956-ffa450edef68
2023-01-28 20:44:26 +00:00
PJ Fanning
1cf4094e2d try to improve performance of XSSFSheet row/col grouping/ungrouping
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907065 13f79535-47bb-0310-9956-ffa450edef68
2023-01-28 20:13:33 +00:00
PJ Fanning
edaeb54967 reorder xssf code
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906981 13f79535-47bb-0310-9956-ffa450edef68
2023-01-24 15:01:38 +00:00
PJ Fanning
60872927bd [bug-66433] Boolean functions should blank cells. Thanks to Patrick Böker
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906836 13f79535-47bb-0310-9956-ffa450edef68
2023-01-20 12:03:52 +00:00
PJ Fanning
42bbbfc55a revert to saxon 11.4 (saxon 12.0 only supports Java 11)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906747 13f79535-47bb-0310-9956-ffa450edef68
2023-01-17 18:56:47 +00:00
PJ Fanning
0f7e83b246 woodstox 6.5
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906715 13f79535-47bb-0310-9956-ffa450edef68
2023-01-16 19:39:56 +00:00
PJ Fanning
1bd008e2e9 test with saxon 12
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906714 13f79535-47bb-0310-9956-ffa450edef68
2023-01-16 19:39:02 +00:00
PJ Fanning
650f0e9276 remove incomplete test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906654 13f79535-47bb-0310-9956-ffa450edef68
2023-01-13 12:10:04 +00:00
PJ Fanning
a00cc9ff2b byte-buddy 1.12.22
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906653 13f79535-47bb-0310-9956-ffa450edef68
2023-01-13 12:08:02 +00:00
PJ Fanning
56daedd9dd junit 5.9.2
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906602 13f79535-47bb-0310-9956-ffa450edef68
2023-01-11 14:13:29 +00:00
PJ Fanning
02f4a07a97 xmlunit 2.9.1
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906601 13f79535-47bb-0310-9956-ffa450edef68
2023-01-11 14:11:02 +00:00
PJ Fanning
46f45c2d0a revert ant upgrade due to issues with ant-launcher-1.10.13.jar
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906580 13f79535-47bb-0310-9956-ffa450edef68
2023-01-10 21:36:34 +00:00
PJ Fanning
25bb01ac14 revert ant upgrade due to issues with ant-launcher-1.10.13.jar
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906570 13f79535-47bb-0310-9956-ffa450edef68
2023-01-10 20:59:59 +00:00
PJ Fanning
786af03e67 add test case
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906561 13f79535-47bb-0310-9956-ffa450edef68
2023-01-10 20:10:25 +00:00
PJ Fanning
c7822f687a byte-buddy 1.12.21
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906558 13f79535-47bb-0310-9956-ffa450edef68
2023-01-10 19:45:56 +00:00
PJ Fanning
16cddb4dd4 upgrade ant
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906557 13f79535-47bb-0310-9956-ffa450edef68
2023-01-10 19:44:37 +00:00
PJ Fanning
5c964e4194 [bug-66413] try to fix HSSF code where you can set fill colors
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906451 13f79535-47bb-0310-9956-ffa450edef68
2023-01-07 22:24:49 +00:00
PJ Fanning
968dabd462 [bug-65543] HSSF: fix issue with incomplete SSTs. Thanks to Simon Carter.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906434 13f79535-47bb-0310-9956-ffa450edef68
2023-01-06 23:50:54 +00:00
Dominik Stadler
c8c06d1ec0 Saxon-HE is included in more place, combine these into the main gradle build
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906427 13f79535-47bb-0310-9956-ffa450edef68
2023-01-06 19:58:45 +00:00
Dominik Stadler
4c1f59d85c Testing with saxon-HE: Avoid module-clash between xml.apis and java.xml
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906425 13f79535-47bb-0310-9956-ffa450edef68
2023-01-06 17:41:28 +00:00
Dominik Stadler
e3924e5d0b Update Apache Ant to latest 1.10.12 to try to make writing JUnit results work for JDK 20
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906424 13f79535-47bb-0310-9956-ffa450edef68
2023-01-06 16:52:14 +00:00
Dominik Stadler
a174896eaf Add missing library for forbidden-apis-check
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906361 13f79535-47bb-0310-9956-ffa450edef68
2023-01-03 19:52:14 +00:00
Dominik Stadler
1ff1e84e4a Avoid some NullPointerException and ClassCastExceptions found when fuzzing Apache POI
This mostly only makes thrown runtime-exceptions a bit more consistent and
improves information in exceptions.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906360 13f79535-47bb-0310-9956-ffa450edef68
2023-01-03 19:52:03 +00:00
PJ Fanning
22807e03dd 2023
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906330 13f79535-47bb-0310-9956-ffa450edef68
2023-01-01 23:04:10 +00:00
Dominik Stadler
49526667ab Change more assertions to proper checks
A broken input-document should not trigger assertions,
but proper exceptions with useful information for the user

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906327 13f79535-47bb-0310-9956-ffa450edef68
2023-01-01 15:59:48 +00:00
Dominik Stadler
059283c9e6 Prevent more cases of unbounded allocation
Test WordToTextConverter with all sample files

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906326 13f79535-47bb-0310-9956-ffa450edef68
2023-01-01 15:59:44 +00:00
Dominik Stadler
ab45ef779c Ant: Adjust libs for poi-excelant as it requires poi-ooxml and xmlbeans
Seems JDK 20 does more checks on module-path and thus fails the
build otherwise

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906325 13f79535-47bb-0310-9956-ffa450edef68
2023-01-01 15:59:40 +00:00
Dominik Stadler
a0ce31a576 Ignore compile module-info class-files
Now that they are not checked in any more.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906324 13f79535-47bb-0310-9956-ffa450edef68
2023-01-01 15:59:37 +00:00
Dominik Stadler
d333c291de Try to avoid clashes of modules java.xml and xml-apis
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906323 13f79535-47bb-0310-9956-ffa450edef68
2023-01-01 15:59:35 +00:00
Dominik Stadler
5724a77cf2 Avoid some NullPointerExceptions and ClassCastExceptions found when fuzzing Apache POI
This mostly only makes thrown exceptions a bit more consistent
or may allow some broken documents to be still read.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906322 13f79535-47bb-0310-9956-ffa450edef68
2023-01-01 15:59:32 +00:00
Dominik Stadler
012bf1a99a Jenkins DSL: Fix link to Spotbugs results some more
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906321 13f79535-47bb-0310-9956-ffa450edef68
2023-01-01 15:59:16 +00:00
Dominik Stadler
b5e2f2ee5d Jenkins DSL: Adjust links and comment out publishing "warnings" as the plugin is not installed
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906278 13f79535-47bb-0310-9956-ffa450edef68
2022-12-30 08:11:43 +00:00
Dominik Stadler
1f15bf5b15 Jenkins DSL: On Windows also revert some specific files
The wildcard based revert seems to fail

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906277 13f79535-47bb-0310-9956-ffa450edef68
2022-12-30 08:11:41 +00:00
Dominik Stadler
83bb4b4da5 Rename method for color from "RBG" to "RGB"
It's a protected method that is not intended to be used
outside anyway.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906276 13f79535-47bb-0310-9956-ffa450edef68
2022-12-30 08:11:38 +00:00
Dominik Stadler
cc40f9faac Replace some more http -> https in the generated documentation pages
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906275 13f79535-47bb-0310-9956-ffa450edef68
2022-12-30 08:11:32 +00:00
Dominik Stadler
f3fbf0233a Jenkins DSL: Do not try to rebuild sources with Gradle for JDK 20
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906274 13f79535-47bb-0310-9956-ffa450edef68
2022-12-30 08:11:30 +00:00
PJ Fanning
42a2c9606a graphics2d 0.42
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906265 13f79535-47bb-0310-9956-ffa450edef68
2022-12-29 22:31:14 +00:00
PJ Fanning
537dc7a933 [github-409] Textruns not honouring highlight. Thans to gffloodg. This closes #409
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906250 13f79535-47bb-0310-9956-ffa450edef68
2022-12-28 17:56:26 +00:00
PJ Fanning
1709aa988d mockito 4.11.0
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906249 13f79535-47bb-0310-9956-ffa450edef68
2022-12-28 17:46:55 +00:00
PJ Fanning
37994bf3e2 [github-409] Textruns not honouring highlight. Thans to gffloodg. This closes #409
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906248 13f79535-47bb-0310-9956-ffa450edef68
2022-12-28 17:45:21 +00:00
PJ Fanning
1def0cba38 [bug-66397] update temp file code. Thanks to lsq27.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906238 13f79535-47bb-0310-9956-ffa450edef68
2022-12-28 08:08:09 +00:00
PJ Fanning
215da1a1ed add test file
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906237 13f79535-47bb-0310-9956-ffa450edef68
2022-12-28 07:57:59 +00:00
PJ Fanning
78516f50dc try to get rid of cached module-info classes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906232 13f79535-47bb-0310-9956-ffa450edef68
2022-12-27 18:45:15 +00:00
Bida Fan
98d51e4139 Fix when bodyElements contain sdt, the inserted element is in the wrong position
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906225 13f79535-47bb-0310-9956-ffa450edef68
2022-12-27 07:49:35 +00:00
PJ Fanning
a84c9e0be6 try to get sboms to build again
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906222 13f79535-47bb-0310-9956-ffa450edef68
2022-12-26 19:54:56 +00:00
Dominik Stadler
cf559d3ae4 Ant-Java 11+: Add support for a 4th module to be able to add slf4j module
Otherwise running test-ooxml may fail because of a missing class

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906220 13f79535-47bb-0310-9956-ffa450edef68
2022-12-26 16:25:26 +00:00
Dominik Stadler
c0d3f16b87 build.xml: Update spotbugs to 4.7.3 to enable support for JDK 20
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906219 13f79535-47bb-0310-9956-ffa450edef68
2022-12-26 16:15:47 +00:00
Dominik Stadler
3ef2c45101 Bug 65260: Fix how we ignore errors when fonts are not installed
The implementation via bug 66230 was not fully working due to the
caught exception.
Also add this to the 2nd constructor as well.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906218 13f79535-47bb-0310-9956-ffa450edef68
2022-12-26 16:15:44 +00:00
Dominik Stadler
7ba2f0fffa Bug 66401: Handle escaped single-quote in formulas properly
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906217 13f79535-47bb-0310-9956-ffa450edef68
2022-12-26 16:15:39 +00:00
PJ Fanning
971ff37eec try to get sboms to build again
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906215 13f79535-47bb-0310-9956-ffa450edef68
2022-12-26 13:32:30 +00:00
PJ Fanning
b217a77dac try to fix module-info compile
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906213 13f79535-47bb-0310-9956-ffa450edef68
2022-12-26 10:22:14 +00:00
PJ Fanning
5e212e4a33 doesn't matter what jdk vendor is used to build module-info classes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906212 13f79535-47bb-0310-9956-ffa450edef68
2022-12-26 10:05:10 +00:00
PJ Fanning
8898d2d15a try to fix build
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906208 13f79535-47bb-0310-9956-ffa450edef68
2022-12-26 00:24:29 +00:00
PJ Fanning
edee60d87a rebuild module-info.class files even if Java8 used
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906207 13f79535-47bb-0310-9956-ffa450edef68
2022-12-25 23:56:32 +00:00
PJ Fanning
664fe668b7 exclude sboms from source distro
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906171 13f79535-47bb-0310-9956-ffa450edef68
2022-12-22 19:28:44 +00:00
PJ Fanning
3cc8f54a20 try ant for jdk 20 build due to policeman issues
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906161 13f79535-47bb-0310-9956-ffa450edef68
2022-12-22 10:59:41 +00:00
PJ Fanning
3532fd2c3f try ant for jdk 20 build due to policeman issues
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906160 13f79535-47bb-0310-9956-ffa450edef68
2022-12-22 10:40:49 +00:00
PJ Fanning
a7684eb0ed add sboms to bin/src dits
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906155 13f79535-47bb-0310-9956-ffa450edef68
2022-12-22 01:03:34 +00:00
PJ Fanning
7807b706ac [github-408] Increase performance of StylesTable.putStyle. Thanks to Jason Mirra. This closes #408
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906152 13f79535-47bb-0310-9956-ffa450edef68
2022-12-21 22:30:32 +00:00
PJ Fanning
f78d742c38 java 20 build
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906149 13f79535-47bb-0310-9956-ffa450edef68
2022-12-21 21:52:39 +00:00
PJ Fanning
1494812da8 try to build sboms
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906146 13f79535-47bb-0310-9956-ffa450edef68
2022-12-21 17:52:29 +00:00
PJ Fanning
efeea0fbc9 archive xmlbeans jdk 1.19 build
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906136 13f79535-47bb-0310-9956-ffa450edef68
2022-12-21 12:21:12 +00:00
PJ Fanning
f1876395f6 archive xmlbeans sboms
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906135 13f79535-47bb-0310-9956-ffa450edef68
2022-12-21 12:17:59 +00:00
PJ Fanning
b8d4597ea4 cyclonedx per module
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906134 13f79535-47bb-0310-9956-ffa450edef68
2022-12-21 11:23:43 +00:00
PJ Fanning
5b295d644b upgrade cyclonedx
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906127 13f79535-47bb-0310-9956-ffa450edef68
2022-12-21 10:18:09 +00:00
PJ Fanning
7e2f2bbbfb revert accidental change to multiply/divide
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906013 13f79535-47bb-0310-9956-ffa450edef68
2022-12-15 12:10:02 +00:00
PJ Fanning
2a34e5a31e upgrade mockito and byte-buddy
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906012 13f79535-47bb-0310-9956-ffa450edef68
2022-12-15 12:06:39 +00:00
PJ Fanning
0d382b4c67 slf4j 2.0.6
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1905950 13f79535-47bb-0310-9956-ffa450edef68
2022-12-13 08:35:40 +00:00
PJ Fanning
693c59574c [bug-66319] do not create HSSF patriarch to find comments (only use one that pre-exists)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1905943 13f79535-47bb-0310-9956-ffa450edef68
2022-12-12 21:09:09 +00:00
PJ Fanning
5a6df66b07 untidy hack for shared string counts that are higher than Integer.MAX_VALUE
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1905940 13f79535-47bb-0310-9956-ffa450edef68
2022-12-12 18:43:44 +00:00
PJ Fanning
fdffe5f66d untidy hack for shared string counts that are higher than Integer.MAX_VALUE
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1905939 13f79535-47bb-0310-9956-ffa450edef68
2022-12-12 18:20:21 +00:00
PJ Fanning
1b4e8ba77b remove unnecessary short casts for getCellStyleAt
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1905938 13f79535-47bb-0310-9956-ffa450edef68
2022-12-12 18:14:49 +00:00
PJ Fanning
7454a722f0 try to speed up SXSSFCell getColumnIndex
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1905937 13f79535-47bb-0310-9956-ffa450edef68
2022-12-12 17:58:50 +00:00
PJ Fanning
4d0a627fb9 small optimisation on getCellStyle
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1905936 13f79535-47bb-0310-9956-ffa450edef68
2022-12-12 17:36:51 +00:00
PJ Fanning
624f834310 [github-404] issue with text runs and styling relating to table cells. Thanks to gffloodg. This closes #404
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1905933 13f79535-47bb-0310-9956-ffa450edef68
2022-12-12 15:18:35 +00:00
PJ Fanning
e9aa298e1e [github-405] more performant codepoint util code. Thanks to StanBertrand. This closes #405
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1905932 13f79535-47bb-0310-9956-ffa450edef68
2022-12-12 14:59:35 +00:00
PJ Fanning
f8fd8eb2e3 [bug-66365] add test for EventBasedExcelExtractor
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1905577 13f79535-47bb-0310-9956-ffa450edef68
2022-11-28 17:59:02 +00:00
PJ Fanning
185020b538 possible issue when streaming xssf cells with formulas
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1905575 13f79535-47bb-0310-9956-ffa450edef68
2022-11-28 14:30:15 +00:00
PJ Fanning
4b911496eb [bug-66365] add test for XSSFExcelExtractor
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1905574 13f79535-47bb-0310-9956-ffa450edef68
2022-11-28 14:23:16 +00:00
PJ Fanning
c8f4cbd20b [bug-66365] update XSSFExcelExtractor to better handle formula cells with cached results of string type
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1905572 13f79535-47bb-0310-9956-ffa450edef68
2022-11-28 14:14:09 +00:00
PJ Fanning
efc032babc [bug-66365] rework XSSFCell getRichStringCellValue and getStringCellValue to better support array formula results. Thanks to Espen Amble Kolstad.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1905571 13f79535-47bb-0310-9956-ffa450edef68
2022-11-28 13:05:45 +00:00
PJ Fanning
17bcceb615 remove gradle plugin that is causing build problems
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1905535 13f79535-47bb-0310-9956-ffa450edef68
2022-11-26 00:47:03 +00:00
PJ Fanning
ca4c10f1ec gradle 7.6
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1905534 13f79535-47bb-0310-9956-ffa450edef68
2022-11-26 00:43:28 +00:00
PJ Fanning
7906c9c0fa remove fradle plugin that is causing build problems
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1905533 13f79535-47bb-0310-9956-ffa450edef68
2022-11-26 00:34:15 +00:00
PJ Fanning
537d319430 slf4j 2.0.5
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1905532 13f79535-47bb-0310-9956-ffa450edef68
2022-11-26 00:31:40 +00:00
PJ Fanning
a1c38536b9 slf4j 2.0.5
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1905527 13f79535-47bb-0310-9956-ffa450edef68
2022-11-25 14:18:00 +00:00
PJ Fanning
bac21cc1a6 javadoc
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1905445 13f79535-47bb-0310-9956-ffa450edef68
2022-11-21 20:22:40 +00:00
PJ Fanning
5319b735af byte-buddy 1.12.19
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1905383 13f79535-47bb-0310-9956-ffa450edef68
2022-11-18 13:52:46 +00:00
PJ Fanning
ba9e83817a gradle 7.6 rc3
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1905382 13f79535-47bb-0310-9956-ffa450edef68
2022-11-18 13:50:19 +00:00
PJ Fanning
ce27f9e9dc remove stray file
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1905375 13f79535-47bb-0310-9956-ffa450edef68
2022-11-18 10:10:51 +00:00
PJ Fanning
a1919c33cf [bug-66347] add read test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1905374 13f79535-47bb-0310-9956-ffa450edef68
2022-11-18 10:09:51 +00:00
PJ Fanning
33c5125865 slf4j 2.0.4
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1905373 13f79535-47bb-0310-9956-ffa450edef68
2022-11-18 10:06:19 +00:00
PJ Fanning
09126e404c [bug-66347] add XWPFTheme support to XWPFDocument. Thanks to Stephan Schwiebert.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1905344 13f79535-47bb-0310-9956-ffa450edef68
2022-11-16 22:10:18 +00:00
PJ Fanning
f0e4703f04 mockito 4.9.0
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1905319 13f79535-47bb-0310-9956-ffa450edef68
2022-11-15 08:00:23 +00:00
PJ Fanning
6d0dbe6f95 [bug-66181] support VALUE function where input is a blank cell
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1905308 13f79535-47bb-0310-9956-ffa450edef68
2022-11-14 17:41:21 +00:00
PJ Fanning
82e3102132 jmh 1.36
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1905307 13f79535-47bb-0310-9956-ffa450edef68
2022-11-14 16:09:25 +00:00
Dominik Stadler
363dafb336 Update JUnit5Progress to print out information on internal failures
Otherwise sometimes tests are failing, but we don't see why

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1905278 13f79535-47bb-0310-9956-ffa450edef68
2022-11-13 19:22:28 +00:00
Dominik Stadler
00092c21dd Update JUnit5 fully to 5.9.1/1.9.1
Otherwise some tests fail when run via Ant

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1905277 13f79535-47bb-0310-9956-ffa450edef68
2022-11-13 19:22:25 +00:00
Dominik Stadler
5fb3315ff3 Avoid build failing locally when older batik-files are still lingering on under "build"
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1905276 13f79535-47bb-0310-9956-ffa450edef68
2022-11-13 19:22:22 +00:00
Dominik Stadler
818c91dd40 Update JUnit and delete some more leftover jars
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1905275 13f79535-47bb-0310-9956-ffa450edef68
2022-11-13 19:22:18 +00:00
Dominik Stadler
9edabdf32a One more file-leak-detector exclude
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1905274 13f79535-47bb-0310-9956-ffa450edef68
2022-11-13 19:22:15 +00:00
Dominik Stadler
56d47448ce Adjust tests, comments, JavaDoc, IDE suggestions
Add more output for a flaky test which sometimes fails on very slow hardware

Shutdown in tests gracefully
Otherwise an NPE may "hide" a test-failure

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1905273 13f79535-47bb-0310-9956-ffa450edef68
2022-11-13 19:22:13 +00:00
PJ Fanning
a0abaf205a license issue
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1905063 13f79535-47bb-0310-9956-ffa450edef68
2022-11-04 09:44:37 +00:00
PJ Fanning
c838c6cd6c [bug-66335] apply rest of fix
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1905062 13f79535-47bb-0310-9956-ffa450edef68
2022-11-04 09:13:05 +00:00
PJ Fanning
c4a0266cb3 [bug-66335] add test case for issue and add some of the code from purported fix
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1905061 13f79535-47bb-0310-9956-ffa450edef68
2022-11-04 08:33:38 +00:00
PJ Fanning
46ae0a8c60 [bug-66337] do not warn about missing SummaryInformation when creating new HSSFWorkbooks. Thanks to Nicolas Herzog.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1905045 13f79535-47bb-0310-9956-ffa450edef68
2022-11-03 11:47:34 +00:00
PJ Fanning
52968d92da update javadoc
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1905029 13f79535-47bb-0310-9956-ffa450edef68
2022-11-02 19:26:57 +00:00
PJ Fanning
a8f5231c00 commons-compress 1.22
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904992 13f79535-47bb-0310-9956-ffa450edef68
2022-11-02 08:48:56 +00:00
PJ Fanning
efa5393ccf upgrade sonarqube
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904952 13f79535-47bb-0310-9956-ffa450edef68
2022-10-31 14:33:03 +00:00
PJ Fanning
b233b3c9c7 try to disable jacoco for latest JDKs
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904916 13f79535-47bb-0310-9956-ffa450edef68
2022-10-29 09:28:52 +00:00
PJ Fanning
ea69fa82a5 jdk8 build issue
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904915 13f79535-47bb-0310-9956-ffa450edef68
2022-10-29 09:12:37 +00:00
PJ Fanning
a806f69af1 jdk8 build issue
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904914 13f79535-47bb-0310-9956-ffa450edef68
2022-10-29 08:52:46 +00:00
PJ Fanning
9798625cb9 jdk19 build issue
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904908 13f79535-47bb-0310-9956-ffa450edef68
2022-10-28 23:10:54 +00:00
PJ Fanning
07f73d85be try to disable jacoco for latest JDKs
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904907 13f79535-47bb-0310-9956-ffa450edef68
2022-10-28 23:01:47 +00:00
PJ Fanning
905e58b48a try to disable spotbugs for latest JDKs
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904906 13f79535-47bb-0310-9956-ffa450edef68
2022-10-28 20:44:08 +00:00
PJ Fanning
3870633425 upgrade asm
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904903 13f79535-47bb-0310-9956-ffa450edef68
2022-10-28 17:58:04 +00:00
PJ Fanning
51c81e1f37 try Gradle 7.6 RC1
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904902 13f79535-47bb-0310-9956-ffa450edef68
2022-10-28 15:48:35 +00:00
PJ Fanning
8de6ba7500 latest sonarqube
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904901 13f79535-47bb-0310-9956-ffa450edef68
2022-10-28 15:46:24 +00:00
PJ Fanning
ad6c0b60f3 latest sonarqube (revert)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904898 13f79535-47bb-0310-9956-ffa450edef68
2022-10-28 08:52:16 +00:00
PJ Fanning
3716501152 latest sonarqube
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904897 13f79535-47bb-0310-9956-ffa450edef68
2022-10-28 08:32:13 +00:00
PJ Fanning
85b5a5e2e1 mockito 4.8.1
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904831 13f79535-47bb-0310-9956-ffa450edef68
2022-10-25 15:08:25 +00:00
PJ Fanning
efc0784eaf batik 1.16
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904830 13f79535-47bb-0310-9956-ffa450edef68
2022-10-25 15:07:19 +00:00
PJ Fanning
d7ada258c4 woodstox 6.4.0
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904829 13f79535-47bb-0310-9956-ffa450edef68
2022-10-25 15:04:34 +00:00
PJ Fanning
43b0529a67 spotbugs 5.0.13
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904698 13f79535-47bb-0310-9956-ffa450edef68
2022-10-19 15:04:03 +00:00
PJ Fanning
933948a846 [bug-66301] Add a method to properly write the header necessary for a MSG attachment. Thanks to Lyn Evans.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904685 13f79535-47bb-0310-9956-ffa450edef68
2022-10-18 19:10:32 +00:00
PJ Fanning
4c3a0b4e93 [github-389] Insert paragraphs and tables into XWPFDocuments recursively. Thanks to Anton Oellerer. This closes #389
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904680 13f79535-47bb-0310-9956-ffa450edef68
2022-10-18 11:49:34 +00:00
PJ Fanning
aa63b125d3 https link
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904564 13f79535-47bb-0310-9956-ffa450edef68
2022-10-13 10:43:22 +00:00
PJ Fanning
ba1e8de446 [bug-66312] partial fix for insertNewParagraph(XmlCursor cursor)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904563 13f79535-47bb-0310-9956-ffa450edef68
2022-10-13 10:38:31 +00:00
PJ Fanning
ce7c1c92da [bug-66306] make XSLFDiagramGroupShape public
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904555 13f79535-47bb-0310-9956-ffa450edef68
2022-10-13 01:38:37 +00:00
PJ Fanning
2d5d60cb2d add ABS test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904531 13f79535-47bb-0310-9956-ffa450edef68
2022-10-11 18:11:02 +00:00
PJ Fanning
07d2e790fd byte-buddy 1.12.18
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904520 13f79535-47bb-0310-9956-ffa450edef68
2022-10-11 13:58:17 +00:00
PJ Fanning
8c7db40f81 javadoc
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904462 13f79535-47bb-0310-9956-ffa450edef68
2022-10-08 17:55:25 +00:00
PJ Fanning
5c7b1be9b2 upgrade cyclonedx plugin
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904442 13f79535-47bb-0310-9956-ffa450edef68
2022-10-07 15:03:22 +00:00
PJ Fanning
2d44ca7fab forbiddenapis 3.4
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904373 13f79535-47bb-0310-9956-ffa450edef68
2022-10-03 12:36:21 +00:00
PJ Fanning
5ce0137045 issue with oracle jdks missing
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904346 13f79535-47bb-0310-9956-ffa450edef68
2022-09-30 14:12:10 +00:00
PJ Fanning
c8a66cd5d5 pdfbox 2.0.27
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904339 13f79535-47bb-0310-9956-ffa450edef68
2022-09-29 21:11:55 +00:00
PJ Fanning
47e49a3a16 pptx test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904334 13f79535-47bb-0310-9956-ffa450edef68
2022-09-29 10:53:01 +00:00
PJ Fanning
98705b80d4 slf4j 2.0.3
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904324 13f79535-47bb-0310-9956-ffa450edef68
2022-09-28 14:35:09 +00:00
PJ Fanning
acd5d04daa [bug-66278] Bug with multiple gradient stops at the exact same location causing a rendering failure (AWT -> not enough colors in gradient). Thanks to Gareth Floodgate. This closes #385
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904301 13f79535-47bb-0310-9956-ffa450edef68
2022-09-27 12:09:11 +00:00
PJ Fanning
1a3a5db2fe update xsbs
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904300 13f79535-47bb-0310-9956-ffa450edef68
2022-09-27 11:46:05 +00:00
Marius Volkhart
2056f2e6cf Disable poi-integration javadoc and sources JARs in Gradle. These prevented gradlew publish from succeeding.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904281 13f79535-47bb-0310-9956-ffa450edef68
2022-09-26 17:44:30 +00:00
PJ Fanning
e092990388 use batik 1.15 release
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904211 13f79535-47bb-0310-9956-ffa450edef68
2022-09-22 14:50:05 +00:00
PJ Fanning
b28a8ffb4e byte-buddy 1.12.17
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904197 13f79535-47bb-0310-9956-ffa450edef68
2022-09-21 14:31:28 +00:00
PJ Fanning
d4459839ed junit 5.9.1
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904196 13f79535-47bb-0310-9956-ffa450edef68
2022-09-21 13:59:13 +00:00
PJ Fanning
b5c5e25f6f upgrade rat
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904192 13f79535-47bb-0310-9956-ffa450edef68
2022-09-21 12:48:34 +00:00
PJ Fanning
bc568387da slf4j 2.0.2
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904187 13f79535-47bb-0310-9956-ffa450edef68
2022-09-21 10:51:20 +00:00
PJ Fanning
f86155a49a log4j release
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904114 13f79535-47bb-0310-9956-ffa450edef68
2022-09-17 01:40:42 +00:00
PJ Fanning
6965fcfb8b prep 5.2.3 release
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904107 13f79535-47bb-0310-9956-ffa450edef68
2022-09-16 21:07:53 +00:00
PJ Fanning
e07e4397a3 use batik 1.15 rc1
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904105 13f79535-47bb-0310-9956-ffa450edef68
2022-09-16 19:10:34 +00:00
PJ Fanning
17e55f5dfb xmlsec 3.0.1
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904103 13f79535-47bb-0310-9956-ffa450edef68
2022-09-16 12:43:15 +00:00
PJ Fanning
06e2213ac1 lgtm issues
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904092 13f79535-47bb-0310-9956-ffa450edef68
2022-09-15 17:31:50 +00:00
PJ Fanning
47bcd74df9 slf4j 2.0.1
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904091 13f79535-47bb-0310-9956-ffa450edef68
2022-09-15 14:56:38 +00:00
PJ Fanning
cf22264d70 [bug-66263] add test case to try to get extra classes into poi-ooxml-lite
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904081 13f79535-47bb-0310-9956-ffa450edef68
2022-09-14 19:32:25 +00:00
PJ Fanning
af6bc9660f [bug-66263] add test case to try to get extra classes into poi-ooxml-lite
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904079 13f79535-47bb-0310-9956-ffa450edef68
2022-09-14 16:37:29 +00:00
PJ Fanning
e23d96a6ad try to use IllegalStateException instead of RuntimeException
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904066 13f79535-47bb-0310-9956-ffa450edef68
2022-09-14 09:55:02 +00:00
PJ Fanning
6e7f6dad21 try to use IllegalStateException instead of RuntimeException
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904065 13f79535-47bb-0310-9956-ffa450edef68
2022-09-14 09:54:24 +00:00
PJ Fanning
1e50886b54 log4j 2.19.0 rc2 may not need hamcrest build hack
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904064 13f79535-47bb-0310-9956-ffa450edef68
2022-09-14 09:31:40 +00:00
PJ Fanning
be9d333493 try to use checked exceptions where APIs already support them
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904063 13f79535-47bb-0310-9956-ffa450edef68
2022-09-14 09:18:58 +00:00
PJ Fanning
7235ff9036 try to use IllegalStateException instead of RuntimeException
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904051 13f79535-47bb-0310-9956-ffa450edef68
2022-09-14 01:32:10 +00:00
PJ Fanning
59b16f025b try to use IllegalStateException instead of RuntimeException
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904050 13f79535-47bb-0310-9956-ffa450edef68
2022-09-14 01:12:38 +00:00
PJ Fanning
34601b5377 some lgtm issues
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904048 13f79535-47bb-0310-9956-ffa450edef68
2022-09-13 23:38:12 +00:00
PJ Fanning
e694cf4d53 try to fix hamcrest module issue affecting poi-ooxml test compile
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904045 13f79535-47bb-0310-9956-ffa450edef68
2022-09-13 11:26:51 +00:00
PJ Fanning
fee2c2a11e test with log4j 2.19.0 rc1
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904044 13f79535-47bb-0310-9956-ffa450edef68
2022-09-13 10:48:55 +00:00
PJ Fanning
439d67d6d9 upgrade deps
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904010 13f79535-47bb-0310-9956-ffa450edef68
2022-09-12 13:22:27 +00:00
PJ Fanning
fba69c1b4d graphics2d 0.41
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904009 13f79535-47bb-0310-9956-ffa450edef68
2022-09-12 13:21:49 +00:00
PJ Fanning
cbe165a05a [bug-66257] javadoc
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903985 13f79535-47bb-0310-9956-ffa450edef68
2022-09-10 18:56:15 +00:00
PJ Fanning
a6efe29bad [bug-66257] javadoc
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903974 13f79535-47bb-0310-9956-ffa450edef68
2022-09-10 14:59:34 +00:00
PJ Fanning
04df5191fc [bug-66257] add explicit POIXMLException when sheet package cannot be found
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903972 13f79535-47bb-0310-9956-ffa450edef68
2022-09-10 14:40:50 +00:00
PJ Fanning
229ad7d184 upgrade byte buddy
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903945 13f79535-47bb-0310-9956-ffa450edef68
2022-09-09 16:21:21 +00:00
PJ Fanning
a488761f6d snapshot version
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903944 13f79535-47bb-0310-9956-ffa450edef68
2022-09-09 16:18:51 +00:00
PJ Fanning
5af10dc46f prep v5.2.3 release
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903940 13f79535-47bb-0310-9956-ffa450edef68
2022-09-09 13:14:51 +00:00
PJ Fanning
5c194baec3 upgrade mockito
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903926 13f79535-47bb-0310-9956-ffa450edef68
2022-09-08 08:22:06 +00:00
PJ Fanning
b52143528a upgrade spotbugs
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903897 13f79535-47bb-0310-9956-ffa450edef68
2022-09-06 12:53:00 +00:00
PJ Fanning
b606b41192 upgrade spotbugs
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903884 13f79535-47bb-0310-9956-ffa450edef68
2022-09-05 15:59:58 +00:00
PJ Fanning
ee8781d7b5 extend tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903883 13f79535-47bb-0310-9956-ffa450edef68
2022-09-05 14:38:55 +00:00
PJ Fanning
9e36716056 extend test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903849 13f79535-47bb-0310-9956-ffa450edef68
2022-09-03 18:50:52 +00:00
PJ Fanning
e485bf0b65 add CellUtil test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903837 13f79535-47bb-0310-9956-ffa450edef68
2022-09-02 22:54:03 +00:00
PJ Fanning
ff2e90e9a5 rework CellUtil test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903836 13f79535-47bb-0310-9956-ffa450edef68
2022-09-02 22:40:21 +00:00
PJ Fanning
aeb8c3f2c6 support building cyclonedx bom
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903831 13f79535-47bb-0310-9956-ffa450edef68
2022-09-02 13:23:03 +00:00
PJ Fanning
dc12e93abb CellUtil: allow fill colors to be set to null
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903828 13f79535-47bb-0310-9956-ffa450edef68
2022-09-02 11:58:19 +00:00
PJ Fanning
fe8c8eca89 bug-66052 fix broken test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903816 13f79535-47bb-0310-9956-ffa450edef68
2022-09-01 15:44:26 +00:00
PJ Fanning
0cdae64b9a bug-66052 add broken test (see comment 10)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903815 13f79535-47bb-0310-9956-ffa450edef68
2022-09-01 15:36:27 +00:00
PJ Fanning
402b02ca1f tidy up code
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903788 13f79535-47bb-0310-9956-ffa450edef68
2022-08-31 10:09:13 +00:00
PJ Fanning
18d7711806 try to fix tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903784 13f79535-47bb-0310-9956-ffa450edef68
2022-08-31 00:38:12 +00:00
PJ Fanning
ecfb35e0d9 try to fix tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903783 13f79535-47bb-0310-9956-ffa450edef68
2022-08-30 21:43:43 +00:00
PJ Fanning
a1cb1812dd broken test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903781 13f79535-47bb-0310-9956-ffa450edef68
2022-08-30 20:31:31 +00:00
PJ Fanning
d00be6e7db [TIKA-3388] issue with non-ascii chars in file name of embedded OLE object
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903780 13f79535-47bb-0310-9956-ffa450edef68
2022-08-30 19:46:32 +00:00
PJ Fanning
4df0415621 test for TIKA-2163
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903777 13f79535-47bb-0310-9956-ffa450edef68
2022-08-30 11:44:27 +00:00
PJ Fanning
59f51987eb test for TIKA-2605
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903776 13f79535-47bb-0310-9956-ffa450edef68
2022-08-30 11:26:20 +00:00
PJ Fanning
30a0a4362a test for TIKA-3163
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903775 13f79535-47bb-0310-9956-ffa450edef68
2022-08-30 11:10:46 +00:00
PJ Fanning
325c7cb81c xmlbeans 5.1.1 release
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903766 13f79535-47bb-0310-9956-ffa450edef68
2022-08-30 00:34:13 +00:00
PJ Fanning
4ffea2f2a2 xmlbeans 5.1.1 release
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903765 13f79535-47bb-0310-9956-ffa450edef68
2022-08-30 00:31:37 +00:00
PJ Fanning
93b1290097 upgrade graphics2d
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903755 13f79535-47bb-0310-9956-ffa450edef68
2022-08-29 12:40:23 +00:00
PJ Fanning
60bc28c4a6 reuse code
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903741 13f79535-47bb-0310-9956-ffa450edef68
2022-08-28 16:22:32 +00:00
PJ Fanning
913d1eecf5 [bug-63576] support capitalized text in WordExtractor (HWPF)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903738 13f79535-47bb-0310-9956-ffa450edef68
2022-08-28 14:16:01 +00:00
PJ Fanning
25f00ba7c2 reuse code
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903737 13f79535-47bb-0310-9956-ffa450edef68
2022-08-28 13:49:05 +00:00
PJ Fanning
f6751ef514 reuse code
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903734 13f79535-47bb-0310-9956-ffa450edef68
2022-08-28 13:13:56 +00:00
PJ Fanning
98565236dd reuse code
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903733 13f79535-47bb-0310-9956-ffa450edef68
2022-08-28 13:12:31 +00:00
PJ Fanning
0edc08a358 build issue
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903732 13f79535-47bb-0310-9956-ffa450edef68
2022-08-28 13:09:38 +00:00
PJ Fanning
2ffef9d249 [bug-63575] fix test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903731 13f79535-47bb-0310-9956-ffa450edef68
2022-08-28 12:51:17 +00:00
PJ Fanning
80f89a3674 [bug-63575] support capitalized text in XWPFWordExtractor
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903729 13f79535-47bb-0310-9956-ffa450edef68
2022-08-28 12:19:08 +00:00
PJ Fanning
ab5cb372e5 do not rely on xml namespace prefixes - use the URIs
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903728 13f79535-47bb-0310-9956-ffa450edef68
2022-08-28 12:01:53 +00:00
PJ Fanning
7fd339952b [bug-66242] Fix issue with orphaned (in package) images and notes post slide removal. Thanks to gffloodg. This closes #377
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903727 13f79535-47bb-0310-9956-ffa450edef68
2022-08-28 09:35:48 +00:00
PJ Fanning
c7e51801ed update gradle
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903710 13f79535-47bb-0310-9956-ffa450edef68
2022-08-27 17:06:52 +00:00
PJ Fanning
aa8c73ea4a sonar issues
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903688 13f79535-47bb-0310-9956-ffa450edef68
2022-08-25 19:22:28 +00:00
PJ Fanning
5896c595e7 sonar issues
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903687 13f79535-47bb-0310-9956-ffa450edef68
2022-08-25 19:09:14 +00:00
PJ Fanning
deffaacd0f sonar issues
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903686 13f79535-47bb-0310-9956-ffa450edef68
2022-08-25 18:52:27 +00:00
PJ Fanning
8d9d916ecd add test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903646 13f79535-47bb-0310-9956-ffa450edef68
2022-08-23 19:32:24 +00:00
PJ Fanning
c13c147446 spotbugs 5.0.10
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903630 13f79535-47bb-0310-9956-ffa450edef68
2022-08-22 15:09:16 +00:00
PJ Fanning
2a661a5321 byte-buddy 1.12.14
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903629 13f79535-47bb-0310-9956-ffa450edef68
2022-08-22 15:05:57 +00:00
PJ Fanning
908fb7f9f9 update xmlbeans
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903576 13f79535-47bb-0310-9956-ffa450edef68
2022-08-19 15:04:29 +00:00
PJ Fanning
95c799cfce [bug-65473] extra test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903574 13f79535-47bb-0310-9956-ffa450edef68
2022-08-19 13:14:00 +00:00
PJ Fanning
03a39fd9dc more int narrowing
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903562 13f79535-47bb-0310-9956-ffa450edef68
2022-08-19 09:31:14 +00:00
PJ Fanning
9d7d2f26e0 more int narrowing
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903560 13f79535-47bb-0310-9956-ffa450edef68
2022-08-19 09:02:15 +00:00
PJ Fanning
f1692cc041 [bug-65473] when copy slide, new slide uses old textrun object reference. Thanks to FlyingPigQAQ. This closes #371
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903558 13f79535-47bb-0310-9956-ffa450edef68
2022-08-19 08:40:32 +00:00
PJ Fanning
114f8b8fde test issue
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903555 13f79535-47bb-0310-9956-ffa450edef68
2022-08-19 07:56:55 +00:00
PJ Fanning
b8cd360300 some int narrowing
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903551 13f79535-47bb-0310-9956-ffa450edef68
2022-08-19 02:21:15 +00:00
PJ Fanning
ceb6caa1d5 javadoc
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903549 13f79535-47bb-0310-9956-ffa450edef68
2022-08-19 01:13:04 +00:00
PJ Fanning
553993cfaf poi github action
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903536 13f79535-47bb-0310-9956-ffa450edef68
2022-08-18 21:45:29 +00:00
PJ Fanning
214fe205c4 [bug-66230] don't fail to create SXSSFSheet if auto size tracker can't be initialized
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903533 13f79535-47bb-0310-9956-ffa450edef68
2022-08-18 21:08:41 +00:00
PJ Fanning
fafadd5037 [bug-66230] don't fail to create SXSSFSheet if auto size tracker can't be initialized
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903530 13f79535-47bb-0310-9956-ffa450edef68
2022-08-18 18:29:04 +00:00
PJ Fanning
6ed51c1db2 [bug-66230] don't fail to create SXSSFSheet if auto size tracker can't be initialized
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903529 13f79535-47bb-0310-9956-ffa450edef68
2022-08-18 17:40:22 +00:00
PJ Fanning
1e580fe52b update overview
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903505 13f79535-47bb-0310-9956-ffa450edef68
2022-08-17 19:30:20 +00:00
PJ Fanning
c4dd68a4e6 xmlbeans 5.1.0 rc1
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903480 13f79535-47bb-0310-9956-ffa450edef68
2022-08-17 08:45:42 +00:00
PJ Fanning
624b907c5d [bug-66215] try to improve logic for overlapping tables
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903471 13f79535-47bb-0310-9956-ffa450edef68
2022-08-17 01:15:12 +00:00
PJ Fanning
9a616913b9 [bug-66215] try to fix formulas in tables after row/column shifting
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903464 13f79535-47bb-0310-9956-ffa450edef68
2022-08-16 17:37:35 +00:00
PJ Fanning
74cc4ef32b [bug-66215] add test case (that shows we have issues and need fixes)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903459 13f79535-47bb-0310-9956-ffa450edef68
2022-08-16 13:14:57 +00:00
PJ Fanning
702e9c6958 [bug-66215] add test case (that shows we have issues and need fixes)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903458 13f79535-47bb-0310-9956-ffa450edef68
2022-08-16 13:12:45 +00:00
PJ Fanning
2343428015 [bug-66216] fix issue where pivotTable.getPivotCacheDefinition() returns null
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903445 13f79535-47bb-0310-9956-ffa450edef68
2022-08-15 23:01:50 +00:00
PJ Fanning
3184a18b40 [bug-66216] fix issue where pivotTable.getPivotCacheDefinition() returns null
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903442 13f79535-47bb-0310-9956-ffa450edef68
2022-08-15 19:20:13 +00:00
PJ Fanning
ed67d48d96 [bug-66215] add test case (that shows we have issues and need fixes)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903440 13f79535-47bb-0310-9956-ffa450edef68
2022-08-15 18:40:25 +00:00
PJ Fanning
3a42bc3247 test that original slide is not modified
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903438 13f79535-47bb-0310-9956-ffa450edef68
2022-08-15 13:19:34 +00:00
PJ Fanning
0f45464494 [bug-66040] add apparently working test cases
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903437 13f79535-47bb-0310-9956-ffa450edef68
2022-08-15 13:08:03 +00:00
PJ Fanning
7425aa0af3 [bug-66040] add apparently working test cases
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903436 13f79535-47bb-0310-9956-ffa450edef68
2022-08-15 12:59:07 +00:00
PJ Fanning
4cbf218b0c upgrade woodstox
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903435 13f79535-47bb-0310-9956-ffa450edef68
2022-08-15 12:26:24 +00:00
PJ Fanning
c8b87e2493 matche log4j-api version
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903428 13f79535-47bb-0310-9956-ffa450edef68
2022-08-15 09:47:52 +00:00
PJ Fanning
c42980197a mockito 4.7.0
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903427 13f79535-47bb-0310-9956-ffa450edef68
2022-08-15 09:27:29 +00:00
PJ Fanning
e8f53b3084 [bug-66213] hack clone table code to avoid failing with edge cases
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903410 13f79535-47bb-0310-9956-ffa450edef68
2022-08-14 09:50:00 +00:00
PJ Fanning
711ab033f3 [bug-66213] hack clone table code to avoid failing with edge cases
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903409 13f79535-47bb-0310-9956-ffa450edef68
2022-08-14 09:47:16 +00:00
PJ Fanning
6f6e1c4165 further issue with clone
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903400 13f79535-47bb-0310-9956-ffa450edef68
2022-08-13 20:05:34 +00:00
PJ Fanning
6d2853d9bd [bug-66213] hack clone table code to avoid failing with edge cases
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903398 13f79535-47bb-0310-9956-ffa450edef68
2022-08-13 18:11:16 +00:00
PJ Fanning
22315660ba [bug-66213] try to debug failure
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903397 13f79535-47bb-0310-9956-ffa450edef68
2022-08-13 17:06:14 +00:00
PJ Fanning
a38a5c3a0b [bug-66213] clone tables while cloning sheet. Thanks to Axel Richter.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903396 13f79535-47bb-0310-9956-ffa450edef68
2022-08-13 16:35:05 +00:00
PJ Fanning
62d8b8df57 [bug-66212] try to remove table part for table when removing table
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903395 13f79535-47bb-0310-9956-ffa450edef68
2022-08-13 16:11:03 +00:00
PJ Fanning
839594b73e [bug-66212] try to remove package part for table when removing table
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903394 13f79535-47bb-0310-9956-ffa450edef68
2022-08-13 15:32:03 +00:00
PJ Fanning
7301e841c7 [bug-66211] add test case
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903393 13f79535-47bb-0310-9956-ffa450edef68
2022-08-13 15:09:18 +00:00
PJ Fanning
5add4aa3d3 [bug-66211] don't validate the row XML when using XSSFTable.updateHeaders
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903390 13f79535-47bb-0310-9956-ffa450edef68
2022-08-13 14:33:16 +00:00
PJ Fanning
eb5dca9a1e fix escaping in message
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903314 13f79535-47bb-0310-9956-ffa450edef68
2022-08-09 19:47:53 +00:00
PJ Fanning
59091db138 don't wrap exceptions
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903274 13f79535-47bb-0310-9956-ffa450edef68
2022-08-07 22:44:56 +00:00
PJ Fanning
0735103188 forbidden api check
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903273 13f79535-47bb-0310-9956-ffa450edef68
2022-08-07 22:42:54 +00:00
PJ Fanning
72983be276 basic bubble chart support
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903272 13f79535-47bb-0310-9956-ffa450edef68
2022-08-07 22:19:10 +00:00
PJ Fanning
f6a320770b remove unnecessary l
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903266 13f79535-47bb-0310-9956-ffa450edef68
2022-08-07 09:21:30 +00:00
PJ Fanning
d7d13a11c1 [github-367] use uppercase L for longs. Thanks to Arturo Bernal. This closes #367
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903265 13f79535-47bb-0310-9956-ffa450edef68
2022-08-07 09:16:24 +00:00
PJ Fanning
bbfd7b9ec8 [github-365] use lambdas. Thanks to Arturo Bernal. This closes #365
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903258 13f79535-47bb-0310-9956-ffa450edef68
2022-08-06 21:12:49 +00:00
PJ Fanning
eaa27548fa [github-366] remove unnecessary local vars. Thanks to Arturo Bernal. This closes #366
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903257 13f79535-47bb-0310-9956-ffa450edef68
2022-08-06 21:06:50 +00:00
PJ Fanning
3247a4160e [github-364] use Math.min/max. Thanks to Arturo Bernal. This closes #364
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903256 13f79535-47bb-0310-9956-ffa450edef68
2022-08-06 20:51:57 +00:00
PJ Fanning
554f729870 remove unused imports
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903208 13f79535-47bb-0310-9956-ffa450edef68
2022-08-03 10:21:13 +00:00
PJ Fanning
343b86c461 remove unused field
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903207 13f79535-47bb-0310-9956-ffa450edef68
2022-08-03 10:07:15 +00:00
PJ Fanning
7752e61c90 compile issue after byte-buddy upgrade
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903206 13f79535-47bb-0310-9956-ffa450edef68
2022-08-03 09:07:07 +00:00
PJ Fanning
e16da8059c upgrade byte-buddy
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903196 13f79535-47bb-0310-9956-ffa450edef68
2022-08-02 13:24:44 +00:00
PJ Fanning
266619f363 revert: github ci perms
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903174 13f79535-47bb-0310-9956-ffa450edef68
2022-08-01 17:27:45 +00:00
PJ Fanning
507c54f83d github ci perms
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903173 13f79535-47bb-0310-9956-ffa450edef68
2022-08-01 17:08:46 +00:00
PJ Fanning
725b256e95 [bug-66181] add time example
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903172 13f79535-47bb-0310-9956-ffa450edef68
2022-08-01 16:12:36 +00:00
PJ Fanning
633baa45eb [bug-66181] fix issue with evaluation of blank string in VALUE function
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903171 13f79535-47bb-0310-9956-ffa450edef68
2022-08-01 16:06:59 +00:00
PJ Fanning
f3a1d6ac92 [bug-66181] test case
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903170 13f79535-47bb-0310-9956-ffa450edef68
2022-08-01 15:57:58 +00:00
PJ Fanning
280b5130e2 update test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903169 13f79535-47bb-0310-9956-ffa450edef68
2022-08-01 13:50:14 +00:00
PJ Fanning
9e88957356 [bug-66187] issue with XWPFRun creating run properties unnecessarily
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903163 13f79535-47bb-0310-9956-ffa450edef68
2022-08-01 11:35:22 +00:00
PJ Fanning
ee65a6655d update method name (has typo)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903161 13f79535-47bb-0310-9956-ffa450edef68
2022-08-01 11:16:19 +00:00
Dominik Stadler
eabb9a5999 Switch from "gradle: true" to "useAnt: true" to make it clear which jobs still run with the Ant-build
Github-PR-Job should use Gradle now

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903125 13f79535-47bb-0310-9956-ffa450edef68
2022-07-30 15:07:05 +00:00
Dominik Stadler
1fbd29926b Ant: Update spotbugs to 4.7.1
Update/add dependencies
Fix icu4j jar-version
log4j is actually still 2.17.x for spotbugs
Add xmlresolver for xlst transformation

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903124 13f79535-47bb-0310-9956-ffa450edef68
2022-07-30 12:48:03 +00:00
Dominik Stadler
db4b01a9d0 Ant: Remove temporary files
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903123 13f79535-47bb-0310-9956-ffa450edef68
2022-07-30 12:48:00 +00:00
PJ Fanning
c9d057f4e1 [bug-66189] add test case
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903122 13f79535-47bb-0310-9956-ffa450edef68
2022-07-30 09:00:44 +00:00
Dominik Stadler
3f0afe8fc7 Change test to make it work with JDK 19+
This way of mocking does not work any more with JDK 19+

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903111 13f79535-47bb-0310-9956-ffa450edef68
2022-07-29 18:27:49 +00:00
Dominik Stadler
1b106f7af7 Add module for stax2 to Ant-build to make poi-integration java9-compile work
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903110 13f79535-47bb-0310-9956-ffa450edef68
2022-07-29 17:57:07 +00:00
Dominik Stadler
b076e0e188 Add workaround for bcpkix-module which is not loaded automatically for some reason
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903109 13f79535-47bb-0310-9956-ffa450edef68
2022-07-29 17:57:05 +00:00
Dominik Stadler
f5ae78aa86 Update Junit Platform to 1.8.2
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903108 13f79535-47bb-0310-9956-ffa450edef68
2022-07-29 17:55:02 +00:00
Dominik Stadler
096f7454e2 Add one more exclude for the file-leak-detector
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903107 13f79535-47bb-0310-9956-ffa450edef68
2022-07-29 17:55:00 +00:00
Dominik Stadler
af4d1e9f1a Adjust some tests for Java 19 and Java 20
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903105 13f79535-47bb-0310-9956-ffa450edef68
2022-07-29 17:07:19 +00:00
Dominik Stadler
4df10cf9dd Fix issues found when fuzzing Apache POI via Jazzer
Replace RuntimeException with a more specific types

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903104 13f79535-47bb-0310-9956-ffa450edef68
2022-07-29 17:07:15 +00:00
Dominik Stadler
92b8cf9984 Also look for test-data in parent-directory
When using the IDE to run tests in one of the
sub-modules uses the poi-* sub-directory, so
looking for the test-data in ../test-data is
useful to make executing tests work out-of-the-box

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903103 13f79535-47bb-0310-9956-ffa450edef68
2022-07-29 17:07:05 +00:00
PJ Fanning
5c78170f5d saxon 11.4
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903100 13f79535-47bb-0310-9956-ffa450edef68
2022-07-29 12:59:44 +00:00
PJ Fanning
82fa836d1f code to handle smart art rotations
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903096 13f79535-47bb-0310-9956-ffa450edef68
2022-07-29 08:10:51 +00:00
PJ Fanning
56fe91998a disable test on java 19
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903067 13f79535-47bb-0310-9956-ffa450edef68
2022-07-27 20:07:49 +00:00
PJ Fanning
4745a2a372 try java 19 build
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903060 13f79535-47bb-0310-9956-ffa450edef68
2022-07-27 13:28:23 +00:00
PJ Fanning
fc947b865e try java 19 build
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903059 13f79535-47bb-0310-9956-ffa450edef68
2022-07-27 12:58:33 +00:00
PJ Fanning
2241f6d7f1 try java 19 build
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903058 13f79535-47bb-0310-9956-ffa450edef68
2022-07-27 12:55:10 +00:00
PJ Fanning
eb078ea1a1 try java 19 build
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903057 13f79535-47bb-0310-9956-ffa450edef68
2022-07-27 12:50:17 +00:00
PJ Fanning
dc4eb7ed19 try java 19 build
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903056 13f79535-47bb-0310-9956-ffa450edef68
2022-07-27 12:45:33 +00:00
PJ Fanning
d3dd4e5980 try java 19 build
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903055 13f79535-47bb-0310-9956-ffa450edef68
2022-07-27 12:39:19 +00:00
PJ Fanning
afdd82a78f upgrade asm jar
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903054 13f79535-47bb-0310-9956-ffa450edef68
2022-07-27 10:08:45 +00:00
PJ Fanning
0ff40e8fb7 issue with junit upgrade
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903053 13f79535-47bb-0310-9956-ffa450edef68
2022-07-27 09:30:01 +00:00
PJ Fanning
38fb4377bb try to fix jaav 17 build
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903052 13f79535-47bb-0310-9956-ffa450edef68
2022-07-27 09:23:13 +00:00
PJ Fanning
dcb6742a26 try to fix jaav 17 build
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903051 13f79535-47bb-0310-9956-ffa450edef68
2022-07-27 09:21:34 +00:00
PJ Fanning
c3fd22a71a junit 5.9.0
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903049 13f79535-47bb-0310-9956-ffa450edef68
2022-07-27 09:06:04 +00:00
PJ Fanning
749bdfb5a7 revert accidental changes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903048 13f79535-47bb-0310-9956-ffa450edef68
2022-07-27 09:02:15 +00:00
PJ Fanning
1ce0f77bdd [bug-66176] rework text box support
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903047 13f79535-47bb-0310-9956-ffa450edef68
2022-07-27 08:59:25 +00:00
PJ Fanning
cee18e78b5 add tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903040 13f79535-47bb-0310-9956-ffa450edef68
2022-07-27 00:02:56 +00:00
PJ Fanning
64bd4c0e88 try to fix issue where java9 module-info compiles don't happen
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903038 13f79535-47bb-0310-9956-ffa450edef68
2022-07-26 21:56:46 +00:00
PJ Fanning
af689e73bd [bug-65562] derive sheet dimensions when outputting SXSSFSheets
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903037 13f79535-47bb-0310-9956-ffa450edef68
2022-07-26 21:42:24 +00:00
PJ Fanning
d1593f802b update module-info
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903005 13f79535-47bb-0310-9956-ffa450edef68
2022-07-25 11:45:08 +00:00
PJ Fanning
9626dd0661 update some module-info classes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903003 13f79535-47bb-0310-9956-ffa450edef68
2022-07-25 11:22:08 +00:00
PJ Fanning
affaa8d11c gradle version
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903002 13f79535-47bb-0310-9956-ffa450edef68
2022-07-25 09:56:01 +00:00
PJ Fanning
4c53dadada module-info
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903001 13f79535-47bb-0310-9956-ffa450edef68
2022-07-25 09:40:06 +00:00
PJ Fanning
c62002e7ba refactor smart art code
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903000 13f79535-47bb-0310-9956-ffa450edef68
2022-07-25 09:25:05 +00:00
PJ Fanning
2a749dc671 ant builds need to match gradle builds (poi-ooxml-full schemas)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902995 13f79535-47bb-0310-9956-ffa450edef68
2022-07-25 01:12:05 +00:00
PJ Fanning
b099586138 ant builds need to match gradle builds (poi-ooxml-full schemas)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902994 13f79535-47bb-0310-9956-ffa450edef68
2022-07-25 01:02:10 +00:00
PJ Fanning
1b60ffe391 try to work around issue with getting embedded smart art diagram
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902947 13f79535-47bb-0310-9956-ffa450edef68
2022-07-22 14:36:47 +00:00
PJ Fanning
32bf52b449 try to work around issue with getting embedded smart art diagram
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902946 13f79535-47bb-0310-9956-ffa450edef68
2022-07-22 14:03:14 +00:00
PJ Fanning
0b0df2fe58 add disabled test case
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902943 13f79535-47bb-0310-9956-ffa450edef68
2022-07-22 11:50:32 +00:00
PJ Fanning
c3f415d8e7 temporarily exclude new file from poi-integration test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902942 13f79535-47bb-0310-9956-ffa450edef68
2022-07-22 11:41:31 +00:00
PJ Fanning
10da475b7a forbidden api
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902941 13f79535-47bb-0310-9956-ffa450edef68
2022-07-22 11:03:57 +00:00
PJ Fanning
5c34bad8f4 forbidden api
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902939 13f79535-47bb-0310-9956-ffa450edef68
2022-07-22 10:33:31 +00:00
PJ Fanning
bd5a95acbf remove comment
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902936 13f79535-47bb-0310-9956-ffa450edef68
2022-07-22 10:12:42 +00:00
PJ Fanning
cc7fcdfab3 [bug-66176] Integrate SmartArt diagrams from powerpoint presentations. Thanks to Yaseen.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902934 13f79535-47bb-0310-9956-ffa450edef68
2022-07-22 09:55:10 +00:00
PJ Fanning
aa7eee178c add tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902927 13f79535-47bb-0310-9956-ffa450edef68
2022-07-21 21:40:32 +00:00
PJ Fanning
47a86037b6 change bytebuddy version due to gradle warning
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902924 13f79535-47bb-0310-9956-ffa450edef68
2022-07-21 20:19:39 +00:00
PJ Fanning
2d44904c6d update pom logic
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902923 13f79535-47bb-0310-9956-ffa450edef68
2022-07-21 20:16:38 +00:00
PJ Fanning
f9ec9fc3f2 upgrade gradle plugins
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902920 13f79535-47bb-0310-9956-ffa450edef68
2022-07-21 19:33:49 +00:00
PJ Fanning
072aec8ad2 use common PictureType
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902911 13f79535-47bb-0310-9956-ffa450edef68
2022-07-21 13:41:49 +00:00
PJ Fanning
2a0c1b82c7 add getPictureTypeEnum
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902905 13f79535-47bb-0310-9956-ffa450edef68
2022-07-21 09:56:56 +00:00
PJ Fanning
f58e9169d9 add getPictureTypeEnum
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902904 13f79535-47bb-0310-9956-ffa450edef68
2022-07-21 08:50:52 +00:00
PJ Fanning
5ecf604b94 add getPictureTypeEnum
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902898 13f79535-47bb-0310-9956-ffa450edef68
2022-07-20 23:04:02 +00:00
PJ Fanning
6dd67aa494 test issue
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902897 13f79535-47bb-0310-9956-ffa450edef68
2022-07-20 22:02:27 +00:00
PJ Fanning
b0b6747ce3 test issue
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902894 13f79535-47bb-0310-9956-ffa450edef68
2022-07-20 21:06:13 +00:00
PJ Fanning
fa045845f5 [bug-55330] add setMargin(PageMargin, double)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902890 13f79535-47bb-0310-9956-ffa450edef68
2022-07-20 19:32:28 +00:00
PJ Fanning
5355725197 [bug-55330] add getMargin(PageMargin)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902880 13f79535-47bb-0310-9956-ffa450edef68
2022-07-20 13:51:17 +00:00
PJ Fanning
0704929412 [bug-66173] add new XSSFSheet createSplitPane method to avoid bug in existing method
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902879 13f79535-47bb-0310-9956-ffa450edef68
2022-07-20 13:29:44 +00:00
PJ Fanning
b641f077cc [bug-66173] add new XSSFSheet createSplitPane method to avoid bug in existing method
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902878 13f79535-47bb-0310-9956-ffa450edef68
2022-07-20 13:29:08 +00:00
PJ Fanning
590e49c143 [bug-66173] add new XSSFSheet createSplitPane method to avoid bug in existing method
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902876 13f79535-47bb-0310-9956-ffa450edef68
2022-07-20 13:13:28 +00:00
PJ Fanning
369681f7f9 use try-with-resources
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902873 13f79535-47bb-0310-9956-ffa450edef68
2022-07-20 10:56:16 +00:00
PJ Fanning
48e9d6a6d5 javadoc
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902872 13f79535-47bb-0310-9956-ffa450edef68
2022-07-20 10:45:04 +00:00
PJ Fanning
3cb2c1177a api docs
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902835 13f79535-47bb-0310-9956-ffa450edef68
2022-07-18 10:37:33 +00:00
PJ Fanning
2cb71aeb75 javadoc
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902822 13f79535-47bb-0310-9956-ffa450edef68
2022-07-17 19:11:53 +00:00
PJ Fanning
f736e2c65b lgtm issue
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902804 13f79535-47bb-0310-9956-ffa450edef68
2022-07-17 10:00:17 +00:00
PJ Fanning
ad6af709b8 [github-348] tidy up number casting
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902803 13f79535-47bb-0310-9956-ffa450edef68
2022-07-17 09:30:21 +00:00
PJ Fanning
32069e6f5a [github-353] Use printf. Thanks to XenoAmess. This closes #353
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902802 13f79535-47bb-0310-9956-ffa450edef68
2022-07-17 09:07:07 +00:00
PJ Fanning
50c40b61f7 [github-354] Add extra methods to StringUtil and refactor some code to use them. Thanks to XenoAmess. This closes #354
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902801 13f79535-47bb-0310-9956-ffa450edef68
2022-07-17 08:45:38 +00:00
PJ Fanning
cd02f739eb [github-339] compile issue in test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902790 13f79535-47bb-0310-9956-ffa450edef68
2022-07-17 01:57:18 +00:00
PJ Fanning
c589f0ee7a [github-339] Add extra methods to StringUtil and refactor some code to use them. Thanks to XenoAmess. This closes #339
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902789 13f79535-47bb-0310-9956-ffa450edef68
2022-07-17 01:53:18 +00:00
PJ Fanning
dc7e2de82e [github-356] extra condition change
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902788 13f79535-47bb-0310-9956-ffa450edef68
2022-07-17 01:46:10 +00:00
PJ Fanning
773ad5e825 [github-356] accept some of the changes in this PR (not all)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902784 13f79535-47bb-0310-9956-ffa450edef68
2022-07-16 20:21:22 +00:00
PJ Fanning
46b14041bf java 17 compile issue
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902783 13f79535-47bb-0310-9956-ffa450edef68
2022-07-16 20:12:56 +00:00
PJ Fanning
d849809f22 java 17 compile issue
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902782 13f79535-47bb-0310-9956-ffa450edef68
2022-07-16 20:05:15 +00:00
PJ Fanning
bd2a798c3c java 17 compile issue
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902779 13f79535-47bb-0310-9956-ffa450edef68
2022-07-16 18:12:10 +00:00
PJ Fanning
22badcef27 [github-342] Use foreach. Thanks to XenoAmess. This closes #342
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902778 13f79535-47bb-0310-9956-ffa450edef68
2022-07-16 18:08:50 +00:00
PJ Fanning
4f54f29a2d [github-345] Use switch instead of if. Thanks to XenoAmess. This closes #345
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902772 13f79535-47bb-0310-9956-ffa450edef68
2022-07-16 10:13:18 +00:00
PJ Fanning
feae2c8749 [github-346] Javadoc issues. Thanks to XenoAmess. This closes #346
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902771 13f79535-47bb-0310-9956-ffa450edef68
2022-07-16 10:05:38 +00:00
PJ Fanning
5b78069b63 gradle 7.5
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902762 13f79535-47bb-0310-9956-ffa450edef68
2022-07-16 02:04:28 +00:00
PJ Fanning
b0400647a9 java 17 compile issues
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902761 13f79535-47bb-0310-9956-ffa450edef68
2022-07-16 01:17:15 +00:00
PJ Fanning
ce3371e92e [github-341] Remove unused imports. Thanks to XenoAmess. This closes #341
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902760 13f79535-47bb-0310-9956-ffa450edef68
2022-07-15 23:23:34 +00:00
PJ Fanning
51c9ac77a3 [github-355] Tidy up some boxed variables. Thanks to XenoAmess. This closes #355
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902759 13f79535-47bb-0310-9956-ffa450edef68
2022-07-15 23:03:51 +00:00
PJ Fanning
dbd078af9c [github-350] simplify cloneCellProperties. Thanks to XenoAmess. This closes #350
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902758 13f79535-47bb-0310-9956-ffa450edef68
2022-07-15 22:57:34 +00:00
PJ Fanning
64d9a97d44 [github-349] tidy up some test assertions. Thanks to XenoAmess. This closes #349
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902757 13f79535-47bb-0310-9956-ffa450edef68
2022-07-15 22:52:45 +00:00
PJ Fanning
01f14a7548 [github-361] reuse regex pattern instances. Thanks to XenoAmess. This closes #361
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902756 13f79535-47bb-0310-9956-ffa450edef68
2022-07-15 22:45:56 +00:00
PJ Fanning
87ee700d04 [github-340] make more use of StandardCharsets. Thanks to XenoAmess. This closes #340
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902755 13f79535-47bb-0310-9956-ffa450edef68
2022-07-15 21:52:32 +00:00
PJ Fanning
70bd85fda4 [github-358] improve locking in CellDateFormatter. Thanks to XenoAmess. This closes #358
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902754 13f79535-47bb-0310-9956-ffa450edef68
2022-07-15 21:31:35 +00:00
PJ Fanning
917f8d027a [github-359] fix case sensitivity issue in AutoNumberingScheme. Thanks to XenoAmess. This closes #359
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902753 13f79535-47bb-0310-9956-ffa450edef68
2022-07-15 21:28:44 +00:00
PJ Fanning
186ad50d18 [github-351] make test loop more efficient
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902752 13f79535-47bb-0310-9956-ffa450edef68
2022-07-15 21:24:53 +00:00
PJ Fanning
30b20e3967 [github-344] refactor equals method in XSSFHyperlinkRecord
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902751 13f79535-47bb-0310-9956-ffa450edef68
2022-07-15 21:20:32 +00:00
PJ Fanning
6e34a3cebe [github-357] fix equals check in CellNumberFormatter. Thanks to XenoAmess. This closes #357
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902750 13f79535-47bb-0310-9956-ffa450edef68
2022-07-15 21:10:32 +00:00
PJ Fanning
2c479b4967 [github-347] make some inner classes static to save memory. Thanks to XenoAmess. This closes #347
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902749 13f79535-47bb-0310-9956-ffa450edef68
2022-07-15 21:06:30 +00:00
PJ Fanning
619db4dde5 [github-343] use try-with-resources. Thanks to XenoAmess. This closes #343
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902748 13f79535-47bb-0310-9956-ffa450edef68
2022-07-15 21:02:15 +00:00
PJ Fanning
67a4ac400e [github-360] HSSFExtendedColor does not set RGB colors properly. Thanks to XenoAmess. This closes #360
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902747 13f79535-47bb-0310-9956-ffa450edef68
2022-07-15 20:54:22 +00:00
PJ Fanning
8fbe3966dd allow XSSF RTS
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902674 13f79535-47bb-0310-9956-ffa450edef68
2022-07-12 09:40:29 +00:00
PJ Fanning
7ab3352712 allow HSSFSharedString
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902673 13f79535-47bb-0310-9956-ffa450edef68
2022-07-12 09:25:57 +00:00
PJ Fanning
e39ab54eff undeprecate private code that is still used
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902672 13f79535-47bb-0310-9956-ffa450edef68
2022-07-12 09:25:20 +00:00
PJ Fanning
0ad448edc8 missing license
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902640 13f79535-47bb-0310-9956-ffa450edef68
2022-07-10 22:43:08 +00:00
PJ Fanning
ee8de8f848 ant rat check issue
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902639 13f79535-47bb-0310-9956-ffa450edef68
2022-07-10 21:55:06 +00:00
PJ Fanning
44930ebfa0 [bug-66052] add test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902637 13f79535-47bb-0310-9956-ffa450edef68
2022-07-10 18:46:54 +00:00
PJ Fanning
5386fe171d try to fix HSSF tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902635 13f79535-47bb-0310-9956-ffa450edef68
2022-07-10 14:38:04 +00:00
PJ Fanning
69036c64ea remove ignoreInvalidColors param
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902634 13f79535-47bb-0310-9956-ffa450edef68
2022-07-10 14:32:49 +00:00
PJ Fanning
e0ca0baebf try to fix tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902633 13f79535-47bb-0310-9956-ffa450edef68
2022-07-10 13:54:09 +00:00
PJ Fanning
ec3e9218ef javadoc issues
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902632 13f79535-47bb-0310-9956-ffa450edef68
2022-07-10 12:52:17 +00:00
PJ Fanning
79273a06aa add param that allows invalid colors to be ignored
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902630 13f79535-47bb-0310-9956-ffa450edef68
2022-07-10 12:22:54 +00:00
PJ Fanning
536537e360 try to fix tests - disabling 2 that need investigation
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902627 13f79535-47bb-0310-9956-ffa450edef68
2022-07-10 11:21:21 +00:00
PJ Fanning
0a283a36c8 try to fix tests - disabling 2 that need investigation
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902626 13f79535-47bb-0310-9956-ffa450edef68
2022-07-10 11:18:45 +00:00
PJ Fanning
72e7df6b5c javadoc issues
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902624 13f79535-47bb-0310-9956-ffa450edef68
2022-07-10 10:29:33 +00:00
PJ Fanning
4cda0c91fd throw exception if wrong Color class is used
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902623 13f79535-47bb-0310-9956-ffa450edef68
2022-07-10 10:24:34 +00:00
PJ Fanning
6602122926 [bug-66052] apply cell style fixes supplied by Axel Richter
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902622 13f79535-47bb-0310-9956-ffa450edef68
2022-07-10 10:12:20 +00:00
PJ Fanning
d9383d6ba9 log4j 2.18.0
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902438 13f79535-47bb-0310-9956-ffa450edef68
2022-07-03 22:52:21 +00:00
PJ Fanning
b4c92e4ae5 [bug-65634] NotOLE2FileException not thrown in POI 5.0.0 by opening an XML-RAW File with SlideShowFactory.create()
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902395 13f79535-47bb-0310-9956-ffa450edef68
2022-07-01 16:30:15 +00:00
PJ Fanning
86cc8d1b4b [bug-51037] apply default column style if no style set
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902391 13f79535-47bb-0310-9956-ffa450edef68
2022-07-01 13:14:52 +00:00
PJ Fanning
2a040c42ec [bug-66152] add broken test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902390 13f79535-47bb-0310-9956-ffa450edef68
2022-07-01 12:55:33 +00:00
PJ Fanning
f212e7c14f try to fix rat check
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902313 13f79535-47bb-0310-9956-ffa450edef68
2022-06-28 11:11:50 +00:00
PJ Fanning
4b1fc4f153 woostox 6.3.0
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902311 13f79535-47bb-0310-9956-ffa450edef68
2022-06-28 10:43:33 +00:00
PJ Fanning
b913185366 spotbugs 5.0.9
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902310 13f79535-47bb-0310-9956-ffa450edef68
2022-06-28 10:42:32 +00:00
PJ Fanning
8d204f1222 [bug-66146] poi-ooxml-full: generate classes for threadedComments and word12 xsds
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902309 13f79535-47bb-0310-9956-ffa450edef68
2022-06-28 10:41:29 +00:00
PJ Fanning
989b9e2f75 [bug-66145] poi-ooxml-full: add xsd schema for drawing/2008/diagram to read SmartArt diagrams
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902305 13f79535-47bb-0310-9956-ffa450edef68
2022-06-28 09:51:27 +00:00
PJ Fanning
b46b69ab0f [bug-66138] change log level to warn (the issue is worked around)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902170 13f79535-47bb-0310-9956-ffa450edef68
2022-06-22 13:25:03 +00:00
PJ Fanning
c7e2c6a531 update osgi readme
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902066 13f79535-47bb-0310-9956-ffa450edef68
2022-06-19 15:20:29 +00:00
PJ Fanning
b24d8ca779 remove use of some calls to deprecated cursor dispose()
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902065 13f79535-47bb-0310-9956-ffa450edef68
2022-06-19 13:37:14 +00:00
PJ Fanning
96079c05b7 remove use of some calls to deprecated cursor dispose()
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902061 13f79535-47bb-0310-9956-ffa450edef68
2022-06-19 12:03:51 +00:00
PJ Fanning
b7261c1621 remove use of some calls to deprecated cursor dispose()
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902057 13f79535-47bb-0310-9956-ffa450edef68
2022-06-19 11:02:01 +00:00
PJ Fanning
4b2913afd3 xmlbeans 5.1.0
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901997 13f79535-47bb-0310-9956-ffa450edef68
2022-06-17 00:19:12 +00:00
Andreas Beeker
c41176f207 #66115 - Some Password protected XLS files are not read
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901996 13f79535-47bb-0310-9956-ffa450edef68
2022-06-16 22:56:47 +00:00
Andreas Beeker
48ede69842 apply https://github.com/policeman-tools/forbidden-apis/issues/191
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901995 13f79535-47bb-0310-9956-ffa450edef68
2022-06-16 22:56:05 +00:00
Dominik Stadler
843f5df1db Move getDeps() out of javadoc-block and include it in jenkins-target
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901978 13f79535-47bb-0310-9956-ffa450edef68
2022-06-16 14:52:45 +00:00
Dominik Stadler
2efd5f1143 Add note about software license grant from BEA Systems back in 2003
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901977 13f79535-47bb-0310-9956-ffa450edef68
2022-06-16 14:52:43 +00:00
PJ Fanning
d075f2ae9c [bug-66123] support gte attribute in XSSFConditionalFormattingThreshold
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901945 13f79535-47bb-0310-9956-ffa450edef68
2022-06-15 16:01:37 +00:00
PJ Fanning
c559e4549a upsate year
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901932 13f79535-47bb-0310-9956-ffa450edef68
2022-06-15 08:52:59 +00:00
PJ Fanning
c835ac893a upgrade spotbugs plugin
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901878 13f79535-47bb-0310-9956-ffa450edef68
2022-06-13 13:12:49 +00:00
PJ Fanning
722d2372aa xmlbeans 5.1.0 release
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901864 13f79535-47bb-0310-9956-ffa450edef68
2022-06-12 23:36:47 +00:00
PJ Fanning
35215db1cf add extra setTitle method
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901821 13f79535-47bb-0310-9956-ffa450edef68
2022-06-11 08:36:51 +00:00
PJ Fanning
8e5cb6e98a upgrade sonarqube plugin
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901784 13f79535-47bb-0310-9956-ffa450edef68
2022-06-09 14:18:24 +00:00
PJ Fanning
ff622a569e gradle version
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901709 13f79535-47bb-0310-9956-ffa450edef68
2022-06-06 20:42:00 +00:00
PJ Fanning
653314efd7 javadoc issue
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901708 13f79535-47bb-0310-9956-ffa450edef68
2022-06-06 19:50:19 +00:00
PJ Fanning
5574c7b4fd add FORECAST and FORECAST.LINEAR functions
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901689 13f79535-47bb-0310-9956-ffa450edef68
2022-06-05 21:45:59 +00:00
PJ Fanning
1bae0a43bf add PEARSON function
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901688 13f79535-47bb-0310-9956-ffa450edef68
2022-06-05 20:36:22 +00:00
PJ Fanning
41dfbd67c5 add COVARIANCE.S function
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901687 13f79535-47bb-0310-9956-ffa450edef68
2022-06-05 19:55:50 +00:00
PJ Fanning
f0b78f9e3b add COVAR and COVARIANCE.P functions
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901686 13f79535-47bb-0310-9956-ffa450edef68
2022-06-05 19:51:01 +00:00
PJ Fanning
eea430a5aa mismatched array sizes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901685 13f79535-47bb-0310-9956-ffa450edef68
2022-06-05 19:25:07 +00:00
PJ Fanning
abcf2c07e2 support string cells in correl function
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901684 13f79535-47bb-0310-9956-ffa450edef68
2022-06-05 19:16:54 +00:00
PJ Fanning
3d0f69744c support blank cells in correl function
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901683 13f79535-47bb-0310-9956-ffa450edef68
2022-06-05 19:12:45 +00:00
PJ Fanning
44be0c0f5a revert
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901681 13f79535-47bb-0310-9956-ffa450edef68
2022-06-05 15:03:12 +00:00
PJ Fanning
1d37e708b1 gradle refresh
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901679 13f79535-47bb-0310-9956-ffa450edef68
2022-06-05 14:42:42 +00:00
PJ Fanning
7e0c11f07d missing license
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901677 13f79535-47bb-0310-9956-ffa450edef68
2022-06-05 13:52:30 +00:00
PJ Fanning
3cd83e1b9c [bug-66105] support CORREL function
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901670 13f79535-47bb-0310-9956-ffa450edef68
2022-06-05 13:27:01 +00:00
PJ Fanning
d266b41bac gradle version
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901662 13f79535-47bb-0310-9956-ffa450edef68
2022-06-05 09:59:56 +00:00
PJ Fanning
81b4d6cd69 use commons-math3 for poisson dist
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901661 13f79535-47bb-0310-9956-ffa450edef68
2022-06-05 09:49:10 +00:00
PJ Fanning
5bd31b6f8e This closes #315
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901616 13f79535-47bb-0310-9956-ffa450edef68
2022-06-04 11:01:58 +00:00
PJ Fanning
44b3bf86b3 jdk 18 build support
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901613 13f79535-47bb-0310-9956-ffa450edef68
2022-06-04 10:23:27 +00:00
PJ Fanning
d074e8b4eb [github-334] Add SHRINK_TO_FIT and QUOTE_PREFIXED to CellUtil. Thanks to funakawa718. This closes #334
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901609 13f79535-47bb-0310-9956-ffa450edef68
2022-06-04 08:29:04 +00:00
PJ Fanning
1981ad478e upgrade mockito
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901589 13f79535-47bb-0310-9956-ffa450edef68
2022-06-03 09:16:40 +00:00
PJ Fanning
c7e85c3db2 use pre-release version of xmlbeans (temporarily)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901559 13f79535-47bb-0310-9956-ffa450edef68
2022-06-02 13:40:19 +00:00
PJ Fanning
bf7f9d7f27 revert xmlbeans jar changes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901545 13f79535-47bb-0310-9956-ffa450edef68
2022-06-02 08:39:29 +00:00
PJ Fanning
a3b3b91d50 update key
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901544 13f79535-47bb-0310-9956-ffa450edef68
2022-06-02 08:37:32 +00:00
PJ Fanning
174dd8ff71 upgrade mockito
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901526 13f79535-47bb-0310-9956-ffa450edef68
2022-06-01 15:47:59 +00:00
PJ Fanning
02a7002bd0 add lowercase tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901408 13f79535-47bb-0310-9956-ffa450edef68
2022-05-30 10:33:59 +00:00
PJ Fanning
cefab980e4 [bug-66098] support wildcard matches in D* functions
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901385 13f79535-47bb-0310-9956-ffa450edef68
2022-05-29 12:30:33 +00:00
PJ Fanning
77a3adbad2 javadoc issue
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901379 13f79535-47bb-0310-9956-ffa450edef68
2022-05-29 08:26:05 +00:00
PJ Fanning
a374115817 [bug-66095] support POISSON.DIST function (POISSON already supported)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901371 13f79535-47bb-0310-9956-ffa450edef68
2022-05-28 19:45:19 +00:00
PJ Fanning
47a3a5da89 [bug-66097] support CEILING.PRECISE function
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901367 13f79535-47bb-0310-9956-ffa450edef68
2022-05-28 18:42:32 +00:00
PJ Fanning
cf2892cc02 [bug-66097] support FLOOR.PRECISE function
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901366 13f79535-47bb-0310-9956-ffa450edef68
2022-05-28 18:35:56 +00:00
PJ Fanning
032c7c3aa0 DAYS360 function needs to support dates provided as strings as well as nums
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901365 13f79535-47bb-0310-9956-ffa450edef68
2022-05-28 18:27:14 +00:00
PJ Fanning
d836ff9a39 DAYS360 function needs to support dates provided as strings as well as a nums
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901364 13f79535-47bb-0310-9956-ffa450edef68
2022-05-28 18:26:21 +00:00
PJ Fanning
00f6289b2f [bug-58468] implement DAYS function
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901363 13f79535-47bb-0310-9956-ffa450edef68
2022-05-28 18:15:21 +00:00
PJ Fanning
e40639a04d [bug-58468] implement DAYS function
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901361 13f79535-47bb-0310-9956-ffa450edef68
2022-05-28 18:12:36 +00:00
PJ Fanning
30bca4da83 [bug-56155] support version property in CoreProperties
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901356 13f79535-47bb-0310-9956-ffa450edef68
2022-05-28 15:01:48 +00:00
PJ Fanning
772c938f4c add tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901355 13f79535-47bb-0310-9956-ffa450edef68
2022-05-28 14:27:29 +00:00
PJ Fanning
23622343ce add tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901352 13f79535-47bb-0310-9956-ffa450edef68
2022-05-28 14:13:25 +00:00
PJ Fanning
1b0fac992c fix issue with AVERAGEA function and how it handles string cells
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901351 13f79535-47bb-0310-9956-ffa450edef68
2022-05-28 13:53:30 +00:00
PJ Fanning
e5b936f804 add VAR boolean test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901324 13f79535-47bb-0310-9956-ffa450edef68
2022-05-27 12:05:48 +00:00
PJ Fanning
c0572f87bf add STDEV boolean test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901323 13f79535-47bb-0310-9956-ffa450edef68
2022-05-27 11:59:30 +00:00
PJ Fanning
2679fd8b6e add AVERAGEA boolean test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901322 13f79535-47bb-0310-9956-ffa450edef68
2022-05-27 11:54:12 +00:00
PJ Fanning
8d76de41af add VARPA and STDEVPA functions
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901321 13f79535-47bb-0310-9956-ffa450edef68
2022-05-27 11:44:46 +00:00
PJ Fanning
fd3ef2c364 add VARPA and STDEVPA functions
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901301 13f79535-47bb-0310-9956-ffa450edef68
2022-05-27 00:02:18 +00:00
PJ Fanning
86664455a8 add VARPA and STDEVPA functions
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901300 13f79535-47bb-0310-9956-ffa450edef68
2022-05-26 22:47:07 +00:00
PJ Fanning
c84eee1b8e add AVERAGEA function
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901299 13f79535-47bb-0310-9956-ffa450edef68
2022-05-26 22:23:48 +00:00
PJ Fanning
e94b376880 add missing licenses
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901296 13f79535-47bb-0310-9956-ffa450edef68
2022-05-26 15:22:01 +00:00
PJ Fanning
db7734bb31 [bug-66094] add STDEV.S, STDEV.P, VAR.S and VAR.P functions
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901291 13f79535-47bb-0310-9956-ffa450edef68
2022-05-26 14:11:02 +00:00
PJ Fanning
6b6bd5b773 support DCOUNTA function
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901290 13f79535-47bb-0310-9956-ffa450edef68
2022-05-26 13:48:30 +00:00
PJ Fanning
40be1b5d79 [bug-66093] fix some var names
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901288 13f79535-47bb-0310-9956-ffa450edef68
2022-05-26 13:20:33 +00:00
PJ Fanning
1a9dadc15c [bug-66093] fix some var names
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901287 13f79535-47bb-0310-9956-ffa450edef68
2022-05-26 13:19:26 +00:00
PJ Fanning
c7240fbe86 [bug-66093] add tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901284 13f79535-47bb-0310-9956-ffa450edef68
2022-05-26 12:00:09 +00:00
PJ Fanning
d173a26101 [bug-66093] test issues
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901283 13f79535-47bb-0310-9956-ffa450edef68
2022-05-26 11:52:17 +00:00
PJ Fanning
d92f493f87 [bug-66093] add support for unimplemented subfunctions to SUBTOTAL function
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901282 13f79535-47bb-0310-9956-ffa450edef68
2022-05-26 11:29:28 +00:00
PJ Fanning
992f3d46ed extend test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901281 13f79535-47bb-0310-9956-ffa450edef68
2022-05-26 11:20:18 +00:00
PJ Fanning
c926c47091 support DVARP and DSTDEVP
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901280 13f79535-47bb-0310-9956-ffa450edef68
2022-05-26 11:07:41 +00:00
PJ Fanning
d12fc44609 add STDEVP function support
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901279 13f79535-47bb-0310-9956-ffa450edef68
2022-05-26 10:53:56 +00:00
PJ Fanning
83134076ed add DPRODUCT function support
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901277 13f79535-47bb-0310-9956-ffa450edef68
2022-05-26 10:25:32 +00:00
PJ Fanning
3d57a45f65 small refactor
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901275 13f79535-47bb-0310-9956-ffa450edef68
2022-05-26 09:15:43 +00:00
PJ Fanning
bedf2a4e6d add DVAR function support
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901274 13f79535-47bb-0310-9956-ffa450edef68
2022-05-26 08:56:04 +00:00
PJ Fanning
4b995b5906 small refactor
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901259 13f79535-47bb-0310-9956-ffa450edef68
2022-05-25 20:45:36 +00:00
PJ Fanning
35be1fd6c0 add DSTDEV function support
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901258 13f79535-47bb-0310-9956-ffa450edef68
2022-05-25 20:12:17 +00:00
PJ Fanning
d32b4c112e add DAVERAGE function support
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901253 13f79535-47bb-0310-9956-ffa450edef68
2022-05-25 18:43:42 +00:00
PJ Fanning
3bdc1bd16a revert change to IDStarAlgorithm.processMatch
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901252 13f79535-47bb-0310-9956-ffa450edef68
2022-05-25 18:18:40 +00:00
PJ Fanning
39dff4479d DStar functions need to support field params provided as numbers as well as field names
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901250 13f79535-47bb-0310-9956-ffa450edef68
2022-05-25 15:54:29 +00:00
PJ Fanning
fdc20e96ef extend dget test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901246 13f79535-47bb-0310-9956-ffa450edef68
2022-05-25 15:23:51 +00:00
PJ Fanning
efcd15a3c4 fix dget test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901245 13f79535-47bb-0310-9956-ffa450edef68
2022-05-25 15:14:44 +00:00
PJ Fanning
ec43e18324 support empty field param for DCount
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901244 13f79535-47bb-0310-9956-ffa450edef68
2022-05-25 15:06:30 +00:00
PJ Fanning
bb4ed0b87a support empty field param for DCount
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901243 13f79535-47bb-0310-9956-ffa450edef68
2022-05-25 14:54:47 +00:00
PJ Fanning
0f385a0440 support empty param for DCount
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901242 13f79535-47bb-0310-9956-ffa450edef68
2022-05-25 14:53:42 +00:00
PJ Fanning
2a972c0174 add initial version of DCount and broken test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901239 13f79535-47bb-0310-9956-ffa450edef68
2022-05-25 13:02:33 +00:00
PJ Fanning
b9da0f9350 add initial version of DCount and broken test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901237 13f79535-47bb-0310-9956-ffa450edef68
2022-05-25 12:36:42 +00:00
PJ Fanning
3f414c760c [bug-66087] make DStar functions case insensitive
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901229 13f79535-47bb-0310-9956-ffa450edef68
2022-05-25 10:31:07 +00:00
PJ Fanning
e5398e8a88 remove unused strict zip
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901198 13f79535-47bb-0310-9956-ffa450edef68
2022-05-24 08:59:30 +00:00
PJ Fanning
f18fa3cc2c add ceiling tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901178 13f79535-47bb-0310-9956-ffa450edef68
2022-05-23 14:46:52 +00:00
PJ Fanning
51a7944eb4 add floor tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901177 13f79535-47bb-0310-9956-ffa450edef68
2022-05-23 14:42:50 +00:00
PJ Fanning
8508a5e86c fix test issue
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901176 13f79535-47bb-0310-9956-ffa450edef68
2022-05-23 14:13:56 +00:00
PJ Fanning
c1a8892cd0 partial implementation FLOOR.MATH function (needs more testing and bad param support)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901175 13f79535-47bb-0310-9956-ffa450edef68
2022-05-23 14:10:11 +00:00
PJ Fanning
445b01c04d partial implementation CEILING.MATH function (needs more testing and bad param support)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901174 13f79535-47bb-0310-9956-ffa450edef68
2022-05-23 14:09:07 +00:00
PJ Fanning
78ddaabbc2 partial implementation FLOOR.MATH function (needs more testing and bad param support)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901173 13f79535-47bb-0310-9956-ffa450edef68
2022-05-23 14:02:47 +00:00
PJ Fanning
769fc25e64 partial implementation FLOOR.MATH function (needs more testing and bad param support)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901172 13f79535-47bb-0310-9956-ffa450edef68
2022-05-23 13:53:56 +00:00
PJ Fanning
176f64cfe3 partial implementation FLOOR.MATH function (needs more testing and bad param support)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901171 13f79535-47bb-0310-9956-ffa450edef68
2022-05-23 13:49:50 +00:00
PJ Fanning
592bac02e1 partial implementation CEILING.MATH function (needs more testing and bad param support)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901169 13f79535-47bb-0310-9956-ffa450edef68
2022-05-23 13:28:52 +00:00
PJ Fanning
400f22037d partial implementation CEILING.MATH function (still need to support optional 2nd param)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901167 13f79535-47bb-0310-9956-ffa450edef68
2022-05-23 13:12:41 +00:00
PJ Fanning
20db1079c5 [github-331] update dependabot settings. This close #331
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901163 13f79535-47bb-0310-9956-ffa450edef68
2022-05-23 11:00:03 +00:00
PJ Fanning
04be6fcccb [bug-66022] issue in Formula Parser with some sheet names
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901162 13f79535-47bb-0310-9956-ffa450edef68
2022-05-23 10:55:22 +00:00
PJ Fanning
435dc86896 [bug-66081] fix editing of added abstract numberings
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901120 13f79535-47bb-0310-9956-ffa450edef68
2022-05-22 10:23:59 +00:00
PJ Fanning
b9d8bb01ec [bug-66080] XWPFNumbering.addAbstractNum uses abstract numberings count as id
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901113 13f79535-47bb-0310-9956-ffa450edef68
2022-05-22 08:43:06 +00:00
PJ Fanning
d178bb9dc1 [bug-66080] XWPFNumbering.addAbstractNum uses abstract numberings count as id
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901110 13f79535-47bb-0310-9956-ffa450edef68
2022-05-22 08:28:44 +00:00
PJ Fanning
dae226aecf [bug-66079] apply test provided by Vladislav Arakelov
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901105 13f79535-47bb-0310-9956-ffa450edef68
2022-05-21 22:38:43 +00:00
PJ Fanning
aa2f66acde gradle 7.4.2
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901086 13f79535-47bb-0310-9956-ffa450edef68
2022-05-20 13:56:29 +00:00
PJ Fanning
a0ce6b6728 [bug-66079] try to fix issue with XWPFNumbering.removeAbstractNum
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901083 13f79535-47bb-0310-9956-ffa450edef68
2022-05-20 09:47:16 +00:00
PJ Fanning
9527312287 upgrade spotbugs
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1900982 13f79535-47bb-0310-9956-ffa450edef68
2022-05-17 07:47:19 +00:00
Dominik Stadler
751d1b743a Update JaCoCo to 0.8.8
This may also fix running JaCoCo on JDK 18

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1900721 13f79535-47bb-0310-9956-ffa450edef68
2022-05-09 06:21:21 +00:00
PJ Fanning
80de2572da try xmlsec 3.0.0
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1900523 13f79535-47bb-0310-9956-ffa450edef68
2022-05-03 18:57:00 +00:00
PJ Fanning
68074b7c39 javadoc
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1900465 13f79535-47bb-0310-9956-ffa450edef68
2022-05-01 18:21:31 +00:00
PJ Fanning
e4bd111489 support sqrtpi function
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1900418 13f79535-47bb-0310-9956-ffa450edef68
2022-04-30 08:31:31 +00:00
PJ Fanning
9eb82c1185 support sqrtpi function
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1900416 13f79535-47bb-0310-9956-ffa450edef68
2022-04-30 08:16:48 +00:00
PJ Fanning
a2a09d0215 support lcm function
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1900410 13f79535-47bb-0310-9956-ffa450edef68
2022-04-29 23:19:53 +00:00
PJ Fanning
e24321454c support gcd function
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1900409 13f79535-47bb-0310-9956-ffa450edef68
2022-04-29 22:50:38 +00:00
PJ Fanning
9ced6d1712 support gcd function
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1900408 13f79535-47bb-0310-9956-ffa450edef68
2022-04-29 22:44:57 +00:00
PJ Fanning
34d047108e support gcd function
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1900407 13f79535-47bb-0310-9956-ffa450edef68
2022-04-29 22:34:20 +00:00
PJ Fanning
1cfa45a03e support gcd function
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1900406 13f79535-47bb-0310-9956-ffa450edef68
2022-04-29 22:28:35 +00:00
PJ Fanning
0422806d5e reformat
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1900403 13f79535-47bb-0310-9956-ffa450edef68
2022-04-29 21:53:33 +00:00
PJ Fanning
fcb4d09480 make HPSF limit more configuarble
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1900402 13f79535-47bb-0310-9956-ffa450edef68
2022-04-29 21:47:45 +00:00
PJ Fanning
bc30e1a6f5 fix broken test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1900399 13f79535-47bb-0310-9956-ffa450edef68
2022-04-29 20:53:49 +00:00
PJ Fanning
5a8ee02f3a reformat
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1900398 13f79535-47bb-0310-9956-ffa450edef68
2022-04-29 20:47:25 +00:00
PJ Fanning
22aa2922cc add broken test that prvis new averageif code is incorrect
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1900397 13f79535-47bb-0310-9956-ffa450edef68
2022-04-29 20:26:52 +00:00
PJ Fanning
70a0f22acc reformat
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1900395 13f79535-47bb-0310-9956-ffa450edef68
2022-04-29 20:12:12 +00:00
PJ Fanning
8a0d0d78b4 [github-330] add averageif function support
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1900394 13f79535-47bb-0310-9956-ffa450edef68
2022-04-29 19:55:12 +00:00
PJ Fanning
f3bf747a66 [bug-66039] remove stray </p>
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1900384 13f79535-47bb-0310-9956-ffa450edef68
2022-04-29 13:08:52 +00:00
PJ Fanning
7dac4c1dae [bug-66039] add more javadoc about setCellFormulaValidation
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1900383 13f79535-47bb-0310-9956-ffa450edef68
2022-04-29 13:07:00 +00:00
PJ Fanning
5dd1ded85f small big decimal refactor
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1900377 13f79535-47bb-0310-9956-ffa450edef68
2022-04-29 12:32:54 +00:00
PJ Fanning
88441c4354 [bug-66047] change mround implementation due to issue - thanks to @fabio
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1900376 13f79535-47bb-0310-9956-ffa450edef68
2022-04-29 12:25:29 +00:00
PJ Fanning
d280b74388 [bug-66039] show use of setCellFormulaValidation=false in a test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1900375 13f79535-47bb-0310-9956-ffa450edef68
2022-04-29 10:52:34 +00:00
PJ Fanning
5488f87674 update github actions
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1900289 13f79535-47bb-0310-9956-ffa450edef68
2022-04-26 12:14:54 +00:00
PJ Fanning
266f3b8a61 [github-325] Update GithubActions permissions. Thanks to @nathannaveen. This closes #325
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1900288 13f79535-47bb-0310-9956-ffa450edef68
2022-04-26 12:00:44 +00:00
PJ Fanning
a7d67626da mockito
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1900171 13f79535-47bb-0310-9956-ffa450edef68
2022-04-22 23:43:58 +00:00
PJ Fanning
0fcf2abdae upgrafe deps
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1900168 13f79535-47bb-0310-9956-ffa450edef68
2022-04-22 23:13:13 +00:00
PJ Fanning
a2fdb03023 update mockito
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1900072 13f79535-47bb-0310-9956-ffa450edef68
2022-04-20 14:31:22 +00:00
PJ Fanning
062f3a99d9 small changes to github action
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899938 13f79535-47bb-0310-9956-ffa450edef68
2022-04-17 10:28:50 +00:00
PJ Fanning
3ed39620f6 revert fraction format change
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899870 13f79535-47bb-0310-9956-ffa450edef68
2022-04-14 21:46:13 +00:00
PJ Fanning
31cce15e22 try to standardise big decimal code
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899864 13f79535-47bb-0310-9956-ffa450edef68
2022-04-14 17:01:51 +00:00
PJ Fanning
6f50fb1bf7 upgrade deps
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899861 13f79535-47bb-0310-9956-ffa450edef68
2022-04-14 15:04:49 +00:00
PJ Fanning
a514fcd050 refactor test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899756 13f79535-47bb-0310-9956-ffa450edef68
2022-04-11 19:29:30 +00:00
Dominik Stadler
f8e27ee19b Prevent an overly large allocation when using HPSF
Add a sample document from fuzzing which contains invalid/oversized values

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899749 13f79535-47bb-0310-9956-ffa450edef68
2022-04-11 13:51:31 +00:00
Dominik Stadler
0ac26e7b1d Missing font-system can throw two other types of exception
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899748 13f79535-47bb-0310-9956-ffa450edef68
2022-04-11 13:51:26 +00:00
Dominik Stadler
0f06cc7789 Add a way to not require a functioning font-setup
New configuration-method SheetUtil.setIgnoreMissingFontSystem()
This allows to do a bit more on machines where no fonts are installed

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899709 13f79535-47bb-0310-9956-ffa450edef68
2022-04-10 16:45:02 +00:00
Dominik Stadler
d970319239 Rework message when reaching allocation limits
Also remove a useless Math.min() as the previous condition already
indicates which one is the smaller value

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899708 13f79535-47bb-0310-9956-ffa450edef68
2022-04-10 16:44:58 +00:00
PJ Fanning
6774dd441b add test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899690 13f79535-47bb-0310-9956-ffa450edef68
2022-04-09 21:17:49 +00:00
PJ Fanning
2c4abb60f5 re-enable test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899689 13f79535-47bb-0310-9956-ffa450edef68
2022-04-09 21:13:53 +00:00
PJ Fanning
be2a929f44 [github-321] Fix issue with rounding in DataFormatter. First try broke a test.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899686 13f79535-47bb-0310-9956-ffa450edef68
2022-04-09 13:55:25 +00:00
PJ Fanning
4682903e6a more test issues with rate change
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899685 13f79535-47bb-0310-9956-ffa450edef68
2022-04-09 13:38:27 +00:00
PJ Fanning
c77f1f9fb9 [github-321] Fix issue with rounding in DataFormatter. First try broke a test.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899683 13f79535-47bb-0310-9956-ffa450edef68
2022-04-09 12:30:49 +00:00
PJ Fanning
ac3a104c82 try to standardise div code
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899681 13f79535-47bb-0310-9956-ffa450edef68
2022-04-09 12:07:31 +00:00
PJ Fanning
a8f1e7acd1 [github-321] Fix issue with rounding in DataFormatter. Thanks to Colin Wang. This closes #321
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899680 13f79535-47bb-0310-9956-ffa450edef68
2022-04-09 12:02:55 +00:00
PJ Fanning
7289015073 increase tolerance on rate test due to failures
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899679 13f79535-47bb-0310-9956-ffa450edef68
2022-04-09 11:37:36 +00:00
PJ Fanning
503c831dbd forbidden api issue
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899676 13f79535-47bb-0310-9956-ffa450edef68
2022-04-09 08:48:58 +00:00
Yegor Kozlov
542900693e Bug 65988: Rate function giving incorrect results
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899668 13f79535-47bb-0310-9956-ffa450edef68
2022-04-08 15:08:50 +00:00
PJ Fanning
05e8a16543 [github-321] add test case
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899667 13f79535-47bb-0310-9956-ffa450edef68
2022-04-08 13:08:10 +00:00
PJ Fanning
0a6a042807 update apache rat
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899615 13f79535-47bb-0310-9956-ffa450edef68
2022-04-06 13:00:25 +00:00
PJ Fanning
0b863c29a1 [github-319] fix javadoc on setColumnHidden. Thanks to CodeMonkeyLab. This closes #319
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899580 13f79535-47bb-0310-9956-ffa450edef68
2022-04-05 10:43:54 +00:00
Dominik Stadler
0ee8c135c4 Various smaller changes
Improve exception messages
Add more JavaDoc
Provide more information on test-failures

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899534 13f79535-47bb-0310-9956-ffa450edef68
2022-04-03 13:25:27 +00:00
Dominik Stadler
d80f48dd82 Speed up execution of formulas with whole-column area reference
The previous change via r1894675 did not fully solve this as
it only took place when more than one sheet were used.

There were still some cases where evaluating formulas needed
to iterate across a huge number of non-existant rows, e.g.
TestVLookup, which took more than 1 minute locally.

However doing the lowering of row-numbers always would trigger
test-regressions as some Excel-functionality depends on actions
being possible on rows larger than current "last row" in the sheet.

Thus changed this to a slightly different approach which only adjusts
last-row when it is at or above the workbook-limit of rows

Execution of TestVLookup is now at 1-2 seconds!

Also added a test-case to verify details of the implementation now.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899533 13f79535-47bb-0310-9956-ffa450edef68
2022-04-03 13:25:21 +00:00
Dominik Stadler
86bc671633 Use a modified version of NullPrintStream in integration tests
The default version from Commons-IO does not avoid doing
utf-8 conversion and other work, so it is not well suited for
cases where lots of output happens.

Using an optimized version can bring down runtime of integration-tests
somewhat, especially for large files where XLS2CSV prints out lots of
data

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899532 13f79535-47bb-0310-9956-ffa450edef68
2022-04-03 13:25:15 +00:00
PJ Fanning
fb95dfdd93 [bug-65993] support copying hssf hyperlinks to xssf and respect full cell range
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899521 13f79535-47bb-0310-9956-ffa450edef68
2022-04-02 18:55:56 +00:00
PJ Fanning
8406fbc3c0 [github-318] handle null raw text. Thanks to wanglunhui2012. This closes #318
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899508 13f79535-47bb-0310-9956-ffa450edef68
2022-04-02 08:20:57 +00:00
Dominik Stadler
69dff49c95 Also exclude new files in rat-check of ant-build
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899499 13f79535-47bb-0310-9956-ffa450edef68
2022-04-01 21:32:03 +00:00
Dominik Stadler
8412eb4503 Suppress forbidden-apis failing with MemoryLeakVerifier in JDK 18
Keep using Runtime.runFinalization() as long as it is available.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899497 13f79535-47bb-0310-9956-ffa450edef68
2022-04-01 21:17:22 +00:00
Dominik Stadler
0c77cd4d55 Update forbiddenapis to 3.3
This also improves support for building with JDK 18

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899496 13f79535-47bb-0310-9956-ffa450edef68
2022-04-01 21:17:07 +00:00
PJ Fanning
728c2d36cf apply change that stackoverflow (but that does not fix the broken case)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899456 13f79535-47bb-0310-9956-ffa450edef68
2022-03-31 20:27:22 +00:00
PJ Fanning
9d89bc1604 reformat file
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899455 13f79535-47bb-0310-9956-ffa450edef68
2022-03-31 20:13:49 +00:00
PJ Fanning
b1c98d3999 [bug-65988] add test case for rate function (failing)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899452 13f79535-47bb-0310-9956-ffa450edef68
2022-03-31 20:08:14 +00:00
PJ Fanning
ee9c1817bd upgrade graphics2d
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899438 13f79535-47bb-0310-9956-ffa450edef68
2022-03-31 13:52:32 +00:00
PJ Fanning
a7e1909c21 addHyperlink method on SXSSFSheet
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899367 13f79535-47bb-0310-9956-ffa450edef68
2022-03-29 23:30:26 +00:00
PJ Fanning
f6c92f9b09 javadoc
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899351 13f79535-47bb-0310-9956-ffa450edef68
2022-03-29 12:30:55 +00:00
PJ Fanning
9b60986f68 do not fail if xslt transformer does not support accessExternalStylesheet attribute
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899326 13f79535-47bb-0310-9956-ffa450edef68
2022-03-28 20:37:21 +00:00
PJ Fanning
cba63eda75 upgrade saxon
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899321 13f79535-47bb-0310-9956-ffa450edef68
2022-03-28 14:56:21 +00:00
PJ Fanning
94393c7241 upgrade jmh
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899320 13f79535-47bb-0310-9956-ffa450edef68
2022-03-28 14:55:32 +00:00
PJ Fanning
a6edfe4252 spotbugs issue
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899309 13f79535-47bb-0310-9956-ffa450edef68
2022-03-28 14:05:44 +00:00
PJ Fanning
63ecb6152b try upgrading spotbugs again
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899308 13f79535-47bb-0310-9956-ffa450edef68
2022-03-28 13:49:38 +00:00
PJ Fanning
9c885441b6 upgrade forbiddenapis
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899307 13f79535-47bb-0310-9956-ffa450edef68
2022-03-28 13:12:15 +00:00
PJ Fanning
dd13adef38 [github-314] Add equals and hashcode to PaneInformation. Thanks to Daniel Shuy. This closes #314
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899240 13f79535-47bb-0310-9956-ffa450edef68
2022-03-27 09:26:34 +00:00
Dominik Stadler
c5a13f5b3f Avoid intermittent failure of srcDistZip with parallel builds/tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899163 13f79535-47bb-0310-9956-ffa450edef68
2022-03-24 04:42:37 +00:00
Dominik Stadler
bfd2266779 Fix issues found when fuzzing Apache POI via Jazzer
Do not assert when the next line will throw a proper exception anyway

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899162 13f79535-47bb-0310-9956-ffa450edef68
2022-03-24 04:42:34 +00:00
Dominik Stadler
67b3e09618 Add a target to extract all third-party libraries into directory build/runtime
This is used when testing with latest Apache POI locally, e.g.
when running mass-regression-testing

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899161 13f79535-47bb-0310-9956-ffa450edef68
2022-03-24 04:42:30 +00:00
Dominik Stadler
09e464bb5f poi-ooxml-lite: Check in list of classes and xsb-files to avoid the jar-to-test dependency
Avoid running all tests whenever building jars as tests take a long time now
and also cause large memory allocations.

It is nice if the target "jar" is as fast as possible and the list of included
items for ooxml-lite only changes rarely anyway.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899160 13f79535-47bb-0310-9956-ffa450edef68
2022-03-24 04:42:27 +00:00
Dominik Stadler
a59e17590a OOXMLLiteAgent: Some smaller adjustments
Print unexpected exceptions to stdout instead of silently ignoring them
Don't include classes created via Mockito

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899159 13f79535-47bb-0310-9956-ffa450edef68
2022-03-24 04:42:22 +00:00
PJ Fanning
902d1487f7 [bug-65973] fix for removing hyperlinks that span multiple cells
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899139 13f79535-47bb-0310-9956-ffa450edef68
2022-03-22 18:00:57 +00:00
PJ Fanning
aff20dc6f9 [bug-65973] partial fix for removing hyperlinks that span multiple cells
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899138 13f79535-47bb-0310-9956-ffa450edef68
2022-03-22 17:55:53 +00:00
PJ Fanning
d41a40abc8 [bug-65973] partial fix for removing hyperlinks that span multiple cells
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899137 13f79535-47bb-0310-9956-ffa450edef68
2022-03-22 17:54:37 +00:00
PJ Fanning
a1463e32e5 increase max size of hwmf picture
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899135 13f79535-47bb-0310-9956-ffa450edef68
2022-03-22 14:58:47 +00:00
PJ Fanning
0bc81c57fd small refactor
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899134 13f79535-47bb-0310-9956-ffa450edef68
2022-03-22 14:14:08 +00:00
PJ Fanning
058aef3bfb [bug-65973] partial fix for removing hyperlinks that span multiple cells
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899133 13f79535-47bb-0310-9956-ffa450edef68
2022-03-22 14:10:02 +00:00
PJ Fanning
4508404af0 spelling
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899131 13f79535-47bb-0310-9956-ffa450edef68
2022-03-22 12:39:46 +00:00
PJ Fanning
0c4fec3528 [bug-65973] partial fix for removing hyperlinks that span multiple cells
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899130 13f79535-47bb-0310-9956-ffa450edef68
2022-03-22 12:02:11 +00:00
PJ Fanning
2298c8ff26 [bug-65973] partial fix for removing hyperlinks that span multiple cells
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899129 13f79535-47bb-0310-9956-ffa450edef68
2022-03-22 11:44:31 +00:00
PJ Fanning
49668edbf2 [bug-64536] add another test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899092 13f79535-47bb-0310-9956-ffa450edef68
2022-03-20 22:06:27 +00:00
PJ Fanning
56b4313997 [bug-64536] add getDimension on XSSFSheet
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899091 13f79535-47bb-0310-9956-ffa450edef68
2022-03-20 21:41:31 +00:00
PJ Fanning
d013349052 use spaces for indents
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899082 13f79535-47bb-0310-9956-ffa450edef68
2022-03-20 10:26:05 +00:00
PJ Fanning
1ab968419e compile issue
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899081 13f79535-47bb-0310-9956-ffa450edef68
2022-03-20 10:13:39 +00:00
Dominik Stadler
42985f64df Avoid flaky tests with parallel execution
One test stores and deletes files named "-saved.xls", so
we need to prevent other tests from reading those

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899077 13f79535-47bb-0310-9956-ffa450edef68
2022-03-20 08:20:05 +00:00
Dominik Stadler
9949242022 Remove unused imports, remove unnecessary boxing of int-value and apply some other IDE suggestions
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899076 13f79535-47bb-0310-9956-ffa450edef68
2022-03-20 08:20:00 +00:00
Dominik Stadler
98fbe88d3a Improve error message if formula cannot be parsed
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899075 13f79535-47bb-0310-9956-ffa450edef68
2022-03-20 06:52:59 +00:00
Dominik Stadler
306dc69105 Add reproducer for possible OOM when reading pictures in XWPF
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899074 13f79535-47bb-0310-9956-ffa450edef68
2022-03-20 06:52:55 +00:00
Dominik Stadler
d648c6d652 Fix issues found when fuzzing Apache POI via Jazzer
Throw RecordFormatException instead of NPE or assertion for
cases that can be triggered by a malformed document

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899073 13f79535-47bb-0310-9956-ffa450edef68
2022-03-20 06:52:51 +00:00
Dominik Stadler
9df7e2d847 Prevent one more case of allocating endlessly on invalid TNEF/HMEF/MAPI files
Limit the number of attributes to 10,000 by default

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899072 13f79535-47bb-0310-9956-ffa450edef68
2022-03-20 06:52:47 +00:00
Dominik Stadler
3ee410e8b5 Bug 65854: Use revert() instead of close() when OPCPackage is opened read-only
Also add tests, however it is not possible to verify that no
logging takes place, so you have to use debugging to verify it.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899071 13f79535-47bb-0310-9956-ffa450edef68
2022-03-20 06:52:43 +00:00
Dominik Stadler
a7810011c7 Fix issues found when fuzzing Apache POI via Jazzer
Replace assertions with actual checks when input-data
can trigger them. We would not handle such
input-data properly otherwise.
Sometimes logging seems a better option if the issue
is not blocking us from parsing the document anyway

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899070 13f79535-47bb-0310-9956-ffa450edef68
2022-03-20 06:52:38 +00:00
PJ Fanning
ff466eff1c POI 5.2.2 release
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899060 13f79535-47bb-0310-9956-ffa450edef68
2022-03-19 23:09:08 +00:00
PJ Fanning
5e87f112bb javadoc
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1898946 13f79535-47bb-0310-9956-ffa450edef68
2022-03-15 10:06:56 +00:00
PJ Fanning
5745fc0a68 update test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1898945 13f79535-47bb-0310-9956-ffa450edef68
2022-03-15 09:53:26 +00:00
PJ Fanning
935c8ab06a add xssf test (width/height)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1898944 13f79535-47bb-0310-9956-ffa450edef68
2022-03-15 09:40:48 +00:00
PJ Fanning
f19233164c upgrade gradle
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1898937 13f79535-47bb-0310-9956-ffa450edef68
2022-03-14 23:17:03 +00:00
PJ Fanning
8657e4eaea revert: try to fix java 18 build issue
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1898908 13f79535-47bb-0310-9956-ffa450edef68
2022-03-13 18:26:47 +00:00
PJ Fanning
d8e163a82f try to fix java 18 build issue
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1898907 13f79535-47bb-0310-9956-ffa450edef68
2022-03-13 18:22:29 +00:00
2097 changed files with 86132 additions and 19014 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: 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/ homepage: https://poi.apache.org/
labels: labels:
- poi - poi
@ -14,10 +14,35 @@ github:
- powerpoint - powerpoint
- visio - visio
dependabot_alerts: true
dependabot_updates: false
features: features:
# Enable wiki for documentation # Enable wiki for documentation
wiki: false wiki: false
# Enable issue management # Enable issue management
issues: false issues: true
# Enable projects for project management boards # Enable projects for project management boards
projects: false 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

@ -9,3 +9,7 @@ updates:
directory: "/" # Location of package manifests directory: "/" # Location of package manifests
schedule: schedule:
interval: "daily" interval: "daily"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"

View File

@ -5,9 +5,11 @@ name: Java CI with Gradle
on: on:
push: push:
branches: [ trunk ] branches: [ trunk, 5.5.x ]
pull_request: pull_request:
branches: [ trunk ] branches: [ trunk, 5.5.x ]
permissions: {}
jobs: jobs:
build: build:
@ -15,30 +17,17 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v6
- name: Set up JDK - name: Set up JDK
uses: actions/setup-java@v2 uses: actions/setup-java@v5
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: '11' java-version: '11'
check-latest: true cache: 'gradle'
- name: Cache Gradle wrapper and dependencies
uses: actions/cache@v2.1.3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Verify Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Grant execute permission for gradlew - name: Grant execute permission for gradlew
run: chmod +x gradlew run: chmod +x gradlew
- name: Build with Gradle - name: Build with Gradle
run: ./gradlew check -PjdkVersion=11 run: ./gradlew check -PjdkVersion=11 --no-daemon --refresh-dependencies

3
.gitignore vendored
View File

@ -37,3 +37,6 @@ TEST-org.apache.poi*.xml
/*/build/ /*/build/
dist dist
lib/ lib/
# Compiled module-info class-files
/poi*/src/*/java9/*.class

79
KEYS
View File

@ -2545,11 +2545,12 @@ bpjAhwE2YmGQ7oB+3V798HtAmceRNf8AY0GWrZswJlg7xUn+WJNwQ9uIHI1fxYHx
2Nr+AmDDs6ZOEI5zhwxioePw/Cg= 2Nr+AmDDs6ZOEI5zhwxioePw/Cg=
=9lKb =9lKb
-----END PGP PUBLIC KEY BLOCK----- -----END PGP PUBLIC KEY BLOCK-----
pub rsa2048 2018-05-02 [SC] [expires: 2022-05-17] pub rsa2048 2018-05-02 [SC] [expires: 2026-05-11]
6BA4DA8B1C88A49428A29C3D0C69C1EF41181E13 6BA4DA8B1C88A49428A29C3D0C69C1EF41181E13
uid [ultimate] PJ Fanning (http://www.apache.org/) <fanningpj@apache.org> uid [ unknown] PJ Fanning (http://www.apache.org/) <fanningpj@apache.org>
uid [ultimate] PJ Fanning <fanningpj@yahoo.com> uid [ unknown] PJ Fanning (GitHub noreply address) <pjfanning@users.noreply.github.com>
sub rsa2048 2018-05-02 [E] [expires: 2022-05-17] uid [ unknown] PJ Fanning <fanningpj@yahoo.com>
sub rsa2048 2018-05-02 [E] [expires: 2026-05-11]
-----BEGIN PGP PUBLIC KEY BLOCK----- -----BEGIN PGP PUBLIC KEY BLOCK-----
@ -2558,37 +2559,45 @@ ARFmtFPnwYwLTdz3ECqWWsC3RkI62079DweNasXV8nBz9sUt6mQqSMx3W/s6389/
k9iywPLvhHH7rpp05js8zwJoA8Fr1YwPtBjyhrxl58LQ5ihd/1f2ud2tnwQw1dI2 k9iywPLvhHH7rpp05js8zwJoA8Fr1YwPtBjyhrxl58LQ5ihd/1f2ud2tnwQw1dI2
8fuTS3QaKP4Zdx2diD5rYhkAecWaFRwxn1L7Tye5dfD1uPElPCHGKqfaeQXtl01u 8fuTS3QaKP4Zdx2diD5rYhkAecWaFRwxn1L7Tye5dfD1uPElPCHGKqfaeQXtl01u
TOwYB1p9tKPHvfni1qgD3QLWUJ2oyBGSA9IgEF5rm8LtR6vADKQwORjg99a7HE2h TOwYB1p9tKPHvfni1qgD3QLWUJ2oyBGSA9IgEF5rm8LtR6vADKQwORjg99a7HE2h
lDBZi/tmu23fgWSioiy084fB5GqmApK/681DABEBAAG0OlBKIEZhbm5pbmcgKGh0 lDBZi/tmu23fgWSioiy084fB5GqmApK/681DABEBAAG0SFBKIEZhbm5pbmcgKEdp
dHA6Ly93d3cuYXBhY2hlLm9yZy8pIDxmYW5uaW5ncGpAYXBhY2hlLm9yZz6JAVQE dEh1YiBub3JlcGx5IGFkZHJlc3MpIDxwamZhbm5pbmdAdXNlcnMubm9yZXBseS5n
EwEIAD4CGwMFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AWIQRrpNqLHIiklCiinD0M aXRodWIuY29tPokBVwQTAQgAQQIbAwULCQgHAgIiAgYVCgkICwIEFgIDAQIeBwIX
acHvQRgeEwUCXsE82gUJB5owBAAKCRAMacHvQRgeE6ZAB/40Lysb8A5J1PtwJhdJ gBYhBGuk2osciKSUKKKcPQxpwe9BGB4TBQJmJYbdBQkPGNgHAAoJEAxpwe9BGB4T
m236LINbMmPhqTkTa45ozjOAXBKKGiUyoCmUjcc22hbcB6f3RmE59MP9YBfIbuP9 5Z4H/3sDqi2QozHbsUy2dm+xS105bpmiNn3aDYzEyjOBggypDWpG5fmlD6ya3Yfd
F9pujP5QdFzGf8sdZ5qwvLEePng0CDwy18+aQtCV2GWYKuO5gL2AubRo2pRCZirL H172auahZ1SK6t7Q7u97QdtrvMKTVBBq+DahkHnvw4nsPwBI00aTy616of1+CirZ
zftnZm3pctRESXhbDae1PjMjWCsvMaTrqZLzkYMsypsrzLiXPpVgXgMW37IHFsIP lDPo912aLrWlouizuy6qeJE0EfB0PGXtuZP3E0yZHqgmIOBrQw5fJQtrka5WWK3C
cLPWvKgipaUeXHFT/3lcZl9MlUO/X/URrGjHL1EJVgLPhmGZcq7+VU5RqBWdhduQ AqO2Z1hZLh9ftheJtKSYX1gZnPEAWs3ZBG2tCk4+qAjB8y5kRvrJFpC36FkisYlg
HUwYPOpKFhDjbj1du8effvdurJTZamJH/gS1N6r+V073J6dIQOHw9Mu81RNHBlwi YTtAOSMHED/3YFsDsXFvLmrSkNBImjdAnRW59TD5XUgEMDZ9Dylz3/b4/gtNi2SX
1QUntCBQSiBGYW5uaW5nIDxmYW5uaW5ncGpAeWFob28uY29tPokBVAQTAQgAPgIb 9WSYWC60/3Jgxh4u3cTUnUtW2yC0IFBKIEZhbm5pbmcgPGZhbm5pbmdwakB5YWhv
AwULCQgHAgYVCgkICwIEFgIDAQIeAQIXgBYhBGuk2osciKSUKKKcPQxpwe9BGB4T by5jb20+iQFUBBMBCAA+AhsDBQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAFiEEa6Ta
BQJewTzaBQkHmjAEAAoJEAxpwe9BGB4TW1gH+gOewMCrUGRSh9r3oS8wnL/cHXxF ixyIpJQoopw9DGnB70EYHhMFAmYlhuUFCQ8Y2AcACgkQDGnB70EYHhOecwgApleV
9+S0dXmLP4T4zGJtz7Q6h0RPIorY7jwAFzzU0zohFIB7/9ECo9dKFmuGlYlNLNax 9IOazPAk8pF0WfkslRWNrGHzaGoqO+WVhMS4doxR8bjqkrHwuI4c8Z2vCCMnKqb1
d4if7QFxdC/yCuZOrvUUhWus/f+7hM06E7qQ+64DhJy2BBk1Kfp2mLFGtP+yVhUM LF7djz9GXFGklvoyV7rQYrDx15bYWjtassvM4KExcnoPGxx9Kb7f0j0WSZwtwMUl
9F2seTRuJWzzC4gyRpNg8P7W1Sic/Pc0xXpEkO4JPRa9dl4DeV66Gk5HVrb+4SYV XWvsrS0+BkbRz+PIpGtDJhlI++aRoZdWCz5j5st5HzmacC0GVuYGvRPj8uMW2LN5
YXFmIMqTvK9ksZs+XwcBjHsv7eA9bv3MzHKYOnM5d+BQEJUPcD52F1Y6rb41Yvrk 5HvGzlzqWIQ7l68KQPz7g5KIFKUrCPyzZS0m8Nj+gRWhF3+u3/1SY2hoCzobSMJj
QQew6R3lJZio1TbZW6S86h3a1I6L+byQ1V8TjVZvaMqt5mMHRWmh/WwcOai5AQ0E PNhEovdpi8h5qbUOpHn2OM7l8/nioRaJwAmcMTnmlh1lqeyxIFYnFIBT24o3aEtN
Wulz1gEIAORuS4e+Ek+d+0gBMlnigNJ2HoQalKFaERf5K/iQZY4E6Z2ahJ4UFIj7 N2d1xg/moXvzNTq7yrQ6UEogRmFubmluZyAoaHR0cDovL3d3dy5hcGFjaGUub3Jn
ri3isWgOleP+REJJPfeSrWQ5XgdklDlHHyv4O5iMkEFWQHttiaTuvdomDncQrNRP LykgPGZhbm5pbmdwakBhcGFjaGUub3JnPokBVAQTAQgAPgIbAwULCQgHAgYVCgkI
TaIOe9iQgfQzDw6mqsb7ZWd5ICA8Krd97BwNHjq/CZ9+WrU6GDc6ImissLVVGGdk CwIEFgIDAQIeAQIXgBYhBGuk2osciKSUKKKcPQxpwe9BGB4TBQJmJYblBQkPGNgH
EGO7qZTqNUCeH4Znm/00mNMI4OH8xkwA2vzV5o3J5116zIuv29XQDtcSM+9NQ/Hd AAoJEAxpwe9BGB4TgwMIAJj3aQYKSxt9iyIP5nFhIWAFSPZcZ0gRB6jYMuANVoJE
sjKIA0OpDyWE7Ek/SO+/CvkylwaOcmkuf33ADNjpF4BsBxn7L9XI1WJDtRaMkpbq yelbhIziN2dXLOjHWpia2x9p7krxY6ZLtogkL4MjfVpCaaXwsaYOq6LeuPN27/Pt
MsymIxi35VUOGD+ms+72CcUStfYj4NEAEQEAAYkBPAQYAQgAJgIbDBYhBGuk2osc 9rRcDz7j5lA9u9MShc6O8lwNbVReCWR08H0oiEdS09xwZY3aiZniptRBeK+mcsNc
iKSUKKKcPQxpwe9BGB4TBQJewT2iBQkHmjDMAAoJEAxpwe9BGB4TNXoIAJunpJ8r Zw7kNmPHC79WaI6Rb/qnPLHJDD0l8vrVSShgmEeVJJoC/YjuVzKoiy2BmjSOpOLF
DC5v3GMRCVu21DEIwAcAzBQhB7lK7VfDqkeB/ivCkoTpqs+ZFK2LT5uJQgRmPhF7 d88NlquWbvLO6j2tzboUs+93Kc4MwG57hwRIqS7wfsENkecSRj23KQN0UOpxgwz7
xgMDn2WXrsD76eOzPr0qMr9qCa66Ou4EBywvZdPDVFJI4J5e2BgZYf5cq9YvO3qv b0+ii9F9jsddEqqpXspcM8zaacf+FpIwO6rk7v1U8LG5AQ0EWulz1gEIAORuS4e+
feL0IKFyljSCk+DPGW+A57KgGTGBMWuicSn3b6OEYewtzVWhbyFKYChZyV7fRv/i Ek+d+0gBMlnigNJ2HoQalKFaERf5K/iQZY4E6Z2ahJ4UFIj7ri3isWgOleP+REJJ
UKo4gBqFrn4nUqDocG2Pl0qTngNL+LllThFHq9Wq5+ngMUk+Qtw8Um8xOnyNO3er PfeSrWQ5XgdklDlHHyv4O5iMkEFWQHttiaTuvdomDncQrNRPTaIOe9iQgfQzDw6m
a1pShs2sKKgQwtXpEIZ+l7B193A/35RPTH1kDQSu2GBSFebQfl9yimW22T/ncEeP qsb7ZWd5ICA8Krd97BwNHjq/CZ9+WrU6GDc6ImissLVVGGdkEGO7qZTqNUCeH4Zn
dXK7AeuHr+AogJ8= m/00mNMI4OH8xkwA2vzV5o3J5116zIuv29XQDtcSM+9NQ/HdsjKIA0OpDyWE7Ek/
=aV2J 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----- -----END PGP PUBLIC KEY BLOCK-----
pub 2048R/1556F3A4 2016-10-04 pub 2048R/1556F3A4 2016-10-04
uid Greg Woolsey <gwoolsey@apache.org> 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. 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 H??F are for reading or writing OLE2 binary formats.
| Components named X??F are for reading or writing OpenOffice XML (OOXML) formats. | Components named X??F are for reading or writing OpenOffice XML (OOXML) formats.
Getting started # Getting started
------------------
Website: https://poi.apache.org/ Website: https://poi.apache.org/
`Mailing lists`_: [Mailing lists](https://poi.apache.org/mailinglists.html):
* `Developers`_ * [Developers](https://lists.apache.org/list.html?dev@poi.apache.org)
* `Users`_ * [Users](https://lists.apache.org/list.html?user@poi.apache.org) Including Announcements
* `General`_ (release announcements) * [General](https://lists.apache.org/list.html?general@poi.apache.org)
Bug tracker: ## Bug trackers
* `Bugzilla`_ * [Bugzilla](https://bz.apache.org/bugzilla/buglist.cgi?product=POI)
* `GitHub pull requests`_ * [GitHub](https://github.com/apache/poi/issues)
Source code: ## Source code
* Official `Apache Subversion repo`_ at apache.org * https://github.com/apache/poi
* `ViewVC repo browser`_ at apache.org
* `GitHub git mirror`_ at github.com
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 * 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/ * Scratchpad (Binary formats): poi-scratchpad/src/main/java/org/apache/poi/
* Examples: poi-examples/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:: To build the jar files for poi, poi-ooxml, poi-ooxml-lite, poi-ooxml-full and poi-examples::
./gradlew jar ./gradlew jar
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 # Security
If you suspect you have found a security vulnerability in Apache POI code, please read https://www.apache.org/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,53 +24,33 @@ import javax.xml.xpath.XPathFactory
buildscript { buildscript {
repositories { repositories {
maven { url 'https://plugins.gradle.org/m2/' } maven { url = 'https://plugins.gradle.org/m2/' }
mavenCentral() mavenCentral()
} }
dependencies {
classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.3'
classpath 'de.thetaphi:forbiddenapis:3.2'
}
} }
plugins { plugins {
id 'base' id 'base'
id "com.dorongold.task-tree" version "2.1.0" id 'com.dorongold.task-tree' version '4.0.1'
id('org.nosphere.apache.rat') version '0.7.0' id 'org.nosphere.apache.rat' version '0.8.1'
id 'distribution' id 'distribution'
id "com.github.spotbugs" version "4.8.0"
id 'com.github.jk1.dependency-license-report' version '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 { repositories {
mavenCentral() mavenCentral()
} // maven { url 'https://repository.apache.org/content/repositories/staging' }
import com.github.jk1.license.render.*
import com.github.jk1.license.importer.*
licenseReport {
// Select projects to examine for dependencies.
// Defaults to current project and all its subprojects
projects = [project] + project.subprojects
// Adjust the configurations to fetch dependencies, e.g. for Android projects. Default is 'runtimeClasspath'
configurations = ['runtimeClasspath']
// Use 'ALL' to dynamically resolve all configurations:
// configurations = ALL
// Don't include artifacts of project's own group into the report
excludeOwnGroup = true
// Don't exclude bom dependencies.
// If set to true, then all boms will be excluded from the report
excludeBoms = false
// Set custom report renderer, implementing ReportRenderer.
// Yes, you can write your own to support any format necessary.
renderers = [new XmlReportRenderer('third-party-libs.xml', 'Back-End Libraries')]
} }
// Only add the plugin for Sonar if enabled // Only add the plugin for Sonar if enabled
@ -79,7 +59,8 @@ if (project.hasProperty('enableSonar')) {
apply plugin: 'org.sonarqube' 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 // For help converting an Ant build to a Gradle build, see
// https://docs.gradle.org/current/userguide/ant.html // https://docs.gradle.org/current/userguide/ant.html
@ -93,8 +74,8 @@ configurations {
} }
dependencies { dependencies {
antLibs("org.junit.jupiter:junit-jupiter:5.8.2") antLibs("org.junit.jupiter:junit-jupiter:5.13.4")
antLibs("org.apache.ant:ant-junitlauncher:1.10.12") antLibs("org.apache.ant:ant-junitlauncher:1.10.15")
} }
ant.taskdef(name: "junit", ant.taskdef(name: "junit",
@ -103,19 +84,10 @@ ant.taskdef(name: "junit",
wrapper { wrapper {
gradleVersion = '7.4' gradleVersion = '8.14.3'
} }
task adjustWrapperPropertiesFile { group = 'org.apache.poi'
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
/** /**
Define properties for all projects, including this one Define properties for all projects, including this one
@ -123,6 +95,8 @@ wrapper.finalizedBy adjustWrapperPropertiesFile
allprojects { allprojects {
// apply plugin: 'eclipse' // apply plugin: 'eclipse'
apply plugin: 'idea' apply plugin: 'idea'
version = '6.0.0-SNAPSHOT'
} }
/** /**
@ -136,82 +110,94 @@ subprojects {
apply plugin: 'signing' apply plugin: 'signing'
apply plugin: 'de.thetaphi.forbiddenapis' apply plugin: 'de.thetaphi.forbiddenapis'
apply plugin: 'com.github.spotbugs' apply plugin: 'com.github.spotbugs'
apply plugin: 'org.cyclonedx.bom'
apply plugin: 'com.adarshr.test-logger'
version = '5.2.2'
ext { ext {
bouncyCastleVersion = '1.70' bouncyCastleVersion = '1.83'
commonsCodecVersion = '1.15' commonsCodecVersion = '1.21.0'
commonsCompressVersion = '1.21' commonsCompressVersion = '1.28.0'
commonsIoVersion = '2.11.0' commonsIoVersion = '2.21.0'
commonsMathVersion = '3.6.1' commonsMathVersion = '3.6.1'
junitVersion = '5.8.2' junitVersion = '5.13.4'
log4jVersion = '2.17.2' log4jVersion = '2.25.3'
mockitoVersion = '4.4.0' mockitoVersion = '5.21.0'
hamcrestVersion = '2.2' hamcrestVersion = '3.0'
xmlbeansVersion = '5.0.3' xmlbeansVersion = '5.3.0'
batikVersion = '1.14' batikVersion = '1.19'
graphics2dVersion = '0.35' graphics2dVersion = '3.0.5'
pdfboxVersion = '2.0.25' pdfboxVersion = '3.0.6'
saxonVersion = '11.2' saxonVersion = '12.9'
xmlSecVersion = '3.0.6'
apiGuardianVersion = '1.1.2' 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 // 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 jdkVendor = (project.properties['jdkVendor'] ?: '') as String
JAVA9_SRC = 'src/main/java9' 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_SRC = 'src/test/java9'
TEST9_OUT = "${buildDir}/classes/java9/test/" TEST9_OUT = layout.buildDirectory.dir('classes/java9/test/').get().asFile.absolutePath
VERSIONS9 = 'META-INF/versions/9' VERSIONS9 = '/META-INF/versions/9'
NO_SCRATCHPAD = (findProperty("scratchpad.ignore") == "true") NO_SCRATCHPAD = (findProperty("scratchpad.ignore") == "true")
SAXON_TEST = (findProperty("saxon.test") == "true") SAXON_TEST = (findProperty("saxon.test") == "true")
} }
configurations { configurations {
all { configureEach {
resolutionStrategy { resolutionStrategy {
force "commons-io:commons-io:${commonsIoVersion}" force "commons-io:commons-io:${commonsIoVersion}"
force 'org.slf4j:slf4j-api:1.7.36' force 'org.slf4j:slf4j-api:2.0.17'
force 'com.fasterxml.woodstox:woodstox-core:6.2.8' force 'com.fasterxml.woodstox:woodstox-core:7.1.1'
} }
} }
} }
tasks.withType(JavaCompile) { tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8' options.encoding = 'UTF-8'
options.compilerArgs << '-Xlint:unchecked' options.compilerArgs += '-Xlint:unchecked'
options.deprecation = true options.deprecation = true
options.incremental = true options.incremental = true
}
onlyIf { tasks.withType(Test).configureEach {
(name != "compileJava9" && name != "compileTest9") // || jdkVersion > 8 systemProperty "file.encoding", "UTF-8"
} }
tasks.withType(Javadoc).configureEach {
options.encoding = 'UTF-8'
}
tasks.withType(AbstractArchiveTask).configureEach {
preserveFileTimestamps = false
reproducibleFileOrder = true
} }
repositories { repositories {
mavenCentral() mavenCentral()
maven { // maven { url 'https://repository.apache.org/content/repositories/staging' }
url 'https://repository.apache.org/content/repositories/releases'
}
} }
dependencies { 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.mockito:mockito-core:${mockitoVersion}"
testImplementation "org.hamcrest:hamcrest:${hamcrestVersion}" testImplementation "org.hamcrest:hamcrest:${hamcrestVersion}"
testImplementation "org.apache.logging.log4j:log4j-core:${log4jVersion}" testImplementation 'org.apache.logging.log4j:log4j-core'
}
task wrapper(type: Wrapper){ if (SAXON_TEST) {
gradleVersion = '7.4' testRuntimeOnly("net.sf.saxon:Saxon-HE:${saxonVersion}") {
exclude group: 'xml-apis', module: 'xml-apis'
}
}
} }
java { java {
toolchain { toolchain {
languageVersion.set(JavaLanguageVersion.of(jdkVersion)) languageVersion = JavaLanguageVersion.of(jdkVersion)
if (jdkVendor != '') vendor.set(JvmVendorSpec.matching(jdkVendor)) if (jdkVendor != '') vendor = JvmVendorSpec.matching(jdkVendor)
} }
withJavadocJar() withJavadocJar()
withSourcesJar() withSourcesJar()
@ -221,7 +207,7 @@ subprojects {
failOnError = true failOnError = true
maxMemory = "1024M" maxMemory = "1024M"
javadocTool = javaToolchains.javadocToolFor { javadocTool = javaToolchains.javadocToolFor {
languageVersion = JavaLanguageVersion.of(Math.max(11,jdkVersion)) languageVersion = JavaLanguageVersion.of(jdkVersion)
} }
doFirst { doFirst {
@ -229,22 +215,90 @@ subprojects {
addBooleanOption('html5', true) addBooleanOption('html5', true)
addBooleanOption('Xdoclint:all,-missing', true) addBooleanOption('Xdoclint:all,-missing', true)
links 'https://poi.apache.org/apidocs/dev/' 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://xmlbeans.apache.org/docs/5.0.0/'
links 'https://www.javadocs.dev/org.apache.commons/commons-compress/1.28.0/'
use = true use = true
splitIndex = true splitIndex = true
source = "1.8" source = "11"
} }
} }
} }
tasks.withType(Jar) { // helper-target to get a directory with all third-party libraries
duplicatesStrategy = 'fail' // this is used for mass-regression-testing
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}") tasks.register('getDeps', Copy) {
from sourceSets.main.runtimeClasspath
into 'build/runtime/'
}
tasks.withType(Jar).configureEach {
duplicatesStrategy = DuplicatesStrategy.FAIL
destinationDirectory = file("../build/dist/maven/${base.archivesName.get()}")
doLast { doLast {
ant.checksum(file: it.archivePath, algorithm: 'SHA-256', fileext: '.sha256', format: 'MD5SUM') // make sure we do not have distribution jar-files with different versions
ant.checksum(file: it.archivePath, algorithm: 'SHA-512', fileext: '.sha512', format: 'MD5SUM') // 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')
} }
} }
@ -272,15 +326,19 @@ subprojects {
javadocJar { javadocJar {
// if javadocs and binaries are in the same directory, JPMS complaints about duplicated modules // if javadocs and binaries are in the same directory, JPMS complaints about duplicated modules
// in the module-path // in the module-path
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}-javadoc") destinationDirectory = file("../build/dist/maven/${base.archivesName.get()}-javadoc")
} }
sourcesJar { sourcesJar {
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}") destinationDirectory = file("../build/dist/maven/${base.archivesName.get()}")
exclude 'META-INF/services/**' exclude 'META-INF/services/**'
} }
test { test {
// use US locale for tests
systemProperty "user.language", "en"
systemProperty "user.country", "US"
// make XML test-results available for Jenkins CI // make XML test-results available for Jenkins CI
useJUnitPlatform() useJUnitPlatform()
reports { reports {
@ -288,8 +346,8 @@ subprojects {
} }
javaLauncher = javaToolchains.launcherFor { javaLauncher = javaToolchains.launcherFor {
languageVersion.set(JavaLanguageVersion.of(jdkVersion)) languageVersion = JavaLanguageVersion.of(jdkVersion)
if (jdkVendor != '') vendor.set(JvmVendorSpec.matching(jdkVendor)) if (jdkVendor != '') vendor = JvmVendorSpec.matching(jdkVendor)
} }
// Exclude some tests that are not actually tests or do not run cleanly on purpose // Exclude some tests that are not actually tests or do not run cleanly on purpose
@ -304,11 +362,11 @@ subprojects {
// set heap size for the test JVM(s) // set heap size for the test JVM(s)
minHeapSize = "128m" minHeapSize = "128m"
maxHeapSize = "1G" maxHeapSize = "2g"
// Specifying the local via system properties did not work, so we set them this way // Specifying the local via system properties did not work, so we set them this way
jvmArgs << [ jvmArgs += [
'-Djava.awt.headless=true', '-Djava.awt.headless=true',
'-Djavax.xml.stream.XMLInputFactory=com.sun.xml.internal.stream.XMLInputFactoryImpl', '-Djavax.xml.stream.XMLInputFactory=com.sun.xml.internal.stream.XMLInputFactoryImpl',
"-Dversion.id=${project.version}", "-Dversion.id=${project.version}",
@ -317,18 +375,18 @@ subprojects {
] ]
// detect if running on Jenkins/CI // detect if running on Jenkins/CI
isCIBuild |= Boolean.valueOf(System.getenv("CI_BUILD")); isCIBuild |= Boolean.valueOf(System.getenv("CI_BUILD"))
if (isCIBuild) { if (isCIBuild) {
System.out.println("Run with reduced parallelism for CI build"); System.out.println("Run with reduced parallelism for CI build")
jvmArgs += [ jvmArgs += [
// Strictly serial // Strictly serial
// '-Djunit.jupiter.execution.parallel.enabled=false', '-Djunit.jupiter.execution.parallel.enabled=false',
// OR parallel on 2 threads // OR parallel on 2 threads
'-Djunit.jupiter.execution.parallel.config.strategy=fixed', //'-Djunit.jupiter.execution.parallel.config.strategy=fixed',
'-Djunit.jupiter.execution.parallel.config.fixed.parallelism=2' //'-Djunit.jupiter.execution.parallel.config.fixed.parallelism=2'
] ]
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1 maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
} else { } else {
@ -363,27 +421,25 @@ subprojects {
systemProperties['java.locale.providers'] = 'JRE,CLDR' systemProperties['java.locale.providers'] = 'JRE,CLDR'
doFirst { doFirst {
if (jdkVersion > 8) { // some options were removed in JDK 18
// some options were removed in JDK 18 if (jdkVersion < 18) {
if (jdkVersion < 18) {
jvmArgs += [
'--illegal-access=warn',
]
}
jvmArgs += [ jvmArgs += [
// see https://github.com/java9-modularity/gradle-modules-plugin/issues/97 '--illegal-access=warn',
// opposed to the recommendation there, it doesn't work to add ... to the dependencies
// testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.7.1'
// 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',
] ]
} }
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 { jacoco {
@ -396,7 +452,7 @@ subprojects {
} }
jacoco { jacoco {
toolVersion = '0.8.7' toolVersion = '0.8.13'
} }
jacocoTestReport { jacocoTestReport {
@ -413,9 +469,9 @@ subprojects {
// https://docs.sonarqube.org/display/SONARQUBE52/Analyzing+with+SonarQube+Scanner+for+Gradle // https://docs.sonarqube.org/display/SONARQUBE52/Analyzing+with+SonarQube+Scanner+for+Gradle
// for documentation of properties. // for documentation of properties.
// //
// Some additional properties are currently set in the Jenkins-DSL, see jenksin/create_jobs.groovy // Some additional properties are currently set in the Jenkins-DSL, see jenkins/create_jobs.groovy
// //
sonarqube { sonar {
properties { properties {
// as we currently use build/<module>/ as project-basedir, we need to tell Sonar to use // as we currently use build/<module>/ as project-basedir, we need to tell Sonar to use
// the root-folder as "basedir" for the projects // the root-folder as "basedir" for the projects
@ -439,26 +495,23 @@ subprojects {
signaturesFiles = files('../src/resources/devtools/forbidden-signatures.txt') signaturesFiles = files('../src/resources/devtools/forbidden-signatures.txt')
ignoreFailures = false ignoreFailures = false
suppressAnnotations = [ 'org.apache.poi.util.SuppressForbidden' ] suppressAnnotations = [ 'org.apache.poi.util.SuppressForbidden' ]
// forbiddenapis bundled signatures max supported version is 14 }
// targetCompatibility = (JavaVersion.VERSION_14.isCompatibleWith(JavaVersion.current()) ? JavaVersion.current() : JavaVersion.VERSION_14)
forbiddenApisTest {
// forbiddenapis:3.8 bundled signatures max supported version is 23
targetCompatibility = (JavaVersion.VERSION_23.isCompatibleWith(JavaVersion.current()) ? JavaVersion.current() : JavaVersion.VERSION_23)
} }
forbiddenApisMain { forbiddenApisMain {
signaturesFiles += files('../src/resources/devtools/forbidden-signatures-prod.txt') signaturesFiles += files('../src/resources/devtools/forbidden-signatures-prod.txt')
targetCompatibility = (JavaVersion.VERSION_23.isCompatibleWith(JavaVersion.current()) ? JavaVersion.current() : JavaVersion.VERSION_23)
} }
task jenkins
jenkins.dependsOn build
jenkins.dependsOn check
jenkins.dependsOn javadoc
jenkins.dependsOn jacocoTestReport
jenkins.dependsOn rat
publishing { publishing {
publications { publications {
POI(MavenPublication) { POI(MavenPublication) {
groupId 'org.apache.poi' groupId = 'org.apache.poi'
artifactId project.archivesBaseName artifactId = base.archivesName.get()
from components.java from components.java
@ -473,13 +526,13 @@ subprojects {
name = 'POI Users List' name = 'POI Users List'
subscribe = 'user-subscribe@poi.apache.org' subscribe = 'user-subscribe@poi.apache.org'
unsubscribe = 'user-unsubscribe@poi.apache.org' unsubscribe = 'user-unsubscribe@poi.apache.org'
archive = 'http://mail-archives.apache.org/mod_mbox/poi-user/' archive = 'https://lists.apache.org/list.html?user@poi.apache.org'
} }
mailingList { mailingList {
name = 'POI Developer List' name = 'POI Developer List'
subscribe = 'dev-subscribe@poi.apache.org' subscribe = 'dev-subscribe@poi.apache.org'
unsubscribe = 'dev-unsubscribe@poi.apache.org' unsubscribe = 'dev-unsubscribe@poi.apache.org'
archive = 'http://mail-archives.apache.org/mod_mbox/poi-dev/' archive = 'https://lists.apache.org/list.html?dev@poi.apache.org'
} }
} }
@ -496,6 +549,20 @@ subprojects {
url = 'http://www.apache.org/' url = 'http://www.apache.org/'
} }
issueManagement {
system = 'bugzilla'
url = 'https://bz.apache.org/bugzilla'
}
developers {
developer {
name = 'POI Team'
id = 'poi'
email = 'user@poi.apache.org'
organization = 'Apache POI'
}
}
withXml { withXml {
def r = asElement() def r = asElement()
def doc = r.getOwnerDocument() def doc = r.getOwnerDocument()
@ -525,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 enabled = false
} }
@ -544,6 +611,7 @@ subprojects {
spotbugs { spotbugs {
ignoreFailures = true ignoreFailures = true
showStackTraces = false showStackTraces = false
maxHeapSize = '2g'
} }
build { build {
@ -554,14 +622,14 @@ subprojects {
} }
// initial try to provide a combined JavaDoc, grouping is still missing here, though! // initial try to provide a combined JavaDoc, grouping is still missing here, though!
task allJavaDoc(type: Javadoc) { tasks.register('allJavaDoc', Javadoc) {
var prj = [ project(':poi'), project(':poi-excelant'), project(':poi-ooxml'), project(':poi-scratchpad') ] var prj = [project(':poi'), project(':poi-excelant'), project(':poi-ooxml'), project(':poi-scratchpad')]
source prj.collect { it.sourceSets.main.allJava } source prj.collect { it.sourceSets.main.allJava }
// for possible settings see https://docs.gradle.org/current/dsl/org.gradle.api.tasks.javadoc.Javadoc.html // 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 }) classpath = files(subprojects.collect { it.sourceSets.main.compileClasspath })
destinationDir = file("${buildDir}/docs/javadoc") destinationDir = layout.buildDirectory.dir('docs/javadoc').get().asFile
maxMemory="2048M" maxMemory = "2048M"
// for possible options see https://docs.gradle.org/current/javadoc/org/gradle/external/javadoc/StandardJavadocDocletOptions.html // for possible options see https://docs.gradle.org/current/javadoc/org/gradle/external/javadoc/StandardJavadocDocletOptions.html
options.use = true options.use = true
@ -576,7 +644,7 @@ task allJavaDoc(type: Javadoc) {
options.group('SS - Common Spreadsheet Format', 'org.apache.poi.ss*') options.group('SS - Common Spreadsheet Format', 'org.apache.poi.ss*')
options.group('HSSF - Horrible Spreadsheet Format', 'org.apache.poi.hssf*') options.group('HSSF - Horrible Spreadsheet Format', 'org.apache.poi.hssf*')
options.group('XSSF - Open Office XML Spreadsheet Format', 'org.apache.poi.xssf*') 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('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('XSLF - Open Office XML Slideshow Format', 'org.apache.poi.xslf*')
options.group('HWPF - Horrible Word Processor Format', 'org.apache.poi.hwpf*') options.group('HWPF - Horrible Word Processor Format', 'org.apache.poi.hwpf*')
@ -592,9 +660,6 @@ task allJavaDoc(type: Javadoc) {
// options.group('Examples', 'org.apache.poi.examples*') // options.group('Examples', 'org.apache.poi.examples*')
} }
task jenkins(dependsOn: ['replaceVersion', subprojects.build, 'binDistZip','binDistTar','srcDistZip','srcDistTar']) {}
clean { clean {
delete "${rootDir}/build/dist" delete "${rootDir}/build/dist"
} }
@ -635,12 +700,14 @@ rat {
"poi/src/main/resources/org/apache/poi/sl/draw/geom/presetShapeDefinitions.xml", "poi/src/main/resources/org/apache/poi/sl/draw/geom/presetShapeDefinitions.xml",
"poi-ooxml/src/main/resources/org/apache/poi/xslf/usermodel/notesMaster.xml", "poi-ooxml/src/main/resources/org/apache/poi/xslf/usermodel/notesMaster.xml",
"poi-ooxml/src/main/resources/org/apache/poi/xssf/usermodel/presetTableStyles.xml", "poi-ooxml/src/main/resources/org/apache/poi/xssf/usermodel/presetTableStyles.xml",
"poi-ooxml-full/src/main/xmlschema/org/apache/poi/schemas/XAdES*.xsd", "poi-ooxml-full/src/main/xmlschema/org/apache/poi/schemas/*.xsd",
"poi-ooxml-full/src/main/xmlschema/org/apache/poi/schemas/xmldsig-core-schema.xsd",
"poi-ooxml-full/src/main/xmlschema/org/apache/poi/xdgf/visio.xsd", "poi-ooxml-full/src/main/xmlschema/org/apache/poi/xdgf/visio.xsd",
"osgi/README.md", "osgi/README.md",
"src/resources/ooxml-lite-report.*",
// ignore svn conflict artifacts // ignore svn conflict artifacts
"**/module-info.*" "**/module-info.*",
"poi-examples/src/main/groovy/settings.gradle",
"poi-examples/src/main/groovy/.gradle/**"
] ]
/* /*
@ -654,6 +721,24 @@ rat {
verbose.set(true) verbose.set(true)
} }
task jenkins(dependsOn: [
'replaceVersion',
subprojects.build,
subprojects.check,
subprojects.javadoc,
subprojects.jacocoTestReport,
subprojects.getDeps,
'srcDistZip',
'srcDistTar',
rat
]) {}
task jenkinsLite(dependsOn: [
'replaceVersion',
subprojects.build,
subprojects.test
]) {}
/*task downloadJarsToLibs() { /*task downloadJarsToLibs() {
def f = new File("$projectDir/../lib/ooxml/xmlbeans-5.0.0.jar") def f = new File("$projectDir/../lib/ooxml/xmlbeans-5.0.0.jar")
if (!f.exists()) { if (!f.exists()) {
@ -665,14 +750,14 @@ rat {
//compileJava.dependsOn 'downloadJarsToLibs' //compileJava.dependsOn 'downloadJarsToLibs'
task replaceVersion() { tasks.register('replaceVersion') {
outputs.upToDateWhen { false } outputs.upToDateWhen { false }
var version = subprojects[0].version var version = subprojects[0].version
var tokens = [ var tokens = [
[ 'osgi', 'pom.xml', '(packaging>\\n\\s*<version>)[0-9.]+(?:-SNAPSHOT|-RC\\d+)?', "\\1${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}" ] ['osgi', 'pom.xml', '(<poi.version>)[0-9.]+(?:-SNAPSHOT|-RC\\d+)?', "\\1${version}"]
// [ '.', 'build.gradle', ' version = \'[0-9.]+(?:-SNAPSHOT)?\'', " version = '${version}'" ] // [ '.', 'build.gradle', ' version = \'[0-9.]+(?:-SNAPSHOT)?\'', " version = '${version}'" ]
] ]
doLast { doLast {
@ -696,54 +781,13 @@ task zipJavadocs(type: Zip, dependsOn: allJavaDoc) {
archiveExtension = 'jar' archiveExtension = 'jar'
} }
tasks.withType(Tar) { tasks.withType(Tar).configureEach {
compression = Compression.GZIP compression = Compression.GZIP
archiveExtension = 'tgz' archiveExtension = 'tgz'
} }
distributions { 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')
bin {
distributionBaseName = "poi-bin-${version}-${date}"
contents {
from('build/dist/maven') {
include "**/*${version}.jar"
exclude "**/*lite-agent*.jar"
exclude "**/*integration*.jar"
}
from('build/dist') { include 'poi-javadoc*.jar'}
from('legal') { exclude 'HEADER' }
from(poiDep) { include "**/*.jar" }
from(ooxmlImp) { include "**/*.jar" }
includeEmptyDirs = false
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
eachFile {
String root = "poi-bin-${version}/"
if (name.startsWith('poi')) {
path = root + name
} else if (poiDep.contains(file)) {
path = root + 'lib/' + name
} else if (name =~ /^(batik|bc|fontbox|graphics|pdfbox|xml-apis|xmlgraphics|xmlsec)/) {
path = root + 'auxiliary/' + name
} else if (ooxmlImp.contains(file)) {
path = root + 'ooxml-lib/' + name
} else {
path = root + name
}
}
}
}
src { src {
distributionBaseName = "poi-src-${version}-${date}"
contents { contents {
from('.') { from('.') {
exclude '*/build/**' exclude '*/build/**'
@ -784,16 +828,19 @@ distributions {
exclude '*.docx' exclude '*.docx'
exclude '*.pptx' exclude '*.pptx'
exclude '*.xlsx' exclude '*.xlsx'
// exclude intermediate files
exclude '**/*-saved.xls'
} }
from('legal') { exclude 'HEADER' } from('legal') { exclude 'HEADER' }
includeEmptyDirs = false
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
} }
} }
} }
binDistZip.dependsOn 'zipJavadocs', ':poi-ooxml-lite:jar' tasks.register('soLinkCheck') {
binDistTar.dependsOn 'zipJavadocs', ':poi-ooxml-lite:jar'
task soLinkCheck() {
doLast { doLast {
def path = ant.path { def path = ant.path {
fileset(dir: '.', includes: '**/*.java') { fileset(dir: '.', includes: '**/*.java') {
@ -814,28 +861,30 @@ task soLinkCheck() {
} }
var srcDep = [ var srcDep = [
':poi:cacheJava9', ':poi:compileJava9',
':poi:cacheTest9', ':poi:compileTest9',
':poi-ooxml-full:cacheJava9', ':poi-ooxml-full:compileJava9',
':poi-ooxml-lite-agent:cacheJava9', ':poi-ooxml-lite-agent:compileJava9',
':poi-ooxml:cacheJava9', ':poi-ooxml:compileJava9',
':poi-ooxml:cacheTest9', ':poi-ooxml:compileTest9',
':poi-scratchpad:cacheJava9', ':poi-scratchpad:compileJava9',
':poi-scratchpad:cacheTest9', ':poi-scratchpad:compileTest9',
':poi-excelant:cacheJava9', ':poi-excelant:compileJava9',
':poi-excelant:cacheTest9', ':poi-excelant:compileTest9',
':poi-examples:cacheJava9', ':poi-examples:compileJava9',
':poi-integration:cacheTest9', ':poi-integration:compileTest9',
':poi-ooxml-lite:cacheJava9', ':poi-ooxml-lite:compileJava9',
':poi-ooxml-lite:generateModuleInfo' ':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 srcDistTar.dependsOn srcDep
srcDistZip.dependsOn srcDep srcDistZip.dependsOn srcDep
soLinkCheck.dependsOn srcDep soLinkCheck.dependsOn srcDep
rat.dependsOn soLinkCheck rat.dependsOn soLinkCheck
task fixDistDir { tasks.register('fixDistDir') {
doLast { doLast {
ant.mkdir(dir: 'build/dist') ant.mkdir(dir: 'build/dist')
ant.move(todir: 'build/dist') { ant.move(todir: 'build/dist') {
@ -844,7 +893,5 @@ task fixDistDir {
} }
} }
binDistZip.finalizedBy fixDistDir
binDistTar.finalizedBy fixDistDir
srcDistZip.finalizedBy fixDistDir srcDistZip.finalizedBy fixDistDir
srcDistTar.finalizedBy fixDistDir srcDistTar.finalizedBy fixDistDir

739
build.xml

File diff suppressed because it is too large Load Diff

View File

@ -35,6 +35,69 @@
<programming-language>Java</programming-language> <programming-language>Java</programming-language>
<category rdf:resource="https://projects.apache.org/category/content" /> <category rdf:resource="https://projects.apache.org/category/content" />
<category rdf:resource="https://projects.apache.org/category/library" /> <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>
<created>2022-09-16</created>
<revision>5.2.3</revision>
</Version>
</release>
<release>
<Version>
<name>Apache POI 5.2.2</name>
<created>2022-03-20</created>
<revision>5.2.2</revision>
</Version>
</release>
<release> <release>
<Version> <Version>
<name>Apache POI 5.2.1</name> <name>Apache POI 5.2.1</name>
@ -204,10 +267,10 @@
</Version> </Version>
</release> </release>
<repository> <repository>
<SVNRepository> <GitRepository>
<location rdf:resource="https://svn.apache.org/repos/asf/poi/"/> <location rdf:resource="https://github.com/apache/poi.git"/>
<browse rdf:resource="https://svn.apache.org/viewvc/poi/"/> <browse rdf:resource="https://github.com/apache/poi/"/>
</SVNRepository> </GitRepository>
</repository> </repository>
<maintainer> <maintainer>
<foaf:Person> <foaf:Person>

View File

@ -51,6 +51,13 @@ org.apache.openjpa.lib.util.J2DoPrivHelper$7.run
serp.bytecode.BCClass.read serp.bytecode.BCClass.read
serp.util.Strings.toClass serp.util.Strings.toClass
# Logging
java.util.logging.Logger.findSystemResourceBundle
java.util.logging.LogManager.readPrimordialConfiguration
org.slf4j.LoggerFactory.getLogger
org.apache.log4j.FileAppender.setFile
org.apache.logging.log4j.core.config.ConfigurationSource.getConfigurationSource
# Java # Java
sun.util.resources.LocaleData.getBundle sun.util.resources.LocaleData.getBundle
sun.util.LocaleServiceProviderPool.<init> sun.util.LocaleServiceProviderPool.<init>
@ -63,15 +70,14 @@ sun.font.SunFontManager.loadFonts
sun.font.FontManagerFactory.getInstance sun.font.FontManagerFactory.getInstance
sun.font.TrueTypeFont.open sun.font.TrueTypeFont.open
sun.reflect.misc.MethodUtil.<clinit> sun.reflect.misc.MethodUtil.<clinit>
java.util.logging.Logger.findSystemResourceBundle
java.text.BreakIterator.getBundle java.text.BreakIterator.getBundle
sun.java2d.SunGraphicsEnvironment.<init> sun.java2d.SunGraphicsEnvironment.<init>
org.kohsuke.file_leak_detector.AgentMain.runHttpServer org.kohsuke.file_leak_detector.AgentMain.runHttpServer
org.apache.log4j.FileAppender.setFile
org.apache.logging.log4j.core.config.ConfigurationSource.getConfigurationSource
sun.launcher.LauncherHelper.validateMainClass sun.launcher.LauncherHelper.validateMainClass
sun.util.locale.provider.RuleBasedBreakIterator$1.run sun.util.locale.provider.RuleBasedBreakIterator$1.run
java.util.ServiceLoader$LazyIterator.hasNextService java.util.ServiceLoader$LazyIterator.hasNextService
java.util.ServiceLoader$LazyClassPathLookupIterator.nextProviderClass
java.lang.ClassLoader.loadClass
# other third party libs # other third party libs
net.bytebuddy.dynamic.ClassFileLocator$ForClassLoader.locate net.bytebuddy.dynamic.ClassFileLocator$ForClassLoader.locate

View File

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

Binary file not shown.

View File

@ -1,19 +1,7 @@
# Copyright 2004 The Apache Software Foundation
#
# Licensed 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.
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists

47
gradlew vendored
View File

@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
# #
# SPDX-License-Identifier: Apache-2.0
#
############################################################################## ##############################################################################
# #
@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop. # Darwin, MinGW, and NonStop.
# #
# (3) This script is generated from the Groovy template # (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/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. # within the Gradle project.
# #
# You can find Gradle at https://github.com/gradle/gradle/. # You can find Gradle at https://github.com/gradle/gradle/.
@ -80,13 +82,11 @@ do
esac esac
done done
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit # This is normally unused
# shellcheck disable=SC2034
APP_NAME="Gradle"
APP_BASE_NAME=${0##*/} APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value. # Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum MAX_FD=maximum
@ -114,7 +114,7 @@ case "$( uname )" in #(
NONSTOP* ) nonstop=true ;; NONSTOP* ) nonstop=true ;;
esac esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar CLASSPATH="\\\"\\\""
# Determine the Java command to use to start the JVM. # Determine the Java command to use to start the JVM.
@ -133,22 +133,29 @@ location of your Java installation."
fi fi
else else
JAVACMD=java JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the Please set the JAVA_HOME variable in your environment to match the
location of your Java installation." location of your Java installation."
fi
fi fi
# Increase the maximum file descriptors if we can. # Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #( case $MAX_FD in #(
max*) max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) || MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit" warn "Could not query maximum file descriptor limit"
esac esac
case $MAX_FD in #( case $MAX_FD in #(
'' | soft) :;; #( '' | soft) :;; #(
*) *)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" || ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD" warn "Could not set maximum file descriptor limit to $MAX_FD"
esac esac
@ -193,18 +200,28 @@ if "$cygwin" || "$msys" ; then
done done
fi fi
# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
# shell script including quotes and variable substitutions, so put them in DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# 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 -- \ set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \ "-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \ -classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \ -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
"$@" "$@"
# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi
# Use "xargs" to parse quoted args. # Use "xargs" to parse quoted args.
# #
# With -n1 it outputs one arg per line, with the quotes and backslashes removed. # With -n1 it outputs one arg per line, with the quotes and backslashes removed.

183
gradlew.bat vendored
View File

@ -1,89 +1,94 @@
@rem @rem
@rem Copyright 2015 the original author or authors. @rem Copyright 2015 the original author or authors.
@rem @rem
@rem Licensed under the Apache License, Version 2.0 (the "License"); @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 not use this file except in compliance with the License.
@rem You may obtain a copy of the License at @rem You may obtain a copy of the License at
@rem @rem
@rem https://www.apache.org/licenses/LICENSE-2.0 @rem https://www.apache.org/licenses/LICENSE-2.0
@rem @rem
@rem Unless required by applicable law or agreed to in writing, software @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 distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and @rem See the License for the specific language governing permissions and
@rem limitations under the License. @rem limitations under the License.
@rem @rem
@rem SPDX-License-Identifier: Apache-2.0
@if "%DEBUG%" == "" @echo off @rem
@rem ##########################################################################
@rem @if "%DEBUG%"=="" @echo off
@rem Gradle startup script for Windows @rem ##########################################################################
@rem @rem
@rem ########################################################################## @rem Gradle startup script for Windows
@rem
@rem Set local scope for the variables with windows NT shell @rem ##########################################################################
if "%OS%"=="Windows_NT" setlocal
@rem Set local scope for the variables with windows NT shell
set DIRNAME=%~dp0 if "%OS%"=="Windows_NT" setlocal
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0 set DIRNAME=%~dp0
set APP_HOME=%DIRNAME% if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
@rem Resolve any "." and ".." in APP_HOME to make it shorter. set APP_BASE_NAME=%~n0
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. @rem Resolve any "." and ".." in APP_HOME to make it shorter.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Find java.exe @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
if defined JAVA_HOME goto findJavaFromJavaHome set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
set JAVA_EXE=java.exe @rem Find java.exe
%JAVA_EXE% -version >NUL 2>&1 if defined JAVA_HOME goto findJavaFromJavaHome
if "%ERRORLEVEL%" == "0" goto execute
set JAVA_EXE=java.exe
echo. %JAVA_EXE% -version >NUL 2>&1
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. if %ERRORLEVEL% equ 0 goto execute
echo.
echo Please set the JAVA_HOME variable in your environment to match the echo. 1>&2
echo location of your Java installation. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
goto fail echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=% goto fail
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
:findJavaFromJavaHome
if exist "%JAVA_EXE%" goto execute set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% if exist "%JAVA_EXE%" goto execute
echo.
echo Please set the JAVA_HOME variable in your environment to match the echo. 1>&2
echo location of your Java installation. echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
goto fail echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
:execute
@rem Setup the command line goto fail
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :execute
@rem Setup the command line
@rem Execute Gradle set CLASSPATH=
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end @rem Execute Gradle
@rem End local scope for the variables with windows NT shell "%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" %*
if "%ERRORLEVEL%"=="0" goto mainEnd
:end
:fail @rem End local scope for the variables with windows NT shell
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of if %ERRORLEVEL% equ 0 goto mainEnd
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 :fail
exit /b 1 rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
:mainEnd set EXIT_CODE=%ERRORLEVEL%
if "%OS%"=="Windows_NT" endlocal if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
:omega 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 // 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/ // Apache POI uses on the public Jenkins instance at https://ci-builds.apache.org/job/POI/
// //
@ -14,124 +31,108 @@ def xercesUrl = 'https://repo1.maven.org/maven2/xerces/xercesImpl/2.6.1/xercesIm
def xercesLib = './xercesImpl-2.6.1.jar' def xercesLib = './xercesImpl-2.6.1.jar'
def poijobs = [ def poijobs = [
[ name: 'POI-DSL-1.8', trigger: 'H */12 * * *', gradle: 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 * * *', [ name: 'POI-DSL-1.8-branch-5.5.x',
// only a limited set of nodes still have OpenJDK 8 (on Ubuntu) installed jdk: '1.8',
slaves: 'ubuntu', branch: '5.5.x',
skipcigame: true, gradle: true trigger: 'H */12 * * *',
jenkinsLite: true,
], ],
// [ name: 'POI-DSL-1.10', jdk: '1.10', trigger: triggerSundays, skipcigame: true, [ name: 'POI-DSL-1.11', jdk: '1.11', trigger: triggerSundays, skipcigame: true
// // let's save some CPU cycles here, 10 had EOL in September 2018
// disabled: true
// ],
[ name: 'POI-DSL-1.11', jdk: '1.11', trigger: triggerSundays, skipcigame: true, gradle: true
], ],
// [ name: 'POI-DSL-1.12', jdk: '1.12', trigger: triggerSundays, skipcigame: true, [ name: 'POI-DSL-1.17', jdk: '1.17', trigger: 'H */12 * * *', skipcigame: true
// // let's save some CPU cycles here, 12 is not a LTS and JDK 13 is GA as of 17 September 2019
// disabled: true
// ],
// [ name: 'POI-DSL-1.13', jdk: '1.13', trigger: triggerSundays, skipcigame: true,
// // let's save some CPU cycles here, 13 is not a LTS and JDK 14 is GA as of 17 March 2020
// disabled: true
// ],
// [ name: 'POI-DSL-1.14', jdk: '1.14', trigger: triggerSundays, skipcigame: true,
// // let's save some CPU cycles here, 14 is not a LTS and JDK 15 is GA as of 15 September 2020
// disabled: true
// ],
[ name: 'POI-DSL-1.15', jdk: '1.15', trigger: triggerSundays, skipcigame: true, gradle: true,
// let's save some CPU cycles here, 15 is not a LTS and JDK 16 is GA
disabled: true
], ],
[ name: 'POI-DSL-1.16', jdk: '1.16', trigger: 'H */12 * * *', skipcigame: true, gradle: true, [ name: 'POI-DSL-1.21', jdk: '1.21', trigger: 'H */12 * * *', skipcigame: true
// let's save some CPU cycles here, 16 is not a LTS and JDK 17 is GA
disabled: true
], ],
[ name: 'POI-DSL-1.17', jdk: '1.17', trigger: 'H */12 * * *', skipcigame: true, gradle: true [ name: 'POI-DSL-1.24', jdk: '1.24', trigger: triggerSundays, skipcigame: true,
], ],
[ name: 'POI-DSL-1.18', jdk: '1.18', trigger: triggerSundays, skipcigame: true, gradle: 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
], ],
[ name: 'POI-DSL-IBM-JDK', jdk: 'IBMJDK', trigger: triggerSundays, skipcigame: true, gradle: 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
], ],
[ name: 'POI-DSL-old-Xerces', trigger: triggerSundays, skipcigame: true, // Use Ant-build for now as passing the "additionaljar" does not work in Gradle build (yet)
[ name: 'POI-DSL-old-Xerces', trigger: triggerSundays, skipcigame: true, useAnt: true,
shell: "test -s ${xercesLib} || wget -O ${xercesLib} ${xercesUrl}\n", shell: "test -s ${xercesLib} || wget -O ${xercesLib} ${xercesUrl}\n",
// the property triggers using Xerces as XML Parser and previously showed some exception that can occur // the property triggers using Xerces as XML Parser and previously showed some exception that can occur
properties: ["-Dadditionaljar=${xercesLib}"] 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 [ name: 'POI-DSL-regenerate-javadoc', trigger: triggerSundays, javadoc: true
], ],
// it was impossible to make this run stable in Gradle, thus disabling this for now // 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 [ name: 'POI-DSL-API-Check', trigger: '@daily', apicheck: true, disabled: true, useAnt: true
], ],
// [ name: 'POI-DSL-Gradle', trigger: triggerSundays, email: 'centic@apache.org', gradle: true [ name: 'POI-DSL-no-scratchpad', trigger: triggerSundays, noScratchpad: true
// ],
[ name: 'POI-DSL-no-scratchpad', trigger: triggerSundays, noScratchpad: true, gradle: true
], ],
[ name: 'POI-DSL-saxon-test', trigger: triggerSundays, saxonTest: true, gradle: true [ name: 'POI-DSL-saxon-test', trigger: triggerSundays, saxonTest: true
], ],
// [ name: 'POI-DSL-SonarQube', jdk: '1.11', trigger: 'H 7 * * *', maven: true, sonar: true, skipcigame: true, // [ name: 'POI-DSL-SonarQube', jdk: '1.11', trigger: 'H 7 * * *', maven: true, sonar: true, skipcigame: true,
// email: 'kiwiwings@apache.org', // email: 'kiwiwings@apache.org',
// // replaced by Gradle-based build now // // replaced by Gradle-based build now
// disabled: true // disabled: true
// ], // ],
[ name: 'POI-DSL-SonarQube-Gradle', jdk: '1.11', trigger: 'H 7 * * *', gradle: true, 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', gradle: 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.12', jdk: '1.12', trigger: triggerSundays, windows: true, slaves: 'Windows', skipcigame: true, gradle: true, [ name: 'POI-DSL-Windows-1.11', jdk: '1.11', trigger: triggerSundays, windows: true, slaves: 'Windows',
// // let's save some CPU cycles here, 12 is not a LTS and JDK 13 is GA now jenkinsLite: true
// disabled: true
// ],
// [ name: 'POI-DSL-Windows-1.14', jdk: '1.14', trigger: triggerSundays, windows: true, slaves: 'Windows', skipcigame: true, gradle: true,
// // let's only verify the latest two JDKs
// disabled: true
// ],
[ name: 'POI-DSL-Windows-1.15', jdk: '1.15', trigger: triggerSundays, windows: true, slaves: 'Windows', skipcigame: true, gradle: true,
// let's save some CPU cycles here, 14 is not a LTS and JDK 15 is GA as of 15 September 2020
disabled: true
], ],
[ name: 'POI-DSL-Windows-1.16', jdk: '1.16', trigger: 'H */12 * * *', windows: true, slaves: 'Windows', skipcigame: true, gradle: true, [ name: 'POI-DSL-Windows-1.17', jdk: '1.17', trigger: 'H */12 * * *', windows: true, slaves: 'Windows', skipcigame: true
// let's save some CPU cycles here, 16 is not a 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, gradle: true [ name: 'POI-DSL-Windows-1.21', jdk: '1.21', 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, gradle: true [ name: 'POI-DSL-Windows-1.24', jdk: '1.24', trigger: triggerSundays, windows: true, slaves: 'Windows', skipcigame: true,
], ],
[ name: 'POI-DSL-Github-PullRequests', trigger: '', githubpr: true, skipcigame: true, [ name: 'POI-DSL-Windows-1.25', jdk: '1.25', trigger: triggerSundays, windows: true, slaves: 'Windows', skipcigame: true,
// ensure the file which is needed from the separate documentation module does exist skipSpotbugs: true,
// as we are checking out from git, we do not have the reference checked out here // use Ant for building until Gradle supports JDK 24
addShell: 'mkdir -p src/documentation\ntouch src/documentation/RELEASE-NOTES.txt' // 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
], ],
] ]
def xmlbeansjobs = [ def xmlbeansjobs = [
[ name: 'POI-XMLBeans-DSL-1.8', jdk: '1.8', trigger: 'H */12 * * *', skipcigame: true, gradle: true, [ name: 'POI-XMLBeans-DSL-1.8', jdk: '1.8', trigger: 'H */12 * * *', skipcigame: true,
], ],
[ name: 'POI-XMLBeans-DSL-1.11', jdk: '1.11', trigger: triggerSundays, skipcigame: true, gradle: true, [ 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, gradle: true, [ name: 'POI-XMLBeans-DSL-1.17', jdk: '1.17', trigger: 'H */12 * * *', skipcigame: true,
// let's save some CPU cycles here, 16 is not a LTS and JDK 17 is GA ],
[ name: 'POI-XMLBeans-DSL-1.21', jdk: '1.21', trigger: 'H */12 * * *', skipcigame: true,
],
[ name: 'POI-XMLBeans-DSL-1.24', jdk: '1.24', trigger: triggerSundays, skipcigame: true,
disabled: true disabled: true
], ],
[ name: 'POI-XMLBeans-DSL-1.17', jdk: '1.17', trigger: triggerSundays, skipcigame: true, gradle: true, [ name: 'POI-XMLBeans-DSL-1.25', jdk: '1.25', trigger: triggerSundays, skipcigame: true,
], ],
[ name: 'POI-XMLBeans-DSL-1.18', jdk: '1.18', trigger: triggerSundays, skipcigame: true, gradle: true, [ name: 'POI-XMLBeans-DSL-Sonar', jdk: '1.17', trigger: triggerSundays, skipcigame: true,
],
[ name: 'POI-XMLBeans-DSL-Sonar', jdk: '1.11', trigger: triggerSundays, skipcigame: true,
sonar: true sonar: true
] ]
] ]
def svnBase = 'https://svn.apache.org/repos/asf/poi/trunk' def gitBase = 'https://github.com/apache/poi.git'
def xmlbeansSvnBase = 'https://svn.apache.org/repos/asf/xmlbeans/trunk' 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 defaultTrigger = 'H/15 * * * *' // check SCM every 60/15 = 4 minutes
def defaultEmail = 'dev@poi.apache.org' def defaultEmail = 'dev@poi.apache.org'
def defaultAnt = 'ant_1.10_latest' def defaultAnt = 'ant_1.10_latest'
@ -141,18 +142,14 @@ def defaultMaven = 'maven_3_latest'
def defaultSlaves = '(ubuntu)&&!beam&&!cloud-slave&&!H29' def defaultSlaves = '(ubuntu)&&!beam&&!cloud-slave&&!H29'
def jdkMapping = [ def jdkMapping = [
'1.8': [ jenkinsJdk: 'jdk_1.8_latest', jdkVersion: 8, jdkVendor: 'oracle' ], '1.8': [ jenkinsJdk: 'jdk_1.8_latest', jdkVersion: 8, jdkVendor: '' ],
'1.10': [ jenkinsJdk: 'jdk_10_latest', jdkVersion: 10, jdkVendor: 'oracle' ], '1.11': [ jenkinsJdk: 'jdk_11_latest', jdkVersion: 11, jdkVendor: '' ],
'1.11': [ jenkinsJdk: 'jdk_11_latest', jdkVersion: 11, jdkVendor: 'oracle' ],
'1.12': [ jenkinsJdk: 'jdk_12_latest', jdkVersion: 12, jdkVendor: '' ],
'1.13': [ jenkinsJdk: 'jdk_13_latest', jdkVersion: 13, jdkVendor: '' ],
'1.14': [ jenkinsJdk: 'jdk_14_latest', jdkVersion: 14, 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.17': [ jenkinsJdk: 'jdk_17_latest', jdkVersion: 17, jdkVendor: '' ],
'1.18': [ jenkinsJdk: 'jdk_18_latest', jdkVersion: 18, jdkVendor: '' ], '1.21': [ jenkinsJdk: 'jdk_21_latest', jdkVersion: 21, jdkVendor: '' ],
'OpenJDK 1.8': [ jenkinsJdk: 'adoptopenjdk_hotspot_8u282', jdkVersion: 8, jdkVendor: 'adoptopenjdk' ], '1.24': [ jenkinsJdk: 'jdk_24_latest', jdkVersion: 24, jdkVendor: '' ],
'IBMJDK': [ jenkinsJdk: 'ibmjdk_1.8.0_261', jdkVersion: 8, jdkVendor: 'ibm' ] '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) { static def shellEx(def context, String cmd, def poijob) {
@ -170,7 +167,7 @@ Apache POI - the Java API for Microsoft Documents
</p> </p>
<p> <p>
<b>This is an automatically generated Job Config, do not edit it here! <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> 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> for more details about the DSL.</b>
</p>''' </p>'''
@ -189,9 +186,9 @@ def apicheckDesc = '''
def sonarDesc = ''' def sonarDesc = '''
<p> <p>
<b><a href="lastSuccessfulBuild/findbugsResult/" target="_blank">Findbugs report of latest build</a></b> - <b><a href="lastSuccessfulBuild/spotbugs/" target="_blank">Spotbugs report of latest build</a></b> -
<b><a href="https://sonarcloud.io/dashboard?id=poi-parent" target="_blank">Sonar reports</a></b> - <b><a href="https://sonarcloud.io/dashboard?id=poi-parent" target="_blank">Sonar reports</a></b> -
<b><a href="lastSuccessfulBuild/artifact/build/coverage/index.html" target="_blank">Coverage of latest build</a></b> <b><a href="lastSuccessfulBuild/jacoco/" target="_blank">Coverage of latest build</a></b>
</p> </p>
''' '''
@ -200,9 +197,9 @@ def shellCmdsUnix =
rm -rf examples excelant integrationtest main ooxml ooxml-schema scratchpad build.javacheck.xml rm -rf examples excelant integrationtest main ooxml ooxml-schema scratchpad build.javacheck.xml
# show which files are currently modified in the working copy # show which files are currently modified in the working copy
svn status || true git status || true
# make sure no changed module-class-files are lingering on # make sure no changed module-class-files or ooxml-lite-report-files are lingering on
svn revert poi*/src/*/java9/module-info.* || true git reset --hard || true
# print out information about which exact version of java we are using # print out information about which exact version of java we are using
echo Java-Home: $JAVA_HOME echo Java-Home: $JAVA_HOME
@ -235,9 +232,9 @@ exit 0'''
def shellCmdsWin = def shellCmdsWin =
'''@echo off '''@echo off
:: show which files are currently modified in the working copy :: show which files are currently modified in the working copy
svn status git status
:: make sure no changed module-class-files are lingering on :: make sure no changed module-class-files are lingering on
svn revert poi*\\src\\*\\java9\\module-info.* git reset --hard
:: print out information about which exact version of java we are using :: print out information about which exact version of java we are using
echo Java-Home: %JAVA_HOME% echo Java-Home: %JAVA_HOME%
@ -255,6 +252,7 @@ poijobs.each { poijob ->
def email = poijob.email ?: defaultEmail def email = poijob.email ?: defaultEmail
def slaves = poijob.slaves ?: defaultSlaves + (poijob.slaveAdd ?: '') def slaves = poijob.slaves ?: defaultSlaves + (poijob.slaveAdd ?: '')
def antRT = poijob.windows ? defaultAntWindows : defaultAnt def antRT = poijob.windows ? defaultAntWindows : defaultAnt
def checkoutBranch = poijob.branch ?: defaultBranch
job('POI/' + poijob.name) { job('POI/' + poijob.name) {
if (poijob.disabled) { if (poijob.disabled) {
@ -270,11 +268,6 @@ poijobs.each { poijob ->
environmentVariables { environmentVariables {
env('LANG', 'en_US.UTF-8') env('LANG', 'en_US.UTF-8')
env('CI_BUILD', 'TRUE') env('CI_BUILD', 'TRUE')
if(jdkKey == '1.10') {
// when using JDK 9/10 for running Ant, we need to provide more modules for the forbidden-api-checks task
// on JDK 11 and newer there is no such module any more, so do not add it here
env('ANT_OPTS', '--add-modules=java.xml.bind --add-opens=java.xml/com.sun.org.apache.xerces.internal.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED')
}
env('FORREST_HOME', poijob.windows ? 'f:\\jenkins\\tools\\forrest\\latest' : '/home/jenkins/tools/forrest/latest') env('FORREST_HOME', poijob.windows ? 'f:\\jenkins\\tools\\forrest\\latest' : '/home/jenkins/tools/forrest/latest')
} }
@ -304,50 +297,17 @@ poijobs.each { poijob ->
} }
jdk(jdkMapping.get(jdkKey).jenkinsJdk) jdk(jdkMapping.get(jdkKey).jenkinsJdk)
scm { scm {
if (poijob.githubpr) { git {
git { remote {
remote { url(gitBase)
github('apache/poi')
refspec('+refs/pull/*:refs/remotes/origin/pr/*')
}
branch('${sha1}')
}
} else {
svn(svnBase) { svnNode ->
svnNode / browser(class: 'hudson.scm.browsers.ViewSVN') /
url << 'https://svn.apache.org/viewcvs.cgi/?root=Apache-SVN'
} }
branch("*/${checkoutBranch}")
} }
} }
checkoutRetryCount(3) checkoutRetryCount(3)
if (poijob.githubpr) { triggers {
throttleConcurrentBuilds { scm(trigger)
maxPerNode(1)
maxTotal(1)
}
parameters {
/* plugin not available:
gitParam('sha1') {
description('Pull request')
type('BRANCH')
}*/
stringParam('sha1', 'origin/pr/9/head', 'Provide a branch-spec, e.g. origin/pr/9/head')
}
triggers {
pullRequestBuildTrigger()
/*githubPullRequest {
admins(['centic9', 'poi-benchmark', 'tballison', 'gagravarr', 'onealj', 'pjfanning', 'Alain-Bearez'])
userWhitelist(['centic9', 'poi-benchmark', 'tballison', 'gagravarr', 'onealj', 'pjfanning', 'Alain-Bearez'])
orgWhitelist(['apache'])
cron('H/5 * * * *')
triggerPhrase('OK to test')
}*/
}
} else {
triggers {
scm(trigger)
}
} }
def shellcmds = (poijob.windows ? shellCmdsWin : shellCmdsUnix).replace('POIJOBSHELL', poijob.shell ?: '') def shellcmds = (poijob.windows ? shellCmdsWin : shellCmdsUnix).replace('POIJOBSHELL', poijob.shell ?: '')
@ -379,7 +339,7 @@ poijobs.each { poijob ->
gradle { gradle {
switches('-PenableSonar') switches('-PenableSonar')
switches('-Dsonar.login=${POI_SONAR_TOKEN}') switches('-Dsonar.token=${POI_SONAR_TOKEN}')
switches('-Dsonar.organization=apache') switches('-Dsonar.organization=apache')
switches('-Dsonar.projectKey=poi-parent') switches('-Dsonar.projectKey=poi-parent')
switches('-Dsonar.host.url=https://sonarcloud.io') switches('-Dsonar.host.url=https://sonarcloud.io')
@ -390,90 +350,13 @@ poijobs.each { poijob ->
tasks('clean') tasks('clean')
tasks('check') tasks('check')
tasks('jacocoTestReport') tasks('jacocoTestReport')
tasks('sonarqube') tasks('sonar')
useWrapper(true) useWrapper(true)
} }
} }
publishers { publishers {
// in archive, junit and jacoco publishers, matches beneath build/*/build/... are for Gradle-build results
archiveArtifacts('build/dist/*.tar.gz,*/build/reports/**,poi-integration/build/test-results/**,*/build/libs/*.jar')
archiveJunit('*/build/test-results/**/TEST-*.xml') {
testDataPublishers {
publishTestStabilityData()
}
}
jacocoCodeCoverage {
classPattern('*/build/classes')
execPattern('*/build/*.exec,*/build/jacoco/*.exec')
sourcePattern('*/src/main/java')
exclusionPattern('com/microsoft/**,org/openxmlformats/**,org/etsi/**,org/w3/**,schemaorg*/**,schemasMicrosoft*/**,org/apache/poi/hdf/model/hdftypes/definitions/*.class,org/apache/poi/hwpf/model/types/*.class,org/apache/poi/hssf/usermodel/DummyGraphics2d.class,org/apache/poi/sl/draw/binding/*.class')
}
if (!poijob.skipcigame) {
configure { project ->
project / publishers << 'hudson.plugins.cigame.GamePublisher' {}
}
}
mailer(email, false, false)
}
} else {
steps {
shellEx(delegate, shellcmds, poijob)
if(poijob.addShell) {
shellEx(delegate, poijob.addShell, poijob)
}
// For Jobs that should still have the default set of publishers we can configure different steps here
if(poijob.gradle) {
if (!poijob.windows) {
// Gradle will not run any tests if the code is up-to-date, therefore manually mark the files as updated
shellEx(delegate, 'touch --no-create build/*/build/test-results/TEST-*.xml build/*/build/test-results/test/TEST-*.xml', poijob)
}
gradle {
tasks('clean jenkins')
useWrapper(true)
if (poijob.noScratchpad) {
switches('-Pscratchpad.ignore=true')
}
if (poijob.saxonTest) {
switches('-Psaxon.test=true')
}
switches("-PjdkVersion=${jdkMapping.get(jdkKey).jdkVersion}")
if (jdkMapping.get(jdkKey).jdkVendor != '') {
switches("-PjdkVendor=${jdkMapping.get(jdkKey).jdkVendor}")
}
}
} else {
ant {
targets(['clean', 'jenkins'] + (poijob.properties ?: []))
prop('coverage.enabled', true)
// Properties did not work, so I had to use targets instead
//properties(poijob.properties ?: '')
antInstallation(antRT)
}
ant {
targets(['run'] + (poijob.properties ?: []))
buildFile('poi-integration/build.xml')
// Properties did not work, so I had to use targets instead
//properties(poijob.properties ?: '')
antInstallation(antRT)
}
}
}
publishers {
recordIssues {
tools {
spotBugs {
pattern('*/build/reports/spotbugs/*.xml')
reportEncoding('UTF-8')
}
}
}
// in archive, junit and jacoco publishers, matches beneath build/*/build/... are for Gradle-build results // 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/hs_err*.log') archiveArtifacts('build/dist/*.tar.gz,*/build/reports/**,poi-integration/build/test-results/**,*/build/libs/*.jar')
warnings(['Java Compiler (javac)', 'JavaDoc Tool'], null) {
resolveRelativePaths()
}
archiveJunit('*/build/test-results/**/TEST-*.xml') { archiveJunit('*/build/test-results/**/TEST-*.xml') {
testDataPublishers { testDataPublishers {
publishTestStabilityData() publishTestStabilityData()
@ -493,17 +376,97 @@ poijobs.each { poijob ->
} }
mailer(email, false, false) mailer(email, false, false)
} }
} } else {
steps {
shellEx(delegate, shellcmds, poijob)
if(poijob.addShell) {
shellEx(delegate, poijob.addShell, poijob)
}
// For Jobs that should still have the default set of publishers we can configure different steps here
if(!poijob.useAnt) {
if (!poijob.windows) {
// Gradle will not run any tests if the code is up-to-date, therefore manually mark the files as updated
shellEx(delegate, 'touch --no-create build/*/build/test-results/TEST-*.xml build/*/build/test-results/test/TEST-*.xml', poijob)
}
gradle {
if (poijob.githubpr) { if (poijob.jenkinsLite) {
configure { tasks('clean jenkinsLite')
it / 'properties' << 'com.cloudbees.jenkins.plugins.git.vmerge.JobPropertyImpl'(plugin: 'git-validated-merge') { } else {
credentialsId('ASF_Cloudbees_Jenkins_ci-builds') tasks('clean jenkins')
postBuildPushFailureHandler(class: 'com.cloudbees.jenkins.plugins.git.vmerge.pbph.PushFailureIsFailure') }
useWrapper(true)
if (poijob.noScratchpad) {
switches('-Pscratchpad.ignore=true')
}
if (poijob.saxonTest) {
switches('-Psaxon.test=true')
}
switches("-PjdkVersion=${jdkMapping.get(jdkKey).jdkVersion}")
if (jdkMapping.get(jdkKey).jdkVendor != '') {
switches("-PjdkVendor=${jdkMapping.get(jdkKey).jdkVendor}")
}
switches("--refresh-dependencies")
}
} else {
ant {
targets(['clean', 'jenkins'] + (poijob.properties ?: []))
prop('coverage.enabled', !poijob.skipSpotbugs)
// Properties did not work, so I had to use targets instead
//properties(poijob.properties ?: '')
antInstallation(antRT)
}
if(!poijob.skipSourceBuild) {
ant {
targets(['run'] + (poijob.properties ?: []))
buildFile('poi-integration/build.xml')
// Properties did not work, so I had to use targets instead
//properties(poijob.properties ?: '')
antInstallation(antRT)
}
}
} }
} }
publishers {
if (!poijob.skipSpotbugs) {
recordIssues {
tools {
spotBugs {
pattern('*/build/reports/spotbugs/*.xml')
reportEncoding('UTF-8')
}
}
}
}
// 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/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()
} */
archiveJunit('*/build/test-results/**/TEST-*.xml') {
testDataPublishers {
publishTestStabilityData()
}
}
if (!poijob.skipSpotbugs) {
jacocoCodeCoverage {
classPattern('*/build/classes')
execPattern('*/build/*.exec,*/build/jacoco/*.exec')
sourcePattern('*/src/main/java')
exclusionPattern('com/microsoft/**,org/openxmlformats/**,org/etsi/**,org/w3/**,schemaorg*/**,schemasMicrosoft*/**,org/apache/poi/hdf/model/hdftypes/definitions/*.class,org/apache/poi/hwpf/model/types/*.class,org/apache/poi/hssf/usermodel/DummyGraphics2d.class,org/apache/poi/sl/draw/binding/*.class')
}
}
if (!poijob.skipcigame) {
configure { project ->
project / publishers << 'hudson.plugins.cigame.GamePublisher' {}
}
}
mailer(email, false, false)
}
} }
} }
} }
@ -527,11 +490,8 @@ xmlbeansjobs.each { xjob ->
label(slaves) label(slaves)
environmentVariables { environmentVariables {
env('LANG', 'en_US.UTF-8') env('LANG', 'en_US.UTF-8')
if(jdkKey == '1.10') { if (jdkKey == '1.11' || jdkKey == '1.17' || jdkKey == '1.21'
// when using JDK 9/10 for running Ant, we need to provide more modules for the forbidden-api-checks task || jdkKey == '1.23' || jdkKey == '1.24' || jdkKey == '1.25') {
// on JDK 11 and newer there is no such module any more, so do not add it here
env('ANT_OPTS', '--add-modules=java.xml.bind --add-opens=java.xml/com.sun.org.apache.xerces.internal.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED')
} else if (jdkKey == '1.11' || jdkKey == '1.12' || jdkKey == '1.13' || jdkKey == '1.14' || jdkKey == '1.15' || jdkKey == '1.16' || jdkKey == '1.17') {
env('ANT_OPTS', '--add-opens=java.xml/com.sun.org.apache.xerces.internal.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED') 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') // will be needed for forbidden-apis-check: env('ANT_HOME', xjob.windows ? 'f:\\jenkins\\tools\\ant\\latest' : '/usr/share/ant')
@ -554,9 +514,11 @@ xmlbeansjobs.each { xjob ->
} }
jdk(jdkMapping.get(jdkKey).jenkinsJdk) jdk(jdkMapping.get(jdkKey).jenkinsJdk)
scm { scm {
svn(xmlbeansSvnBase) { svnNode -> git {
svnNode / browser(class: 'hudson.scm.browsers.ViewSVN') / remote {
url << 'https://svn.apache.org/viewcvs.cgi/?root=Apache-SVN' url(xmlbeansGitBase)
}
branch('*/trunk')
} }
} }
checkoutRetryCount(3) checkoutRetryCount(3)
@ -577,7 +539,7 @@ xmlbeansjobs.each { xjob ->
gradle { gradle {
if (xjob.sonar) { if (xjob.sonar) {
switches('-PenableSonar') switches('-PenableSonar')
switches('-Dsonar.login=${POI_SONAR_TOKEN}') switches('-Dsonar.token=${POI_SONAR_TOKEN}')
switches('-Dsonar.organization=apache') switches('-Dsonar.organization=apache')
switches('-Dsonar.projectKey=apache_xmlbeans') switches('-Dsonar.projectKey=apache_xmlbeans')
switches('-Dsonar.host.url=https://sonarcloud.io') switches('-Dsonar.host.url=https://sonarcloud.io')
@ -590,17 +552,18 @@ xmlbeansjobs.each { xjob ->
tasks('jenkins') tasks('jenkins')
tasks('jacocoTestReport') tasks('jacocoTestReport')
if (xjob.sonar) { if (xjob.sonar) {
tasks('sonarqube') tasks('sonar')
} }
useWrapper(true) useWrapper(true)
} }
} }
publishers { publishers {
archiveArtifacts('build/libs/xmlbeans*.jar,build/distributions/*,build/hs_err*.log') archiveArtifacts('build/libs/xmlbeans*.jar,build/distributions/*,build/reports/*.bom.*,build/hs_err*.log')
/* this plugin is currently missing on the Apache Jenkins instance
warnings(['Java Compiler (javac)', 'JavaDoc Tool'], null) { warnings(['Java Compiler (javac)', 'JavaDoc Tool'], null) {
resolveRelativePaths() resolveRelativePaths()
} } */
archiveJunit('build/test-results/test/TEST-*.xml') { archiveJunit('build/test-results/test/TEST-*.xml') {
testDataPublishers { testDataPublishers {
publishTestStabilityData() publishTestStabilityData()
@ -648,59 +611,56 @@ Unfortunately we often see builds break because of changes/new machines...''')
} }
axes { axes {
jdk( jdk(
'jdk_1.8_latest', 'jdk_8_latest',
'jdk_10_latest',
'jdk_11_latest', 'jdk_11_latest',
/* don't look for JDKs that are out of support
'jdk_12_latest',
'jdk_13_latest',
'jdk_14_latest',
'jdk_15_latest',
'jdk_16_latest',*/
'jdk_17_latest', 'jdk_17_latest',
'jdk_18_latest', 'jdk_21_latest',
'adoptopenjdk_hotspot_8u282', 'jdk_23_latest',
'ibmjdk_1.8.0_261' 'jdk_24_latest',
'jdk_25_latest',
'jdk_26_latest',
'ibm_semeru_21.0.2_13'
) )
// Note H50 is reserved according to it's node-descripion // Note H50 is reserved according to its node-description
label('Nodes','H22','H23','H24','H25','H26','H27','H28','H29','H30','H31','H32','H33','H34','H35','H36','H37','H38','H39','H40','H41','H42','H43','H44','H48','lucene1','lucene2','master') 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 { steps {
conditionalSteps { conditionalSteps {
condition { condition {
fileExists('/usr', BaseDir.WORKSPACE) fileExists('/usr', BaseDir.WORKSPACE)
} }
runner('DontRun') runner('DontRun')
steps { steps {
shell( shell(
'''which svn || true '''which git || true
which javac which javac
javac -version 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 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
''') ''')
ant { ant {
antInstallation(defaultAnt) antInstallation(defaultAnt)
} }
shell( shell(
'''which mvn || true '''which mvn || true
mvn -version || true mvn -version || true
echo '<project><modelVersion>4.0.0</modelVersion><groupId>org.apache.poi</groupId><artifactId>build-tst</artifactId><version>1.0.0</version></project>' > pom.xml echo '<project><modelVersion>4.0.0</modelVersion><groupId>org.apache.poi</groupId><artifactId>build-tst</artifactId><version>1.0.0</version></project>' > pom.xml
''') ''')
maven { maven {
goals('package') goals('package')
mavenInstallation(defaultMaven) mavenInstallation(defaultMaven)
} }
} }
} }
conditionalSteps { conditionalSteps {
condition { condition {
fileExists('c:\\windows', BaseDir.WORKSPACE) fileExists('c:\\windows', BaseDir.WORKSPACE)
} }
runner('DontRun') runner('DontRun')
steps { steps {
batchFile( batchFile(
'''@echo off '''@echo off
echo . echo .
where javac.exe where javac.exe
echo . echo .
@ -708,71 +668,10 @@ javac -version
echo . echo .
echo ^<?xml version=^"1.0^"?^>^<project name=^"POI Build^" default=^"test^"^>^<target name=^"test^"^>^<echo^>Using Ant: ${ant.version} from ${ant.home}, ant detected Java ${ant.java.version} (may be different than actual Java sometimes...), using Java: ${java.version}/${java.runtime.version}/${java.vm.version}/${java.vm.name} from ${java.vm.vendor} on ${os.name}: ${os.version}^</echo^>^</target^>^</project^> > build.xml echo ^<?xml version=^"1.0^"?^>^<project name=^"POI Build^" default=^"test^"^>^<target name=^"test^"^>^<echo^>Using Ant: ${ant.version} from ${ant.home}, ant detected Java ${ant.java.version} (may be different than actual Java sometimes...), using Java: ${java.version}/${java.runtime.version}/${java.vm.version}/${java.vm.name} from ${java.vm.vendor} on ${os.name}: ${os.version}^</echo^>^</target^>^</project^> > build.xml
''') ''')
ant { ant {
antInstallation(defaultAntWindows) antInstallation(defaultAntWindows)
} }
} }
} }
} }
} }
/* 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

@ -222,74 +222,16 @@ Office Open XML schemas (poi-ooxml-full-*.jar)
Furthermore, both Microsoft and Adobe have granted patent licenses Furthermore, both Microsoft and Adobe have granted patent licenses
to this work [3,4,5]. to this work [3,4,5].
[1] http://www.ecma-international.org/publications/standards/Ecma-376.htm [1] https://www.ecma-international.org/publications/standards/Ecma-376.htm
[2] http://www.ecma-international.org/memento/Ecmabylaws.htm [2] https://www.ecma-international.org/memento/Ecmabylaws.htm
[3] http://www.microsoft.com/openspecifications/en/us/programs/osp/default.aspx [3] https://www.microsoft.com/openspecifications/en/us/programs/osp/default.aspx
[4] http://www.ecma-international.org/publications/files/ECMA-ST/Ecma%20PATENT/ [4] https://www.ecma-international.org/publications/files/ECMA-ST/Ecma%20PATENT/
Patent%20statements%20ok/ECMA-376%20Edition%202%20Microsoft%20Patent%20Declaration.pdf Patent%20statements%20ok/ECMA-376%20Edition%202%20Microsoft%20Patent%20Declaration.pdf
[5] http://www.ecma-international.org/publications/files/ECMA-ST/Ecma%20PATENT/ [5] https://www.ecma-international.org/publications/files/ECMA-ST/Ecma%20PATENT/
Patent%20statements%20ok/ECMA-376%20Adobe%20Patent%20Declaration.pdf Patent%20statements%20ok/ECMA-376%20Adobe%20Patent%20Declaration.pdf
Bouncy Castle library (bcprov-*.jar, bcpg-*.jar, bcpkix-*.jar) org.apache.poi.util.ReplacingInputStream is based on code from
Copyright (c) 2000 - 2021 The Legion of the Bouncy Castle Inc.
(https://www.bouncycastle.org)
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
CurvesAPI / Curve API
BSD License
Copyright (c) 2000-2015 www.hamcrest.org
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer. Redistributions in
binary form must reproduce the above copyright notice, this list of
conditions and the following disclaimer in the documentation and/or other
materials provided with the distribution. Neither the name of Hamcrest nor
the names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Log4j 2 library (log4j-api-*.jar)
Apache License Version 2.0
inbot-utils (https://github.com/Inbot/inbot-utils) inbot-utils (https://github.com/Inbot/inbot-utils)
The MIT License (MIT) The MIT License (MIT)
@ -312,4 +254,15 @@ inbot-utils (https://github.com/Inbot/inbot-utils)
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. SOFTWARE.
ExceptionUtils is derived from `scala.util.control.NonFatal` in scala-library
which was released under the Apache 2.0 license.
Copyright (c) 2002-2023 EPFL
Copyright (c) 2011-2023 Lightbend, Inc.
The POI Source Release bundles the Gradle Wrapper. (https://docs.gradle.org/current/userguide/gradle_wrapper.html)
This is released under the Apache License, v2.0.
Copyright © 2015-2021 the original authors.
The wrapper.gradle file was developed by the Apache Kafka project and is released under the Apache License, v2.0.

View File

@ -1,5 +1,5 @@
Apache POI Apache POI
Copyright 2003-2021 The Apache Software Foundation Copyright 2003-2026 The Apache Software Foundation
This product includes software developed at This product includes software developed at
The Apache Software Foundation (https://www.apache.org/). The Apache Software Foundation (https://www.apache.org/).
@ -9,6 +9,8 @@ Copyright (c) 2000-2003, BEA Systems, <http://www.bea.com/> (dead link),
which was acquired by Oracle Corporation in 2008. which was acquired by Oracle Corporation in 2008.
<http://www.oracle.com/us/corporate/Acquisitions/bea/index.html> <http://www.oracle.com/us/corporate/Acquisitions/bea/index.html>
<https://en.wikipedia.org/wiki/BEA_Systems> <https://en.wikipedia.org/wiki/BEA_Systems>
Note: The ASF Secretary has on hand a Software Grant Agreement (SGA) from
BEA Systems, Inc. dated 9 Sep 2003 for XMLBeans signed by their EVP/CFO.
This product contains W3C XML Schema documents. Copyright 2001-2003 (c) This product contains W3C XML Schema documents. Copyright 2001-2003 (c)
World Wide Web Consortium (Massachusetts Institute of Technology, European World Wide Web Consortium (Massachusetts Institute of Technology, European
@ -22,3 +24,13 @@ This product contains parts of the eID Applet project
Copyright (c) 2009-2018 Copyright (c) 2009-2018
FedICT (federal ICT department of Belgium), e-Contract.be BVBA (https://www.e-contract.be), FedICT (federal ICT department of Belgium), e-Contract.be BVBA (https://www.e-contract.be),
Bart Hanssens from FedICT Bart Hanssens from FedICT
ExceptionUtils is derived from `scala.util.control.NonFatal` in scala-library
which was released under the Apache 2.0 license.
Copyright (c) 2002-2023 EPFL
Copyright (c) 2011-2023 Lightbend, Inc.
Scala includes software developed at
LAMP/EPFL (https://lamp.epfl.ch/) and
Lightbend, Inc. (https://www.lightbend.com/).

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 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 2. Saxon
Required if using as the XSLT and XQuery Processor engine in XML Beans. Required if using as the XSLT and XQuery Processor engine in XML Beans.
Available in Maven Central: 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 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: 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/2.3.0 - 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 - XML Commons Resolver: https://mvnrepository.com/artifact/xml-resolver/xml-resolver/1.2-osgi
- Bouncy Castle: https://mvnrepository.com/artifact/org.bouncycastle/bcprov-ext-jdk15on/1.70, https://mvnrepository.com/artifact/org.bouncycastle/bcpkix-jdk15on/1.70 - 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 4. PDFBox and PDFBox Graphics2D
Required to render to PDF documents. Required to render to PDF documents.
The required jars can be downloaded from: The required jars can be downloaded from:

View File

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

View File

@ -57,7 +57,7 @@ public class OSGiExtractorsIT extends BaseOSGiTestCase {
box.setText("Hello, World!"); box.setText("Hello, World!");
box.setAnchor(new Rectangle(36, 15, 648, 65)); box.setAnchor(new Rectangle(36, 15, 648, 65));
UnsynchronizedByteArrayOutputStream out = new UnsynchronizedByteArrayOutputStream(); UnsynchronizedByteArrayOutputStream out = UnsynchronizedByteArrayOutputStream.builder().get();
ppt.write(out); ppt.write(out);
return out.toByteArray(); return out.toByteArray();
} }
@ -66,7 +66,7 @@ public class OSGiExtractorsIT extends BaseOSGiTestCase {
Sheet s = wb.createSheet("OSGi"); Sheet s = wb.createSheet("OSGi");
s.createRow(0).createCell(0).setCellValue("Hello, World!"); s.createRow(0).createCell(0).setCellValue("Hello, World!");
UnsynchronizedByteArrayOutputStream out = new UnsynchronizedByteArrayOutputStream(); UnsynchronizedByteArrayOutputStream out = UnsynchronizedByteArrayOutputStream.builder().get();
wb.write(out); wb.write(out);
return out.toByteArray(); return out.toByteArray();

View File

@ -75,7 +75,7 @@ public class OSGiSlideShowIT extends BaseOSGiTestCase {
} }
box2.setAnchor(new Rectangle(36, 80, 648, 400)); box2.setAnchor(new Rectangle(36, 80, 648, 400));
try (UnsynchronizedByteArrayOutputStream baos = new UnsynchronizedByteArrayOutputStream()) { try (UnsynchronizedByteArrayOutputStream baos = UnsynchronizedByteArrayOutputStream.builder().get()) {
ppt.write(baos); ppt.write(baos);
try (InputStream bais = baos.toInputStream()) { try (InputStream bais = baos.toInputStream()) {
ppt = SlideShowFactory.create(bais); ppt = SlideShowFactory.create(bais);

View File

@ -48,7 +48,7 @@ public class OSGiSpreadsheetIT extends BaseOSGiTestCase {
s.createRow(0).createCell(0).setCellValue("With OSGi"); s.createRow(0).createCell(0).setCellValue("With OSGi");
s.createRow(1).createCell(0).setCellFormula("SUM(A1:B3)"); s.createRow(1).createCell(0).setCellFormula("SUM(A1:B3)");
try (UnsynchronizedByteArrayOutputStream baos = new UnsynchronizedByteArrayOutputStream()) { try (UnsynchronizedByteArrayOutputStream baos = UnsynchronizedByteArrayOutputStream.builder().get()) {
wb.write(baos); wb.write(baos);
try (InputStream bais = baos.toInputStream()) { try (InputStream bais = baos.toInputStream()) {
wb = WorkbookFactory.create(bais); wb = WorkbookFactory.create(bais);

View File

@ -19,9 +19,7 @@ import java.util.regex.Pattern
sourceSets { sourceSets {
main { main {
if (jdkVersion > 8) { output.dir(JAVA9_OUT, builtBy: 'compileJava9')
output.dir(JAVA9_OUT, builtBy: 'cacheJava9')
}
} }
} }
@ -37,63 +35,39 @@ dependencies {
implementation project(path: ':poi-scratchpad', configuration: 'archives') implementation project(path: ':poi-scratchpad', configuration: 'archives')
} }
implementation "org.apache.logging.log4j:log4j-api:${log4jVersion}"
testImplementation(project(path: ':poi-ooxml', configuration: 'tests')) { testImplementation(project(path: ':poi-ooxml', configuration: 'tests')) {
if (NO_SCRATCHPAD) { if (NO_SCRATCHPAD) {
exclude group: 'org.apache.poi', module: 'poi-scratchpad' exclude group: 'org.apache.poi', module: 'poi-scratchpad'
} }
} }
testImplementation project(path: ':poi', configuration: 'tests') testImplementation project(path: ':poi', configuration: 'tests')
if (SAXON_TEST) {
testRuntimeOnly "net.sf.saxon:Saxon-HE:${saxonVersion}"
}
} }
final String MODULE_NAME = 'org.apache.poi.examples' final String MODULE_NAME = 'org.apache.poi.examples'
final Pattern MODULE_REGEX = ~'\\.jar$' final Pattern MODULE_REGEX = ~'\\.jar$'
final List MODULE_COMPILE_PATH = sourceSets.main.compileClasspath.findAll{ it.path =~ MODULE_REGEX }.collect{ it.parent }.unique() 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' dependsOn 'compileJava', ':poi-ooxml:jar', ':poi-scratchpad:jar'
javaCompiler = javaToolchains.compilerFor { javaCompiler = javaToolchains.compilerFor {
languageVersion = JavaLanguageVersion.of(jdkVersion) languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
if (jdkVendor != '') vendor = JvmVendorSpec.matching(jdkVendor)
} }
sourceCompatibility = 11
targetCompatibility = 11
destinationDirectory = file(JAVA9_OUT + VERSIONS9) destinationDirectory = file(JAVA9_OUT + VERSIONS9)
source = file(JAVA9_SRC) source = file(JAVA9_SRC)
classpath = files() classpath = files()
options.compilerArgs = [ options.compilerArgs = [
'--patch-module', "${MODULE_NAME}=${sourceSets.main.output.classesDirs.asPath}", '--patch-module', "${MODULE_NAME}=${sourceSets.main.output.classesDirs.asPath}",
'--module-path', files(MODULE_COMPILE_PATH).asPath '--module-path', files(MODULE_COMPILE_PATH).asPath
] ]
onlyIf {
jdkVersion > 8
}
}
task cacheJava9(type: Copy) {
dependsOn 'compileJava9'
from(file(JAVA9_OUT + VERSIONS9))
into(JAVA9_SRC)
} }
jar { jar {
dependsOn cacheJava9 dependsOn compileJava9
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}") destinationDirectory = file("../build/dist/maven/${base.archivesName.get()}")
if (jdkVersion == 8) {
into('META-INF/versions/9') {
from JAVA9_SRC include '*.class'
}
}
manifest { manifest {
attributes('Automatic-Module-Name': MODULE_NAME, 'Multi-Release': 'true') attributes('Automatic-Module-Name': MODULE_NAME, 'Multi-Release': 'true')
@ -113,3 +87,22 @@ sourcesJar {
from("$projectDir/../legal/NOTICE") from("$projectDir/../legal/NOTICE")
} }
} }
cyclonedxBom {
// includeConfigs is the list of configuration names to include when generating the BOM (leave empty to include every configuration)
includeConfigs = ["runtimeClasspath"]
// skipConfigs is a list of configuration names to exclude when generating the BOM
//skipConfigs = ["compileClasspath", "testCompileClasspath"]
// Specified the type of project being built. Defaults to 'library'
projectType = "library"
// Specified the version of the CycloneDX specification to use. Defaults to 1.4.
schemaVersion = "1.4"
// Boms destination directory (defaults to build/reports)
destination = file("build/reports")
// The file name for the generated BOMs (before the file format suffix). Defaults to 'bom'
outputName = "poi-examples-${project.version}.bom"
// The file format generated, can be xml, json or all for generating both
outputFormat = "all"
// Exclude BOM Serial Number
includeBomSerialNumber = true
}

View File

@ -36,7 +36,7 @@ WorkbookFactory.create(f,null,true).withCloseable { workbook ->
def sheet = workbook.getSheetAt(sheetNum) def sheet = workbook.getSheetAt(sheetNum)
sheet.each { row -> 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:" println " Row ${row.getRowNum()} has ${nonEmptyCells.size()} non-empty cells:"
nonEmptyCells.each { c -> nonEmptyCells.each { c ->
def cRef = [c] as CellReference 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") ns1.createRow(1).createCell(0).setCellValue("TODO - Populate with data")
Sheet ns2 = workbook.createSheet("Generated 2") 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[]) ["ID","Title","Date","Author","Num"] as String[])
ns2.createRow(2).createCell(0).setCellValue(1) ns2.createRow(2).createCell(0).setCellValue(1)
ns2.createRow(3).createCell(0).setCellValue(4) ns2.createRow(3).createCell(0).setCellValue(4)

View File

@ -21,10 +21,11 @@ apply plugin: 'groovy'
repositories { repositories {
mavenCentral() mavenCentral()
} }
dependencies { dependencies {
compile 'org.codehaus.groovy:groovy-all:2.4.13' implementation 'org.codehaus.groovy:groovy-all:2.4.21'
compile 'org.apache.poi:poi:5.0.0' implementation 'org.apache.poi:poi:5.3.0'
compile 'org.apache.poi:poi-ooxml:5.0.0' implementation 'org.apache.poi:poi-ooxml:5.3.0'
} }
// Our files are in the current directory // Our files are in the current directory
@ -33,11 +34,11 @@ sourceSets {
} }
// Run out read demo by default // Run out read demo by default
tasks.withType(JavaExec) { tasks.withType(JavaExec).configureEach {
classpath = sourceSets.main.runtimeClasspath classpath = sourceSets.main.runtimeClasspath
} }
task runScript(type: JavaExec) { tasks.register('runScript', JavaExec) {
main = "SpreadSheetDemo" mainClass = "SpreadSheetDemo"
args = ["../../../test-data/spreadsheet/Simple.xls"] args = ["../../../../test-data/spreadsheet/Simple.xls"]
} }
defaultTasks 'runScript' 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.io.File;
import java.nio.file.Files; import java.nio.file.Files;
import java.nio.file.Paths; import java.nio.file.Path;
import java.security.GeneralSecurityException; import java.security.GeneralSecurityException;
import java.util.Optional; import java.util.Optional;
import java.util.function.Predicate; import java.util.function.Predicate;
@ -72,7 +72,7 @@ public final class OOXMLPasswordsTry {
}; };
// Try each password in turn, reporting progress // 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(); 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")); System.out.println(found.map(s -> "Password found: " + s).orElse("Error - No password matched"));
} }

View File

@ -174,8 +174,8 @@ public final class CopyCompare {
for (int i=0; i<path.length(); i++) { for (int i=0; i<path.length(); i++) {
String subDir = path.getComponent(i); String subDir = path.getComponent(i);
if (de.hasEntry(subDir)) { if (de.hasEntryCaseInsensitive(subDir)) {
de = (DirectoryEntry)de.getEntry(subDir); de = (DirectoryEntry)de.getEntryCaseInsensitive(subDir);
} else { } else {
de = de.createDirectory(subDir); de = de.createDirectory(subDir);
if (i == path.length()-1) { if (i == path.length()-1) {

View File

@ -158,7 +158,7 @@ public final class WriteAuthorAndTitle {
for (int i=0; i<path.length(); i++) { for (int i=0; i<path.length(); i++) {
String subDir = path.getComponent(i); String subDir = path.getComponent(i);
de = (de.hasEntry(subDir)) ? (DirectoryEntry)de.getEntry(subDir) : de.createDirectory(subDir); de = (de.hasEntryCaseInsensitive(subDir)) ? (DirectoryEntry)de.getEntryCaseInsensitive(subDir) : de.createDirectory(subDir);
} }
de.createDocument(event.getName(), is); de.createDocument(event.getName(), is);

View File

@ -22,6 +22,7 @@ import java.io.FileOutputStream;
import java.io.IOException; import java.io.IOException;
import java.io.OutputStream; import java.io.OutputStream;
import java.io.PrintWriter; import java.io.PrintWriter;
import java.nio.charset.StandardCharsets;
import org.apache.poi.hsmf.MAPIMessage; import org.apache.poi.hsmf.MAPIMessage;
import org.apache.poi.hsmf.datatypes.AttachmentChunks; import org.apache.poi.hsmf.datatypes.AttachmentChunks;
@ -62,7 +63,7 @@ public class Msg2txt {
public void processMessage() throws IOException { public void processMessage() throws IOException {
String txtFileName = fileNameStem + ".txt"; String txtFileName = fileNameStem + ".txt";
String attDirName = fileNameStem + "-att"; String attDirName = fileNameStem + "-att";
try (PrintWriter txtOut = new PrintWriter(txtFileName, "UTF-8")) { try (PrintWriter txtOut = new PrintWriter(txtFileName, StandardCharsets.UTF_8.name())) {
try { try {
String displayFrom = msg.getDisplayFrom(); String displayFrom = msg.getDisplayFrom();
txtOut.println("From: " + displayFrom); txtOut.println("From: " + displayFrom);
@ -141,7 +142,7 @@ public class Msg2txt {
* @param args the list of MSG files to process * @param args the list of MSG files to process
*/ */
public static void main(String[] args) { public static void main(String[] args) {
if(args.length <= 0) { if(args.length == 0) {
System.err.println("No files names provided"); System.err.println("No files names provided");
} else { } else {
for (String arg : args) { for (String arg : args) {

View File

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

View File

@ -75,7 +75,7 @@ public class EventExample implements HSSFListener {
System.out.println("Cell found with value " + numrec.getValue() System.out.println("Cell found with value " + numrec.getValue()
+ " at row " + numrec.getRow() + " and column " + numrec.getColumn()); + " at row " + numrec.getRow() + " and column " + numrec.getColumn());
break; break;
// SSTRecords store a array of unique strings used in Excel. // SSTRecords store an array of unique strings used in Excel.
case SSTRecord.sid: case SSTRecord.sid:
sstrec = (SSTRecord) record; sstrec = (SSTRecord) record;
for (int k = 0; k < sstrec.getNumUniqueStrings(); k++) for (int k = 0; k < sstrec.getNumUniqueStrings(); k++)

View File

@ -23,7 +23,6 @@ import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.apache.poi.hssf.usermodel.HSSFCell; import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFCellStyle; 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.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet; import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.logging.PoiLogManager;
/** /**
* This class contains code that demonstrates how to insert plain, numbered * 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"}) @SuppressWarnings({"java:S106","java:S4823"})
public class InCellLists { 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' // This character looks like a solid, black, loser case letter 'o'
@ -190,7 +190,7 @@ public class InCellLists {
String formatString = InCellLists.BULLET_CHARACTER + " @"; String formatString = InCellLists.BULLET_CHARACTER + " @";
int formatIndex = format.getFormat(formatString); int formatIndex = format.getFormat(formatString);
// Construct an HSSFCellStyle and set it's data formt to use the // Construct an HSSFCellStyle and set its data format to use the
// object created above. // object created above.
HSSFCellStyle bulletStyle = workbook.createCellStyle(); HSSFCellStyle bulletStyle = workbook.createCellStyle();
bulletStyle.setDataFormat((short)formatIndex); bulletStyle.setDataFormat((short)formatIndex);
@ -248,8 +248,8 @@ public class InCellLists {
int increment) { int increment) {
StringBuilder buffer = new StringBuilder(); StringBuilder buffer = new StringBuilder();
int itemNumber = startingValue; int itemNumber = startingValue;
// Note that again, an HSSFCellStye object is required and that // Note that again, an HSSFCellStyle object is required and that
// it's wrap text property should be set to 'true' // its wrap text property should be set to 'true'
HSSFCellStyle wrapStyle = workbook.createCellStyle(); HSSFCellStyle wrapStyle = workbook.createCellStyle();
wrapStyle.setWrapText(true); wrapStyle.setWrapText(true);
// Note that the basic method is identical to the listInCell() method // Note that the basic method is identical to the listInCell() method
@ -282,7 +282,7 @@ public class InCellLists {
HSSFCell cell) { HSSFCell cell) {
StringBuilder buffer = new StringBuilder(); StringBuilder buffer = new StringBuilder();
// Note that again, an HSSFCellStye object is required and that // Note that again, an HSSFCellStye object is required and that
// it's wrap text property should be set to 'true' // its wrap text property should be set to 'true'
HSSFCellStyle wrapStyle = workbook.createCellStyle(); HSSFCellStyle wrapStyle = workbook.createCellStyle();
wrapStyle.setWrapText(true); wrapStyle.setWrapText(true);
// Note that the basic method is identical to the listInCell() method // Note that the basic method is identical to the listInCell() method
@ -318,7 +318,7 @@ public class InCellLists {
HSSFCell cell) { HSSFCell cell) {
StringBuilder buffer = new StringBuilder(); StringBuilder buffer = new StringBuilder();
// Note that again, an HSSFCellStye object is required and that // Note that again, an HSSFCellStye object is required and that
// it's wrap text property should be set to 'true' // its wrap text property should be set to 'true'
HSSFCellStyle wrapStyle = workbook.createCellStyle(); HSSFCellStyle wrapStyle = workbook.createCellStyle();
wrapStyle.setWrapText(true); wrapStyle.setWrapText(true);
// Step through the ArrayList of MultilLevelListItem instances. // Step through the ArrayList of MultilLevelListItem instances.
@ -381,7 +381,7 @@ public class InCellLists {
StringBuilder buffer = new StringBuilder(); StringBuilder buffer = new StringBuilder();
int highLevelItemNumber = highLevelStartingValue; int highLevelItemNumber = highLevelStartingValue;
// Note that again, an HSSFCellStye object is required and that // Note that again, an HSSFCellStye object is required and that
// it's wrap text property should be set to 'true' // its wrap text property should be set to 'true'
HSSFCellStyle wrapStyle = workbook.createCellStyle(); HSSFCellStyle wrapStyle = workbook.createCellStyle();
wrapStyle.setWrapText(true); wrapStyle.setWrapText(true);
// Step through the ArrayList of MultilLevelListItem instances. // Step through the ArrayList of MultilLevelListItem instances.
@ -436,7 +436,7 @@ public class InCellLists {
HSSFCell cell) { HSSFCell cell) {
StringBuilder buffer = new StringBuilder(); StringBuilder buffer = new StringBuilder();
// Note that again, an HSSFCellStye object is required and that // Note that again, an HSSFCellStye object is required and that
// it's wrap text property should be set to 'true' // its wrap text property should be set to 'true'
HSSFCellStyle wrapStyle = workbook.createCellStyle(); HSSFCellStyle wrapStyle = workbook.createCellStyle();
wrapStyle.setWrapText(true); wrapStyle.setWrapText(true);
// Step through the ArrayList of MultilLevelListItem instances. // Step through the ArrayList of MultilLevelListItem instances.

View File

@ -192,7 +192,7 @@ public final class OfficeDrawing {
private static int loadPicture( String path, HSSFWorkbook wb ) throws IOException { private static int loadPicture( String path, HSSFWorkbook wb ) throws IOException {
int pictureIndex; int pictureIndex;
try (FileInputStream fis = new FileInputStream(path); try (FileInputStream fis = new FileInputStream(path);
UnsynchronizedByteArrayOutputStream bos = new UnsynchronizedByteArrayOutputStream()) { UnsynchronizedByteArrayOutputStream bos = UnsynchronizedByteArrayOutputStream.builder().get()) {
IOUtils.copy(fis, bos); IOUtils.copy(fis, bos);
pictureIndex = wb.addPicture(bos.toByteArray(), Workbook.PICTURE_TYPE_PNG); pictureIndex = wb.addPicture(bos.toByteArray(), Workbook.PICTURE_TYPE_PNG);
} }

View File

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

View File

@ -51,7 +51,7 @@ public class RepeatingRowsAndColumns {
sheet1.setRepeatingColumns(CellRangeAddress.valueOf("A:C")); sheet1.setRepeatingColumns(CellRangeAddress.valueOf("A:C"));
// Set the rows to repeat from row 0 to 2 on the second sheet. // Set the rows to repeat from row 0 to 2 on the second sheet.
sheet2.setRepeatingRows(CellRangeAddress.valueOf("1:3")); sheet2.setRepeatingRows(CellRangeAddress.valueOf("1:3"));
// Set the the repeating rows and columns on the third sheet. // Set the repeating rows and columns on the third sheet.
CellRangeAddress cra = CellRangeAddress.valueOf("D1:E2"); CellRangeAddress cra = CellRangeAddress.valueOf("D1:E2");
sheet3.setRepeatingColumns(cra); sheet3.setRepeatingColumns(cra);
sheet3.setRepeatingRows(cra); sheet3.setRepeatingRows(cra);

View File

@ -24,6 +24,7 @@ import java.io.IOException;
import org.apache.poi.hssf.usermodel.HSSFSheet; import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.PaneType;
import org.apache.poi.ss.usermodel.Sheet; import org.apache.poi.ss.usermodel.Sheet;
public class SplitAndFreezePanes { public class SplitAndFreezePanes {
@ -41,7 +42,7 @@ public class SplitAndFreezePanes {
// Freeze the columns and rows (forget about scrolling position of the lower right quadrant). // Freeze the columns and rows (forget about scrolling position of the lower right quadrant).
sheet3.createFreezePane(2, 2); sheet3.createFreezePane(2, 2);
// Create a split with the lower left side being the active quadrant // Create a split with the lower left side being the active quadrant
sheet4.createSplitPane(2000, 2000, 0, 0, Sheet.PANE_LOWER_LEFT); sheet4.createSplitPane(2000, 2000, 0, 0, PaneType.LOWER_LEFT);
try (FileOutputStream fileOut = new FileOutputStream("workbook.xls")) { try (FileOutputStream fileOut = new FileOutputStream("workbook.xls")) {
wb.write(fileOut); wb.write(fileOut);

View File

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

View File

@ -116,7 +116,7 @@ import java.util.Locale;
* <p> * <p>
* The following example demonstrates a slightly different way to insert an * The following example demonstrates a slightly different way to insert an
* image into cell A1 and to ensure that it occupies the whole of the cell. This * image into cell A1 and to ensure that it occupies the whole of the cell. This
* is accomplished by specifying the the images bottom right hand corner should be * is accomplished by specifying the images bottom right hand corner should be
* aligned with the bottom right hand corner of the cell. It is also a case * aligned with the bottom right hand corner of the cell. It is also a case
* where the image will not increase in size if the user increases the size of * where the image will not increase in size if the user increases the size of
* the enclosing cell - irrespective of the anchors type - but it will reduce in * the enclosing cell - irrespective of the anchors type - but it will reduce in
@ -135,7 +135,7 @@ import java.util.Locale;
* <p> * <p>
* Note that the final four method calls all pass the same value and seem to * Note that the final four method calls all pass the same value and seem to
* indicate that the images top left hand corner is aligned with the top left * indicate that the images top left hand corner is aligned with the top left
* hand corner of cell A1 and that it's bottom right hand corner is also * hand corner of cell A1 and that its bottom right hand corner is also
* aligned with the top left hand corner of cell A1. Yet, running this code * aligned with the top left hand corner of cell A1. Yet, running this code
* would see the image fully occupying cell A1. That is the result of the * would see the image fully occupying cell A1. That is the result of the
* values passed to parameters three and four; these I have referred to as * values passed to parameters three and four; these I have referred to as
@ -182,7 +182,7 @@ import java.util.Locale;
* *
* @version 1.00 5th August 2009. * @version 1.00 5th August 2009.
* 2.00 26th February 2010. * 2.00 26th February 2010.
* Ported to make use of the the SS usermodel classes. * Ported to make use of the SS usermodel classes.
* Ability to reuse the Drawing Patriarch so that multiple images * Ability to reuse the Drawing Patriarch so that multiple images
* can be inserted without unintentionally erasing earlier images. * can be inserted without unintentionally erasing earlier images.
* Check on image type added; i.e. jpg, jpeg or png. * Check on image type added; i.e. jpg, jpeg or png.
@ -406,7 +406,7 @@ public class AddDimensionedImage {
* the image, adjusts the columns width if necessary and creates then * the image, adjusts the columns width if necessary and creates then
* returns a ClientAnchorDetail object that facilitates construction of * returns a ClientAnchorDetail object that facilitates construction of
* an ClientAnchor that will fix the image on the sheet and establish * an ClientAnchor that will fix the image on the sheet and establish
* it's size. * its size.
* *
* @param sheet A reference to the sheet that will 'contain' the image. * @param sheet A reference to the sheet that will 'contain' the image.
* @param colNumber A primitive int that contains the index number of a * @param colNumber A primitive int that contains the index number of a
@ -483,7 +483,7 @@ public class AddDimensionedImage {
// Mow many co-ordinate positions are there per millimetre? // Mow many co-ordinate positions are there per millimetre?
colCoordinatesPerMM = ConvertImageUnits.TOTAL_COLUMN_COORDINATE_POSITIONS / colCoordinatesPerMM = ConvertImageUnits.TOTAL_COLUMN_COORDINATE_POSITIONS /
colWidthMM; colWidthMM;
// Given the width of the image, what should be it's co-ordinate? // Given the width of the image, what should be its co-ordinate?
pictureWidthCoordinates = (int) (reqImageWidthMM * colCoordinatesPerMM); pictureWidthCoordinates = (int) (reqImageWidthMM * colCoordinatesPerMM);
} else { } else {
pictureWidthCoordinates = (int) reqImageWidthMM * pictureWidthCoordinates = (int) reqImageWidthMM *
@ -500,7 +500,7 @@ public class AddDimensionedImage {
* the image, adjusts the rows height if necessary and creates then * the image, adjusts the rows height if necessary and creates then
* returns a ClientAnchorDetail object that facilitates construction of * returns a ClientAnchorDetail object that facilitates construction of
* a ClientAnchor that will fix the image on the sheet and establish * a ClientAnchor that will fix the image on the sheet and establish
* it's size. * its size.
* *
* @param sheet A reference to the sheet that will 'contain' the image. * @param sheet A reference to the sheet that will 'contain' the image.
* @param rowNumber A primitive int that contains the index number of a * @param rowNumber A primitive int that contains the index number of a
@ -528,7 +528,7 @@ public class AddDimensionedImage {
int pictureHeightCoordinates; int pictureHeightCoordinates;
ClientAnchorDetail rowClientAnchorDetail = null; ClientAnchorDetail rowClientAnchorDetail = null;
// Get the row and it's height // Get the row and its height
row = sheet.getRow(rowNumber); row = sheet.getRow(rowNumber);
if (row == null) { if (row == null) {
// Create row if it does not exist. // Create row if it does not exist.
@ -624,7 +624,7 @@ public class AddDimensionedImage {
colWidthMM = ConvertImageUnits.widthUnits2Millimetres( colWidthMM = ConvertImageUnits.widthUnits2Millimetres(
(short) (sheet.getColumnWidth(toColumn))); (short) (sheet.getColumnWidth(toColumn)));
// Note use of the cell border width constant. Testing with an image // Note use of the cell border width constant. Testing with an image
// declared to fit exactly into one column demonstrated that it's // declared to fit exactly into one column demonstrated that its
// width was greater than the width of the column the POI returned. // width was greater than the width of the column the POI returned.
// Further, this difference was a constant value that I am assuming // Further, this difference was a constant value that I am assuming
// related to the cell's borders. Either way, that difference needs // related to the cell's borders. Either way, that difference needs
@ -632,7 +632,7 @@ public class AddDimensionedImage {
totalWidthMM += (colWidthMM + ConvertImageUnits.CELL_BORDER_WIDTH_MILLIMETRES); totalWidthMM += (colWidthMM + ConvertImageUnits.CELL_BORDER_WIDTH_MILLIMETRES);
toColumn++; toColumn++;
} }
// De-crement by one the last column value. // De-rement by one the last column value.
toColumn--; toColumn--;
// Highly unlikely that this will be true but, if the width of a series // Highly unlikely that this will be true but, if the width of a series
// of columns is exactly equal to the required width of the image, then // of columns is exactly equal to the required width of the image, then
@ -949,10 +949,10 @@ public class AddDimensionedImage {
* pixel units to excel width units(units of 1/256th of a character width) * pixel units to excel width units(units of 1/256th of a character width)
*/ */
public static short pixel2WidthUnits(int pxs) { public static short pixel2WidthUnits(int pxs) {
short widthUnits = (short) (EXCEL_COLUMN_WIDTH_FACTOR * int widthUnits = (EXCEL_COLUMN_WIDTH_FACTOR *
(pxs / UNIT_OFFSET_LENGTH)); (pxs / UNIT_OFFSET_LENGTH));
widthUnits += UNIT_OFFSET_MAP[(pxs % UNIT_OFFSET_LENGTH)]; widthUnits += UNIT_OFFSET_MAP[(pxs % UNIT_OFFSET_LENGTH)];
return widthUnits; return (short) widthUnits;
} }
/** /**

View File

@ -19,8 +19,10 @@
package org.apache.poi.examples.ss; package org.apache.poi.examples.ss;
import java.io.FileOutputStream;
import java.io.IOException; import java.io.IOException;
import java.io.OutputStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.List; import java.util.List;
import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.hssf.usermodel.HSSFWorkbook;
@ -93,7 +95,7 @@ public final class ConditionalFormats {
if (wb instanceof XSSFWorkbook) { if (wb instanceof XSSFWorkbook) {
file += "x"; file += "x";
} }
try (FileOutputStream out = new FileOutputStream(file)) { try (OutputStream out = Files.newOutputStream(Path.of(file))) {
wb.write(out); wb.write(out);
} }
System.out.println("Generated: " + file); System.out.println("Generated: " + file);
@ -201,7 +203,7 @@ public final class ConditionalFormats {
if (rn%10 == 0) { if (rn%10 == 0) {
str = str + "x10 "; str = str + "x10 ";
} }
if (str.length() == 0) { if (str.isEmpty()) {
str = "nothing special..."; str = "nothing special...";
} }
r.createCell(1).setCellValue("It is " + str); r.createCell(1).setCellValue("It is " + str);
@ -285,7 +287,7 @@ public final class ConditionalFormats {
/** /**
* Use Excel conditional formatting to hide the duplicate values, * Use Excel conditional formatting to hide the duplicate values,
* and make the list easier to read. In this example, when the table is sorted by Region, * and make the list easier to read. In this example, when the table is sorted by Region,
* the second (and subsequent) occurences of each region name will have white font colour. * the second (and subsequent) occurrences of each region name will have white font colour.
*/ */
static void hideDupplicates(Sheet sheet) { static void hideDupplicates(Sheet sheet) {
sheet.createRow(0).createCell(0).setCellValue("City"); sheet.createRow(0).createCell(0).setCellValue("City");
@ -309,7 +311,7 @@ public final class ConditionalFormats {
sheetCF.addConditionalFormatting(regions, rule1); sheetCF.addConditionalFormatting(regions, rule1);
sheet.getRow(1).createCell(1).setCellValue("<== the second (and subsequent) " + sheet.getRow(1).createCell(1).setCellValue("<== the second (and subsequent) " +
"occurences of each region name will have white font colour. " + "occurrences of each region name will have white font colour. " +
"Condition: Formula Is =A2=A1 (White Font)"); "Condition: Formula Is =A2=A1 (White Font)");
} }

View File

@ -77,7 +77,7 @@ public class LinkedDropDownLists {
LinkedDropDownLists.buildDataSheet(sheet); LinkedDropDownLists.buildDataSheet(sheet);
// Build the first data validation to occupy cell A1. Note // Build the first data validation to occupy cell A1. Note
// that it retrieves it's data from the named area or region called // that it retrieves its data from the named area or region called
// CHOICES. Further information about this can be found in the // CHOICES. Further information about this can be found in the
// static buildDataSheet() method below. // static buildDataSheet() method below.
CellRangeAddressList addressList = new CellRangeAddressList(0, 0, 0, 0); CellRangeAddressList addressList = new CellRangeAddressList(0, 0, 0, 0);

View File

@ -68,79 +68,96 @@ public final class LoadEmbedded {
for (HSSFObjectData obj : workbook.getAllEmbeddedObjects()) { for (HSSFObjectData obj : workbook.getAllEmbeddedObjects()) {
//the OLE2 Class Name of the object //the OLE2 Class Name of the object
String oleName = obj.getOLE2ClassName(); String oleName = obj.getOLE2ClassName();
if (oleName.equals("Worksheet")) { switch (oleName) {
DirectoryNode dn = (DirectoryNode) obj.getDirectory(); case "Worksheet": {
HSSFWorkbook embeddedWorkbook = new HSSFWorkbook(dn, false);
embeddedWorkbook.close();
} else if (oleName.equals("Document")) {
DirectoryNode dn = (DirectoryNode) obj.getDirectory();
HWPFDocument embeddedWordDocument = new HWPFDocument(dn);
embeddedWordDocument.close();
} else if (oleName.equals("Presentation")) {
DirectoryNode dn = (DirectoryNode) obj.getDirectory();
SlideShow<?,?> embeddedSlieShow = new HSLFSlideShow(dn);
embeddedSlieShow.close();
} else {
if(obj.hasDirectoryEntry()){
// The DirectoryEntry is a DocumentNode. Examine its entries to find out what it is
DirectoryNode dn = (DirectoryNode) obj.getDirectory(); DirectoryNode dn = (DirectoryNode) obj.getDirectory();
for (Entry entry : dn) { HSSFWorkbook embeddedWorkbook = new HSSFWorkbook(dn, false);
//System.out.println(oleName + "." + entry.getName()); embeddedWorkbook.close();
} break;
} else {
// There is no DirectoryEntry
// Recover the object's data from the HSSFObjectData instance.
byte[] objectData = obj.getObjectData();
} }
case "Document": {
DirectoryNode dn = (DirectoryNode) obj.getDirectory();
HWPFDocument embeddedWordDocument = new HWPFDocument(dn);
embeddedWordDocument.close();
break;
}
case "Presentation": {
DirectoryNode dn = (DirectoryNode) obj.getDirectory();
SlideShow<?, ?> embeddedSlieShow = new HSLFSlideShow(dn);
embeddedSlieShow.close();
break;
}
default:
if (obj.hasDirectoryEntry()) {
// The DirectoryEntry is a DocumentNode. Examine its entries to find out what it is
DirectoryNode dn = (DirectoryNode) obj.getDirectory();
for (Entry entry : dn) {
//System.out.println(oleName + "." + entry.getName());
}
} else {
// There is no DirectoryEntry
// Recover the object's data from the HSSFObjectData instance.
byte[] objectData = obj.getObjectData();
}
break;
} }
} }
} }
public static void loadEmbedded(XSSFWorkbook workbook) throws IOException, InvalidFormatException, OpenXML4JException, XmlException { public static void loadEmbedded(XSSFWorkbook workbook) throws IOException, InvalidFormatException,
OpenXML4JException, XmlException {
for (PackagePart pPart : workbook.getAllEmbeddedParts()) { for (PackagePart pPart : workbook.getAllEmbeddedParts()) {
String contentType = pPart.getContentType(); String contentType = pPart.getContentType();
if (contentType.equals("application/vnd.ms-excel")) { switch (contentType) {
// Excel Workbook - either binary or OpenXML case "application/vnd.ms-excel":
try (InputStream stream = pPart.getInputStream()) { // Excel Workbook - either binary or OpenXML
HSSFWorkbook embeddedWorkbook = new HSSFWorkbook(stream); try (InputStream stream = pPart.getInputStream()) {
embeddedWorkbook.close(); HSSFWorkbook embeddedWorkbook = new HSSFWorkbook(stream);
} embeddedWorkbook.close();
} else if (contentType.equals("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")) { }
// Excel Workbook - OpenXML file format break;
try (InputStream stream = pPart.getInputStream()) { case "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":
XSSFWorkbook embeddedWorkbook = new XSSFWorkbook(stream); // Excel Workbook - OpenXML file format
embeddedWorkbook.close(); try (InputStream stream = pPart.getInputStream()) {
} XSSFWorkbook embeddedWorkbook = new XSSFWorkbook(stream);
} else if (contentType.equals("application/msword")) { embeddedWorkbook.close();
// Word Document - binary (OLE2CDF) file format }
try (InputStream stream = pPart.getInputStream()) { break;
HWPFDocument document = new HWPFDocument(stream); case "application/msword":
document.close(); // Word Document - binary (OLE2CDF) file format
} try (InputStream stream = pPart.getInputStream()) {
} else if (contentType.equals("application/vnd.openxmlformats-officedocument.wordprocessingml.document")) { HWPFDocument document = new HWPFDocument(stream);
// Word Document - OpenXML file format document.close();
try (InputStream stream = pPart.getInputStream()) { }
XWPFDocument document = new XWPFDocument(stream); break;
document.close(); case "application/vnd.openxmlformats-officedocument.wordprocessingml.document":
} // Word Document - OpenXML file format
} else if (contentType.equals("application/vnd.ms-powerpoint")) { try (InputStream stream = pPart.getInputStream()) {
// PowerPoint Document - binary file format XWPFDocument document = new XWPFDocument(stream);
try (InputStream stream = pPart.getInputStream()) { document.close();
HSLFSlideShow slideShow = new HSLFSlideShow(stream); }
slideShow.close(); break;
} case "application/vnd.ms-powerpoint":
} else if (contentType.equals("application/vnd.openxmlformats-officedocument.presentationml.presentation")) { // PowerPoint Document - binary file format
// PowerPoint Document - OpenXML file format try (InputStream stream = pPart.getInputStream()) {
try (InputStream stream = pPart.getInputStream()) { HSLFSlideShow slideShow = new HSLFSlideShow(stream);
XMLSlideShow slideShow = new XMLSlideShow(stream); slideShow.close();
slideShow.close(); }
} break;
} else { case "application/vnd.openxmlformats-officedocument.presentationml.presentation":
// Any other type of embedded object. // PowerPoint Document - OpenXML file format
System.out.println("Unknown Embedded Document: " + contentType); try (InputStream stream = pPart.getInputStream()) {
try (InputStream inputStream = pPart.getInputStream()) { XMLSlideShow slideShow = new XMLSlideShow(stream);
slideShow.close();
}
break;
default:
// Any other type of embedded object.
System.out.println("Unknown Embedded Document: " + contentType);
try (InputStream inputStream = pPart.getInputStream()) {
} }
break;
} }
} }
} }

View File

@ -70,21 +70,25 @@ public final class SSPerformanceTest {
if(warmup) { if(warmup) {
System.out.println("Performing a warmup run first"); System.out.println("Performing a warmup run first");
runWithArgs(type, rows, cols, saveFile); runWithArgs(type, rows, cols, saveFile, System.currentTimeMillis());
} }
System.out.println("Performing test-run");
long timeStarted = System.currentTimeMillis(); long timeStarted = System.currentTimeMillis();
runWithArgs(type, rows, cols, saveFile); runWithArgs(type, rows, cols, saveFile, timeStarted);
long timeFinished = System.currentTimeMillis(); long timeFinished = System.currentTimeMillis();
System.out.printf(Locale.ROOT, "Elapsed %.2f seconds for arguments %s%n", ((double)timeFinished - timeStarted) / 1000, Arrays.toString(args)); System.out.printf(Locale.ROOT, "Elapsed %.2f seconds for arguments %s%n", ((double)timeFinished - timeStarted) / 1000, Arrays.toString(args));
} }
private static void runWithArgs(String type, int rows, int cols, boolean saveFile) throws IOException { private static void runWithArgs(String type, int rows, int cols, boolean saveFile, long timeStarted) throws IOException {
try (Workbook workBook = createWorkbook(type)) { try (Workbook workBook = createWorkbook(type)) {
boolean isHType = workBook instanceof HSSFWorkbook; boolean isHType = workBook instanceof HSSFWorkbook;
addContent(workBook, isHType, rows, cols); addContent(workBook, isHType, rows, cols);
long timeFinished = System.currentTimeMillis();
System.out.printf(Locale.ROOT, "Elapsed %.2f seconds before save%n", ((double)timeFinished - timeStarted) / 1000);
if (saveFile) { if (saveFile) {
String fileName = type + "_" + rows + "_" + cols + "." + getFileSuffix(type); String fileName = type + "_" + rows + "_" + cols + "." + getFileSuffix(type);
saveFile(workBook, fileName); saveFile(workBook, fileName);

View File

@ -28,8 +28,8 @@ import java.nio.charset.StandardCharsets;
import java.nio.file.Files; import java.nio.file.Files;
import java.util.ArrayList; import java.util.ArrayList;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; 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.Cell;
import org.apache.poi.ss.usermodel.CellType; import org.apache.poi.ss.usermodel.CellType;
import org.apache.poi.ss.usermodel.DataFormatter; 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"}) @SuppressWarnings({"java:S106","java:S4823","java:S1192"})
public class ToCSV { 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 Workbook workbook;
private ArrayList<ArrayList<String>> csvData; private ArrayList<ArrayList<String>> csvData;
@ -327,7 +327,7 @@ public class ToCSV {
} }
// Step through each of the files in the source folder and for each // Step through each of the files in the source folder and for each
// open the workbook, convert it's contents to CSV format and then // open the workbook, convert its contents to CSV format and then
// save the resulting file away into the folder specified by the // save the resulting file away into the folder specified by the
// contents of the destination variable. Note that the name of the // contents of the destination variable. Note that the name of the
// csv file will be created by taking the name of the Excel file, // csv file will be created by taking the name of the Excel file,
@ -342,7 +342,7 @@ public class ToCSV {
// Open the workbook // Open the workbook
this.openWorkbook(excelFile); this.openWorkbook(excelFile);
// Convert it's contents into a CSV file // Convert its contents into a CSV file
this.convertToCSV(); this.convertToCSV();
// Build the name of the csv folder from that of the Excel workbook. // Build the name of the csv folder from that of the Excel workbook.
@ -451,7 +451,7 @@ public class ToCSV {
// from this 'row' ArrayList one at a time and to write the Strings // from this 'row' ArrayList one at a time and to write the Strings
// away to a StringBuilder thus assembling a single line for inclusion // away to a StringBuilder thus assembling a single line for inclusion
// in the CSV file. If a row was empty or if it was short, then // in the CSV file. If a row was empty or if it was short, then
// the ArrayList that contains it's data will also be shorter than // the ArrayList that contains its data will also be shorter than
// some of the others. Therefore, it is necessary to check within // some of the others. Therefore, it is necessary to check within
// the for loop to ensure that the ArrayList contains data to be // the for loop to ensure that the ArrayList contains data to be
// processed. If it does, then an element will be recovered and // processed. If it does, then an element will be recovered and
@ -689,7 +689,7 @@ public class ToCSV {
// It is not wise to have such a wide catch clause - Exception is very // It is not wise to have such a wide catch clause - Exception is very
// close to being at the top of the inheritance hierarchy - though it // close to being at the top of the inheritance hierarchy - though it
// will suffice for this example as it is really not possible to recover // will suffice for this example as it is really not possible to recover
// easilly from an exceptional set of circumstances at this point in the // easily from an exceptional set of circumstances at this point in the
// program. It should however, ideally be replaced with one or more // program. It should however, ideally be replaced with one or more
// catch clauses optimised to handle more specific problems. // catch clauses optimised to handle more specific problems.
catch(Exception ex) { catch(Exception ex) {

View File

@ -25,9 +25,7 @@ import java.util.HashMap;
import java.util.Locale; import java.util.Locale;
import java.util.Map; import java.util.Map;
import org.apache.poi.ss.formula.OperationEvaluationContext;
import org.apache.poi.ss.formula.eval.ErrorEval; import org.apache.poi.ss.formula.eval.ErrorEval;
import org.apache.poi.ss.formula.eval.ValueEval;
import org.apache.poi.ss.formula.functions.FreeRefFunction; import org.apache.poi.ss.formula.functions.FreeRefFunction;
import org.apache.poi.ss.formula.udf.UDFFinder; import org.apache.poi.ss.formula.udf.UDFFinder;
import org.apache.poi.ss.usermodel.Row; import org.apache.poi.ss.usermodel.Row;
@ -53,12 +51,7 @@ public class SettingExternalFunction {
// dummy function that returns NA // dummy function that returns NA
// don't care about the implementation, we are not interested in evaluation // don't care about the implementation, we are not interested in evaluation
// and this method will never be called // and this method will never be called
FreeRefFunction NA = new FreeRefFunction() { FreeRefFunction NA = (args, ec) -> ErrorEval.NA;
@Override
public ValueEval evaluate(ValueEval[] args, OperationEvaluationContext ec) {
return ErrorEval.NA;
}
};
_functionsByName = new HashMap<>(); _functionsByName = new HashMap<>();
_functionsByName.put("BDP", NA); _functionsByName.put("BDP", NA);
_functionsByName.put("BDH", NA); _functionsByName.put("BDH", NA);

View File

@ -190,7 +190,7 @@ public final class ToHtml {
return; return;
} }
try (PrintWriter pw = new PrintWriter(args[1], "UTF-8")) { try (PrintWriter pw = new PrintWriter(args[1], StandardCharsets.UTF_8.name())) {
ToHtml toHtml = create(args[0], pw); ToHtml toHtml = create(args[0], pw);
toHtml.setCompleteHTML(true); toHtml.setCompleteHTML(true);
toHtml.printPage(); toHtml.printPage();
@ -320,7 +320,7 @@ public final class ToHtml {
private String styleName(CellStyle style) { private String styleName(CellStyle style) {
if (style == null) { if (style == null) {
style = wb.getCellStyleAt((short) 0); style = wb.getCellStyleAt(0);
} }
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
try (Formatter fmt = new Formatter(sb, Locale.ROOT)) { try (Formatter fmt = new Formatter(sb, Locale.ROOT)) {

View File

@ -19,18 +19,19 @@
package org.apache.poi.examples.util; package org.apache.poi.examples.util;
import java.io.File; import org.apache.poi.util.DefaultTempFileCreationStrategy;
import org.apache.poi.util.TempFile; import org.apache.poi.util.TempFile;
import java.io.File;
import java.nio.file.Path;
public final class TempFileUtils { public final class TempFileUtils {
private TempFileUtils() { private TempFileUtils() {
} }
@SuppressWarnings("java:S106") @SuppressWarnings("java:S106")
public static void checkTempFiles() { public static void checkTempFiles() {
String tmpDir = System.getProperty(TempFile.JAVA_IO_TMPDIR) + "/poifiles"; File tempDir = Path.of(System.getProperty(TempFile.JAVA_IO_TMPDIR), DefaultTempFileCreationStrategy.POIFILES).toFile();
File tempDir = new File(tmpDir);
if(tempDir.exists()) { if(tempDir.exists()) {
String[] tempFiles = tempDir.list(); String[] tempFiles = tempDir.list();
if(tempFiles != null && tempFiles.length > 0) { if(tempFiles != null && tempFiles.length > 0) {

View File

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

View File

@ -26,7 +26,7 @@ import java.io.FileOutputStream;
import java.io.OutputStream; import java.io.OutputStream;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.nio.file.Files; import java.nio.file.Files;
import java.nio.file.Paths; import java.nio.file.Path;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -72,7 +72,7 @@ public final class ChartFromScratch {
return; 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 chartTitle = modelReader.readLine(); // first line is chart title
String seriesText = modelReader.readLine(); String seriesText = modelReader.readLine();
@ -180,6 +180,10 @@ public final class ChartFromScratch {
chart.setTitleText(chartTitle); chart.setTitleText(chartTitle);
chart.setTitleOverlay(false); chart.setTitleOverlay(false);
chart.setAutoTitleDeleted(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; private static final int COLUMN_LANGUAGES = 0;

View File

@ -21,19 +21,13 @@ package org.apache.poi.examples.xslf;
import org.apache.poi.ss.util.CellRangeAddress; import org.apache.poi.ss.util.CellRangeAddress;
import org.apache.poi.util.Units; import org.apache.poi.util.Units;
import org.apache.poi.xddf.usermodel.chart.AxisCrossBetween;
import org.apache.poi.xddf.usermodel.chart.AxisCrosses;
import org.apache.poi.xddf.usermodel.chart.AxisPosition;
import org.apache.poi.xddf.usermodel.chart.AxisTickMark;
import org.apache.poi.xddf.usermodel.chart.ChartTypes; import org.apache.poi.xddf.usermodel.chart.ChartTypes;
import org.apache.poi.xddf.usermodel.chart.LegendPosition; import org.apache.poi.xddf.usermodel.chart.LegendPosition;
import org.apache.poi.xddf.usermodel.chart.XDDFChartAxis;
import org.apache.poi.xddf.usermodel.chart.XDDFChartLegend; import org.apache.poi.xddf.usermodel.chart.XDDFChartLegend;
import org.apache.poi.xddf.usermodel.chart.XDDFDataSource; import org.apache.poi.xddf.usermodel.chart.XDDFDataSource;
import org.apache.poi.xddf.usermodel.chart.XDDFDataSourcesFactory; import org.apache.poi.xddf.usermodel.chart.XDDFDataSourcesFactory;
import org.apache.poi.xddf.usermodel.chart.XDDFDoughnutChartData; import org.apache.poi.xddf.usermodel.chart.XDDFDoughnutChartData;
import org.apache.poi.xddf.usermodel.chart.XDDFNumericalDataSource; import org.apache.poi.xddf.usermodel.chart.XDDFNumericalDataSource;
import org.apache.poi.xddf.usermodel.chart.XDDFValueAxis;
import org.apache.poi.xslf.usermodel.XMLSlideShow; import org.apache.poi.xslf.usermodel.XMLSlideShow;
import org.apache.poi.xslf.usermodel.XSLFChart; import org.apache.poi.xslf.usermodel.XSLFChart;
import org.apache.poi.xslf.usermodel.XSLFGraphicFrame; import org.apache.poi.xslf.usermodel.XSLFGraphicFrame;
@ -47,7 +41,7 @@ import java.io.FileOutputStream;
import java.io.OutputStream; import java.io.OutputStream;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.nio.file.Files; import java.nio.file.Files;
import java.nio.file.Paths; import java.nio.file.Path;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -70,7 +64,7 @@ public final class DoughnutChartFromScratch {
return; 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 chartTitle = modelReader.readLine(); // first line is chart title
String seriesText = modelReader.readLine(); String seriesText = modelReader.readLine();

View File

@ -84,14 +84,11 @@ public final class LinkVideoToPptx {
ext.setUri("{DAA4B4D4-6D71-4841-9C94-3DE7FCFB9230}"); ext.setUri("{DAA4B4D4-6D71-4841-9C94-3DE7FCFB9230}");
String p14Ns = "http://schemas.microsoft.com/office/powerpoint/2010/main"; String p14Ns = "http://schemas.microsoft.com/office/powerpoint/2010/main";
XmlCursor cur = ext.newCursor(); try (XmlCursor cur = ext.newCursor()) {
try {
cur.toEndToken(); cur.toEndToken();
cur.beginElement(new QName(p14Ns, "media", "p14")); cur.beginElement(new QName(p14Ns, "media", "p14"));
cur.insertNamespace("p14", p14Ns); cur.insertNamespace("p14", p14Ns);
cur.insertAttributeWithValue(new QName(CORE_PROPERTIES_ECMA376_NS, "link"), prsEmbed1.getId()); cur.insertAttributeWithValue(new QName(CORE_PROPERTIES_ECMA376_NS, "link"), prsEmbed1.getId());
} finally {
cur.dispose();
} }
CTSlide xslide = slide1.getXmlObject(); CTSlide xslide = slide1.getXmlObject();

View File

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

View File

@ -0,0 +1,137 @@
/* ====================================================================
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.xslf;
import org.apache.poi.ooxml.POIXMLDocumentPart;
import org.apache.poi.util.LocaleUtil;
import org.apache.poi.xslf.usermodel.*;
import org.openxmlformats.schemas.drawingml.x2006.main.CTBlip;
import org.openxmlformats.schemas.drawingml.x2006.main.CTBlipFillProperties;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.List;
/**
* Converts SmartArt to openxml shapes and saves the result to the specified output path.
*/
public class SmartArtConversionDemo {
private final XMLSlideShow inputPptx;
private final XMLSlideShow outputPptx;
SmartArtConversionDemo(XMLSlideShow inputPptx, XMLSlideShow outputPptx) {
this.inputPptx = inputPptx;
this.outputPptx = outputPptx;
}
public static void main(String[] args) throws IOException {
if (args.length != 2) {
System.out.println("Expected arguments: <inputPath> <outputPath>");
System.exit(1);
}
File inputFile = new File(args[0]);
if (!inputFile.exists()) {
System.out.printf(LocaleUtil.getUserLocale(), "Unable to find input file at path: %s", args[0]);
System.exit(1);
}
try (
FileInputStream inputPptxStream = new FileInputStream(inputFile);
FileOutputStream outputPptxStream = new FileOutputStream(args[1])
) {
XMLSlideShow inputPptx = new XMLSlideShow(inputPptxStream);
XMLSlideShow outputPptx = new XMLSlideShow();
SmartArtConversionDemo demo = new SmartArtConversionDemo(inputPptx, outputPptx);
demo.convertSmartArt();
outputPptx.write(outputPptxStream);
}
}
private static void copyAndUpdateImageRelations(XSLFDiagram diagram, XSLFSlide outputSlide) throws IOException {
XSLFGroupShape inputGroupShape = diagram.getGroupShape();
for (XSLFShape shape : inputGroupShape.getShapes()) {
org.openxmlformats.schemas.presentationml.x2006.main.CTShape ctShape
= (org.openxmlformats.schemas.presentationml.x2006.main.CTShape) shape.getXmlObject();
if (ctShape.getSpPr().getBlipFill() == null) {
continue;
}
CTBlipFillProperties blipFillProps = ctShape.getSpPr().getBlipFill();
CTBlip blip = blipFillProps.getBlip();
// Relationships for SmartArt diagrams are stored in `drawing#.xml.rels`, not `slide#.xml.rels`.
POIXMLDocumentPart inputPicturePart = diagram.getDiagramDrawing().getRelationById(blip.getEmbed());
if (inputPicturePart == null || inputPicturePart.getPackagePart() == null) {
continue;
}
XSLFPictureData inputPictureData = new XSLFPictureData(inputPicturePart.getPackagePart());
// Copy the input image to the output slides and update the shape to reference the copied image
XMLSlideShow outputPptx = outputSlide.getSlideShow();
XSLFPictureData outputPictureData = outputPptx.addPicture(
inputPicturePart.getPackagePart().getInputStream(), inputPictureData.getType());
POIXMLDocumentPart.RelationPart outputRelation = outputSlide.addRelation(null, XSLFRelation.IMAGES, outputPictureData);
ctShape.getSpPr().getBlipFill().getBlip().setEmbed(outputRelation.getRelationship().getId());
}
}
private static XSLFTheme extractTheme(XMLSlideShow slideShow) {
if (!slideShow.getSlideMasters().isEmpty()) {
return slideShow.getSlideMasters().get(0).getTheme();
}
return null;
}
private void convertSmartArt() throws IOException {
// Copy page size and theme
outputPptx.setPageSize(inputPptx.getPageSize());
XSLFTheme theme = extractTheme(inputPptx);
if (theme != null) {
outputPptx.getSlideMasters().get(0).getTheme().getXmlObject().set(theme.getXmlObject());
}
for (XSLFSlide inputSlide : inputPptx.getSlides()) {
XSLFSlide outputSlide = outputPptx.createSlide();
List<XSLFShape> inputShapes = inputSlide.getShapes();
for (XSLFShape shape : inputShapes) {
if (shape instanceof XSLFDiagram) {
copyDiagramToOutput((XSLFDiagram) shape, outputSlide);
} else {
XSLFAutoShape autoShape = outputSlide.createAutoShape();
// Hacky hack. Reassign xml to copy the content over.
autoShape.getXmlObject().set(shape.getXmlObject());
}
}
}
}
private void copyDiagramToOutput(XSLFDiagram inputDiagram, XSLFSlide outputSlide) throws IOException {
// This method modifies the underlying xml of the input shapes. We modify the xml structure first, then
// assign that to our output shape.
copyAndUpdateImageRelations(inputDiagram, outputSlide);
XSLFGroupShape inputGroupShape = inputDiagram.getGroupShape();
XSLFGroupShape outputGroupShape = outputSlide.createGroup();
outputGroupShape.getXmlObject().set(inputGroupShape.getXmlObject());
}
}

View File

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

View File

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

View File

@ -25,6 +25,7 @@ import javax.xml.parsers.ParserConfigurationException;
import org.apache.poi.openxml4j.opc.OPCPackage; import org.apache.poi.openxml4j.opc.OPCPackage;
import org.apache.poi.openxml4j.opc.PackageAccess; import org.apache.poi.openxml4j.opc.PackageAccess;
import org.apache.poi.util.StringUtil;
import org.apache.poi.util.XMLHelper; import org.apache.poi.util.XMLHelper;
import org.apache.poi.xssf.eventusermodel.XSSFReader; import org.apache.poi.xssf.eventusermodel.XSSFReader;
import org.apache.poi.xssf.model.SharedStrings; import org.apache.poi.xssf.model.SharedStrings;
@ -132,10 +133,10 @@ public class FromHowTo {
throws SAXException { throws SAXException {
// Process the last contents as required. // Process the last contents as required.
// Do now, as characters() may be called more than once // Do now, as characters() may be called more than once
if(nextIsString && !lastContents.trim().isEmpty()) { if(nextIsString && StringUtil.isNotBlank(lastContents)) {
Integer idx = Integer.valueOf(lastContents); Integer idx = Integer.valueOf(lastContents);
lastContents = lruCache.get(idx); lastContents = lruCache.get(idx);
if (lastContents == null && !lruCache.containsKey(idx)) { if (lastContents == null && !lruCache.containsKey(idx) && sst != null) {
lastContents = sst.getItemAt(idx).getString(); lastContents = sst.getItemAt(idx).getString();
lruCache.put(idx, lastContents); lruCache.put(idx, lastContents);
} }

View File

@ -20,12 +20,12 @@
package org.apache.poi.examples.xssf.eventusermodel; package org.apache.poi.examples.xssf.eventusermodel;
import java.io.InputStream; import java.io.InputStream;
import java.util.Iterator;
import org.apache.poi.examples.xssf.usermodel.LoadPasswordProtectedXlsx; import org.apache.poi.examples.xssf.usermodel.LoadPasswordProtectedXlsx;
import org.apache.poi.openxml4j.opc.OPCPackage; import org.apache.poi.openxml4j.opc.OPCPackage;
import org.apache.poi.poifs.crypt.temp.AesZipFileZipEntrySource; import org.apache.poi.poifs.crypt.temp.AesZipFileZipEntrySource;
import org.apache.poi.xssf.eventusermodel.XSSFReader; 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. * 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); try (AesZipFileZipEntrySource source = AesZipFileZipEntrySource.createZipEntrySource(inputStream);
OPCPackage pkg = OPCPackage.open(source)) { OPCPackage pkg = OPCPackage.open(source)) {
XSSFReader reader = new XSSFReader(pkg); XSSFReader reader = new XSSFReader(pkg);
SheetIterator iter = (SheetIterator)reader.getSheetsData(); Iterator<InputStream> iter = reader.getSheetsData();
int count = 0; int count = 0;
while(iter.hasNext()) { while(iter.hasNext()) {
iter.next(); try (InputStream stream = iter.next()) {
count++; count++;
}
} }
System.out.println("sheet count: " + count); System.out.println("sheet count: " + count);
} }

View File

@ -212,7 +212,7 @@ public class XLSX2CSV {
styles, null, strings, sheetHandler, formatter, false); styles, null, strings, sheetHandler, formatter, false);
sheetParser.setContentHandler(handler); sheetParser.setContentHandler(handler);
sheetParser.parse(sheetSource); sheetParser.parse(sheetSource);
} catch(ParserConfigurationException e) { } catch (ParserConfigurationException e) {
throw new RuntimeException("SAX parser appears to be broken - " + e.getMessage()); throw new RuntimeException("SAX parser appears to be broken - " + e.getMessage());
} }
} }
@ -234,7 +234,12 @@ public class XLSX2CSV {
String sheetName = iter.getSheetName(); String sheetName = iter.getSheetName();
this.output.println(); this.output.println();
this.output.println(sheetName + " [index=" + index + "]:"); 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; ++index;
} }

View File

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

View File

@ -46,10 +46,11 @@ public class Outlining {
try (FileOutputStream fileOut = new FileOutputStream("outlining_collapsed.xlsx")) { try (FileOutputStream fileOut = new FileOutputStream("outlining_collapsed.xlsx")) {
wb2.write(fileOut); 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(); TempFileUtils.checkTempFiles();
String filename = args[0]; String filename = args[0];
String password = args[1]; String password = args[1];
SXSSFWorkbookWithCustomZipEntrySource wb = new SXSSFWorkbookWithCustomZipEntrySource(); try (SXSSFWorkbookWithCustomZipEntrySource wb = new SXSSFWorkbookWithCustomZipEntrySource()) {
try {
for(int i = 0; i < 10; i++) { for(int i = 0; i < 10; i++) {
SXSSFSheet sheet = wb.createSheet("Sheet" + i); SXSSFSheet sheet = wb.createSheet("Sheet" + i);
for(int r = 0; r < 1000; r++) { for(int r = 0; r < 1000; r++) {
@ -78,10 +77,6 @@ public final class SavePasswordProtectedXlsx {
} finally { } finally {
tempData.dispose(); tempData.dispose();
} }
} finally {
wb.close();
//the dispose call is necessary to ensure temp files are removed
wb.dispose();
} }
TempFileUtils.checkTempFiles(); TempFileUtils.checkTempFiles();
} }

View File

@ -104,6 +104,10 @@ public final class BarChart {
solidFillSeries(data, 0, PresetColor.CHARTREUSE); solidFillSeries(data, 0, PresetColor.CHARTREUSE);
solidFillSeries(data, 1, PresetColor.TURQUOISE); 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 // Write the output to a file
try (FileOutputStream fileOut = new FileOutputStream("ooxml-bar-chart.xlsx")) { try (FileOutputStream fileOut = new FileOutputStream("ooxml-bar-chart.xlsx")) {
wb.write(fileOut); wb.write(fileOut);

View File

@ -25,6 +25,7 @@ import java.io.InputStream;
import java.io.OutputStream; import java.io.OutputStream;
import java.io.OutputStreamWriter; import java.io.OutputStreamWriter;
import java.io.Writer; import java.io.Writer;
import java.nio.charset.StandardCharsets;
import java.util.Calendar; import java.util.Calendar;
import java.util.Enumeration; import java.util.Enumeration;
import java.util.HashMap; import java.util.HashMap;
@ -34,8 +35,8 @@ import java.util.Random;
import org.apache.commons.compress.archivers.zip.ZipArchiveEntry; import org.apache.commons.compress.archivers.zip.ZipArchiveEntry;
import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream; import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream;
import org.apache.commons.compress.archivers.zip.ZipFile; import org.apache.commons.compress.archivers.zip.ZipFile;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.apache.poi.logging.PoiLogManager;
import org.apache.poi.openxml4j.opc.internal.ZipHelper; import org.apache.poi.openxml4j.opc.internal.ZipHelper;
import org.apache.poi.ss.usermodel.DateUtil; import org.apache.poi.ss.usermodel.DateUtil;
import org.apache.poi.ss.usermodel.FillPatternType; import org.apache.poi.ss.usermodel.FillPatternType;
@ -76,8 +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>. * See <a href="https://poi.apache.org/spreadsheet/how-to.html#sxssf">SXSSF (Streaming Usermodel API)</a>.
*/ */
public final class BigGridDemo { 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 String XML_ENCODING = "UTF-8";
private static final Random rnd = new Random(); private static final Random rnd = new Random();
@ -105,7 +105,7 @@ public final class BigGridDemo {
tmp = TempFile.createTempFile("sheet", ".xml"); tmp = TempFile.createTempFile("sheet", ".xml");
try ( try (
FileOutputStream stream = new FileOutputStream(tmp); FileOutputStream stream = new FileOutputStream(tmp);
Writer fw = new OutputStreamWriter(stream, XML_ENCODING) Writer fw = new OutputStreamWriter(stream, StandardCharsets.UTF_8)
) { ) {
generate(fw, styles); generate(fw, styles);
} }
@ -247,7 +247,7 @@ public final class BigGridDemo {
} }
void beginSheet() throws IOException { void beginSheet() throws IOException {
_out.write("<?xml version=\"1.0\" encoding=\""+XML_ENCODING+"\"?>" + _out.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
"<worksheet xmlns=\"http://schemas.openxmlformats.org/spreadsheetml/2006/main\">" ); "<worksheet xmlns=\"http://schemas.openxmlformats.org/spreadsheetml/2006/main\">" );
_out.write("<sheetData>\n"); _out.write("<sheetData>\n");
} }

View File

@ -38,7 +38,7 @@ public final class CustomXMLMapping {
for (XSSFMap map : wb.getCustomXMLMappings()) { for (XSSFMap map : wb.getCustomXMLMappings()) {
XSSFExportToXml exporter = new XSSFExportToXml(map); XSSFExportToXml exporter = new XSSFExportToXml(map);
UnsynchronizedByteArrayOutputStream os = new UnsynchronizedByteArrayOutputStream(); UnsynchronizedByteArrayOutputStream os = UnsynchronizedByteArrayOutputStream.builder().get();
exporter.exportToXML(os, true); exporter.exportToXML(os, true);
String xml = os.toString(StandardCharsets.UTF_8); String xml = os.toString(StandardCharsets.UTF_8);
System.out.println(xml); System.out.println(xml);

View File

@ -37,27 +37,35 @@ public class EmbeddedObjects {
String contentType = pPart.getContentType(); String contentType = pPart.getContentType();
try (InputStream is = pPart.getInputStream()) { try (InputStream is = pPart.getInputStream()) {
Closeable document; Closeable document;
if (contentType.equals("application/vnd.ms-excel")) { switch (contentType) {
// Excel Workbook - either binary or OpenXML case "application/vnd.ms-excel":
document = new HSSFWorkbook(is); // Excel Workbook - either binary or OpenXML
} else if (contentType.equals("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")) { document = new HSSFWorkbook(is);
// Excel Workbook - OpenXML file format break;
document = new XSSFWorkbook(is); case "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":
} else if (contentType.equals("application/msword")) { // Excel Workbook - OpenXML file format
// Word Document - binary (OLE2CDF) file format document = new XSSFWorkbook(is);
document = new HWPFDocument(is); break;
} else if (contentType.equals("application/vnd.openxmlformats-officedocument.wordprocessingml.document")) { case "application/msword":
// Word Document - OpenXML file format // Word Document - binary (OLE2CDF) file format
document = new XWPFDocument(is); document = new HWPFDocument(is);
} else if (contentType.equals("application/vnd.ms-powerpoint")) { break;
// PowerPoint Document - binary file format case "application/vnd.openxmlformats-officedocument.wordprocessingml.document":
document = new HSLFSlideShow(is); // Word Document - OpenXML file format
} else if (contentType.equals("application/vnd.openxmlformats-officedocument.presentationml.presentation")) { document = new XWPFDocument(is);
// PowerPoint Document - OpenXML file format break;
document = new XMLSlideShow(is); case "application/vnd.ms-powerpoint":
} else { // PowerPoint Document - binary file format
// Any other type of embedded object. document = new HSLFSlideShow(is);
document = is; break;
case "application/vnd.openxmlformats-officedocument.presentationml.presentation":
// PowerPoint Document - OpenXML file format
document = new XMLSlideShow(is);
break;
default:
// Any other type of embedded object.
document = is;
break;
} }
document.close(); document.close();
} }

View File

@ -105,6 +105,10 @@ public final class LineChart {
solidLineSeries(data, 0, PresetColor.CHARTREUSE); solidLineSeries(data, 0, PresetColor.CHARTREUSE);
solidLineSeries(data, 1, PresetColor.TURQUOISE); 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 // Write the output to a file
try (FileOutputStream fileOut = new FileOutputStream("ooxml-line-chart.xlsx")) { try (FileOutputStream fileOut = new FileOutputStream("ooxml-line-chart.xlsx")) {
wb.write(fileOut); wb.write(fileOut);

View File

@ -99,6 +99,10 @@ public final class ScatterChart {
solidLineSeries(data, 0, PresetColor.CHARTREUSE); solidLineSeries(data, 0, PresetColor.CHARTREUSE);
solidLineSeries(data, 1, PresetColor.TURQUOISE); 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 // Write the output to a file
try (FileOutputStream fileOut = new FileOutputStream("ooxml-scatter-chart.xlsx")) { try (FileOutputStream fileOut = new FileOutputStream("ooxml-scatter-chart.xlsx")) {
wb.write(fileOut); wb.write(fileOut);

View File

@ -20,6 +20,7 @@ package org.apache.poi.examples.xssf.usermodel;
import java.io.FileOutputStream; import java.io.FileOutputStream;
import java.io.IOException; import java.io.IOException;
import org.apache.poi.ss.usermodel.PaneType;
import org.apache.poi.ss.usermodel.Sheet; import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook; import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.xssf.usermodel.XSSFWorkbook; import org.apache.poi.xssf.usermodel.XSSFWorkbook;
@ -42,7 +43,7 @@ public class SplitAndFreezePanes {
// Freeze the columns and rows (forget about scrolling position of the lower right quadrant). // Freeze the columns and rows (forget about scrolling position of the lower right quadrant).
sheet3.createFreezePane(2, 2); sheet3.createFreezePane(2, 2);
// Create a split with the lower left side being the active quadrant // Create a split with the lower left side being the active quadrant
sheet4.createSplitPane(2000, 2000, 0, 0, Sheet.PANE_LOWER_LEFT); sheet4.createSplitPane(2000, 2000, 0, 0, PaneType.LOWER_LEFT);
try (FileOutputStream fileOut = new FileOutputStream("splitFreezePane.xlsx")) { try (FileOutputStream fileOut = new FileOutputStream("splitFreezePane.xlsx")) {
wb.write(fileOut); wb.write(fileOut);

View File

@ -65,7 +65,7 @@ public class WorkingWithPageSetup {
// Set the columns to repeat from column 0 to 2 on the first sheet // Set the columns to repeat from column 0 to 2 on the first sheet
sheet1.setRepeatingColumns(CellRangeAddress.valueOf("A:C")); sheet1.setRepeatingColumns(CellRangeAddress.valueOf("A:C"));
// Set the the repeating rows and columns on the second sheet. // Set the repeating rows and columns on the second sheet.
CellRangeAddress cra = CellRangeAddress.valueOf("E2:F3"); CellRangeAddress cra = CellRangeAddress.valueOf("E2:F3");
sheet2.setRepeatingColumns(cra); sheet2.setRepeatingColumns(cra);
sheet2.setRepeatingRows(cra); sheet2.setRepeatingRows(cra);

View File

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

View File

@ -24,7 +24,7 @@ import java.io.FileOutputStream;
import java.io.OutputStream; import java.io.OutputStream;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.nio.file.Files; import java.nio.file.Files;
import java.nio.file.Paths; import java.nio.file.Path;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -67,7 +67,7 @@ public final class ChartFromScratch {
return; 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 chartTitle = modelReader.readLine(); // first line is chart title
String seriesText = modelReader.readLine(); String seriesText = modelReader.readLine();
@ -146,6 +146,10 @@ public final class ChartFromScratch {
chart.setTitleText(chartTitle); chart.setTitleText(chartTitle);
chart.setTitleOverlay(false); chart.setTitleOverlay(false);
chart.setAutoTitleDeleted(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; private static final int COLUMN_LANGUAGES = 0;

View File

@ -22,10 +22,10 @@ import java.io.FileInputStream;
import java.io.FileOutputStream; import java.io.FileOutputStream;
import java.io.IOException; import java.io.IOException;
import org.apache.poi.common.usermodel.PictureType;
import org.apache.poi.openxml4j.exceptions.InvalidFormatException; import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
import org.apache.poi.util.Units; import org.apache.poi.util.Units;
import org.apache.poi.xwpf.usermodel.BreakType; 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.XWPFDocument;
import org.apache.poi.xwpf.usermodel.XWPFParagraph; import org.apache.poi.xwpf.usermodel.XWPFParagraph;
import org.apache.poi.xwpf.usermodel.XWPFRun; import org.apache.poi.xwpf.usermodel.XWPFRun;
@ -45,30 +45,30 @@ public final class SimpleImages {
XWPFRun r = p.createRun(); XWPFRun r = p.createRun();
for (String imgFile : args) { for (String imgFile : args) {
int format; PictureType format;
if (imgFile.endsWith(".emf")) { if (imgFile.endsWith(".emf")) {
format = Document.PICTURE_TYPE_EMF; format = PictureType.EMF;
} else if (imgFile.endsWith(".wmf")) { } else if (imgFile.endsWith(".wmf")) {
format = Document.PICTURE_TYPE_WMF; format = PictureType.WMF;
} else if (imgFile.endsWith(".pict")) { } else if (imgFile.endsWith(".pict")) {
format = Document.PICTURE_TYPE_PICT; format = PictureType.PICT;
} else if (imgFile.endsWith(".jpeg") || imgFile.endsWith(".jpg")) { } else if (imgFile.endsWith(".jpeg") || imgFile.endsWith(".jpg")) {
format = Document.PICTURE_TYPE_JPEG; format = PictureType.JPEG;
} else if (imgFile.endsWith(".png")) { } else if (imgFile.endsWith(".png")) {
format = Document.PICTURE_TYPE_PNG; format = PictureType.PNG;
} else if (imgFile.endsWith(".dib")) { } else if (imgFile.endsWith(".dib")) {
format = Document.PICTURE_TYPE_DIB; format = PictureType.DIB;
} else if (imgFile.endsWith(".gif")) { } else if (imgFile.endsWith(".gif")) {
format = Document.PICTURE_TYPE_GIF; format = PictureType.GIF;
} else if (imgFile.endsWith(".tiff")) { } else if (imgFile.endsWith(".tiff")) {
format = Document.PICTURE_TYPE_TIFF; format = PictureType.TIFF;
} else if (imgFile.endsWith(".eps")) { } else if (imgFile.endsWith(".eps")) {
format = Document.PICTURE_TYPE_EPS; format = PictureType.EPS;
} else if (imgFile.endsWith(".bmp")) { } else if (imgFile.endsWith(".bmp")) {
format = Document.PICTURE_TYPE_BMP; format = PictureType.BMP;
} else if (imgFile.endsWith(".wpg")) { } else if (imgFile.endsWith(".wpg")) {
format = Document.PICTURE_TYPE_WPG; format = PictureType.WPG;
} else { } else {
System.err.println("Unsupported picture: " + imgFile + System.err.println("Unsupported picture: " + imgFile +
". Expected emf|wmf|pict|jpeg|png|dib|gif|tiff|eps|bmp|wpg"); ". 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> * SpreadsheetML workbook embedded into the document.<p>
* *
* This code was successfully tested with the following file from the POI test collection: * 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"}) @SuppressWarnings({"java:S106","java:S4823","java:S1192"})
public class UpdateEmbeddedDoc { public class UpdateEmbeddedDoc {

View File

@ -1,12 +1,12 @@
10 languages with most speakers as first language 10 languages with most speakers as first language
countries,speakers,language countries,speakers,language
58,315,العربية 58,315,العربية
4,243,বাংলা 4,243,বাংলা
38,1299,中文 38,1299,中文
118,378,English 118,378,English
4,260,हिन्दी 4,260,हिन्दी
2,128,日本語 2,128,日本語
15,223,português 15,223,português
6,119,ਪੰਜਾਬੀ 6,119,ਪੰਜਾਬੀ
18,154,Русский язык 18,154,Русский язык
31,442,español 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,31 +18,38 @@
package org.apache.poi.integration; package org.apache.poi.integration;
import static org.junit.jupiter.api.Assertions.assertEquals; 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 static org.junit.jupiter.api.Assertions.assertTrue;
import java.io.IOException;
import java.io.PrintStream; import java.io.PrintStream;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream; import org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream;
import org.apache.poi.examples.xssf.eventusermodel.XLSX2CSV; import org.apache.poi.examples.xssf.eventusermodel.XLSX2CSV;
import org.apache.poi.ooxml.POIXMLException;
import org.apache.poi.openxml4j.opc.OPCPackage; import org.apache.poi.openxml4j.opc.OPCPackage;
import org.apache.poi.openxml4j.opc.PackageAccess; import org.apache.poi.openxml4j.opc.PackageAccess;
import org.apache.poi.xssf.XSSFTestDataSamples; import org.apache.poi.xssf.XSSFTestDataSamples;
import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import net.bytebuddy.utility.RandomString;
public class TestXLSX2CSV { public class TestXLSX2CSV {
private PrintStream err; private PrintStream err;
private final UnsynchronizedByteArrayOutputStream errorBytes = new UnsynchronizedByteArrayOutputStream(); private final UnsynchronizedByteArrayOutputStream errorBytes = UnsynchronizedByteArrayOutputStream.builder().get();
@BeforeEach @BeforeEach
public void setUp() throws UnsupportedEncodingException { public void setUp() throws UnsupportedEncodingException {
// remember and replace default error streams // remember and replace default error streams
err = System.err; err = System.err;
PrintStream error = new PrintStream(errorBytes, true, "UTF-8"); PrintStream error = new PrintStream(errorBytes, true, StandardCharsets.UTF_8.name());
System.setErr(error); System.setErr(error);
} }
@ -71,14 +78,14 @@ public class TestXLSX2CSV {
// returns with some System.err // returns with some System.err
XLSX2CSV.main(new String[] { "not-existing-file.xlsx" }); XLSX2CSV.main(new String[] { "not-existing-file.xlsx" });
String output = errorBytes.toString("UTF-8"); String output = errorBytes.toString(StandardCharsets.UTF_8);
assertTrue(output.contains("Not found or not a file: not-existing-file.xlsx"), "Had: " + output); assertTrue(output.contains("Not found or not a file: not-existing-file.xlsx"), "Had: " + output);
} }
@Test @Test
public void testSampleFile() throws Exception { public void testSampleFile() throws Exception {
final UnsynchronizedByteArrayOutputStream outputBytes = new UnsynchronizedByteArrayOutputStream(); final UnsynchronizedByteArrayOutputStream outputBytes = UnsynchronizedByteArrayOutputStream.builder().get();
PrintStream out = new PrintStream(outputBytes, true, "UTF-8"); PrintStream out = new PrintStream(outputBytes, true, StandardCharsets.UTF_8.name());
// The package open is instantaneous, as it should be. // The package open is instantaneous, as it should be.
try (OPCPackage p = OPCPackage.open(XSSFTestDataSamples.getSampleFile("sample.xlsx").getAbsolutePath(), PackageAccess.READ)) { try (OPCPackage p = OPCPackage.open(XSSFTestDataSamples.getSampleFile("sample.xlsx").getAbsolutePath(), PackageAccess.READ)) {
@ -94,10 +101,29 @@ public class TestXLSX2CSV {
assertTrue(output.contains(",\"hello, xssf\",,\"hello, xssf\""), "Had: " + output); assertTrue(output.contains(",\"hello, xssf\",,\"hello, xssf\""), "Had: " + output);
} }
@Test
public void testInvalidSampleFile() throws Exception {
final UnsynchronizedByteArrayOutputStream outputBytes = UnsynchronizedByteArrayOutputStream.builder().get();
PrintStream out = new PrintStream(outputBytes, true, StandardCharsets.UTF_8.name());
// The package open is instantaneous, as it should be.
try (OPCPackage p = OPCPackage.open(XSSFTestDataSamples.getSampleFile("clusterfuzz-testcase-minimized-XLSX2CSVFuzzer-5025401116950528.xlsx").getAbsolutePath(), PackageAccess.READ)) {
XLSX2CSV xlsx2csv = new XLSX2CSV(p, out, -1);
assertThrows(POIXMLException.class,
xlsx2csv::process);
}
String errorOutput = errorBytes.toString(StandardCharsets.UTF_8);
assertEquals("", errorOutput);
String output = outputBytes.toString(StandardCharsets.UTF_8);
assertEquals("", output, "Had: " + output);
}
@Test @Test
public void testMinColumns() throws Exception { public void testMinColumns() throws Exception {
final UnsynchronizedByteArrayOutputStream outputBytes = new UnsynchronizedByteArrayOutputStream(); final UnsynchronizedByteArrayOutputStream outputBytes = UnsynchronizedByteArrayOutputStream.builder().get();
PrintStream out = new PrintStream(outputBytes, true, "UTF-8"); PrintStream out = new PrintStream(outputBytes, true, StandardCharsets.UTF_8.name());
// The package open is instantaneous, as it should be. // The package open is instantaneous, as it should be.
try (OPCPackage p = OPCPackage.open(XSSFTestDataSamples.getSampleFile("sample.xlsx").getAbsolutePath(), PackageAccess.READ)) { try (OPCPackage p = OPCPackage.open(XSSFTestDataSamples.getSampleFile("sample.xlsx").getAbsolutePath(), PackageAccess.READ)) {
@ -109,7 +135,87 @@ public class TestXLSX2CSV {
assertEquals("", errorOutput); assertEquals("", errorOutput);
String output = outputBytes.toString(StandardCharsets.UTF_8); String output = outputBytes.toString(StandardCharsets.UTF_8);
assertTrue(output.contains("\"Lorem\",111,,,"), "Had: " + output); assertTrue(output.contains("\"Lorem\",111,,,"), "Had: " + output);
assertTrue(output.contains(",\"hello, xssf\",,\"hello, xssf\","), "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

@ -23,19 +23,15 @@ configurations {
sourceSets { sourceSets {
main { main {
if (jdkVersion > 8) { output.dir(JAVA9_OUT, builtBy: 'compileJava9')
output.dir(JAVA9_OUT, builtBy: 'cacheJava9')
}
} }
test { test {
if (jdkVersion > 8) { output.dir(TEST9_OUT, builtBy: 'compileTest9')
output.dir(TEST9_OUT, builtBy: 'cacheTest9')
}
} }
} }
dependencies { dependencies {
api 'org.apache.ant:ant:1.10.12' api 'org.apache.ant:ant:1.10.15'
api project(':poi-ooxml') api project(':poi-ooxml')
compileOnly project(path: ':poi-ooxml', configuration: 'archives') compileOnly project(path: ':poi-ooxml', configuration: 'archives')
@ -45,14 +41,10 @@ dependencies {
testImplementation(project(path: ':poi-ooxml', configuration: 'tests')) { testImplementation(project(path: ':poi-ooxml', configuration: 'tests')) {
exclude group: 'org.apache.poi', module: 'poi-scratchpad' exclude group: 'org.apache.poi', module: 'poi-scratchpad'
} }
testImplementation 'com.google.guava:guava:31.1-jre' testImplementation 'com.google.guava:guava:33.5.0-jre'
testImplementation "org.apache.logging.log4j:log4j-slf4j18-impl:${log4jVersion}" testImplementation "org.apache.logging.log4j:log4j-slf4j2-impl:${log4jVersion}"
testImplementation 'org.slf4j:slf4j-simple:1.7.36' testImplementation 'org.slf4j:slf4j-simple:2.0.17'
testRuntimeOnly "org.apiguardian:apiguardian-api:${apiGuardianVersion}" testRuntimeOnly "org.apiguardian:apiguardian-api:${apiGuardianVersion}"
if (SAXON_TEST) {
testRuntimeOnly "net.sf.saxon:Saxon-HE:${saxonVersion}"
}
} }
final String MODULE_NAME = 'org.apache.poi.excelant' final String MODULE_NAME = 'org.apache.poi.excelant'
@ -62,75 +54,48 @@ final List MAIN_MODULE_PATH = sourceSets.main.runtimeClasspath.findAll{ it.path
final List TEST_MODULE_PATH = configurations.testRuntimeClasspath.findAll{ it.path =~ MODULE_REGEX && !(it.path =~ MODULE_NOT_REGEX) }.collect{ it.parent }.unique() final List TEST_MODULE_PATH = configurations.testRuntimeClasspath.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_AGENT = "../build/dist/maven/poi-ooxml-lite-agent/poi-ooxml-lite-agent-${project.version}.jar"
final String OOXML_LITE_REPORT = '../build/ooxml-lite-report' final String OOXML_LITE_REPORT = '../src/resources/ooxml-lite-report'
final String OOXML_LITE_JAR = "../build/dist/maven/poi-ooxml-lite/poi-ooxml-lite-${project.version}.jar"
final String OOXML_LITE_INCLUDES = "^(com/microsoft/schemas|org/(etsi|openxmlformats|w3/)|org/apache/poi/schemas)" 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' dependsOn 'compileJava', ':poi-ooxml:jar', ':poi-scratchpad:jar'
javaCompiler = javaToolchains.compilerFor { javaCompiler = javaToolchains.compilerFor {
languageVersion = JavaLanguageVersion.of(jdkVersion) languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
if (jdkVendor != '') vendor = JvmVendorSpec.matching(jdkVendor)
} }
sourceCompatibility = 11
targetCompatibility = 11
destinationDirectory = file(JAVA9_OUT + VERSIONS9) destinationDirectory = file(JAVA9_OUT + VERSIONS9)
source = file(JAVA9_SRC) source = file(JAVA9_SRC)
classpath = files() classpath = files()
options.compilerArgs = [ options.compilerArgs = [
'--patch-module', "${MODULE_NAME}=${sourceSets.main.output.classesDirs.asPath}", '--patch-module', "${MODULE_NAME}=${sourceSets.main.output.classesDirs.asPath}",
'--module-path', files(MAIN_MODULE_PATH).asPath '--module-path', files(MAIN_MODULE_PATH).asPath
] ]
onlyIf {
jdkVersion > 8
}
} }
task cacheJava9(type: Copy) { tasks.register('compileTest9', JavaCompile) {
dependsOn 'compileJava9'
from(file(JAVA9_OUT + VERSIONS9))
into(JAVA9_SRC)
}
task compileTest9(type: JavaCompile) {
dependsOn 'compileTestJava', ':poi-ooxml:jar', ':poi-scratchpad:jar' dependsOn 'compileTestJava', ':poi-ooxml:jar', ':poi-scratchpad:jar'
javaCompiler = javaToolchains.compilerFor { javaCompiler = javaToolchains.compilerFor {
languageVersion = JavaLanguageVersion.of(jdkVersion) languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
if (jdkVendor != '') vendor = JvmVendorSpec.matching(jdkVendor)
} }
sourceCompatibility = 11
targetCompatibility = 11
destinationDirectory = file(TEST9_OUT + VERSIONS9) destinationDirectory = file(TEST9_OUT + VERSIONS9)
source = file(TEST9_SRC) source = file(TEST9_SRC)
options.compilerArgs = [ options.compilerArgs = [
'--patch-module', "${MODULE_NAME}=${(sourceSets.main.output.classesDirs + sourceSets.test.output.classesDirs).asPath}", '--patch-module', "${MODULE_NAME}=${(sourceSets.main.output.classesDirs + sourceSets.test.output.classesDirs).asPath}",
'--module-path', files(TEST_MODULE_PATH).asPath '--module-path', files(TEST_MODULE_PATH).asPath
] ]
classpath = files() classpath = files()
onlyIf {
jdkVersion > 8
}
} }
task cacheTest9(type: Copy) {
dependsOn 'compileTest9'
from(file(TEST9_OUT + VERSIONS9))
into(TEST9_SRC)
}
jar { jar {
dependsOn cacheJava9 dependsOn compileJava9
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}") destinationDirectory = file("../build/dist/maven/${base.archivesName.get()}")
if (jdkVersion == 8) {
into('META-INF/versions/9') {
from JAVA9_SRC include '*.class'
}
}
manifest { manifest {
attributes('Automatic-Module-Name': MODULE_NAME, 'Multi-Release': 'true') attributes('Automatic-Module-Name': MODULE_NAME, 'Multi-Release': 'true')
@ -153,18 +118,12 @@ sourcesJar {
// Create a separate jar for test-code to depend on it in other projects // Create a separate jar for test-code to depend on it in other projects
// See http://stackoverflow.com/questions/5144325/gradle-test-dependency // See http://stackoverflow.com/questions/5144325/gradle-test-dependency
task testJar(type: Jar, dependsOn: [ testClasses, cacheTest9 ] ) { task testJar(type: Jar, dependsOn: [ testClasses, compileTest9 ] ) {
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}-tests") destinationDirectory = file("../build/dist/maven/${base.archivesName.get()}-tests")
classifier 'tests' setArchiveClassifier 'tests'
// ignore second module-info.class from main // ignore second module-info.class from main
duplicatesStrategy = 'exclude' duplicatesStrategy = DuplicatesStrategy.EXCLUDE
if (jdkVersion == 8) {
into('META-INF/versions/9') {
from TEST9_SRC include '*.class'
}
}
from sourceSets.test.output + sourceSets.main.output from sourceSets.test.output + sourceSets.main.output
@ -183,13 +142,9 @@ test {
doFirst { doFirst {
jvmArgs += [ jvmArgs += [
"-javaagent:${OOXML_LITE_AGENT}=${OOXML_LITE_REPORT}|${OOXML_LITE_INCLUDES}", "-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,
]
}
} }
} }
@ -203,3 +158,22 @@ publishing {
} }
} }
} }
cyclonedxBom {
// includeConfigs is the list of configuration names to include when generating the BOM (leave empty to include every configuration)
includeConfigs = ["runtimeClasspath"]
// skipConfigs is a list of configuration names to exclude when generating the BOM
//skipConfigs = ["compileClasspath", "testCompileClasspath"]
// Specified the type of project being built. Defaults to 'library'
projectType = "library"
// Specified the version of the CycloneDX specification to use. Defaults to 1.4.
schemaVersion = "1.4"
// Boms destination directory (defaults to build/reports)
destination = file("build/reports")
// The file name for the generated BOMs (before the file format suffix). Defaults to 'bom'
outputName = "poi-excelant-${project.version}.bom"
// The file format generated, can be xml, json or all for generating both
outputFormat = "all"
// Exclude BOM Serial Number
includeBomSerialNumber = true
}

View File

@ -37,7 +37,7 @@ import org.apache.tools.ant.Task;
* <p> * <p>
* In order to use this tag you must write a class that implements the * In order to use this tag you must write a class that implements the
* {@code IExcelAntWorkbookHandler} interface. After writing the * {@code IExcelAntWorkbookHandler} interface. After writing the
* class you should package it and it's dependencies into a jar file to * class you should package it and its dependencies into a jar file to
* add as library in your Ant build file. * add as library in your Ant build file.
*/ */
public class ExcelAntHandlerTask extends Task { public class ExcelAntHandlerTask extends Task {

View File

@ -27,7 +27,7 @@ import java.util.Map;
*/ */
public final class ExcelAntWorkbookUtilFactory { public final class ExcelAntWorkbookUtilFactory {
private static Map<String, ExcelAntWorkbookUtil> workbookUtilMap; private static final Map<String, ExcelAntWorkbookUtil> workbookUtilMap = new HashMap<>();
private ExcelAntWorkbookUtilFactory() { private ExcelAntWorkbookUtilFactory() {
} }
@ -41,16 +41,14 @@ public final class ExcelAntWorkbookUtilFactory {
* a freshly instantiated one if none did exist before. * a freshly instantiated one if none did exist before.
*/ */
public static ExcelAntWorkbookUtil getInstance(String fileName) { public static ExcelAntWorkbookUtil getInstance(String fileName) {
if(workbookUtilMap == null) { synchronized (workbookUtilMap) {
workbookUtilMap = new HashMap<>(); if(workbookUtilMap.containsKey(fileName)) {
} return workbookUtilMap.get(fileName);
}
if(workbookUtilMap.containsKey(fileName)) { ExcelAntWorkbookUtil wbu = new ExcelAntWorkbookUtil(fileName);
return workbookUtilMap.get(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 { module org.apache.poi.excelant {
requires ant; requires ant;
requires transitive org.apache.poi.poi;
requires org.apache.poi.ooxml; requires org.apache.poi.ooxml;
exports org.apache.poi.ss.excelant; exports org.apache.poi.ss.excelant;

View File

@ -28,7 +28,7 @@ import org.junit.platform.launcher.TestIdentifier;
/** /**
* Custom listener class for Ants junitlauncher, because it chomps the important running details * Custom listener class for Ants junitlauncher, because it chomps the important running details
* *
* @see <a href="https://bz.apache.org/bugzilla/show_bug.cgi?id=64836">Bug 64836 - junitlaucher poor summary</a> * @see <a href="https://bz.apache.org/bugzilla/show_bug.cgi?id=64836">Bug 64836 - junitlauncher poor summary</a>
**/ **/
public class Junit5Progress implements TestExecutionListener { public class Junit5Progress implements TestExecutionListener {
private final AtomicInteger numSkippedInTestSet = new AtomicInteger(); private final AtomicInteger numSkippedInTestSet = new AtomicInteger();
@ -76,17 +76,17 @@ public class Junit5Progress implements TestExecutionListener {
String summary = String.format("Tests run: %d, Failures: %d, Aborted: %d, Skipped: %d, Time elapsed: %f sec", totalTestsInClass, String summary = String.format("Tests run: %d, Failures: %d, Aborted: %d, Skipped: %d, Time elapsed: %f sec", totalTestsInClass,
this.numFailedInTestSet.get(), this.numAbortedInTestSet.get(), this.numSkippedInTestSet.get(), numSeconds); this.numFailedInTestSet.get(), this.numAbortedInTestSet.get(), this.numSkippedInTestSet.get(), numSeconds);
println(summary); println(summary);
} else if (testIdentifier.isTest()) { } else {
switch (testExecutionResult.getStatus()) { switch (testExecutionResult.getStatus()) {
case SUCCESSFUL: case SUCCESSFUL:
this.numSucceededInTestSet.incrementAndGet(); this.numSucceededInTestSet.incrementAndGet();
break; break;
case ABORTED: case ABORTED:
println(" Aborted: " + testIdentifier.getDisplayName()); println(" Aborted: " + testIdentifier.getDisplayName() + ": " + testExecutionResult.getThrowable().orElse(null));
this.numAbortedInTestSet.incrementAndGet(); this.numAbortedInTestSet.incrementAndGet();
break; break;
case FAILED: case FAILED:
println(" Failed: " + testIdentifier.getDisplayName()); println(" Failed: " + testIdentifier.getDisplayName() + ": " + testExecutionResult.getThrowable().orElse(null));
this.numFailedInTestSet.incrementAndGet(); this.numFailedInTestSet.incrementAndGet();
break; break;
} }

View File

@ -1,5 +1,3 @@
import java.util.regex.Pattern
/* ==================================================================== /* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with contributor license agreements. See the NOTICE file distributed with
@ -17,8 +15,10 @@ import java.util.regex.Pattern
limitations under the License. limitations under the License.
==================================================================== */ ==================================================================== */
import java.util.regex.Pattern
final String TEST9_SRC = 'src/test/java9' 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 String VERSIONS9 = 'META-INF/versions/9'
final boolean IBMVM = System.getProperty("java.vendor").contains("IBM") final boolean IBMVM = System.getProperty("java.vendor").contains("IBM")
@ -29,9 +29,7 @@ configurations {
sourceSets { sourceSets {
test { test {
if (jdkVersion > 8) { output.dir(TEST9_OUT, builtBy: 'compileTest9')
output.dir(TEST9_OUT, builtBy: 'cacheTest9')
}
if (IBMVM) { if (IBMVM) {
java { java {
exclude '**/HeapDump**' exclude '**/HeapDump**'
@ -41,9 +39,9 @@ sourceSets {
} }
dependencies { dependencies {
testImplementation 'org.apache.ant:ant:1.10.12' testImplementation 'org.apache.ant:ant:1.10.15'
testImplementation 'org.apache.commons:commons-collections4:4.4' testImplementation 'org.apache.commons:commons-collections4:4.5.0'
testImplementation 'com.google.guava:guava:31.1-jre' testImplementation 'com.google.guava:guava:33.5.0-jre'
misc(project(':poi-ooxml')) { misc(project(':poi-ooxml')) {
capabilities { capabilities {
@ -77,13 +75,9 @@ dependencies {
} }
} }
testImplementation project(path: ':poi-ooxml-lite-agent', configuration: 'archives') testImplementation project(path: ':poi-ooxml-lite-agent', configuration: 'archives')
testImplementation "org.apache.logging.log4j:log4j-slf4j18-impl:${log4jVersion}" testImplementation "org.apache.logging.log4j:log4j-slf4j2-impl:${log4jVersion}"
testImplementation 'org.slf4j:slf4j-simple:1.7.36' testImplementation 'org.slf4j:slf4j-simple:2.0.17'
testRuntimeOnly "org.apiguardian:apiguardian-api:${apiGuardianVersion}" testRuntimeOnly "org.apiguardian:apiguardian-api:${apiGuardianVersion}"
if (SAXON_TEST) {
testRuntimeOnly "net.sf.saxon:Saxon-HE:${saxonVersion}"
}
} }
final String MODULE_NAME = 'org.apache.poi.stress' final String MODULE_NAME = 'org.apache.poi.stress'
@ -93,47 +87,29 @@ final List MODULE_COMPILE_PATH = (sourceSets.test.compileClasspath + configurati
final List MODULE_RUNTIME_PATH = (sourceSets.test.runtimeClasspath + configurations.misc.files).findAll{ it.path =~ MODULE_REGEX && !(it.path =~ MODULE_NOT_REGEX) }.collect{ it.parent }.unique() final List MODULE_RUNTIME_PATH = (sourceSets.test.runtimeClasspath + configurations.misc.files).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_AGENT = "../build/dist/maven/poi-ooxml-lite-agent/poi-ooxml-lite-agent-${project.version}.jar"
final String OOXML_LITE_REPORT = '../build/ooxml-lite-report' final String OOXML_LITE_REPORT = '../src/resources/ooxml-lite-report'
final String OOXML_LITE_JAR = "../build/dist/maven/poi-ooxml-lite/poi-ooxml-lite-${project.version}.jar"
final String OOXML_LITE_INCLUDES = "^(com/microsoft/schemas|org/(etsi|openxmlformats|w3/)|org/apache/poi/schemas)" final String OOXML_LITE_INCLUDES = "^(com/microsoft/schemas|org/(etsi|openxmlformats|w3/)|org/apache/poi/schemas)"
java { tasks.register('compileTest9', JavaCompile) {
toolchain {
languageVersion.set(JavaLanguageVersion.of(jdkVersion))
if (jdkVendor != '') vendor.set(JvmVendorSpec.matching(jdkVendor))
}
}
task compileTest9(type: JavaCompile) {
dependsOn 'compileTestJava', ':poi-ooxml:testJar', ':poi-scratchpad:testJar', ':poi-examples:jar' dependsOn 'compileTestJava', ':poi-ooxml:testJar', ':poi-scratchpad:testJar', ':poi-examples:jar'
javaCompiler = javaToolchains.compilerFor { javaCompiler = javaToolchains.compilerFor {
languageVersion = JavaLanguageVersion.of(jdkVersion) languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
if (jdkVendor != '') vendor = JvmVendorSpec.matching(jdkVendor)
} }
sourceCompatibility = 11
targetCompatibility = 11
destinationDirectory = file(TEST9_OUT + VERSIONS9) destinationDirectory = file(TEST9_OUT + VERSIONS9)
source = file(TEST9_SRC) source = file(TEST9_SRC)
options.compilerArgs = [ options.compilerArgs = [
'--patch-module', "${MODULE_NAME}=${(sourceSets.main.output.classesDirs + sourceSets.test.output.classesDirs).asPath}", '--patch-module', "${MODULE_NAME}=${(sourceSets.main.output.classesDirs + sourceSets.test.output.classesDirs).asPath}",
'--module-path', files(MODULE_COMPILE_PATH).asPath '--module-path', files(MODULE_COMPILE_PATH).asPath
] ]
classpath = files() classpath = files()
onlyIf {
jdkVersion > 8
}
} }
task cacheTest9(type: Copy) {
dependsOn 'compileTest9'
from(file(TEST9_OUT + VERSIONS9))
into(TEST9_SRC)
}
jar { jar {
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}") destinationDirectory = file("../build/dist/maven/${base.archivesName.get()}")
manifest { manifest {
attributes('Automatic-Module-Name': MODULE_NAME, 'Multi-Release': 'true') attributes('Automatic-Module-Name': MODULE_NAME, 'Multi-Release': 'true')
@ -142,18 +118,12 @@ jar {
// Create a separate jar for test-code to depend on it in other projects // Create a separate jar for test-code to depend on it in other projects
// See http://stackoverflow.com/questions/5144325/gradle-test-dependency // See http://stackoverflow.com/questions/5144325/gradle-test-dependency
task testJar(type: Jar, dependsOn: [ testClasses, cacheTest9 ] ) { task testJar(type: Jar, dependsOn: [ testClasses, compileTest9 ] ) {
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}-tests") destinationDirectory = file("../build/dist/maven/${base.archivesName.get()}-tests")
classifier 'tests' setArchiveClassifier 'tests'
// ignore second module-info.class from main // ignore second module-info.class from main
duplicatesStrategy = 'exclude' duplicatesStrategy = DuplicatesStrategy.EXCLUDE
if (jdkVersion == 8) {
into('META-INF/versions/9') {
from TEST9_SRC include '*.class'
}
}
from sourceSets.test.output + sourceSets.main.output from sourceSets.test.output + sourceSets.main.output
@ -177,24 +147,22 @@ test {
doFirst { doFirst {
jvmArgs += [ jvmArgs += [
"-javaagent:${OOXML_LITE_AGENT}=${OOXML_LITE_REPORT}|${OOXML_LITE_INCLUDES}", "-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) { if (NO_SCRATCHPAD) {
systemProperty 'scratchpad.ignore', 'true' systemProperty 'scratchpad.ignore', 'true'
} }
} }
} }
javadoc.onlyIf { false } javadoc {
enabled = false
}
javadocJar.onlyIf { false } sourcesJar {
enabled = false
sourcesJar.onlyIf { false } }
generateMetadataFileForPOIPublication.enabled = false generateMetadataFileForPOIPublication.enabled = false
publishPOIPublicationToMavenLocal.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="dist" value="../build/dist"/>
<property name="build" value="../build/distsourcebuild"/> <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" /> <os family="windows" />
</condition> </condition>
<target name="init" depends=""> <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>
<target name="run" depends="init,runSourceBuild,runCompileTest"/> <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"/> <date xmlns="antlib:org.apache.tools.ant.types.resources.comparators"/>
<resources> <resources>
<fileset dir="${dist}"> <fileset dir="${dist}">
<include name="poi-src-*.zip"/> <include name="apache-poi-src-*.zip"/>
</fileset> </fileset>
</resources> </resources>
</sort> </sort>
</last> </last>
</pathconvert> </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"/> <unzip src="${srcpackage}" dest="${build}" failOnEmptyArchive="true"/>
<!-- look for name of sub-dir, do this dynamically as it changes with every (beta|rc)-release --> <!-- 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 --> <!-- finally call Ant on the extracted source to check if we can build the packages -->
<echo message="Building in temporary dir ${dirversion}/"/> <echo message="Building in temporary dir ${dirversion}/"/>
<!--ant dir="${dirversion}" target="assemble" inheritAll="false" inheritRefs="false" useNativeBasedir="true"/--> <!--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" /> <arg value="assemble" />
</exec> </exec>
</target> </target>
@ -91,9 +94,9 @@ Before running this, you should execute the "jar" target in the main build.gradl
<sort> <sort>
<resources> <resources>
<fileset dir="${dist}"> <fileset dir="${dist}">
<include name="**/poi-5.*.jar"/> <include name="**/poi-6.*.jar"/>
<include name="**/poi-ooxml-5.*.jar"/> <include name="**/poi-ooxml-6.*.jar"/>
<include name="**/poi-ooxml-lite-5.*.jar"/> <include name="**/poi-ooxml-lite-6.*.jar"/>
<exclude name="**/*-javadoc*"/> <exclude name="**/*-javadoc*"/>
<exclude name="**/*-sources*"/> <exclude name="**/*-sources*"/>
</fileset> </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"/> <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}" <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" 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" 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"> classpath="${jarpackage}" classpathref="libs">
@ -134,10 +137,10 @@ Before running this, you should execute the "jar" target in the main build.gradl
<sort> <sort>
<resources> <resources>
<fileset dir="${dist}"> <fileset dir="${dist}">
<include name="**/poi-5.*.jar"/> <include name="**/poi-6.*.jar"/>
<include name="**/poi-ooxml-5.*.jar"/> <include name="**/poi-ooxml-6.*.jar"/>
<include name="**/poi-ooxml-lite-5.*.jar"/> <include name="**/poi-ooxml-lite-6.*.jar"/>
<include name="**/poi-scratchpad-5.*.jar"/> <include name="**/poi-scratchpad-6.*.jar"/>
<exclude name="**/*-javadoc*"/> <exclude name="**/*-javadoc*"/>
<exclude name="**/*-sources*"/> <exclude name="**/*-sources*"/>
</fileset> </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"/> <echo message="Compiling all examples with the additional scratchpad.jar"/>
<javac srcdir="../poi-examples/src/main/java" destdir="${build}" <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" encoding="ASCII" fork="yes" includeantruntime="false"
classpath="${jarpackagescratchpad}" classpathref="libs"> classpath="${jarpackagescratchpad}" classpathref="libs">
</javac> </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.hssf.extractor.EventBasedExcelExtractor;
import org.apache.poi.ooxml.POIXMLException; import org.apache.poi.ooxml.POIXMLException;
import org.apache.poi.ss.extractor.ExcelExtractor; 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 * 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 length = file.length();
long modified = file.lastModified(); long modified = file.lastModified();
POITextExtractor extractor = null;
String fileAndParentName = file.getParentFile().getName() + "/" + file.getName(); String fileAndParentName = file.getParentFile().getName() + "/" + file.getName();
try { 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); handleExtractingAsStream(file);
if (extractor instanceof POIOLE2TextExtractor) { // fix windows absolute paths for exception message tracking
try (HPSFPropertiesExtractor hpsfExtractor = new HPSFPropertiesExtractor((POIOLE2TextExtractor) extractor)) { String relPath = file.getPath().replaceAll(".*test-data", "test-data").replace('\\', '/');
assertNotNull(hpsfExtractor.getDocumentSummaryInformationText()); try (POITextExtractor extractor = ExtractorFactory.createExtractor(file)) {
assertNotNull(hpsfExtractor.getSummaryInformationText()); assertNotNull(extractor, "Should get a POITextExtractor but had none for file " + relPath);
String text = hpsfExtractor.getText();
//System.out.println(text); 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); 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) { } catch (IOException | POIXMLException e) {
Exception prevE = e; Exception prevE = e;
Throwable cause; Throwable cause;
@ -159,8 +182,6 @@ public abstract class AbstractFileHandler implements FileHandler {
if (!e.getMessage().contains("POI Scratchpad jar missing") || !Boolean.getBoolean("scratchpad.ignore")) { if (!e.getMessage().contains("POI Scratchpad jar missing") || !Boolean.getBoolean("scratchpad.ignore")) {
throw e; throw e;
} }
} finally {
IOUtils.closeQuietly(extractor);
} }
} }
@ -170,6 +191,11 @@ public abstract class AbstractFileHandler implements FileHandler {
assertNotNull(streamExtractor); assertNotNull(streamExtractor);
assertNotNull(streamExtractor.getText()); assertNotNull(streamExtractor.getText());
POITextExtractor metadataTextExtractor = streamExtractor.getMetadataTextExtractor();
assertNotNull(metadataTextExtractor);
assertNotNull(metadataTextExtractor.getText());
} }
} }
} }

View File

@ -90,7 +90,7 @@ public class ExcInfo {
public boolean isValid(String testName, String handler) { public boolean isValid(String testName, String handler) {
return return
!IGNORED_TESTS.equals(tests) && !IGNORED_TESTS.equals(tests) &&
(tests == null || tests.contains(testName)) && (tests == null || (tests.contains(testName) && !tests.contains("!"+testName))) &&
(this.handler == null || this.handler.contains(handler)); (this.handler == null || (this.handler.contains(handler) && !this.handler.contains("!"+handler)));
} }
} }

View File

@ -29,6 +29,8 @@ public enum FileHandlerKnown {
HSLF, HSLF,
HSMF, HSMF,
HSSF, HSSF,
HEMF,
HWMF,
HWPF, HWPF,
OPC, OPC,
POIFS, 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

@ -45,22 +45,16 @@ public class HPBFFileHandler extends POIFSFileHandler {
void test() throws Exception { void test() throws Exception {
File file = new File("test-data/publisher/SampleBrochure.pub"); File file = new File("test-data/publisher/SampleBrochure.pub");
InputStream stream = new FileInputStream(file); try (InputStream stream = new FileInputStream(file)) {
try {
handleFile(stream, file.getPath()); handleFile(stream, file.getPath());
} finally {
stream.close();
} }
handleExtracting(file); handleExtracting(file);
stream = new FileInputStream(file); try (InputStream stream = new FileInputStream(file)) {
try {
try (PublisherTextExtractor extractor = new PublisherTextExtractor(stream)) { try (PublisherTextExtractor extractor = new PublisherTextExtractor(stream)) {
assertNotNull(extractor.getText()); assertNotNull(extractor.getText());
} }
} finally {
stream.close();
} }
} }

View File

@ -43,8 +43,6 @@ import org.apache.poi.util.TempFile;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
public class HPSFFileHandler extends POIFSFileHandler { public class HPSFFileHandler extends POIFSFileHandler {
private static final String NL = System.getProperty("line.separator");
private static final ThreadLocal<File> copyOutput = ThreadLocal.withInitial(HPSFFileHandler::getTempFile); private static final ThreadLocal<File> copyOutput = ThreadLocal.withInitial(HPSFFileHandler::getTempFile);
static final Set<String> EXCLUDES_HANDLE_ADD = StressTestUtils.unmodifiableHashSet( static final Set<String> EXCLUDES_HANDLE_ADD = StressTestUtils.unmodifiableHashSet(
@ -103,7 +101,7 @@ public class HPSFFileHandler extends POIFSFileHandler {
private static boolean hasPropertyStream(POIFSFileSystem poifs, String streamName) throws IOException { private static boolean hasPropertyStream(POIFSFileSystem poifs, String streamName) throws IOException {
DirectoryNode root = poifs.getRoot(); DirectoryNode root = poifs.getRoot();
if (!root.hasEntry(streamName)) { if (!root.hasEntryCaseInsensitive(streamName)) {
return false; return false;
} }
try (DocumentInputStream dis = root.createDocumentInputStream(streamName)) { try (DocumentInputStream dis = root.createDocumentInputStream(streamName)) {
@ -140,12 +138,10 @@ public class HPSFFileHandler extends POIFSFileHandler {
try (InputStream stream = new FileInputStream(path)) { try (InputStream stream = new FileInputStream(path)) {
handleFile(stream, path); handleFile(stream, path);
} }
}
// a test-case to test this locally without executing the full TestAllFiles File file = new File(path);
@Test
void testExtractor() {
File file = new File("test-data/hpsf/TestBug44375.xls");
assertDoesNotThrow(() -> handleExtracting(file)); assertDoesNotThrow(() -> handleExtracting(file));
handleAdditional(file);
} }
} }

View File

@ -23,15 +23,15 @@ import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.io.InputStream; import java.io.InputStream;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; 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.HSLFSlideShow;
import org.apache.poi.hslf.usermodel.HSLFSlideShowImpl; import org.apache.poi.hslf.usermodel.HSLFSlideShowImpl;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
public class HSLFFileHandler extends SlideShowHandler { public class HSLFFileHandler extends SlideShowHandler {
private static final Logger LOGGER = LogManager.getLogger(HSLFFileHandler.class); private static final Logger LOGGER = PoiLogManager.getLogger(HSLFFileHandler.class);
@Override @Override
public void handleFile(InputStream stream, String path) throws Exception { public void handleFile(InputStream stream, String path) throws Exception {
@ -84,6 +84,8 @@ public class HSLFFileHandler extends SlideShowHandler {
} }
handleExtracting(file); handleExtracting(file);
handleAdditional(file);
} }
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {

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