animations/source/animcore/animcore.cxx |   10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

New commits:
commit f22a9447c58f2026bc765286a626b3b746977f19
Author:     Mike Kaganski <[email protected]>
AuthorDate: Thu Jan 12 11:06:42 2023 +0300
Commit:     Mike Kaganski <[email protected]>
CommitDate: Thu Jan 12 12:40:55 2023 +0000

    Simplify a bit
    
    Change-Id: I8e86aa5a43f7c0bc234331def1b4440dbe2cefa4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145389
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <[email protected]>

diff --git a/animations/source/animcore/animcore.cxx 
b/animations/source/animcore/animcore.cxx
index 05b3ae010561..a22c413e64f8 100644
--- a/animations/source/animcore/animcore.cxx
+++ b/animations/source/animcore/animcore.cxx
@@ -2015,15 +2015,13 @@ Reference< XAnimationNode > SAL_CALL 
AnimationNode::appendChild( const Reference
         Guard< Mutex > aGuard( m_aMutex );
 
         if( !newChild.is() )
-            throw IllegalArgumentException("no child", 
static_cast<cppu::OWeakObject*>(this), 1);
+            throw IllegalArgumentException("no child", xThis, 1);
 
         if( std::find(maChildren.begin(), maChildren.end(), newChild) != 
maChildren.end() )
-            throw ElementExistException();
+            throw ElementExistException({}, xThis);
 
-        Reference< XInterface > xChild( newChild );
-
-        if( xThis == xChild )
-            throw IllegalArgumentException("cannot append self", 
static_cast<cppu::OWeakObject*>(this), -1);
+        if( xThis == newChild )
+            throw IllegalArgumentException("cannot append self", xThis, -1);
 
         maChildren.push_back( newChild );
     }

Reply via email to