Kaydet (Commit) ca145c73 authored tarafından Noel Grandin's avatar Noel Grandin

remove some unnecessary OString constructor calls

Change-Id: I11358f17770cacb2a33011797f4be82dc02340b7
Reviewed-on: https://gerrit.libreoffice.org/38130Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 0bebf37b
...@@ -306,9 +306,9 @@ bool curl_run(const OUString& rURL, OutData& out, const OString& aProxyHost, sal ...@@ -306,9 +306,9 @@ bool curl_run(const OUString& rURL, OutData& out, const OString& aProxyHost, sal
curl_easy_getinfo( pCURL, CURLINFO_RESPONSE_CODE, &nError ); curl_easy_getinfo( pCURL, CURLINFO_RESPONSE_CODE, &nError );
if ( 403 == nError ) if ( 403 == nError )
aMessage += OString( " 403: Access denied!" ); aMessage += " 403: Access denied!";
else if ( 404 == nError ) else if ( 404 == nError )
aMessage += OString( " 404: File not found!" ); aMessage += " 404: File not found!";
else if ( 416 == nError ) else if ( 416 == nError )
{ {
// we got this error probably, because we already downloaded the file // 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 ...@@ -317,9 +317,9 @@ bool curl_run(const OUString& rURL, OutData& out, const OString& aProxyHost, sal
} }
else else
{ {
aMessage += OString( ":error code = " ); aMessage += ":error code = ";
aMessage += OString::number( nError ); aMessage += OString::number( nError );
aMessage += OString( " !" ); aMessage += " !";
} }
} }
if ( !ret ) if ( !ret )
......
...@@ -1044,10 +1044,10 @@ OString AstExpression::toString() ...@@ -1044,10 +1044,10 @@ OString AstExpression::toString()
switch (m_combOperator) switch (m_combOperator)
{ {
case ExprComb::UPlus: case ExprComb::UPlus:
exprStr += OString("+"); exprStr += "+";
break; break;
case ExprComb::UMinus: case ExprComb::UMinus:
exprStr += OString("-"); exprStr += "-";
break; break;
default: default:
break; break;
...@@ -1057,34 +1057,34 @@ OString AstExpression::toString() ...@@ -1057,34 +1057,34 @@ OString AstExpression::toString()
switch (m_combOperator) switch (m_combOperator)
{ {
case ExprComb::Add: case ExprComb::Add:
exprStr += OString(" + "); exprStr += " + ";
break; break;
case ExprComb::Minus: case ExprComb::Minus:
exprStr += OString(" - "); exprStr += " - ";
break; break;
case ExprComb::Mul: case ExprComb::Mul:
exprStr += OString(" * "); exprStr += " * ";
break; break;
case ExprComb::Div: case ExprComb::Div:
exprStr += OString(" / "); exprStr += " / ";
break; break;
case ExprComb::Mod: case ExprComb::Mod:
exprStr += OString(" % "); exprStr += " % ";
break; break;
case ExprComb::Or: case ExprComb::Or:
exprStr += OString(" | "); exprStr += " | ";
break; break;
case ExprComb::Xor: case ExprComb::Xor:
exprStr += OString(" ^ "); exprStr += " ^ ";
break; break;
case ExprComb::And: case ExprComb::And:
exprStr += OString(" & "); exprStr += " & ";
break; break;
case ExprComb::Left: case ExprComb::Left:
exprStr += OString(" << "); exprStr += " << ";
break; break;
case ExprComb::Right: case ExprComb::Right:
exprStr += OString(" >> "); exprStr += " >> ";
break; break;
default: default:
break; break;
......
...@@ -933,7 +933,7 @@ XMLFile *SimpleXMLParser::Execute( const OString &rFileName, XMLFile* pXMLFileIn ...@@ -933,7 +933,7 @@ XMLFile *SimpleXMLParser::Execute( const OString &rFileName, XMLFile* pXMLFileIn
if ( !pXMLFile->GetName().isEmpty()) if ( !pXMLFile->GetName().isEmpty())
m_aErrorInformation.m_sMessage += pXMLFile->GetName(); m_aErrorInformation.m_sMessage += pXMLFile->GetName();
else else
m_aErrorInformation.m_sMessage += OString( "XML-File ("); m_aErrorInformation.m_sMessage += "XML-File (";
m_aErrorInformation.m_sMessage += m_aErrorInformation.m_sMessage +=
OString::number(sal::static_int_cast< sal_Int64 >(m_aErrorInformation.m_nLine)) + "," + OString::number(sal::static_int_cast< sal_Int64 >(m_aErrorInformation.m_nLine)) + "," +
......
...@@ -4938,7 +4938,7 @@ namespace osl_Directory ...@@ -4938,7 +4938,7 @@ namespace osl_Directory
#if !defined(_WIN32) && !defined(ANDROID) && !defined(AIX) #if !defined(_WIN32) && !defined(ANDROID) && !defined(AIX)
// FIXME would be nice to create unique dir even on Windows // 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())); char *out = mkdtemp(const_cast<char*>(tmp_x.getStr()));
CPPUNIT_ASSERT_MESSAGE CPPUNIT_ASSERT_MESSAGE
......
...@@ -840,7 +840,7 @@ FILE* PrinterInfoManager::startSpool( const OUString& rPrintername, bool bQuickC ...@@ -840,7 +840,7 @@ FILE* PrinterInfoManager::startSpool( const OUString& rPrintername, bool bQuickC
const OUString& rCommand = (bQuickCommand && !rPrinterInfo.m_aQuickCommand.isEmpty() ) ? const OUString& rCommand = (bQuickCommand && !rPrinterInfo.m_aQuickCommand.isEmpty() ) ?
rPrinterInfo.m_aQuickCommand : rPrinterInfo.m_aCommand; rPrinterInfo.m_aQuickCommand : rPrinterInfo.m_aCommand;
OString aShellCommand = OUStringToOString (rCommand, RTL_TEXTENCODING_ISO_8859_1); OString aShellCommand = OUStringToOString (rCommand, RTL_TEXTENCODING_ISO_8859_1);
aShellCommand += OString( " 2>/dev/null" ); aShellCommand += " 2>/dev/null";
return popen (aShellCommand.getStr(), "w"); return popen (aShellCommand.getStr(), "w");
} }
......
...@@ -190,7 +190,7 @@ void MyApp::Main() ...@@ -190,7 +190,7 @@ void MyApp::Main()
uno::Exception exc; uno::Exception exc;
if (rExc.WrappedException >>= exc) if (rExc.WrappedException >>= exc)
{ {
aStr += OString( " >>> " ); aStr += " >>> ";
aStr += OUStringToOString( exc.Message, RTL_TEXTENCODING_ASCII_US ); aStr += OUStringToOString( exc.Message, RTL_TEXTENCODING_ASCII_US );
} }
OSL_FAIL( aStr.getStr() ); OSL_FAIL( aStr.getStr() );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment