diff options
author | Tamas Bunth <tamas.bunth@collabora.co.uk> | 2019-10-29 14:53:05 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-10-29 21:15:37 +0100 |
commit | bf10253dd556b69fa771320c986c05c653e6d220 (patch) | |
tree | 2654f4071142c595cd33e6ebb28500874b70bd67 /sd | |
parent | svl: HTMLParser: stop inserting control character garbage into Writer (diff) | |
download | core-bf10253dd556b69fa771320c986c05c653e6d220.tar.gz core-bf10253dd556b69fa771320c986c05c653e6d220.zip |
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 <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/data/pptx/tdf126324.pptx | bin | 0 -> 30634 bytes | |||
-rw-r--r-- | sd/qa/unit/import-tests.cxx | 17 |
2 files changed, 17 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/tdf126324.pptx b/sd/qa/unit/data/pptx/tdf126324.pptx Binary files differnew file mode 100644 index 000000000000..d5540cdc4de4 --- /dev/null +++ b/sd/qa/unit/data/pptx/tdf126324.pptx 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 |