OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

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

Rev 174 Rev 180
Line 52... Line 52...
52
    static final boolean isShort(final Element elem) {
52
    static final boolean isShort(final Element elem) {
53
        // in OOo the default is short
53
        // in OOo the default is short
54
        return !"long".equals(elem.getAttributeValue("style", elem.getNamespace("number")));
54
        return !"long".equals(elem.getAttributeValue("style", elem.getNamespace("number")));
55
    }
55
    }
56
 
56
 
57
    static final Locale getElementLocale(final Element elem) {
-
 
58
        final Locale res;
-
 
59
        final String country = elem.getAttributeValue("country", elem.getNamespace());
-
 
60
        final String lang = elem.getAttributeValue("language", elem.getNamespace());
-
 
61
        if (lang != null) {
-
 
62
            res = new Locale(lang, country == null ? "" : country);
-
 
63
        } else {
-
 
64
            res = null;
-
 
65
        }
-
 
66
        return res;
-
 
67
    }
-
 
68
 
-
 
69
    private static final Calendar getCalendar(final Element elem, Calendar defaultCal) {
57
    private static final Calendar getCalendar(final Element elem, Calendar defaultCal) {
70
        final Calendar res;
58
        final Calendar res;
71
        final String cal = elem.getAttributeValue("calendar", elem.getNamespace());
59
        final String cal = elem.getAttributeValue("calendar", elem.getNamespace());
72
        if (cal == null) {
60
        if (cal == null) {
73
            res = defaultCal;
61
            res = defaultCal;