loplugin:stringadd (clang-cl)

Change-Id: Icf2894f77c90aa4620910d621249947bad4be8b7
Reviewed-on: https://gerrit.libreoffice.org/82269
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
Stephan Bergmann 2019-11-08 10:15:04 +01:00
parent 83579e8018
commit 05bec2bc26
5 changed files with 12 additions and 19 deletions

View File

@ -167,8 +167,7 @@ namespace connectivity
if (FAILED(pInterface->get_Item(OLEVariant(sStr), &pT)))
{
#if OSL_DEBUG_LEVEL > 0
OString sTemp("Unknown Item: ");
sTemp += OString(sStr.getStr(),sStr.getLength(),osl_getThreadTextEncoding());
OString sTemp("Unknown Item: " + OString(sStr.getStr(),sStr.getLength(),osl_getThreadTextEncoding()));
OSL_FAIL(sTemp.getStr());
#endif
}

View File

@ -1427,9 +1427,9 @@ uno::Any SAL_CALL IUnknownWrapper::directInvoke( const OUString& aName, const un
"DISP_E_BADVARTYPE.", nullptr);
break;
case DISP_E_EXCEPTION:
message = "[automation bridge]: ";
message += OUString(o3tl::toU(excepinfo.bstrDescription),
::SysStringLen(excepinfo.bstrDescription));
message = "[automation bridge]: "
+ OUString(o3tl::toU(excepinfo.bstrDescription),
::SysStringLen(excepinfo.bstrDescription));
throw InvocationTargetException(message, Reference<XInterface>(), Any());
break;
case DISP_E_MEMBERNOTFOUND:
@ -2049,8 +2049,8 @@ Any IUnknownWrapper::invokeWithDispIdComTlb(FuncDesc& aFuncDesc,
"DISP_E_BADVARTYPE.", nullptr);
break;
case DISP_E_EXCEPTION:
message = "[automation bridge]: ";
message += OUString(o3tl::toU(excepinfo.bstrDescription),
message = "[automation bridge]: "
+ OUString(o3tl::toU(excepinfo.bstrDescription),
::SysStringLen(excepinfo.bstrDescription));
throw InvocationTargetException(message, Reference<XInterface>(), Any());

View File

@ -825,8 +825,7 @@ OUString SvtURLBox::ParseSmart( const OUString& _aText, const OUString& _aBaseUR
if( aText.startsWith("\\") && (aText.getLength() < 2 || aText[ 1 ] != '\\') )
{
// cut to first segment
OUString aTmp = INetURLObject::GetScheme( eBaseProt );
aTmp += "/";
OUString aTmp = INetURLObject::GetScheme( eBaseProt ) + "/";
aTmp += aObj.getName( 0, true, INetURLObject::DecodeMechanism::WithCharset );
aObj.SetURL( aTmp );
@ -1889,8 +1888,7 @@ OUString URLBox::ParseSmart( const OUString& _aText, const OUString& _aBaseURL )
if( aText.startsWith("\\") && (aText.getLength() < 2 || aText[ 1 ] != '\\') )
{
// cut to first segment
OUString aTmp = INetURLObject::GetScheme( eBaseProt );
aTmp += "/";
OUString aTmp = INetURLObject::GetScheme( eBaseProt ) + "/";
aTmp += aObj.getName( 0, true, INetURLObject::DecodeMechanism::WithCharset );
aObj.SetURL( aTmp );

View File

@ -2660,8 +2660,7 @@ uno::Any GetDBunoURI(const INetURLObject &rURL, DBConnURIType& rType)
case DBConnURIType::MSJET:
#ifdef _WIN32
{
OUString sDBURL("sdbc:ado:access:PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=");
sDBURL += rURL.PathToFileName();
OUString sDBURL("sdbc:ado:access:PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" + rURL.PathToFileName());
aURLAny <<= sDBURL;
}
#endif
@ -2669,8 +2668,7 @@ uno::Any GetDBunoURI(const INetURLObject &rURL, DBConnURIType& rType)
case DBConnURIType::MSACE:
#ifdef _WIN32
{
OUString sDBURL("sdbc:ado:PROVIDER=Microsoft.ACE.OLEDB.12.0;DATA SOURCE=");
sDBURL += rURL.PathToFileName();
OUString sDBURL("sdbc:ado:PROVIDER=Microsoft.ACE.OLEDB.12.0;DATA SOURCE=" + rURL.PathToFileName());
aURLAny <<= sDBURL;
}
#endif

View File

@ -649,8 +649,7 @@ void WinOpenGLDeviceInfo::GetData()
sizeof(value),
nullptr))
{
OUString driverKey("System\\CurrentControlSet\\Control\\Class\\");
driverKey += o3tl::toU(value);
OUString driverKey(OUStringLiteral("System\\CurrentControlSet\\Control\\Class\\") + o3tl::toU(value));
result = RegOpenKeyExW(HKEY_LOCAL_MACHINE, o3tl::toW(driverKey.getStr()), 0, KEY_QUERY_VALUE, &key);
if (result == ERROR_SUCCESS)
{
@ -737,8 +736,7 @@ void WinOpenGLDeviceInfo::GetData()
sizeof(value),
nullptr))
{
OUString driverKey2("System\\CurrentControlSet\\Control\\Class\\");
driverKey2 += o3tl::toU(value);
OUString driverKey2(OUStringLiteral("System\\CurrentControlSet\\Control\\Class\\") + o3tl::toU(value));
result = RegOpenKeyExW(HKEY_LOCAL_MACHINE, o3tl::toW(driverKey2.getStr()), 0, KEY_QUERY_VALUE, &key);
if (result == ERROR_SUCCESS)
{