Kaydet (Commit) 38d0db29 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

loplugin:stringconstant: OUStringBuffer: appendAscii -> append

Change-Id: Ifb6cc6d604d1a2b87491f2e455e65c94a5431095
üst 1b70ed18
......@@ -949,9 +949,9 @@ static void lcl_setErrorBarSequence ( const uno::Reference< chart2::XChartDocume
aRoleBuffer.append( '-' );
if( bPositiveValue )
aRoleBuffer = aRoleBuffer.appendAscii( "positive" );
aRoleBuffer = aRoleBuffer.append( "positive" );
else
aRoleBuffer = aRoleBuffer.appendAscii( "negative" );
aRoleBuffer = aRoleBuffer.append( "negative" );
OUString aRole = aRoleBuffer.makeStringAndClear();
......
......@@ -113,66 +113,66 @@ void XMLErrors::AddRecord(
OUStringBuffer sMessage;
sMessage.appendAscii( "An error or a warning has occurred during XML import/export!\n" );
sMessage.append( "An error or a warning has occurred during XML import/export!\n" );
// ID & flags
sMessage.appendAscii( "Error-Id: 0x");
sMessage.append( "Error-Id: 0x");
sMessage.append( nId, 16 );
sMessage.appendAscii( "\n Flags: " );
sMessage.append( "\n Flags: " );
sal_Int32 nFlags = (nId & XMLERROR_MASK_FLAG);
sMessage.append( nFlags >> 28, 16 );
if( (nFlags & XMLERROR_FLAG_WARNING) != 0 )
sMessage.appendAscii( " WARNING" );
sMessage.append( " WARNING" );
if( (nFlags & XMLERROR_FLAG_ERROR) != 0 )
sMessage.appendAscii( " ERROR" );
sMessage.append( " ERROR" );
if( (nFlags & XMLERROR_FLAG_SEVERE) != 0 )
sMessage.appendAscii( " SEVERE" );
sMessage.appendAscii( "\n Class: " );
sMessage.append( " SEVERE" );
sMessage.append( "\n Class: " );
sal_Int32 nClass = (nId & XMLERROR_MASK_CLASS);
sMessage.append( nClass >> 16, 16 );
if( (nClass & XMLERROR_CLASS_IO) != 0 )
sMessage.appendAscii( " IO" );
sMessage.append( " IO" );
if( (nClass & XMLERROR_CLASS_FORMAT) != 0 )
sMessage.appendAscii( " FORMAT" );
sMessage.append( " FORMAT" );
if( (nClass & XMLERROR_CLASS_API) != 0 )
sMessage.appendAscii( " API" );
sMessage.append( " API" );
if( (nClass & XMLERROR_CLASS_OTHER) != 0 )
sMessage.appendAscii( " OTHER" );
sMessage.appendAscii( "\n Number: " );
sMessage.append( " OTHER" );
sMessage.append( "\n Number: " );
sal_Int32 nNumber = (nId & XMLERROR_MASK_NUMBER);
sMessage.append( nNumber, 16 );
sMessage.appendAscii( "\n");
sMessage.append( "\n");
// the parameters
sMessage.appendAscii( "Parameters:\n" );
sMessage.append( "Parameters:\n" );
sal_Int32 nLength = rParams.getLength();
const OUString* pParams = rParams.getConstArray();
for( sal_Int32 i = 0; i < nLength; i++ )
{
sMessage.appendAscii( " " );
sMessage.append( " " );
sMessage.append( i );
sMessage.appendAscii( ": " );
sMessage.append( ": " );
sMessage.append( pParams[i] );
sMessage.appendAscii( "\n" );
sMessage.append( "\n" );
}
// the exception message
sMessage.appendAscii( "Exception-Message: " );
sMessage.append( "Exception-Message: " );
sMessage.append( rExceptionMessage );
sMessage.appendAscii( "\n" );
sMessage.append( "\n" );
// position (if given)
if( (nRow != -1) || (nColumn != -1) )
{
sMessage.appendAscii( "Position:\n Public Identifier: " );
sMessage.append( "Position:\n Public Identifier: " );
sMessage.append( rPublicId );
sMessage.appendAscii( "\n System Identifier: " );
sMessage.append( "\n System Identifier: " );
sMessage.append( rSystemId );
sMessage.appendAscii( "\n Row, Column: " );
sMessage.append( "\n Row, Column: " );
sMessage.append( nRow );
sMessage.appendAscii( "," );
sMessage.append( "," );
sMessage.append( nColumn );
sMessage.appendAscii( "\n" );
sMessage.append( "\n" );
}
// convert to byte string and signal the error
......
......@@ -759,15 +759,15 @@ void SvXMLNumFmtExport::WriteMapElement_Impl( sal_Int32 nOp, double fLimit,
// style namespace
OUStringBuffer aCondStr(20);
aCondStr.appendAscii( "value()" ); //! define constant
aCondStr.append( "value()" ); //! define constant
switch ( nOp )
{
case NUMBERFORMAT_OP_EQ: aCondStr.append( '=' ); break;
case NUMBERFORMAT_OP_NE: aCondStr.appendAscii( "!=" ); break;
case NUMBERFORMAT_OP_NE: aCondStr.append( "!=" ); break;
case NUMBERFORMAT_OP_LT: aCondStr.append( '<' ); break;
case NUMBERFORMAT_OP_LE: aCondStr.appendAscii( "<=" ); break;
case NUMBERFORMAT_OP_LE: aCondStr.append( "<=" ); break;
case NUMBERFORMAT_OP_GT: aCondStr.append( '>' ); break;
case NUMBERFORMAT_OP_GE: aCondStr.appendAscii( ">=" ); break;
case NUMBERFORMAT_OP_GE: aCondStr.append( ">=" ); break;
default:
OSL_FAIL("unknown operator");
}
......
......@@ -1603,7 +1603,7 @@ sal_Int32 SvXMLNumFormatContext::CreateAndInsert(SvNumberFormatter* pFormatter)
{
// insert empty format as empty string (with quotes)
// #93901# this check has to be done before inserting the conditions
aFormatCode.appendAscii("\"\""); // ""
aFormatCode.append("\"\""); // ""
}
aFormatCode.insert( 0, aConditions.makeStringAndClear() );
......@@ -1964,7 +1964,7 @@ void SvXMLNumFormatContext::AddCurrency( const OUString& rContent, LanguageType
}
if (!bAutomatic)
aFormatCode.appendAscii( "[$" ); // intro for "new" currency symbols
aFormatCode.append( "[$" ); // intro for "new" currency symbols
aFormatCode.append( aSymbol );
......@@ -2179,7 +2179,7 @@ void SvXMLNumFormatContext::UpdateCalendar( const OUString& rNewCalendar )
sCalendar = rNewCalendar;
if ( !sCalendar.isEmpty() )
{
aFormatCode.appendAscii( "[~" ); // intro for calendar code
aFormatCode.append( "[~" ); // intro for calendar code
aFormatCode.append( sCalendar );
aFormatCode.append( ']' ); // end of "new" currency symbolcalendar code
}
......
......@@ -3513,7 +3513,7 @@ OUString XMLTextFieldExport::MakeFootnoteRefName(
{
// generate foot-/endnote ID
OUStringBuffer aBuf;
aBuf.appendAscii("ftn");
aBuf.append("ftn");
aBuf.append((sal_Int32)nSeqNo);
return aBuf.makeStringAndClear();
}
......@@ -3524,7 +3524,7 @@ OUString XMLTextFieldExport::MakeSequenceRefName(
{
// generate foot-/endnote ID
OUStringBuffer aBuf;
aBuf.appendAscii("ref");
aBuf.append("ref");
aBuf.append(rSeqName);
aBuf.append((sal_Int32)nSeqNo);
return aBuf.makeStringAndClear();
......
......@@ -170,7 +170,7 @@ void XMLTextParagraphExport::exportTextFootnoteHelper(
sal_Int32 nNumber = 0;
aAny >>= nNumber;
OUStringBuffer aBuf;
aBuf.appendAscii("ftn");
aBuf.append("ftn");
aBuf.append(nNumber);
GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_ID,
aBuf.makeStringAndClear());
......
......@@ -959,13 +959,13 @@ bool XMLVariableDeclImportContext::FindFieldMaster(
OUStringBuffer sBuffer;
sBuffer.appendAscii(sAPI_fieldmaster_prefix);
sBuffer.appendAscii(sAPI_set_expression);
sBuffer.appendAscii(".");
sBuffer.append(".");
sBuffer.append(sName);
OUString sVarServiceName = sBuffer.makeStringAndClear();
sBuffer.appendAscii(sAPI_fieldmaster_prefix);
sBuffer.appendAscii(sAPI_user);
sBuffer.appendAscii(".");
sBuffer.append(".");
sBuffer.append(sName);
OUString sUserServiceName = sBuffer.makeStringAndClear();
......@@ -995,7 +995,7 @@ bool XMLVariableDeclImportContext::FindFieldMaster(
nCollisionCount++;
OUStringBuffer aBuf;
aBuf.append(sName);
aBuf.appendAscii("_renamed_");
aBuf.append("_renamed_");
aBuf.append(nCollisionCount);
sNew = aBuf.makeStringAndClear();
......@@ -1020,7 +1020,7 @@ bool XMLVariableDeclImportContext::FindFieldMaster(
nCollisionCount++;
OUStringBuffer aBuf;
aBuf.append(sName);
aBuf.appendAscii("_renamed_");
aBuf.append("_renamed_");
aBuf.append(nCollisionCount);
sNew = aBuf.makeStringAndClear();
......
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