13500 Commits

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