diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2018-02-08 23:21:38 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2018-02-12 20:26:46 +0100 |
commit | d55a5e99a6a6ca8f9cc39f49ee398906e962f213 (patch) | |
tree | a9e827933b9a3d944e3ebfc21b8c5a9f1fe3a56a /sd | |
parent | 67ad5a0d25f12ddb5cc95f7226601f54a1074696 (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>
Reviewed-on: https://gerrit.libreoffice.org/49524
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@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 | 10 |
3 files changed, 21 insertions, 5 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 59d1d0e7f424..80518487b96a 100644 --- a/sd/qa/unit/export-tests-ooxml2.cxx +++ b/sd/qa/unit/export-tests-ooxml2.cxx @@ -126,6 +126,7 @@ public: void testAccentColor(); void testTdf114848(); void testTdf115394(); + void testTdf115394Zero(); CPPUNIT_TEST_SUITE(SdOOXMLExportTest2); @@ -173,6 +174,7 @@ public: CPPUNIT_TEST(testAccentColor); CPPUNIT_TEST(testTdf114848); CPPUNIT_TEST(testTdf115394); + CPPUNIT_TEST(testTdf115394Zero); CPPUNIT_TEST_SUITE_END(); @@ -1166,6 +1168,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 07c290895970..9d6f3066b7e9 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -634,10 +634,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; @@ -695,7 +691,11 @@ void PowerPointExport::WriteTransition( const FSHelperPtr& pFS ) } } - if( GETA( Change ) ) + // check if we resolved what transition to export or time is set + if (!nPPTTransitionType && !bOOXmlSpecificTransition && !isTransitionDurationSet) + return; + + if (GETA(Change)) mAny >>= changeType; // 1 means automatic, 2 half automatic - not sure what it means - at least I don't see it in UI |