remove some unnecessary OString constructor calls

Change-Id: I11358f17770cacb2a33011797f4be82dc02340b7
Reviewed-on: https://gerrit.libreoffice.org/38130
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2017-05-29 12:56:28 +02:00
parent 0bebf37bac
commit ca145c7364
6 changed files with 20 additions and 20 deletions
+4 -4
View File
@@ -306,9 +306,9 @@ bool curl_run(const OUString& rURL, OutData& out, const OString& aProxyHost, sal
curl_easy_getinfo( pCURL, CURLINFO_RESPONSE_CODE, &nError );
if ( 403 == nError )
aMessage += OString( " 403: Access denied!" );
aMessage += " 403: Access denied!";
else if ( 404 == nError )
aMessage += OString( " 404: File not found!" );
aMessage += " 404: File not found!";
else if ( 416 == nError )
{
// we got this error probably, because we already downloaded the file
@@ -317,9 +317,9 @@ bool curl_run(const OUString& rURL, OutData& out, const OString& aProxyHost, sal
}
else
{
aMessage += OString( ":error code = " );
aMessage += ":error code = ";
aMessage += OString::number( nError );
aMessage += OString( " !" );
aMessage += " !";
}
}
if ( !ret )
+12 -12
View File
@@ -1044,10 +1044,10 @@ OString AstExpression::toString()
switch (m_combOperator)
{
case ExprComb::UPlus:
exprStr += OString("+");
exprStr += "+";
break;
case ExprComb::UMinus:
exprStr += OString("-");
exprStr += "-";
break;
default:
break;
@@ -1057,34 +1057,34 @@ OString AstExpression::toString()
switch (m_combOperator)
{
case ExprComb::Add:
exprStr += OString(" + ");
exprStr += " + ";
break;
case ExprComb::Minus:
exprStr += OString(" - ");
exprStr += " - ";
break;
case ExprComb::Mul:
exprStr += OString(" * ");
exprStr += " * ";
break;
case ExprComb::Div:
exprStr += OString(" / ");
exprStr += " / ";
break;
case ExprComb::Mod:
exprStr += OString(" % ");
exprStr += " % ";
break;
case ExprComb::Or:
exprStr += OString(" | ");
exprStr += " | ";
break;
case ExprComb::Xor:
exprStr += OString(" ^ ");
exprStr += " ^ ";
break;
case ExprComb::And:
exprStr += OString(" & ");
exprStr += " & ";
break;
case ExprComb::Left:
exprStr += OString(" << ");
exprStr += " << ";
break;
case ExprComb::Right:
exprStr += OString(" >> ");
exprStr += " >> ";
break;
default:
break;
+1 -1
View File
@@ -933,7 +933,7 @@ XMLFile *SimpleXMLParser::Execute( const OString &rFileName, XMLFile* pXMLFileIn
if ( !pXMLFile->GetName().isEmpty())
m_aErrorInformation.m_sMessage += pXMLFile->GetName();
else
m_aErrorInformation.m_sMessage += OString( "XML-File (");
m_aErrorInformation.m_sMessage += "XML-File (";
m_aErrorInformation.m_sMessage +=
OString::number(sal::static_int_cast< sal_Int64 >(m_aErrorInformation.m_nLine)) + "," +
+1 -1
View File
@@ -4938,7 +4938,7 @@ namespace osl_Directory
#if !defined(_WIN32) && !defined(ANDROID) && !defined(AIX)
// FIXME would be nice to create unique dir even on Windows
tmp_x += OString("XXXXXX");
tmp_x += "XXXXXX";
char *out = mkdtemp(const_cast<char*>(tmp_x.getStr()));
CPPUNIT_ASSERT_MESSAGE
@@ -840,7 +840,7 @@ FILE* PrinterInfoManager::startSpool( const OUString& rPrintername, bool bQuickC
const OUString& rCommand = (bQuickCommand && !rPrinterInfo.m_aQuickCommand.isEmpty() ) ?
rPrinterInfo.m_aQuickCommand : rPrinterInfo.m_aCommand;
OString aShellCommand = OUStringToOString (rCommand, RTL_TEXTENCODING_ISO_8859_1);
aShellCommand += OString( " 2>/dev/null" );
aShellCommand += " 2>/dev/null";
return popen (aShellCommand.getStr(), "w");
}
+1 -1
View File
@@ -190,7 +190,7 @@ void MyApp::Main()
uno::Exception exc;
if (rExc.WrappedException >>= exc)
{
aStr += OString( " >>> " );
aStr += " >>> ";
aStr += OUStringToOString( exc.Message, RTL_TEXTENCODING_ASCII_US );
}
OSL_FAIL( aStr.getStr() );