&& aDocServiceName != null && aDocServiceName.length() != 0 )
{
try
{
Object oFilterFactory = xContext.getServiceManager().createInstanceWithContext( "com.sun.star.document.FilterFactory", xContext );
XContainerQuery xQuery = ( XContainerQuery )UnoRuntime.queryInterface( XContainerQuery.class, oFilterFactory );
if ( xQuery != null )
{
NamedValue[] aRequest = new NamedValue[2];
aRequest[0] = new NamedValue( "Type", aTypeName );
aRequest[1] = new NamedValue( "DocumentService", aDocServiceName );
XEnumeration xSet = xQuery.createSubSetEnumerationByProperties( aRequest );
if ( xSet != null )
{
boolean bAcceptable = false;
while ( xSet.hasMoreElements() && !bAcceptable )
{