summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-04-07 20:54:55 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-04-08 13:18:41 +0200
commit36e0e88b28e818faf25b8e32cc8c4dc444b8a0be (patch)
treeb7b5c8e13b6e05f871b01a3d0bf68c1d1329ef12 /svx
parentcf5bbe3fce4a250ab25998053965bdc604c6114e (diff)
use more subView when converting to Int32
Change-Id: I54e3ddf79ba793fd4328bf8bda7f949b65349651 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132693 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/xoutdev/xattr.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx
index e28c85b4a70b..f5a0d4161efb 100644
--- a/svx/source/xoutdev/xattr.cxx
+++ b/svx/source/xoutdev/xattr.cxx
@@ -32,6 +32,7 @@
#include <com/sun/star/beans/PropertyValue.hpp>
#include <comphelper/propertyvalue.hxx>
+#include <comphelper/string.hxx>
#include <o3tl/any.hxx>
#include <svl/itempool.hxx>
#include <editeng/memberids.h>
@@ -212,7 +213,7 @@ OUString NameOrIndex::CheckNamedItem( const NameOrIndex* pCheckItem, const sal_u
const OUString& aEntryName = pEntry->GetName();
if(aEntryName.getLength() >= aUser.getLength())
{
- sal_Int32 nThisIndex = aEntryName.copy( aUser.getLength() ).toInt32();
+ sal_Int32 nThisIndex = comphelper::string::toInt32(aEntryName.subView( aUser.getLength() ));
if( nThisIndex >= nUserIndex )
nUserIndex = nThisIndex + 1;
}