sd/source/ui/unoidl/unopage.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit bbf65fd839a757b0f446c1cffb7938f82a6a1e67
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Tue Dec 22 19:56:56 2020 +0100
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Wed Dec 23 07:31:29 2020 +0100

    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 <sberg...@redhat.com>

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();
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to