summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorAndreas Heinisch <andreas.heinisch@yahoo.de>2021-07-01 12:16:40 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2021-07-07 21:58:09 +0200
commit4dc0c43e29e9825aab731edd77c3fc1cb7566639 (patch)
treecccb0f2a0489957e57233de095fb877f7ba06f49 /cui
parent1ac29daf64273814227e81e8c3f4e519e0809e57 (diff)
tdf#141334 - Only show the last name of the filename without its extension
In the bullets and numbering dialog under customize, don't show the filename including its extension in the context menu of the gallery. Change-Id: Ia3d4277f5b074be78244f0599883f36385a40c8a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118218 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de> (cherry picked from commit a646ba6e5ed042756feac16b91739203793f1742) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118414 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/tabpages/numpages.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 32063c6f1c5d..a0d360622d0b 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -1884,8 +1884,12 @@ IMPL_LINK_NOARG(SvxNumOptionsTabPage, PopupActivateHdl_Impl, weld::Toggleable&,
sGrfName = grfName;
OUString sItemId = "gallery" + OUString::number(i);
INetURLObject aObj(sGrfName);
- if(aObj.GetProtocol() == INetProtocol::File)
- sGrfName = aObj.PathToFileName();
+ if (aObj.GetProtocol() == INetProtocol::File)
+ {
+ // tdf#141334 - only show the last name of the filename without its extension
+ aObj.removeExtension();
+ sGrfName = aObj.GetLastName(INetURLObject::DecodeMechanism::Unambiguous);
+ }
if(GalleryExplorer::GetGraphicObj( GALLERY_THEME_BULLETS, i, &aGraphic))
{
BitmapEx aBitmap(aGraphic.GetBitmapEx());