[Libreoffice-commits] .: Branch 'libreoffice-3-3' - fpicker/source
Cédric Bosdonnat
cbosdo at kemper.freedesktop.org
Wed Nov 10 04:53:10 PST 2010
fpicker/source/unx/gnome/SalGtkFilePicker.cxx | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
New commits:
commit 46caf63224a8d3fa79383d1209503376b0918da8
Author: Muthu Subramanian K <sumuthu at novell.com>
Date: Wed Nov 10 13:41:59 2010 +0100
i#112411: Fixed Gnome filepicker filter selection
diff --git a/fpicker/source/unx/gnome/SalGtkFilePicker.cxx b/fpicker/source/unx/gnome/SalGtkFilePicker.cxx
index fff90f7..a417f81 100644
--- a/fpicker/source/unx/gnome/SalGtkFilePicker.cxx
+++ b/fpicker/source/unx/gnome/SalGtkFilePicker.cxx
@@ -909,6 +909,9 @@ uno::Sequence<rtl::OUString> SAL_CALL SalGtkFilePicker::getSelectedFiles() throw
{
static const OUString aStarDot = OUString::createFromAscii( "*." );
+ ::rtl::OUString aNewFilter;
+ ::rtl::OUString aOldFilter = getCurrentFilter();
+ sal_Bool bChangeFilter = sal_True;
for ( FilterList::iterator aListIter = m_pFilterList->begin();
aListIter != m_pFilterList->end();
++aListIter
@@ -916,11 +919,17 @@ uno::Sequence<rtl::OUString> SAL_CALL SalGtkFilePicker::getSelectedFiles() throw
{
if( aListIter->getFilter().indexOf( aStarDot+sExtension ) >= 0 )
{
- setCurrentFilter( aListIter->getTitle() );
+ if( !aNewFilter.getLength() )
+ aNewFilter = aListIter->getTitle();
+
+ if( aOldFilter == aListIter->getTitle() )
+ bChangeFilter = sal_False;
+
bExtensionTypedIn = true;
- break;
}
}
+ if( bChangeFilter && bExtensionTypedIn )
+ setCurrentFilter( aNewFilter );
}
}
More information about the Libreoffice-commits
mailing list