diff options
author | Radek Doulik <rodo@novell.com> | 2010-10-08 14:02:37 +0200 |
---|---|---|
committer | Radek Doulik <rodo@novell.com> | 2010-10-08 14:02:37 +0200 |
commit | ff19ebe0dcaa52ae8b87b4cea3de143031a041c7 (patch) | |
tree | 94c77417808350e4cdf771c1f8d1883f943d1d63 /oox | |
parent | e4b13897f5bd03a1782654d32951b0fbd5ad216e (diff) |
oox-pptx-fix-transition-auto-advance.diff: import transition auto advance.
n#480243
Diffstat (limited to 'oox')
-rw-r--r-- | oox/inc/oox/ppt/slidetransition.hxx | 3 | ||||
-rw-r--r-- | oox/source/ppt/slidetransition.cxx | 8 | ||||
-rw-r--r-- | oox/source/ppt/slidetransitioncontext.cxx | 7 | ||||
-rw-r--r-- | oox/source/token/properties.txt | 2 |
4 files changed, 13 insertions, 7 deletions
diff --git a/oox/inc/oox/ppt/slidetransition.hxx b/oox/inc/oox/ppt/slidetransition.hxx index df2eed4d6083..4a833d75ef20 100644 --- a/oox/inc/oox/ppt/slidetransition.hxx +++ b/oox/inc/oox/ppt/slidetransition.hxx @@ -51,6 +51,8 @@ namespace oox { namespace ppt { { mnFadeColor = nColor; } void setMode( sal_Bool bMode ) { mbMode = bMode; } + void setOoxAdvanceTime( sal_Int32 nAdvanceTime ) + { mnAdvanceTime = nAdvanceTime; } static sal_Int16 ooxToOdpDirection( ::sal_Int32 nOoxType ); static sal_Int16 ooxToOdpEightDirections( ::sal_Int32 nOoxType ); @@ -68,6 +70,7 @@ namespace oox { namespace ppt { ::sal_Int16 mnAnimationSpeed; ::sal_Int32 mnFadeColor; ::sal_Bool mbMode; /**< http://api.openoffice.org/docs/common/ref/com/sun/star/animations/XTransitionFilter.html Mode property */ + ::sal_Int32 mnAdvanceTime; }; } } diff --git a/oox/source/ppt/slidetransition.cxx b/oox/source/ppt/slidetransition.cxx index ee889e13d840..b72f6599b4f0 100644 --- a/oox/source/ppt/slidetransition.cxx +++ b/oox/source/ppt/slidetransition.cxx @@ -56,6 +56,7 @@ namespace oox { namespace ppt { , mnAnimationSpeed( AnimationSpeed_FAST ) , mnFadeColor( 0 ) , mbMode( true ) + , mnAdvanceTime( -1 ) { } @@ -68,6 +69,7 @@ namespace oox { namespace ppt { , mnAnimationSpeed( AnimationSpeed_FAST ) , mnFadeColor( 0 ) , mbMode( true ) + , mnAdvanceTime( -1 ) { const transition *p = transition::find( sFilterName ); if( p ) @@ -88,6 +90,10 @@ namespace oox { namespace ppt { aProps[ PROP_TransitionDirection ] <<= mbTransitionDirectionNormal; aProps[ PROP_Speed ] <<= mnAnimationSpeed; aProps[ PROP_TransitionFadeColor ] <<= mnFadeColor; + if( mnAdvanceTime != -1 ) { + aProps[ PROP_Duration ] <<= mnAdvanceTime/1000; + aProps[ PROP_Change ] <<= static_cast<sal_Int32>(1); + } } catch( Exception& ) { @@ -138,8 +144,6 @@ namespace oox { namespace ppt { } } - - sal_Int16 SlideTransition::ooxToOdpEightDirections( ::sal_Int32 nOoxType ) { sal_Int16 nOdpDirection; diff --git a/oox/source/ppt/slidetransitioncontext.cxx b/oox/source/ppt/slidetransitioncontext.cxx index 92993d754ada..2d8548f9ea2c 100644 --- a/oox/source/ppt/slidetransitioncontext.cxx +++ b/oox/source/ppt/slidetransitioncontext.cxx @@ -67,12 +67,9 @@ SlideTransitionContext::SlideTransitionContext( ContextHandler& rParent, const R attribs.getBool( XML_advClick, true ); // careful. if missing, no auto advance... 0 looks like a valid value - // for auto advance + // for auto advance if(attribs.hasAttribute( XML_advTm )) - { - // TODO - xAttribs->getOptionalValue( XML_advTm ); - } + maTransition.setOoxAdvanceTime( attribs.getInteger( XML_advTm, -1 ) ); } SlideTransitionContext::~SlideTransitionContext() throw() diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt index 46894b0bcb27..2a7960ab406f 100644 --- a/oox/source/token/properties.txt +++ b/oox/source/token/properties.txt @@ -40,6 +40,7 @@ CellProtection CellStyle CenterHorizontally CenterVertically +Change CharCaseMap CharColor CharContoured @@ -115,6 +116,7 @@ DialogLibraries DisplayLabels DrillDownOnDoubleClick Dropdown +Duration EchoChar EnableVisible Enabled |