vcl113: #i112411# fix output format handling (thanks muthusuba!)

This commit is contained in:
Philipp Lohmann [pl]
2010-07-13 13:30:24 +02:00
parent 5d610c1538
commit 9a7bec4a04

View File

@@ -935,6 +935,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
@@ -942,11 +945,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 )
setCurrentFilter( aNewFilter );
}
}