From ab285c743afa1c8769581871d7b56374fd8c49f1 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sat, 2 Nov 2019 18:59:49 +0200 Subject: loplugin:stringadd tweak the plugin to be more permissive, then validate by hand afterwards Change-Id: I40c5c911fe6ff7e45baaca372abf7dac211d9654 Reviewed-on: https://gerrit.libreoffice.org/81942 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sot/source/sdstor/ucbstorage.cxx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'sot') diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx index 7ca803627124..22ef098bbbf4 100644 --- a/sot/source/sdstor/ucbstorage.cxx +++ b/sot/source/sdstor/ucbstorage.cxx @@ -1846,8 +1846,7 @@ void UCBStorage_Impl::SetProps( const Sequence < Sequence < PropertyValue > >& r pElement->m_xStorage->SetProps( rSequence, aPath ); else { - OUString aElementPath( aPath ); - aElementPath += pElement->m_aName; + OUString aElementPath = aPath + pElement->m_aName; pElement->SetContentType( Find_Impl( rSequence, aElementPath ) ); } } @@ -1899,8 +1898,7 @@ void UCBStorage_Impl::GetProps( sal_Int32& nProps, Sequence < Sequence < Propert else { // properties of streams - OUString aElementPath( aPath ); - aElementPath += pElement->m_aName; + OUString aElementPath = aPath + pElement->m_aName; aProps[0].Name = "MediaType"; aProps[0].Value <<= pElement->GetContentType(); aProps[1].Name = "FullPath"; @@ -1996,8 +1994,7 @@ sal_Int16 UCBStorage_Impl::Commit() if ( !pContent && pElement->IsModified() ) { // if the element has never been opened, no content has been created until now - OUString aName = m_aURL + "/"; - aName += pElement->m_aOriginalName; + OUString aName = m_aURL + "/" + pElement->m_aOriginalName; pContent = new ::ucbhelper::Content( aName, Reference< css::ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() ); xDeleteContent.reset(pContent); // delete it later on exit scope } -- cgit