summaryrefslogtreecommitdiff
path: root/sd/source/ui/docshell/docshel2.cxx
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2019-02-10 17:02:40 +0100
committerMatteo Casalin <matteo.casalin@yahoo.com>2019-02-17 16:51:26 +0100
commit59c73b8da8400f9504fd4fa37c10c09c9397ff59 (patch)
treeaaca336675180f26bc1e9e7cae14c79e3f212101 /sd/source/ui/docshell/docshel2.cxx
parentfcf24fa1ae47b2f132c992fe186b4ab38434f406 (diff)
Use indexed getToken()
Change-Id: I28d1a4f5a32bbe6e2278e9694c85d9a72dde8a23 Reviewed-on: https://gerrit.libreoffice.org/67650 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
Diffstat (limited to 'sd/source/ui/docshell/docshel2.cxx')
-rw-r--r--sd/source/ui/docshell/docshel2.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sd/source/ui/docshell/docshel2.cxx b/sd/source/ui/docshell/docshel2.cxx
index f59499825d0d..224c7f2aeb50 100644
--- a/sd/source/ui/docshell/docshel2.cxx
+++ b/sd/source/ui/docshell/docshel2.cxx
@@ -318,7 +318,8 @@ bool DrawDocShell::IsNewPageNameValid( OUString & rInOutPageName, bool bResetStr
if (rInOutPageName.startsWith(aStrPage) &&
rInOutPageName.getLength() > aStrPage.getLength())
{
- OUString sRemainder = rInOutPageName.getToken(1, ' ');
+ sal_Int32 nIdx{ aStrPage.getLength() };
+ OUString sRemainder = rInOutPageName.getToken(0, ' ', nIdx);
if (sRemainder[0] >= '0' && sRemainder[0] <= '9')
{
// check for arabic numbering