summaryrefslogtreecommitdiff
path: root/animations
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2008-03-12 08:12:00 +0000
committerRüdiger Timm <rt@openoffice.org>2008-03-12 08:12:00 +0000
commitf3f360fd0ec5632f728f04b95b13217f56835a36 (patch)
tree59c7eebbf651fc2425017adda0d41b3ed3550a6c /animations
parenteeeffef622f61ea09ad1c099bcad3eea1b79ecf5 (diff)
INTEGRATION: CWS impresstables2 (1.8.8); FILE MERGED
2008/03/03 15:32:42 cl 1.8.8.1: #i68103# fixed a threading problem
Diffstat (limited to 'animations')
-rw-r--r--animations/source/animcore/animcore.cxx23
1 files changed, 17 insertions, 6 deletions
diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx
index ba034385358a..4e158f3e6d3f 100644
--- a/animations/source/animcore/animcore.cxx
+++ b/animations/source/animcore/animcore.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: animcore.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: hr $ $Date: 2007-08-03 16:22:15 $
+ * last change: $Author: rt $ $Date: 2008-03-12 09:12:00 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -1239,8 +1239,9 @@ void SAL_CALL AnimationNode::setParent( const Reference< XInterface >& Parent )
// XCloneable
Reference< XCloneable > SAL_CALL AnimationNode::createClone() throw (RuntimeException)
{
- Reference< XCloneable > xNewNode;
+ Guard< Mutex > aGuard( maMutex );
+ Reference< XCloneable > xNewNode;
try
{
xNewNode = new AnimationNode( *this );
@@ -1255,12 +1256,17 @@ Reference< XCloneable > SAL_CALL AnimationNode::createClone() throw (RuntimeExce
while( aIter != aEnd )
{
Reference< XCloneable > xCloneable((*aIter++), UNO_QUERY );
- if( xCloneable.is() )
+ if( xCloneable.is() ) try
{
Reference< XAnimationNode > xNewChildNode( xCloneable->createClone(), UNO_QUERY );
if( xNewChildNode.is() )
xContainer->appendChild( xNewChildNode );
}
+ catch( Exception& e )
+ {
+ (void)e;
+ OSL_TRACE( "animations::AnimationNode::createClone(), exception caught!" );
+ }
}
}
}
@@ -1268,7 +1274,7 @@ Reference< XCloneable > SAL_CALL AnimationNode::createClone() throw (RuntimeExce
catch( Exception& e )
{
(void)e;
- OSL_TRACE( "animations::AnimationNode::createClone(), exception catched!" );
+ OSL_TRACE( "animations::AnimationNode::createClone(), exception caught!" );
}
return xNewNode;
@@ -2014,9 +2020,14 @@ Reference< XAnimationNode > SAL_CALL AnimationNode::appendChild( const Reference
if( ::std::find(maChilds.begin(), maChilds.end(), newChild) != maChilds.end() )
throw ElementExistException();
+ Reference< XInterface > xThis( static_cast< OWeakObject * >(this) );
+ Reference< XInterface > xChild( newChild );
+
+ if( xThis == xChild )
+ throw IllegalArgumentException();
+
maChilds.push_back( newChild );
- Reference< XInterface > xThis( static_cast< OWeakObject * >(this) );
newChild->setParent( xThis );
return newChild;