summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8/ww8par5.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-04-10 20:17:54 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-04-11 14:45:38 +0200
commit85c2ed8dc790689ce69ff0a08ff5a4de98df54b7 (patch)
treef7d7f6fce51d1a4443608971da7d9c42b1201fa3 /sw/source/filter/ww8/ww8par5.cxx
parent117688bd3f51a7a50b2620aa7dcc0c065f29d402 (diff)
loplugin:stringview add check for getToken().toInt32
where we can convert that to o3tl::toInt32(o3tl::getToken( and avoid the heap allocation of a temporary string Change-Id: Ib11c19c6e6cdc0de3e551affd3578d181e292de4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132810 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/filter/ww8/ww8par5.cxx')
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index 661a0d549691..cecad8f6d370 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -2922,12 +2922,12 @@ static void lcl_toxMatchTSwitch(SwWW8ImplReader const & rReader, SwTOXBase& rBas
{
sal_Int32 nOldIndex=nIndex;
sal_uInt16 nLevel = o3tl::narrowing<sal_uInt16>(
- sParams.getToken(0, ';', nIndex).toInt32());
+ o3tl::toInt32(o3tl::getToken(sParams, 0, ';', nIndex)));
if( -1 == nIndex )
{
nIndex = nOldIndex;
nLevel = o3tl::narrowing<sal_uInt16>(
- sParams.getToken(0, ',', nIndex).toInt32());
+ o3tl::toInt32(o3tl::getToken(sParams, 0, ',', nIndex)));
}
if( (0 < nLevel) && (MAXLEVEL >= nLevel) )