You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by GitBox <gi...@apache.org> on 2022/10/18 11:35:47 UTC

[GitHub] [poi] AntonOellerer opened a new pull request, #389: Insert paragraphs and tables into `XWPFDocuments` recursively

AntonOellerer opened a new pull request, #389:
URL: https://github.com/apache/poi/pull/389

   Up until now, the `XWPFDocument#insertNew[Paragraph|Table](XmlCursor)` methods were only able to insert the elements if they were present in the `XWPFDocument`-internal lists representing the top-level objects not nested in other elements  (`XWPFDocument.paragraphs`/`XWPFDocument.tables`).
   
   This commit updates the insertion code for both methods such that objects can also be inserted if the `XmlCursor` does not point
   to an element in the top-level list but to a nested object (for example a paragraph in a table).
   This is done by first figuring out the path to the cursor by repeated calls to `XmlCursor#toParent()`, and then traversing down
   the `XWPFDocument` internal structure to find the parent object where the new paragraph or table should be inserted.
   
   Tests verifying this behavior have been added.


-- 
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: dev-unsubscribe@poi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[GitHub] [poi] pjfanning commented on pull request #389: Insert paragraphs and tables into `XWPFDocuments` recursively

Posted by GitBox <gi...@apache.org>.
pjfanning commented on PR #389:
URL: https://github.com/apache/poi/pull/389#issuecomment-1282261994

   Thanks - merged


-- 
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: dev-unsubscribe@poi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[GitHub] [poi] pjfanning commented on pull request #389: Insert paragraphs and tables into `XWPFDocuments` recursively

Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on PR #389:
URL: https://github.com/apache/poi/pull/389#issuecomment-1680482339

   This is not the place to discuss releases. Try the dev@poi.apache.org mailing list.


-- 
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: dev-unsubscribe@poi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[GitHub] [poi] AntonOellerer commented on pull request #389: Insert paragraphs and tables into `XWPFDocuments` recursively

Posted by "AntonOellerer (via GitHub)" <gi...@apache.org>.
AntonOellerer commented on PR #389:
URL: https://github.com/apache/poi/pull/389#issuecomment-1680480068

   Hey, do you already have any idea when this/poi 5.2.4 will be released?


-- 
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: dev-unsubscribe@poi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[GitHub] [poi] asfgit closed pull request #389: Insert paragraphs and tables into `XWPFDocuments` recursively

Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #389: Insert paragraphs and tables into `XWPFDocuments` recursively
URL: https://github.com/apache/poi/pull/389


-- 
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: dev-unsubscribe@poi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org