/** * Supply the Sheet we belong to, which might have an assigned SlideShow * Also passes it on to our child RichTextRuns */ public static void supplySheet(List<HSLFTextParagraph> paragraphs, HSLFSheet sheet) { if (paragraphs == null) { return; } for (HSLFTextParagraph p : paragraphs) { p.supplySheet(sheet); } assert(sheet.getSlideShow() != null); }
@Override public void setSheet(HSLFSheet sheet) { super.setSheet(sheet); // Initialize _txtrun object. // (We can't do it in the constructor because the sheet // is not assigned then, it's only built once we have // all the records) List<HSLFTextParagraph> ltp = getTextParagraphs(); HSLFTextParagraph.supplySheet(ltp, sheet); }
/** * Set the SlideShow we're attached to. * Also passes it on to our child text paragraphs */ @Internal protected void setSlideShow(HSLFSlideShow ss) { if (_slideShow != null) { throw new HSLFException("Can't change existing slideshow reference"); } _slideShow = ss; List<List<HSLFTextParagraph>> trs = getTextParagraphs(); if (trs == null) { return; } for (List<HSLFTextParagraph> ltp : trs) { HSLFTextParagraph.supplySheet(ltp, this); HSLFTextParagraph.applyHyperlinks(ltp); } }
htp.setParentShape(prevHtp.getParentShape()); htp.setShapeId(prevHtp.getShapeId()); htp.supplySheet(prevHtp.getSheet()); paragraphs.add(htp);