Kaydet (Commit) 5e649bc0 authored tarafından Chr. Rossmanith's avatar Chr. Rossmanith

Remove RTL_CONSTASCII_(U)STRINGPARAM in ucb

and use append() instead of appendAscii()

Change-Id: I7c9dd0e03e24a39240a82fc245b4722d4c424842
üst 46dfe0bc
......@@ -1222,8 +1222,7 @@ void SerfSession::abort()
// -------------------------------------------------------------------
const ucbhelper::InternetProxyServer & SerfSession::getProxySettings() const
{
if ( m_aUri.GetScheme().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "http" ) ) ||
m_aUri.GetScheme().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "https" ) ) )
if ( m_aUri.GetScheme() == "http" || m_aUri.GetScheme() == "https" )
{
return m_rProxyDecider.getProxy( m_aUri.GetScheme(),
m_aUri.GetHost(),
......
......@@ -140,19 +140,19 @@ SerfUri::~SerfUri( )
void SerfUri::calculateURI ()
{
rtl::OUStringBuffer aBuf( mScheme );
aBuf.appendAscii( "://" );
aBuf.append( "://" );
if ( mUserInfo.getLength() > 0 )
{
aBuf.append( mUserInfo );
aBuf.appendAscii( "@" );
aBuf.append( "@" );
}
// Is host a numeric IPv6 address?
if ( ( mHostName.indexOf( ':' ) != -1 ) &&
( mHostName[ 0 ] != sal_Unicode( '[' ) ) )
{
aBuf.appendAscii( "[" );
aBuf.append( "[" );
aBuf.append( mHostName );
aBuf.appendAscii( "]" );
aBuf.append( "]" );
}
else
{
......@@ -164,16 +164,16 @@ void SerfUri::calculateURI ()
switch ( mPort )
{
case DEFAULT_HTTP_PORT:
bAppendPort = !mScheme.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "http" ) );
bAppendPort = (mScheme != "http");
break;
case DEFAULT_HTTPS_PORT:
bAppendPort = !mScheme.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "https" ) );
bAppendPort = (mScheme != "https");
break;
}
if ( bAppendPort )
{
aBuf.appendAscii( ":" );
aBuf.append( ":" );
aBuf.append( rtl::OUString::valueOf( mPort ) );
}
aBuf.append( mPath );
......@@ -256,9 +256,9 @@ rtl::OUString SerfUri::makeConnectionEndPointString(
if ( ( rHostName.indexOf( ':' ) != -1 ) &&
( rHostName[ 0 ] != sal_Unicode( '[' ) ) )
{
aBuf.appendAscii( "[" );
aBuf.append( "[" );
aBuf.append( rHostName );
aBuf.appendAscii( "]" );
aBuf.append( "]" );
}
else
{
......@@ -267,7 +267,7 @@ rtl::OUString SerfUri::makeConnectionEndPointString(
if ( ( nPort != DEFAULT_HTTP_PORT ) && ( nPort != DEFAULT_HTTPS_PORT ) )
{
aBuf.appendAscii( ":" );
aBuf.append( ":" );
aBuf.append( rtl::OUString::valueOf( sal_Int32( nPort ) ) );
}
return aBuf.makeStringAndClear();
......
......@@ -109,16 +109,9 @@ ContentProvider::queryContent(
const rtl::OUString aScheme
= Identifier->getContentProviderScheme().toAsciiLowerCase();
if ( !aScheme.equalsAsciiL(
RTL_CONSTASCII_STRINGPARAM( HTTP_URL_SCHEME ) ) &&
!aScheme.equalsAsciiL(
RTL_CONSTASCII_STRINGPARAM( HTTPS_URL_SCHEME ) ) &&
!aScheme.equalsAsciiL(
RTL_CONSTASCII_STRINGPARAM( WEBDAV_URL_SCHEME ) ) &&
!aScheme.equalsAsciiL(
RTL_CONSTASCII_STRINGPARAM( DAV_URL_SCHEME ) ) &&
!aScheme.equalsAsciiL(
RTL_CONSTASCII_STRINGPARAM( DAVS_URL_SCHEME ) ) )
if ( aScheme != HTTP_URL_SCHEME && aScheme != HTTPS_URL_SCHEME &&
aScheme != WEBDAV_URL_SCHEME && aScheme != DAV_URL_SCHEME &&
aScheme != DAVS_URL_SCHEME )
throw ucb::IllegalIdentifierException();
// Normalize URL and create new Id, if nessacary.
......@@ -136,8 +129,7 @@ ContentProvider::queryContent(
uno::Reference< ucb::XContentIdentifier > xCanonicId;
bool bNewId = false;
if ( aScheme.equalsAsciiL(
RTL_CONSTASCII_STRINGPARAM( WEBDAV_URL_SCHEME ) ) )
if ( aScheme == WEBDAV_URL_SCHEME )
{
aURL = aURL.replaceAt( 0,
WEBDAV_URL_SCHEME_LENGTH,
......@@ -145,8 +137,7 @@ ContentProvider::queryContent(
HTTP_URL_SCHEME ) );
bNewId = true;
}
else if ( aScheme.equalsAsciiL(
RTL_CONSTASCII_STRINGPARAM( DAV_URL_SCHEME ) ) )
else if ( aScheme == DAV_URL_SCHEME )
{
aURL = aURL.replaceAt( 0,
DAV_URL_SCHEME_LENGTH,
......@@ -154,8 +145,7 @@ ContentProvider::queryContent(
HTTP_URL_SCHEME ) );
bNewId = true;
}
else if ( aScheme.equalsAsciiL(
RTL_CONSTASCII_STRINGPARAM( DAVS_URL_SCHEME ) ) )
else if ( aScheme == DAVS_URL_SCHEME )
{
aURL = aURL.replaceAt( 0,
DAVS_URL_SCHEME_LENGTH,
......
......@@ -1096,12 +1096,10 @@ void UcbContent::open( const rtl::OUString & rName, const OUString& rInput,
if ( bPrint )
{
if ( !bFolder && xRow->wasNull() )
aText.AppendAscii( RTL_CONSTASCII_STRINGPARAM(
"<null>" ) );
aText.AppendAscii( "<null>" );
else
aText += bFolder ? OUString("true") : OUString("false");
aText.AppendAscii( RTL_CONSTASCII_STRINGPARAM(
" : " ) );
aText.AppendAscii( " : " );
}
// IsDocument:
......@@ -1109,8 +1107,7 @@ void UcbContent::open( const rtl::OUString & rName, const OUString& rInput,
if ( bPrint )
{
if ( !bFolder && xRow->wasNull() )
aText.AppendAscii( RTL_CONSTASCII_STRINGPARAM(
"<null>" ) );
aText.AppendAscii( "<null>" );
else
aText
+= bDocument ? OUString("true") : OUString("false"); // IsDocument
......@@ -1606,12 +1603,12 @@ void SAL_CALL UcbContent::contentEvent( const ucb::ContentEvent& evt )
aMatch += String(evt.Id->getContentIdentifier());
if (evt.Content.is())
{
aMatch.AppendAscii(RTL_CONSTASCII_STRINGPARAM(" - "));
aMatch.AppendAscii(" - ");
aMatch += String(evt.Content->getContentType());
}
}
else
aMatch.AppendAscii(RTL_CONSTASCII_STRINGPARAM("<no id>"));
aMatch.AppendAscii("<no id>");
print(aMatch);
break;
}
......
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