OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

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

Rev 83 Rev 144
Line 14... Line 14...
14
 package org.openconcerto.openoffice;
14
 package org.openconcerto.openoffice;
15
 
15
 
16
import static org.openconcerto.openoffice.ODPackage.RootElement.CONTENT;
16
import static org.openconcerto.openoffice.ODPackage.RootElement.CONTENT;
17
import static org.openconcerto.openoffice.ODPackage.RootElement.META;
17
import static org.openconcerto.openoffice.ODPackage.RootElement.META;
18
import static org.openconcerto.openoffice.ODPackage.RootElement.STYLES;
18
import static org.openconcerto.openoffice.ODPackage.RootElement.STYLES;
-
 
19
 
19
import org.openconcerto.openoffice.spreadsheet.SpreadSheet;
20
import org.openconcerto.openoffice.spreadsheet.SpreadSheet;
20
import org.openconcerto.openoffice.text.TextDocument;
21
import org.openconcerto.openoffice.text.TextDocument;
21
import org.openconcerto.utils.CopyUtils;
22
import org.openconcerto.utils.CopyUtils;
22
import org.openconcerto.utils.ExceptionUtils;
23
import org.openconcerto.utils.ExceptionUtils;
23
import org.openconcerto.utils.FileUtils;
24
import org.openconcerto.utils.FileUtils;
Line 60... Line 61...
60
import java.util.Map.Entry;
61
import java.util.Map.Entry;
61
import java.util.Properties;
62
import java.util.Properties;
62
import java.util.Set;
63
import java.util.Set;
63
import java.util.zip.ZipEntry;
64
import java.util.zip.ZipEntry;
64
 
65
 
65
import net.jcip.annotations.GuardedBy;
-
 
66
 
-
 
67
import org.jdom.Attribute;
66
import org.jdom.Attribute;
68
import org.jdom.DocType;
67
import org.jdom.DocType;
69
import org.jdom.Document;
68
import org.jdom.Document;
70
import org.jdom.Element;
69
import org.jdom.Element;
71
import org.jdom.JDOMException;
70
import org.jdom.JDOMException;
72
import org.jdom.Namespace;
71
import org.jdom.Namespace;
73
import org.jdom.output.Format;
72
import org.jdom.output.Format;
74
import org.jdom.output.XMLOutputter;
73
import org.jdom.output.XMLOutputter;
75
 
74
 
-
 
75
import net.jcip.annotations.GuardedBy;
-
 
76
 
76
/**
77
/**
77
 * An OpenDocument package, ie a zip containing XML documents and their associated files.
78
 * An OpenDocument package, ie a zip containing XML documents and their associated files.
78
 * 
79
 * 
79
 * @author ILM Informatique 2 août 2004
80
 * @author ILM Informatique 2 août 2004
80
 */
81
 */
Line 1179... Line 1180...
1179
        // set the generator
1180
        // set the generator
1180
        ProductInfo productInfo = ProductInfo.getInstance();
1181
        ProductInfo productInfo = ProductInfo.getInstance();
1181
        if (productInfo == null) {
1182
        if (productInfo == null) {
1182
            // do *not* use "/product.properties" as it might interfere with products using this
1183
            // do *not* use "/product.properties" as it might interfere with products using this
1183
            // framework
1184
            // framework
1184
            final Properties props = PropertiesUtils.createFromResource(this.getClass(), "product.properties");
1185
            Properties props = PropertiesUtils.createFromResource(this.getClass(), "product.properties");
-
 
1186
            if (props == null) {
-
 
1187
                Log.get().warning("Neither ProductInfo singleton nor product.properties for " + this.getClass());
-
 
1188
                props = new Properties();
-
 
1189
            }
1185
            props.put(ProductInfo.NAME, this.getClass().getName());
1190
            props.put(ProductInfo.NAME, this.getClass().getName());
1186
            productInfo = new ProductInfo(props);
1191
            productInfo = new ProductInfo(props);
1187
        }
1192
        }
1188
        final String generator;
1193
        final String generator;
1189
        if (productInfo.getVersion() == null)
1194
        if (productInfo.getVersion() == null)