loplugin:stringconstant: OUStringBuffer: appendAscii -> append
Change-Id: Iea6b497b91b8874bfaded494a114cbeef4417b70
This commit is contained in:
@@ -71,9 +71,9 @@ static void checkLdapReturnCode(const sal_Char *aOperation,
|
||||
|
||||
if (aOperation != NULL)
|
||||
{
|
||||
message.appendAscii(aOperation).appendAscii(": ") ;
|
||||
message.appendAscii(aOperation).append(": ") ;
|
||||
}
|
||||
message.appendAscii(ldap_err2string(aRetCode)).appendAscii(" (") ;
|
||||
message.appendAscii(ldap_err2string(aRetCode)).append(" (") ;
|
||||
sal_Char *stub = NULL ;
|
||||
|
||||
#ifndef LDAP_OPT_SIZELIMIT // for use with OpenLDAP
|
||||
@@ -90,7 +90,7 @@ static void checkLdapReturnCode(const sal_Char *aOperation,
|
||||
//ldap_memfree(stub) ;
|
||||
}
|
||||
else { message.appendAscii(kNoSpecificMessage) ; }
|
||||
message.appendAscii(")") ;
|
||||
message.append(")") ;
|
||||
throw ldap::LdapGenericException(message.makeStringAndClear(),
|
||||
NULL, aRetCode) ;
|
||||
}
|
||||
@@ -154,7 +154,7 @@ void LdapConnection::initConnection()
|
||||
{
|
||||
OUStringBuffer message ;
|
||||
|
||||
message.appendAscii("Cannot initialise connection to LDAP: No server specified.") ;
|
||||
message.append("Cannot initialise connection to LDAP: No server specified.") ;
|
||||
throw ldap::LdapConnectionException(message.makeStringAndClear()) ;
|
||||
}
|
||||
|
||||
@@ -171,9 +171,9 @@ void LdapConnection::initConnection()
|
||||
{
|
||||
OUStringBuffer message ;
|
||||
|
||||
message.appendAscii("Cannot initialise connection to LDAP server ") ;
|
||||
message.append("Cannot initialise connection to LDAP server ") ;
|
||||
message.append(mLdapDefinition.mServer) ;
|
||||
message.appendAscii(":") ;
|
||||
message.append(":") ;
|
||||
message.append(mLdapDefinition.mPort) ;
|
||||
throw ldap::LdapConnectionException(message.makeStringAndClear());
|
||||
}
|
||||
|
||||
@@ -220,13 +220,13 @@ namespace logging
|
||||
{
|
||||
OUStringBuffer buf;
|
||||
if(m_LogEventNo)
|
||||
buf.appendAscii("event no,");
|
||||
buf.append("event no,");
|
||||
if(m_LogThread)
|
||||
buf.appendAscii("thread,");
|
||||
buf.append("thread,");
|
||||
if(m_LogTimestamp)
|
||||
buf.appendAscii("timestamp,");
|
||||
buf.append("timestamp,");
|
||||
if(m_LogSource)
|
||||
buf.appendAscii("class,method,");
|
||||
buf.append("class,method,");
|
||||
sal_Int32 columns = m_Columnnames.getLength();
|
||||
for(sal_Int32 i=0; i<columns; i++)
|
||||
{
|
||||
|
||||
@@ -87,16 +87,16 @@ namespace logging
|
||||
OUString SAL_CALL PlainTextFormatter::getHead( ) throw (RuntimeException, std::exception)
|
||||
{
|
||||
OUStringBuffer aHeader;
|
||||
aHeader.appendAscii( " event no" ); // column 1: the event number
|
||||
aHeader.appendAscii( " " );
|
||||
aHeader.appendAscii( "thread " ); // column 2: the thread ID
|
||||
aHeader.appendAscii( " " );
|
||||
aHeader.appendAscii( "date " ); // column 3: date
|
||||
aHeader.appendAscii( " " );
|
||||
aHeader.appendAscii( "time " ); // column 4: time
|
||||
aHeader.appendAscii( " " );
|
||||
aHeader.appendAscii( "(class/method:) message" ); // column 5: class/method/message
|
||||
aHeader.appendAscii( "\n" );
|
||||
aHeader.append( " event no" ); // column 1: the event number
|
||||
aHeader.append( " " );
|
||||
aHeader.append( "thread " ); // column 2: the thread ID
|
||||
aHeader.append( " " );
|
||||
aHeader.append( "date " ); // column 3: date
|
||||
aHeader.append( " " );
|
||||
aHeader.append( "time " ); // column 4: time
|
||||
aHeader.append( " " );
|
||||
aHeader.append( "(class/method:) message" ); // column 5: class/method/message
|
||||
aHeader.append( "\n" );
|
||||
return aHeader.makeStringAndClear();
|
||||
}
|
||||
|
||||
@@ -111,29 +111,29 @@ namespace logging
|
||||
|
||||
OUStringBuffer aLogEntry;
|
||||
aLogEntry.appendAscii( buffer );
|
||||
aLogEntry.appendAscii( " " );
|
||||
aLogEntry.append( " " );
|
||||
|
||||
OString sThreadID( OUStringToOString( _rRecord.ThreadID, osl_getThreadTextEncoding() ) );
|
||||
snprintf( buffer, buffer_size, "%8s", sThreadID.getStr() );
|
||||
aLogEntry.appendAscii( buffer );
|
||||
aLogEntry.appendAscii( " " );
|
||||
aLogEntry.append( " " );
|
||||
|
||||
snprintf( buffer, buffer_size, "%04i-%02i-%02i %02i:%02i:%02i.%09i",
|
||||
(int)_rRecord.LogTime.Year, (int)_rRecord.LogTime.Month, (int)_rRecord.LogTime.Day,
|
||||
(int)_rRecord.LogTime.Hours, (int)_rRecord.LogTime.Minutes, (int)_rRecord.LogTime.Seconds, (int)_rRecord.LogTime.NanoSeconds );
|
||||
aLogEntry.appendAscii( buffer );
|
||||
aLogEntry.appendAscii( " " );
|
||||
aLogEntry.append( " " );
|
||||
|
||||
if ( !(_rRecord.SourceClassName.isEmpty() || _rRecord.SourceMethodName.isEmpty()) )
|
||||
{
|
||||
aLogEntry.append( _rRecord.SourceClassName );
|
||||
aLogEntry.appendAscii( "::" );
|
||||
aLogEntry.append( "::" );
|
||||
aLogEntry.append( _rRecord.SourceMethodName );
|
||||
aLogEntry.appendAscii( ": " );
|
||||
aLogEntry.append( ": " );
|
||||
}
|
||||
|
||||
aLogEntry.append( _rRecord.Message );
|
||||
aLogEntry.appendAscii( "\n" );
|
||||
aLogEntry.append( "\n" );
|
||||
|
||||
return aLogEntry.makeStringAndClear();
|
||||
}
|
||||
|
||||
@@ -58,9 +58,9 @@ namespace pcr
|
||||
OUString composeModelElementUIName( const OUString& _rModelName, const OUString& _rElementName )
|
||||
{
|
||||
OUStringBuffer aBuffer;
|
||||
aBuffer.appendAscii( "[" );
|
||||
aBuffer.append( "[" );
|
||||
aBuffer.append( _rModelName );
|
||||
aBuffer.appendAscii( "] " );
|
||||
aBuffer.append( "] " );
|
||||
aBuffer.append( _rElementName );
|
||||
return aBuffer.makeStringAndClear();
|
||||
}
|
||||
|
||||
@@ -146,9 +146,9 @@ namespace pcr
|
||||
,nId( _nId )
|
||||
{
|
||||
OUStringBuffer aQualifiedListenerClass;
|
||||
aQualifiedListenerClass.appendAscii( "com.sun.star." );
|
||||
aQualifiedListenerClass.append( "com.sun.star." );
|
||||
aQualifiedListenerClass.appendAscii( _pListenerNamespaceAscii );
|
||||
aQualifiedListenerClass.appendAscii( "." );
|
||||
aQualifiedListenerClass.append( "." );
|
||||
aQualifiedListenerClass.appendAscii( _pListenerClassAsciiName );
|
||||
sListenerClassName = aQualifiedListenerClass.makeStringAndClear();
|
||||
}
|
||||
@@ -264,9 +264,9 @@ namespace pcr
|
||||
OUString sMacroPath = aScriptEvent.ScriptCode.copy( nPrefixLen + 1 );
|
||||
|
||||
OUStringBuffer aNewStyleSpec;
|
||||
aNewStyleSpec.appendAscii( "vnd.sun.star.script:" );
|
||||
aNewStyleSpec.append( "vnd.sun.star.script:" );
|
||||
aNewStyleSpec.append ( sMacroPath );
|
||||
aNewStyleSpec.appendAscii( "?language=Basic&location=" );
|
||||
aNewStyleSpec.append( "?language=Basic&location=" );
|
||||
aNewStyleSpec.append ( sLocation );
|
||||
|
||||
aScriptEvent.ScriptCode = aNewStyleSpec.makeStringAndClear();
|
||||
@@ -658,14 +658,14 @@ namespace pcr
|
||||
|
||||
if ( !(sLocation.isEmpty() && sLanguage.isEmpty()) )
|
||||
{
|
||||
aComposeBuffer.appendAscii( " (" );
|
||||
aComposeBuffer.append( " (" );
|
||||
|
||||
// location
|
||||
OSL_ENSURE( !sLocation.isEmpty(), "EventHandler::convertToControlValue: unexpected: no location!" );
|
||||
if ( !sLocation.isEmpty() )
|
||||
{
|
||||
aComposeBuffer.append( sLocation );
|
||||
aComposeBuffer.appendAscii( ", " );
|
||||
aComposeBuffer.append( ", " );
|
||||
}
|
||||
|
||||
// language
|
||||
@@ -1142,7 +1142,7 @@ namespace pcr
|
||||
|
||||
OUStringBuffer aCompleteName;
|
||||
aCompleteName.append( _rScriptEvent.ListenerType );
|
||||
aCompleteName.appendAscii( "::" );
|
||||
aCompleteName.append( "::" );
|
||||
aCompleteName.append( _rScriptEvent.EventMethod );
|
||||
OUString sCompleteName( aCompleteName.makeStringAndClear() );
|
||||
|
||||
|
||||
@@ -766,7 +766,7 @@ namespace pcr
|
||||
{
|
||||
// font name
|
||||
displayName.append( aFont.Name );
|
||||
displayName.appendAscii( ", " );
|
||||
displayName.append( ", " );
|
||||
|
||||
// font style
|
||||
::FontWeight eWeight = VCLUnoHelper::ConvertFontWeight( aFont.Weight );
|
||||
@@ -788,7 +788,7 @@ namespace pcr
|
||||
// font size
|
||||
if ( aFont.Height )
|
||||
{
|
||||
displayName.appendAscii( ", " );
|
||||
displayName.append( ", " );
|
||||
displayName.append( sal_Int32( aFont.Height ) );
|
||||
}
|
||||
}
|
||||
@@ -2544,7 +2544,7 @@ namespace pcr
|
||||
if ( bAdd )
|
||||
{
|
||||
sTemp.append(_sName);
|
||||
sTemp.appendAscii("/");
|
||||
sTemp.append("/");
|
||||
}
|
||||
sTemp.append(*pQueryNames);
|
||||
Reference< XNameAccess > xSubQueries(_xQueryNames->getByName(*pQueryNames),UNO_QUERY);
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace pcr
|
||||
OUString aTmp( OStringToOUString(sHelpId, RTL_TEXTENCODING_UTF8) );
|
||||
INetURLObject aHID( aTmp );
|
||||
if ( aHID.GetProtocol() == INetProtocol::NotValid )
|
||||
aBuffer.appendAscii( INET_HID_SCHEME );
|
||||
aBuffer.append( INET_HID_SCHEME );
|
||||
aBuffer.append( aTmp.getStr() );
|
||||
return aBuffer.makeStringAndClear();
|
||||
}
|
||||
|
||||
@@ -137,13 +137,13 @@ checkForUpdates(
|
||||
return false; // something went wrong ..
|
||||
|
||||
OUStringBuffer aBuffer;
|
||||
aBuffer.appendAscii("/child::inst:description[inst:os=\'");
|
||||
aBuffer.append("/child::inst:description[inst:os=\'");
|
||||
aBuffer.append( rOS );
|
||||
aBuffer.appendAscii("\' and inst:arch=\'");
|
||||
aBuffer.append("\' and inst:arch=\'");
|
||||
aBuffer.append( rArch );
|
||||
aBuffer.appendAscii("\' and inst:gitid!=\'");
|
||||
aBuffer.append("\' and inst:gitid!=\'");
|
||||
aBuffer.append( rGitID );
|
||||
aBuffer.appendAscii("\']");
|
||||
aBuffer.append("\']");
|
||||
|
||||
OUString aXPathExpression = aBuffer.makeStringAndClear();
|
||||
|
||||
|
||||
@@ -333,7 +333,7 @@ void UpdateCheckUI::AddMenuBarIcon( SystemWindow *pSysWin, bool bAddEventHdl )
|
||||
if( !maBubbleText.isEmpty() )
|
||||
{
|
||||
if( !maBubbleTitle.isEmpty() )
|
||||
aBuf.appendAscii( "\n\n" );
|
||||
aBuf.append( "\n\n" );
|
||||
aBuf.append( maBubbleText );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user