Ignore:
Timestamp:
01/05/12 03:06:51 (5 months ago)
Author:
jharrop
Message:

Add element name="compatSetting" and type="CT_CompatSetting" from ECMA-376 2ed to wml, so Word 2010 can detect docx as native

Location:
trunk/docx4j/src/main/java/org/docx4j/wml
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/docx4j/src/main/java/org/docx4j/wml/CTCompat.java

    r1129 r1741  
    11/* 
    2  *  Copyright 2007-2008, Plutext Pty Ltd. 
     2 *  Copyright 2007-2012, Plutext Pty Ltd. 
    33 *    
    44 *  This file is part of docx4j. 
     
    2222package org.docx4j.wml; 
    2323 
     24import java.util.ArrayList; 
     25import java.util.List; 
    2426import javax.xml.bind.Unmarshaller; 
    2527import javax.xml.bind.annotation.XmlAccessType; 
     
    105107 *         <element name="useAnsiKerningPairs" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}BooleanDefaultTrue" minOccurs="0"/> 
    106108 *         <element name="cachedColBalance" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}BooleanDefaultTrue" minOccurs="0"/> 
     109 *         <element name="compatSetting" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}CT_CompatSetting" maxOccurs="unbounded" minOccurs="0"/> 
    107110 *       </sequence> 
    108111 *     </restriction> 
     
    179182    "doNotVertAlignInTxbx", 
    180183    "useAnsiKerningPairs", 
    181     "cachedColBalance" 
     184    "cachedColBalance", 
     185    "compatSetting" 
    182186}) 
    183187public class CTCompat 
     
    250254    protected BooleanDefaultTrue useAnsiKerningPairs; 
    251255    protected BooleanDefaultTrue cachedColBalance; 
     256    protected List<CTCompatSetting> compatSetting; 
    252257    @XmlTransient 
    253258    private Object parent; 
     
    18111816    public void setCachedColBalance(BooleanDefaultTrue value) { 
    18121817        this.cachedColBalance = value; 
     1818    } 
     1819 
     1820    /** 
     1821     * Gets the value of the compatSetting property. 
     1822     *  
     1823     * <p> 
     1824     * This accessor method returns a reference to the live list, 
     1825     * not a snapshot. Therefore any modification you make to the 
     1826     * returned list will be present inside the JAXB object. 
     1827     * This is why there is not a <CODE>set</CODE> method for the compatSetting property. 
     1828     *  
     1829     * <p> 
     1830     * For example, to add a new item, do as follows: 
     1831     * <pre> 
     1832     *    getCompatSetting().add(newItem); 
     1833     * </pre> 
     1834     *  
     1835     *  
     1836     * <p> 
     1837     * Objects of the following type(s) are allowed in the list 
     1838     * {@link CTCompatSetting } 
     1839     *  
     1840     *  
     1841     */ 
     1842    public List<CTCompatSetting> getCompatSetting() { 
     1843        if (compatSetting == null) { 
     1844            compatSetting = new ArrayList<CTCompatSetting>(); 
     1845        } 
     1846        return this.compatSetting; 
    18131847    } 
    18141848 
  • trunk/docx4j/src/main/java/org/docx4j/wml/ObjectFactory.java

    r1471 r1741  
    343343        return new CTCompat(); 
    344344    } 
     345     
     346    /** 
     347     * Create an instance of {@link CTCompatSetting } 
     348     *  
     349     */ 
     350    public CTCompatSetting createCTCompatSetting() { 
     351        return new CTCompatSetting(); 
     352    }     
    345353 
    346354    /** 
Note: See TracChangeset for help on using the changeset viewer.