--- animations/source/animcore/animcore.cxx 2012-06-13 13:07:57.219687400 +0800 +++ animations/source/animcore/animcore.cxx.orig 2012-06-10 17:16:03.900024900 +0800 @@ -49,7 +49,6 @@ #include #include #include -#include #include #include @@ -69,7 +68,6 @@ using ::com::sun::star::uno::RuntimeException; using ::com::sun::star::uno::Sequence; using ::com::sun::star::uno::Reference; -using ::com::sun::star::uno::WeakReference; using ::com::sun::star::uno::XComponentContext; using ::com::sun::star::uno::Exception; using ::com::sun::star::uno::XWeak; @@ -309,7 +307,7 @@ Sequence< NamedValue > maUserData; // parent interface for XChild interface implementation - WeakReference mxParent; + Reference mxParent; AnimationNode* mpParent; // attributes for XAnimate @@ -410,7 +408,7 @@ Sequence< Type >* AnimationNode::mpTypes[] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; Sequence< sal_Int8 >* AnimationNode::mpId[] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; -static int AnimationNode_new=0, AnimationNode_delete=0; + AnimationNode::AnimationNode( sal_Int16 nNodeType ) : maChangeListener(maMutex), mnNodeType( nNodeType ), @@ -1143,7 +1141,7 @@ Reference< XInterface > SAL_CALL AnimationNode::getParent() throw (RuntimeException) { Guard< Mutex > aGuard( maMutex ); - return mxParent.get(); + return mxParent; } // -------------------------------------------------------------------- @@ -1152,12 +1150,12 @@ void SAL_CALL AnimationNode::setParent( const Reference< XInterface >& Parent ) throw (NoSupportException, RuntimeException) { Guard< Mutex > aGuard( maMutex ); - if( Parent != mxParent.get() ) + if( Parent != mxParent ) { mxParent = Parent; mpParent = 0; - Reference< XUnoTunnel > xTunnel( mxParent.get(), UNO_QUERY ); + Reference< XUnoTunnel > xTunnel( mxParent, UNO_QUERY ); if( xTunnel.is() ) mpParent = reinterpret_cast< AnimationNode* >( sal::static_int_cast< sal_IntPtr >(xTunnel->getSomething( getUnoTunnelId() ))); @@ -2069,7 +2067,7 @@ { Reference< XInterface > xSource( static_cast(this), UNO_QUERY ); Sequence< ElementChange > aChanges; - const ChangesEvent aEvent( xSource, makeAny( mxParent.get() ), aChanges ); + const ChangesEvent aEvent( xSource, makeAny( mxParent ), aChanges ); while( aIterator.hasMoreElements() ) { Reference< XChangesListener > xListener( aIterator.next(), UNO_QUERY );