embedserv/source/embed/docholder.cxx | 4 +--- extensions/source/ole/unoobjw.cxx | 20 +++++--------------- sal/qa/osl/file/osl_File.cxx | 3 +-- vcl/source/treelist/transfer.cxx | 3 +-- 4 files changed, 8 insertions(+), 22 deletions(-)
New commits: commit ef0815d8e19e18cc10d7078d47a04c8848668738 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Tue Aug 4 14:47:29 2020 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Tue Aug 4 21:38:25 2020 +0200 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 <sberg...@redhat.com> diff --git a/embedserv/source/embed/docholder.cxx b/embedserv/source/embed/docholder.cxx index a4b5462199d9..cb6f19b68e7e 100644 --- a/embedserv/source/embed/docholder.cxx +++ b/embedserv/source/embed/docholder.cxx @@ -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() ) { diff --git a/extensions/source/ole/unoobjw.cxx b/extensions/source/ole/unoobjw.cxx index e878fddbb682..65382fa542bc 100644 --- a/extensions/source/ole/unoobjw.cxx +++ b/extensions/source/ole/unoobjw.cxx @@ -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; } diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx index dbe461ae3f53..9bf73c421d45 100644 --- a/sal/qa/osl/file/osl_File.cxx +++ b/sal/qa/osl/file/osl_File.cxx @@ -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); diff --git a/vcl/source/treelist/transfer.cxx b/vcl/source/treelist/transfer.cxx index eefc22e8ba6c..dca44726b609 100644 --- a/vcl/source/treelist/transfer.cxx +++ b/vcl/source/treelist/transfer.cxx @@ -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 _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits