diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2020-03-16 17:25:31 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2020-03-16 18:07:54 +0100 |
commit | 496197fe4dff2cd94ceeb42fc04d0263ac8d8971 (patch) | |
tree | b9fa3ef13de8e6f1ebecd07b4c62d83ae8b653cd /writerfilter/source/ooxml | |
parent | 3741d70743c297029f54b20b0ca711f40cff7097 (diff) |
DOCX import: tokenize <w:numFmt w:val="custom" w:format="...">
Which means CT_NumFmt has to be a property resource, not a single value,
and also ST_NumberFormat needs to recognize "custom" as a valid value.
Adapt the RTF tokenizer to emit the new token format.
This is needed (but not enough) to support markup like this:
<w:numFmt w:val="custom" w:format="001, 002, 003, ..."/>
Change-Id: I767e4b92fc41f9425f446d6eaad1d875e2233964
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90578
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'writerfilter/source/ooxml')
-rw-r--r-- | writerfilter/source/ooxml/model.xml | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/writerfilter/source/ooxml/model.xml b/writerfilter/source/ooxml/model.xml index 9c0610715218..b3899472d5e3 100644 --- a/writerfilter/source/ooxml/model.xml +++ b/writerfilter/source/ooxml/model.xml @@ -12886,6 +12886,7 @@ <value>thaiNumbers</value> <!-- Thai Counting System --> <value>thaiCounting</value> + <value>custom</value> </choice> </define> <define name="ST_PageOrientation"> @@ -14801,6 +14802,9 @@ </attribute> </define> <define name="CT_NumFmt"> + <attribute name="format"> + <data type="string"/> + </attribute> <attribute name="val"> <ref name="ST_NumberFormat"/> </attribute> @@ -17756,6 +17760,7 @@ <value tokenid="ooxml:Value_ST_NumberFormat_thaiLetters">thaiLetters</value> <value tokenid="ooxml:Value_ST_NumberFormat_thaiNumbers">thaiNumbers</value> <value tokenid="ooxml:Value_ST_NumberFormat_thaiCounting">thaiCounting</value> + <value tokenid="ooxml:Value_ST_NumberFormat_custom">custom</value> </resource> <resource name="ST_PageOrientation" resource="List"> <value tokenid="ooxml:Value_ST_PageOrientation_portrait">portrait</value> @@ -18529,8 +18534,9 @@ <resource name="CT_EdnPos" resource="Value"> <attribute name="val" tokenid="ooxml:CT_EdnPos_val" action="setValue"/> </resource> - <resource name="CT_NumFmt" resource="Value"> - <attribute name="val" tokenid="ooxml:CT_NumFmt_val" action="setValue"/> + <resource name="CT_NumFmt" resource="Properties"> + <attribute name="format" tokenid="ooxml:CT_NumFmt_format"/> + <attribute name="val" tokenid="ooxml:CT_NumFmt_val"/> </resource> <resource name="ST_RestartNumber" resource="List"> <value tokenid="ooxml:Value_ST_RestartNumber_continuous">continuous</value> |