From 5a19eed5c17a594779e6085d212f68bd1bf3c7c9 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Thu, 2 Apr 2009 17:04:27 +0000 Subject: CWS-TOOLING: integrate CWS minimizer01 2009-03-30 11:06:17 +0200 sj r270203 : #i100590# fixed crash --- sdext/source/minimizer/fileopendialog.cxx | 54 +++++++++++++++++-------------- 1 file changed, 30 insertions(+), 24 deletions(-) (limited to 'sdext') 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& ) + { } } -- cgit v1.2.3