[Libreoffice-commits] core.git: sd/qa

Muthu Subramanian sumuthu at collabora.com
Wed Dec 11 23:40:00 PST 2013


 sd/qa/unit/data/pptx/n828390_2.pptx |binary
 sd/qa/unit/import-tests.cxx         |   21 +++++++++++++++++++++
 2 files changed, 21 insertions(+)

New commits:
commit 0b578e51cd1eabbbe375e25927df86fac7552641
Author: Muthu Subramanian <sumuthu at collabora.com>
Date:   Thu Dec 12 13:19:36 2013 +0530

    n#828390: Add unit test for new line import.

diff --git a/sd/qa/unit/data/pptx/n828390_2.pptx b/sd/qa/unit/data/pptx/n828390_2.pptx
new file mode 100644
index 0000000..e30948f
Binary files /dev/null and b/sd/qa/unit/data/pptx/n828390_2.pptx differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 9b00403..f912d11 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -49,6 +49,7 @@ public:
     void testFdo64512();
     void testFdo71075();
     void testN828390();
+    void testN828390_2();
     void testFdo68594();
 
     CPPUNIT_TEST_SUITE(SdFiltersTest);
@@ -59,6 +60,7 @@ public:
     CPPUNIT_TEST(testFdo64512);
     CPPUNIT_TEST(testFdo71075);
     CPPUNIT_TEST(testN828390);
+    CPPUNIT_TEST(testN828390_2);
     CPPUNIT_TEST(testFdo68594);
 
     CPPUNIT_TEST_SUITE_END();
@@ -227,6 +229,25 @@ void SdFiltersTest::testN828390()
     CPPUNIT_ASSERT_MESSAGE("Subscript not exported properly", bPassed);
 }
 
+void SdFiltersTest::testN828390_2()
+{
+    ::sd::DrawDocShellRef xDocShRef = loadURL( getURLFromSrc("/sd/qa/unit/data/pptx/n828390_2.pptx") );
+    CPPUNIT_ASSERT_MESSAGE( "failed to load", xDocShRef.Is() );
+    CPPUNIT_ASSERT_MESSAGE( "failed to load", xDocShRef.Is() );
+    CPPUNIT_ASSERT_MESSAGE( "not in destruction", !xDocShRef->IsInDestruction() );
+
+    SdDrawDocument *pDoc = xDocShRef->GetDoc();
+    CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+    const SdrPage *pPage = pDoc->GetPage(1);
+    CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+
+    SdrObject *pObj = pPage->GetObj(0);
+    SdrTextObj *pTxtObj = dynamic_cast<SdrTextObj *>( pObj );
+    const EditTextObject& aEdit = pTxtObj->GetOutlinerParaObject()->GetTextObject();
+    CPPUNIT_ASSERT(aEdit.GetText(0) == OUString("Linux  "));
+    CPPUNIT_ASSERT(aEdit.GetText(1) == OUString("Standard Platform"));
+}
+
 void SdFiltersTest::testN778859()
 {
     ::sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/pptx/n778859.pptx"));


More information about the Libreoffice-commits mailing list