Commit 9dab56d4 authored by Andreas J. Guelzow 's avatar Andreas J. Guelzow

replace gnm:style with gnm:am-prefix and gnm:pm-prefix

2015-04-12  Andreas J. Guelzow <aguelzow@pyrshep.ca>

	* ods-ext-schema.patch: replace gnm:style with gnm:am-suffix and gnm:pm-suffix

2016-01-01  Andreas J. Guelzow <aguelzow@pyrshep.ca>

	* openoffice-read.c (oo_date_am_pm): read new foreign attributes
	gnm:am-suffix and gnm:pm-suffix

2016-01-01  Andreas J. Guelzow <aguelzow@pyrshep.ca>

	* odf-foreign.txt: replace gnm:style attribute with
	gnm:am-suffix and gnm:pm-suffix
parent 29527c8f
2016-01-01 Andreas J. Guelzow <aguelzow@pyrshep.ca>
* odf-foreign.txt: replace gnm:style attribute with
gnm:am-suffix and gnm:pm-suffix
2016-01-01 Andreas J. Guelzow <aguelzow@pyrshep.ca> 2016-01-01 Andreas J. Guelzow <aguelzow@pyrshep.ca>
* odf-foreign.txt: add gnm:style attribute * odf-foreign.txt: add gnm:style attribute
......
...@@ -10,8 +10,8 @@ Part 1: In ODF 1.0 and 1.1 files only. ...@@ -10,8 +10,8 @@ Part 1: In ODF 1.0 and 1.1 files only.
gnm:no-integer-part gnm:no-integer-part
An attribute to <number:fraction> determining whether an integer portion is shown or not. Defaults to "false" (i.e. an integer part is shown.) An attribute to <number:fraction> determining whether an integer portion is shown or not. Defaults to "false" (i.e. an integer part is shown.)
gnm:style gnm:am-suffix gnm:pm-suffix
An attribute to <number:am-pm> with possible values short and long determining whether the am/pm prefix is a/p or AM/PM.) Attributes to <number:am-pm> determining the suffixes to be used.)
2) Attributes added by Gnumeric: 2) Attributes added by Gnumeric:
......
2016-01-01 Andreas J. Guelzow <aguelzow@pyrshep.ca>
* openoffice-read.c (oo_date_am_pm): read new foreign attributes
gnm:am-suffix and gnm:pm-suffix
2016-01-01 Andreas J. Guelzow <aguelzow@pyrshep.ca> 2016-01-01 Andreas J. Guelzow <aguelzow@pyrshep.ca>
* openoffice-read.c (oo_date_am_pm): read new foreign attribute * openoffice-read.c (oo_date_am_pm): read new foreign attribute
......
...@@ -5021,15 +5021,29 @@ static void ...@@ -5021,15 +5021,29 @@ static void
oo_date_am_pm (GsfXMLIn *xin, G_GNUC_UNUSED xmlChar const **attrs) oo_date_am_pm (GsfXMLIn *xin, G_GNUC_UNUSED xmlChar const **attrs)
{ {
OOParseState *state = (OOParseState *)xin->user_state; OOParseState *state = (OOParseState *)xin->user_state;
gboolean is_short = FALSE; gchar const *am_suffix = "AM";
gchar const *pm_suffix = "PM";
for (; attrs != NULL && attrs[0] && attrs[1] ; attrs += 2) for (; attrs != NULL && attrs[0] && attrs[1] ; attrs += 2)
if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_GNUM_NS_EXT, "style")) if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_GNUM_NS_EXT, "am-suffix"))
is_short = attr_eq (attrs[1], "short"); am_suffix = CXML2C (attrs[1]);
else if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_GNUM_NS_EXT, "pm-suffix"))
if (state->cur_format.accum != NULL) pm_suffix = CXML2C (attrs[1]);
g_string_append (state->cur_format.accum, is_short ? "a/p" : "AM/PM");
if (strlen (am_suffix) > 2 || (*am_suffix != 'a' && *am_suffix != 'A') ||
(*(am_suffix + 1) != 'm' && *(am_suffix + 1) != 'M' && *(am_suffix + 1) != 0))
am_suffix = "AM";
if (strlen (pm_suffix) > 2 || (*pm_suffix != 'p' && *pm_suffix != 'P') ||
(*(pm_suffix + 1) != 'm' && *(pm_suffix + 1) != 'M' && *(pm_suffix + 1) != 0))
pm_suffix = "PM";
if (strlen (am_suffix) != strlen (pm_suffix))
pm_suffix = am_suffix = "AM";
if (state->cur_format.accum != NULL) {
g_string_append (state->cur_format.accum, am_suffix);
g_string_append_c (state->cur_format.accum, '/');
g_string_append (state->cur_format.accum, pm_suffix);
}
} }
static void static void
......
2015-04-12 Andreas J. Guelzow <aguelzow@pyrshep.ca>
* ods-ext-schema.patch: replace gnm:style with gnm:am-suffix and gnm:pm-suffix
2015-12-28 Morten Welinder <terra@gnome.org> 2015-12-28 Morten Welinder <terra@gnome.org>
* Release 1.12.26 * Release 1.12.26
......
--- ods-schema/OpenDocument-v1.2-os-schema.rng 2015-01-28 18:46:19.155715877 -0500 --- ods-schema/OpenDocument-v1.2-os-schema.rng 2015-04-08 21:49:54.000000000 -0600
+++ ods-schema/OpenDocument-v1.2-os-ext-schema.rng 2016-01-01 19:44:25.464059435 -0500 +++ ods-schema/OpenDocument-v1.2-os-ext-schema.rng 2016-01-01 19:47:48.204868483 -0700
@@ -62,6 +62,12 @@ @@ -62,6 +62,12 @@
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0"
...@@ -253,20 +253,25 @@ ...@@ -253,20 +253,25 @@
<optional> <optional>
<attribute name="number:style"> <attribute name="number:style">
<choice> <choice>
@@ -13047,7 +13137,11 @@ @@ -13047,7 +13137,16 @@
</define> </define>
<define name="number-am-pm"> <define name="number-am-pm">
<element name="number:am-pm"> <element name="number:am-pm">
- <empty/> - <empty/>
+ <optional> + <optional>
+ <attribute name="gnm:style"> + <attribute name="gnm:am-suffix">
+ <ref name="string"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="gnm:pm-suffix">
+ <ref name="string"/> + <ref name="string"/>
+ </attribute> + </attribute>
+ </optional> + </optional>
</element> </element>
</define> </define>
<define name="number-boolean-style"> <define name="number-boolean-style">
@@ -13097,7 +13191,15 @@ @@ -13097,7 +13196,15 @@
</define> </define>
<define name="number-text"> <define name="number-text">
<element name="number:text"> <element name="number:text">
...@@ -283,7 +288,7 @@ ...@@ -283,7 +288,7 @@
</element> </element>
</define> </define>
<define name="number-text-content"> <define name="number-text-content">
@@ -13169,6 +13271,11 @@ @@ -13169,6 +13276,11 @@
</choice> </choice>
</attribute> </attribute>
</optional> </optional>
...@@ -295,7 +300,7 @@ ...@@ -295,7 +300,7 @@
</interleave> </interleave>
</define> </define>
<define name="common-auto-reorder-attlist"> <define name="common-auto-reorder-attlist">
@@ -13203,6 +13310,11 @@ @@ -13203,6 +13315,11 @@
</attribute> </attribute>
</optional> </optional>
<optional> <optional>
...@@ -307,7 +312,7 @@ ...@@ -307,7 +312,7 @@
<attribute name="number:grouping"> <attribute name="number:grouping">
<ref name="boolean"/> <ref name="boolean"/>
</attribute> </attribute>
@@ -14101,6 +14213,22 @@ @@ -14101,6 +14218,22 @@
<ref name="string"/> <ref name="string"/>
</attribute> </attribute>
</optional> </optional>
...@@ -330,7 +335,7 @@ ...@@ -330,7 +335,7 @@
</interleave> </interleave>
</define> </define>
<define name="draw-stroke-dash"> <define name="draw-stroke-dash">
@@ -14383,6 +14511,21 @@ @@ -14383,6 +14516,21 @@
<ref name="boolean"/> <ref name="boolean"/>
</attribute> </attribute>
</optional> </optional>
...@@ -352,7 +357,7 @@ ...@@ -352,7 +357,7 @@
</interleave> </interleave>
</define> </define>
<define name="style-page-layout-properties-elements"> <define name="style-page-layout-properties-elements">
@@ -14874,11 +15017,33 @@ @@ -14874,11 +15022,33 @@
</attribute> </attribute>
</optional> </optional>
<optional> <optional>
...@@ -386,7 +391,7 @@ ...@@ -386,7 +391,7 @@
<attribute name="style:text-line-through-mode"> <attribute name="style:text-line-through-mode">
<ref name="lineMode"/> <ref name="lineMode"/>
</attribute> </attribute>
@@ -15090,6 +15255,18 @@ @@ -15090,6 +15260,18 @@
<define name="style-paragraph-properties-attlist"> <define name="style-paragraph-properties-attlist">
<interleave> <interleave>
<optional> <optional>
...@@ -405,7 +410,7 @@ ...@@ -405,7 +410,7 @@
<attribute name="fo:line-height"> <attribute name="fo:line-height">
<choice> <choice>
<value>normal</value> <value>normal</value>
@@ -15461,14 +15638,21 @@ @@ -15461,14 +15643,21 @@
</optional> </optional>
</define> </define>
<define name="common-background-color-attlist"> <define name="common-background-color-attlist">
...@@ -434,7 +439,7 @@ ...@@ -434,7 +439,7 @@
</define> </define>
<define name="style-background-image"> <define name="style-background-image">
<optional> <optional>
@@ -15564,6 +15748,36 @@ @@ -15564,6 +15753,36 @@
<ref name="string"/> <ref name="string"/>
</attribute> </attribute>
</optional> </optional>
...@@ -471,7 +476,7 @@ ...@@ -471,7 +476,7 @@
</define> </define>
<define name="common-border-line-width-attlist"> <define name="common-border-line-width-attlist">
<optional> <optional>
@@ -15904,6 +16118,37 @@ @@ -15904,6 +16123,37 @@
<ref name="boolean"/> <ref name="boolean"/>
</attribute> </attribute>
</optional> </optional>
...@@ -509,7 +514,7 @@ ...@@ -509,7 +514,7 @@
</interleave> </interleave>
</define> </define>
<define name="style-table-properties-elements"> <define name="style-table-properties-elements">
@@ -16004,6 +16249,11 @@ @@ -16004,6 +16254,11 @@
</attribute> </attribute>
</optional> </optional>
<optional> <optional>
...@@ -521,7 +526,7 @@ ...@@ -521,7 +526,7 @@
<attribute name="style:text-align-source"> <attribute name="style:text-align-source">
<choice> <choice>
<value>fix</value> <value>fix</value>
@@ -16028,6 +16278,16 @@ @@ -16028,6 +16283,16 @@
<ref name="common-background-color-attlist"/> <ref name="common-background-color-attlist"/>
<ref name="common-border-attlist"/> <ref name="common-border-attlist"/>
<optional> <optional>
...@@ -538,7 +543,7 @@ ...@@ -538,7 +543,7 @@
<attribute name="style:diagonal-tl-br"> <attribute name="style:diagonal-tl-br">
<ref name="string"/> <ref name="string"/>
</attribute> </attribute>
@@ -16104,6 +16364,16 @@ @@ -16104,6 +16369,16 @@
<ref name="boolean"/> <ref name="boolean"/>
</attribute> </attribute>
</optional> </optional>
...@@ -555,7 +560,7 @@ ...@@ -555,7 +560,7 @@
</interleave> </interleave>
</define> </define>
<define name="common-style-direction-attlist"> <define name="common-style-direction-attlist">
@@ -17060,6 +17330,46 @@ @@ -17060,6 +17335,46 @@
<ref name="nonNegativeInteger"/> <ref name="nonNegativeInteger"/>
</attribute> </attribute>
</optional> </optional>
...@@ -602,7 +607,7 @@ ...@@ -602,7 +607,7 @@
</interleave> </interleave>
</define> </define>
<define name="style-graphic-fill-properties-attlist"> <define name="style-graphic-fill-properties-attlist">
@@ -17388,6 +17698,10 @@ @@ -17388,6 +17703,10 @@
<value>none</value> <value>none</value>
<value>cubic-spline</value> <value>cubic-spline</value>
<value>b-spline</value> <value>b-spline</value>
...@@ -613,7 +618,7 @@ ...@@ -613,7 +618,7 @@
</choice> </choice>
</attribute> </attribute>
</optional> </optional>
@@ -17661,6 +17975,10 @@ @@ -17661,6 +17980,10 @@
<value>logarithmic</value> <value>logarithmic</value>
<value>exponential</value> <value>exponential</value>
<value>power</value> <value>power</value>
...@@ -624,7 +629,7 @@ ...@@ -624,7 +629,7 @@
</choice> </choice>
</attribute> </attribute>
</optional> </optional>
@@ -17697,6 +18015,62 @@ @@ -17697,6 +18020,62 @@
<ref name="boolean"/> <ref name="boolean"/>
</attribute> </attribute>
</optional> </optional>
...@@ -687,7 +692,7 @@ ...@@ -687,7 +692,7 @@
</interleave> </interleave>
</define> </define>
<define name="labelPositions"> <define name="labelPositions">
@@ -18124,4 +18498,85 @@ @@ -18124,4 +18503,85 @@
</element> </element>
</zeroOrMore> </zeroOrMore>
</define> </define>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment