summaryrefslogtreecommitdiff
path: root/slideshow/source/engine/animationnodes/animationaudionode.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'slideshow/source/engine/animationnodes/animationaudionode.cxx')
-rw-r--r--slideshow/source/engine/animationnodes/animationaudionode.cxx34
1 files changed, 17 insertions, 17 deletions
diff --git a/slideshow/source/engine/animationnodes/animationaudionode.cxx b/slideshow/source/engine/animationnodes/animationaudionode.cxx
index c4efc7c4df34..bcd694d8d4d2 100644
--- a/slideshow/source/engine/animationnodes/animationaudionode.cxx
+++ b/slideshow/source/engine/animationnodes/animationaudionode.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -45,7 +45,7 @@ namespace slideshow {
namespace internal {
AnimationAudioNode::AnimationAudioNode(
- const uno::Reference< animations::XAnimationNode >& xNode,
+ const uno::Reference< animations::XAnimationNode >& xNode,
const BaseContainerNodeSharedPtr& rParent,
const NodeContext& rContext )
: BaseNode( xNode, rParent, rContext ),
@@ -54,10 +54,10 @@ AnimationAudioNode::AnimationAudioNode(
mpPlayer()
{
mxAudioNode->getSource() >>= maSoundURL;
-
+
OSL_ENSURE( maSoundURL.getLength(),
"could not extract sound source URL/empty URL string" );
-
+
ENSURE_OR_THROW( getContext().mxComponentContext.is(),
"Invalid component context" );
}
@@ -72,21 +72,21 @@ void AnimationAudioNode::dispose()
void AnimationAudioNode::activate_st()
{
createPlayer();
-
+
AnimationEventHandlerSharedPtr aHandler(
boost::dynamic_pointer_cast<AnimationEventHandler>( getSelf() ) );
OSL_ENSURE( aHandler,
"could not cast self to AnimationEventHandler?" );
getContext().mrEventMultiplexer.addCommandStopAudioHandler( aHandler );
-
- if (mpPlayer && mpPlayer->startPlayback())
+
+ if (mpPlayer && mpPlayer->startPlayback())
{
// TODO(F2): Handle end time attribute, too
- if( getXAnimationNode()->getDuration().hasValue() )
+ if( getXAnimationNode()->getDuration().hasValue() )
{
scheduleDeactivationEvent();
}
- else
+ else
{
// no node duration. Take inherent media time, then
scheduleDeactivationEvent(
@@ -95,7 +95,7 @@ void AnimationAudioNode::activate_st()
"AnimationAudioNode::deactivate with delay") );
}
}
- else
+ else
{
// deactivate ASAP:
scheduleDeactivationEvent(
@@ -114,14 +114,14 @@ void AnimationAudioNode::deactivate_st( NodeState /*eDestState*/ )
OSL_ENSURE( aHandler,
"could not cas self to AnimationEventHandler?" );
getContext().mrEventMultiplexer.removeCommandStopAudioHandler( aHandler );
-
+
// force-end sound
- if (mpPlayer)
+ if (mpPlayer)
{
mpPlayer->stopPlayback();
resetPlayer();
}
-
+
// notify _after_ state change:
getContext().mrEventQueue.addEvent(
makeEvent( boost::bind( &EventMultiplexer::notifyAudioStopped,
@@ -142,14 +142,14 @@ void AnimationAudioNode::createPlayer() const
{
if (mpPlayer)
return;
-
- try
+
+ try
{
mpPlayer = SoundPlayer::create( getContext().mrEventMultiplexer,
maSoundURL,
getContext().mxComponentContext );
}
- catch( lang::NoSupportException& )
+ catch( lang::NoSupportException& )
{
// catch possible exceptions from SoundPlayer,
// since being not able to playback the sound
@@ -160,7 +160,7 @@ void AnimationAudioNode::createPlayer() const
void AnimationAudioNode::resetPlayer() const
{
- if (mpPlayer)
+ if (mpPlayer)
{
mpPlayer->stopPlayback();
mpPlayer->dispose();