diff options
Diffstat (limited to 'sd/qa/unit/import-tests.cxx')
-rw-r--r-- | sd/qa/unit/import-tests.cxx | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index c92ef5f7782c..28474a88d4bb 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -180,6 +180,7 @@ public: void testTdf115394PPT(); void testTdf51340(); void testTdf115639(); + void testTdf116899(); void testTdf77747(); void testTdf116266(); @@ -263,6 +264,7 @@ public: CPPUNIT_TEST(testTdf115394PPT); CPPUNIT_TEST(testTdf51340); CPPUNIT_TEST(testTdf115639); + CPPUNIT_TEST(testTdf116899); CPPUNIT_TEST(testTdf77747); CPPUNIT_TEST(testTdf116266); @@ -2519,6 +2521,29 @@ void SdImportTest::testTdf115639() } } +void SdImportTest::testTdf116899() +{ + // This is a PPT created in Impress and roundtripped in PP, the key times become [1, -1] in PP, + // a time of -1 (-1000) in PPT means key times have to be distributed evenly between 0 and 1 + sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/ppt/tdf116899.ppt"), PPT); + + uno::Reference< drawing::XDrawPagesSupplier > xDoc( + xDocShRef->GetDoc()->getUnoModel(), uno::UNO_QUERY_THROW ); + uno::Reference< drawing::XDrawPage > xPage( + xDoc->getDrawPages()->getByIndex(0), uno::UNO_QUERY_THROW ); + uno::Reference< animations::XAnimationNodeSupplier > xAnimNodeSupplier( + xPage, uno::UNO_QUERY_THROW ); + uno::Reference< animations::XAnimationNode > xRootNode( + xAnimNodeSupplier->getAnimationNode() ); + std::vector< uno::Reference< animations::XAnimationNode > > aAnimVector; + anim::create_deep_vector(xRootNode, aAnimVector); + uno::Reference< animations::XAnimate > xNode( + aAnimVector[8], uno::UNO_QUERY_THROW ); + CPPUNIT_ASSERT_EQUAL_MESSAGE( "Number of key times in the animation node isn't 2.", xNode->getKeyTimes().getLength(), static_cast<sal_Int32>(2) ); + CPPUNIT_ASSERT_EQUAL_MESSAGE( "First key time in the animation node isn't 0, key times aren't normalized.", 0., xNode->getKeyTimes()[0] ); + CPPUNIT_ASSERT_EQUAL_MESSAGE( "Second key time in the animation node isn't 1, key times aren't normalized.", 1., xNode->getKeyTimes()[1] ); +} + void SdImportTest::testTdf77747() { sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/ppt/tdf77747.ppt"), PPT); |