diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2023-01-12 11:06:42 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2023-01-12 12:40:55 +0000 |
commit | f22a9447c58f2026bc765286a626b3b746977f19 (patch) | |
tree | 3d028d57c44c205e70a16135c47be590126edfbc /animations | |
parent | 171f6e048c171cbf6a00cdf95a447ce6f074b6a0 (diff) |
Simplify a bit
Change-Id: I8e86aa5a43f7c0bc234331def1b4440dbe2cefa4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145389
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'animations')
-rw-r--r-- | animations/source/animcore/animcore.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
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 ); } |