diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-04-14 16:40:35 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-04-15 08:37:34 +0200 |
commit | 897493fbd34a1bd10320767b48cbf04d422f89b3 (patch) | |
tree | 6d35dd000343e533cf6b3eef2f816533bea4b048 /ucb | |
parent | 7facde27194b866e589eada3f5657b0b5c69efb0 (diff) |
loplugin:sequentialassign in ucb..vbahelper
Change-Id: I0fff9ee06225d4ff2e9c0611b1b11f1d3b896be2
Reviewed-on: https://gerrit.libreoffice.org/70733
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/cacher/cachedcontentresultset.cxx | 3 | ||||
-rw-r--r-- | ucb/source/cacher/cachedcontentresultsetstub.cxx | 3 | ||||
-rw-r--r-- | ucb/source/cacher/cacheddynamicresultset.cxx | 3 | ||||
-rw-r--r-- | ucb/source/cacher/cacheddynamicresultsetstub.cxx | 3 | ||||
-rw-r--r-- | ucb/source/sorter/sortdynres.cxx | 3 | ||||
-rw-r--r-- | ucb/source/ucp/gio/gio_content.cxx | 3 | ||||
-rw-r--r-- | ucb/source/ucp/hierarchy/hierarchycontent.cxx | 3 | ||||
-rw-r--r-- | ucb/source/ucp/package/pkgcontent.cxx | 4 | ||||
-rw-r--r-- | ucb/source/ucp/tdoc/tdoc_content.cxx | 3 | ||||
-rw-r--r-- | ucb/source/ucp/webdav-neon/DAVTypes.cxx | 12 | ||||
-rw-r--r-- | ucb/source/ucp/webdav-neon/PropfindCache.cxx | 6 | ||||
-rw-r--r-- | ucb/source/ucp/webdav-neon/webdavcontent.cxx | 3 |
12 files changed, 16 insertions, 33 deletions
diff --git a/ucb/source/cacher/cachedcontentresultset.cxx b/ucb/source/cacher/cachedcontentresultset.cxx index c9592879397f..0765e2baed3b 100644 --- a/ucb/source/cacher/cachedcontentresultset.cxx +++ b/ucb/source/cacher/cachedcontentresultset.cxx @@ -2136,8 +2136,7 @@ Reference< XResultSet > SAL_CALL CachedContentResultSetFactory const Reference< XResultSet > & xSource, const Reference< XContentIdentifierMapping > & xMapping ) { - Reference< XResultSet > xRet; - xRet = new CachedContentResultSet( m_xContext, xSource, xMapping ); + Reference< XResultSet > xRet = new CachedContentResultSet( m_xContext, xSource, xMapping ); return xRet; } diff --git a/ucb/source/cacher/cachedcontentresultsetstub.cxx b/ucb/source/cacher/cachedcontentresultsetstub.cxx index a648beac5e76..c410c19dfa68 100644 --- a/ucb/source/cacher/cachedcontentresultsetstub.cxx +++ b/ucb/source/cacher/cachedcontentresultsetstub.cxx @@ -572,8 +572,7 @@ Reference< XResultSet > SAL_CALL CachedContentResultSetStubFactory { if( xSource.is() ) { - Reference< XResultSet > xRet; - xRet = new CachedContentResultSetStub( xSource ); + Reference< XResultSet > xRet = new CachedContentResultSetStub( xSource ); return xRet; } return nullptr; diff --git a/ucb/source/cacher/cacheddynamicresultset.cxx b/ucb/source/cacher/cacheddynamicresultset.cxx index 9f7f5e438b70..ba1f72616071 100644 --- a/ucb/source/cacher/cacheddynamicresultset.cxx +++ b/ucb/source/cacher/cacheddynamicresultset.cxx @@ -227,8 +227,7 @@ Reference< XDynamicResultSet > SAL_CALL CachedDynamicResultSetFactory const Reference< XDynamicResultSet > & SourceStub , const Reference< XContentIdentifierMapping > & ContentIdentifierMapping ) { - Reference< XDynamicResultSet > xRet; - xRet = new CachedDynamicResultSet( SourceStub, ContentIdentifierMapping, m_xContext ); + Reference< XDynamicResultSet > xRet = new CachedDynamicResultSet( SourceStub, ContentIdentifierMapping, m_xContext ); return xRet; } diff --git a/ucb/source/cacher/cacheddynamicresultsetstub.cxx b/ucb/source/cacher/cacheddynamicresultsetstub.cxx index 679ddbc0823a..927a6ac4e08c 100644 --- a/ucb/source/cacher/cacheddynamicresultsetstub.cxx +++ b/ucb/source/cacher/cacheddynamicresultsetstub.cxx @@ -218,8 +218,7 @@ Reference< XDynamicResultSet > SAL_CALL CachedDynamicResultSetStubFactory ::createCachedDynamicResultSetStub( const Reference< XDynamicResultSet > & Source ) { - Reference< XDynamicResultSet > xRet; - xRet = new CachedDynamicResultSetStub( Source, m_xContext ); + Reference< XDynamicResultSet > xRet = new CachedDynamicResultSetStub( Source, m_xContext ); return xRet; } diff --git a/ucb/source/sorter/sortdynres.cxx b/ucb/source/sorter/sortdynres.cxx index e5b34599ea0d..06cd751eaf24 100644 --- a/ucb/source/sorter/sortdynres.cxx +++ b/ucb/source/sorter/sortdynres.cxx @@ -473,8 +473,7 @@ SortedDynamicResultSetFactory::createSortedDynamicResultSet( const Sequence< NumberedSortingInfo > & Info, const Reference< XAnyCompareFactory > & CompareFactory ) { - Reference< XDynamicResultSet > xRet; - xRet = new SortedDynamicResultSet( Source, Info, CompareFactory, m_xContext ); + Reference< XDynamicResultSet > xRet = new SortedDynamicResultSet( Source, Info, CompareFactory, m_xContext ); return xRet; } diff --git a/ucb/source/ucp/gio/gio_content.cxx b/ucb/source/ucp/gio/gio_content.cxx index 7f363f5e2921..b1b51551ef15 100644 --- a/ucb/source/ucp/gio/gio_content.cxx +++ b/ucb/source/ucp/gio/gio_content.cxx @@ -584,8 +584,7 @@ void Content::queryChildren( ContentRefList& rChildren ) // Is aURL a prefix of aChildURL? if ( ( aChildURL.getLength() > nLen ) && aChildURL.startsWith( aURL ) ) { - sal_Int32 nPos = nLen; - nPos = aChildURL.indexOf( '/', nPos ); + sal_Int32 nPos = aChildURL.indexOf( '/', nLen ); if ( ( nPos == -1 ) || ( nPos == ( aChildURL.getLength() - 1 ) ) ) { diff --git a/ucb/source/ucp/hierarchy/hierarchycontent.cxx b/ucb/source/ucp/hierarchy/hierarchycontent.cxx index ec47a14f1f1c..056527010065 100644 --- a/ucb/source/ucp/hierarchy/hierarchycontent.cxx +++ b/ucb/source/ucp/hierarchy/hierarchycontent.cxx @@ -751,8 +751,7 @@ void HierarchyContent::queryChildren( HierarchyContentRefVector& rChildren ) if ( ( aChildURL.getLength() > nLen ) && ( aChildURL.startsWith( aURL ) ) ) { - sal_Int32 nPos = nLen; - nPos = aChildURL.indexOf( '/', nPos ); + sal_Int32 nPos = aChildURL.indexOf( '/', nLen ); if ( ( nPos == -1 ) || ( nPos == ( aChildURL.getLength() - 1 ) ) ) diff --git a/ucb/source/ucp/package/pkgcontent.cxx b/ucb/source/ucp/package/pkgcontent.cxx index e428044625e8..2facec6e88a9 100644 --- a/ucb/source/ucp/package/pkgcontent.cxx +++ b/ucb/source/ucp/package/pkgcontent.cxx @@ -214,9 +214,7 @@ Content* Content::create( getContentType( aURI.getScheme(), false ) ) ) return nullptr; - uno::Reference< container::XHierarchicalNameAccess > xPackage; - - xPackage = pProvider->createPackage( aURI ); + uno::Reference< container::XHierarchicalNameAccess > xPackage = pProvider->createPackage( aURI ); uno::Reference< ucb::XContentIdentifier > xId = new ::ucbhelper::ContentIdentifier( aURI.getUri() ); diff --git a/ucb/source/ucp/tdoc/tdoc_content.cxx b/ucb/source/ucp/tdoc/tdoc_content.cxx index 688662e30a95..e74039e9a0d8 100644 --- a/ucb/source/ucp/tdoc/tdoc_content.cxx +++ b/ucb/source/ucp/tdoc/tdoc_content.cxx @@ -738,8 +738,7 @@ void Content::queryChildren( ContentRefList& rChildren ) if ( ( aChildURL.getLength() > nLen ) && ( aChildURL.startsWith( aURL ) ) ) { - sal_Int32 nPos = nLen; - nPos = aChildURL.indexOf( '/', nPos ); + sal_Int32 nPos = aChildURL.indexOf( '/', nLen ); if ( ( nPos == -1 ) || ( nPos == ( aChildURL.getLength() - 1 ) ) ) diff --git a/ucb/source/ucp/webdav-neon/DAVTypes.cxx b/ucb/source/ucp/webdav-neon/DAVTypes.cxx index 2cd4ec27ef11..6cf4a01b304a 100644 --- a/ucb/source/ucp/webdav-neon/DAVTypes.cxx +++ b/ucb/source/ucp/webdav-neon/DAVTypes.cxx @@ -107,8 +107,7 @@ bool DAVOptionsCache::getDAVOptions( const OUString & rURL, DAVOptions & rDAVOpt normalizeURLLastChar( aEncodedUrl ); // search the URL in the static map - DAVOptionsMap::iterator it; - it = m_aTheCache.find( aEncodedUrl ); + DAVOptionsMap::iterator it = m_aTheCache.find( aEncodedUrl ); if ( it == m_aTheCache.end() ) return false; else @@ -134,8 +133,7 @@ void DAVOptionsCache::removeDAVOptions( const OUString & rURL ) OUString aEncodedUrl( ucb_impl::urihelper::encodeURI( NeonUri::unescape( rURL ) ) ); normalizeURLLastChar( aEncodedUrl ); - DAVOptionsMap::iterator it; - it = m_aTheCache.find( aEncodedUrl ); + DAVOptionsMap::iterator it = m_aTheCache.find( aEncodedUrl ); if ( it != m_aTheCache.end() ) { m_aTheCache.erase( it ); @@ -156,8 +154,7 @@ void DAVOptionsCache::addDAVOptions( DAVOptions & rDAVOptions, const sal_uInt32 rDAVOptions.setRedirectedURL( aRedirURL ); // check if already cached - DAVOptionsMap::iterator it; - it = m_aTheCache.find( aEncodedUrl ); + DAVOptionsMap::iterator it = m_aTheCache.find( aEncodedUrl ); if ( it != m_aTheCache.end() ) { // already in cache, check LifeTime if ( (*it).second.getRequestedTimeLife() == nLifeTime ) @@ -177,8 +174,7 @@ void DAVOptionsCache::setHeadAllowed( const OUString & rURL, const bool HeadAllo OUString aEncodedUrl( ucb_impl::urihelper::encodeURI( NeonUri::unescape( rURL ) ) ); normalizeURLLastChar( aEncodedUrl ); - DAVOptionsMap::iterator it; - it = m_aTheCache.find( aEncodedUrl ); + DAVOptionsMap::iterator it = m_aTheCache.find( aEncodedUrl ); if ( it != m_aTheCache.end() ) { // first check for stale diff --git a/ucb/source/ucp/webdav-neon/PropfindCache.cxx b/ucb/source/ucp/webdav-neon/PropfindCache.cxx index 546c6c8545f7..a54003661ec0 100644 --- a/ucb/source/ucp/webdav-neon/PropfindCache.cxx +++ b/ucb/source/ucp/webdav-neon/PropfindCache.cxx @@ -43,8 +43,7 @@ namespace webdav_ucp { // search the URL in the static map osl::MutexGuard aGuard( m_aMutex ); - PropNameCache::const_iterator it; - it = m_aTheCache.find( rURL ); + PropNameCache::const_iterator it = m_aTheCache.find( rURL ); if ( it == m_aTheCache.end() ) return false; else @@ -67,8 +66,7 @@ namespace webdav_ucp void PropertyNamesCache::removeCachedPropertyNames( const OUString& rURL ) { osl::MutexGuard aGuard( m_aMutex ); - PropNameCache::const_iterator it; - it = m_aTheCache.find( rURL ); + PropNameCache::const_iterator it = m_aTheCache.find( rURL ); if ( it != m_aTheCache.end() ) { m_aTheCache.erase( it ); diff --git a/ucb/source/ucp/webdav-neon/webdavcontent.cxx b/ucb/source/ucp/webdav-neon/webdavcontent.cxx index 8ef0956b2eff..9c139fb4a30d 100644 --- a/ucb/source/ucp/webdav-neon/webdavcontent.cxx +++ b/ucb/source/ucp/webdav-neon/webdavcontent.cxx @@ -2403,8 +2403,7 @@ void Content::queryChildren( ContentRefList& rChildren ) if ( ( aChildURL.getLength() > nLen ) && ( aChildURL.startsWith( aURL ) ) ) { - sal_Int32 nPos = nLen; - nPos = aChildURL.indexOf( '/', nPos ); + sal_Int32 nPos = aChildURL.indexOf( '/', nLen ); if ( ( nPos == -1 ) || ( nPos == ( aChildURL.getLength() - 1 ) ) ) |