Ignore:
Timestamp:
06/22/11 01:36:38 (11 months ago)
Author:
jharrop
Message:

Apply Dave Brown's "assorted patches" of 28 April, as described at
 http://dev.plutext.org/forums/docx-java-f6/assorted-patches-t712.html

Location:
trunk/docx4j/src/main/java/org/docx4j/dml
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/docx4j/src/main/java/org/docx4j/dml/CTBlip.java

    r1201 r1555  
    2222package org.docx4j.dml; 
    2323 
     24import org.jvnet.jaxb2_commons.ppp.Child; 
     25 
    2426import java.util.ArrayList; 
    2527import java.util.List; 
    26 import javax.xml.bind.annotation.XmlAccessType; 
    27 import javax.xml.bind.annotation.XmlAccessorType; 
    28 import javax.xml.bind.annotation.XmlAttribute; 
    29 import javax.xml.bind.annotation.XmlElement; 
    30 import javax.xml.bind.annotation.XmlElements; 
    31 import javax.xml.bind.annotation.XmlType; 
     28import javax.xml.bind.Unmarshaller; 
     29import javax.xml.bind.annotation.*; 
    3230 
    3331 
     
    7775    "extLst" 
    7876}) 
    79 public class CTBlip { 
     77public class CTBlip implements Child { 
    8078 
    8179    @XmlElements({ 
     
    106104    @XmlAttribute(namespace = "http://schemas.openxmlformats.org/officeDocument/2006/relationships") 
    107105    protected String link; 
     106    @XmlTransient 
     107    private Object parent; 
    108108 
    109109    /** 
     
    259259        this.link = value; 
    260260    } 
    261  
     261   /** 
     262     * Gets the parent object in the object tree representing the unmarshalled xml document. 
     263     * 
     264     * @return 
     265     *     The parent object. 
     266     */ 
     267    public Object getParent() { 
     268        return this.parent; 
     269    } 
     270 
     271    public void setParent(Object parent) { 
     272        this.parent = parent; 
     273    } 
     274 
     275    /** 
     276     * This method is invoked by the JAXB implementation on each instance when unmarshalling completes. 
     277     * 
     278     * @param parent 
     279     *     The parent object in the object tree. 
     280     * @param unmarshaller 
     281     *     The unmarshaller that generated the instance. 
     282     */ 
     283    public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) { 
     284        setParent(parent); 
     285    } 
    262286} 
  • trunk/docx4j/src/main/java/org/docx4j/dml/wordprocessingDrawing/Anchor.java

    r1041 r1555  
    2222package org.docx4j.dml.wordprocessingDrawing; 
    2323 
    24 import javax.xml.bind.annotation.XmlAccessType; 
    25 import javax.xml.bind.annotation.XmlAccessorType; 
    26 import javax.xml.bind.annotation.XmlAttribute; 
    27 import javax.xml.bind.annotation.XmlElement; 
    28 import javax.xml.bind.annotation.XmlSchemaType; 
    29 import javax.xml.bind.annotation.XmlType; 
     24import javax.xml.bind.Unmarshaller; 
     25import javax.xml.bind.annotation.*; 
     26 
    3027import org.docx4j.dml.CTNonVisualDrawingProps; 
    3128import org.docx4j.dml.CTNonVisualGraphicFrameProperties; 
     
    3330import org.docx4j.dml.CTPositiveSize2D; 
    3431import org.docx4j.dml.Graphic; 
     32import org.jvnet.jaxb2_commons.ppp.Child; 
    3533 
    3634 
     
    8987    "graphic" 
    9088}) 
    91 public class Anchor { 
     89public class Anchor implements Child { 
    9290 
    9391    @XmlElement(required = true) 
     
    133131    @XmlAttribute(required = true) 
    134132    protected boolean allowOverlap; 
    135  
     133    @XmlTransient 
     134    private Object parent; 
    136135    /** 
    137136     * Gets the value of the simplePos property. 
     
    670669    } 
    671670 
     671   /** 
     672     * Gets the parent object in the object tree representing the unmarshalled xml document. 
     673     * 
     674     * @return 
     675     *     The parent object. 
     676     */ 
     677    public Object getParent() { 
     678        return this.parent; 
     679    } 
     680 
     681    public void setParent(Object parent) { 
     682        this.parent = parent; 
     683    } 
     684 
     685    /** 
     686     * This method is invoked by the JAXB implementation on each instance when unmarshalling completes. 
     687     * 
     688     * @param parent 
     689     *     The parent object in the object tree. 
     690     * @param unmarshaller 
     691     *     The unmarshaller that generated the instance. 
     692     */ 
     693    public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) { 
     694        setParent(parent); 
     695    } 
    672696} 
  • trunk/docx4j/src/main/java/org/docx4j/dml/wordprocessingDrawing/Inline.java

    r1041 r1555  
    2222package org.docx4j.dml.wordprocessingDrawing; 
    2323 
    24 import javax.xml.bind.annotation.XmlAccessType; 
    25 import javax.xml.bind.annotation.XmlAccessorType; 
    26 import javax.xml.bind.annotation.XmlAttribute; 
    27 import javax.xml.bind.annotation.XmlElement; 
    28 import javax.xml.bind.annotation.XmlType; 
     24import javax.xml.bind.Unmarshaller; 
     25import javax.xml.bind.annotation.*; 
     26 
    2927import org.docx4j.dml.CTNonVisualDrawingProps; 
    3028import org.docx4j.dml.CTNonVisualGraphicFrameProperties; 
    3129import org.docx4j.dml.CTPositiveSize2D; 
    3230import org.docx4j.dml.Graphic; 
     31import org.jvnet.jaxb2_commons.ppp.Child; 
    3332 
    3433 
     
    6867    "graphic" 
    6968}) 
    70 public class Inline { 
     69public class Inline implements Child { 
    7170 
    7271    @XmlElement(required = true) 
     
    8685    @XmlAttribute 
    8786    protected Long distR; 
    88  
     87    @XmlTransient 
     88    private Object parent; 
    8989    /** 
    9090     * Gets the value of the extent property. 
     
    302302        this.distR = value; 
    303303    } 
    304  
     304    /** 
     305     * Gets the parent object in the object tree representing the unmarshalled xml document. 
     306     * 
     307     * @return 
     308     *     The parent object. 
     309     */ 
     310    public Object getParent() { 
     311        return this.parent; 
     312    } 
     313 
     314    public void setParent(Object parent) { 
     315        this.parent = parent; 
     316    } 
     317 
     318    /** 
     319     * This method is invoked by the JAXB implementation on each instance when unmarshalling completes. 
     320     * 
     321     * @param parent 
     322     *     The parent object in the object tree. 
     323     * @param unmarshaller 
     324     *     The unmarshaller that generated the instance. 
     325     */ 
     326    public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) { 
     327        setParent(parent); 
     328    } 
    305329} 
Note: See TracChangeset for help on using the changeset viewer.