Exemplo n.º 1
0
  /**
   * Sets font style (bold/italic) for a paragraph run
   *
   * @param runElement Run
   * @param italic wheter to set italic style
   * @param bold wheter to set bold style
   */
  private void setFontStyle(R runElement, boolean italic, boolean bold) {
    RPr runProps = runElement.getRPr();
    if (null == runProps) runProps = objectFactory.createRPr();
    if (italic) runProps.setI(objectFactory.createBooleanDefaultTrue());
    if (bold) runProps.setB(objectFactory.createBooleanDefaultTrue());

    runElement.setRPr(runProps);
  }
 private void addBoldStyle(RPr runProperties) {
   BooleanDefaultTrue b = new BooleanDefaultTrue();
   b.setVal(true);
   runProperties.setB(b);
 }