testtools/source/bridgetest/bridgetest.cxx | 3 +-- testtools/source/bridgetest/constructors.cxx | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-)
New commits: commit 42a5f14edcea5d2fd2e92955cd70a163a1a27804 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Sun Apr 23 20:15:11 2023 +0300 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Sat May 27 20:14:56 2023 +0200 Use getXWeak in testtools Change-Id: Iee8f1314fc3d924376b5b6ad6c683c7d451ab900 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150876 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/testtools/source/bridgetest/bridgetest.cxx b/testtools/source/bridgetest/bridgetest.cxx index 7de0ee794720..9e3eb90c1de9 100644 --- a/testtools/source/bridgetest/bridgetest.cxx +++ b/testtools/source/bridgetest/bridgetest.cxx @@ -1303,8 +1303,7 @@ Sequence< OUString > TestBridgeImpl::getSupportedServiceNames() static Reference< XInterface > TestBridgeImpl_create( const Reference< XComponentContext > & xContext ) { - return Reference< XInterface >( - static_cast< OWeakObject * >( new TestBridgeImpl( xContext ) ) ); + return getXWeak( new TestBridgeImpl( xContext ) ); } } diff --git a/testtools/source/bridgetest/constructors.cxx b/testtools/source/bridgetest/constructors.cxx index 04b953fff0e2..47be30649a42 100644 --- a/testtools/source/bridgetest/constructors.cxx +++ b/testtools/source/bridgetest/constructors.cxx @@ -407,7 +407,7 @@ css::uno::Reference< css::uno::XInterface > create( SAL_UNUSED_PARAMETER css::uno::Reference< css::uno::XComponentContext > const &) { - return static_cast< ::cppu::OWeakObject * >(new Impl); + return getXWeak(new Impl); } OUString getImplementationName() { @@ -423,7 +423,7 @@ css::uno::Reference< css::uno::XInterface > create2( SAL_UNUSED_PARAMETER css::uno::Reference< css::uno::XComponentContext > const &) { - return static_cast< ::cppu::OWeakObject * >(new Impl2); + return getXWeak(new Impl2); } OUString getImplementationName2() {