package cokr.xit.fims.cmmn.hwp;
import kr.dogfoot.hwplib.object.HWPFile;
import kr.dogfoot.hwplib.object.bodytext.ParagraphListInterface;
import kr.dogfoot.hwplib.object.bodytext.paragraph.Paragraph;
import kr.dogfoot.hwplib.tool.paragraphadder.ParagraphAdder;

public class AddingParagraphBetweenHWPFile {
	public static void fileMerge(HWPFile sourceHWPFile, HWPFile targetHWPFile) throws Exception {

        if (sourceHWPFile != null && targetHWPFile != null) {

            ParagraphListInterface targetFirstSection = targetHWPFile.getBodyText().getSectionList().get(0);

            Paragraph sourceParagraph = sourceHWPFile.getBodyText().getSectionList().get(0).getParagraph(0);

            ParagraphAdder paraAdder = new ParagraphAdder(targetHWPFile, targetFirstSection);
            paraAdder.add(sourceHWPFile, sourceParagraph);



        }
    }
}
