summaryrefslogtreecommitdiff
path: root/sd/qa/unit
diff options
context:
space:
mode:
Diffstat (limited to 'sd/qa/unit')
-rw-r--r--sd/qa/unit/import-tests.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 8d43ea0245a8..d6a9cfd1d207 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -31,7 +31,9 @@
#include <svx/svdoole2.hxx>
#include <svx/xflclit.hxx>
#include <animations/animationnodehelper.hxx>
+#include <sax/tools/converter.hxx>
+#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
#include <com/sun/star/drawing/XDrawPage.hpp>
#include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
#include <com/sun/star/animations/XAnimationNodeSupplier.hpp>
@@ -81,6 +83,7 @@ public:
void testBnc870233_2();
void testBnc880763();
void testBnc862510_5();
+ void testCreationDate();
CPPUNIT_TEST_SUITE(SdFiltersTest);
CPPUNIT_TEST(testDocumentLayout);
@@ -109,6 +112,7 @@ public:
CPPUNIT_TEST(testBnc870233_2);
CPPUNIT_TEST(testBnc880763);
CPPUNIT_TEST(testBnc862510_5);
+ CPPUNIT_TEST(testCreationDate);
CPPUNIT_TEST_SUITE_END();
};
@@ -763,6 +767,18 @@ void SdFiltersTest::testBnc870237()
xDocShRef->DoClose();
}
+void SdFiltersTest::testCreationDate()
+{
+ sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/fdo71434.pptx"));
+ uno::Reference<document::XDocumentPropertiesSupplier> xDocumentPropertiesSupplier(xDocShRef->GetModel(), uno::UNO_QUERY);
+ uno::Reference<document::XDocumentProperties> xDocumentProperties = xDocumentPropertiesSupplier->getDocumentProperties();
+ util::DateTime aDate = xDocumentProperties->getCreationDate();
+ OUStringBuffer aBuffer;
+ sax::Converter::convertDateTime(aBuffer, aDate, 0);
+ // Metadata wasn't imported, this was 0000-00-00.
+ CPPUNIT_ASSERT_EQUAL(OUString("2013-11-09T10:37:56"), aBuffer.makeStringAndClear());
+}
+
void SdFiltersTest::testBnc870233_1()
{
::sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/pptx/bnc870233_1.pptx"));