@Override public void apply(Tbl table, Object parent, List<Object> siblings) { if (table.getTblPr()!=null && table.getTblPr().getTblStyle()!=null && !allowedStyleNames.contains(sdp.getNameForStyleID(table.getTblPr().getTblStyle().getVal()))) { table.getTblPr().setTblStyle(null); } } }
if (tblPr !=null && tblPr.getTblStyle()!=null) { String styleId = tblPr.getTblStyle().getVal(); log.debug("Table style: " + styleId); fillTableStyleStack(styleId, tableStyleStack);
/** * 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"); } } }
&& tbl.getTblPr().getTblStyle()!=null) { styleId = tbl.getTblPr().getTblStyle().getVal();
&& tbl.getTblPr().getTblStyle()!=null) { styleId = tbl.getTblPr().getTblStyle().getVal();
if (tblPr!=null && tblPr.getTblStyle()!=null) { tableStyle = tblPr.getTblStyle().getVal(); } else if (defaultTableStyle==null) { log.warn("No default table style defined in docx Style Definitions part");
&& tbl.getTblPr().getTblStyle()!=null) { stylesInUse.add(tbl.getTblPr().getTblStyle().getVal() );
@Override public void apply(Tbl table, Object parent, List<Object> siblings) { if (table.getTblPr()!=null && table.getTblPr().getTblStyle()!=null && !allowedStyleNames.contains(sdp.getNameForStyleID(table.getTblPr().getTblStyle().getVal()))) { table.getTblPr().setTblStyle(null); } } }
if (tblPr !=null && tblPr.getTblStyle()!=null) { String styleId = tblPr.getTblStyle().getVal(); log.debug("Table style: " + styleId); fillTableStyleStack(styleId, tableStyleStack);
/** * 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"); } } }
&& tbl.getTblPr().getTblStyle()!=null) { styleId = tbl.getTblPr().getTblStyle().getVal();
&& tbl.getTblPr().getTblStyle()!=null) { styleId = tbl.getTblPr().getTblStyle().getVal();
if (tblPr!=null && tblPr.getTblStyle()!=null) { tableStyle = tblPr.getTblStyle().getVal(); } else if (defaultTableStyle==null) { log.warn("No default table style defined in docx Style Definitions part");
&& tbl.getTblPr().getTblStyle()!=null) { stylesInUse.add(tbl.getTblPr().getTblStyle().getVal() );