From e7bc3cab019fbf040f9fb8b53ae2cf3f977d200b Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 23 May 2014 12:03:21 +0200 Subject: 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 --- unotest/source/cpp/toabsolutefileurl.cxx | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) (limited to 'unotest') diff --git a/unotest/source/cpp/toabsolutefileurl.cxx b/unotest/source/cpp/toabsolutefileurl.cxx index 1935c4b26459..5cf86b14f319 100644 --- a/unotest/source/cpp/toabsolutefileurl.cxx +++ b/unotest/source/cpp/toabsolutefileurl.cxx @@ -34,30 +34,27 @@ OUString toAbsoluteFileUrl(OUString const & relativePathname) { oslProcessError e1 = osl_getProcessWorkingDir(&cwd.pData); if (e1 != osl_Process_E_None) { throw css::uno::RuntimeException( - (OUString("osl_getProcessWorkingDir failed with ") + - OUString::number(e1)), - css::uno::Reference< css::uno::XInterface >()); + OUString("osl_getProcessWorkingDir failed with ") + + OUString::number(e1)); } OUString url; osl::FileBase::RC e2 = osl::FileBase::getFileURLFromSystemPath( relativePathname, url); if (e2 != osl::FileBase::E_None) { throw css::uno::RuntimeException( - (OUString("osl::FileBase::getFileURLFromSystemPath(") + - relativePathname + - ") failed with " + - OUString::number(e2)), - css::uno::Reference< css::uno::XInterface >()); + OUString("osl::FileBase::getFileURLFromSystemPath(") + + relativePathname + + ") failed with " + + OUString::number(e2)); } OUString absUrl; e2 = osl::FileBase::getAbsoluteFileURL(cwd, url, absUrl); if (e2 != osl::FileBase::E_None) { throw css::uno::RuntimeException( - (OUString("osl::FileBase::getAbsoluteFileURL(") + - cwd + ", " + url + - ") failed with " + - OUString::number(e2)), - css::uno::Reference< css::uno::XInterface >()); + OUString("osl::FileBase::getAbsoluteFileURL(") + + cwd + ", " + url + + ") failed with " + + OUString::number(e2)); } return absUrl; } -- cgit