summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2019-02-10 16:36:47 +0100
committerMatteo Casalin <matteo.casalin@yahoo.com>2019-02-17 16:56:28 +0100
commited05ab0005d68c91c1c6d3a16dd863e9b86628ea (patch)
treeac7840b474ee0a55906211fa6e94ac71fdecfa09 /sd
parent59c73b8da8400f9504fd4fa37c10c09c9397ff59 (diff)
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@yahoo.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/func/fudraw.cxx10
1 files changed, 7 insertions, 3 deletions
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;