summaryrefslogtreecommitdiff
path: root/include/tools/urlobj.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-04-26 14:03:48 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-04-27 20:31:14 +0200
commit48e279c6748bf023fba12fdc3f4cee402f611c6e (patch)
tree2e1b3a20ccd71f47a66938f882c1fe9d5e947bb4 /include/tools/urlobj.hxx
parentf3665d2a42b39814764f3eb9e20498b8a4be1d00 (diff)
use string_view in INetURLObject::decode
Change-Id: I10e04970ceac33c9c3fbfd0182dd2140e06cb80b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114658 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/tools/urlobj.hxx')
-rw-r--r--include/tools/urlobj.hxx19
1 files changed, 3 insertions, 16 deletions
diff --git a/include/tools/urlobj.hxx b/include/tools/urlobj.hxx
index 1fb5f4e86aea..e323e5049987 100644
--- a/include/tools/urlobj.hxx
+++ b/include/tools/urlobj.hxx
@@ -839,12 +839,7 @@ public:
@return The text, decoded according to the given mechanism and
charset (escape sequences replaced by 'raw' characters).
*/
- static inline OUString decode(OUString const & rText,
- DecodeMechanism eMechanism,
- rtl_TextEncoding eCharset
- = RTL_TEXTENCODING_UTF8);
-
- static inline OUString decode(OUStringBuffer const & rText,
+ static inline OUString decode(std::u16string_view rText,
DecodeMechanism eMechanism,
rtl_TextEncoding eCharset
= RTL_TEXTENCODING_UTF8);
@@ -1298,19 +1293,11 @@ inline OUString INetURLObject::encode(OUString const & rText, Part ePart,
}
// static
-inline OUString INetURLObject::decode(OUString const & rText,
- DecodeMechanism eMechanism,
- rtl_TextEncoding eCharset)
-{
- return decode(rText.getStr(), rText.getStr() + rText.getLength(),
- eMechanism, eCharset);
-}
-
-inline OUString INetURLObject::decode(OUStringBuffer const & rText,
+inline OUString INetURLObject::decode(std::u16string_view rText,
DecodeMechanism eMechanism,
rtl_TextEncoding eCharset)
{
- return decode(rText.getStr(), rText.getStr() + rText.getLength(),
+ return decode(rText.data(), rText.data() + rText.size(),
eMechanism, eCharset);
}