summaryrefslogtreecommitdiff
path: root/cppu
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-04-21 13:56:39 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-04-21 15:29:33 +0200
commitcdfd4d6c9a8cebe55a85624aaaff2664f270b247 (patch)
treeb6057c57f81ee36ec4ef986d57e16b52402bcee6 /cppu
parent7d7890871085a427b0844c208a76158341890219 (diff)
use more string_view in cppu
Change-Id: Id6b33eb39917ce7b805ea4a5d713d5d78aaa93ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133257 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cppu')
-rw-r--r--cppu/source/uno/EnvStack.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/cppu/source/uno/EnvStack.cxx b/cppu/source/uno/EnvStack.cxx
index 2daf56a21a79..34fea77f46bd 100644
--- a/cppu/source/uno/EnvStack.cxx
+++ b/cppu/source/uno/EnvStack.cxx
@@ -172,7 +172,7 @@ static int s_getNextEnv(uno_Environment ** ppEnv, uno_Environment * pCurrEnv, un
{
int res = 0;
- OUString nextPurpose;
+ std::u16string_view nextPurpose;
OUString currPurpose;
if (pCurrEnv)
@@ -186,7 +186,7 @@ static int s_getNextEnv(uno_Environment ** ppEnv, uno_Environment * pCurrEnv, un
if (currPurpose.getLength() > intermPurpose.getLength())
{
sal_Int32 idx = currPurpose.lastIndexOf(':');
- nextPurpose = currPurpose.copy(0, idx);
+ nextPurpose = currPurpose.subView(0, idx);
res = -1;
}
@@ -197,14 +197,14 @@ static int s_getNextEnv(uno_Environment ** ppEnv, uno_Environment * pCurrEnv, un
nextPurpose = targetPurpose;
else
- nextPurpose = targetPurpose.copy(0, idx);
+ nextPurpose = targetPurpose.subView(0, idx);
res = 1;
}
- if (!nextPurpose.isEmpty())
+ if (!nextPurpose.empty())
{
- OUString next_envDcp = UNO_LB_UNO + nextPurpose;
+ OUString next_envDcp = OUString::Concat(UNO_LB_UNO) + nextPurpose;
uno_getEnvironment(ppEnv, next_envDcp.pData, nullptr);
}
else