@Deprecated public List<Object> getEGBlockLevelElts() { return getContent(); }
tc.setTcPr(tcPr); tc.getEGBlockLevelElts().add( Context.getWmlObjectFactory().createP() );
/** * Add a new cell to this table and copy processed content of * <var>tc</var> to it. */ public void addCell(Tc tc, Node content) { log.debug("Add tc row " + row + " col 1+" + col); addRow(new AbstractTableWriterModelCell(this, row, ++col, tc, content)); // add dummy cells if (tc.getTcPr()!=null && tc.getTcPr().getGridSpan()!=null && tc.getTcPr().getGridSpan().getVal() !=null) { int gridSpan = tc.getTcPr().getGridSpan().getVal().intValue(); addDummyCell(gridSpan, false, false); } }
dummy.setTcPr(tcPr); dummy.getContent().add( new P() );
tc.setTcPr(tcpr);
/** * Create an instance of {@link Tc } * */ public Tc createTc() { return new Tc(); }
/** * Create an instance of {@link Tc } * */ public Tc createTc() { return new Tc(); }
if (tc.getContent() != null) { cellElts = groupBodyContent(tc.getContent()); if (cellElts != null) { tc.getContent().clear(); tc.getContent().addAll(cellElts);
/** * Add a new cell to this table */ public void addCell(Tc tc) { ++col; log.debug("Add tc row " + row + " col " + col); addCell(new TableModelCell(this, row, col, tc)); // add dummy horizontal cells if (tc.getTcPr()!=null && tc.getTcPr().getGridSpan()!=null && tc.getTcPr().getGridSpan().getVal() !=null) { int gridSpan = tc.getTcPr().getGridSpan().getVal().intValue(); addDummyCell(gridSpan, false, false); } log.debug("\n\n"+ this.debugStr()); }
tc.setTcPr(tcPr); tc.getEGBlockLevelElts().add( Context.getWmlObjectFactory().createP() );
log.debug("Unknown parent"); } else if (parent instanceof Tc) { if ( ((Tc)parent).getContent().size()==1 ) {
clone.getMainDocumentPart().getContent().addAll(tc.getContent());
/** * Get table cell width from tc and table style from tbl and set it to xHTMLImporter. * @param tbl * @param tc * @param xHTMLImporter */ public static void setupMaxWidthAndStyleForTc(Tbl tbl, Tc tc, XHTMLImporter xHTMLImporter) { if(tc.getTcPr() != null && tc.getTcPr().getTcW() != null) { TblWidth tcW = tc.getTcPr().getTcW(); if (tcW.getW()!= null && tcW.getType().equals(TblWidth.TYPE_DXA)) { int maxWidth = tcW.getW().intValue(); String styleVal = null; if(tbl != null && tbl.getTblPr() != null && tbl.getTblPr().getTblStyle() != null) { styleVal = tbl.getTblPr().getTblStyle().getVal(); } log.debug("inserting in a tc, with maxwidth: " + maxWidth + ", and table style: " + styleVal); xHTMLImporter.setMaxWidth(maxWidth, styleVal); } else { log.debug("w:tcPr/w:tcW present, but width not in dxa units "); } } else { log.debug("w:tcPr/w:tcW not present"); } } }
tc.getContent().clear(); P p = Context.getWmlObjectFactory().createP(); tc.getContent().add(p); ((SdtElement)sdt).getSdtContent().getContent().clear(); ((SdtElement)sdt).getSdtContent().getContent().add(tc);
/** * Add a new cell to this table and copy processed content of * <var>tc</var> to it. */ public void addCell(Tc tc, Node content) { log.debug("Add tc row " + row + " col 1+" + col); addRow(new AbstractTableWriterModelCell(this, row, ++col, tc, content)); // add dummy cells if (tc.getTcPr()!=null && tc.getTcPr().getGridSpan()!=null && tc.getTcPr().getGridSpan().getVal() !=null) { int gridSpan = tc.getTcPr().getGridSpan().getVal().intValue(); addDummyCell(gridSpan, false, false); } }
org.docx4j.wml.P p = factory.createP(); if (sdtParent.equals("tr")) { tc.getContent().add(p);
/** * Add a new cell to this table */ public void addCell(Tc tc) { ++col; log.debug("Add tc row " + row + " col " + col); addCell(new TableModelCell(this, row, col, tc)); // add dummy horizontal cells if (tc.getTcPr()!=null && tc.getTcPr().getGridSpan()!=null && tc.getTcPr().getGridSpan().getVal() !=null) { int gridSpan = tc.getTcPr().getGridSpan().getVal().intValue(); addDummyCell(gridSpan, false, false); } log.debug("\n\n"+ this.debugStr()); }
tc.getContent().clear(); P p = Context.getWmlObjectFactory().createP(); tc.getContent().add(p); ((SdtElement)sdt).getSdtContent().getContent().clear(); ((SdtElement)sdt).getSdtContent().getContent().add(tc);