Adapt to LibreOffice the previous commit

..."i121946 - Use enums to identify WebDAV/HTTP methods."

Change-Id: I59c8b011192df008af539aa41ec5976f042572f6
This commit is contained in:
Stephan Bergmann
2013-08-15 16:53:55 +02:00
parent 7165b05968
commit 0fcac72211
3 changed files with 23 additions and 22 deletions

View File

@@ -23,7 +23,7 @@ module com { module sun { module star { module ucb {
/** Standard WebDAV/HTTP methods.
@since Apache OpenOffice 4.0
@since Apache OpenOffice 4.0, LibreOffice 4.2
*/
enum WebDAVHTTPMethod
{

View File

@@ -237,7 +237,7 @@ void DAVResourceAccess::PROPFIND(
getUserRequestHeaders( xEnv,
getRequestURI(),
OUString( "PROPFIND" ),
ucb::WebDAVHTTPMethod_PROPFIND,
aHeaders );
m_xSession->PROPFIND( getRequestURI(),
@@ -279,7 +279,7 @@ void DAVResourceAccess::PROPFIND(
DAVRequestHeaders aHeaders;
getUserRequestHeaders( xEnv,
getRequestURI(),
OUString( "PROPFIND" ),
ucb::WebDAVHTTPMethod_PROPFIND,
aHeaders );
m_xSession->PROPFIND( getRequestURI(),
@@ -319,7 +319,7 @@ void DAVResourceAccess::PROPPATCH(
DAVRequestHeaders aHeaders;
getUserRequestHeaders( xEnv,
getRequestURI(),
OUString( "PROPPATCH" ),
ucb::WebDAVHTTPMethod_PROPPATCH,
aHeaders );
m_xSession->PROPPATCH( getRequestURI(),
@@ -359,7 +359,7 @@ void DAVResourceAccess::HEAD(
DAVRequestHeaders aHeaders;
getUserRequestHeaders( xEnv,
getRequestURI(),
OUString("HEAD"),
ucb::WebDAVHTTPMethod_HEAD,
aHeaders );
m_xSession->HEAD( getRequestURI(),
@@ -399,7 +399,7 @@ uno::Reference< io::XInputStream > DAVResourceAccess::GET(
DAVRequestHeaders aHeaders;
getUserRequestHeaders( xEnv,
getRequestURI(),
OUString("GET"),
ucb::WebDAVHTTPMethod_GET,
aHeaders );
xStream = m_xSession->GET( getRequestURI(),
@@ -440,7 +440,7 @@ void DAVResourceAccess::GET(
DAVRequestHeaders aHeaders;
getUserRequestHeaders( xEnv,
getRequestURI(),
OUString("GET"),
ucb::WebDAVHTTPMethod_GET,
aHeaders );
m_xSession->GET( getRequestURI(),
@@ -481,7 +481,7 @@ uno::Reference< io::XInputStream > DAVResourceAccess::GET(
DAVRequestHeaders aHeaders;
getUserRequestHeaders( xEnv,
getRequestURI(),
OUString("GET"),
ucb::WebDAVHTTPMethod_GET,
aHeaders );
xStream = m_xSession->GET( getRequestURI(),
@@ -526,7 +526,7 @@ void DAVResourceAccess::GET(
DAVRequestHeaders aHeaders;
getUserRequestHeaders( xEnv,
getRequestURI(),
OUString("GET"),
ucb::WebDAVHTTPMethod_GET,
aHeaders );
m_xSession->GET( getRequestURI(),
@@ -611,7 +611,7 @@ void DAVResourceAccess::PUT(
DAVRequestHeaders aHeaders;
getUserRequestHeaders( xEnv,
getRequestURI(),
OUString("PUT"),
ucb::WebDAVHTTPMethod_PUT,
aHeaders );
m_xSession->PUT( getRequestURI(),
@@ -663,7 +663,7 @@ uno::Reference< io::XInputStream > DAVResourceAccess::POST(
DAVRequestHeaders aHeaders;
getUserRequestHeaders( xEnv,
getRequestURI(),
OUString("POST"),
ucb::WebDAVHTTPMethod_POST,
aHeaders );
xStream = m_xSession->POST( getRequestURI(),
@@ -726,7 +726,7 @@ void DAVResourceAccess::POST(
DAVRequestHeaders aHeaders;
getUserRequestHeaders( xEnv,
getRequestURI(),
OUString("POST"),
ucb::WebDAVHTTPMethod_POST,
aHeaders );
m_xSession->POST( getRequestURI(),
@@ -774,7 +774,7 @@ void DAVResourceAccess::MKCOL(
DAVRequestHeaders aHeaders;
getUserRequestHeaders( xEnv,
getRequestURI(),
OUString("MKCOL"),
ucb::WebDAVHTTPMethod_MKCOL,
aHeaders );
m_xSession->MKCOL( getRequestURI(),
@@ -814,7 +814,7 @@ void DAVResourceAccess::COPY(
DAVRequestHeaders aHeaders;
getUserRequestHeaders( xEnv,
getRequestURI(),
OUString("COPY"),
ucb::WebDAVHTTPMethod_COPY,
aHeaders );
m_xSession->COPY( rSourcePath,
@@ -856,7 +856,7 @@ void DAVResourceAccess::MOVE(
DAVRequestHeaders aHeaders;
getUserRequestHeaders( xEnv,
getRequestURI(),
OUString("MOVE"),
ucb::WebDAVHTTPMethod_MOVE,
aHeaders );
m_xSession->MOVE( rSourcePath,
@@ -895,7 +895,7 @@ void DAVResourceAccess::DESTROY(
DAVRequestHeaders aHeaders;
getUserRequestHeaders( xEnv,
getRequestURI(),
OUString( "DESTROY" ),
ucb::WebDAVHTTPMethod_DELETE,
aHeaders );
m_xSession->DESTROY( getRequestURI(),
@@ -934,7 +934,7 @@ void DAVResourceAccess::LOCK(
DAVRequestHeaders aHeaders;
getUserRequestHeaders( xEnv,
getRequestURI(),
OUString("LOCK"),
ucb::WebDAVHTTPMethod_LOCK,
aHeaders );
m_xSession->LOCK( getRequestURI(),
@@ -976,7 +976,7 @@ sal_Int64 DAVResourceAccess::LOCK(
DAVRequestHeaders aHeaders;
getUserRequestHeaders( xEnv,
getRequestURI(),
OUString("LOCK"),
ucb::WebDAVHTTPMethod_LOCK,
aHeaders );
nNewTimeout = m_xSession->LOCK( getRequestURI(),
@@ -1018,7 +1018,7 @@ void DAVResourceAccess::UNLOCK(
DAVRequestHeaders aHeaders;
getUserRequestHeaders( xEnv,
getRequestURI(),
OUString("UNLOCK"),
ucb::WebDAVHTTPMethod_UNLOCK,
aHeaders );
m_xSession->UNLOCK( getRequestURI(),
@@ -1115,7 +1115,7 @@ const OUString & DAVResourceAccess::getRequestURI() const
void DAVResourceAccess::getUserRequestHeaders(
const uno::Reference< ucb::XCommandEnvironment > & xEnv,
const OUString & rURI,
const OUString & rMethod,
ucb::WebDAVHTTPMethod eMethod,
DAVRequestHeaders & rRequestHeaders )
{
if ( xEnv.is() )
@@ -1126,7 +1126,7 @@ void DAVResourceAccess::getUserRequestHeaders(
if ( xDAVEnv.is() )
{
uno::Sequence< beans::StringPair > aRequestHeaders
= xDAVEnv->getUserRequestHeaders( rURI, rMethod );
= xDAVEnv->getUserRequestHeaders( rURI, eMethod );
for ( sal_Int32 n = 0; n < aRequestHeaders.getLength(); ++n )
{

View File

@@ -38,6 +38,7 @@
#include <com/sun/star/io/XOutputStream.hpp>
#include <com/sun/star/beans/NamedValue.hpp>
#include <com/sun/star/ucb/Lock.hpp>
#include <com/sun/star/ucb/WebDAVHTTPMethod.hpp>
#include <com/sun/star/ucb/XCommandEnvironment.hpp>
#include "DAVAuthListener.hxx"
#include "DAVException.hxx"
@@ -240,7 +241,7 @@ public:
const com::sun::star::uno::Reference<
com::sun::star::ucb::XCommandEnvironment > & xEnv,
const OUString & rURI,
const OUString & rMethod,
com::sun::star::ucb::WebDAVHTTPMethod eMethod,
DAVRequestHeaders & rRequestHeaders );
private: