OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

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

Rev 20 Rev 25
Line 12... Line 12...
12
 */
12
 */
13
 
13
 
14
 package org.openconcerto.openoffice.style.data;
14
 package org.openconcerto.openoffice.style.data;
15
 
15
 
16
import org.openconcerto.openoffice.ODPackage;
16
import org.openconcerto.openoffice.ODPackage;
-
 
17
import org.openconcerto.openoffice.ODValueType;
17
import org.openconcerto.openoffice.XMLVersion;
18
import org.openconcerto.openoffice.XMLVersion;
18
import org.openconcerto.openoffice.spreadsheet.CellStyle;
19
import org.openconcerto.openoffice.spreadsheet.CellStyle;
19
 
20
 
20
import java.util.List;
21
import java.util.List;
21
 
22
 
Line 31... Line 32...
31
            return new PercentStyle(pkg, e);
32
            return new PercentStyle(pkg, e);
32
        }
33
        }
33
    };
34
    };
34
 
35
 
35
    public PercentStyle(final ODPackage pkg, Element elem) {
36
    public PercentStyle(final ODPackage pkg, Element elem) {
36
        super(pkg, elem, Number.class);
37
        super(pkg, elem, ODValueType.PERCENTAGE);
-
 
38
    }
-
 
39
 
-
 
40
    @Override
-
 
41
    protected Object convertNonNull(Object o) {
-
 
42
        return NumberStyle.toNumber(o, getEpoch());
37
    }
43
    }
38
 
44
 
39
    @Override
45
    @Override
40
    public String format(Object o, CellStyle defaultStyle, boolean lenient) {
46
    public String format(Object o, CellStyle defaultStyle, boolean lenient) {
41
        final Number n = (Number) o;
47
        final Number n = (Number) o;