protected void applyRPr(RPr rPrToApply, RPr effectiveRPr) { if (rPrToApply==null) { return; } StyleUtil.apply(rPrToApply, effectiveRPr); // List<Property> properties = PropertyFactory.createProperties(null, rPrToApply); // wmlPackage null // // for( Property p : properties ) { // if (p!=null) { // ((AbstractRunProperty)p).set(effectiveRPr); // NB, this new method does not copy. TODO? // } // } }
protected void applyRPr(ParaRPr rPrToApply, RPr effectiveRPr) { if (rPrToApply==null) { return; } StyleUtil.apply(rPrToApply, effectiveRPr); // List<Property> properties = PropertyFactory.createProperties(null, rPrToApply); // wmlPackage null // // for( Property p : properties ) { // if (p!=null) { // ((AbstractRunProperty)p).set(effectiveRPr); // NB, this new method does not copy. TODO? // } // } }
public static void apply(List<CTTblStylePr> source, List<CTTblStylePr> destination) { CTTblStylePr destinationTblStylePr = null; if (!isEmpty(source)) { // not sure about this, but if the source defines a content model it should // replace the destination as a whole, and not parts of it. destination.clear(); for (int i=0; i<source.size(); i++) { destinationTblStylePr = apply(source.get(i), null); if (destinationTblStylePr != null) { destination.add(destinationTblStylePr); } } } }
public static PPr apply(PPr source, PPr destination) { if (!isEmpty(source)) { if (destination == null) destination = Context.getWmlObjectFactory().createPPr(); apply((PPrBase)source, (PPrBase)destination); destination.setRPr(apply(source.getRPr(), destination.getRPr())); destination.setSectPr(apply(source.getSectPr(), destination.getSectPr())); } return destination; }
public static TblBorders apply(TblBorders source, TblBorders destination) { if (!isEmpty(source)) { if (destination == null) destination = Context.getWmlObjectFactory().createTblBorders(); destination.setBottom(apply(source.getBottom(), destination.getBottom())); destination.setLeft(apply(source.getLeft(), destination.getLeft())); destination.setRight(apply(source.getRight(), destination.getRight())); destination.setTop(apply(source.getTop(), destination.getTop())); destination.setInsideH(apply(source.getInsideH(), destination.getInsideH())); destination.setInsideV(apply(source.getInsideV(), destination.getInsideV())); } return destination; }
public static CTTblCellMar apply(CTTblCellMar source, CTTblCellMar destination) { if (!isEmpty(source)) { if (destination == null) destination = Context.getWmlObjectFactory().createCTTblCellMar(); destination.setBottom(apply(source.getBottom(), destination.getBottom())); destination.setLeft(apply(source.getLeft(), destination.getLeft())); destination.setRight(apply(source.getRight(), destination.getRight())); destination.setTop(apply(source.getTop(), destination.getTop())); } return destination; }
public static Spacing apply(Spacing source, Spacing destination) { if (!isEmpty(source)) { if (destination == null) destination = Context.getWmlObjectFactory().createPPrBaseSpacing(); destination.setAfter(apply(source.getAfter(), destination.getAfter())); destination.setAfterLines(apply(source.getAfterLines(), destination.getAfterLines())); destination.setBefore(apply(source.getBefore(), destination.getBefore())); destination.setBeforeLines(apply(source.getBeforeLines(), destination.getBeforeLines())); destination.setLine(apply(source.getLine(), destination.getLine())); destination.setLineRule(apply(source.getLineRule(), destination.getLineRule())); } return destination; }
public static TcMar apply(TcMar source, TcMar destination) { if (!isEmpty(source)) { if (destination == null) destination = Context.getWmlObjectFactory().createTcMar(); destination.setBottom(apply(source.getBottom(), destination.getBottom())); destination.setLeft(apply(source.getLeft(), destination.getLeft())); destination.setRight(apply(source.getRight(), destination.getRight())); destination.setTop(apply(source.getTop(), destination.getTop())); } return destination; }
public static CTTblLook apply(CTTblLook source, CTTblLook destination) { if (!isEmpty(source)) { if (destination == null) destination = Context.getWmlObjectFactory().createCTTblLook(); destination.setFirstColumn(apply(source.getFirstColumn(), destination.getFirstColumn())); destination.setFirstRow(apply(source.getFirstRow(), destination.getFirstRow())); destination.setLastColumn(apply(source.getLastColumn(), destination.getLastColumn())); destination.setLastRow(apply(source.getLastRow(), destination.getLastRow())); destination.setNoHBand(apply(source.getNoHBand(), destination.getNoHBand())); destination.setNoVBand(apply(source.getNoVBand(), destination.getNoVBand())); destination.setVal(apply(source.getVal(), destination.getVal())); } return destination; }
public static PBdr apply(PBdr source, PBdr destination) { if (!isEmpty(source)) { if (destination == null) destination = Context.getWmlObjectFactory().createPPrBasePBdr(); destination.setTop(apply(source.getTop(), destination.getTop())); destination.setLeft(apply(source.getLeft(), destination.getLeft())); destination.setBottom(apply(source.getBottom(), destination.getBottom())); destination.setRight(apply(source.getRight(), destination.getRight())); destination.setBetween(apply(source.getBetween(), destination.getBetween())); destination.setBar(apply(source.getBar(), destination.getBar())); } return destination; }
public static TcBorders apply(TcBorders source, TcBorders destination) { if (!isEmpty(source)) { if (destination == null) destination = Context.getWmlObjectFactory().createTcPrInnerTcBorders(); destination.setBottom(apply(source.getBottom(), destination.getBottom())); destination.setLeft(apply(source.getLeft(), destination.getLeft())); destination.setRight(apply(source.getRight(), destination.getRight())); destination.setTop(apply(source.getTop(), destination.getTop())); destination.setInsideH(apply(source.getInsideH(), destination.getInsideH())); destination.setInsideV(apply(source.getInsideV(), destination.getInsideV())); destination.setTl2Br(apply(source.getTl2Br(), destination.getTl2Br())); destination.setTr2Bl(apply(source.getTr2Bl(), destination.getTr2Bl())); } return destination; }
public static Ind apply(Ind source, Ind destination) { if (!isEmpty(source)) { if (destination == null) destination = Context.getWmlObjectFactory().createPPrBaseInd(); destination.setFirstLine(apply(source.getFirstLine(), destination.getFirstLine())); destination.setFirstLineChars(apply(source.getFirstLineChars(), destination.getFirstLineChars())); destination.setHanging(apply(source.getHanging(), destination.getHanging())); destination.setHangingChars(apply(source.getHangingChars(), destination.getHangingChars())); destination.setLeft(apply(source.getLeft(), destination.getLeft())); destination.setLeftChars(apply(source.getLeftChars(), destination.getLeftChars())); destination.setRight(apply(source.getRight(), destination.getRight())); destination.setRightChars(apply(source.getRightChars(), destination.getRightChars())); } return destination; }
public static Color apply(Color source, Color destination) { if (!isEmpty(source)) { if (destination == null) destination = Context.getWmlObjectFactory().createColor(); destination.setThemeColor(apply(source.getThemeColor(), destination.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 static CTTblStylePr apply(CTTblStylePr source, CTTblStylePr destination) { if (!isEmpty(source)) { if (destination == null) destination = Context.getWmlObjectFactory().createCTTblStylePr(); destination.setPPr(apply(source.getPPr(), destination.getPPr())); destination.setRPr(apply(source.getRPr(), destination.getRPr())); destination.setTblPr(apply(source.getTblPr(), destination.getTblPr())); destination.setTcPr(apply(source.getTcPr(), destination.getTcPr())); destination.setTrPr(apply(source.getTrPr(), destination.getTrPr())); destination.setType(source.getType()); //enum } return destination; }
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 static CTShd apply(CTShd source, CTShd destination) { if (!isEmpty(source)) { if (destination == null) destination = Context.getWmlObjectFactory().createCTShd(); destination.setColor(apply(source.getColor(), destination.getColor())); destination.setFill(apply(source.getFill(), destination.getFill())); destination.setVal(apply(source.getVal(), destination.getVal())); destination.setThemeTint(apply(source.getThemeTint(), destination.getThemeTint())); destination.setThemeShade(apply(source.getThemeShade(), destination.getThemeShade())); destination.setThemeFillTint(apply(source.getThemeFillTint(), destination.getThemeFillTint())); destination.setThemeFillShade(apply(source.getThemeFillShade(), destination.getThemeFillShade())); destination.setThemeColor(source.getThemeColor()); //enum destination.setThemeFill(source.getThemeFill()); //enum } return destination; }
private RPr getEffectiveRPr(RPr expressRPr) { RPr resolvedRPr = null; if (expressRPr != null && expressRPr.getRStyle() != null ) { String runStyleId = expressRPr.getRStyle().getVal(); resolvedRPr = propertyResolver.getEffectiveRPr(runStyleId); // remove the style, so it is not set by apply below expressRPr.setRStyle(null); } return StyleUtil.apply(expressRPr, resolvedRPr); }
public static CTTblPPr apply(CTTblPPr source, CTTblPPr destination) { if (!isEmpty(source)) { if (destination == null) destination = Context.getWmlObjectFactory().createCTTblPPr(); destination.setLeftFromText(apply(source.getLeftFromText(), destination.getLeftFromText())); destination.setRightFromText(apply(source.getRightFromText(), destination.getRightFromText())); destination.setTopFromText(apply(source.getTopFromText(), destination.getTopFromText())); destination.setBottomFromText(apply(source.getBottomFromText(), destination.getBottomFromText())); destination.setVertAnchor(source.getVertAnchor()); destination.setHorzAnchor(source.getHorzAnchor()); destination.setTblpXSpec(source.getTblpXSpec()); destination.setTblpX(apply(source.getTblpX(), destination.getTblpX())); destination.setTblpYSpec(source.getTblpYSpec()); destination.setTblpY(apply(source.getTblpY(), destination.getTblpY())); } return destination; }
public static CTCnf apply(CTCnf source, CTCnf destination) { if (!isEmpty(source)) { if (destination == null) destination = Context.getWmlObjectFactory().createCTCnf(); destination.setVal(apply(source.getVal(), destination.getVal())); } return destination; }
public static PStyle apply(PStyle source, PStyle destination) { if (!isEmpty(source)) { if (destination == null) destination = Context.getWmlObjectFactory().createPPrBasePStyle(); destination.setVal(apply(source.getVal(), destination.getVal())); } return destination; }