* 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
* 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
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.
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.
* 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.
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
* 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.