Kaydet (Commit) 43fc67ad authored tarafından Herbert Dürr's avatar Herbert Dürr Kaydeden (comit) Matúš Kukan

#i123068# remove implicit conversions from rtl strings to their elements

(cherry picked from commit 1a15756d)

Conflicts:
	ucb/source/ucp/webdav/DAVProperties.cxx
	ucb/source/ucp/webdav/SerfRequestProcessor.cxx
	ucb/source/ucp/webdav/SerfSession.cxx

Rest ignored.

Change-Id: I7d25170cc07538dbab70bc72af8764820da2b60b
üst ff824e87
......@@ -58,7 +58,7 @@ void DAVProperties::createSerfPropName( const OUString & rFullName,
rName.name
= strdup( OUStringToOString(
rFullName.copy( RTL_CONSTASCII_LENGTH( "DAV:" ) ),
RTL_TEXTENCODING_UTF8 ) );
RTL_TEXTENCODING_UTF8 ).getStr() );
}
else if ( rFullName.startsWith( "http://apache.org/dav/props/" ) )
{
......@@ -68,7 +68,7 @@ void DAVProperties::createSerfPropName( const OUString & rFullName,
rFullName.copy(
RTL_CONSTASCII_LENGTH(
"http://apache.org/dav/props/" ) ),
RTL_TEXTENCODING_UTF8 ) );
RTL_TEXTENCODING_UTF8 ).getStr() );
}
else if ( rFullName.startsWith( "http://ucb.openoffice.org/dav/props/" ) )
{
......@@ -78,7 +78,7 @@ void DAVProperties::createSerfPropName( const OUString & rFullName,
rFullName.copy(
RTL_CONSTASCII_LENGTH(
"http://ucb.openoffice.org/dav/props/" ) ),
RTL_TEXTENCODING_UTF8 ) );
RTL_TEXTENCODING_UTF8 ).getStr() );
}
else if ( rFullName.startsWith( "<prop:" ) )
{
......@@ -91,11 +91,11 @@ void DAVProperties::createSerfPropName( const OUString & rFullName,
sal_Int32 nStart = RTL_CONSTASCII_LENGTH( "<prop:" );
sal_Int32 nLen = aFullName.indexOf( ' ' ) - nStart;
rName.name = strdup( aFullName.copy( nStart, nLen ) );
rName.name = strdup( aFullName.copy( nStart, nLen ).getStr() );
nStart = aFullName.indexOf( '=', nStart + nLen ) + 2; // after ="
nLen = aFullName.getLength() - RTL_CONSTASCII_LENGTH( "\">" ) - nStart;
rName.nspace = strdup( aFullName.copy( nStart, nLen ) );
rName.nspace = strdup( aFullName.copy( nStart, nLen ).getStr() );
}
else
{
......@@ -103,7 +103,7 @@ void DAVProperties::createSerfPropName( const OUString & rFullName,
rName.nspace = "http://ucb.openoffice.org/dav/props/";
rName.name
= strdup( OUStringToOString( rFullName,
RTL_TEXTENCODING_UTF8 ) );
RTL_TEXTENCODING_UTF8 ).getStr() );
}
}
......
......@@ -50,7 +50,7 @@ SerfRequestProcessor::SerfRequestProcessor( SerfSession& rSerfSession,
, mbHandleSerfResponseCalled( false )
{
mPathStr = apr_pstrdup( mrSerfSession.getAprPool(),
OUStringToOString( inPath, RTL_TEXTENCODING_UTF8 ) );
OUStringToOString( inPath, RTL_TEXTENCODING_UTF8 ).getStr() );
}
SerfRequestProcessor::~SerfRequestProcessor()
......@@ -209,9 +209,9 @@ bool SerfRequestProcessor::processPost( const char* inData,
apr_status_t& outSerfStatus )
{
mContentType = apr_pstrdup( mrSerfSession.getAprPool(),
OUStringToOString( inContentType, RTL_TEXTENCODING_UTF8 ) );
OUStringToOString( inContentType, RTL_TEXTENCODING_UTF8 ).getStr() );
mReferer = apr_pstrdup( mrSerfSession.getAprPool(),
OUStringToOString( inReferer, RTL_TEXTENCODING_UTF8 ) );
OUStringToOString( inReferer, RTL_TEXTENCODING_UTF8 ).getStr() );
mpProcImpl = createPostReqProcImpl( mPathStr,
mrSerfSession.getRequestEnvironment().m_aRequestHeaders,
inData,
......@@ -233,9 +233,9 @@ bool SerfRequestProcessor::processPost( const char* inData,
apr_status_t& outSerfStatus )
{
mContentType = apr_pstrdup( mrSerfSession.getAprPool(),
OUStringToOString( inContentType, RTL_TEXTENCODING_UTF8 ) );
OUStringToOString( inContentType, RTL_TEXTENCODING_UTF8 ).getStr() );
mReferer = apr_pstrdup( mrSerfSession.getAprPool(),
OUStringToOString( inReferer, RTL_TEXTENCODING_UTF8 ) );
OUStringToOString( inReferer, RTL_TEXTENCODING_UTF8 ).getStr() );
mpProcImpl = createPostReqProcImpl( mPathStr,
mrSerfSession.getRequestEnvironment().m_aRequestHeaders,
inData,
......@@ -274,7 +274,7 @@ bool SerfRequestProcessor::processCopy( const OUString & inDestinationPath,
apr_status_t& outSerfStatus )
{
mDestPathStr = apr_pstrdup( mrSerfSession.getAprPool(),
OUStringToOString( inDestinationPath, RTL_TEXTENCODING_UTF8 ) );
OUStringToOString( inDestinationPath, RTL_TEXTENCODING_UTF8 ).getStr() );
mpProcImpl = createCopyReqProcImpl( mPathStr,
mrSerfSession.getRequestEnvironment().m_aRequestHeaders,
mDestPathStr,
......@@ -290,7 +290,7 @@ bool SerfRequestProcessor::processMove( const OUString & inDestinationPath,
apr_status_t& outSerfStatus )
{
mDestPathStr = apr_pstrdup( mrSerfSession.getAprPool(),
OUStringToOString( inDestinationPath, RTL_TEXTENCODING_UTF8 ) );
OUStringToOString( inDestinationPath, RTL_TEXTENCODING_UTF8 ).getStr() );
mpProcImpl = createMoveReqProcImpl( mPathStr,
mrSerfSession.getRequestEnvironment().m_aRequestHeaders,
mDestPathStr,
......
......@@ -163,7 +163,7 @@ void SerfSession::Init()
{
apr_sockaddr_t *proxy_address = NULL;
const apr_status_t status = apr_sockaddr_info_get( &proxy_address,
OUStringToOString( m_aProxyName, RTL_TEXTENCODING_UTF8 ),
OUStringToOString( m_aProxyName, RTL_TEXTENCODING_UTF8 ).getStr(),
APR_UNSPEC,
static_cast<apr_port_t>(m_nProxyPort),
0, getAprPool() );
......@@ -339,8 +339,8 @@ apr_status_t SerfSession::provideSerfCredentials( bool bGiveProvidedCredentialsA
if ( theRetVal == 0 )
{
*outUsername = apr_pstrdup( inAprPool, OUStringToOString( theUserName, RTL_TEXTENCODING_UTF8 ) );
*outPassword = apr_pstrdup( inAprPool, OUStringToOString( thePassWord, RTL_TEXTENCODING_UTF8 ) );
*outUsername = apr_pstrdup( inAprPool, OUStringToOString( theUserName, RTL_TEXTENCODING_UTF8 ).getStr() );
*outPassword = apr_pstrdup( inAprPool, OUStringToOString( thePassWord, RTL_TEXTENCODING_UTF8 ).getStr() );
}
return theRetVal != 0 ? SERF_ERROR_AUTHN_FAILED : APR_SUCCESS;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment