summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-12-22 19:56:56 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-12-23 07:31:29 +0100
commitbbf65fd839a757b0f446c1cffb7938f82a6a1e67 (patch)
treecb7bb2a5da90666b86e71e5c069d916f725b9b96 /sd
parent2fa55357223595a98c0dbc8bdb917b77a170da80 (diff)
Use optional rest argument of OUString::startsWith
Change-Id: Id8f9e7464c2c35a1a5ffadbc4c9c5d1f0d780923 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108214 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/unoidl/unopage.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index 54a779ade127..b082556d17b6 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -2226,10 +2226,10 @@ void SAL_CALL SdDrawPage::setName( const OUString& rName )
return;
// check if this is the default 'page1234' name
- if(aName.startsWith( sEmptyPageName ))
+ OUString aNumber;
+ if(aName.startsWith( sEmptyPageName, &aNumber ))
{
- // ok, it maybe is, first get the number part after 'page'
- OUString aNumber( aName.copy( sizeof( sEmptyPageName ) - 1 ) );
+ // ok, it maybe is, aNumber is the number part after 'page'
// create the page number
sal_Int32 nPageNumber = aNumber.toInt32();