I'm trying to copy the paragraphs from one file to another.
Some of the paragraphs require some "processing" to morph the content
Others I just want to copy straight over.
I'm going through the content in the first file with a List of XWPFParagraph
List<XWPFParagraph> paragraphList = xdoc.getParagraphs();
For the paragraphs that I have to modify, I create a new P and add that to MainDocumentPart with addObject. These copy over fine since I'm not exactly copying but creating new content from the original.
For the paragraphs that I don't need to touch, how do I add each XWPFParagraph to the MainDocumentPart? I need to preserve all the formatting/styles within the paragraphs I'm not touching.