summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-04-07 22:36:26 +0200
committerFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-04-07 22:36:26 +0200
commitf61e0685c1a41e284412822fdd8f038f1ecd17af (patch)
tree3054f8ac2cbef9688e2f64cc85690c5c238085a4 /ucb
parentf140e09e24baeb67b25cf0cfc0d7b143f18a78be (diff)
slidecopy: fixed encoding/decoding of extension identifiers as part of an URL (thanks SB)
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/ucp/ext/ucpext_content.cxx12
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 );
}
//------------------------------------------------------------------------------------------------------------------