sw/source/filter/ww8/docxattributeoutput.cxx | 4 ++-- sw/source/filter/ww8/ww8atr.cxx | 12 ++++++++++++ sw/source/filter/ww8/ww8par3.cxx | 2 +- sw/source/filter/ww8/ww8par5.cxx | 3 +++ 4 files changed, 18 insertions(+), 3 deletions(-)
New commits: commit 4493f2191d95a35f8a29cd16912a1378d3c21ced Author: Justin Luth <justin_l...@sil.org> AuthorDate: Thu Jun 24 14:37:26 2021 +0200 Commit: Justin Luth <justin_l...@sil.org> CommitDate: Thu Jun 24 21:47:03 2021 +0200 tdf#120629 ms formats: better exporting of hindiVowels etc. The big problem was that hindiVowels was imported as CHARS_NEPALI, but CHARS_NEPALI was not exported in DOCX. Another easy win was to DOC export both LO forms of russianLower and both forms of russianUpper - just like DOCX. The page number field only allows a subset of formats. LO doesn't have support for Hex or DollarText formats. The Ordinal/Cardinal formats were an easy win for export, even though they don't import. [Import seems to be in ww8par5.cxx's GetNumTypeFromName(), except that is being passed an empty string.] Change-Id: I176a70e0e05967414337c17d8b4acc87e20ead73 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117793 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_l...@sil.org> diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 7cbf2a8a0df0..7d185f5ce9c0 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -6938,7 +6938,8 @@ static OString lcl_ConvertNumberingType(sal_Int16 nNumberingType, const SfxItemS case style::NumberingType::CHARS_ARABIC: aType="arabicAlpha"; break; case style::NumberingType::CHARS_ARABIC_ABJAD: aType="arabicAbjad"; break; case style::NumberingType::CHARS_THAI: aType="thaiLetters"; break; - case style::NumberingType::CHARS_PERSIAN: aType="hindiVowels"; break; + case style::NumberingType::CHARS_PERSIAN: + case style::NumberingType::CHARS_NEPALI: aType="hindiVowels"; break; case style::NumberingType::CHARS_CYRILLIC_UPPER_LETTER_RU: case style::NumberingType::CHARS_CYRILLIC_UPPER_LETTER_N_RU: aType = "russianUpper"; break; case style::NumberingType::CHARS_CYRILLIC_LOWER_LETTER_RU: @@ -6969,7 +6970,6 @@ static OString lcl_ConvertNumberingType(sal_Int16 nNumberingType, const SfxItemS case style::NumberingType::CHARS_GREEK_LOWER_LETTER: case style::NumberingType::PAGE_DESCRIPTOR: case style::NumberingType::TRANSLITERATION: - case style::NumberingType::CHARS_NEPALI: case style::NumberingType::CHARS_KHMER: case style::NumberingType::CHARS_LAO: case style::NumberingType::CHARS_TIBETAN: diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index 7a942ddf8e80..437c1d058080 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -762,9 +762,12 @@ sal_uInt8 WW8Export::GetNumId( sal_uInt16 eNumType ) case style::NumberingType::CHARS_ARABIC: nRet = 46; break; case style::NumberingType::CHARS_HEBREW: nRet = 47; break; case style::NumberingType::CHARS_ARABIC_ABJAD: nRet = 48; break; + case style::NumberingType::CHARS_PERSIAN: case style::NumberingType::CHARS_NEPALI: nRet = 49; break; case style::NumberingType::CHARS_THAI: nRet = 53; break; + case style::NumberingType::CHARS_CYRILLIC_LOWER_LETTER_N_RU: case style::NumberingType::CHARS_CYRILLIC_LOWER_LETTER_RU: nRet = 58; break; + case style::NumberingType::CHARS_CYRILLIC_UPPER_LETTER_N_RU: case style::NumberingType::CHARS_CYRILLIC_UPPER_LETTER_RU: nRet = 59; break; // nothing, WW does the same (undocumented) case SVX_NUM_NUMBER_NONE: nRet = 0xff; break; @@ -2632,6 +2635,15 @@ void AttributeOutputBase::GetNumberPara( OUString& rStr, const SwField& rField ) case SVX_NUM_ROMAN_LOWER: rStr += "\\* roman "; break; + case SVX_NUM_TEXT_NUMBER: + rStr += "\\* Ordinal "; + break; + case SVX_NUM_TEXT_ORDINAL: + rStr += "\\* Ordtext "; + break; + case SVX_NUM_TEXT_CARDINAL: + rStr += "\\* Cardtext "; + break; default: OSL_ENSURE(rField.GetFormat() == SVX_NUM_ARABIC, "Unknown numbering type exported as default of Arabic"); diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index 2a74217891c7..71864ead9beb 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -641,7 +641,7 @@ SvxNumType WW8ListManager::GetSvxNumTypeFromMSONFC(sal_uInt16 nNFC) nType = SVX_NUM_CHARS_ARABIC_ABJAD; break; case 49: // hindiVowels - nType = SVX_NUM_CHARS_NEPALI; // DOCX imports as NEPAL and exports as PERSIAN + nType = SVX_NUM_CHARS_NEPALI; break; //case 50: // hindiConsonants //case 51: // hindiNumbers diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx index 940571d3502b..0a583ca80f90 100644 --- a/sw/source/filter/ww8/ww8par5.cxx +++ b/sw/source/filter/ww8/ww8par5.cxx @@ -359,6 +359,9 @@ static SvxNumType GetNumTypeFromName(const OUString& rStr, bool bAllowPageDesc = false) { SvxNumType eTyp = bAllowPageDesc ? SVX_NUM_PAGEDESC : SVX_NUM_ARABIC; + if (rStr.isEmpty()) + return eTyp; + if( rStr.startsWithIgnoreAsciiCase( "Arabi" ) ) // Arabisch, Arabic eTyp = SVX_NUM_ARABIC; else if( rStr.startsWith( "misch" ) ) // r"omisch _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits