1. mst
  2. ooo340

Commits

ihi  committed 22dd784

CWS-TOOLING: integrate CWS minimizer01
2009-03-30 11:06:17 +0200 sj r270203 : #i100590# fixed crash

  • Participants
  • Parent commits 7a59125
  • Branches default

Comments (0)

Files changed (1)

File sdext/source/minimizer/fileopendialog.cxx

View file
 	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& )
+		{
 		}
 	}