Package org.docx4j.wml

Examples of org.docx4j.wml.Style$Name


                                BigInteger.valueOf(55L).toByteArray())
                            ));
            GeneralName san1 = new GeneralName(1, "rfc@822.Name");
            GeneralName san2 = new GeneralName(2, "dNSName");
            GeneralName san3 = new GeneralName(new ORAddress());
            GeneralName san4 = new GeneralName(new Name("O=Organization"));
            GeneralName san5 =
                new GeneralName(new EDIPartyName("assigner", "party"));
            GeneralName san6 = new GeneralName(6, "http://uniform.Resource.Id");
            GeneralName san7 = new GeneralName(new byte[] {1, 1, 1, 1});
            GeneralName san8 = new GeneralName(8, "1.2.3.4444.55555");
View Full Code Here


        X509CertSelector selector = new X509CertSelector();
        String subject = "O=Organization";
        X500Principal x500Subject = new X500Principal(subject);
        try {
            Name nameSubject = new Name(subject);
            for (int i=0; i<name_constraints.length; i++) {
                // make the subtrees (part of name constraints)
                // this subtrees will be used as permited and as excluded
                GeneralSubtree subtree =
                    new GeneralSubtree(name_constraints[i]);
View Full Code Here

        X509CertSelector selector = new X509CertSelector();
        String subject = "O=Organization";
        X500Principal x500Subject = new X500Principal(subject);
        try {
            Name nameSubject = new Name(subject);
            for (int i=0; i<name_constraints.length; i++) {
                // make the subtrees (part of name constraints)
                // this subtrees will be used as permited and as excluded
                GeneralSubtree subtree =
                    new GeneralSubtree(name_constraints[i]);
View Full Code Here

        X509CertSelector selector = new X509CertSelector();
        try {
            for (int i=0; i<variants.length; i++) {
                // make the names objects
                X500Principal subject = new X500Principal(variants[i][0]);
                Name subject_name = new Name(variants[i][0]);
                GeneralName alt_name = new GeneralName(4, variants[i][1]);
                // make the certificate to be checked
                GeneralNames alt_names_extension = new GeneralNames();
                alt_names_extension.addName(alt_name);
                TestCert certificate = new TestCert(alt_names_extension);
View Full Code Here

                                                        throws IOException {
        // make the TBSCertificate for Certificate
        int version = 2; //v3
        BigInteger serialNumber = BigInteger.valueOf(555L);
        AlgorithmIdentifier signature = new AlgorithmIdentifier("1.2.3.44.555");
        Name issuer = new Name("O=Certificate Issuer");
        Validity validity = new Validity(new Date(100000000),
                                         new Date(200000000));
        SubjectPublicKeyInfo subjectPublicKeyInfo =
            new SubjectPublicKeyInfo(
                    new AlgorithmIdentifier("1.2.840.113549.1.1.2"),
View Full Code Here

         
          // there is also abstractNum.getStyleLink(), but ignore that
         
          String numStyleId = abstractNum.getNumStyleLink().getVal();
         
          Style s = sdp.getStyleById(numStyleId);
          if (s==null) {
            log.warn("For w:numStyleLink, couldn't find style " + numStyleId);
            continue;
          }
          if (s.getPPr()==null || s.getPPr().getNumPr()==null) {
            log.warn("For w:numStyleLink, style " + numStyleId + " has no w:numPr");
            continue;           
          }
         
          NumPr styleNumPr = s.getPPr().getNumPr();
         
          // Get the concrete list this point to
          if (styleNumPr.getNumId()==null) {
            log.warn("For w:numStyleLink, style " + numStyleId + " w:numPr has no w:numId");
            continue;                       
View Full Code Here

            if (rStyle!=null) {
              // Add it
              if (stylesInUse !=null) {
                stylesInUse.add(rStyle.getVal());
                // and linked p style (if any), useful for OpenDoPE XHTML
                Style pStyle = styleDefinitionsPart.getLinkedStyle(rStyle.getVal());
                if (pStyle!=null) {
                  stylesInUse.add(pStyle.getStyleId());
                }
              }
            }
          }
        }
View Full Code Here

     
    styleDocDefaults.setPPr(documentDefaultPPr);
    styleDocDefaults.setRPr(documentDefaultRPr);
   
    // Now point Normal at this
    Style normal = getDefaultParagraphStyle();
    if (normal==null) {
      log.warn("No default paragraph style!!");
      normal = Context.getWmlObjectFactory().createStyle();
      normal.setType("paragraph");
      normal.setStyleId("Normal");
     
      n = Context.getWmlObjectFactory().createStyleName();
      n.setVal("Normal");
      normal.setName(n);
      this.getJaxbElement().getStyle().add(normal)
     
      normal.setDefault(Boolean.TRUE); // @since 3.2.0
    }
   
    BasedOn based = Context.getWmlObjectFactory().createStyleBasedOn();
    based.setVal(ROOT_NAME);   
    normal.setBasedOn(based);
   
    log.info("Set virtual style, id '" + styleDocDefaults.getStyleId() + "', name '"+ styleDocDefaults.getName().getVal() + "'");
   
    log.debug(XmlUtils.marshaltoString(styleDocDefaults, true, true));
   
View Full Code Here

   * @param rStyleVal
   * @return
   */
  public Style getLinkedStyle(String rStyleVal) {
   
    Style rStyle = getStyleById(rStyleVal);
    if (rStyle==null) {
      log.warn("Couldn't find rStyle " + rStyleVal);
      return null;
    } else {
      // We have a run level style.  Is there a linked pStyle?
      Style.Link linkedStyle = rStyle.getLink();
      if (linkedStyle==null) {
        log.warn("No linked style for rStyle " + rStyleVal);             
        return null;
      } else {
        String pStyleVal = linkedStyle.getVal();
        log.debug(rStyleVal + " is linked to style " + pStyleVal );
        Style pStyle = getStyleById(pStyleVal);
       
        if (pStyle==null) {
          log.warn("Couldn't find linked pStyle " + pStyleVal
              + " for rStyle " + rStyleVal);   
        }
View Full Code Here

        (Styles)XmlUtils.unmarshalString(styles_no_font_sz) );
   
    // NB createVirtualStylesForDocDefaults() puts 10pt there, if nothing is specified!
    // So we need to delete that!
    wordMLPackage.getMainDocumentPart().getStyleDefinitionsPart().createVirtualStylesForDocDefaults();
    Style dd = wordMLPackage.getMainDocumentPart().getStyleDefinitionsPart().getStyleById("DocDefaults");
    dd.getRPr().setSz(null);
    dd.getRPr().setSzCs(null);
   
    setSetting(wordMLPackage, OVERRIDE)// table style should get overridden
 
    wordMLPackage.save(new File(System.getProperty("user.dir") + "/OUT_PStyleInTableTest.docx"));
   
    ParagraphStylesInTableFix.process(wordMLPackage);
   
    Style s = getStyle(wordMLPackage, STYLE_NAME);
    Assert.assertTrue(s.getRPr().getSz().getVal().intValue()==40);
  }
View Full Code Here

TOP

Related Classes of org.docx4j.wml.Style$Name

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.