[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - sw/qa writerfilter/source

Samuel Mehrbrodt (via logerrit) logerrit at kemper.freedesktop.org
Wed Aug 28 16:32:32 UTC 2019


 sw/qa/extras/ooxmlimport/data/numbering-circle.docx |binary
 sw/qa/extras/ooxmlimport/ooxmlimport2.cxx           |   20 ++++++++++++++++++++
 writerfilter/source/dmapper/ConversionHelper.cxx    |    2 +-
 3 files changed, 21 insertions(+), 1 deletion(-)

New commits:
commit 2ceed469b1f45aa94a2c10f7dc41c1e2378d60d2
Author:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Fri Aug 23 09:41:51 2019 +0200
Commit:     Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Wed Aug 28 18:32:05 2019 +0200

    tdf#103345 Import decimalEnclosedCircle correctly
    
    Change-Id: I227d149d07ea0f7b2569e5df5a5589834374fac9
    Reviewed-on: https://gerrit.libreoffice.org/77992
    Tested-by: Jenkins
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
    (cherry picked from commit 66576edf4e7ed26f09788fac348ea6b556ae1c47)
    Reviewed-on: https://gerrit.libreoffice.org/77999
    Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>

diff --git a/sw/qa/extras/ooxmlimport/data/numbering-circle.docx b/sw/qa/extras/ooxmlimport/data/numbering-circle.docx
new file mode 100644
index 000000000000..b8c1da3d6f87
Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/numbering-circle.docx differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx
index 629c390de4ca..3976c96cb8f5 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx
@@ -372,6 +372,26 @@ DECLARE_OOXMLIMPORT_TEST(testTdf126114, "tdf126114.docx")
     CPPUNIT_ASSERT_EQUAL(7, getLength());
 }
 
+DECLARE_OOXMLIMPORT_TEST(testTdf103345, "numbering-circle.docx")
+{
+    uno::Reference<beans::XPropertySet> xPropertySet(
+        getStyles("NumberingStyles")->getByName("WWNum1"), uno::UNO_QUERY);
+    uno::Reference<container::XIndexAccess> xLevels(
+        xPropertySet->getPropertyValue("NumberingRules"), uno::UNO_QUERY);
+    uno::Sequence<beans::PropertyValue> aProps;
+    xLevels->getByIndex(0) >>= aProps; // 1st level
+
+    for (int i = 0; i < aProps.getLength(); ++i)
+    {
+        if (aProps[i].Name == "NumberingType")
+        {
+            CPPUNIT_ASSERT_EQUAL(style::NumberingType::CIRCLE_NUMBER,
+                                 aProps[i].Value.get<sal_Int16>());
+            return;
+        }
+    }
+}
+
 // tests should only be added to ooxmlIMPORT *if* they fail round-tripping in ooxmlEXPORT
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/writerfilter/source/dmapper/ConversionHelper.cxx b/writerfilter/source/dmapper/ConversionHelper.cxx
index 7206a7fde18a..91624dae17dd 100644
--- a/writerfilter/source/dmapper/ConversionHelper.cxx
+++ b/writerfilter/source/dmapper/ConversionHelper.cxx
@@ -524,6 +524,7 @@ sal_Int16 ConvertNumberingType(sal_Int32 nFmt)
             nRet = style::NumberingType::CHARS_CYRILLIC_UPPER_LETTER_RU;
             break;
         case NS_ooxml::LN_Value_ST_NumberFormat_decimalEnclosedCircleChinese:
+        case NS_ooxml::LN_Value_ST_NumberFormat_decimalEnclosedCircle:
         case NS_ooxml::LN_Value_ST_NumberFormat_ideographEnclosedCircle:
             nRet = style::NumberingType::CIRCLE_NUMBER;
             break;
@@ -590,7 +591,6 @@ sal_Int16 ConvertNumberingType(sal_Int32 nFmt)
     NS_ooxml::LN_Value_ST_NumberFormat_decimalFullWidth = 91691;
     NS_ooxml::LN_Value_ST_NumberFormat_decimalHalfWidth = 91692;
     NS_ooxml::LN_Value_ST_NumberFormat_japaneseDigitalTenThousand = 91694;
-    NS_ooxml::LN_Value_ST_NumberFormat_decimalEnclosedCircle = 91695;
     NS_ooxml::LN_Value_ST_NumberFormat_decimalZero = 91699;
     NS_ooxml::LN_Value_ST_NumberFormat_decimalEnclosedFullstop = 91703;
     NS_ooxml::LN_Value_ST_NumberFormat_decimalEnclosedParen = 91704;


More information about the Libreoffice-commits mailing list