summaryrefslogtreecommitdiff
path: root/sd/qa
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2018-02-02 10:21:50 +0100
committerAndras Timar <andras.timar@collabora.com>2018-02-12 19:50:21 +0100
commit6f05db5a19c0bd82b937e2c79f766bb35c60acc1 (patch)
tree45ab103622bd702856a4e6922da503db6776efd8 /sd/qa
parentdc6b1c2329bb744fb5e8c33749dcff34553645da (diff)
tdf#115394 import custom slide transition time in PPTX
* custom values are imported correctly * standard (fast, slow, medium) values are changed to match values in the MSO Change-Id: I004242afbbf641fe414abc8df248a2844c104502 Reviewed-on: https://gerrit.libreoffice.org/49139 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/49521 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'sd/qa')
-rw-r--r--sd/qa/unit/data/pptx/tdf115394.pptxbin0 -> 31282 bytes
-rw-r--r--sd/qa/unit/import-tests.cxx34
2 files changed, 34 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/tdf115394.pptx b/sd/qa/unit/data/pptx/tdf115394.pptx
new file mode 100644
index 000000000000..d01c90270f34
--- /dev/null
+++ b/sd/qa/unit/data/pptx/tdf115394.pptx
Binary files differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index ab58fe2fd7c0..187d678a2958 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -150,6 +150,7 @@ public:
void testTdf109223();
void testActiveXCheckbox();
void testTdf108926();
+ void testTdf115394();
bool checkPattern(sd::DrawDocShellRef& rDocRef, int nShapeNumber, std::vector<sal_uInt8>& rExpected);
void testPatternImport();
@@ -219,6 +220,7 @@ public:
CPPUNIT_TEST(testTdf109223);
CPPUNIT_TEST(testActiveXCheckbox);
CPPUNIT_TEST(testTdf108926);
+ CPPUNIT_TEST(testTdf115394);
CPPUNIT_TEST_SUITE_END();
};
@@ -2259,6 +2261,38 @@ void SdImportTest::testTdf108926()
xDocShRef->DoClose();
}
+void SdImportTest::testTdf115394()
+{
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf115394.pptx"), PPTX);
+ double fTransitionDuration;
+
+ // Slow in MS formats
+ SdPage* pPage1 = xDocShRef->GetDoc()->GetSdPage(0, PageKind::Standard);
+ fTransitionDuration = pPage1->getTransitionDuration();
+ CPPUNIT_ASSERT_EQUAL(1.0, fTransitionDuration);
+
+ // Medium in MS formats
+ SdPage* pPage2 = xDocShRef->GetDoc()->GetSdPage(1, PageKind::Standard);
+ fTransitionDuration = pPage2->getTransitionDuration();
+ CPPUNIT_ASSERT_EQUAL(0.75, fTransitionDuration);
+
+ // Fast in MS formats
+ SdPage* pPage3 = xDocShRef->GetDoc()->GetSdPage(2, PageKind::Standard);
+ fTransitionDuration = pPage3->getTransitionDuration();
+ CPPUNIT_ASSERT_EQUAL(0.5, fTransitionDuration);
+
+ // Custom values
+ SdPage* pPage4 = xDocShRef->GetDoc()->GetSdPage(3, PageKind::Standard);
+ fTransitionDuration = pPage4->getTransitionDuration();
+ CPPUNIT_ASSERT_EQUAL(0.25, fTransitionDuration);
+
+ SdPage* pPage5 = xDocShRef->GetDoc()->GetSdPage(4, PageKind::Standard);
+ fTransitionDuration = pPage5->getTransitionDuration();
+ CPPUNIT_ASSERT_EQUAL(4.25, fTransitionDuration);
+
+ xDocShRef->DoClose();
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SdImportTest);
CPPUNIT_PLUGIN_IMPLEMENT();