1089 Commits

Author SHA1 Message Date
PJ Fanning
b0a4e1042a Update TestXSSFParser.java 2025-08-28 15:41:20 +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
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
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
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
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
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
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
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
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
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
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
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
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
2f66c63387 git repo 2025-07-07 23:07:39 +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
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
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
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