[Libreoffice-commits] .: Branch 'libreoffice-3-5' - 2 commits - fpicker/source

Lubos Lunak llunak at kemper.freedesktop.org
Thu Dec 22 10:35:16 PST 2011


 fpicker/source/unx/kde4/KDE4FilePicker.cxx |   11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

New commits:
commit fa5db258cf799de392301986e22841ed21b49233
Author: Luboš Luňák <l.lunak at suse.cz>
Date:   Thu Dec 22 19:34:40 2011 +0100

    "*.*" is not "all files" (bnc#738021)
    
    Backport at least the fpicker workaround, I've missed the UI freeze.

diff --git a/fpicker/source/unx/kde4/KDE4FilePicker.cxx b/fpicker/source/unx/kde4/KDE4FilePicker.cxx
index 4027e3c..f282645 100644
--- a/fpicker/source/unx/kde4/KDE4FilePicker.cxx
+++ b/fpicker/source/unx/kde4/KDE4FilePicker.cxx
@@ -306,6 +306,9 @@ void SAL_CALL KDE4FilePicker::appendFilter( const ::rtl::OUString &title, const
     // openoffice gives us filters separated by ';' qt dialogs just want space separated
     f.replace(";", " ");
 
+    // make sure "*.*" is not used as "all files"
+    f.replace("*.*", "*");
+
     _filter.append(QString("%1|%2").arg(f).arg(t));
 }
 
commit 3a715c753a7c6bd743f18e3116d9f4b02f725860
Author: Luboš Luňák <l.lunak at suse.cz>
Date:   Thu Dec 22 19:00:19 2011 +0100

    make KDE4FilePicker::appendFilterGroup() simply use appendFilter()

diff --git a/fpicker/source/unx/kde4/KDE4FilePicker.cxx b/fpicker/source/unx/kde4/KDE4FilePicker.cxx
index 562a2d2..4027e3c 100644
--- a/fpicker/source/unx/kde4/KDE4FilePicker.cxx
+++ b/fpicker/source/unx/kde4/KDE4FilePicker.cxx
@@ -343,13 +343,7 @@ void SAL_CALL KDE4FilePicker::appendFilterGroup( const rtl::OUString& , const un
     for (sal_uInt16 i = 0; i < length; ++i)
     {
         beans::StringPair aPair = filters[i];
-
-        _filter.append(QString("%1|%2").arg(
-            toQString(aPair.Second).replace(";", " ")).arg(
-            toQString(aPair.First).replace("/","\\/")));
-
-        if (i != length - 1)
-            _filter.append('\n');
+        appendFilter( aPair.First, aPair.Second );
     }
 }
 


More information about the Libreoffice-commits mailing list