public static CTBorder apply(CTBorder source, CTBorder destination) { if (!isEmpty(source)) { if (destination == null) destination = Context.getWmlObjectFactory().createCTBorder(); destination.setColor(apply(source.getColor(), destination.getColor())); destination.setSpace(apply(source.getSpace(), destination.getSpace())); destination.setSz(apply(source.getSz(), destination.getSz())); destination.setThemeColor(source.getThemeColor()); destination.setThemeShade(apply(source.getThemeShade(), destination.getThemeShade())); destination.setThemeTint(apply(source.getThemeTint(), destination.getThemeTint())); destination.setVal(apply(source.getVal(), destination.getVal())); } return destination; }
public CTBorder keepDiff(CTBorder orig, CTBorder from) { if (from != null && orig != null) { if (orig.getVal() != null && from.getVal() != null && from.getVal() != null && orig.getVal().compareTo(from.getVal()) == 0) orig.setVal(null); if (orig.getThemeColor() != null && from.getThemeColor() != null && orig.getThemeColor().compareTo(from.getThemeColor()) == 0) orig.setThemeColor(null); if (orig.getSpace() != null && from.getSpace() != null && orig.getSpace().compareTo(from.getSpace()) == 0) orig.setSpace(null); if (orig.getSz() != null && from.getSz() != null && orig.getSz().compareTo(from.getSz()) == 0) orig.setSz(null); if (orig.getColor() != null && from.getColor() != null && orig.getColor().compareTo(from.getColor()) == 0) orig.setColor(null); if (orig.getThemeShade() != null && from.getThemeShade() != null && orig.getThemeShade().compareTo(from.getThemeShade()) == 0) orig.setThemeShade(null); if (orig.getThemeTint() != null && from.getThemeTint() != null && orig.getThemeTint().compareTo(from.getThemeTint()) == 0) orig.setThemeTint(null); if (orig.isFrame() == from.isFrame()) orig.setFrame(null); if (orig.isShadow() == from.isShadow()) orig.setShadow(null); } return StyleUtil.isEmpty(orig) ? null : orig; }
leftBorder.setSpace(space);
border.setSz(BigInteger.valueOf(2)); border.setColor("000001"); border.setSpace(BigInteger.valueOf(0)); border2.setSz(BigInteger.valueOf(2)); border2.setColor("000001"); border2.setSpace(BigInteger.valueOf(0)); border3.setSz(BigInteger.valueOf(2)); border3.setColor("000001"); border3.setSpace(BigInteger.valueOf(0)); border4.setSz(BigInteger.valueOf(2)); border4.setColor("000001"); border4.setSpace(BigInteger.valueOf(0)); border5.setSz(BigInteger.valueOf(2)); border5.setColor("000001"); border5.setSpace(BigInteger.valueOf(0)); border6.setSz(BigInteger.valueOf(2)); border6.setColor("000001"); border6.setSpace(BigInteger.valueOf(0));
public CTBorder getCopy(CTBorder copy, boolean whenNull) { if (copy != null) { CTBorder result = myFactory.createCTBorder(); result.setVal(copy.getVal()); result.setThemeColor(copy.getThemeColor()); result.setSpace(copy.getSpace()); result.setSz(copy.getSz()); result.setFrame(copy.isFrame()); result.setShadow(copy.isShadow()); result.setColor(copy.getColor()); result.setThemeShade(copy.getThemeShade()); result.setThemeTint(copy.getThemeTint()); return result; } if (whenNull) { return myFactory.createCTBorder(); } return null; }
protected void doSide(PPr pPr, Styleable styleable, Map<String, CSSValue> cssMap, String side) { CTBorder border = null; CSSValue borderStyle = cssMap.get("border-"+side+"-style"); if (borderStyle!=null && !"none".equals(borderStyle.getCssText())) { // paragraph has a border border = createBorderStyle( styleable, side); setBorder( pPr, side, border ); } // padding to space BigInteger spaceAttrVal = paddingToSpace(styleable, side); if (spaceAttrVal!=null) { border = getBorder( pPr, side); border.setSpace(spaceAttrVal); } // NB: Word 2010 doesn't seem to honour this when its in a table cell! // and there doesn't seem to be a compat setting which should affect this. }
public static CTBorder apply(CTBorder source, CTBorder destination) { if (!isEmpty(source)) { if (destination == null) destination = Context.getWmlObjectFactory().createCTBorder(); destination.setColor(apply(source.getColor(), destination.getColor())); destination.setSpace(apply(source.getSpace(), destination.getSpace())); destination.setSz(apply(source.getSz(), destination.getSz())); destination.setThemeColor(source.getThemeColor()); destination.setThemeShade(apply(source.getThemeShade(), destination.getThemeShade())); destination.setThemeTint(apply(source.getThemeTint(), destination.getThemeTint())); destination.setVal(apply(source.getVal(), destination.getVal())); } return destination; }