loplugin:stringadd in b*
after my patch to merge the bufferadd loplugin into stringadd Change-Id: Ieb9b4f5154173738e26b429b55c7a3ea38733553 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149478 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -28,8 +28,7 @@ StringMap EditorWindowUIObject::get_state()
|
||||
OUStringBuffer aRes;
|
||||
for (i = 0, nParas = pEditEngine->GetParagraphCount(); i < nParas; ++i)
|
||||
{
|
||||
aRes.append(pEditEngine->GetText(i));
|
||||
aRes.append("\n");
|
||||
aRes.append(pEditEngine->GetText(i) + "\n");
|
||||
}
|
||||
|
||||
aMap["Text"] = aRes.makeStringAndClear();
|
||||
|
||||
@@ -704,9 +704,9 @@ namespace basegfx::utils
|
||||
aResult.append(' ');
|
||||
}
|
||||
|
||||
aResult.append(aPoint.getX());
|
||||
aResult.append(',');
|
||||
aResult.append(aPoint.getY());
|
||||
aResult.append(OUString::number(aPoint.getX())
|
||||
+ ","
|
||||
+ OUString::number(aPoint.getY()));
|
||||
}
|
||||
|
||||
return aResult.makeStringAndClear();
|
||||
|
||||
@@ -1540,9 +1540,9 @@ ErrCode BasicManager::ExecuteMacro( OUString const& i_fullyQualifiedName, std::u
|
||||
sal_Int32 nPos {0};
|
||||
for (;;)
|
||||
{
|
||||
aBuff.append( "\"" );
|
||||
aBuff.append( o3tl::getToken(sArgs2, 0, ',', nPos) );
|
||||
aBuff.append( "\"" );
|
||||
aBuff.append( OUString::Concat("\"")
|
||||
+ o3tl::getToken(sArgs2, 0, ',', nPos)
|
||||
+ "\"" );
|
||||
if (nPos<0)
|
||||
break;
|
||||
aBuff.append( "," );
|
||||
|
||||
@@ -1605,9 +1605,7 @@ static OUString getDbgObjectName(SbUnoObject& rUnoObj)
|
||||
{
|
||||
aRet.append( "\n" );
|
||||
}
|
||||
aRet.append( "\"" );
|
||||
aRet.append( aName );
|
||||
aRet.append( "\":" );
|
||||
aRet.append( "\"" + aName + "\":" );
|
||||
return aRet.makeStringAndClear();
|
||||
}
|
||||
|
||||
@@ -1739,16 +1737,16 @@ static OUString Impl_GetSupportedInterfaces(SbUnoObject& rUnoObj)
|
||||
auto x = o3tl::tryAccess<Reference<XInterface>>(aToInspectObj);
|
||||
if( !x )
|
||||
{
|
||||
aRet.append( ID_DBG_SUPPORTEDINTERFACES );
|
||||
aRet.append( " not available.\n(TypeClass is not TypeClass_INTERFACE)\n" );
|
||||
aRet.append( ID_DBG_SUPPORTEDINTERFACES
|
||||
+ " not available.\n(TypeClass is not TypeClass_INTERFACE)\n" );
|
||||
}
|
||||
else
|
||||
{
|
||||
Reference< XTypeProvider > xTypeProvider( *x, UNO_QUERY );
|
||||
|
||||
aRet.append( "Supported interfaces by object " );
|
||||
aRet.append(getDbgObjectName(rUnoObj));
|
||||
aRet.append( "\n" );
|
||||
aRet.append( "Supported interfaces by object "
|
||||
+ getDbgObjectName(rUnoObj)
|
||||
+ "\n" );
|
||||
if( xTypeProvider.is() )
|
||||
{
|
||||
// get the interfaces of the implementation
|
||||
@@ -1769,9 +1767,9 @@ static OUString Impl_GetSupportedInterfaces(SbUnoObject& rUnoObj)
|
||||
typelib_TypeDescription * pTD = nullptr;
|
||||
rType.getDescription( &pTD );
|
||||
|
||||
aRet.append( "*** ERROR: No IdlClass for type \"" );
|
||||
aRet.append( pTD->pTypeName );
|
||||
aRet.append( "\"\n*** Please check type library\n" );
|
||||
aRet.append( OUString::Concat("*** ERROR: No IdlClass for type \"")
|
||||
+ OUString::unacquired(&pTD->pTypeName)
|
||||
+ "\"\n*** Please check type library\n" );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1827,9 +1825,7 @@ static OUString Dbg_SbxDataType2String( SbxDataType eType )
|
||||
// Debugging help method to display the properties of a SbUnoObjects
|
||||
static OUString Impl_DumpProperties(SbUnoObject& rUnoObj)
|
||||
{
|
||||
OUStringBuffer aRet;
|
||||
aRet.append("Properties of object ");
|
||||
aRet.append(getDbgObjectName(rUnoObj));
|
||||
OUStringBuffer aRet("Properties of object " + getDbgObjectName(rUnoObj));
|
||||
|
||||
// analyse the Uno-Infos to recognise the arrays
|
||||
Reference< XIntrospectionAccess > xAccess = rUnoObj.getIntrospectionAccess();
|
||||
@@ -1887,8 +1883,7 @@ static OUString Impl_DumpProperties(SbUnoObject& rUnoObj)
|
||||
aPropStr.append( Dbg_SbxDataType2String( eType ) );
|
||||
if( bMaybeVoid )
|
||||
aPropStr.append( "/void" );
|
||||
aPropStr.append( " " );
|
||||
aPropStr.append( pVar->GetName() );
|
||||
aPropStr.append( " " + pVar->GetName() );
|
||||
|
||||
if( i == nPropCount - 1 )
|
||||
aPropStr.append( "\n" );
|
||||
@@ -1904,9 +1899,7 @@ static OUString Impl_DumpProperties(SbUnoObject& rUnoObj)
|
||||
// Debugging help method to display the methods of an SbUnoObjects
|
||||
static OUString Impl_DumpMethods(SbUnoObject& rUnoObj)
|
||||
{
|
||||
OUStringBuffer aRet;
|
||||
aRet.append("Methods of object ");
|
||||
aRet.append(getDbgObjectName(rUnoObj));
|
||||
OUStringBuffer aRet("Methods of object " + getDbgObjectName(rUnoObj));
|
||||
|
||||
// XIntrospectionAccess, so that the types of the parameter could be outputted
|
||||
Reference< XIntrospectionAccess > xAccess = rUnoObj.getIntrospectionAccess();
|
||||
@@ -1953,10 +1946,8 @@ static OUString Impl_DumpMethods(SbUnoObject& rUnoObj)
|
||||
eType = SbxDataType( SbxOBJECT | SbxARRAY );
|
||||
}
|
||||
// output the name and the type
|
||||
aRet.append( Dbg_SbxDataType2String( eType ) );
|
||||
aRet.append( " " );
|
||||
aRet.append ( pVar->GetName() );
|
||||
aRet.append( " ( " );
|
||||
aRet.append( Dbg_SbxDataType2String( eType )
|
||||
+ " " + pVar->GetName() + " ( " );
|
||||
|
||||
// the get-method mustn't have a parameter
|
||||
Sequence< Reference< XIdlClass > > aParamsSeq = rxMethod->getParameterTypes();
|
||||
@@ -4751,9 +4742,7 @@ Any SbUnoStructRefObject::getUnoAny()
|
||||
|
||||
OUString SbUnoStructRefObject::Impl_DumpProperties()
|
||||
{
|
||||
OUStringBuffer aRet;
|
||||
aRet.append("Properties of object ");
|
||||
aRet.append( getDbgObjectName() );
|
||||
OUStringBuffer aRet("Properties of object " + getDbgObjectName() );
|
||||
|
||||
sal_uInt32 nPropCount = pProps->Count();
|
||||
sal_uInt32 nPropsPerLine = 1 + nPropCount / 30;
|
||||
@@ -4786,10 +4775,8 @@ OUString SbUnoStructRefObject::Impl_DumpProperties()
|
||||
}
|
||||
}
|
||||
}
|
||||
aPropStr.append( Dbg_SbxDataType2String( eType ) );
|
||||
|
||||
aPropStr.append( " " );
|
||||
aPropStr.append( pVar->GetName() );
|
||||
aPropStr.append( Dbg_SbxDataType2String( eType )
|
||||
+ " " + pVar->GetName() );
|
||||
|
||||
if( i == nPropCount - 1 )
|
||||
{
|
||||
@@ -4910,9 +4897,7 @@ OUString SbUnoStructRefObject::getDbgObjectName() const
|
||||
{
|
||||
aRet.append( "\n" );
|
||||
}
|
||||
aRet.append( "\"" );
|
||||
aRet.append( aName );
|
||||
aRet.append( "\":" );
|
||||
aRet.append( "\"" + aName + "\":" );
|
||||
return aRet.makeStringAndClear();
|
||||
}
|
||||
|
||||
|
||||
@@ -114,8 +114,7 @@ ErrCode ImpScan( const OUString& rWSrc, double& nVal, SbxDataType& rType,
|
||||
short decsep = 0;
|
||||
short ndig = 0;
|
||||
short ncdig = 0; // number of digits after decimal point
|
||||
OUStringBuffer aSearchStr("0123456789DEde");
|
||||
aSearchStr.append(cNonIntntlDecSep);
|
||||
OUStringBuffer aSearchStr(OUString::Concat("0123456789DEde") + OUStringChar(cNonIntntlDecSep));
|
||||
if( cIntntlDecSep != cNonIntntlDecSep )
|
||||
aSearchStr.append(cIntntlDecSep);
|
||||
if( cIntntlDecSepAlt && cIntntlDecSepAlt != cNonIntntlDecSep )
|
||||
|
||||
@@ -166,8 +166,7 @@ JNI_interface_type_info::JNI_interface_type_info(
|
||||
&attribute_td->aBase.pMemberName );
|
||||
|
||||
// getter
|
||||
sig_buf.append( "()" );
|
||||
sig_buf.append( type_sig );
|
||||
sig_buf.append( "()" + type_sig );
|
||||
OString method_signature( sig_buf.makeStringAndClear() );
|
||||
OString method_name(
|
||||
OUStringToOString(
|
||||
@@ -182,11 +181,7 @@ JNI_interface_type_info::JNI_interface_type_info(
|
||||
if (! attribute_td->bReadOnly)
|
||||
{
|
||||
// setter
|
||||
sig_buf.ensureCapacity( 64 );
|
||||
sig_buf.append( '(' );
|
||||
sig_buf.append( type_sig );
|
||||
sig_buf.append( ")V" );
|
||||
method_signature = sig_buf.makeStringAndClear();
|
||||
method_signature = "(" + type_sig + ")V";
|
||||
method_name = OUStringToOString(
|
||||
rtl::Concat2View("set" + member_name),
|
||||
RTL_TEXTENCODING_JAVA_UTF8 );
|
||||
|
||||
@@ -775,8 +775,7 @@ void UNO_proxy_dispatch(
|
||||
typelib_InterfaceMemberTypeDescription const * >(
|
||||
member_td )->pMemberName ) );
|
||||
}
|
||||
buf.append( ": " );
|
||||
buf.append( err.m_message );
|
||||
buf.append( ": " + err.m_message );
|
||||
// binary identical struct
|
||||
css::uno::RuntimeException exc(
|
||||
buf.makeStringAndClear(),
|
||||
|
||||
Reference in New Issue
Block a user