Package org.docx4j.wml.PPrBase

Examples of org.docx4j.wml.PPrBase.Spacing


    }
   
    // If the docDefaults have no setting for w:spacing
    // then add it:
    if (documentDefaultPPr.getSpacing()==null) {
      Spacing spacing = Context.getWmlObjectFactory().createPPrBaseSpacing();
      documentDefaultPPr.setSpacing(spacing);
      spacing.setBefore(BigInteger.ZERO);
      spacing.setAfter(BigInteger.ZERO);
      spacing.setLine(BigInteger.valueOf(240));
    }

    // Setup documentDefaultRPr
    RPr documentDefaultRPr;
    if (docDefaults.getRPrDefault() == null) {
View Full Code Here


  }

  @Override
  public void set(PPr pPr) {
    if (pPr.getSpacing()==  null) {
      Spacing spacing = Context.getWmlObjectFactory().createPPrBaseSpacing();
      pPr.setSpacing(spacing);
    }   
    pPr.getSpacing().setBefore((BigInteger)this.getObject() );
  }
View Full Code Here

  }

  @Override
  public void set(PPr pPr) {
    if (pPr.getSpacing()==  null) {
      Spacing spacing = Context.getWmlObjectFactory().createPPrBaseSpacing();
      pPr.setSpacing(spacing);
    }
    pPr.getSpacing().setAfter((BigInteger)this.getObject() );
  }
View Full Code Here

  }

  @Override
  public void set(PPr pPr) {
    if (pPr.getSpacing()==  null) {
      Spacing spacing = Context.getWmlObjectFactory().createPPrBaseSpacing();
      pPr.setSpacing(spacing);
    }
    pPr.getSpacing().setLine((BigInteger)this.getObject() );
  }
View Full Code Here

    if (pPr.getShd() != null)
      properties.add(new PShading(pPr.getShd()));
//    if (pPr.getSnapToGrid() != null)
//      dest.setSnapToGrid(pPr.getSnapToGrid());
    if (pPr.getSpacing() != null) {
      Spacing spacing = pPr.getSpacing();
      if (spacing.getBefore()!=null) {
        properties.add(new SpaceBefore(spacing.getBefore()));
      }
      if (spacing.getAfter()!=null) {
        properties.add(new SpaceAfter(spacing.getAfter()));       
      }
      if (spacing.getLine()!=null) {
        properties.add(new LineSpacing(spacing.getLine()));               
      }
      // Others not implemented:
      // "beforeLines"
      // beforeAutospacing"
      // afterLines"
View Full Code Here

TOP

Related Classes of org.docx4j.wml.PPrBase.Spacing

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.