diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2009-04-02 17:04:27 +0000 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2009-04-02 17:04:27 +0000 |
commit | 5a19eed5c17a594779e6085d212f68bd1bf3c7c9 (patch) | |
tree | 9d0fc95ca1ac74a0dfef1652fafee9e4149e4b1f /sdext | |
parent | 60b884d262229438377396d1eee614f93a3fd2fd (diff) |
CWS-TOOLING: integrate CWS minimizer01
2009-03-30 11:06:17 +0200 sj r270203 : #i100590# fixed crash
Diffstat (limited to 'sdext')
-rw-r--r-- | sdext/source/minimizer/fileopendialog.cxx | 54 |
1 files changed, 30 insertions, 24 deletions
diff --git a/sdext/source/minimizer/fileopendialog.cxx b/sdext/source/minimizer/fileopendialog.cxx index 0461bd86cdc8..a20d6900964e 100644 --- a/sdext/source/minimizer/fileopendialog.cxx +++ b/sdext/source/minimizer/fileopendialog.cxx @@ -87,37 +87,43 @@ FileOpenDialog::FileOpenDialog( const Reference< XComponentContext >& rxMSF ) : Sequence< OUString > aFilterList( xFilters->getElementNames() ); for ( int i = 0; i < aFilterList.getLength(); i++ ) { - Sequence< PropertyValue > aFilterProperties; - if ( xFilters->getByName( aFilterList[ i ] ) >>= aFilterProperties ) + try { - FilterEntry aFilterEntry; - sal_Bool bImpressFilter = sal_False; - for ( int j = 0; j < aFilterProperties.getLength(); j++ ) + Sequence< PropertyValue > aFilterProperties; + if ( xFilters->getByName( aFilterList[ i ] ) >>= aFilterProperties ) { - PropertyValue& rProperty( aFilterProperties[ j ] ); - switch( TKGet( rProperty.Name ) ) + FilterEntry aFilterEntry; + sal_Bool bImpressFilter = sal_False; + for ( int j = 0; j < aFilterProperties.getLength(); j++ ) { - case TK_DocumentService : + PropertyValue& rProperty( aFilterProperties[ j ] ); + switch( TKGet( rProperty.Name ) ) { - rtl::OUString sDocumentService; - rProperty.Value >>= sDocumentService; - if ( sDocumentService == OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.presentation.PresentationDocument" ) ) ) - bImpressFilter = sal_True; - else - j = aFilterProperties.getLength(); + case TK_DocumentService : + { + rtl::OUString sDocumentService; + rProperty.Value >>= sDocumentService; + if ( sDocumentService == OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.presentation.PresentationDocument" ) ) ) + bImpressFilter = sal_True; + else + j = aFilterProperties.getLength(); + } + break; + case TK_Name : rProperty.Value >>= aFilterEntry.maName; break; + case TK_UIName : rProperty.Value >>= aFilterEntry.maUIName; break; + case TK_Type : rProperty.Value >>= aFilterEntry.maType; break; + case TK_Flags : rProperty.Value >>= aFilterEntry.maFlags; break; + default : break; } - break; - case TK_Name : rProperty.Value >>= aFilterEntry.maName; break; - case TK_UIName : rProperty.Value >>= aFilterEntry.maUIName; break; - case TK_Type : rProperty.Value >>= aFilterEntry.maType; break; - case TK_Flags : rProperty.Value >>= aFilterEntry.maFlags; break; - default : break; + } + if ( bImpressFilter && ( ( aFilterEntry.maFlags & 3 ) == 3 ) ) + { + aFilterEntryList.push_back( aFilterEntry ); } } - if ( bImpressFilter && ( ( aFilterEntry.maFlags & 3 ) == 3 ) ) - { - aFilterEntryList.push_back( aFilterEntry ); - } + } + catch( Exception& ) + { } } |