[Libreoffice-commits] core.git: sw/qa writerfilter/source

Justin Luth justin_luth at sil.org
Tue Oct 31 04:07:38 UTC 2017


 sw/qa/extras/ooxmlexport/data/tdf82065_Ind_start_strict.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport11.cxx                   |   20 +++++++++++
 writerfilter/source/dmapper/NumberingManager.cxx             |    1 
 3 files changed, 21 insertions(+)

New commits:
commit 0d6b4f5f6946cdadfe2a09946df90fa08f3588d0
Author: Justin Luth <justin_luth at sil.org>
Date:   Sat Oct 28 13:01:11 2017 +0300

    tdf#82065 strict docx import: add support for LN_CT_Ind_start
    
    Change-Id: Iaddd9e852388f5bb076c4bc6f8eee8a256581033
    Reviewed-on: https://gerrit.libreoffice.org/43985
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Justin Luth <justin_luth at sil.org>

diff --git a/sw/qa/extras/ooxmlexport/data/tdf82065_Ind_start_strict.docx b/sw/qa/extras/ooxmlexport/data/tdf82065_Ind_start_strict.docx
new file mode 100755
index 000000000000..6cbdbdc97c23
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf82065_Ind_start_strict.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index 861f863cc54d..bb368bccbfcc 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -46,6 +46,26 @@ DECLARE_OOXMLEXPORT_TEST(testTdf92524_autoColor, "tdf92524_autoColor.doc")
     CPPUNIT_ASSERT_EQUAL(COL_AUTO, getProperty<sal_uInt32>(getParagraph(1), "ParaBackColor"));
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf82065_Ind_start_strict, "tdf82065_Ind_start_strict.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
+    bool bFoundIndentAt = false;
+    for (int i = 0; i < aProps.getLength(); ++i)
+    {
+        const beans::PropertyValue& rProp = aProps[i];
+
+        if (rProp.Name == "IndentAt")
+        {
+            CPPUNIT_ASSERT_EQUAL_MESSAGE("IndentAt", sal_uInt32(6001), rProp.Value.get<sal_uInt32>() );
+            bFoundIndentAt = true;
+        }
+    }
+    CPPUNIT_ASSERT_EQUAL_MESSAGE("IndentAt defined", true, bFoundIndentAt);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx
index 43358e41ed01..8754b489a9ec 100644
--- a/writerfilter/source/dmapper/NumberingManager.cxx
+++ b/writerfilter/source/dmapper/NumberingManager.cxx
@@ -753,6 +753,7 @@ void ListsManager::lcl_attribute( Id nName, Value& rVal )
             m_pCurrentDefinition->SetId( nVal );
         }
         break;
+        case NS_ooxml::LN_CT_Ind_start:
         case NS_ooxml::LN_CT_Ind_left:
             if ( pCurrentLvl.get( ) )
                 pCurrentLvl->Insert(


More information about the Libreoffice-commits mailing list