diff options
author | Justin Luth <justin_luth@sil.org> | 2021-03-30 14:00:11 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2021-04-07 10:34:35 +0200 |
commit | cfdfe45bf2f8e054c811eeac5f993de501cdb532 (patch) | |
tree | b469cc495d22739a1e3014b78311486e5fb9739c /writerfilter | |
parent | a3f0459e57980a70bcb13f0e639bbed26d2d8b62 (diff) |
tdf#141341 docxexport: consolidate conversion of NumTypes
so that one comprehensive function is used for Page and Footnote
numbering types (which was already being used by list numbering).
I also added support for CHARS_ARABIC_ABJAD <=> arabicAbjad,
which was my trigger for consolidating all this.
OOXML has one definition (ST_NumberFormat) that specifies the valid
values for pgNumType, numFmt (list numbering),
numFmt (Endnote and Footnote numbering), so use the same
conversion function for all of these.
[Also used for caption, but I haven't noticed that yet in export.)
In the previous code, there was no possibility for
fmt.isEmpty() [despite repeated checks for that situation].
However, I thought it made sense to not specify anything if
the conversion didn't match something known (because perhaps
the locale could take over then?). In any case, that is a
slight change, but for pgNumType we were specifying "none"
instead of decimal, which didn't make much sense either.
So I don't expect anyone crying 'regression' over that.
Change-Id: I90037eb25a0f71d22d6ad1848f43761eb6b9fe00
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113351
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/ConversionHelper.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/writerfilter/source/dmapper/ConversionHelper.cxx b/writerfilter/source/dmapper/ConversionHelper.cxx index 852f58152b75..ac877c5d723a 100644 --- a/writerfilter/source/dmapper/ConversionHelper.cxx +++ b/writerfilter/source/dmapper/ConversionHelper.cxx @@ -558,6 +558,9 @@ sal_Int16 ConvertNumberingType(const sal_Int32 nFmt, const sal_Int16 nDefault) case NS_ooxml::LN_Value_ST_NumberFormat_arabicAlpha: nRet = style::NumberingType::CHARS_ARABIC; break; + case NS_ooxml::LN_Value_ST_NumberFormat_arabicAbjad: + nRet = style::NumberingType::CHARS_ARABIC_ABJAD; + break; case NS_ooxml::LN_Value_ST_NumberFormat_hindiVowels: nRet = style::NumberingType::CHARS_NEPALI; break; @@ -611,7 +614,6 @@ sal_Int16 ConvertNumberingType(const sal_Int32 nFmt, const sal_Int16 nDefault) NS_ooxml::LN_Value_ST_NumberFormat_koreanLegal = 91719; NS_ooxml::LN_Value_ST_NumberFormat_vietnameseCounting = 91721; NS_ooxml::LN_Value_ST_NumberFormat_numberInDash = 91725; - NS_ooxml::LN_Value_ST_NumberFormat_arabicAbjad: NS_ooxml::LN_Value_ST_NumberFormat_hindiConsonants = 91731; NS_ooxml::LN_Value_ST_NumberFormat_hindiNumbers = 91732; NS_ooxml::LN_Value_ST_NumberFormat_hindiCounting = 91733; |