summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.com>2015-11-05 23:17:51 +0100
committerTomaž Vajngerl <tomaz.vajngerl@collabora.com>2015-11-08 19:39:13 +0100
commitf2b6ba8ad193354d2b34812d8040b48ffde6646c (patch)
tree9780812c9d98ae4a356757ce47e34543dcdf370b /sd
parent2cdd751e8e00f89c084d1f318bfd1488b0231c95 (diff)
pptx: add a testcase for wipe transitions import/export
Change-Id: Ic82b95fc676957f26ce5e09b2343ba71b775c1b0
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/export-tests.cxx23
1 files changed, 19 insertions, 4 deletions
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index c74ac8f3dd4d..5fdfeb6b4409 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -1348,7 +1348,8 @@ void SdExportTest::testTdf80224()
}
bool checkTransitionOnPage(uno::Reference<drawing::XDrawPagesSupplier> xDoc, sal_Int32 nSlideNumber,
- sal_Int16 nExpectedTransitionType, sal_Int16 nExpectedTransitionSubType)
+ sal_Int16 nExpectedTransitionType, sal_Int16 nExpectedTransitionSubType,
+ bool bExpectedDirection = false)
{
sal_Int32 nSlideIndex = nSlideNumber - 1;
@@ -1362,17 +1363,25 @@ bool checkTransitionOnPage(uno::Reference<drawing::XDrawPagesSupplier> xDoc, sal
sal_Int16 nTransitionType = 0;
if ((aAny >>= nTransitionType) == false)
return false;
+ if (nExpectedTransitionType != nTransitionType)
+ return false;
aAny = xPropSet->getPropertyValue(OUString("TransitionSubtype"));
sal_Int16 nTransitionSubtype = 0;
if ((aAny >>= nTransitionSubtype) == false)
return false;
-
- if (nExpectedTransitionType != nTransitionType)
- return false;
if (nExpectedTransitionSubType != nTransitionSubtype)
return false;
+ if (xPropSet->getPropertySetInfo()->hasPropertyByName(OUString("TransitionDirection")))
+ {
+ aAny = xPropSet->getPropertyValue(OUString("TransitionDirection"));
+ bool bDirection = false;
+ if ((aAny >>= bDirection) == false)
+ return false;
+ if (bExpectedDirection != bDirection)
+ return false;
+ }
return true;
}
@@ -1382,6 +1391,12 @@ void SdExportTest::testExportTransitionsPPTX()
xDocShRef = saveAndReload(xDocShRef, PPTX);
uno::Reference<drawing::XDrawPagesSupplier> xDoc(xDocShRef->GetDoc()->getUnoModel(), uno::UNO_QUERY_THROW);
+ // WIPE TRANSITIONS
+ checkTransitionOnPage(xDoc, 01, css::animations::TransitionType::BARWIPE, css::animations::TransitionSubType::TOPTOBOTTOM, true);
+ checkTransitionOnPage(xDoc, 02, css::animations::TransitionType::BARWIPE, css::animations::TransitionSubType::LEFTTORIGHT, false);
+ checkTransitionOnPage(xDoc, 03, css::animations::TransitionType::BARWIPE, css::animations::TransitionSubType::LEFTTORIGHT, true);
+ checkTransitionOnPage(xDoc, 04, css::animations::TransitionType::BARWIPE, css::animations::TransitionSubType::TOPTOBOTTOM, false);
+
checkTransitionOnPage(xDoc, 71, css::animations::TransitionType::ZOOM, css::animations::TransitionSubType::ROTATEIN);
checkTransitionOnPage(xDoc, 41, css::animations::TransitionType::PUSHWIPE, css::animations::TransitionSubType::COMBHORIZONTAL);
checkTransitionOnPage(xDoc, 42, css::animations::TransitionType::PUSHWIPE, css::animations::TransitionSubType::COMBVERTICAL);