diff options
author | Noel Grandin <noel@peralex.com> | 2014-05-28 12:50:02 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-05-29 09:01:40 +0200 |
commit | ebc0a15515c2e29259a7e229cfbdfb5d26fc3006 (patch) | |
tree | 2ce9446ed312a1a7aed53183b19ecc9fefabea8a /shell/source/unix | |
parent | f0ae48b684e89acd7088c31a8feff5fc03d51105 (diff) |
remove more unnecesary OUString constructor use
when throwing exceptions
Change-Id: I6edfb6b6745499f802b0e3c0e096a36fb7c32aac
Diffstat (limited to 'shell/source/unix')
-rw-r--r-- | shell/source/unix/exec/shellexec.cxx | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/shell/source/unix/exec/shellexec.cxx b/shell/source/unix/exec/shellexec.cxx index 6ecad95e6c81..c56e45b02c46 100644 --- a/shell/source/unix/exec/shellexec.cxx +++ b/shell/source/unix/exec/shellexec.cxx @@ -134,8 +134,8 @@ void SAL_CALL ShellExec::execute( const OUString& aCommand, const OUString& aPar if ( aURL.isEmpty() && !aCommand.isEmpty() ) { throw RuntimeException( - (OUString( "Cannot translate URI reference to external format: ") - + aCommand), + OUString("Cannot translate URI reference to external format: ") + + aCommand, static_cast< cppu::OWeakObject * >(this)); } @@ -175,7 +175,7 @@ void SAL_CALL ShellExec::execute( const OUString& aCommand, const OUString& aPar } catch (com::sun::star::lang::IllegalArgumentException &) { throw SystemShellExecuteException( - OUString("Could not expand $BRAND_BASE_DIR path"), + "Could not expand $BRAND_BASE_DIR path", static_cast < XSystemShellExecute * > (this), ENOENT ); } @@ -183,7 +183,7 @@ void SAL_CALL ShellExec::execute( const OUString& aCommand, const OUString& aPar if ( FileBase::E_None != FileBase::getSystemPathFromFileURL(aProgramURL, aProgram)) { throw SystemShellExecuteException( - OUString("Cound not convert executable path"), + "Cound not convert executable path", static_cast < XSystemShellExecute * > (this), ENOENT ); } @@ -224,10 +224,9 @@ void SAL_CALL ShellExec::execute( const OUString& aCommand, const OUString& aPar } else if ((nFlags & css::system::SystemShellExecuteFlags::URIS_ONLY) != 0) { throw css::lang::IllegalArgumentException( - (OUString( - "XSystemShellExecute.execute URIS_ONLY with non-absolute" - " URI reference ") - + aCommand), + OUString("XSystemShellExecute.execute URIS_ONLY with non-absolute" + " URI reference ") + + aCommand, static_cast< cppu::OWeakObject * >(this), 0); } else { escapeForShell(aBuffer, OUStringToOString(aCommand, osl_getThreadTextEncoding())); |