[Libreoffice-commits] core.git: sd/qa
Tamas Bunth (via logerrit)
logerrit at kemper.freedesktop.org
Wed Oct 30 08:21:03 UTC 2019
sd/qa/unit/data/pptx/tdf126324.pptx |binary
sd/qa/unit/import-tests.cxx | 17 +++++++++++++++++
2 files changed, 17 insertions(+)
New commits:
commit fddfbeff8a8989a1e8852d77f69f834c79eff62f
Author: Tamas Bunth <tamas.bunth at collabora.co.uk>
AuthorDate: Tue Oct 29 14:53:05 2019 +0100
Commit: Xisco FaulĂ <xiscofauli at libreoffice.org>
CommitDate: Wed Oct 30 09:19:47 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/81682
Tested-by: Jenkins
Reviewed-by: Xisco FaulĂ <xiscofauli at libreoffice.org>
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 298fc53c14a1..a7f1a9a344e5 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -194,6 +194,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();
@@ -289,6 +290,7 @@ public:
CPPUNIT_TEST(testTdf114913);
CPPUNIT_TEST(testTdf114821);
CPPUNIT_TEST(testTdf115394);
+ CPPUNIT_TEST(testTdf126324);
CPPUNIT_TEST(testTdf115394PPT);
CPPUNIT_TEST(testTdf51340);
CPPUNIT_TEST(testTdf116899);
@@ -2811,6 +2813,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
More information about the Libreoffice-commits
mailing list