Package org.docx4j.wml

Examples of org.docx4j.wml.CTTabStop


    }
    return destination;
  }

  public static Tabs apply(Tabs source, Tabs destination) {
  CTTabStop sourceTabStop = null;
  CTTabStop destinationTabStop = null;
    //Tabs are relative to each other, therefore if there are any tabs in the source
    //they should replace those in the destination and not be added to the destination.
    if (!isEmpty(source)) {
      if (destination == null)
        destination = Context.getWmlObjectFactory().createTabs();
     
      destination.getTab().clear();
      for (int i=0; i<source.getTab().size(); i++) {
        sourceTabStop = source.getTab().get(i);
        destinationTabStop = Context.getWmlObjectFactory().createCTTabStop();
        destinationTabStop.setLeader(sourceTabStop.getLeader()); //enum
        destinationTabStop.setPos(sourceTabStop.getPos()); //atomic
        destinationTabStop.setVal(sourceTabStop.getVal()); //enum
       
        if (destinationTabStop != null) {
          destination.getTab().add(destinationTabStop);
        }
      }
View Full Code Here


//          && pPr.getPStyle()!=null
//          && pPr.getPStyle().getVal()!=null
//          && pPr.getPStyle().getVal().startsWith("TOC") 
          ) {
       
        CTTabStop tabStop = pPr.getTabs().getTab().get(0);
        if (tabStop!=null
            //&& tabStop.getLeader().equals(STTabTlc.DOT)
            && tabStop.getVal().equals(STTabJc.RIGHT) ) {
         
          foBlockElement.setAttribute("text-align-last""justify");
        }
      }
     
View Full Code Here

    if (!conversionContext.isInComplexFieldDefinition()) {
           
        if (pPr!=null && pPr.getTabs()!=null) {
         
          // xsl:when test="count($p/w:pPr/w:tabs/w:tab[1][@w:leader='dot' and @w:val='right'])=1"
          CTTabStop tabStop = pPr.getTabs().getTab().get(0);
          if (tabStop!=null
              && tabStop.getLeader().equals(STTabTlc.DOT)
              && tabStop.getVal().equals(STTabJc.RIGHT) ) {
           
          // <fo:leader leader-length.minimum="12pt" leader-length.optimum="40pt"
          //        leader-length.maximum="100%" leader-pattern="dots">
            Element foLeader = document.createElementNS(XSL_FO, "leader");           
            foLeader.setAttribute("leader-length.minimum""12pt");
View Full Code Here

//          && pPr.getPStyle()!=null
//          && pPr.getPStyle().getVal()!=null
//          && pPr.getPStyle().getVal().startsWith("TOC") 
          ) {
       
        CTTabStop tabStop = pPr.getTabs().getTab().get(0);
        if (tabStop!=null
            //&& tabStop.getLeader().equals(STTabTlc.DOT)
            && tabStop.getVal().equals(STTabJc.RIGHT) ) {
         
          foBlockElement.setAttribute("text-align-last""justify");
        }
      }
     
View Full Code Here

TOP

Related Classes of org.docx4j.wml.CTTabStop

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.