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 /oox/source/ppt | |
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 'oox/source/ppt')
-rw-r--r-- | oox/source/ppt/slidetransitioncontext.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/oox/source/ppt/slidetransitioncontext.cxx b/oox/source/ppt/slidetransitioncontext.cxx index 7639df7c023b..94fc1c3862ae 100644 --- a/oox/source/ppt/slidetransitioncontext.cxx +++ b/oox/source/ppt/slidetransitioncontext.cxx @@ -47,6 +47,7 @@ SlideTransitionContext::SlideTransitionContext( FragmentHandler2 const & rParent : FragmentHandler2( rParent ) , maSlideProperties( aProperties ) , mbHasTransition( false ) +, mbHasTransitionDuration( false ) { // ST_TransitionSpeed maTransition.setOoxTransitionSpeed( rAttribs.getToken( XML_spd, XML_fast ) ); @@ -54,7 +55,13 @@ SlideTransitionContext::SlideTransitionContext( FragmentHandler2 const & rParent // p14:dur sal_Int32 nDurationInMs = rAttribs.getInteger( P14_TOKEN( dur ), -1 ); if( nDurationInMs > -1 ) + { + // In MSO 0 is visible as 0.01s + if( nDurationInMs == 0.0 ) + nDurationInMs = 10; maTransition.setOoxTransitionSpeed( nDurationInMs / 1000.0 ); + mbHasTransitionDuration = true; + } // TODO rAttribs.getBool( XML_advClick, true ); @@ -182,7 +189,7 @@ void SlideTransitionContext::onEndElement() { if( isCurrentElement(PPT_TOKEN( transition )) ) { - if( mbHasTransition ) + if( mbHasTransition || mbHasTransitionDuration ) { maTransition.setSlideProperties( maSlideProperties ); mbHasTransition = false; |