From 0b0bc5eb77ac735573482dddd6814c9763f8c6e1 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 9 Apr 2018 16:27:42 +0200 Subject: Remove std::bad_alloc -> css::uno::RuntimeException mappings ...that are no longer needed now that the dynamic exception specifications are gone from C++ UNO, so won't cause std::unexpected any more. Change-Id: Ie3418658f5a84e6cec1ac48e3413f523f87497fe Reviewed-on: https://gerrit.libreoffice.org/52641 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- ure/source/uretest/cppmain.cc | 7 +------ ure/source/uretest/cppserver.cc | 9 +-------- ure/source/uretest/cpptest.cc | 7 +------ 3 files changed, 3 insertions(+), 20 deletions(-) (limited to 'ure/source/uretest') diff --git a/ure/source/uretest/cppmain.cc b/ure/source/uretest/cppmain.cc index db1cf308e708..fb957d9f221a 100644 --- a/ure/source/uretest/cppmain.cc +++ b/ure/source/uretest/cppmain.cc @@ -21,7 +21,6 @@ #include #include -#include #include "com/sun/star/beans/Introspection.hpp" #include "com/sun/star/beans/theIntrospection.hpp" @@ -205,11 +204,7 @@ namespace CppMain { css::uno::Reference< css::uno::XInterface > create( css::uno::Reference< css::uno::XComponentContext > const & context) { - try { - return static_cast< ::cppu::OWeakObject * >(new Service(context)); - } catch (::std::bad_alloc &) { - throw css::uno::RuntimeException("std::bad_alloc"); - } + 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 b90e4c057075..db42c9fb3f9f 100644 --- a/ure/source/uretest/cppserver.cc +++ b/ure/source/uretest/cppserver.cc @@ -18,11 +18,8 @@ #include "sal/config.h" -#include - #include "com/sun/star/uno/Exception.hpp" #include "com/sun/star/uno/Reference.hxx" -#include "com/sun/star/uno/RuntimeException.hpp" #include "com/sun/star/uno/Sequence.hxx" #include "com/sun/star/uno/XComponentContext.hpp" #include "com/sun/star/uno/XInterface.hpp" @@ -60,11 +57,7 @@ namespace CppServer { css::uno::Reference< css::uno::XInterface > create( css::uno::Reference< css::uno::XComponentContext > const &) { - try { - return static_cast< ::cppu::OWeakObject * >(new Service); - } catch (::std::bad_alloc &) { - throw css::uno::RuntimeException("std::bad_alloc"); - } + 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 c42270e0c381..b037fdceebfb 100644 --- a/ure/source/uretest/cpptest.cc +++ b/ure/source/uretest/cpptest.cc @@ -20,7 +20,6 @@ #include "com/sun/star/uno/Exception.hpp" #include "com/sun/star/uno/Reference.hxx" -#include "com/sun/star/uno/RuntimeException.hpp" #include "com/sun/star/uno/Sequence.hxx" #include "com/sun/star/uno/XComponentContext.hpp" #include "com/sun/star/uno/XInterface.hpp" @@ -60,11 +59,7 @@ namespace CppTest { css::uno::Reference< css::uno::XInterface > create( css::uno::Reference< css::uno::XComponentContext > const &) { - try { - return static_cast< cppu::OWeakObject * >(new Service); - } catch (std::bad_alloc &) { - throw css::uno::RuntimeException("std::bad_alloc"); - } + return static_cast< cppu::OWeakObject * >(new Service); } rtl::OUString getImplementationName() { -- cgit