diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-06-26 13:53:53 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-06-26 13:55:33 +0200 |
commit | 8437b42cff4ef9aeb3428432dac77851885b13e3 (patch) | |
tree | be9e97198d9b7922555a284c365d6b0179e0bd93 /sal | |
parent | 63e81af351b09ceecb29c3064660261058fbb2d3 (diff) |
loplugin:stringconstant: handle OUString+=OUString(literal)
Change-Id: Ia304622214c47d35387dd0393db8e9afa55118f2
Diffstat (limited to 'sal')
-rw-r--r-- | sal/qa/osl/file/osl_File.cxx | 16 | ||||
-rw-r--r-- | sal/qa/osl/process/osl_process.cxx | 6 | ||||
-rw-r--r-- | sal/qa/rtl/process/rtl_Process.cxx | 10 | ||||
-rw-r--r-- | sal/rtl/bootstrap.cxx | 2 |
4 files changed, 14 insertions, 20 deletions
diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx index eb3159bf68c7..6f0611f25891 100644 --- a/sal/qa/osl/file/osl_File.cxx +++ b/sal/qa/osl/file/osl_File.cxx @@ -547,8 +547,8 @@ namespace osl_FileBase { #if ( defined UNX ) //Link is not defined in Windows ::rtl::OUString aUStr_LnkFileSys( aTempDirectorySys ), aUStr_SrcFileSys( aTempDirectorySys ); - ( ( aUStr_LnkFileSys += aSlashURL ) += getCurrentPID() ) += ::rtl::OUString("/link.file"); - ( ( aUStr_SrcFileSys += aSlashURL ) += getCurrentPID() ) += ::rtl::OUString("/canonical.name"); + aUStr_LnkFileSys += aSlashURL + getCurrentPID() + "/link.file"; + aUStr_SrcFileSys += aSlashURL + getCurrentPID() + "/canonical.name"; rtl::OString strLinkFileName, strSrcFileName; strLinkFileName = OUStringToOString( aUStr_LnkFileSys, RTL_TEXTENCODING_ASCII_US ); @@ -1432,8 +1432,8 @@ namespace osl_FileStatus sal_Int32 fd; ::rtl::OUString aUStr_LnkFileSys( aTempDirectorySys ), aUStr_SrcFileSys( aTempDirectorySys ); - ( ( aUStr_LnkFileSys += aSlashURL ) += getCurrentPID() ) += ::rtl::OUString("/tmpdir/link.file"); - ( ( aUStr_SrcFileSys += aSlashURL ) += getCurrentPID() ) += ::rtl::OUString("/tmpdir/tmpname"); + aUStr_LnkFileSys += aSlashURL + getCurrentPID() + "/tmpdir/link.file"; + aUStr_SrcFileSys += aSlashURL + getCurrentPID() + "/tmpdir/tmpname"; rtl::OString strLinkFileName; rtl::OString strSrcFileName; @@ -2053,8 +2053,8 @@ namespace osl_FileStatus { //create a link file; ::rtl::OUString aUStr_LnkFileSys( aTempDirectorySys ), aUStr_SrcFileSys( aTempDirectorySys ); - ( ( aUStr_LnkFileSys += aSlashURL ) += getCurrentPID() ) += ::rtl::OUString("/link.file"); - ( ( aUStr_SrcFileSys += aSlashURL ) += getCurrentPID() ) += ::rtl::OUString("/tmpname"); + aUStr_LnkFileSys += aSlashURL + getCurrentPID() + "/link.file"; + aUStr_SrcFileSys += aSlashURL + getCurrentPID() + "/tmpname"; rtl::OString strLinkFileName, strSrcFileName; strLinkFileName = OUStringToOString( aUStr_LnkFileSys, RTL_TEXTENCODING_ASCII_US ); @@ -4406,8 +4406,8 @@ namespace osl_Directory bool bFoundOK = false; ::rtl::OUString aUStr_LnkFileSys( aTempDirectorySys ), aUStr_SrcFileSys( aTempDirectorySys ); - ( aUStr_LnkFileSys += aSlashURL ) += ::rtl::OUString("/tmpdir/link.file"); - ( aUStr_SrcFileSys += aSlashURL ) += ::rtl::OUString("/tmpdir/tmpname"); + aUStr_LnkFileSys += aSlashURL + "/tmpdir/link.file"; + aUStr_SrcFileSys += aSlashURL + "/tmpdir/tmpname"; ::rtl::OString strLinkFileName, strSrcFileName; strLinkFileName = OUStringToOString( aUStr_LnkFileSys, RTL_TEXTENCODING_ASCII_US ); diff --git a/sal/qa/osl/process/osl_process.cxx b/sal/qa/osl/process/osl_process.cxx index 4a9cd425658c..39e254c8dd9e 100644 --- a/sal/qa/osl/process/osl_process.cxx +++ b/sal/qa/osl/process/osl_process.cxx @@ -87,7 +87,7 @@ inline ::rtl::OUString getExecutablePath() reinterpret_cast<oslGenericFunction>(&getExecutablePath), dirPath); dirPath = dirPath.copy( 0, dirPath.lastIndexOf('/') ); dirPath = dirPath.copy( 0, dirPath.lastIndexOf('/') + 1); - dirPath += rtl::OUString("Executable"); + dirPath += "Executable"; return dirPath; } @@ -199,9 +199,7 @@ public: { parameters_[0] = env_param_.pData; suCWD = getExecutablePath(); - suExecutableFileURL = suCWD; - suExecutableFileURL += rtl::OUString("/"); - suExecutableFileURL += EXECUTABLE_NAME; + suExecutableFileURL = suCWD + "/" + EXECUTABLE_NAME; } virtual void setUp() SAL_OVERRIDE diff --git a/sal/qa/rtl/process/rtl_Process.cxx b/sal/qa/rtl/process/rtl_Process.cxx index 3c709f0550ea..5b13b3c32120 100644 --- a/sal/qa/rtl/process/rtl_Process.cxx +++ b/sal/qa/rtl/process/rtl_Process.cxx @@ -62,7 +62,7 @@ inline ::rtl::OUString getModulePath() printUString(suDirPath, "modulePath:"); suDirPath = suDirPath.copy( 0, suDirPath.lastIndexOf('/') ); suDirPath = suDirPath.copy( 0, suDirPath.lastIndexOf('/') + 1); - suDirPath += rtl::OUString("bin"); + suDirPath += "bin"; return suDirPath; } @@ -103,9 +103,7 @@ public: pParameters[2] = suParam2.pData; pParameters[3] = suParam3.pData; - rtl::OUString suFileURL = suCWD; - suFileURL += rtl::OUString("/"); - suFileURL += EXECUTABLE_NAME; + rtl::OUString suFileURL = suCWD + "/" + EXECUTABLE_NAME; oslProcessError osl_error = osl_executeProcess( suFileURL.pData, @@ -232,9 +230,7 @@ public: rtl::OUString suCWD = getModulePath(); oslProcess hProcess = NULL; - rtl::OUString suFileURL = suCWD; - suFileURL += rtl::OUString("/"); - suFileURL += EXEC_NAME; + rtl::OUString suFileURL = suCWD + "/" + EXEC_NAME; oslFileHandle* pChildOutputRead = new oslFileHandle(); oslProcessError osl_error = osl_executeProcess_WithRedirectedIO( suFileURL.pData, diff --git a/sal/rtl/bootstrap.cxx b/sal/rtl/bootstrap.cxx index 715555a64a13..3c34e792072e 100644 --- a/sal/rtl/bootstrap.cxx +++ b/sal/rtl/bootstrap.cxx @@ -270,7 +270,7 @@ static OUString & getIniFileName_Impl() fileName = fileName.copy(0, fileName.getLength() - progExt.getLength()); // append config file suffix - fileName += OUString(SAL_CONFIGFILE("")); + fileName += SAL_CONFIGFILE(""); #ifdef MACOSX // We keep only executables in the MacOS folder, and all |