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@libreoffice.org> Reviewed-by: László Németh <nemeth@numbertext.org>
This commit is contained in:
@@ -228,6 +228,15 @@
|
|||||||
<xsl:when test="$number-format = 'I'">
|
<xsl:when test="$number-format = 'I'">
|
||||||
<!-- nfcUCRoman: Uppercase roman -->
|
<!-- nfcUCRoman: Uppercase roman -->
|
||||||
<w:nfc w:val="1"/>
|
<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>
|
||||||
<xsl:when test="$number-format = '1, 2, 3, ...'">
|
<xsl:when test="$number-format = '1, 2, 3, ...'">
|
||||||
<!-- '1, 2, 3, ...' also seems: decimal-full-width2 -->
|
<!-- '1, 2, 3, ...' also seems: decimal-full-width2 -->
|
||||||
@@ -328,7 +337,7 @@
|
|||||||
</xsl:when>
|
</xsl:when>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:when>
|
</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 -->
|
chinese-not-impl, korean-legal, none -->
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:template>
|
</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_ARABIC: aType="arabicAlpha"; break;
|
||||||
case style::NumberingType::CHARS_THAI: aType="thaiLetters"; break;
|
case style::NumberingType::CHARS_THAI: aType="thaiLetters"; break;
|
||||||
case style::NumberingType::CHARS_PERSIAN: aType="hindiVowels"; 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.
|
Fallback the rest to decimal.
|
||||||
case style::NumberingType::NATIVE_NUMBERING:
|
case style::NumberingType::NATIVE_NUMBERING:
|
||||||
|
@@ -485,7 +485,7 @@ sal_Int16 ConvertNumberingType(sal_Int32 nFmt)
|
|||||||
nRet = style::NumberingType::ROMAN_LOWER;
|
nRet = style::NumberingType::ROMAN_LOWER;
|
||||||
break;
|
break;
|
||||||
case NS_ooxml::LN_Value_ST_NumberFormat_ordinal:
|
case NS_ooxml::LN_Value_ST_NumberFormat_ordinal:
|
||||||
nRet = style::NumberingType::ARABIC;
|
nRet = style::NumberingType::TEXT_NUMBER;
|
||||||
break;
|
break;
|
||||||
case NS_ooxml::LN_Value_ST_NumberFormat_bullet:
|
case NS_ooxml::LN_Value_ST_NumberFormat_bullet:
|
||||||
nRet = style::NumberingType::CHAR_SPECIAL;
|
nRet = style::NumberingType::CHAR_SPECIAL;
|
||||||
@@ -576,12 +576,15 @@ sal_Int16 ConvertNumberingType(sal_Int32 nFmt)
|
|||||||
case NS_ooxml::LN_Value_ST_NumberFormat_decimalFullWidth2:
|
case NS_ooxml::LN_Value_ST_NumberFormat_decimalFullWidth2:
|
||||||
nRet = style::NumberingType::FULLWIDTH_ARABIC;
|
nRet = style::NumberingType::FULLWIDTH_ARABIC;
|
||||||
break;
|
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;
|
default: nRet = style::NumberingType::ARABIC;
|
||||||
}
|
}
|
||||||
/* TODO: Lots of additional values are available - some are supported in the I18 framework
|
/* 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_hex = 91685;
|
||||||
NS_ooxml::LN_Value_ST_NumberFormat_chicago = 91686;
|
NS_ooxml::LN_Value_ST_NumberFormat_chicago = 91686;
|
||||||
NS_ooxml::LN_Value_ST_NumberFormat_decimalFullWidth = 91691;
|
NS_ooxml::LN_Value_ST_NumberFormat_decimalFullWidth = 91691;
|
||||||
|
Reference in New Issue
Block a user