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

New commits:
commit bf10253dd556b69fa771320c986c05c653e6d220
Author:     Tamas Bunth <tamas.bu...@collabora.co.uk>
AuthorDate: Tue Oct 29 14:53:05 2019 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Tue Oct 29 21:15:37 2019 +0100

    tdf#126324 pptx unit test for custom date import
    
    Add unit test for importing custom date field (<c:fld> element of type
    "datetime")
    
    Change-Id: Ifcb5641c99eeb79afe54b801750e68792880c000
    Reviewed-on: https://gerrit.libreoffice.org/81684
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sd/qa/unit/data/pptx/tdf126324.pptx 
b/sd/qa/unit/data/pptx/tdf126324.pptx
new file mode 100644
index 000000000000..d5540cdc4de4
Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf126324.pptx differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index f083b38bbc58..1d1f5a6a46d1 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -195,6 +195,7 @@ public:
     void testTdf116899();
     void testTdf77747();
     void testTdf116266();
+    void testTdf126324();
 
     bool checkPattern(sd::DrawDocShellRef const & rDocRef, int nShapeNumber, 
std::vector<sal_uInt8>& rExpected);
     void testPatternImport();
@@ -287,6 +288,7 @@ public:
     CPPUNIT_TEST(testTdf114913);
     CPPUNIT_TEST(testTdf114821);
     CPPUNIT_TEST(testTdf115394);
+    CPPUNIT_TEST(testTdf126324);
     CPPUNIT_TEST(testTdf115394PPT);
     CPPUNIT_TEST(testTdf51340);
     CPPUNIT_TEST(testTdf116899);
@@ -2749,6 +2751,21 @@ void SdImportTest::testTdf120028b()
     xDocShRef->DoClose();
 }
 
+void SdImportTest::testTdf126324()
+{
+    sd::DrawDocShellRef xDocShRef
+        = 
loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf126324.pptx"), 
PPTX);
+    uno::Reference<drawing::XDrawPagesSupplier> 
xDoc(xDocShRef->GetDoc()->getUnoModel(),
+                                                     uno::UNO_QUERY);
+    CPPUNIT_ASSERT(xDoc.is());
+    uno::Reference<drawing::XDrawPage> 
xPage(xDoc->getDrawPages()->getByIndex(0), uno::UNO_QUERY);
+    CPPUNIT_ASSERT(xPage.is());
+    uno::Reference<beans::XPropertySet> xShape(getShape(0, xPage));
+    CPPUNIT_ASSERT(xShape.is());
+    uno::Reference< text::XText > xText = uno::Reference< text::XTextRange>( 
xShape, uno::UNO_QUERY_THROW )->getText();
+    CPPUNIT_ASSERT_EQUAL(OUString{"17"}, xText->getString());
+}
+
 void SdImportTest::testDescriptionImport()
 {
     sd::DrawDocShellRef xDocShRef
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to