Package org.docx4j.openpackaging.packages

Examples of org.docx4j.openpackaging.packages.WordprocessingMLPackage.save()


    ps.setVal("testStyle");
    ppr.setPStyle(ps);
   
    setSetting(wordMLPackage, OVERRIDE);

    wordMLPackage.save(new File(System.getProperty("user.dir") + "/OUT_PStyleInTableTest.docx"));
   
    ParagraphStylesInTableFix.process(wordMLPackage);
   
//    // Revert style and save:
//    ppr.setPStyle(ps); // doesn't work - wrong ref!
View Full Code Here


    ps.setVal("testStyle");
    ppr.setPStyle(ps);
   
    setSetting(wordMLPackage, OVERRIDE);

    wordMLPackage.save(new File(System.getProperty("user.dir") + "/OUT_PStyleInTableTest.docx"));
   
    ParagraphStylesInTableFix.process(wordMLPackage);
   
//    // Revert style and save:
//    ppr.setPStyle(ps); // doesn't work - wrong ref!
View Full Code Here

    wordMLPackage.getMainDocumentPart().getStyleDefinitionsPart().setContents(
        (Styles)XmlUtils.unmarshalString(styles_no_font_sz) );

    setSetting(wordMLPackage, OVERRIDE)// table style should get overridden
   
    wordMLPackage.save(new File(System.getProperty("user.dir") + "/OUT_PStyleInTableTest.docx"));
   
    // 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");
View Full Code Here

    ps.setVal("testStyle");
    ppr.setPStyle(ps);
   
    setSetting(wordMLPackage, OVERRIDE)// table style should get overridden
 
    wordMLPackage.save(new File(System.getProperty("user.dir") + "/OUT_PStyleInTableTest.docx"));
   
    ParagraphStylesInTableFix.process(wordMLPackage);
   
//    // Revert style and save:
//    ppr.setPStyle(ps); // doesn't work - wrong ref!
View Full Code Here

    ps.setVal("testStyle");
    ppr.setPStyle(ps);
   
    setSetting(wordMLPackage, OVERRIDE);

    wordMLPackage.save(new File(System.getProperty("user.dir") + "/OUT_PStyleInTableTest.docx"));
   
    ParagraphStylesInTableFix.process(wordMLPackage);
   
//    // Revert style and save:
//    ppr.setPStyle(ps); // doesn't work - wrong ref!
View Full Code Here

    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

    ps.setVal("testStyle");
    ppr.setPStyle(ps);
   
    setSetting(wordMLPackage, OVERRIDE)// table style should get overridden
 
    wordMLPackage.save(new File(System.getProperty("user.dir") + "/OUT_PStyleInTableTest.docx"));
   
    ParagraphStylesInTableFix.process(wordMLPackage);
   
//    // Revert style and save:
//    ppr.setPStyle(ps); // doesn't work - wrong ref!
View Full Code Here

    ps.setVal("testStyle");
    ppr.setPStyle(ps);
   
    setSetting(wordMLPackage, OVERRIDE);

    wordMLPackage.save(new File(System.getProperty("user.dir") + "/OUT_PStyleInTableTest.docx"));
   
    ParagraphStylesInTableFix.process(wordMLPackage);
   
//    // Revert style and save:
//    ppr.setPStyle(ps); // doesn't work - wrong ref!
View Full Code Here

        (Document)XmlUtils.unmarshalString(mdpXml_tblStyle) );
    wordMLPackage.getMainDocumentPart().getStyleDefinitionsPart().setContents(
        (Styles)XmlUtils.unmarshalString(styles_no_font_sz) );

    setSetting(wordMLPackage, OVERRIDE);
    wordMLPackage.save(new File(System.getProperty("user.dir") + "/OUT_PStyleInTableTest.docx"));
    // TODO make this change in other AllSilent tests

   
    // NB createVirtualStylesForDocDefaults() puts 10pt there, if nothing is specified!
    // So we need to delete that!
View Full Code Here

    ps.setVal("testStyle");
    ppr.setPStyle(ps);
   
    setSetting(wordMLPackage, OVERRIDE);

    wordMLPackage.save(new File(System.getProperty("user.dir") + "/OUT_PStyleInTableTest.docx"));
   
    ParagraphStylesInTableFix.process(wordMLPackage);
   
//    // Revert style and save:
//    ppr.setPStyle(ps); // doesn't work - wrong ref!
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.