OpenConcerto

Dépôt officiel du code source de l'ERP OpenConcerto
sonarqube

svn://code.openconcerto.org/openconcerto

Rev

Rev 83 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 83 Rev 180
Line 15... Line 15...
15
 * Créé le 28 oct. 2004
15
 * Créé le 28 oct. 2004
16
 */
16
 */
17
package org.openconcerto.openoffice;
17
package org.openconcerto.openoffice;
18
 
18
 
19
import org.openconcerto.openoffice.ODPackage.RootElement;
19
import org.openconcerto.openoffice.ODPackage.RootElement;
-
 
20
import org.openconcerto.utils.cache.LRUMap;
20
import org.openconcerto.utils.cc.IFactory;
21
import org.openconcerto.utils.cc.IFactory;
21
import org.openconcerto.xml.JDOMUtils;
22
import org.openconcerto.xml.JDOMUtils;
22
import org.openconcerto.xml.Validator;
23
import org.openconcerto.xml.Validator;
23
import org.openconcerto.xml.XPathUtils;
24
import org.openconcerto.xml.XPathUtils;
24
 
25
 
25
import java.util.ArrayList;
26
import java.util.ArrayList;
26
import java.util.Collections;
27
import java.util.Collections;
27
import java.util.HashMap;
28
import java.util.HashMap;
28
import java.util.Iterator;
29
import java.util.Iterator;
29
import java.util.LinkedHashMap;
-
 
30
import java.util.List;
30
import java.util.List;
31
import java.util.Map;
31
import java.util.Map;
32
import java.util.Set;
32
import java.util.Set;
33
 
33
 
34
import org.jdom.Content;
34
import org.jdom.Content;
Line 111... Line 111...
111
        if (content == null)
111
        if (content == null)
112
            throw new NullPointerException("null document");
112
            throw new NullPointerException("null document");
113
        this.content = content;
113
        this.content = content;
114
        this.version = version;
114
        this.version = version;
115
        this.childCreator = new ChildCreator(this.content.getRootElement(), ELEMS_ORDER.get(this.getVersion()));
115
        this.childCreator = new ChildCreator(this.content.getRootElement(), ELEMS_ORDER.get(this.getVersion()));
116
        this.styleNamesLast = new LinkedHashMap<String, Integer>(4, 0.75f, true) {
116
        this.styleNamesLast = new LRUMap<>(15, 4);
117
            @Override
-
 
118
            protected boolean removeEldestEntry(java.util.Map.Entry<String, Integer> eldest) {
-
 
119
                return this.size() > 15;
-
 
120
            }
-
 
121
        };
-
 
122
    }
117
    }
123
 
118
 
124
    public ODXMLDocument(Document content) {
119
    public ODXMLDocument(Document content) {
125
        this(content, XMLFormatVersion.get(content.getRootElement()));
120
        this(content, XMLFormatVersion.get(content.getRootElement()));
126
    }
121
    }