From 495fe3bc22cfd09b79db1d822ef25ad5145a281d Mon Sep 17 00:00:00 2001 From: Maxim Monastirsky Date: Wed, 20 Aug 2014 02:01:56 +0300 Subject: queryTypeByURL returns type name not filter name Change-Id: Iad8f2b718af0c947d151f4bbfdcb575440396ff2 --- desktop/source/app/dispatchwatcher.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'desktop') diff --git a/desktop/source/app/dispatchwatcher.cxx b/desktop/source/app/dispatchwatcher.cxx index 01d082e861e4..eba914df01fa 100644 --- a/desktop/source/app/dispatchwatcher.cxx +++ b/desktop/source/app/dispatchwatcher.cxx @@ -133,10 +133,10 @@ const SfxFilter* impl_getExportFilterFromUrl( const rtl::OUString& rUrl, const r const Reference< document::XTypeDetection > xTypeDetector( xContext->getServiceManager()->createInstanceWithContext( "com.sun.star.document.TypeDetection", xContext ), UNO_QUERY_THROW ); - const rtl::OUString aFilterName( xTypeDetector->queryTypeByURL( rUrl ) ); + const rtl::OUString aTypeName( xTypeDetector->queryTypeByURL( rUrl ) ); - const SfxFilter* pFilter( SfxFilter::GetFilterByName( aFilterName ) ); - if ( !pFilter || !pFilter->CanExport() ) + const SfxFilter* pFilter( SfxGetpApp()->GetFilterMatcher().GetFilter4EA( aTypeName, SFX_FILTER_EXPORT ) ); + if ( !pFilter ) pFilter = impl_lookupExportFilterForUrl( rUrl, rFactory ); if ( !pFilter ) { -- cgit v1.2.3