summaryrefslogtreecommitdiff
path: root/sd/source/filter
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-03-31 11:02:12 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-03-31 11:19:11 +0100
commit3daa47e87ad8c51a84750676ca9b9932390dbdcf (patch)
treebecb8a8369209e1ac2c1d72955a90f572cf64666 /sd/source/filter
parent4df99bdc5b4a10c9904c2ac792f9c08152419a8e (diff)
coverity#704291 Logically dead code
Change-Id: Icfdb7178ea89f2a3bd9680cf1b2c017b5058bb83
Diffstat (limited to 'sd/source/filter')
-rw-r--r--sd/source/filter/ppt/pptinanimations.cxx64
1 files changed, 25 insertions, 39 deletions
diff --git a/sd/source/filter/ppt/pptinanimations.cxx b/sd/source/filter/ppt/pptinanimations.cxx
index d35a88d85c0f..a071150d7beb 100644
--- a/sd/source/filter/ppt/pptinanimations.cxx
+++ b/sd/source/filter/ppt/pptinanimations.cxx
@@ -2165,7 +2165,7 @@ void AnimationImporter::importCommandContainer( const Atom* pAtom, const Referen
DBG_ASSERT( pAtom && pAtom->getType() == DFF_msofbtAnimCommand && xCommand.is(), "invalid call to ppt::AnimationImporter::importCommandContainer()!");
if( pAtom && xCommand.is() )
{
- sal_Int32 nBits = 0, nType = 0;
+ sal_Int32 nBits = 0;
Any aValue;
const Atom* pChildAtom = pAtom->findFirstChildAtom();
@@ -2230,47 +2230,33 @@ void AnimationImporter::importCommandContainer( const Atom* pAtom, const Referen
NamedValue aParamValue;
- switch( nType )
+ if ( aParam == "onstopaudio" )
{
- case 0: // event
- case 1: // call
- if ( aParam == "onstopaudio" )
- {
- nCommand = EffectCommands::STOPAUDIO;
- }
- else if ( aParam == "play" )
- {
- nCommand = EffectCommands::PLAY;
- }
- else if( aParam.startsWith( "playFrom" ) )
- {
- const OUString aMediaTime( aParam.copy( 9, aParam.getLength() - 10 ) );
- rtl_math_ConversionStatus eStatus;
- double fMediaTime = ::rtl::math::stringToDouble( aMediaTime, (sal_Unicode)('.'), (sal_Unicode)(','), &eStatus, NULL );
- if( eStatus == rtl_math_ConversionStatus_Ok )
- {
- aParamValue.Name = "MediaTime";
- aParamValue.Value <<= fMediaTime;
- }
- nCommand = EffectCommands::PLAY;
- }
- else if ( aParam == "togglePause" )
- {
- nCommand = EffectCommands::TOGGLEPAUSE;
- }
- else if ( aParam == "stop" )
- {
- nCommand = EffectCommands::STOP;
- }
- break;
- case 2: // verb
+ nCommand = EffectCommands::STOPAUDIO;
+ }
+ else if ( aParam == "play" )
+ {
+ nCommand = EffectCommands::PLAY;
+ }
+ else if( aParam.startsWith( "playFrom" ) )
+ {
+ const OUString aMediaTime( aParam.copy( 9, aParam.getLength() - 10 ) );
+ rtl_math_ConversionStatus eStatus;
+ double fMediaTime = ::rtl::math::stringToDouble( aMediaTime, (sal_Unicode)('.'), (sal_Unicode)(','), &eStatus, NULL );
+ if( eStatus == rtl_math_ConversionStatus_Ok )
{
- aParamValue.Name = "Verb";
- aParamValue.Value <<= aParam.toInt32();
-
- nCommand = EffectCommands::VERB;
+ aParamValue.Name = "MediaTime";
+ aParamValue.Value <<= fMediaTime;
}
- break;
+ nCommand = EffectCommands::PLAY;
+ }
+ else if ( aParam == "togglePause" )
+ {
+ nCommand = EffectCommands::TOGGLEPAUSE;
+ }
+ else if ( aParam == "stop" )
+ {
+ nCommand = EffectCommands::STOP;
}
xCommand->setCommand( nCommand );