summaryrefslogtreecommitdiff
path: root/shell/source/unix/exec
diff options
context:
space:
mode:
authorMarcos Paulo de Souza <marcos.souza.org@gmail.com>2013-01-14 23:03:40 -0200
committerLuboš Luňák <l.lunak@suse.cz>2013-01-15 18:17:17 +0000
commite9aff4b508a1ccd1e5a40fadce3ca78db7b49b86 (patch)
treeff0fd644c5b97892ba741017b452da3c4a93e426 /shell/source/unix/exec
parent279b6f39cf4a13667dd8bcbe8766f900593633c9 (diff)
fdo#57950: Remove some chained appends in shell
And remove some *STRINGPARAM macros. Change-Id: Idebee475e4b383f5f390040515bdfa7c49a24c1d Reviewed-on: https://gerrit.libreoffice.org/1682 Reviewed-by: Luboš Luňák <l.lunak@suse.cz> Tested-by: Luboš Luňák <l.lunak@suse.cz>
Diffstat (limited to 'shell/source/unix/exec')
-rw-r--r--shell/source/unix/exec/shellexec.cxx11
-rw-r--r--shell/source/unix/exec/shellexecentry.cxx4
2 files changed, 6 insertions, 9 deletions
diff --git a/shell/source/unix/exec/shellexec.cxx b/shell/source/unix/exec/shellexec.cxx
index 4c69d771bef2..be926bf89cf4 100644
--- a/shell/source/unix/exec/shellexec.cxx
+++ b/shell/source/unix/exec/shellexec.cxx
@@ -216,13 +216,11 @@ void SAL_CALL ShellExec::execute( const OUString& aCommand, const OUString& aPar
OString aDesktopEnvironment(m_aDesktopEnvironment.toAsciiLowerCase());
OStringBuffer aCopy(aTmp);
- aCopy.append(aDesktopEnvironment);
- aCopy.append("-open-url");
+ aCopy.append(aDesktopEnvironment + "-open-url");
if ( 0 == access( aCopy.getStr(), X_OK) )
{
- aBuffer.append(aDesktopEnvironment);
- aBuffer.append("-");
+ aBuffer.append(aDesktopEnvironment + "-");
}
}
@@ -233,8 +231,7 @@ void SAL_CALL ShellExec::execute( const OUString& aCommand, const OUString& aPar
if ( pDesktopLaunch && *pDesktopLaunch )
{
- aLaunchBuffer.append( pDesktopLaunch );
- aLaunchBuffer.append(" ");
+ aLaunchBuffer.append( OString(pDesktopLaunch) + " ");
escapeForShell(aLaunchBuffer, OUStringToOString(aURL, osl_getThreadTextEncoding()));
}
} else if ((nFlags & css::system::SystemShellExecuteFlags::URIS_ONLY) != 0)
@@ -270,7 +267,7 @@ void SAL_CALL ShellExec::execute( const OUString& aCommand, const OUString& aPar
OString cmd =
#ifdef LINUX
// avoid blocking (call it in background)
- OStringBuffer().append( "( " ).append( aBuffer.makeStringAndClear() ).append( " ) &" ).makeStringAndClear();
+ "( " + aBuffer.makeStringAndClear() + " ) &";
#else
aBuffer.makeStringAndClear();
#endif
diff --git a/shell/source/unix/exec/shellexecentry.cxx b/shell/source/unix/exec/shellexecentry.cxx
index 96f8e526bd28..ca4caf461bda 100644
--- a/shell/source/unix/exec/shellexecentry.cxx
+++ b/shell/source/unix/exec/shellexecentry.cxx
@@ -60,11 +60,11 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL syssh_component_getFactory(
if (0 == ::rtl_str_compare( pImplName, SHELLEXEC_IMPL_NAME ))
{
- OUString serviceName( RTL_CONSTASCII_USTRINGPARAM(SHELLEXEC_SERVICE_NAME) );
+ OUString serviceName( SHELLEXEC_SERVICE_NAME );
xFactory = ::cppu::createSingleComponentFactory(
createInstance,
- OUString( RTL_CONSTASCII_USTRINGPARAM(SHELLEXEC_IMPL_NAME) ),
+ OUString( SHELLEXEC_IMPL_NAME ),
Sequence< OUString >( &serviceName, 1 ) );
}