Kaydet (Commit) 1d6cd014 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

loplugin:stringconstant: OUStringBuffer: appendAscii -> append

Change-Id: I957be579527123be25abca0b7dcb69295711abf8
üst 5f5ccfc0
......@@ -470,11 +470,11 @@ namespace comphelper
if ( !bValid )
{
OUStringBuffer aMessage;
aMessage.appendAscii( "Incompatible value type. Found '" );
aMessage.append( "Incompatible value type. Found '" );
aMessage.append( _value.getValueTypeName() );
aMessage.appendAscii( "', where '" );
aMessage.append( "', where '" );
aMessage.append( m_aData.m_aValueType.getTypeName() );
aMessage.appendAscii( "' (or compatible type) is expected." );
aMessage.append( "' (or compatible type) is expected." );
throw IllegalTypeException( aMessage.makeStringAndClear(), *const_cast< EnumerableMap* >( this ) );
}
......
......@@ -87,9 +87,9 @@ css::uno::Any ConfigurationHelper::readRelativeKey(const css::uno::Reference< cs
if (!xProps.is())
{
OUStringBuffer sMsg(256);
sMsg.appendAscii("The requested path \"");
sMsg.append("The requested path \"");
sMsg.append (sRelPath );
sMsg.appendAscii("\" does not exists." );
sMsg.append("\" does not exists." );
throw css::container::NoSuchElementException(
sMsg.makeStringAndClear());
......@@ -110,9 +110,9 @@ void ConfigurationHelper::writeRelativeKey(const css::uno::Reference< css::uno::
if (!xProps.is())
{
OUStringBuffer sMsg(256);
sMsg.appendAscii("The requested path \"");
sMsg.append("The requested path \"");
sMsg.append (sRelPath );
sMsg.appendAscii("\" does not exists." );
sMsg.append("\" does not exists." );
throw css::container::NoSuchElementException(
sMsg.makeStringAndClear());
......@@ -131,9 +131,9 @@ css::uno::Reference< css::uno::XInterface > ConfigurationHelper::makeSureSetNode
if (!xSet.is())
{
OUStringBuffer sMsg(256);
sMsg.appendAscii("The requested path \"");
sMsg.append("The requested path \"");
sMsg.append (sRelPathToSet );
sMsg.appendAscii("\" does not exists." );
sMsg.append("\" does not exists." );
throw css::container::NoSuchElementException(
sMsg.makeStringAndClear());
......
......@@ -233,7 +233,7 @@ namespace comphelper
try
{
OUStringBuffer aBuffer;
aBuffer.appendAscii( "string:" );
aBuffer.append( "string:" );
aBuffer.append( _nMessageResID );
OSL_VERIFY( _rxBundle->getDirectElement( aBuffer.makeStringAndClear() ) >>= sMessage );
}
......@@ -262,11 +262,11 @@ namespace comphelper
if ( sMessage.isEmpty() )
{
OUStringBuffer aBuffer;
aBuffer.appendAscii( "<invalid event resource: '" );
aBuffer.append( "<invalid event resource: '" );
aBuffer.append( m_pData->sBundleBaseName );
aBuffer.appendAscii( ":" );
aBuffer.append( ":" );
aBuffer.append( _nMessageResID );
aBuffer.appendAscii( "'>" );
aBuffer.append( "'>" );
sMessage = aBuffer.makeStringAndClear();
}
return sMessage;
......
......@@ -252,11 +252,11 @@ namespace comphelper
// argument exists, but is of wrong type
OUStringBuffer aBuffer;
aBuffer.appendAscii( "Invalid value type for '" );
aBuffer.append( "Invalid value type for '" );
aBuffer.append ( _rValueName );
aBuffer.appendAscii( "'.\nExpected: " );
aBuffer.append( "'.\nExpected: " );
aBuffer.append ( _rExpectedValueType.getTypeName() );
aBuffer.appendAscii( "\nFound: " );
aBuffer.append( "\nFound: " );
aBuffer.append ( pos->second.getValueType().getTypeName() );
throw IllegalArgumentException( aBuffer.makeStringAndClear(), NULL, 0 );
}
......
......@@ -97,7 +97,7 @@ namespace comphelper
OUString ResourceBundle_Impl::impl_getStringResourceKey( sal_Int32 _resourceId )
{
OUStringBuffer key;
key.appendAscii( "string:" );
key.append( "string:" );
key.append( _resourceId );
return key.makeStringAndClear();
}
......
......@@ -202,14 +202,14 @@ namespace
void lcl_throwIllegalPropertyValueTypeException( const PropertyDescription& _rProperty, const Any& _rValue )
{
OUStringBuffer aErrorMessage;
aErrorMessage.appendAscii( "The given value cannot be converted to the required property type." );
aErrorMessage.appendAscii( "\n(property name \"" );
aErrorMessage.append( "The given value cannot be converted to the required property type." );
aErrorMessage.append( "\n(property name \"" );
aErrorMessage.append( _rProperty.aProperty.Name );
aErrorMessage.appendAscii( "\", found value type \"" );
aErrorMessage.append( "\", found value type \"" );
aErrorMessage.append( _rValue.getValueType().getTypeName() );
aErrorMessage.appendAscii( "\", required property type \"" );
aErrorMessage.append( "\", required property type \"" );
aErrorMessage.append( _rProperty.aProperty.Type.getTypeName() );
aErrorMessage.appendAscii( "\")" );
aErrorMessage.append( "\")" );
throw IllegalArgumentException( aErrorMessage.makeStringAndClear(), NULL, 4 );
}
}
......
......@@ -38,9 +38,9 @@ namespace comphelper
// strings only would suffice, and could be realized with an UNO service, so we do not
// need the dependency to the Tools project)
OUStringBuffer sMessage;
sMessage.appendAscii( "The property \"" );
sMessage.append( "The property \"" );
sMessage.append( _rPropertyName );
sMessage.appendAscii( "\" is unknown." );
sMessage.append( "\" is unknown." );
return sMessage.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