summaryrefslogtreecommitdiff
path: root/toolkit/source/controls/tksimpleanimation.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/source/controls/tksimpleanimation.cxx')
-rw-r--r--toolkit/source/controls/tksimpleanimation.cxx55
1 files changed, 16 insertions, 39 deletions
diff --git a/toolkit/source/controls/tksimpleanimation.cxx b/toolkit/source/controls/tksimpleanimation.cxx
index 3d89bf59af82..6ad33608f6ee 100644
--- a/toolkit/source/controls/tksimpleanimation.cxx
+++ b/toolkit/source/controls/tksimpleanimation.cxx
@@ -130,27 +130,6 @@ namespace toolkit
}
//--------------------------------------------------------------------
- uno::Any UnoSimpleAnimationControl::queryAggregation( const uno::Type & rType )
- throw( uno::RuntimeException )
- {
- uno::Any aRet = UnoControlBase::queryAggregation( rType );
- if ( !aRet.hasValue() )
- aRet = UnoSimpleAnimationControl_Base::queryInterface( rType );
- return aRet;
- }
-
- //--------------------------------------------------------------------
- IMPLEMENT_FORWARD_XTYPEPROVIDER2( UnoSimpleAnimationControl, UnoControlBase, UnoSimpleAnimationControl_Base )
-
- //--------------------------------------------------------------------
- void UnoSimpleAnimationControl::dispose() throw( uno::RuntimeException )
- {
- ::osl::ClearableMutexGuard aGuard( GetMutex() );
-
- UnoControl::dispose();
- }
-
- //--------------------------------------------------------------------
::rtl::OUString SAL_CALL UnoSimpleAnimationControl::getImplementationName()
throw( uno::RuntimeException )
{
@@ -161,26 +140,20 @@ namespace toolkit
uno::Sequence< ::rtl::OUString > SAL_CALL UnoSimpleAnimationControl::getSupportedServiceNames()
throw( uno::RuntimeException )
{
- uno::Sequence< ::rtl::OUString > aServices( UnoControlBase::getSupportedServiceNames() );
+ uno::Sequence< ::rtl::OUString > aServices( UnoSimpleAnimationControl_Base::getSupportedServiceNames() );
aServices.realloc( aServices.getLength() + 1 );
aServices[ aServices.getLength() - 1 ] = ::rtl::OUString::createFromAscii( szServiceName_UnoSimpleAnimationControl );
return aServices;
}
//--------------------------------------------------------------------
- void UnoSimpleAnimationControl::createPeer( const uno::Reference< awt::XToolkit > &rxToolkit,
- const uno::Reference< awt::XWindowPeer > &rParentPeer )
- throw( uno::RuntimeException )
- {
- UnoControl::createPeer( rxToolkit, rParentPeer );
- }
-
- //--------------------------------------------------------------------
void SAL_CALL UnoSimpleAnimationControl::start() throw ( uno::RuntimeException )
{
- ::osl::MutexGuard aGuard( GetMutex() );
-
- uno::Reference< XSimpleAnimation > xAnimation( getPeer(), uno::UNO_QUERY );
+ uno::Reference< XSimpleAnimation > xAnimation;
+ {
+ ::osl::MutexGuard aGuard( GetMutex() );
+ xAnimation.set( getPeer(), uno::UNO_QUERY );
+ }
if ( xAnimation.is() )
xAnimation->start();
}
@@ -188,9 +161,11 @@ namespace toolkit
//--------------------------------------------------------------------
void SAL_CALL UnoSimpleAnimationControl::stop() throw ( uno::RuntimeException )
{
- ::osl::MutexGuard aGuard( GetMutex() );
-
- uno::Reference< XSimpleAnimation > xAnimation( getPeer(), uno::UNO_QUERY );
+ uno::Reference< XSimpleAnimation > xAnimation;
+ {
+ ::osl::MutexGuard aGuard( GetMutex() );
+ xAnimation.set( getPeer(), uno::UNO_QUERY );
+ }
if ( xAnimation.is() )
xAnimation->stop();
}
@@ -199,9 +174,11 @@ namespace toolkit
void SAL_CALL UnoSimpleAnimationControl::setImageList( const uno::Sequence< uno::Reference< graphic::XGraphic > >& ImageList )
throw ( uno::RuntimeException )
{
- ::osl::MutexGuard aGuard( GetMutex() );
-
- uno::Reference< XSimpleAnimation > xAnimation( getPeer(), uno::UNO_QUERY );
+ uno::Reference< XSimpleAnimation > xAnimation;
+ {
+ ::osl::MutexGuard aGuard( GetMutex() );
+ xAnimation.set( getPeer(), uno::UNO_QUERY );
+ }
if ( xAnimation.is() )
xAnimation->setImageList( ImageList );
}