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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Feb 21 10:52:58 UTC 2019


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

New commits:
commit 00e89430a2f8cd1f9ec702a7583a1e4c886a2b46
Author:     Gülşah Köse <gulsah.kose at collabora.com>
AuthorDate: Thu Feb 21 01:24:31 2019 +0300
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Thu Feb 21 11:52:32 2019 +0100

    tdf#123090 unit test for handling gridSpan
    
    Change-Id: Id2782a16d6118676b0638727b368e4628335e055
    Signed-off-by: Gülşah Köse <gulsah.kose at collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/68128
    Tested-by: Jenkins
    Reviewed-by: Andras Timar <andras.timar at collabora.com>

diff --git a/sd/qa/unit/data/pptx/tdf123090.pptx b/sd/qa/unit/data/pptx/tdf123090.pptx
new file mode 100644
index 000000000000..c219f52de0a2
Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf123090.pptx differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index a085a1ae09ce..56f7a11cc267 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -190,6 +190,7 @@ public:
     void testPatternImport();
     void testPptCrop();
     void testTdf119015();
+    void testTdf123090();
     void testTdf120028();
     void testTdf120028b();
     void testTdf44223();
@@ -275,6 +276,7 @@ public:
     CPPUNIT_TEST(testTdf116266);
     CPPUNIT_TEST(testPptCrop);
     CPPUNIT_TEST(testTdf119015);
+    CPPUNIT_TEST(testTdf123090);
     CPPUNIT_TEST(testTdf120028);
     CPPUNIT_TEST(testTdf120028b);
     CPPUNIT_TEST(testTdf44223);
@@ -2525,6 +2527,33 @@ void SdImportTest::testTdf119015()
     xDocShRef->DoClose();
 }
 
+void SdImportTest::testTdf123090()
+{
+    ::sd::DrawDocShellRef xDocShRef
+        = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf123090.pptx"), PPTX);
+
+    const SdrPage* pPage = GetPage(1, xDocShRef);
+
+    sdr::table::SdrTableObj* pTableObj = dynamic_cast<sdr::table::SdrTableObj*>(pPage->GetObj(0));
+    CPPUNIT_ASSERT(pTableObj);
+
+    uno::Reference<table::XTable> xTable(pTableObj->getTable());
+
+    // Test that we actually have two cells: this threw css.lang.IndexOutOfBoundsException
+    uno::Reference<text::XTextRange> xTextRange(xTable->getCellByPosition(1, 0),
+                                                uno::UNO_QUERY_THROW);
+    CPPUNIT_ASSERT_EQUAL(OUString("aaa"), xTextRange->getString());
+
+    sal_Int32 nWidth;
+    const OUString sWidth("Width");
+    uno::Reference< css::table::XTableColumns > xColumns( xTable->getColumns(), uno::UNO_QUERY_THROW);
+    uno::Reference< beans::XPropertySet > xRefColumn( xColumns->getByIndex(1), uno::UNO_QUERY_THROW );
+    xRefColumn->getPropertyValue( sWidth ) >>= nWidth;
+    CPPUNIT_ASSERT_EQUAL( sal_Int32(9136), nWidth);
+
+    xDocShRef->DoClose();
+}
+
 void SdImportTest::testTdf120028()
 {
     // Check that the table shape has 4 columns.


More information about the Libreoffice-commits mailing list