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; }
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; }