diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-11-06 17:24:13 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-11-06 17:24:13 +0100 |
commit | fc0d57b7aff84f4bdca0a1f201527c265d5f0cf5 (patch) | |
tree | 49a72b76d2d2a92af6371748c19277778159b86d /ucb | |
parent | e36dae401fc8963c9a92cb2c11d9b650b943c6d3 (diff) |
Revert "use the new OUString::fromUtf8 method"
This reverts commit 05050cdb23de586870bf479a9df5ced06828d498,
not all places that use e.g. OStringToOUString to convert potential UTF-8
are guaranteed to fulfil the prerequisites necessary to use fromUtf8 (and
some places like e.g. in codemaker are happy with the best-effort effect
of OStringToOUString's OSTRING_TO_OUSTRING_CVTFLAGS).
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/ucp/webdav-neon/DAVProperties.cxx | 6 | ||||
-rw-r--r-- | ucb/source/ucp/webdav-neon/NeonPropFindRequest.cxx | 8 | ||||
-rw-r--r-- | ucb/source/ucp/webdav-neon/NeonUri.cxx | 24 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/DAVProperties.cxx | 6 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/SerfUri.cxx | 12 |
5 files changed, 33 insertions, 23 deletions
diff --git a/ucb/source/ucp/webdav-neon/DAVProperties.cxx b/ucb/source/ucp/webdav-neon/DAVProperties.cxx index 09960488ac89..5d5634936dca 100644 --- a/ucb/source/ucp/webdav-neon/DAVProperties.cxx +++ b/ucb/source/ucp/webdav-neon/DAVProperties.cxx @@ -108,8 +108,10 @@ void DAVProperties::createUCBPropName( const char * nspace, const char * name, OUString & rFullName ) { - OUString aNameSpace = OUString::fromUtf8( nspace ); - OUString aName = OUString::fromUtf8( name ); + OUString aNameSpace + = OStringToOUString( nspace, RTL_TEXTENCODING_UTF8 ); + OUString aName + = OStringToOUString( name, RTL_TEXTENCODING_UTF8 ); if ( aNameSpace.isEmpty() ) { diff --git a/ucb/source/ucp/webdav-neon/NeonPropFindRequest.cxx b/ucb/source/ucp/webdav-neon/NeonPropFindRequest.cxx index f4a58ccb5def..73b6c7c5df32 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 - <<= OUString::fromUtf8( value ); + <<= OStringToOUString( value, RTL_TEXTENCODING_UTF8 ); } } @@ -192,7 +192,8 @@ extern "C" void NPFR_propfind_results( void* userdata, { // @@@ href is not the uri! DAVResource ctor wants uri! - DAVResource theResource( OUString::fromUtf8( uri->path ) ); + DAVResource theResource( + OStringToOUString( uri->path, RTL_TEXTENCODING_UTF8 ) ); ne_propset_iterate( set, NPFR_propfind_iter, &theResource ); @@ -223,7 +224,8 @@ extern "C" void NPFR_propnames_results( void* userdata, { // @@@ href is not the uri! DAVResourceInfo ctor wants uri! // Create entry for the resource. - DAVResourceInfo theResource( OUString::fromUtf8( uri->path ) ); + DAVResourceInfo theResource( + OStringToOUString( uri->path, RTL_TEXTENCODING_UTF8 ) ); // 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 bec91bcb8759..d378cfb46ddf 100644 --- a/ucb/source/ucp/webdav-neon/NeonUri.cxx +++ b/ucb/source/ucp/webdav-neon/NeonUri.cxx @@ -124,24 +124,28 @@ void NeonUri::init( const OString & rUri, const ne_uri * pUri ) &g_sUriDefaultsHTTPS : &g_sUriDefaultsHTTP; - 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); + 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 ); mPort = pUri->port > 0 ? pUri->port : pUriDefs->port; - mPath = OUString::fromUtf8( - pUri->path ? pUri->path : pUriDefs->path); + mPath = OStringToOUString( + pUri->path ? pUri->path : pUriDefs->path, + RTL_TEXTENCODING_UTF8 ); if ( pUri->query ) { - mPath += "?" + OUString::fromUtf8( pUri->query ); + mPath += "?" + OStringToOUString( pUri->query, RTL_TEXTENCODING_UTF8 ); } if ( pUri->fragment ) { - mPath += "#" + OUString::fromUtf8( pUri->fragment ); + mPath += "#" + OStringToOUString( pUri->fragment, RTL_TEXTENCODING_UTF8 ); } } diff --git a/ucb/source/ucp/webdav/DAVProperties.cxx b/ucb/source/ucp/webdav/DAVProperties.cxx index 4162f4f6db09..34537d29e663 100644 --- a/ucb/source/ucp/webdav/DAVProperties.cxx +++ b/ucb/source/ucp/webdav/DAVProperties.cxx @@ -113,8 +113,10 @@ void DAVProperties::createUCBPropName( const char * nspace, const char * name, OUString & rFullName ) { - OUString aNameSpace = OUString::fromUtf8( nspace ); - OUString aName = OUString::fromUtf8( name ); + OUString aNameSpace + = OStringToOUString( nspace, RTL_TEXTENCODING_UTF8 ); + OUString aName + = OStringToOUString( name, RTL_TEXTENCODING_UTF8 ); if ( !aNameSpace.getLength() ) { diff --git a/ucb/source/ucp/webdav/SerfUri.cxx b/ucb/source/ucp/webdav/SerfUri.cxx index 5c44cca7f200..df299338667e 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 = OUString::fromUtf8( pUri->scheme ); - mUserInfo = OUString::fromUtf8( pUri->user ); - mHostName = OUString::fromUtf8( pUri->hostname ); + mScheme = OStringToOUString( pUri->scheme, RTL_TEXTENCODING_UTF8 ); + mUserInfo = OStringToOUString( pUri->user, RTL_TEXTENCODING_UTF8 ); + mHostName = OStringToOUString( pUri->hostname, RTL_TEXTENCODING_UTF8 ); mPort = pUri->port; - mPath = OUString::fromUtf8( pUri->path ); + mPath = OStringToOUString( pUri->path, RTL_TEXTENCODING_UTF8 ); if ( pUri->query ) { mPath += "?"; - mPath += OUString::fromUtf8( pUri->query ); + mPath += OStringToOUString( pUri->query, RTL_TEXTENCODING_UTF8 ); } if ( pUri->fragment ) { mPath += "#"; - mPath += OUString::fromUtf8( pUri->fragment ); + mPath += OStringToOUString( pUri->fragment, RTL_TEXTENCODING_UTF8 ); } } |