[Libreoffice-commits] core.git: sfx2/source

Akshay Deep akshaydeepiitr at gmail.com
Mon Jun 20 10:18:14 UTC 2016


 sfx2/source/control/recentdocsview.cxx |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 487a6b491f8a514541eccf3aef20277493c66744
Author: Akshay Deep <akshaydeepiitr at gmail.com>
Date:   Sun Jun 19 11:13:04 2016 +0530

    tdf#79889 Make Recent Docs thumbnail titles consistent with recent files menu
    
    Change-Id: I839039e68c766480458a5956cf1261819c0ea005
    Reviewed-on: https://gerrit.libreoffice.org/26465
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>

diff --git a/sfx2/source/control/recentdocsview.cxx b/sfx2/source/control/recentdocsview.cxx
index abfc888..d303801 100644
--- a/sfx2/source/control/recentdocsview.cxx
+++ b/sfx2/source/control/recentdocsview.cxx
@@ -180,8 +180,6 @@ void RecentDocsView::Reload()
 
             if (rRecentEntry[j].Name == "URL")
                 a >>= aURL;
-            else if (rRecentEntry[j].Name == "Title")
-                a >>= aTitle;
             //fdo#74834: only load thumbnail if the corresponding option is not disabled in the configuration
             else if (rRecentEntry[j].Name == "Thumbnail" && officecfg::Office::Common::History::RecentDocsThumbnail::get())
             {
@@ -199,6 +197,13 @@ void RecentDocsView::Reload()
             }
         }
 
+        if(!aURL.isEmpty())
+        {
+            INetURLObject  aURLObj( aURL );
+            //Remove extension from url's last segment and use it as title
+            aTitle = aURLObj.GetBase(); //DECODE_WITH_CHARSET
+        }
+
         if (isAcceptedFile(aURL))
         {
             insertItem(aURL, aTitle, aThumbnail, i+1);


More information about the Libreoffice-commits mailing list