[Libreoffice-commits] core.git: sd/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sun Feb 17 15:56:50 UTC 2019


 sd/source/ui/func/fudraw.cxx |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

New commits:
commit ed05ab0005d68c91c1c6d3a16dd863e9b86628ea
Author:     Matteo Casalin <matteo.casalin at yahoo.com>
AuthorDate: Sun Feb 10 16:36:47 2019 +0100
Commit:     Matteo Casalin <matteo.casalin at yahoo.com>
CommitDate: Sun Feb 17 16:56:28 2019 +0100

    Precalculate all needed tokens and use indexing
    
    Change-Id: If83e1b89e0116f0b20549daf839bd24621c926be
    Reviewed-on: https://gerrit.libreoffice.org/67647
    Tested-by: Jenkins
    Reviewed-by: Matteo Casalin <matteo.casalin at yahoo.com>

diff --git a/sd/source/ui/func/fudraw.cxx b/sd/source/ui/func/fudraw.cxx
index 223ee7e6e482..77a6a14010b7 100644
--- a/sd/source/ui/func/fudraw.cxx
+++ b/sd/source/ui/func/fudraw.cxx
@@ -900,11 +900,15 @@ bool FuDraw::SetHelpText(SdrObject* pObj, const Point& rPosPixel, const SdrViewE
                 else
                 {
                     OUString sBookmark( pInfo->GetBookmark() );
-                    aHelpText += sBookmark.getToken( 2, '.' );
+                    sal_Int32 nIdx{ 0 };
+                    const OUString s0{ sBookmark.getToken( 0, '.', nIdx ) };
+                    const OUString s1{ sBookmark.getToken( 0, '.', nIdx ) };
+                    const OUString s2{ sBookmark.getToken( 0, '.', nIdx ) };
+                    aHelpText += s2;
                     aHelpText += ".";
-                    aHelpText += sBookmark.getToken( 1, '.' );
+                    aHelpText += s1;
                     aHelpText += ".";
-                    aHelpText += sBookmark.getToken( 0, '.' );
+                    aHelpText += s0;
                 }
             }
             break;


More information about the Libreoffice-commits mailing list