Package org.docx4j.model.properties.paragraph

Examples of org.docx4j.model.properties.paragraph.Indent


             
              // Indent (setting provisional-distance-between-starts)
              // Indent on direct pPr trumps indent in pPr in numbering, which trumps indent
            // specified in a style.  Well, not exactly, components which aren't set in
              // the direct formatting will be contributed by the numbering's indent settings
              Indent indent = new Indent(pPrDirect.getInd(), triple.getIndent());
              if (indent.isHanging() ) {
              indent.setXslFOListBlock(foListBlock, -1);               
              } else {
               
                int numWidth = 90 * numChars; // crude .. TODO take font size into account
               
                  int pdbs = getDistanceToNextTabStop(context, indent.getNumberPosition(), numWidth,
                      pPrDirect.getTabs(), context.getWmlPackage().getMainDocumentPart().getDocumentSettingsPart());
              indent.setXslFOListBlock(foListBlock, pdbs);                               
              }
            indentHandledByNumbering = true;
             
//              // Set the font
//              if (triple.getNumFont()!=null) {
View Full Code Here


          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);
                pPr.setInd((Ind)indent.getObject());           
          }
        }
       
        StringBuilder inlineStyle =  new StringBuilder();
        HtmlCssHelper.createCss(context.getWmlPackage(), pPr, inlineStyle, ignoreBorders);       
View Full Code Here

       
            // Indent (setting provisional-distance-between-starts)
            // Indent on direct pPr trumps indent in pPr in numbering, which trumps indent
          // specified in a style.  Well, not exactly, components which aren't set in
            // the direct formatting will be contributed by the numbering's indent settings
            Indent indent = new Indent(pPrDirect.getInd(), triple.getIndent());
            if (indent.isHanging() ) {
            indent.setXslFOListBlock(foListBlock, -1);               
            } else {
             
              int numWidth = 90 * numChars; // crude .. TODO take font size into account
             
                int pdbs = XsltFOFunctions.getDistanceToNextTabStop(conversionContext, indent.getNumberPosition(), numWidth,
                    pPrDirect.getTabs(), conversionContext.getWmlPackage().getMainDocumentPart().getDocumentSettingsPart());
            indent.setXslFOListBlock(foListBlock, pdbs);                               
            }
        indentHandledByNumbering = true;        
               
        foBlockElement = document.createElementNS(XSL_FO,
            "block");
View Full Code Here

//    if (pPr.getKinsoku() != null)
//      dest.setKinsoku(pPr.getKinsoku());
//    if (pPr.getMirrorIndents() != null)
//      dest.setMirrorIndents(pPr.getMirrorIndents());
   
    Indent indent = null;
    if (pPr.getNumPr() == null) {
      log.debug("No numPr.. ") ;                  
    } else {
      // Numbering is mostly handled directly in the HTML & PDF stylesheets     
      properties.add(new NumberingProperty(pPr.getNumPr()));
    }
   
    if (pPr.getInd() != null) {
      log.debug("Indent from ppr: " + XmlUtils.marshaltoString(pPr.getInd(),  true, true)) ;
      properties.add(new Indent(pPr.getInd()));     
    }
   
    if (pPr.getOutlineLvl() != null)
      properties.add(new OutlineLevel(pPr.getOutlineLvl()));
   
View Full Code Here

      }
     
      // Paragraph properties
      if (name.equals(Indent.CSS_NAME )) {
        // left
        return new Indent(value);
      } else if (name.equals(Justification.CSS_NAME )) {
        // text-align
        return new Justification(value);
      } else if (name.equals(KeepNext.CSS_NAME )) {
        // page-break-after
View Full Code Here

TOP

Related Classes of org.docx4j.model.properties.paragraph.Indent

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.