[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - cui/source

Andreas Heinisch (via logerrit) logerrit at kemper.freedesktop.org
Wed Jul 7 20:01:35 UTC 2021


 cui/source/tabpages/numpages.cxx |   16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

New commits:
commit ec29cffe003f987a4d329b9467efb30bde39c66b
Author:     Andreas Heinisch <andreas.heinisch at yahoo.de>
AuthorDate: Thu Jul 1 11:59:35 2021 +0200
Commit:     Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Wed Jul 7 22:01:02 2021 +0200

    tdf#114070 - Only show the last name of the filename without its extension
    
    In the bullets and numbering dialog, don't show the filename including
    its extension in the tooltip of the image.
    
    Change-Id: I2a37f79e8c57d3126e6607f01756771857440faa
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118215
    Tested-by: Jenkins
    Reviewed-by: Andreas Heinisch <andreas.heinisch at yahoo.de>
    (cherry picked from commit 226f7e2ab96fce33a2705ad91ef0d539a6bad7b3)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118415
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>

diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index a0d360622d0b..47542d147853 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -746,8 +746,12 @@ SvxBitmapPickTabPage::SvxBitmapPickTabPage(weld::Container* pPage, weld::DialogC
         m_xExamplesVS->InsertItem( i + 1, i);
 
         INetURLObject aObj(grfName);
-        if(aObj.GetProtocol() == INetProtocol::File)
-            grfName = aObj.PathToFileName();
+        if (aObj.GetProtocol() == INetProtocol::File)
+        {
+            // tdf#114070 - only show the last name of the filename without its extension
+            aObj.removeExtension();
+            grfName = aObj.GetLastName(INetURLObject::DecodeMechanism::Unambiguous);
+        }
 
         m_xExamplesVS->SetItemText( i + 1, grfName );
         ++i;
@@ -981,8 +985,12 @@ IMPL_LINK_NOARG(SvxBitmapPickTabPage, ClickAddBrowseHdl_Impl, weld::Button&, voi
     {
         m_xExamplesVS->InsertItem( i + 1, i);
         INetURLObject aObj(grfName);
-        if(aObj.GetProtocol() == INetProtocol::File)
-            grfName = aObj.PathToFileName();
+        if (aObj.GetProtocol() == INetProtocol::File)
+        {
+            // tdf#114070 - only show the last name of the filename without its extension
+            aObj.removeExtension();
+            grfName = aObj.GetLastName(INetURLObject::DecodeMechanism::Unambiguous);
+        }
         m_xExamplesVS->SetItemText( i + 1, grfName );
         ++i;
     }


More information about the Libreoffice-commits mailing list