summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-11-06 07:45:00 +0200
committerNoel Grandin <noel@peralex.com>2014-11-06 13:51:10 +0200
commit05050cdb23de586870bf479a9df5ced06828d498 (patch)
treea34c3bba9a921a5e9abf23d5757c15dfaea0ceac /ucb
parent8f266781a6bd6a629bce65c0f613683047c9a794 (diff)
use the new OUString::fromUtf8 method
Change-Id: I771004b7ccab3344a67e827e45bc34c22ffa5f77
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/ucp/webdav-neon/DAVProperties.cxx6
-rw-r--r--ucb/source/ucp/webdav-neon/NeonPropFindRequest.cxx8
-rw-r--r--ucb/source/ucp/webdav-neon/NeonUri.cxx24
-rw-r--r--ucb/source/ucp/webdav/DAVProperties.cxx6
-rw-r--r--ucb/source/ucp/webdav/SerfUri.cxx12
5 files changed, 23 insertions, 33 deletions
diff --git a/ucb/source/ucp/webdav-neon/DAVProperties.cxx b/ucb/source/ucp/webdav-neon/DAVProperties.cxx
index 5d5634936dca..09960488ac89 100644
--- a/ucb/source/ucp/webdav-neon/DAVProperties.cxx
+++ b/ucb/source/ucp/webdav-neon/DAVProperties.cxx
@@ -108,10 +108,8 @@ void DAVProperties::createUCBPropName( const char * nspace,
const char * name,
OUString & rFullName )
{
- OUString aNameSpace
- = OStringToOUString( nspace, RTL_TEXTENCODING_UTF8 );
- OUString aName
- = OStringToOUString( name, RTL_TEXTENCODING_UTF8 );
+ OUString aNameSpace = OUString::fromUtf8( nspace );
+ OUString aName = OUString::fromUtf8( name );
if ( aNameSpace.isEmpty() )
{
diff --git a/ucb/source/ucp/webdav-neon/NeonPropFindRequest.cxx b/ucb/source/ucp/webdav-neon/NeonPropFindRequest.cxx
index 73b6c7c5df32..f4a58ccb5def 100644
--- a/ucb/source/ucp/webdav-neon/NeonPropFindRequest.cxx
+++ b/ucb/source/ucp/webdav-neon/NeonPropFindRequest.cxx
@@ -175,7 +175,7 @@ extern "C" int NPFR_propfind_iter( void* userdata,
else
{
thePropertyValue.Value
- <<= OStringToOUString( value, RTL_TEXTENCODING_UTF8 );
+ <<= OUString::fromUtf8( value );
}
}
@@ -192,8 +192,7 @@ extern "C" void NPFR_propfind_results( void* userdata,
{
// @@@ href is not the uri! DAVResource ctor wants uri!
- DAVResource theResource(
- OStringToOUString( uri->path, RTL_TEXTENCODING_UTF8 ) );
+ DAVResource theResource( OUString::fromUtf8( uri->path ) );
ne_propset_iterate( set, NPFR_propfind_iter, &theResource );
@@ -224,8 +223,7 @@ extern "C" void NPFR_propnames_results( void* userdata,
{
// @@@ href is not the uri! DAVResourceInfo ctor wants uri!
// Create entry for the resource.
- DAVResourceInfo theResource(
- OStringToOUString( uri->path, RTL_TEXTENCODING_UTF8 ) );
+ DAVResourceInfo theResource( OUString::fromUtf8( uri->path ) );
// Fill entry.
ne_propset_iterate( results, NPFR_propnames_iter, &theResource );
diff --git a/ucb/source/ucp/webdav-neon/NeonUri.cxx b/ucb/source/ucp/webdav-neon/NeonUri.cxx
index d378cfb46ddf..bec91bcb8759 100644
--- a/ucb/source/ucp/webdav-neon/NeonUri.cxx
+++ b/ucb/source/ucp/webdav-neon/NeonUri.cxx
@@ -124,28 +124,24 @@ void NeonUri::init( const OString & rUri, const ne_uri * pUri )
&g_sUriDefaultsHTTPS :
&g_sUriDefaultsHTTP;
- mScheme = OStringToOUString(
- pUri->scheme ? pUri->scheme : pUriDefs->scheme,
- RTL_TEXTENCODING_UTF8 );
- mUserInfo = OStringToOUString(
- pUri->userinfo ? pUri->userinfo : pUriDefs->userinfo,
- RTL_TEXTENCODING_UTF8 );
- mHostName = OStringToOUString(
- pUri->host ? pUri->host : pUriDefs->host,
- RTL_TEXTENCODING_UTF8 );
+ mScheme = OUString::fromUtf8(
+ pUri->scheme ? pUri->scheme : pUriDefs->scheme);
+ mUserInfo = OUString::fromUtf8(
+ pUri->userinfo ? pUri->userinfo : pUriDefs->userinfo);
+ mHostName = OUString::fromUtf8(
+ pUri->host ? pUri->host : pUriDefs->host);
mPort = pUri->port > 0 ? pUri->port : pUriDefs->port;
- mPath = OStringToOUString(
- pUri->path ? pUri->path : pUriDefs->path,
- RTL_TEXTENCODING_UTF8 );
+ mPath = OUString::fromUtf8(
+ pUri->path ? pUri->path : pUriDefs->path);
if ( pUri->query )
{
- mPath += "?" + OStringToOUString( pUri->query, RTL_TEXTENCODING_UTF8 );
+ mPath += "?" + OUString::fromUtf8( pUri->query );
}
if ( pUri->fragment )
{
- mPath += "#" + OStringToOUString( pUri->fragment, RTL_TEXTENCODING_UTF8 );
+ mPath += "#" + OUString::fromUtf8( pUri->fragment );
}
}
diff --git a/ucb/source/ucp/webdav/DAVProperties.cxx b/ucb/source/ucp/webdav/DAVProperties.cxx
index 34537d29e663..4162f4f6db09 100644
--- a/ucb/source/ucp/webdav/DAVProperties.cxx
+++ b/ucb/source/ucp/webdav/DAVProperties.cxx
@@ -113,10 +113,8 @@ void DAVProperties::createUCBPropName( const char * nspace,
const char * name,
OUString & rFullName )
{
- OUString aNameSpace
- = OStringToOUString( nspace, RTL_TEXTENCODING_UTF8 );
- OUString aName
- = OStringToOUString( name, RTL_TEXTENCODING_UTF8 );
+ OUString aNameSpace = OUString::fromUtf8( nspace );
+ OUString aName = OUString::fromUtf8( name );
if ( !aNameSpace.getLength() )
{
diff --git a/ucb/source/ucp/webdav/SerfUri.cxx b/ucb/source/ucp/webdav/SerfUri.cxx
index df299338667e..5c44cca7f200 100644
--- a/ucb/source/ucp/webdav/SerfUri.cxx
+++ b/ucb/source/ucp/webdav/SerfUri.cxx
@@ -93,22 +93,22 @@ SerfUri::SerfUri( const OUString & inUri )
void SerfUri::init( const apr_uri_t * pUri )
{
- mScheme = OStringToOUString( pUri->scheme, RTL_TEXTENCODING_UTF8 );
- mUserInfo = OStringToOUString( pUri->user, RTL_TEXTENCODING_UTF8 );
- mHostName = OStringToOUString( pUri->hostname, RTL_TEXTENCODING_UTF8 );
+ mScheme = OUString::fromUtf8( pUri->scheme );
+ mUserInfo = OUString::fromUtf8( pUri->user );
+ mHostName = OUString::fromUtf8( pUri->hostname );
mPort = pUri->port;
- mPath = OStringToOUString( pUri->path, RTL_TEXTENCODING_UTF8 );
+ mPath = OUString::fromUtf8( pUri->path );
if ( pUri->query )
{
mPath += "?";
- mPath += OStringToOUString( pUri->query, RTL_TEXTENCODING_UTF8 );
+ mPath += OUString::fromUtf8( pUri->query );
}
if ( pUri->fragment )
{
mPath += "#";
- mPath += OStringToOUString( pUri->fragment, RTL_TEXTENCODING_UTF8 );
+ mPath += OUString::fromUtf8( pUri->fragment );
}
}