summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cppu/source/uno/EnvStack.cxx4
-rw-r--r--cppu/source/uno/cascade_mapping.cxx4
-rw-r--r--cppuhelper/source/typemanager.cxx8
-rw-r--r--cppuhelper/source/typemanager.hxx2
4 files changed, 9 insertions, 9 deletions
diff --git a/cppu/source/uno/EnvStack.cxx b/cppu/source/uno/EnvStack.cxx
index 880b922886d1..2daf56a21a79 100644
--- a/cppu/source/uno/EnvStack.cxx
+++ b/cppu/source/uno/EnvStack.cxx
@@ -141,7 +141,7 @@ extern "C" void SAL_CALL uno_getCurrentEnvironment(uno_Environment ** ppEnv, rtl
}
}
-static OUString s_getPrefix(OUString const & str1, std::u16string_view str2)
+static OUString s_getPrefix(std::u16string_view str1, std::u16string_view str2)
{
sal_Int32 nIndex1 = 0;
sal_Int32 nIndex2 = 0;
@@ -163,7 +163,7 @@ static OUString s_getPrefix(OUString const & str1, std::u16string_view str2)
OUString result;
if (sim)
- result = str1.copy(0, sim - 1);
+ result = str1.substr(0, sim - 1);
return result;
}
diff --git a/cppu/source/uno/cascade_mapping.cxx b/cppu/source/uno/cascade_mapping.cxx
index dbfbfc6c4dba..f03d88e529d6 100644
--- a/cppu/source/uno/cascade_mapping.cxx
+++ b/cppu/source/uno/cascade_mapping.cxx
@@ -156,7 +156,7 @@ extern "C" { static void s_MediatorMapping_free(uno_Mapping * pMapping)
}}
-static OUString getPrefix(OUString const & str1, std::u16string_view str2)
+static OUString getPrefix(std::u16string_view str1, std::u16string_view str2)
{
sal_Int32 nIndex1 = 0;
sal_Int32 nIndex2 = 0;
@@ -178,7 +178,7 @@ static OUString getPrefix(OUString const & str1, std::u16string_view str2)
OUString result;
if (sim)
- result = str1.copy(0, sim - 1);
+ result = str1.substr(0, sim - 1);
return result;
}
diff --git a/cppuhelper/source/typemanager.cxx b/cppuhelper/source/typemanager.cxx
index 28ef85189f29..44105df033fa 100644
--- a/cppuhelper/source/typemanager.cxx
+++ b/cppuhelper/source/typemanager.cxx
@@ -2149,15 +2149,15 @@ css::uno::Any cppuhelper::TypeManager::getInstantiatedStruct(
}
css::uno::Any cppuhelper::TypeManager::getInterfaceMember(
- OUString const & name, sal_Int32 separator)
+ std::u16string_view name, sal_Int32 separator)
{
- assert(name.indexOf("::") == separator && separator != -1);
+ assert(static_cast<sal_Int32>(name.find(u"::")) == separator && separator != -1);
css::uno::Reference< css::reflection::XInterfaceTypeDescription2 > ifc(
- resolveTypedefs(find(name.copy(0, separator))), css::uno::UNO_QUERY);
+ resolveTypedefs(find(OUString(name.substr(0, separator)))), css::uno::UNO_QUERY);
if (!ifc.is()) {
return css::uno::Any();
}
- OUString member(name.copy(separator + std::strlen("::")));
+ std::u16string_view member = name.substr(separator + std::strlen("::"));
const css::uno::Sequence<
css::uno::Reference<
css::reflection::XInterfaceMemberTypeDescription > > mems(
diff --git a/cppuhelper/source/typemanager.hxx b/cppuhelper/source/typemanager.hxx
index 1ee264bf16ff..28c193191267 100644
--- a/cppuhelper/source/typemanager.hxx
+++ b/cppuhelper/source/typemanager.hxx
@@ -100,7 +100,7 @@ private:
OUString const & name, sal_Int32 separator);
css::uno::Any getInterfaceMember(
- OUString const & name, sal_Int32 separator);
+ std::u16string_view name, sal_Int32 separator);
css::uno::Any getNamed(
OUString const & name,