OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

Rev 57 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 57 Rev 61
Line 15... Line 15...
15
 
15
 
16
import static java.util.Arrays.asList;
16
import static java.util.Arrays.asList;
17
import org.openconcerto.openoffice.ODPackage.RootElement;
17
import org.openconcerto.openoffice.ODPackage.RootElement;
18
import org.openconcerto.utils.Tuple2;
18
import org.openconcerto.utils.Tuple2;
19
 
19
 
-
 
20
import java.io.File;
-
 
21
 
20
import org.jdom.Document;
22
import org.jdom.Document;
21
import org.jdom.Element;
23
import org.jdom.Element;
22
import org.jdom.Namespace;
24
import org.jdom.Namespace;
23
 
25
 
24
/**
26
/**
Line 110... Line 112...
110
        if (this.getVersion() == XMLVersion.OOo)
112
        if (this.getVersion() == XMLVersion.OOo)
111
            return null;
113
            return null;
112
        return 'f' + this.getExtension();
114
        return 'f' + this.getExtension();
113
    }
115
    }
114
 
116
 
-
 
117
    final File addExt(File f, final boolean flat) {
-
 
118
        final String ext = '.' + (flat ? this.getFlatExtension() : this.getExtension());
-
 
119
        if (!f.getName().endsWith(ext))
-
 
120
            f = new File(f.getParentFile(), f.getName() + ext);
-
 
121
        return f;
-
 
122
    }
-
 
123
 
115
    public final boolean isTemplate() {
124
    public final boolean isTemplate() {
116
        return this.getMimeType().endsWith(TEMPLATE_SUFFIX);
125
        return this.getMimeType().endsWith(TEMPLATE_SUFFIX);
117
    }
126
    }
118
 
127
 
119
    public final ContentTypeVersioned getTemplate() {
128
    public final ContentTypeVersioned getTemplate() {