summaryrefslogtreecommitdiff
path: root/sal/qa
diff options
context:
space:
mode:
authorStephan Bergmann <stephan.bergmann@allotropia.de>2023-11-29 14:40:14 +0100
committerStephan Bergmann <stephan.bergmann@allotropia.de>2023-11-29 19:38:09 +0100
commit9bccf92aba991366952261e51183455efa67da13 (patch)
tree4ef6bbbabfa1f3e59591734c7356af91e8d1be3e /sal/qa
parent692a116c27ea24d3245d38fe5063d8f84c07f7f2 (diff)
Extended loplugin:ostr: sal
Change-Id: Ieca8096e2af9615fa4c34557a47bc13ee5c23936 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160105 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Diffstat (limited to 'sal/qa')
-rw-r--r--sal/qa/osl/file/osl_File.cxx24
-rw-r--r--sal/qa/osl/process/osl_Thread.cxx12
-rw-r--r--sal/qa/rtl/ostring/rtl_str.cxx4
3 files changed, 20 insertions, 20 deletions
diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx
index be4a88178275..6b0c50dfafd8 100644
--- a/sal/qa/osl/file/osl_File.cxx
+++ b/sal/qa/osl/file/osl_File.cxx
@@ -45,37 +45,37 @@ static OString errorToString(const osl::FileBase::RC _nError)
OString sResult;
switch (_nError) {
case osl::FileBase::E_None:
- sResult = "Success";
+ sResult = "Success"_ostr;
break;
case osl::FileBase::E_PERM:
- sResult = "Operation not permitted";
+ sResult = "Operation not permitted"_ostr;
break;
case osl::FileBase::E_NOENT:
- sResult = "No such file or directory";
+ sResult = "No such file or directory"_ostr;
break;
case osl::FileBase::E_EXIST:
- sResult = "Already Exist";
+ sResult = "Already Exist"_ostr;
break;
case osl::FileBase::E_ACCES:
- sResult = "Permission denied";
+ sResult = "Permission denied"_ostr;
break;
case osl::FileBase::E_INVAL:
- sResult = "The format of the parameters was not valid";
+ sResult = "The format of the parameters was not valid"_ostr;
break;
case osl::FileBase::E_NOTDIR:
- sResult = "Not a directory";
+ sResult = "Not a directory"_ostr;
break;
case osl::FileBase::E_ISDIR:
- sResult = "Is a directory";
+ sResult = "Is a directory"_ostr;
break;
case osl::FileBase::E_BADF:
- sResult = "Bad file";
+ sResult = "Bad file"_ostr;
break;
case osl::FileBase::E_NOTEMPTY:
- sResult = "The directory is not empty";
+ sResult = "The directory is not empty"_ostr;
break;
default:
- sResult = "Unknown Error";
+ sResult = "Unknown Error"_ostr;
break;
}
return sResult;
@@ -4361,7 +4361,7 @@ namespace osl_Directory
bool b6 = _aVolumeInfo.getRAMDiskFlag();
OString sAttr;
- if (b1) sAttr = "Remote";
+ if (b1) sAttr = "Remote"_ostr;
if (b2) sAttr += " Removeable";
if (b3) sAttr += " CDROM";
if (b4) sAttr += " Floppy";
diff --git a/sal/qa/osl/process/osl_Thread.cxx b/sal/qa/osl/process/osl_Thread.cxx
index 389894bbcd8a..0cb0e773dbe6 100644
--- a/sal/qa/osl/process/osl_Thread.cxx
+++ b/sal/qa/osl/process/osl_Thread.cxx
@@ -948,26 +948,26 @@ namespace osl_Thread
switch (_aPriority)
{
case osl_Thread_PriorityHighest:
- sPrioStr = "Highest";
+ sPrioStr = "Highest"_ostr;
break;
case osl_Thread_PriorityAboveNormal:
- sPrioStr = "AboveNormal";
+ sPrioStr = "AboveNormal"_ostr;
break;
case osl_Thread_PriorityNormal:
- sPrioStr = "Normal";
+ sPrioStr = "Normal"_ostr;
break;
case osl_Thread_PriorityBelowNormal:
- sPrioStr = "BelowNormal";
+ sPrioStr = "BelowNormal"_ostr;
break;
case osl_Thread_PriorityLowest:
- sPrioStr = "Lowest";
+ sPrioStr = "Lowest"_ostr;
break;
default:
- sPrioStr = "unknown";
+ sPrioStr = "unknown"_ostr;
}
return sPrioStr;
}
diff --git a/sal/qa/rtl/ostring/rtl_str.cxx b/sal/qa/rtl/ostring/rtl_str.cxx
index c4e13ff619a9..834559f7cfb0 100644
--- a/sal/qa/rtl/ostring/rtl_str.cxx
+++ b/sal/qa/rtl/ostring/rtl_str.cxx
@@ -394,11 +394,11 @@ namespace rtl_str
sal_Int32 nIndex = rtl_str_lastIndexOfStr( aStr1.getStr(), aSearchStr.getStr() );
CPPUNIT_ASSERT_EQUAL_MESSAGE("index is wrong.", sal_Int32(15), nIndex);
- /* OString */ aSearchStr = "Line";
+ /* OString */ aSearchStr = "Line"_ostr;
/* sal_Int32 */ nIndex = rtl_str_lastIndexOfStr( aStr1.getStr(), aSearchStr.getStr() );
CPPUNIT_ASSERT_EQUAL_MESSAGE("index is wrong.", sal_Int32(0), nIndex);
- /* OString */ aSearchStr = "";
+ /* OString */ aSearchStr = ""_ostr;
/* sal_Int32 */ nIndex = rtl_str_lastIndexOfStr( aStr1.getStr(), aSearchStr.getStr() );
CPPUNIT_ASSERT_EQUAL_MESSAGE("index is wrong.", sal_Int32(-1), nIndex);
}