[Libreoffice-commits] core.git: filter/source sw/source writerfilter/source
László Németh
nemeth at numbertext.org
Fri May 4 10:31:33 UTC 2018
filter/source/xslt/export/wordml/ooo2wordml_list.xsl | 11 ++++++++++-
sw/source/filter/ww8/docxattributeoutput.cxx | 3 +++
writerfilter/source/dmapper/ConversionHelper.cxx | 11 +++++++----
3 files changed, 20 insertions(+), 5 deletions(-)
New commits:
commit 1501df419ea4d40358d705a281fd9662088ba51e
Author: László Németh <nemeth at numbertext.org>
Date: Fri May 4 00:56:39 2018 +0200
tdf#117171 DOCX export/import of cardinalText, ordinalText
and ordinal (indicator) numbering styles.
Change-Id: Ia4030c8a170bad67e0b52ec685a49faa77552ccf
Reviewed-on: https://gerrit.libreoffice.org/53831
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: László Németh <nemeth at numbertext.org>
diff --git a/filter/source/xslt/export/wordml/ooo2wordml_list.xsl b/filter/source/xslt/export/wordml/ooo2wordml_list.xsl
index 8c090d92ca30..e3c9614d6e06 100644
--- a/filter/source/xslt/export/wordml/ooo2wordml_list.xsl
+++ b/filter/source/xslt/export/wordml/ooo2wordml_list.xsl
@@ -228,6 +228,15 @@
<xsl:when test="$number-format = 'I'">
<!-- nfcUCRoman: Uppercase roman -->
<w:nfc w:val="1"/>
+ <xsl:when test="$number-format = '1st'">
+ <!-- nfcUCOrdinal: Ordinal indicator -->
+ <w:nfc w:val="5"/>
+ <xsl:when test="$number-format = 'One'">
+ <!-- nfcCardText: Cardinal -->
+ <w:nfc w:val="6"/>
+ <xsl:when test="$number-format = 'First'">
+ <!-- nfcOrdText: Ordinal -->
+ <w:nfc w:val="7"/>
</xsl:when>
<xsl:when test="$number-format = '1, 2, 3, ...'">
<!-- '1, 2, 3, ...' also seems: decimal-full-width2 -->
@@ -328,7 +337,7 @@
</xsl:when>
</xsl:choose>
</xsl:when>
- <!-- unsupported: ordinal, cardinal-text, ordinal-text, hex, chicago, bullet, ideograph-zodiac-traditional,
+ <!-- unsupported: hex, chicago, bullet, ideograph-zodiac-traditional,
chinese-not-impl, korean-legal, none -->
</xsl:choose>
</xsl:template>
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 6324318cd45f..a1eaea107ffb 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -6158,6 +6158,9 @@ static OString impl_LevelNFC( sal_uInt16 nNumberingType , const SfxItemSet *pOut
case style::NumberingType::CHARS_ARABIC: aType="arabicAlpha"; break;
case style::NumberingType::CHARS_THAI: aType="thaiLetters"; break;
case style::NumberingType::CHARS_PERSIAN: aType="hindiVowels"; break;
+ case style::NumberingType::TEXT_NUMBER: aType="ordinal"; break;
+ case style::NumberingType::TEXT_CARDINAL: aType="cardinalText"; break;
+ case style::NumberingType::TEXT_ORDINAL: aType="ordinalText"; break;
/*
Fallback the rest to decimal.
case style::NumberingType::NATIVE_NUMBERING:
diff --git a/writerfilter/source/dmapper/ConversionHelper.cxx b/writerfilter/source/dmapper/ConversionHelper.cxx
index d2311e46713a..f4eddffc2625 100644
--- a/writerfilter/source/dmapper/ConversionHelper.cxx
+++ b/writerfilter/source/dmapper/ConversionHelper.cxx
@@ -485,7 +485,7 @@ sal_Int16 ConvertNumberingType(sal_Int32 nFmt)
nRet = style::NumberingType::ROMAN_LOWER;
break;
case NS_ooxml::LN_Value_ST_NumberFormat_ordinal:
- nRet = style::NumberingType::ARABIC;
+ nRet = style::NumberingType::TEXT_NUMBER;
break;
case NS_ooxml::LN_Value_ST_NumberFormat_bullet:
nRet = style::NumberingType::CHAR_SPECIAL;
@@ -576,12 +576,15 @@ sal_Int16 ConvertNumberingType(sal_Int32 nFmt)
case NS_ooxml::LN_Value_ST_NumberFormat_decimalFullWidth2:
nRet = style::NumberingType::FULLWIDTH_ARABIC;
break;
+ case NS_ooxml::LN_Value_ST_NumberFormat_cardinalText:
+ nRet = style::NumberingType::TEXT_CARDINAL;
+ break;
+ case NS_ooxml::LN_Value_ST_NumberFormat_ordinalText:
+ nRet = style::NumberingType::TEXT_ORDINAL;
+ break;
default: nRet = style::NumberingType::ARABIC;
}
/* TODO: Lots of additional values are available - some are supported in the I18 framework
- NS_ooxml::LN_Value_ST_NumberFormat_ordinal = 91682;
- NS_ooxml::LN_Value_ST_NumberFormat_cardinalText = 91683;
- NS_ooxml::LN_Value_ST_NumberFormat_ordinalText = 91684;
NS_ooxml::LN_Value_ST_NumberFormat_hex = 91685;
NS_ooxml::LN_Value_ST_NumberFormat_chicago = 91686;
NS_ooxml::LN_Value_ST_NumberFormat_decimalFullWidth = 91691;
More information about the Libreoffice-commits
mailing list