[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - fpicker/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Sun May 3 17:01:16 UTC 2020


 fpicker/source/office/fileview.cxx |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 15eb7d3197e290efd3f2c43973c033dc754416c2
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun May 3 15:44:55 2020 +0100
Commit:     Adolfo Jayme Barrientos <fitojb at ubuntu.com>
CommitDate: Sun May 3 19:00:44 2020 +0200

    Resolves: tdf#131898 we only want the text from column 0
    
    in the fallback file picker
    
    Change-Id: I60527661f83fde135145249a14b4f3b35840fff8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93145
    Tested-by: Jenkins
    Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>

diff --git a/fpicker/source/office/fileview.cxx b/fpicker/source/office/fileview.cxx
index f74bd3aec6d2..5b65eb1295cf 100644
--- a/fpicker/source/office/fileview.cxx
+++ b/fpicker/source/office/fileview.cxx
@@ -159,7 +159,12 @@ public:
     bool get_iter_first(weld::TreeIter& rIter) const { return mxTreeView->get_iter_first(rIter); }
     bool get_selected(weld::TreeIter* pIter) const { return mxTreeView->get_selected(pIter); }
 
-    OUString get_selected_text() const { return mxTreeView->get_selected_text(); }
+    OUString get_selected_text() const
+    {
+        // tdf#131898 only care about column 0
+        int nIndex = mxTreeView->get_selected_index();
+        return nIndex != -1 ? mxTreeView->get_text(nIndex, 0) : OUString();
+    }
 
     void unselect_all() { mxTreeView->unselect_all(); }
 


More information about the Libreoffice-commits mailing list