[Libreoffice-commits] core.git: filter/source sw/source writerfilter/source
Yossi Zahn
yossizahn at gmail.com
Wed Aug 9 11:17:36 UTC 2017
filter/source/xslt/export/wordml/ooo2wordml_field.xsl | 5 ++++-
filter/source/xslt/export/wordml/ooo2wordml_list.xsl | 10 +++++++---
filter/source/xslt/export/wordml/ooo2wordml_settings.xsl | 5 ++++-
filter/source/xslt/import/wordml/wordml2ooo_field.xsl | 5 ++++-
filter/source/xslt/import/wordml/wordml2ooo_page.xsl | 5 ++++-
sw/source/filter/ww8/docxattributeoutput.cxx | 5 ++++-
writerfilter/source/dmapper/ConversionHelper.cxx | 2 +-
7 files changed, 28 insertions(+), 9 deletions(-)
New commits:
commit 5937eefe533fba332ab6a83da02496bb4b0bd3db
Author: Yossi Zahn <yossizahn at gmail.com>
Date: Tue Apr 18 16:46:10 2017 +0000
tdf#66212 - Hebrew numbering import/export support
Adds support for the new NUMBER_HEBREW numbering format to
various import and export filters.
Change-Id: I93f928f5d4d43d0cf569a85677df7eef7b088db8
Reviewed-on: https://gerrit.libreoffice.org/36645
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Michael Stahl <mstahl at redhat.com>
diff --git a/filter/source/xslt/export/wordml/ooo2wordml_field.xsl b/filter/source/xslt/export/wordml/ooo2wordml_field.xsl
index 9ea64189212e..c4157f09bbd9 100644
--- a/filter/source/xslt/export/wordml/ooo2wordml_field.xsl
+++ b/filter/source/xslt/export/wordml/ooo2wordml_field.xsl
@@ -264,7 +264,10 @@ $field_number_format_style ='壹, 贰, 叁, ...' ">
<xsl:when test="$field_number_format_style ='A' ">
<xsl:text> \* ALPHABETIC </xsl:text>
</xsl:when>
- <xsl:when test="$field_number_format_style = 'א, ב, ג, ...' ">
+ <xsl:when test="$field_number_format_style = 'א, י, ק, ...' ">
+ <xsl:text> \* hebrew1 </xsl:text>
+ </xsl:when>
+ <xsl:when test="$field_number_format_style = 'א, ב, ג, ...' ">
<xsl:text> \* hebrew2 </xsl:text>
</xsl:when>
<xsl:when test="$field_number_format_style = 'أ, ب, ت, ...' ">
diff --git a/filter/source/xslt/export/wordml/ooo2wordml_list.xsl b/filter/source/xslt/export/wordml/ooo2wordml_list.xsl
index 8f6893081835..5c1d68ae34aa 100644
--- a/filter/source/xslt/export/wordml/ooo2wordml_list.xsl
+++ b/filter/source/xslt/export/wordml/ooo2wordml_list.xsl
@@ -281,16 +281,20 @@
<w:nfc w:val="24"/>
</xsl:when>
<xsl:when test="$number-format ='أ, ب, ت, ...'">
- <!-- 46. hebrew-1-->
+ <!-- 46. arabic-alpha-->
<w:nfc w:val="46"/>
</xsl:when>
<xsl:when test="$number-format = 'ก, ข, ฃ, ...'">
<!--53. thai-letters not match well !-->
<w:nfc w:val="53"/>
+ </xsl:when>
+ <xsl:when test="$number-format='א, י, ק, ...'">
+ <!--45. hebrew-1-->
+ <w:nfc w:val="45"/>
</xsl:when>
<xsl:when test="$number-format='א, ב, ג, ...'">
- <!--45. arabic-alpha-->
- <w:nfc w:val="45"/>
+ <!--47. hebrew-2-->
+ <w:nfc w:val="47"/>
</xsl:when>
<xsl:when test="string-length($number-format)=0">
<w:nfc w:val="255"/>
diff --git a/filter/source/xslt/export/wordml/ooo2wordml_settings.xsl b/filter/source/xslt/export/wordml/ooo2wordml_settings.xsl
index b003e647d6c1..0e2da166d36d 100644
--- a/filter/source/xslt/export/wordml/ooo2wordml_settings.xsl
+++ b/filter/source/xslt/export/wordml/ooo2wordml_settings.xsl
@@ -261,9 +261,12 @@
<xsl:when test="$number-format = 'ก, ข, ฃ, ...'">
<w:numFmt w:val="thai-letters"/>
</xsl:when>
- <xsl:when test="$number-format = 'א, ב, ג, ...'">
+ <xsl:when test="$number-format = 'א, י, ק, ...'">
<w:numFmt w:val="hebrew-1"/>
</xsl:when>
+ <xsl:when test="$number-format = 'א, ב, ג, ...'">
+ <w:numFmt w:val="hebrew-2"/>
+ </xsl:when>
<xsl:when test="$number-format = 'Native Numbering'">
<xsl:variable name="locale" select="/office:document/office:meta/dc:language"/>
<xsl:choose>
diff --git a/filter/source/xslt/import/wordml/wordml2ooo_field.xsl b/filter/source/xslt/import/wordml/wordml2ooo_field.xsl
index 80b0e0c0c406..dece47c2351b 100644
--- a/filter/source/xslt/import/wordml/wordml2ooo_field.xsl
+++ b/filter/source/xslt/import/wordml/wordml2ooo_field.xsl
@@ -1294,7 +1294,10 @@
<xsl:when test="contains($input_MS_num_format, 'ALPHABETIC' ) ">
<xsl:text>A</xsl:text>
</xsl:when>
- <xsl:when test="contains($input_MS_num_format, 'hebrew2' ) ">
+ <xsl:when test="contains($input_MS_num_format, 'hebrew1' ) ">
+ <xsl:text>א, י, ק, ...</xsl:text>
+ </xsl:when>
+ <xsl:when test="contains($input_MS_num_format, 'hebrew2' ) ">
<xsl:text>א, ב, ג, ...</xsl:text>
</xsl:when>
<xsl:when test="contains($input_MS_num_format, 'ArabicAlpha' ) ">
diff --git a/filter/source/xslt/import/wordml/wordml2ooo_page.xsl b/filter/source/xslt/import/wordml/wordml2ooo_page.xsl
index eb7f1cae1ca2..c53940643132 100644
--- a/filter/source/xslt/import/wordml/wordml2ooo_page.xsl
+++ b/filter/source/xslt/import/wordml/wordml2ooo_page.xsl
@@ -386,7 +386,10 @@
<xsl:when test="$number-format = 'thai-letters' or $number-format = 'thai-numbers' or $number-format = 'thai-counting'">
<xsl:attribute name="style:num-format">ก, ข, ฃ, ...</xsl:attribute>
</xsl:when>
- <xsl:when test="$number-format = 'hebrew-1' or $number-format = 'hebrew-2'">
+ <xsl:when test="$number-format = 'hebrew-1'">
+ <xsl:attribute name="style:num-format">א, י, ק, ...</xsl:attribute>
+ </xsl:when>
+ <xsl:when test="$number-format = 'hebrew-2'">
<xsl:attribute name="style:num-format">א, ב, ג, ...</xsl:attribute>
</xsl:when>
< ordinal, cardinal-text, ordinal-text, hex, chicago, bullet, ideograph-zodiac-traditional,
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index e09bdaae67b9..e6338d85ed7b 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -5728,7 +5728,9 @@ static OString impl_NumberingType( sal_uInt16 nNumberingType )
case SVX_NUM_BITMAP:
case SVX_NUM_CHAR_SPECIAL: aType = "bullet"; break;
- case style::NumberingType::CHARS_HEBREW: aType = "hebrew1"; break;
+
+ case style::NumberingType::CHARS_HEBREW: aType = "hebrew2"; break;
+ case style::NumberingType::NUMBER_HEBREW: aType = "hebrew1"; break;
default: aType = "none"; break;
}
@@ -5753,6 +5755,7 @@ static OString impl_LevelNFC( sal_uInt16 nNumberingType , const SfxItemSet *pOut
case style::NumberingType::BITMAP:
case style::NumberingType::CHAR_SPECIAL:
case style::NumberingType::CHARS_HEBREW:
+ case style::NumberingType::NUMBER_HEBREW:
case style::NumberingType::NUMBER_NONE:
return impl_NumberingType( nNumberingType );
case style::NumberingType::FULLWIDTH_ARABIC: aType="decimalFullWidth"; break;
diff --git a/writerfilter/source/dmapper/ConversionHelper.cxx b/writerfilter/source/dmapper/ConversionHelper.cxx
index 6af143a4706b..d262caf09062 100644
--- a/writerfilter/source/dmapper/ConversionHelper.cxx
+++ b/writerfilter/source/dmapper/ConversionHelper.cxx
@@ -569,7 +569,7 @@ sal_Int16 ConvertNumberingType(sal_Int32 nFmt)
break;
case NS_ooxml::LN_Value_ST_NumberFormat_hebrew1:
//91726
- nRet = style::NumberingType::CHARS_HEBREW;
+ nRet = style::NumberingType::NUMBER_HEBREW;
break;
case NS_ooxml::LN_Value_ST_NumberFormat_decimalFullWidth:
case NS_ooxml::LN_Value_ST_NumberFormat_decimalFullWidth2:
More information about the Libreoffice-commits
mailing list