bridges/test/java_uno/nativethreadpool/testnativethreadpoolclient.cxx | 4 ++-- bridges/test/java_uno/nativethreadpool/testnativethreadpoolserver.cxx | 2 +- stoc/source/registry_tdprovider/functiondescription.cxx | 4 ++-- testtools/source/bridgetest/cli/cli_cpp_bridgetest.cxx | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-)
New commits: commit 336353a87e6003e685aab87ea74a158546e1f297 Author: Stephan Bergmann <[email protected]> Date: Tue Apr 16 15:01:31 2013 +0200 Related rhbz#867808: More apparently bogus "throw new ..." in C++ code Change-Id: I5d723b389f1ed20f7962807b782f44f6f3c61882 diff --git a/bridges/test/java_uno/nativethreadpool/testnativethreadpoolclient.cxx b/bridges/test/java_uno/nativethreadpool/testnativethreadpoolclient.cxx index d5a6616..0577ad9 100644 --- a/bridges/test/java_uno/nativethreadpool/testnativethreadpoolclient.cxx +++ b/bridges/test/java_uno/nativethreadpool/testnativethreadpoolclient.cxx @@ -74,7 +74,7 @@ sal_Int32 Client::run(css::uno::Sequence< OUString > const &) css::uno::Reference< css::lang::XMultiComponentFactory > factory( context->getServiceManager()); if (!factory.is()) { - throw new css::uno::RuntimeException( + throw css::uno::RuntimeException( OUString( "no component context service manager" ), static_cast< cppu::OWeakObject * >(this)); } @@ -94,7 +94,7 @@ sal_Int32 Client::run(css::uno::Sequence< OUString > const &) } relay->start(this); if (!data.setData(reinterpret_cast< void * >(12345))) { - throw new css::uno::RuntimeException( + throw css::uno::RuntimeException( OUString( "osl::ThreadData::setData failed" ), static_cast< cppu::OWeakObject * >(this)); } diff --git a/bridges/test/java_uno/nativethreadpool/testnativethreadpoolserver.cxx b/bridges/test/java_uno/nativethreadpool/testnativethreadpoolserver.cxx index d81876f..6a0258a 100644 --- a/bridges/test/java_uno/nativethreadpool/testnativethreadpoolserver.cxx +++ b/bridges/test/java_uno/nativethreadpool/testnativethreadpoolserver.cxx @@ -63,7 +63,7 @@ sal_Int32 Server::get() throw (css::uno::RuntimeException) { css::uno::Reference< css::lang::XMultiComponentFactory > factory( context->getServiceManager()); if (!factory.is()) { - throw new css::uno::RuntimeException( + throw css::uno::RuntimeException( OUString( "no component context service manager" ), static_cast< cppu::OWeakObject * >(this)); } diff --git a/stoc/source/registry_tdprovider/functiondescription.cxx b/stoc/source/registry_tdprovider/functiondescription.cxx index 3b477d1..bbdb3aa 100644 --- a/stoc/source/registry_tdprovider/functiondescription.cxx +++ b/stoc/source/registry_tdprovider/functiondescription.cxx @@ -71,7 +71,7 @@ FunctionDescription::getExceptions() const { try { any = m_manager->getByHierarchicalName(name); } catch (const css::container::NoSuchElementException & e) { - throw new css::uno::RuntimeException( + throw css::uno::RuntimeException( (OUString( "com.sun.star.container.NoSuchElementException: ") + e.Message), @@ -80,7 +80,7 @@ FunctionDescription::getExceptions() const { if (!(any >>= exceptions[i]) || exceptions[i]->getTypeClass() != css::uno::TypeClass_EXCEPTION) { - throw new css::uno::RuntimeException( + throw css::uno::RuntimeException( (OUString("not an exception type: ") + name), css::uno::Reference< css::uno::XInterface >()); //TODO diff --git a/testtools/source/bridgetest/cli/cli_cpp_bridgetest.cxx b/testtools/source/bridgetest/cli/cli_cpp_bridgetest.cxx index c2e7bda..7d08eab 100644 --- a/testtools/source/bridgetest/cli/cli_cpp_bridgetest.cxx +++ b/testtools/source/bridgetest/cli/cli_cpp_bridgetest.cxx @@ -799,7 +799,7 @@ static bool raiseException(XBridgeTest* xLBT ) bRet = performQueryForUnknownType( xLBT ) && bRet; if (! bRet) { - throw new unoidl::com::sun::star::uno::RuntimeException( + throw unoidl::com::sun::star::uno::RuntimeException( new String("error: test failed!"), 0); } } @@ -819,7 +819,7 @@ static bool raiseException(XBridgeTest* xLBT ) { if (args->Length < 1) { - throw new RuntimeException( + throw RuntimeException( "missing argument for bridgetest!", this ); } Object* test_obj = @@ -846,7 +846,7 @@ static bool raiseException(XBridgeTest* xLBT ) s->Append(exc->GetType()->Name); s->Append(S"\n Message: "); s->Append(exc->Message); - throw new unoidl::com::sun::star::uno::RuntimeException( + throw unoidl::com::sun::star::uno::RuntimeException( s->ToString(), 0); } } _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
