summaryrefslogtreecommitdiffstats
path: root/sd
diff options
context:
space:
mode:
authorTamas Bunth <tamas.bunth@collabora.co.uk>2019-10-29 14:53:05 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-10-29 21:15:37 +0100
commitbf10253dd556b69fa771320c986c05c653e6d220 (patch)
tree2654f4071142c595cd33e6ebb28500874b70bd67 /sd
parentsvl: HTMLParser: stop inserting control character garbage into Writer (diff)
downloadcore-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.pptxbin0 -> 30634 bytes
-rw-r--r--sd/qa/unit/import-tests.cxx17
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
new file mode 100644
index 000000000000..d5540cdc4de4
--- /dev/null
+++ b/sd/qa/unit/data/pptx/tdf126324.pptx
Binary files 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