summaryrefslogtreecommitdiff
path: root/io/test/stm/datatest.cxx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2023-04-23 20:14:07 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2023-05-27 18:08:00 +0200
commit87276a497d9aa8a3f8ac0bfceb75d64938945f9a (patch)
treed9fe1c4aac4ce27488259bf3f2143575761fa8d6 /io/test/stm/datatest.cxx
parentefcbd2306f0310809f2d6f1db086b839055c77f6 (diff)
Use getXWeak in io
Change-Id: If2b40ecdca67c6d82ff1a87443cb8533401e9ae8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150856 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'io/test/stm/datatest.cxx')
-rw-r--r--io/test/stm/datatest.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/io/test/stm/datatest.cxx b/io/test/stm/datatest.cxx
index a085bf6d7d5b..ef31f099d496 100644
--- a/io/test/stm/datatest.cxx
+++ b/io/test/stm/datatest.cxx
@@ -326,8 +326,7 @@ void ODataStreamTest::testSimple( const Reference < XDataInputStream > &rInput
**/
Reference < XInterface > SAL_CALL ODataStreamTest_CreateInstance( const Reference < XMultiServiceFactory > & rSMgr ) throw(Exception)
{
- ODataStreamTest *p = new ODataStreamTest( rSMgr );
- return Reference < XInterface > ( (static_cast< OWeakObject * >(p)) );
+ return getXWeak(new ODataStreamTest( rSMgr ));
}
Sequence<OUString> ODataStreamTest_getSupportedServiceNames( int i) throw ()
@@ -596,8 +595,7 @@ Reference < XInterface > SAL_CALL OMyPersistObject_CreateInstance(
const Reference < XMultiServiceFactory > & rSMgr )
throw(Exception)
{
- MyPersistObject *p = new MyPersistObject( );
- return Reference < XInterface > ( (static_cast< OWeakObject * >(p)) );
+ return getXWeak(new MyPersistObject( ));
}
Sequence<OUString> OMyPersistObject_getSupportedServiceNames( ) throw ()
@@ -1040,8 +1038,7 @@ void OObjectStreamTest::testObject( const Reference< XObjectOutputStream >
Reference < XInterface > SAL_CALL OObjectStreamTest_CreateInstance( const Reference < XMultiServiceFactory > & rSMgr ) throw(Exception)
{
- OObjectStreamTest *p = new OObjectStreamTest( rSMgr );
- return Reference < XInterface > ( (static_cast< OWeakObject * >(p)) );
+ return getXWeak(new OObjectStreamTest( rSMgr ));
}
Sequence<OUString> OObjectStreamTest_getSupportedServiceNames( int i) throw ()