13663 Commits

Author SHA1 Message Date
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