diff options
author | Noel Grandin <noel@peralex.com> | 2014-05-23 12:03:21 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-05-23 15:06:00 +0200 |
commit | e7bc3cab019fbf040f9fb8b53ae2cf3f977d200b (patch) | |
tree | bc507bccee9fb71134e362b72d22991561e32aa0 /desktop | |
parent | c5d47c327a57df55fa3dac0fff6b65888d0345e4 (diff) |
remove boilerplate in UNO Exception constructor calls
Now that we have default values for Exception constructor params,
remove lots of boilerplate code.
Change-Id: I620bd641eecfed38e6123873b3b94aaf47922e74
Diffstat (limited to 'desktop')
5 files changed, 6 insertions, 12 deletions
diff --git a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx index 4410315f0d88..15643375b48b 100644 --- a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx +++ b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx @@ -97,8 +97,7 @@ OUString getNodeValue( return node->getNodeValue(); } catch (const css::xml::dom::DOMException & e) { throw css::uno::RuntimeException( - "com.sun.star.xml.dom.DOMException: " + e.Message, - css::uno::Reference< css::uno::XInterface >()); + "com.sun.star.xml.dom.DOMException: " + e.Message); } } diff --git a/desktop/source/deployment/misc/dp_misc.cxx b/desktop/source/deployment/misc/dp_misc.cxx index 14e2c4c52ddb..9973b775c0e7 100644 --- a/desktop/source/deployment/misc/dp_misc.cxx +++ b/desktop/source/deployment/misc/dp_misc.cxx @@ -451,8 +451,7 @@ Reference<XInterface> resolveUnoURL( for (int i = 0; i <= 20; ++i) // 10 seconds { if (abortChannel != 0 && abortChannel->isAborted()) { - throw ucb::CommandAbortedException( - "abort!", Reference<XInterface>() ); + throw ucb::CommandAbortedException( "abort!" ); } try { return xUnoUrlResolver->resolve( connectString ); diff --git a/desktop/source/deployment/registry/help/dp_help.cxx b/desktop/source/deployment/registry/help/dp_help.cxx index 12cb3c22c4e0..c3ecbd4508eb 100644 --- a/desktop/source/deployment/registry/help/dp_help.cxx +++ b/desktop/source/deployment/registry/help/dp_help.cxx @@ -611,10 +611,8 @@ Reference< ucb::XSimpleFileAccess3 > BackendImpl::getFileAccess( void ) if( !m_xSFA.is() ) { throw RuntimeException( - OUString( "dp_registry::backend::help::BackendImpl::getFileAccess(), " - "could not instatiate SimpleFileAccess." ), - Reference< XInterface >() ); + "could not instatiate SimpleFileAccess." ); } } return m_xSFA; diff --git a/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx b/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx index 788b5e4e408d..86c079183652 100644 --- a/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx +++ b/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx @@ -340,8 +340,7 @@ void BackendImpl::PackageImpl::processPackage_( if ( !m_xNameCntrPkgHandler.is() ) { dp_misc::TRACE("no package handler!!!!\n"); - throw RuntimeException( "No package Handler ", - Reference< XInterface >() ); + throw RuntimeException( "No package Handler " ); } if (doRegisterPackage) diff --git a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx index 2e1fbcb45044..6cad2723cf8e 100644 --- a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx +++ b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx @@ -212,7 +212,7 @@ OUString makeAbsoluteFileUrl( else if (throw_exc) { throw RuntimeException("cannot get file url from system path: " + - sys_path, Reference< XInterface >() ); + sys_path ); } } @@ -227,8 +227,7 @@ OUString makeAbsoluteFileUrl( buf.appendAscii( "\" (base-url) and \"" ); buf.append( file_url ); buf.appendAscii( "\" (file-url)!" ); - throw RuntimeException( - buf.makeStringAndClear(), Reference< XInterface >() ); + throw RuntimeException( buf.makeStringAndClear() ); } return OUString(); } |