diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-11-28 11:12:36 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-11-28 13:15:39 +0100 |
commit | 64f57612e3010594a8a72532cabfd0ff5fb39dff (patch) | |
tree | c68ef2c3e9e54fce5601fb3fd6e8f9bd2fad1a12 /stoc/source/uriproc | |
parent | 40ad0e8f6c5cecc01b47763457a1d1676a1fbc76 (diff) |
Catching std::bad_alloc in UNO implementations no longer necessary
...since 0bc89aac4c64bb833e387657f680e194c26aef97 "cppumaker: Allow UNO
interface functions to throw std::exception."
Change-Id: Ia28f02ea10d45267fd951e80da01ffdfdb420885
Diffstat (limited to 'stoc/source/uriproc')
5 files changed, 5 insertions, 37 deletions
diff --git a/stoc/source/uriproc/ExternalUriReferenceTranslator.cxx b/stoc/source/uriproc/ExternalUriReferenceTranslator.cxx index 32d1553dc8f2..f314d158ec9f 100644 --- a/stoc/source/uriproc/ExternalUriReferenceTranslator.cxx +++ b/stoc/source/uriproc/ExternalUriReferenceTranslator.cxx @@ -40,8 +40,6 @@ #include "rtl/ustring.hxx" #include "sal/types.h" -#include <new> - namespace { class Translator: public cppu::WeakImplHelper2< @@ -201,12 +199,7 @@ css::uno::Reference< css::uno::XInterface > create( css::uno::Reference< css::uno::XComponentContext > const & context) SAL_THROW((css::uno::Exception)) { - try { - return static_cast< cppu::OWeakObject * >(new Translator(context)); - } catch (std::bad_alloc &) { - throw css::uno::RuntimeException( - OUString("std::bad_alloc"), 0); - } + return static_cast< cppu::OWeakObject * >(new Translator(context)); } OUString getImplementationName() { diff --git a/stoc/source/uriproc/UriReferenceFactory.cxx b/stoc/source/uriproc/UriReferenceFactory.cxx index 13e54533e48c..903e2c0ffcb5 100644 --- a/stoc/source/uriproc/UriReferenceFactory.cxx +++ b/stoc/source/uriproc/UriReferenceFactory.cxx @@ -23,7 +23,6 @@ #include <cassert> #include <cstdlib> #include <exception> -#include <new> #include <vector> #include "com/sun/star/lang/WrappedTargetRuntimeException.hpp" @@ -641,11 +640,7 @@ css::uno::Reference< css::uno::XInterface > create( css::uno::Reference< css::uno::XComponentContext > const & context) SAL_THROW((css::uno::Exception)) { - try { - return static_cast< cppu::OWeakObject * >(new Factory(context)); - } catch (std::bad_alloc &) { - throw css::uno::RuntimeException("std::bad_alloc", 0); - } + return static_cast< cppu::OWeakObject * >(new Factory(context)); } OUString getImplementationName() { diff --git a/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTexpand.cxx b/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTexpand.cxx index 1b3034e25576..ad4008dd9eb7 100644 --- a/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTexpand.cxx +++ b/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTexpand.cxx @@ -22,7 +22,6 @@ #include "stocservices.hxx" #include <exception> -#include <new> #include "com/sun/star/lang/IllegalArgumentException.hpp" #include "com/sun/star/lang/XServiceInfo.hpp" @@ -222,13 +221,7 @@ css::uno::Reference< css::uno::XInterface > create( SAL_THROW((css::uno::Exception)) { //TODO: single instance - try { - return static_cast< ::cppu::OWeakObject * >(new Parser); - } catch (::std::bad_alloc &) { - throw css::uno::RuntimeException( - OUString("std::bad_alloc"), - css::uno::Reference< css::uno::XInterface >()); - } + return static_cast< ::cppu::OWeakObject * >(new Parser); } OUString getImplementationName() { diff --git a/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx b/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx index 2326574a20b6..da17cbc4b82e 100644 --- a/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx +++ b/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx @@ -42,7 +42,6 @@ #include "sal/types.h" #include <exception> -#include <new> namespace { @@ -446,12 +445,7 @@ css::uno::Reference< css::uno::XInterface > create( SAL_THROW((css::uno::Exception)) { //TODO: single instance - try { - return static_cast< cppu::OWeakObject * >(new Parser); - } catch (std::bad_alloc &) { - throw css::uno::RuntimeException( - OUString("std::bad_alloc"), 0); - } + return static_cast< cppu::OWeakObject * >(new Parser); } OUString getImplementationName() { diff --git a/stoc/source/uriproc/VndSunStarPkgUrlReferenceFactory.cxx b/stoc/source/uriproc/VndSunStarPkgUrlReferenceFactory.cxx index f8234f2397c8..3b7883f54f21 100644 --- a/stoc/source/uriproc/VndSunStarPkgUrlReferenceFactory.cxx +++ b/stoc/source/uriproc/VndSunStarPkgUrlReferenceFactory.cxx @@ -42,8 +42,6 @@ #include "rtl/ustring.hxx" #include "sal/types.h" -#include <new> - namespace { class Factory: public cppu::WeakImplHelper2< @@ -130,12 +128,7 @@ css::uno::Reference< css::uno::XInterface > create( css::uno::Reference< css::uno::XComponentContext > const & context) SAL_THROW((css::uno::Exception)) { - try { - return static_cast< cppu::OWeakObject * >(new Factory(context)); - } catch (std::bad_alloc &) { - throw css::uno::RuntimeException( - OUString("std::bad_alloc"), 0); - } + return static_cast< cppu::OWeakObject * >(new Factory(context)); } OUString getImplementationName() { |