diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-12-22 19:56:56 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-12-23 07:31:29 +0100 |
commit | bbf65fd839a757b0f446c1cffb7938f82a6a1e67 (patch) | |
tree | cb7bb2a5da90666b86e71e5c069d916f725b9b96 /sd/source | |
parent | 2fa55357223595a98c0dbc8bdb917b77a170da80 (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/source')
-rw-r--r-- | sd/source/ui/unoidl/unopage.cxx | 6 |
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(); |