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() ) if ( !m_pIDispatch && m_xDocument.is() )
{ {
const OUString aServiceName (
"com.sun.star.bridge.OleBridgeSupplier2" );
uno::Reference< bridge::XBridgeSupplier2 > xSupplier( 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() ) if ( xSupplier.is() )
{ {

View File

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

View File

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

View File

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