diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2018-02-08 23:21:38 +0100 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2018-02-09 07:03:45 +0100 |
commit | df835773fa8d66a1bd534c5b374ac27552751941 (patch) | |
tree | 54e93c97af29ab3925eccd1a4ed5478a7f56bb95 /sd | |
parent | 2a7057250c8f73fdfb4c65a7525d17e9770459df (diff) |
tdf#115394 correct transition in case of 0s
Change-Id: I23d18acef0bd5db4a4ad6fc67d409e7ed5c93949
Reviewed-on: https://gerrit.libreoffice.org/49462
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/data/pptx/tdf115394-zero.pptx | bin | 0 -> 34352 bytes | |||
-rw-r--r-- | sd/qa/unit/export-tests-ooxml2.cxx | 16 | ||||
-rw-r--r-- | sd/source/filter/eppt/pptx-epptooxml.cxx | 8 |
3 files changed, 20 insertions, 4 deletions
diff --git a/sd/qa/unit/data/pptx/tdf115394-zero.pptx b/sd/qa/unit/data/pptx/tdf115394-zero.pptx Binary files differnew file mode 100644 index 000000000000..e8fb0cfa240c --- /dev/null +++ b/sd/qa/unit/data/pptx/tdf115394-zero.pptx diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx index 6b2f34f49a05..062dab0c4cd0 100644 --- a/sd/qa/unit/export-tests-ooxml2.cxx +++ b/sd/qa/unit/export-tests-ooxml2.cxx @@ -129,6 +129,7 @@ public: void testTdf107608(); void testTdf111786(); void testTdf115394(); + void testTdf115394Zero(); CPPUNIT_TEST_SUITE(SdOOXMLExportTest2); @@ -183,6 +184,7 @@ public: CPPUNIT_TEST(testTdf107608); CPPUNIT_TEST(testTdf111786); CPPUNIT_TEST(testTdf115394); + CPPUNIT_TEST(testTdf115394Zero); CPPUNIT_TEST_SUITE_END(); @@ -1438,6 +1440,20 @@ void SdOOXMLExportTest2::testTdf115394() xDocShRef->DoClose(); } +void SdOOXMLExportTest2::testTdf115394Zero() +{ + sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf115394-zero.pptx"), PPTX); + utl::TempFile tempFile; + xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile); + double fTransitionDuration; + + SdPage* pPage = xDocShRef->GetDoc()->GetSdPage(0, PageKind::Standard); + fTransitionDuration = pPage->getTransitionDuration(); + CPPUNIT_ASSERT_EQUAL(0.01, fTransitionDuration); + + xDocShRef->DoClose(); +} + CPPUNIT_TEST_SUITE_REGISTRATION(SdOOXMLExportTest2); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx index bcf9b0e145ea..6bc8bd0416e5 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -641,10 +641,6 @@ void PowerPointExport::WriteTransition(const FSHelperPtr& pFS) } } - // check if we resolved what transition to export - if (!nPPTTransitionType && !bOOXmlSpecificTransition) - return; - AnimationSpeed animationSpeed = AnimationSpeed_MEDIUM; const char* speed = nullptr; sal_Int32 advanceTiming = -1; @@ -703,6 +699,10 @@ void PowerPointExport::WriteTransition(const FSHelperPtr& pFS) } } + // check if we resolved what transition to export or time is set + if (!nPPTTransitionType && !bOOXmlSpecificTransition && !isTransitionDurationSet) + return; + if (GETA(Change)) mAny >>= changeType; bool isAdvanceTimingSet = advanceTiming != -1; |