ure/source/uretest/cppmain.cc   |    8 ++++----
 ure/source/uretest/cppserver.cc |    2 +-
 ure/source/uretest/cpptest.cc   |    4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 20db76c08f870f1f1b4f890d93c0597e2bd36a0a
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Tue May 30 10:59:56 2023 +0200
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Tue May 30 13:57:12 2023 +0200

    Revert "Use getXWeak in ure"
    
    This reverts commit d9225a59e89907e9d289ab93c44fd8e6883f1be2.
    
    Reason for revert: this is not a LIBO_INTERNAL_ONLY code.
    
    Change-Id: I780afcd88764f8f5bbf99d257a07d19cacb5aa55
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152322
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/ure/source/uretest/cppmain.cc b/ure/source/uretest/cppmain.cc
index 3346245ccca4..fb957d9f221a 100644
--- a/ure/source/uretest/cppmain.cc
+++ b/ure/source/uretest/cppmain.cc
@@ -131,12 +131,12 @@ private:
         } catch (css::uno::Exception &) {
             throw css::uno::RuntimeException(
                 ::rtl::OUString("error creating instance"),
-                getXWeak());
+                static_cast< ::cppu::OWeakObject * >(this));
         }
         if (!instance.is()) {
             throw css::uno::RuntimeException(
                 "no instance: " + name,
-                getXWeak());
+                static_cast< ::cppu::OWeakObject * >(this));
         }
     }
     css::beans::Introspection::create(context_);
@@ -195,7 +195,7 @@ void Service::test(
         throw css::uno::RuntimeException(
             (name
              + ::rtl::OUString(".throwException failed")),
-            getXWeak());
+            static_cast< ::cppu::OWeakObject * >(this));
     }
 }
 
@@ -204,7 +204,7 @@ namespace CppMain {
 css::uno::Reference< css::uno::XInterface > create(
     css::uno::Reference< css::uno::XComponentContext > const & context)
 {
-    return getXWeak(new Service(context));
+    return static_cast< ::cppu::OWeakObject * >(new Service(context));
 }
 
 rtl::OUString getImplementationName() {
diff --git a/ure/source/uretest/cppserver.cc b/ure/source/uretest/cppserver.cc
index 6f25bb2591ff..db42c9fb3f9f 100644
--- a/ure/source/uretest/cppserver.cc
+++ b/ure/source/uretest/cppserver.cc
@@ -57,7 +57,7 @@ namespace CppServer {
 css::uno::Reference< css::uno::XInterface > create(
     css::uno::Reference< css::uno::XComponentContext > const &)
 {
-    return getXWeak(new Service);
+    return static_cast< ::cppu::OWeakObject * >(new Service);
 }
 
 rtl::OUString getImplementationName() {
diff --git a/ure/source/uretest/cpptest.cc b/ure/source/uretest/cpptest.cc
index 38302e1bc0d9..b037fdceebfb 100644
--- a/ure/source/uretest/cpptest.cc
+++ b/ure/source/uretest/cpptest.cc
@@ -44,7 +44,7 @@ public:
     virtual void SAL_CALL throwException() {
         throw test::types::TestException(
             rtl::OUString("test"),
-            getXWeak());
+            static_cast< cppu::OWeakObject * >(this));
     }
 
 private:
@@ -59,7 +59,7 @@ namespace CppTest {
 css::uno::Reference< css::uno::XInterface > create(
     css::uno::Reference< css::uno::XComponentContext > const &)
 {
-    return getXWeak(new Service);
+    return static_cast< cppu::OWeakObject * >(new Service);
 }
 
 rtl::OUString getImplementationName() {

Reply via email to