summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sd/source/ui/dlg/BulletAndPositionDlg.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/sd/source/ui/dlg/BulletAndPositionDlg.cxx b/sd/source/ui/dlg/BulletAndPositionDlg.cxx
index f6eb2d709c76..261ab3cef9d4 100644
--- a/sd/source/ui/dlg/BulletAndPositionDlg.cxx
+++ b/sd/source/ui/dlg/BulletAndPositionDlg.cxx
@@ -978,12 +978,9 @@ IMPL_LINK_NOARG(SvxBulletAndPositionDlg, PopupActivateHdl_Impl, weld::ToggleButt
pVD->DrawBitmapEx(Point(), aBitmap);
// 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);
+ aObj.removeExtension();
+ OUString sIconName
+ = aObj.GetLastName(INetURLObject::DecodeMechanism::WithCharset);
m_xGalleryMenu->append(sItemId, sIconName, *pVD);
}