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>
This commit is contained in:
parent
7d78908710
commit
cdfd4d6c9a
1 changed files with 5 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue