Kaydet (Commit) 1501df41 authored tarafından László Németh's avatar László Németh

tdf#117171 DOCX export/import of cardinalText, ordinalText

and ordinal (indicator) numbering styles.

Change-Id: Ia4030c8a170bad67e0b52ec685a49faa77552ccf
Reviewed-on: https://gerrit.libreoffice.org/53831Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarLászló Németh <nemeth@numbertext.org>
üst d038d1f5
......@@ -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>
......
......@@ -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:
......
......@@ -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;
......
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