diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-12-06 15:19:12 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-12-07 07:06:12 +0100 |
commit | 3efde47ec9ee091479c04129696f99dc934c3f64 (patch) | |
tree | b9643dedf8d843c4cb43255db103e7a95ee90ebd /ucb | |
parent | dbc5519e9d4b36a6c48b14d83c8d813d5156433f (diff) |
loplugin:unusedfields
Change-Id: Id39c3f484a364fb5163444febe99aee79daf1a76
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126418
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/ucp/webdav-curl/CurlSession.cxx | 6 | ||||
-rw-r--r-- | ucb/source/ucp/webdav-curl/DAVRequestEnvironment.hxx | 16 | ||||
-rw-r--r-- | ucb/source/ucp/webdav-curl/DAVResourceAccess.cxx | 57 |
3 files changed, 26 insertions, 53 deletions
diff --git a/ucb/source/ucp/webdav-curl/CurlSession.cxx b/ucb/source/ucp/webdav-curl/CurlSession.cxx index 59f372fa809b..09fddeb95203 100644 --- a/ucb/source/ucp/webdav-curl/CurlSession.cxx +++ b/ucb/source/ucp/webdav-curl/CurlSession.cxx @@ -92,11 +92,9 @@ struct DownloadTarget struct UploadSource { uno::Sequence<sal_Int8> const& rInData; - ResponseHeaders const& rHeaders; size_t nPosition; - UploadSource(uno::Sequence<sal_Int8> const& i_rInData, ResponseHeaders const& i_rHeaders) + UploadSource(uno::Sequence<sal_Int8> const& i_rInData) : rInData(i_rInData) - , rHeaders(i_rHeaders) , nPosition(0) { } @@ -843,7 +841,7 @@ auto CurlProcessor::ProcessRequestImpl( ::std::optional<UploadSource> oUploadSource; if (pInData) { - oUploadSource.emplace(*pInData, rHeaders); + oUploadSource.emplace(*pInData); rc = curl_easy_setopt(rSession.m_pCurl.get(), CURLOPT_READDATA, &*oUploadSource); assert(rc == CURLE_OK); // libcurl won't upload without setting this diff --git a/ucb/source/ucp/webdav-curl/DAVRequestEnvironment.hxx b/ucb/source/ucp/webdav-curl/DAVRequestEnvironment.hxx index a489b43092c8..ed08c613e7e8 100644 --- a/ucb/source/ucp/webdav-curl/DAVRequestEnvironment.hxx +++ b/ucb/source/ucp/webdav-curl/DAVRequestEnvironment.hxx @@ -32,19 +32,13 @@ namespace http_dav_ucp struct DAVRequestEnvironment { - OUString m_aRequestURI; rtl::Reference< DAVAuthListener > m_xAuthListener; DAVRequestHeaders m_aRequestHeaders; - css::uno::Reference< css::ucb::XCommandEnvironment > m_xEnv; - -DAVRequestEnvironment( const OUString & rRequestURI, - const rtl::Reference< DAVAuthListener > & xListener, - const DAVRequestHeaders & rRequestHeaders, - const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv) - : m_aRequestURI( rRequestURI ), - m_xAuthListener( xListener ), - m_aRequestHeaders( rRequestHeaders ), - m_xEnv( xEnv ){} + +DAVRequestEnvironment( const rtl::Reference< DAVAuthListener > & xListener, + const DAVRequestHeaders & rRequestHeaders) + : m_xAuthListener( xListener ), + m_aRequestHeaders( rRequestHeaders ) {} DAVRequestEnvironment() {} }; diff --git a/ucb/source/ucp/webdav-curl/DAVResourceAccess.cxx b/ucb/source/ucp/webdav-curl/DAVResourceAccess.cxx index 248d65b8c60c..1c3e9a5320e0 100644 --- a/ucb/source/ucp/webdav-curl/DAVResourceAccess.cxx +++ b/ucb/source/ucp/webdav-curl/DAVResourceAccess.cxx @@ -185,9 +185,8 @@ void DAVResourceAccess::OPTIONS( m_xSession->OPTIONS( getRequestURI(), rOptions, DAVRequestEnvironment( - getRequestURI(), new DAVAuthListener_Impl( xEnv, m_aURL ), - aHeaders, xEnv ) ); + aHeaders ) ); } catch (DAVException const& e) { @@ -227,9 +226,8 @@ void DAVResourceAccess::PROPFIND( rPropertyNames, rResources, DAVRequestEnvironment( - getRequestURI(), new DAVAuthListener_Impl( xEnv, m_aURL ), - aHeaders, xEnv ) ); + aHeaders ) ); } catch (DAVException const& e) { @@ -267,9 +265,8 @@ void DAVResourceAccess::PROPFIND( nDepth, rResInfo, DAVRequestEnvironment( - getRequestURI(), new DAVAuthListener_Impl( xEnv, m_aURL ), - aHeaders, xEnv ) ) ; + aHeaders ) ) ; } catch (DAVException const& e) { @@ -305,9 +302,8 @@ void DAVResourceAccess::PROPPATCH( m_xSession->PROPPATCH( getRequestURI(), rValues, DAVRequestEnvironment( - getRequestURI(), new DAVAuthListener_Impl( xEnv, m_aURL ), - aHeaders, xEnv ) ); + aHeaders ) ); } catch (DAVException const& e) { @@ -345,9 +341,8 @@ void DAVResourceAccess::HEAD( rHeaderNames, rResource, DAVRequestEnvironment( - getRequestURI(), new DAVAuthListener_Impl( xEnv, m_aURL ), - aHeaders, xEnv ) ); + aHeaders ) ); } catch (DAVException const& e) { @@ -382,10 +377,9 @@ uno::Reference< io::XInputStream > DAVResourceAccess::GET( xStream = m_xSession->GET( getRequestURI(), DAVRequestEnvironment( - getRequestURI(), new DAVAuthListener_Impl( xEnv, m_aURL ), - aHeaders, xEnv ) ); + aHeaders ) ); } catch (DAVException const& e) { @@ -423,9 +417,8 @@ void DAVResourceAccess::GET( m_xSession->GET( getRequestURI(), rStream, DAVRequestEnvironment( - getRequestURI(), new DAVAuthListener_Impl( xEnv, m_aURL ), - aHeaders, xEnv ) ); + aHeaders ) ); } catch (DAVException const& e) { @@ -464,10 +457,9 @@ uno::Reference< io::XInputStream > DAVResourceAccess::GET( rHeaderNames, rResource, DAVRequestEnvironment( - getRequestURI(), new DAVAuthListener_Impl( xEnv, m_aURL ), - aHeaders, xEnv ) ); + aHeaders ) ); } catch (DAVException const& e) { @@ -509,10 +501,9 @@ void DAVResourceAccess::GET0( rHeaderNames, rResource, DAVRequestEnvironment( - getRequestURI(), new DAVAuthListener_Impl( xEnv, m_aURL ), - rRequestHeaders, xEnv ) ); + rRequestHeaders ) ); } catch (DAVException const& e) { @@ -552,9 +543,8 @@ void DAVResourceAccess::GET( rHeaderNames, rResource, DAVRequestEnvironment( - getRequestURI(), new DAVAuthListener_Impl( xEnv, m_aURL ), - aHeaders, xEnv ) ); + aHeaders ) ); } catch (DAVException const& e) { @@ -641,9 +631,8 @@ void DAVResourceAccess::PUT( m_xSession->PUT( getRequestURI(), xSeekableStream, DAVRequestEnvironment( - getRequestURI(), new DAVAuthListener_Impl( xEnv, m_aURL ), - aHeaders, xEnv ) ); + aHeaders ) ); } catch (DAVException const& e) { @@ -694,10 +683,9 @@ uno::Reference< io::XInputStream > DAVResourceAccess::POST( rReferer, xSeekableStream, DAVRequestEnvironment( - getRequestURI(), new DAVAuthListener_Impl( xEnv, m_aURL ), - aHeaders, xEnv ) ); + aHeaders ) ); } catch (DAVException const& e) { @@ -757,9 +745,8 @@ void DAVResourceAccess::POST( xSeekableStream, rOutputStream, DAVRequestEnvironment( - getRequestURI(), new DAVAuthListener_Impl( xEnv, m_aURL ), - aHeaders, xEnv ) ); + aHeaders ) ); } catch (DAVException const& e) { @@ -800,9 +787,8 @@ void DAVResourceAccess::MKCOL( m_xSession->MKCOL( getRequestURI(), DAVRequestEnvironment( - getRequestURI(), new DAVAuthListener_Impl( xEnv, m_aURL ), - aHeaders, xEnv ) ); + aHeaders ) ); } catch (DAVException const& e) { @@ -840,9 +826,8 @@ void DAVResourceAccess::COPY( m_xSession->COPY( rSourcePath, rDestinationURI, DAVRequestEnvironment( - getRequestURI(), new DAVAuthListener_Impl( xEnv, m_aURL ), - aHeaders, xEnv ), + aHeaders ), bOverwrite ); } catch (DAVException const& e) @@ -881,9 +866,8 @@ void DAVResourceAccess::MOVE( m_xSession->MOVE( rSourcePath, rDestinationURI, DAVRequestEnvironment( - getRequestURI(), new DAVAuthListener_Impl( xEnv, m_aURL ), - aHeaders, xEnv ), + aHeaders ), bOverwrite ); } catch (DAVException const& e) @@ -918,9 +902,8 @@ void DAVResourceAccess::DESTROY( m_xSession->DESTROY( getRequestURI(), DAVRequestEnvironment( - getRequestURI(), new DAVAuthListener_Impl( xEnv, m_aURL ), - aHeaders, xEnv ) ); + aHeaders ) ); } catch (DAVException const& e) { @@ -957,9 +940,8 @@ void DAVResourceAccess::LOCK( m_xSession->LOCK( getRequestURI(), inLock, DAVRequestEnvironment( - getRequestURI(), new DAVAuthListener_Impl( xEnv, m_aURL ), - aHeaders, xEnv ) ); + aHeaders ) ); } catch (DAVException const& e) { @@ -992,9 +974,8 @@ void DAVResourceAccess::UNLOCK( m_xSession->UNLOCK( getRequestURI(), DAVRequestEnvironment( - getRequestURI(), new DAVAuthListener_Impl( xEnv, m_aURL ), - aHeaders, xEnv ) ); + aHeaders ) ); } catch (DAVException const& e) { |