XSSFTextParagraph(CTTextParagraph p, CTShape ctShape){ _p = p; _shape = ctShape; _runs = new ArrayList<>(); for(XmlObject ch : _p.selectPath("*")){ if(ch instanceof CTRegularTextRun){ CTRegularTextRun r = (CTRegularTextRun)ch; _runs.add(new XSSFTextRun(r, this)); } else if (ch instanceof CTTextLineBreak){ CTTextLineBreak br = (CTTextLineBreak)ch; CTRegularTextRun r = CTRegularTextRun.Factory.newInstance(); r.setRPr(br.getRPr()); r.setT("\n"); _runs.add(new XSSFTextRun(r, this)); } else if (ch instanceof CTTextField){ CTTextField f = (CTTextField)ch; CTRegularTextRun r = CTRegularTextRun.Factory.newInstance(); r.setRPr(f.getRPr()); r.setT(f.getT()); _runs.add(new XSSFTextRun(r, this)); } } }
XSSFTextParagraph(CTTextParagraph p, CTShape ctShape){ _p = p; _shape = ctShape; _runs = new ArrayList<>(); for(XmlObject ch : _p.selectPath("*")){ if(ch instanceof CTRegularTextRun){ CTRegularTextRun r = (CTRegularTextRun)ch; _runs.add(new XSSFTextRun(r, this)); } else if (ch instanceof CTTextLineBreak){ CTTextLineBreak br = (CTTextLineBreak)ch; CTRegularTextRun r = CTRegularTextRun.Factory.newInstance(); r.setRPr(br.getRPr()); r.setT("\n"); _runs.add(new XSSFTextRun(r, this)); } else if (ch instanceof CTTextField){ CTTextField f = (CTTextField)ch; CTRegularTextRun r = CTRegularTextRun.Factory.newInstance(); r.setRPr(f.getRPr()); r.setT(f.getT()); _runs.add(new XSSFTextRun(r, this)); } } }
XSLFTextParagraph(CTTextParagraph p, XSLFTextShape shape){ _p = p; _runs = new ArrayList<XSLFTextRun>(); _shape = shape; for(XmlObject ch : _p.selectPath("*")){ if(ch instanceof CTRegularTextRun){ CTRegularTextRun r = (CTRegularTextRun)ch; _runs.add(new XSLFTextRun(r, this)); } else if (ch instanceof CTTextLineBreak){ CTTextLineBreak br = (CTTextLineBreak)ch; CTRegularTextRun r = CTRegularTextRun.Factory.newInstance(); r.setRPr(br.getRPr()); r.setT("\n"); _runs.add(new XSLFTextRun(r, this)); } else if (ch instanceof CTTextField){ CTTextField f = (CTTextField)ch; CTRegularTextRun r = CTRegularTextRun.Factory.newInstance(); r.setRPr(f.getRPr()); r.setT(f.getT()); _runs.add(new XSLFTextRun(r, this)); } } }