13736 Commits

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