pjfanning commented on code in PR #640:
URL: https://github.com/apache/poi/pull/640#discussion_r1616341503
##########
poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFDocument.java:
##########
@@ -912,6 +920,53 @@ private void insertElementIntoCell(XWPFTableCell
tableCell, IBodyElement iBodyEl
}
}
+ private void insertIntoTables(IBodyElement iBodyElement, Deque<XmlObject>
path, CTTbl ctTbl, List<XWPFTable> tables) {
+ for (XWPFTable xwpfTable : tables) {
+ if (ctTbl == xwpfTable.getCTTbl()) {
+ insertElementIntoTable(xwpfTable, iBodyElement, path);
+ }
+ }
+ }
+
+ private void insertIntoHeadersFooters(IBodyElement iBodyElement,
CTHdrFtrImpl ctHdrFtrImpl) {
+ for (XWPFHeader header : headers) {
+ if (ctHdrFtrImpl == header._getHdrFtr()) {
+ insertIntoHeaderFooter(iBodyElement, header);
Review Comment:
same issue as above about break call when you match in the if and likewise
in next for loop.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]