Package org.docx4j.openpackaging.parts.relationships.AlteredParts

Examples of org.docx4j.openpackaging.parts.relationships.AlteredParts.Alterations.debug()


    WordprocessingMLPackage otherPackage = WordprocessingMLPackage.load(
        new java.io.File(resourceDir + "paragraph-two.docx"));
   
    Alterations alterations = AlteredParts.start(thisPackage, otherPackage);

    alterations.debug();
       
    assertTrue( alterations.getPartsAdded().size()==0 );
    assertTrue( alterations.getPartsModified().size()==1 );
    assertTrue( alterations.getPartsDeleted().size()==0 );
   
View Full Code Here


    WordprocessingMLPackage otherPackage = WordprocessingMLPackage.load(
        new java.io.File(resourceDir + "paragraph-single.docx"));
   
    Alterations alterations = AlteredParts.start(thisPackage, otherPackage);

    alterations.debug();
       
    assertTrue( alterations.getPartsAdded().size()==0 );
    assertTrue( alterations.getPartsModified().size()==3 );
    assertTrue( alterations.getPartsDeleted().size()==0 );
   
View Full Code Here

    WordprocessingMLPackage otherPackage = WordprocessingMLPackage.load(
        new java.io.File(resourceDir + "image-png1-scaled.docx"));
   
    Alterations alterations = AlteredParts.start(thisPackage, otherPackage);

    alterations.debug();
       
    assertTrue( alterations.getPartsAdded().size()==0 );
    assertTrue( alterations.getPartsModified().size()==1 );
    assertTrue( alterations.getPartsDeleted().size()==0 );
   
View Full Code Here

    WordprocessingMLPackage otherPackage = WordprocessingMLPackage.load(
        new java.io.File(resourceDir + "image-png2.docx"));
   
    Alterations alterations = AlteredParts.start(thisPackage, otherPackage);

    alterations.debug();
       
    assertTrue( alterations.getPartsAdded().size()==0 );
    assertTrue( alterations.getPartsModified().size()==2 );
    assertTrue( alterations.getPartsDeleted().size()==0 );
   
View Full Code Here

    WordprocessingMLPackage otherPackage = WordprocessingMLPackage.load(
        new java.io.File(resourceDir + "image-png2.docx"));
   
    Alterations alterations = AlteredParts.start(thisPackage, otherPackage);

    alterations.debug();
       
    assertTrue( alterations.getPartsAdded().size()==2 );
    assertTrue( alterations.getPartsModified().size()==2 );
    assertTrue( alterations.getPartsDeleted().size()==1 );
   
View Full Code Here

    WordprocessingMLPackage otherPackage = WordprocessingMLPackage.load(
        new java.io.File(resourceDir + "images-png2 then jpg.docx"));
   
    Alterations alterations = AlteredParts.start(thisPackage, otherPackage);

    alterations.debug();
       
    assertTrue( alterations.getPartsAdded().size()==2 );
    assertTrue( alterations.getPartsModified().size()==2 );
    assertTrue( alterations.getPartsDeleted().size()==2 );
   
View Full Code Here

    WordprocessingMLPackage otherPackage = WordprocessingMLPackage.load(
        new java.io.File(resourceDir + "paragraph-single.docx"));
   
    Alterations alterations = AlteredParts.start(thisPackage, otherPackage);

    alterations.debug();
       
    assertTrue( alterations.getPartsAdded().size()==8 );
    assertTrue( alterations.getPartsModified().size()==3 );
    assertTrue( alterations.getPartsDeleted().size()==0 );
   
View Full Code Here

    WordprocessingMLPackage otherPackage = WordprocessingMLPackage.load(
        new java.io.File(resourceDir + "header-simple.docx"));
   
    Alterations alterations = AlteredParts.start(thisPackage, otherPackage);

    alterations.debug();
       
    assertTrue( alterations.getPartsAdded().size()==0 ); // one of the existing header parts is re-purposed
    assertTrue( alterations.getPartsModified().size()==4 );
    assertTrue( alterations.getPartsDeleted().size()==4 );
   
View Full Code Here

    WordprocessingMLPackage otherPackage = WordprocessingMLPackage.load(
        new java.io.File(resourceDir + "header-simple.docx"));
   
    Alterations alterations = AlteredParts.start(thisPackage, otherPackage);

    alterations.debug();
       
    assertTrue( alterations.getPartsAdded().size()==1 );
//    assertTrue( alterations.getPartsModified().size()==2 ); // FIXME
    assertTrue( alterations.getPartsDeleted().size()==0 );
   
View Full Code Here

    WordprocessingMLPackage otherPackage = WordprocessingMLPackage.load(
        new java.io.File(resourceDir + "paragraph-single.docx"));
   
    Alterations alterations = AlteredParts.start(thisPackage, otherPackage);

    alterations.debug();
       
    assertTrue( alterations.getPartsAdded().size()==1 );
    assertTrue( alterations.getPartsModified().size()==3 );
    assertTrue( alterations.getPartsDeleted().size()==0 );
   
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.