summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorGülşah Köse <gulsah.kose@collabora.com>2019-07-30 23:26:27 +0300
committerXisco Faulí <xiscofauli@libreoffice.org>2019-08-01 11:13:31 +0200
commit485faf158a904baa07206313e0c234e5421f9739 (patch)
tree91ecf345632eedd0bc61d4011ec28658c062a5e8 /sd
parentc1445671d1f43605ba5e4dc59d11307477fc7062 (diff)
tdf#126511 Show only icon names instead of full path.
This commit shows only icon names insead of the full path of icon on Bullet and Numbering dialog graphic case on Impress. Change-Id: Iba72bf7c413993bad88add669035765aae521a59 Reviewed-on: https://gerrit.libreoffice.org/76716 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com> (cherry picked from commit 7c973ea77438273deda909ce0563d8c5c37dad00) Reviewed-on: https://gerrit.libreoffice.org/76745 Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/dlg/BulletAndPositionDlg.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/sd/source/ui/dlg/BulletAndPositionDlg.cxx b/sd/source/ui/dlg/BulletAndPositionDlg.cxx
index 034babf11666..c09c6a79987f 100644
--- a/sd/source/ui/dlg/BulletAndPositionDlg.cxx
+++ b/sd/source/ui/dlg/BulletAndPositionDlg.cxx
@@ -970,7 +970,16 @@ IMPL_LINK_NOARG(SvxBulletAndPositionDlg, PopupActivateHdl_Impl, weld::ToggleButt
}
pVD->SetOutputSizePixel(aBitmap.GetSizePixel(), false);
pVD->DrawBitmapEx(Point(), aBitmap);
- m_xGalleryMenu->append(sItemId, sGrfName, *pVD);
+
+ // We want to show only icon names not full path.
+ // That part finds the last index of the slash and
+ // gets the part before .gif
+
+ sal_Int32 last = sGrfName.lastIndexOf("/");
+ last++;
+ OUString sIconName = sGrfName.getToken(0, '.', last);
+
+ m_xGalleryMenu->append(sItemId, sIconName, *pVD);
}
else
{