From dac7be50cff94e0c34cdca5ac7e35c19685c40c1 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 9 Jan 2019 12:12:13 +0100 Subject: o3tl::string_view -> std::string_view (in configmgr) Change-Id: I64131f59ce859a252baa9c84291d262bcb04fffd Reviewed-on: https://gerrit.libreoffice.org/66012 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- include/rtl/string.hxx | 7 +++++++ include/rtl/ustring.hxx | 8 ++++++++ 2 files changed, 15 insertions(+) (limited to 'include/rtl') diff --git a/include/rtl/string.hxx b/include/rtl/string.hxx index cac60d34d8e6..b26aa23e556a 100644 --- a/include/rtl/string.hxx +++ b/include/rtl/string.hxx @@ -28,6 +28,10 @@ #include #include +#if defined LIBO_INTERNAL_ONLY +#include +#endif + #include "rtl/textenc.h" #include "rtl/string.h" #include "rtl/stringutils.hxx" @@ -1787,6 +1791,9 @@ public: return number(d); } +#if defined LIBO_INTERNAL_ONLY + operator std::string_view() const { return {getStr(), sal_uInt32(getLength())}; } +#endif }; /* ======================================================================= */ diff --git a/include/rtl/ustring.hxx b/include/rtl/ustring.hxx index 5f738cfaa5fc..bf63efc71723 100644 --- a/include/rtl/ustring.hxx +++ b/include/rtl/ustring.hxx @@ -27,6 +27,10 @@ #include #include +#if defined LIBO_INTERNAL_ONLY +#include +#endif + #include "rtl/ustring.h" #include "rtl/string.hxx" #include "rtl/stringutils.hxx" @@ -3544,6 +3548,10 @@ public: return OUString( pNew, SAL_NO_ACQUIRE ); } +#if defined LIBO_INTERNAL_ONLY + operator std::u16string_view() const { return {getStr(), sal_uInt32(getLength())}; } +#endif + private: OUString & internalAppend( rtl_uString* pOtherData ) { -- cgit