summaryrefslogtreecommitdiff
path: root/sot
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-09-30 15:12:52 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-10-01 10:46:15 +0200
commit46c2a3688c9ee7f558f75cbe856c26c4b8849b7e (patch)
tree782b141db099812d21c01b0693db178d66b9c965 /sot
parent044a683e6c8f864d46fe8ebe3ef5c757cbea30a6 (diff)
loplugin:stringadd n sfx2..svl
Change-Id: Iaf1bbe37449d4e0cfa817909d56d4bffe1e5a184 Reviewed-on: https://gerrit.libreoffice.org/79893 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sot')
-rw-r--r--sot/source/sdstor/ucbstorage.cxx23
1 files changed, 6 insertions, 17 deletions
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index 96c593c1aea8..5edae19704cb 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -2011,8 +2011,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 += "/";
+ OUString aName = m_aURL + "/";
aName += pElement->m_aOriginalName;
pContent = new ::ucbhelper::Content( aName, Reference< css::ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() );
xDeleteContent.reset(pContent); // delete it later on exit scope
@@ -2538,9 +2537,7 @@ BaseStorageStream* UCBStorage::OpenStream( const OUString& rEleName, StreamMode
if( nMode & StreamMode::NOCREATE )
{
SetError( ( nMode & StreamMode::WRITE ) ? SVSTREAM_CANNOT_MAKE : SVSTREAM_FILE_NOT_FOUND );
- OUString aName( pImp->m_aURL );
- aName += "/";
- aName += rEleName;
+ OUString aName = pImp->m_aURL + "/" + rEleName;
UCBStorageStream* pStream = new UCBStorageStream( aName, nMode, bDirect, pImp->m_bRepairPackage, pImp->m_xProgressHandler );
pStream->SetError( GetError() );
pStream->pImp->m_aName = rEleName;
@@ -2593,9 +2590,7 @@ BaseStorageStream* UCBStorage::OpenStream( const OUString& rEleName, StreamMode
void UCBStorage_Impl::OpenStream( UCBStorageElement_Impl* pElement, StreamMode nMode, bool bDirect )
{
- OUString aName( m_aURL );
- aName += "/";
- aName += pElement->m_aOriginalName;
+ OUString aName = m_aURL + "/" +pElement->m_aOriginalName;
pElement->m_xStream = new UCBStorageStream_Impl( aName, nMode, nullptr, bDirect, m_bRepairPackage, m_xProgressHandler );
}
@@ -2633,9 +2628,7 @@ BaseStorage* UCBStorage::OpenStorage_Impl( const OUString& rEleName, StreamMode
if( nMode & StreamMode::NOCREATE )
{
SetError( ( nMode & StreamMode::WRITE ) ? SVSTREAM_CANNOT_MAKE : SVSTREAM_FILE_NOT_FOUND );
- OUString aName( pImp->m_aURL );
- aName += "/";
- aName += rEleName; // ???
+ OUString aName = pImp->m_aURL + "/" + rEleName; // ???
UCBStorage *pStorage = new UCBStorage( aName, nMode, bDirect, false, pImp->m_bRepairPackage, pImp->m_xProgressHandler );
pStorage->pImp->m_bIsRoot = false;
pStorage->pImp->m_bListCreated = true; // the storage is pretty new, nothing to read
@@ -2695,9 +2688,7 @@ BaseStorage* UCBStorage::OpenStorage_Impl( const OUString& rEleName, StreamMode
bool bIsWritable = bool( pElement->m_xStorage->m_nMode & StreamMode::WRITE );
if ( !bIsWritable && ( nMode & StreamMode::WRITE ) )
{
- OUString aName( pImp->m_aURL );
- aName += "/";
- aName += pElement->m_aOriginalName;
+ OUString aName = pImp->m_aURL + "/" + pElement->m_aOriginalName;
UCBStorage* pStorage = new UCBStorage( aName, nMode, bDirect, false, pImp->m_bRepairPackage, pImp->m_xProgressHandler );
pElement->m_xStorage = pStorage->pImp;
return pStorage;
@@ -2744,9 +2735,7 @@ BaseStorage* UCBStorage::OpenStorage_Impl( const OUString& rEleName, StreamMode
UCBStorage_Impl* UCBStorage_Impl::OpenStorage( UCBStorageElement_Impl* pElement, StreamMode nMode, bool bDirect )
{
UCBStorage_Impl* pRet = nullptr;
- OUString aName( m_aURL );
- aName += "/";
- aName += pElement->m_aOriginalName; // ???
+ OUString aName = m_aURL + "/" + pElement->m_aOriginalName; // ???
pElement->m_bIsStorage = pElement->m_bIsFolder = true;