Package org.docx4j.wml.PPrBase

Examples of org.docx4j.wml.PPrBase.Ind


    Lvl jaxbOverrideLvl = ll.getJaxbOverrideLvl();
   
    log.debug("Looking at override/instance definition..");
    if (jaxbOverrideLvl!=null) {
     
      Ind ind = getIndFromLvl(jaxbOverrideLvl);
      if (ind!=null) {
        log.debug("Got it..");
        return ind;
      }
    }
   
    // Now do the same for the abstract definition
    log.debug("Looking at abstract definition..");
    Lvl abstractLvl = ll.getJaxbAbstractLvl();
    Ind ind = getIndFromLvl(abstractLvl);
   
    return ind;
  }
View Full Code Here


   * @param pPrDirectIndent
   * @param numberingIndent
   */
  public Indent(Ind pPrDirectIndent, Ind numberingIndent) {
   
    Ind val=Context.getWmlObjectFactory().createPPrBaseInd();
    if (pPrDirectIndent!=null) {
      StyleUtil.apply(pPrDirectIndent, val);
    }
    if (numberingIndent!=null) {
      // Use anything not specifically set already
     
      if (val.getHanging()==null
          && val.getFirstLine()==null // since these are mutually exclusive
          && numberingIndent.getHanging()!=null) {
        val.setHanging(numberingIndent.getHanging());
      }
      if (val.getFirstLine()==null
          && numberingIndent.getFirstLine()!=null) {
        val.setFirstLine(numberingIndent.getFirstLine());
      }
     
      if (val.getLeft()==null
          && numberingIndent.getLeft()!=null) {
        val.setLeft(numberingIndent.getLeft());
      }
    }
   
    this.setObject(val);
   
View Full Code Here

 
  public Indent(CSSValue value) { 
   
    debug(CSS_NAME, value);
   
    Ind ind = Context.getWmlObjectFactory().createPPrBaseInd();
   
    CSSPrimitiveValue cssPrimitiveValue = (CSSPrimitiveValue)value; 
   
    int twip = getTwip(cssPrimitiveValue);
    ind.setLeft(BigInteger.valueOf(twip) );   
    this.setObject(ind);
  }
View Full Code Here

        // Get the Ind value
        NumberingDefinitionsPart ndp = wmlPackage.getMainDocumentPart().getNumberingDefinitionsPart();
        // Force initialisation of maps
        ndp.getEmulator();
       
        Ind ind = ndp.getInd("1", "0");
       
        if (ind!=null) {
          assertEquals( ind.getLeft().toString(), expected[i] );
          System.out.println( "<w:ind w:left='" + ind.getLeft().toString() + "\n\n" );
        } else {
          assertEquals( ind, expected[i] );         
          System.out.println( "w:ind was null\n\n" );
        }
       
View Full Code Here

        // Is there numbering indentation to honour?
        if (pPr.getNumPr()!=null
            && pPr.getNumPr().getNumId()!=null
            && pPr.getNumPr().getNumId().getVal().longValue()!=0 //zero means no numbering
            ) {
          Ind numInd = org.docx4j.model.listnumbering.Emulator.getInd(
                context.getWmlPackage(), pStyleVal,
                pPr.getNumPr().getNumId().getVal().toString(),
                pPr.getNumPr().getIlvl().getVal().toString() );
          if (numInd!=null) {
                Indent indent = new Indent(pPr.getInd(), numInd);
View Full Code Here

TOP

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

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.