diff options
author | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-04-07 22:36:26 +0200 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-04-07 22:36:26 +0200 |
commit | f61e0685c1a41e284412822fdd8f038f1ecd17af (patch) | |
tree | 3054f8ac2cbef9688e2f64cc85690c5c238085a4 /ucb/source | |
parent | f140e09e24baeb67b25cf0cfc0d7b143f18a78be (diff) |
slidecopy: fixed encoding/decoding of extension identifiers as part of an URL (thanks SB)
Diffstat (limited to 'ucb/source')
-rw-r--r-- | ucb/source/ucp/ext/ucpext_content.cxx | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/ucb/source/ucp/ext/ucpext_content.cxx b/ucb/source/ucp/ext/ucpext_content.cxx index 0e5612796c..c2ba3efdde 100644 --- a/ucb/source/ucp/ext/ucpext_content.cxx +++ b/ucb/source/ucp/ext/ucpext_content.cxx @@ -60,7 +60,7 @@ #include <comphelper/string.hxx> #include <comphelper/componentcontext.hxx> #include <rtl/ustrbuf.hxx> -#include <rtl/uri.h> +#include <rtl/uri.hxx> #include <algorithm> @@ -311,18 +311,14 @@ namespace ucb { namespace ucp { namespace ext //------------------------------------------------------------------------------------------------------------------ ::rtl::OUString Content::encodeIdentifier( const ::rtl::OUString& i_rIdentifier ) { - ::rtl::OUString sEncoded; - rtl_uriEncode( i_rIdentifier.pData, rtl_getUriCharClass( rtl_UriCharClassUricNoSlash ), - rtl_UriEncodeIgnoreEscapes, RTL_TEXTENCODING_UTF8, &sEncoded.pData ); - return sEncoded; + return ::rtl::Uri::encode( i_rIdentifier, rtl_UriCharClassRegName, rtl_UriEncodeIgnoreEscapes, + RTL_TEXTENCODING_UTF8 ); } //------------------------------------------------------------------------------------------------------------------ ::rtl::OUString Content::decodeIdentifier( const ::rtl::OUString& i_rIdentifier ) { - ::rtl::OUString sDecoded; - rtl_uriDecode( i_rIdentifier.pData, rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8, &sDecoded.pData ); - return sDecoded; + return ::rtl::Uri::decode( i_rIdentifier, rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8 ); } //------------------------------------------------------------------------------------------------------------------ |