diff options
Diffstat (limited to 'cppu/source/uno/cascade_mapping.cxx')
-rw-r--r-- | cppu/source/uno/cascade_mapping.cxx | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/cppu/source/uno/cascade_mapping.cxx b/cppu/source/uno/cascade_mapping.cxx index e19173bcff4c..f03d88e529d6 100644 --- a/cppu/source/uno/cascade_mapping.cxx +++ b/cppu/source/uno/cascade_mapping.cxx @@ -23,6 +23,7 @@ #include <uno/lbnames.h> #include <uno/mapping.hxx> #include <uno/dispatcher.h> +#include <o3tl/string_view.hxx> #include <cppu/EnvDcp.hxx> @@ -155,29 +156,29 @@ extern "C" { static void s_MediatorMapping_free(uno_Mapping * pMapping) }} -static OUString getPrefix(OUString const & str1, OUString const & str2) +static OUString getPrefix(std::u16string_view str1, std::u16string_view str2) { sal_Int32 nIndex1 = 0; sal_Int32 nIndex2 = 0; sal_Int32 sim = 0; - OUString token1; - OUString token2; + std::u16string_view token1; + std::u16string_view token2; do { - token1 = str1.getToken(0, ':', nIndex1); - token2 = str2.getToken(0, ':', nIndex2); + token1 = o3tl::getToken(str1, 0, ':', nIndex1); + token2 = o3tl::getToken(str2, 0, ':', nIndex2); if (token1 == token2) - sim += token1.getLength() + 1; + sim += token1.size() + 1; } while(nIndex1 == nIndex2 && nIndex1 >= 0 && token1 == token2); OUString result; if (sim) - result = str1.copy(0, sim - 1); + result = str1.substr(0, sim - 1); return result; } |