loplugin:elidestringvar (clang-cl)

...plus ensuing loplugin:unnecessaryparen in vcl/source/treelist/transfer.cxx

Change-Id: I1abf2e0c589c2c124399c1337f5dd703ee7d04a9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100094
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
Stephan Bergmann
2020-08-04 14:47:29 +02:00
parent fc7464a882
commit ef0815d8e1
4 changed files with 8 additions and 22 deletions

View File

@@ -1004,10 +1004,8 @@ IDispatch* DocumentHolder::GetIDispatch()
{
if ( !m_pIDispatch && m_xDocument.is() )
{
const OUString aServiceName (
"com.sun.star.bridge.OleBridgeSupplier2" );
uno::Reference< bridge::XBridgeSupplier2 > xSupplier(
m_xFactory->createInstance( aServiceName ), uno::UNO_QUERY );
m_xFactory->createInstance( "com.sun.star.bridge.OleBridgeSupplier2" ), uno::UNO_QUERY );
if ( xSupplier.is() )
{

View File

@@ -2037,9 +2037,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP InterfaceOleWrapper::Invoke(DISPID dispidMembe
}
catch(...)
{
OUString message= "InterfaceOleWrapper::Invoke : \n"
"Unexpected exception";
writeExcepinfo(pexcepinfo, message);
writeExcepinfo(pexcepinfo, "InterfaceOleWrapper::Invoke : \nUnexpected exception");
ret = DISP_E_EXCEPTION;
}
@@ -2130,9 +2128,7 @@ HRESULT InterfaceOleWrapper::doInvoke( DISPPARAMS * pdispparams, VARIANT * pvarR
}
catch( ... )
{
OUString message= "InterfaceOleWrapper::doInvoke : \n"
"Unexpected exception";
writeExcepinfo(pexcepinfo, message);
writeExcepinfo(pexcepinfo, "InterfaceOleWrapper::doInvoke : \nUnexpected exception");
ret = DISP_E_EXCEPTION;
}
return ret;
@@ -2168,9 +2164,7 @@ HRESULT InterfaceOleWrapper::doGetProperty( DISPPARAMS * /*pdispparams*/, VARIAN
}
catch( ... )
{
OUString message= "InterfaceOleWrapper::doInvoke : \n"
"Unexpected exception";
writeExcepinfo(pexcepinfo, message);
writeExcepinfo(pexcepinfo, "InterfaceOleWrapper::doInvoke : \nUnexpected exception");
ret = DISP_E_EXCEPTION;
}
return ret;
@@ -2962,9 +2956,7 @@ HRESULT InterfaceOleWrapper::InvokeGeneral( DISPID dispidMember, unsigned short
}
catch( ... )
{
OUString message= "InterfaceOleWrapper::InvokeGeneral : \n"
"Unexpected exception";
writeExcepinfo(pexcepinfo, message);
writeExcepinfo(pexcepinfo, "InterfaceOleWrapper::InvokeGeneral : \nUnexpected exception");
ret = DISP_E_EXCEPTION;
}
return ret;
@@ -3431,9 +3423,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP UnoObjectWrapperRemoteOpt::Invoke ( DISPID di
}
catch(...)
{
OUString message= "UnoObjectWrapperRemoteOpt::Invoke : \n"
"Unexpected exception";
writeExcepinfo(pexcepinfo, message);
writeExcepinfo(pexcepinfo, "UnoObjectWrapperRemoteOpt::Invoke : \nUnexpected exception");
ret = DISP_E_EXCEPTION;
}

View File

@@ -1805,8 +1805,7 @@ namespace osl_FileStatus
#else // Windows version
void getAttributes_004()
{
OUString aUserHiddenFileURL ("file:///c:/AUTOEXEC.BAT");
nError = DirectoryItem::get(aUserHiddenFileURL, rItem_hidden);
nError = DirectoryItem::get("file:///c:/AUTOEXEC.BAT", rItem_hidden);
CPPUNIT_ASSERT_EQUAL_MESSAGE("get item fail", osl::FileBase::E_None, nError);
FileStatus rFileStatus(osl_FileStatus_Mask_Attributes);
nError = rItem_hidden.getFileStatus(rFileStatus);

View File

@@ -843,8 +843,7 @@ bool TransferableHelper::SetINetBookmark( const INetBookmark& rBmk,
case SotClipboardFormatId::FILECONTENT:
{
OUString aStr( "[InternetShortcut]\x0aURL=" );
maAny <<= ( aStr += rBmk.GetURL() );
maAny <<= "[InternetShortcut]\x0aURL=" + rBmk.GetURL();
}
break;
#endif